From: Yao Zi <ziyao@disroot.org>
To: Philipp Zabel <p.zabel@pengutronix.de>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
loongarch@lists.linux.dev, Mingcong Bai <jeffbai@aosc.io>,
Kexy Biscuit <kexybiscuit@aosc.io>, Yao Zi <ziyao@disroot.org>
Subject: [PATCH 3/3] LoongArch: dts: Add reset controller for Loongson 2K0300
Date: Sat, 16 Aug 2025 03:33:28 +0000 [thread overview]
Message-ID: <20250816033327.11359-5-ziyao@disroot.org> (raw)
In-Reply-To: <20250816033327.11359-2-ziyao@disroot.org>
Describe the reset controller and add resets for UART nodes.
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
arch/loongarch/boot/dts/loongson-2k0300.dtsi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/loongarch/boot/dts/loongson-2k0300.dtsi b/arch/loongarch/boot/dts/loongson-2k0300.dtsi
index a8ad8bd43f5d..835d3c63537b 100644
--- a/arch/loongarch/boot/dts/loongson-2k0300.dtsi
+++ b/arch/loongarch/boot/dts/loongson-2k0300.dtsi
@@ -7,6 +7,7 @@
/dts-v1/;
#include <dt-bindings/clock/loongson,ls2k0300-clk.h>
+#include <dt-bindings/reset/loongson,ls2k0300-reset.h>
#include <dt-bindings/interrupt-controller/irq.h>
#define PINMUX(pin, func) (((pin) << 8) | func)
@@ -50,6 +51,12 @@ soc@10000000 {
<0x00 0x02000000 0x00 0x02000000 0x0 0x04000000>,
<0x00 0x40000000 0x00 0x40000000 0x0 0x40000000>;
+ rst: reset-controller@1600011c {
+ compatible = "loongson,ls2k0300-reset";
+ reg = <0x0 0x1600011c 0x0 0x8>;
+ #reset-cells = <1>;
+ };
+
clk: clock-controller@16000400 {
compatible = "loongson,ls2k0300-clk";
reg = <0x0 0x16000400 0x0 0x30>;
@@ -128,6 +135,7 @@ uart0: serial@16100000 {
compatible = "ns16550a";
reg = <0 0x16100000 0 0x10>;
clocks = <&clk LS2K0300_CLK_APB_GATE>;
+ resets = <&rst RST_UART0>;
interrupt-parent = <&liointc0>;
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
no-loopback-test;
@@ -141,6 +149,7 @@ uart1: serial@16100400 {
reg = <0 0x16100400 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART1>;
no-loopback-test;
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
@@ -152,6 +161,7 @@ uart2: serial@16100800 {
reg = <0 0x16100800 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART2>;
no-loopback-test;
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
@@ -163,6 +173,7 @@ uart3: serial@16100c00 {
reg = <0 0x16100c00 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART3>;
no-loopback-test;
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>;
@@ -174,6 +185,7 @@ uart4: serial@16101000 {
reg = <0 0x16101000 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART4>;
no-loopback-test;
status = "disabled";
};
@@ -183,6 +195,7 @@ uart5: serial@16101400 {
reg = <0 0x16101400 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART5>;
no-loopback-test;
status = "disabled";
};
@@ -192,6 +205,7 @@ uart6: serial@16101800 {
reg = <0 0x16101800 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART6>;
no-loopback-test;
status = "disabled";
};
@@ -201,6 +215,7 @@ uart7: serial@16101c00 {
reg = <0 0x16101c00 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART7>;
no-loopback-test;
status = "disabled";
};
@@ -210,6 +225,7 @@ uart8: serial@16102000 {
reg = <0 0x16102000 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART8>;
no-loopback-test;
status = "disabled";
};
@@ -219,6 +235,7 @@ uart9: serial@16102400 {
reg = <0 0x16102400 0 0x10>;
interrupt-parent = <&liointc0>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ resets = <&rst RST_UART9>;
no-loopback-test;
status = "disabled";
};
--
2.50.1
prev parent reply other threads:[~2025-08-16 3:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-16 3:33 [PATCH 0/3] Support reset controller of Loongson 2K0300 SoC Yao Zi
2025-08-16 3:33 ` [PATCH 1/3] dt-bindings: reset: Document " Yao Zi
2025-08-16 9:48 ` Krzysztof Kozlowski
2025-08-16 10:24 ` Yao Zi
2025-08-16 3:33 ` [PATCH 2/3] reset: simple: Support " Yao Zi
2025-08-16 3:33 ` Yao Zi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250816033327.11359-5-ziyao@disroot.org \
--to=ziyao@disroot.org \
--cc=chenhuacai@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jeffbai@aosc.io \
--cc=kernel@xen0n.name \
--cc=kexybiscuit@aosc.io \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox