[PATCH v2 2/3] dt-bindings: clock: add header/doc for Siflower sf21-topcrm
From: Chuanhong Guo
Date: Sun May 24 2026 - 09:14:25 EST
Add the device tree binding header and binding doc for
Siflower SF21A6826/SF21H8898 toplevel clock and reset module.
CLK_ETH_REF_P is a clock name that exists in the vendor datasheet.
This clock connects directly to CLK_PCIEPLL_FOUT2 and there's no
clock gate/mux in between. An alias is created for this clock
to make available clock names align with the datasheet.
Signed-off-by: Chuanhong Guo <gch981213@xxxxxxxxx>
---
.../bindings/clock/siflower,sf21-topcrm.yaml | 60 ++++++++++++++++++++++
include/dt-bindings/clock/siflower,sf21-topcrm.h | 42 +++++++++++++++
include/dt-bindings/reset/siflower,sf21-topcrm.h | 25 +++++++++
3 files changed, 127 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/siflower,sf21-topcrm.yaml b/Documentation/devicetree/bindings/clock/siflower,sf21-topcrm.yaml
new file mode 100644
index 000000000000..3782d9c32370
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/siflower,sf21-topcrm.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/siflower,sf21-topcrm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Siflower SF21 toplevel clock and reset module
+
+maintainers:
+ - Chuanhong Guo <gch981213@xxxxxxxxx>
+
+description: |
+ The toplevel clock and reset module on Siflower SF21 SoCs manages
+ the main PLLs, high-level clock muxes/dividers/gates, and some
+ reset lines.
+ Available clocks are defined in:
+ include/dt-bindings/clock/siflower,sf21-topcrm.h
+ Available resets are defined in:
+ include/dt-bindings/reset/siflower,sf21-topcrm.h
+
+properties:
+ compatible:
+ const: siflower,sf21-topcrm
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ "#clock-cells":
+ const: 1
+
+ "#reset-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - "#clock-cells"
+ - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/siflower,sf21-topcrm.h>
+ soc {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ clock-controller@ce00400 {
+ compatible = "siflower,sf21-topcrm";
+ reg = <0x0ce00400 0x400>;
+ clocks = <&refclk>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+ };
diff --git a/include/dt-bindings/clock/siflower,sf21-topcrm.h b/include/dt-bindings/clock/siflower,sf21-topcrm.h
new file mode 100644
index 000000000000..1b2e3cde931a
--- /dev/null
+++ b/include/dt-bindings/clock/siflower,sf21-topcrm.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+
+#ifndef _DT_BINDINGS_CLK_SIFLOWER_SF21_TOPCRM_H
+#define _DT_BINDINGS_CLK_SIFLOWER_SF21_TOPCRM_H
+
+#define SF21_CLK_CMNPLL_VCO 0
+#define SF21_CLK_CMNPLL_POSTDIV 1
+
+#define SF21_CLK_DDRPLL_POSTDIV 2
+
+#define SF21_CLK_PCIEPLL_VCO 3
+#define SF21_CLK_PCIEPLL_FOUT0 4
+#define SF21_CLK_PCIEPLL_FOUT1 5
+#define SF21_CLK_PCIEPLL_FOUT2 6
+#define SF21_CLK_ETH_REF_P SF21_CLK_PCIEPLL_FOUT2
+#define SF21_CLK_PCIEPLL_FOUT3 7
+
+#define SF21_CLK_CPU 8
+#define SF21_CLK_PIC 9
+#define SF21_CLK_AXI 10
+#define SF21_CLK_AHB 11
+#define SF21_CLK_APB 12
+#define SF21_CLK_UART 13
+#define SF21_CLK_IRAM 14
+#define SF21_CLK_NPU 15
+#define SF21_CLK_DDRPHY_REF 16
+#define SF21_CLK_DDR_BYPASS 17
+#define SF21_CLK_ETHTSU 18
+#define SF21_CLK_GMAC_BYP_REF 19
+#define SF21_CLK_USB 20
+#define SF21_CLK_USBPHY 21
+#define SF21_CLK_SERDES_CSR 22
+#define SF21_CLK_CRYPT_CSR 23
+#define SF21_CLK_CRYPT_APP 24
+#define SF21_CLK_IROM 25
+#define SF21_CLK_BOOT 26
+#define SF21_CLK_PVT 27
+#define SF21_CLK_PLL_TEST 28
+#define SF21_CLK_PCIE_REFN 29
+#define SF21_CLK_PCIE_REFP 30
+
+#endif
diff --git a/include/dt-bindings/reset/siflower,sf21-topcrm.h b/include/dt-bindings/reset/siflower,sf21-topcrm.h
new file mode 100644
index 000000000000..fa700accff54
--- /dev/null
+++ b/include/dt-bindings/reset/siflower,sf21-topcrm.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+
+#ifndef _DT_BINDINGS_RESET_SIFLOWER_SF21_TOPCRM_H
+#define _DT_BINDINGS_RESET_SIFLOWER_SF21_TOPCRM_H
+
+#define SF21_RESET_GIC 0
+#define SF21_RESET_AXI 1
+#define SF21_RESET_AHB 2
+#define SF21_RESET_APB 3
+#define SF21_RESET_IRAM 4
+#define SF21_RESET_NPU 5
+#define SF21_RESET_DDR_CTL 6
+#define SF21_RESET_DDR_PHY 7
+#define SF21_RESET_DDR_PWR_OK_IN 8
+#define SF21_RESET_DDR_CTL_APB 9
+#define SF21_RESET_DDR_PHY_APB 10
+#define SF21_RESET_USB 11
+#define SF21_RESET_PVT 12
+#define SF21_RESET_SERDES_CSR 13
+#define SF21_RESET_CRYPT_CSR 14
+#define SF21_RESET_CRYPT_APP 15
+#define SF21_RESET_NPU2DDR_ASYNCBRIDGE 16
+#define SF21_RESET_IROM 17
+
+#endif
--
2.54.0