From: Junhui Liu <junhui.liu@pigmoral.tech>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Junhui Liu <junhui.liu@pigmoral.tech>,
Philipp Zabel <p.zabel@pengutronix.de>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-riscv@lists.infradead.org,
"fushan.zeng" <fushan.zeng@anlogic.com>
Subject: [PATCH 2/5] dt-bindings: clock: add Anlogic DR1V90 CRU
Date: Mon, 22 Sep 2025 22:51:48 +0800 [thread overview]
Message-ID: <20250922-dr1v90-cru-v1-2-e393d758de4e@pigmoral.tech> (raw)
In-Reply-To: <20250922-dr1v90-cru-v1-0-e393d758de4e@pigmoral.tech>
Add the Clock and Reset Unit (CRU) support for the Anlogic DR1V90 SoC,
which is responsible for clock and reset management.
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
---
.../bindings/clock/anlogic,dr1v90-cru.yaml | 60 ++++++++++++++++++++++
include/dt-bindings/clock/anlogic,dr1v90-cru.h | 46 +++++++++++++++++
include/dt-bindings/reset/anlogic,dr1v90-cru.h | 42 +++++++++++++++
3 files changed, 148 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml b/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..165c71ce333a8ee8ebbc86f238bb807880580aca
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/anlogic,dr1v90-cru.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Anlogic DR1V90 Clock and Reset Unit (CRU)
+
+maintainers:
+ - Junhui Liu <junhui.liu@pigmoral.tech>
+
+properties:
+ compatible:
+ const: anlogic,dr1v90-cru
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Main Oscillator (33 MHz)
+ - description: External CAN clock
+ - description: External WDT clock
+
+ clock-names:
+ items:
+ - const: osc_33m
+ - const: can_ext
+ - const: wdt_ext
+
+ "#clock-cells":
+ const: 1
+ description:
+ Refer <dt-bindings/clock/anlogic,dr1v90-cru.h> for valid indices.
+
+ "#reset-cells":
+ const: 1
+ description:
+ Refer <dt-bindings/reset/anlogic,dr1v90-cru.h> for valid indices.
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - "#clock-cells"
+ - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller@f8801000 {
+ compatible = "anlogic,dr1v90-cru";
+ reg = <0xf8801000 0x400>;
+ clocks = <&osc_33m>, <&can_ext>, <&wdt_ext>;
+ clock-names = "osc_33m", "can_ext", "wdt_ext";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
diff --git a/include/dt-bindings/clock/anlogic,dr1v90-cru.h b/include/dt-bindings/clock/anlogic,dr1v90-cru.h
new file mode 100644
index 0000000000000000000000000000000000000000..d87dd7ef4510b5bb2f7f892f5a14aa6d29456767
--- /dev/null
+++ b/include/dt-bindings/clock/anlogic,dr1v90-cru.h
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2025 Shanghai Anlogic Infotech Co., Ltd.
+ * Copyright (c) 2025 Junhui Liu <junhui.liu@pigmoral.tech>
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_ANLOGIC_DR1V90_CRU_H_
+#define _DT_BINDINGS_CLOCK_ANLOGIC_DR1V90_CRU_H_
+
+#define CLK_OSC_DIV2 0
+#define CLK_CPU_PLL 1
+#define CLK_CPU_PLL_4X 2
+#define CLK_CPU_4X 3
+#define CLK_CPU_2X 4
+#define CLK_CPU_1X 5
+#define CLK_IO_PLL 6
+#define CLK_IO_1000M 7
+#define CLK_IO_400M 8
+#define CLK_IO_25M 9
+#define CLK_IO_80M 10
+#define CLK_IO_400M_DIV2 11
+#define CLK_IO_400M_DIV4 12
+#define CLK_IO_400M_DIV8 13
+#define CLK_IO_400M_DIV16 14
+#define CLK_QSPI 15
+#define CLK_SPI 16
+#define CLK_SMC 17
+#define CLK_SDIO 18
+#define CLK_GPIO_DB 19
+#define CLK_EFUSE 20
+#define CLK_TVS 21
+#define CLK_TRNG 22
+#define CLK_OSC_DIV 23
+#define CLK_PWM 24
+#define CLK_FCLK0 25
+#define CLK_FCLK1 26
+#define CLK_FCLK2 27
+#define CLK_FCLK3 28
+#define CLK_WDT_SEL 29
+#define CLK_EFUSE_SEL 30
+#define CLK_CAN_SEL 31
+#define CLK_CPU_SEL 32
+#define CLK_CAN0 33
+#define CLK_CAN1 34
+
+#endif /* _DT_BINDINGS_CLOCK_ANLOGIC_DR1V90_CRU_H_ */
diff --git a/include/dt-bindings/reset/anlogic,dr1v90-cru.h b/include/dt-bindings/reset/anlogic,dr1v90-cru.h
new file mode 100644
index 0000000000000000000000000000000000000000..0eed06f417e01a2dbc5074b9c731d24eff050117
--- /dev/null
+++ b/include/dt-bindings/reset/anlogic,dr1v90-cru.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2025 Shanghai Anlogic Infotech Co., Ltd.
+ * Copyright (c) 2025 Junhui Liu <junhui.liu@pigmoral.tech>
+ */
+
+#ifndef _DT_BINDINGS_RESET_ANLOGIC_DR1V90_CRU_H_
+#define _DT_BINDINGS_RESET_ANLOGIC_DR1V90_CRU_H_
+
+#define RESET_OCM 0
+#define RESET_QSPI 1
+#define RESET_SMC 2
+#define RESET_WDT 3
+#define RESET_DMAC_AXI 4
+#define RESET_DMAC_AHB 5
+#define RESET_NPU 6
+#define RESET_JPU 7
+#define RESET_DDRBUS 8
+#define RESET_NIC_HP0 9
+#define RESET_NIC_HP1 10
+#define RESET_NIC_GP0M 11
+#define RESET_NIC_GP1M 12
+#define RESET_GPIO 13
+#define RESET_IPC 14
+#define RESET_USB0 15
+#define RESET_USB1 16
+#define RESET_GBE0 17
+#define RESET_GBE1 18
+#define RESET_SDIO0 19
+#define RESET_SDIO1 20
+#define RESET_UART0 21
+#define RESET_UART1 22
+#define RESET_SPI0 23
+#define RESET_SPI1 24
+#define RESET_CAN0 25
+#define RESET_CAN1 26
+#define RESET_TTC0 27
+#define RESET_TTC1 28
+#define RESET_I2C0 29
+#define RESET_I2C1 30
+
+#endif /* _DT_BINDINGS_RESET_ANLOGIC_DR1V90_CRU_H_ */
--
2.51.0
next prev parent reply other threads:[~2025-09-22 14:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 14:51 [PATCH 0/5] clk/reset: anlogic: add support for DR1V90 SoC Junhui Liu
2025-09-22 14:51 ` [PATCH 1/5] clk: correct clk_div_mask() return value for width == 32 Junhui Liu
2025-09-23 3:06 ` Troy Mitchell
2025-09-22 14:51 ` Junhui Liu [this message]
2025-09-23 19:02 ` [PATCH 2/5] dt-bindings: clock: add Anlogic DR1V90 CRU Conor Dooley
2025-09-22 14:51 ` [PATCH 3/5] clk: anlogic: add cru support for Anlogic DR1V90 SoC Junhui Liu
2025-09-22 14:51 ` [PATCH 4/5] reset: anlogic: add support for Anlogic DR1V90 resets Junhui Liu
2025-09-22 14:51 ` [PATCH 5/5] riscv: dts: anlogic: add clocks and CRU for DR1V90 Junhui Liu
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=20250922-dr1v90-cru-v1-2-e393d758de4e@pigmoral.tech \
--to=junhui.liu@pigmoral.tech \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fushan.zeng@anlogic.com \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=sboyd@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;
as well as URLs for NNTP newsgroup(s).