[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250523104552.32742-8-ziyao@disroot.org>
Date: Fri, 23 May 2025 10:45:51 +0000
From: Yao Zi <ziyao@...root.org>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Huacai Chen <chenhuacai@...nel.org>,
WANG Xuerui <kernel@...0n.name>,
Yinbo Zhu <zhuyinbo@...ngson.cn>
Cc: linux-clk@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
loongarch@...ts.linux.dev,
Mingcong Bai <jeffbai@...c.io>,
Kexy Biscuit <kexybiscuit@...c.io>,
Yao Zi <ziyao@...root.org>
Subject: [PATCH 7/8] LoongArch: dts: Add clock tree for Loongson 2K0300
Describe the clock controller integrated in Loongson 2K0300 SoC and
clocks for UARTs.
Signed-off-by: Yao Zi <ziyao@...root.org>
---
arch/loongarch/boot/dts/loongson-2k0300.dtsi | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/arch/loongarch/boot/dts/loongson-2k0300.dtsi b/arch/loongarch/boot/dts/loongson-2k0300.dtsi
index ce3574691aa9..44e37d6f8e98 100644
--- a/arch/loongarch/boot/dts/loongson-2k0300.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k0300.dtsi
@@ -6,6 +6,7 @@
/dts-v1/;
+#include <dt-bindings/clock/loongson,ls2k0300-clk.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
@@ -21,7 +22,7 @@ cpu0: cpu@0 {
compatible = "loongson,la264";
reg = <0>;
device_type = "cpu";
- clocks = <&cpu_clk>;
+ clocks = <&clk LS2K0300_CLK_NODE_GATE>;
};
};
@@ -32,9 +33,10 @@ cpuintc: interrupt-controller {
#interrupt-cells = <1>;
};
- cpu_clk: clock-1000m {
+ refclk: clock-120m {
compatible = "fixed-clock";
- clock-frequency = <1000000000>;
+ clock-frequency = <120000000>;
+ clock-output-names = "refclk_120m";
#clock-cells = <0>;
};
@@ -46,6 +48,14 @@ soc@...00000 {
<0x00 0x02000000 0x00 0x02000000 0x0 0x04000000>,
<0x00 0x40000000 0x00 0x40000000 0x0 0x40000000>;
+ clk: clock-controller@...00400 {
+ compatible = "loongson,ls2k0300-clk";
+ reg = <0x0 0x16000400 0x0 0x100>;
+ clocks = <&refclk>;
+ clock-names = "ref_120m";
+ #clock-cells = <1>;
+ };
+
liointc0: interrupt-controller@...01400 {
compatible = "loongson,liointc-2.0";
reg = <0x0 0x16001400 0x0 0x40>,
@@ -87,6 +97,7 @@ liointc1: interrupt-controller@...01440 {
uart0: serial@...00000 {
compatible = "ns16550a";
reg = <0 0x16100000 0 0x10>;
+ clocks = <&clk LS2K0300_CLK_APB_GATE>;
interrupt-parent = <&liointc0>;
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
no-loopback-test;
--
2.49.0
Powered by blists - more mailing lists