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 1/3] dt-bindings: reset: Document reset controller of Loongson 2K0300 SoC
Date: Sat, 16 Aug 2025 03:33:26 +0000 [thread overview]
Message-ID: <20250816033327.11359-3-ziyao@disroot.org> (raw)
In-Reply-To: <20250816033327.11359-2-ziyao@disroot.org>
Add bindings for the reset controller of Loongson 2K0300 SoC.
Signed-off-by: Yao Zi <ziyao@disroot.org>
---
.../reset/loongson,ls2k0300-reset.yaml | 35 ++++++++++
.../reset/loongson,ls2k0300-reset.h | 70 +++++++++++++++++++
2 files changed, 105 insertions(+)
create mode 100644 Documentation/devicetree/bindings/reset/loongson,ls2k0300-reset.yaml
create mode 100644 include/dt-bindings/reset/loongson,ls2k0300-reset.h
diff --git a/Documentation/devicetree/bindings/reset/loongson,ls2k0300-reset.yaml b/Documentation/devicetree/bindings/reset/loongson,ls2k0300-reset.yaml
new file mode 100644
index 000000000000..23c90b892673
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/loongson,ls2k0300-reset.yaml
@@ -0,0 +1,35 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/loongson,ls2k0300-reset.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson 2K0300 SoC Reset Controller
+
+maintainers:
+ - Yao Zi <ziyao@disroot.org>
+
+properties:
+ compatible:
+ const: loongson,ls2k0300-reset
+
+ reg:
+ maxItems: 1
+
+ "#reset-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ rst: reset-controller@1600011c {
+ compatible = "loongson,ls2k0300-reset";
+ reg = <0x1600011c 0x8>;
+ #reset-cells = <1>;
+ };
diff --git a/include/dt-bindings/reset/loongson,ls2k0300-reset.h b/include/dt-bindings/reset/loongson,ls2k0300-reset.h
new file mode 100644
index 000000000000..d425411e6d19
--- /dev/null
+++ b/include/dt-bindings/reset/loongson,ls2k0300-reset.h
@@ -0,0 +1,70 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (C) 2025 Yao Zi <ziyao@disroot.org>
+ */
+#ifndef _DT_BINDINGS_RESET_LOONGSON_LS2K0300_H_
+#define _DT_BINDINGS_RESET_LOONGSON_LS2K0300_H_
+
+#define RST_DDR 0
+#define RST_SPI0 1
+#define RST_SPI1 2
+#define RST_LIO 3
+#define RST_DC 4
+#define RST_GMAC0 5
+#define RST_GMAC1 6
+#define RST_USBM 7
+#define RST_USB 8
+#define RST_OTG 9
+#define RST_GPIO 10
+#define RST_I2S 11
+#define RST_ADC 12
+#define RST_WDT 13
+#define RST_RTC 14
+#define RST_OTP 15
+#define RST_DMA 16
+#define RST_SPI2 17
+#define RST_SPI3 18
+#define RST_CAN0 19
+#define RST_CAN1 20
+#define RST_CAN2 21
+#define RST_CAN3 22
+#define RST_I2C0 23
+#define RST_I2C1 24
+#define RST_I2C2 25
+#define RST_I2C3 26
+#define RST_HPET0 27
+#define RST_HPET1 28
+#define RST_HPET2 29
+#define RST_HPET3 30
+#define RST_ATIMER 31
+#define RST_GTIMER 32
+#define RST_BTIMER 33
+#define RST_PWM 34
+#define RST_UART0 35
+#define RST_UART1 36
+#define RST_UART2 37
+#define RST_UART3 38
+#define RST_UART4 39
+#define RST_UART5 40
+#define RST_UART6 41
+#define RST_UART7 42
+#define RST_UART8 43
+#define RST_UART9 44
+#define RST_SDIO0 45
+#define RST_SDIO1 46
+#define RST_CANBUF0 47
+#define RST_CANBUF1 48
+#define RST_CANBUF2 49
+#define RST_CANBUF3 50
+#define RST_CANRAM 51
+#define RST_ENCDMA 52
+#define RST_SM2 53
+#define RST_RNG 54
+#define RST_AES 55
+#define RST_DES 56
+#define RST_SM3 57
+#define RST_SM4 58
+#define RST_SDIOM 59
+#define RST_APBM 60
+
+#endif /* _DT_BINDINGS_RESET_LOONGSON_LS2K0300_H_ */
--
2.50.1
next prev parent reply other threads:[~2025-08-16 3:34 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 ` Yao Zi [this message]
2025-08-16 9:48 ` [PATCH 1/3] dt-bindings: reset: Document " 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 ` [PATCH 3/3] LoongArch: dts: Add reset controller for Loongson 2K0300 Yao Zi
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-3-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