Skip to contentSkip to conversation

Add support for Cix Sky1 resets

PATCH Superseded Gary Yang 3 participants 17 messages Nov 7, 2025 – Nov 10, 2025

Subsystems (3)

v1 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH 1/3 dt-bindings: reset: add sky1 reset controller

In reply to Gary Yang

There are two reset controllers on Cix sky1 Soc. One is located in S0 domain, and the other is located in S5 domain.

---
 .../bindings/reset/cix,sky1-rst.yaml          |  48 +++++
 include/dt-bindings/reset/cix,sky1-rst-fch.h  |  45 +++++
 include/dt-bindings/reset/cix,sky1-rst.h      | 167 ++++++++++++++++++
 3 files changed, 260 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml
 create mode 100644 include/dt-bindings/reset/cix,sky1-rst-fch.h
 create mode 100644 include/dt-bindings/reset/cix,sky1-rst.h
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +48 -0
new file mode 100644
index 000000000000..72de480b064c
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/cix,sky1-rst.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CIX Sky1 Reset Controller
+
+maintainers:
+  - Gary Yang <[email protected]>
+
+description: |
+  CIX Sky1 reset controller can be used to reset various set of peripherals.
+  There are two reset controllers, one is located in S0 domain, the other
+  is located in S5 domain.
+
+  See also:
+  - dt-bindings/reset/cix,sky1-rst.h
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - cix,sky1-rst
+          - cix,sky1-rst-fch
+      - const: syscon
+
+  reg:
+    maxItems: 2
+
+  '#reset-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/reset/cix,sky1-rst.h>
+    reset-controller@16000000 {
+      compatible = "cix,sky1-rst", "syscon";
+      reg = <0x0 0x16000000 0x0 0x1000>;
+      #reset-cells = <1>;
+    };
include/dt-bindings/reset/cix,sky1-rst-fch.h new file +45 -0

45 lines not on this page · raw message

include/dt-bindings/reset/cix,sky1-rst.h new file +167 -0

167 lines not on this page · raw message

Signature · 1 line
2.49.0
author maintainer
#6 lore raw

PATCH 2/3 Reset: cix: add support for cix sky1 resets

In reply to Gary Yang

There are two reset controllers on Cix Sky1 Soc. One is located in S0 domain, and the other is located in S5 domain.

---
 drivers/reset/Kconfig      |   7 +
 drivers/reset/Makefile     |   1 +
 drivers/reset/reset-sky1.c | 403 +++++++++++++++++++++++++++++++++++++
 3 files changed, 411 insertions(+)
 create mode 100644 drivers/reset/reset-sky1.c
drivers/reset/Kconfig +7 -0
index 78b7078478d4..45768cd3b135 100644
@@ -278,6 +278,13 @@ config RESET_SIMPLE
 	   - SiFive FU740 SoCs
 	   - Sophgo SoCs
 
+config RESET_SKY1
+	bool "Cix Sky1 reset controller"
+	depends on HAS_IOMEM
+	depends on ARCH_CIX || COMPILE_TEST
+	help
+	  This enables the reset controller for Cix Sky1.
+
 config RESET_SOCFPGA
 	bool "SoCFPGA Reset Driver" if COMPILE_TEST && (!ARM || !ARCH_INTEL_SOCFPGA)
 	default ARM && ARCH_INTEL_SOCFPGA
drivers/reset/Makefile +1 -0
index f7934f9fb90b..a878ac4a6e4b 100644
@@ -36,6 +36,7 @@ obj-$(CONFIG_RESET_RZG2L_USBPHY_CTRL) += reset-rzg2l-usbphy-ctrl.o
 obj-$(CONFIG_RESET_RZV2H_USB2PHY) += reset-rzv2h-usb2phy.o
 obj-$(CONFIG_RESET_SCMI) += reset-scmi.o
 obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o
+obj-$(CONFIG_RESET_SKY1) += reset-sky1.o
 obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
 obj-$(CONFIG_RESET_SPACEMIT) += reset-spacemit.o
 obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
drivers/reset/reset-sky1.c new file +403 -0

403 lines not on this page · raw message

Signature · 1 line
2.49.0
author maintainer
#14 lore raw

PATCH 3/3 dts: reset: add support for cix sky1 resets

In reply to Gary Yang

There are two reset conctrollers on Cix Sky1 Soc. One is located in S0 domain, and the other is located in S5 domain.

---
 arch/arm64/boot/dts/cix/sky1.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/cix/sky1.dtsi +14 -0
index d21387224e79..fc68734f37c2 100644
@@ -348,6 +348,13 @@ i3c1: i3c@4100000 {
 			status = "disabled";
 		};
 
+		src_fch: reset-controller@4160000 {
+			compatible = "cix,sky1-rst-fch", "syscon";
+			reg = <0x0 0x04160000 0x0 0x90>;
+			#reset-cells = <1>;
+			status = "okay";
+		};
+
 		iomuxc: pinctrl@4170000 {
 			compatible = "cix,sky1-iomuxc";
 			reg = <0x0 0x04170000 0x0 0x1000>;
@@ -568,6 +575,13 @@ ppi_partition1: interrupt-partition-1 {
 			};
 		};
 
+		src: reset-controller@16000000 {
+			compatible = "cix,sky1-rst", "syscon";
+			reg = <0x0 0x16000000 0x0 0x1000>;
+			#reset-cells = <1>;
+			status = "okay";
+		};
+
 		iomuxc_s5: pinctrl@16007000 {
 			compatible = "cix,sky1-iomuxc-s5";
 			reg = <0x0 0x16007000 0x0 0x1000>;
Signature · 1 line
2.49.0

Gary Yang

author maintainer
#0 lore raw

cover Add support for Cix Sky1 resets

Patch 1: Add yaml file for Cix Sky1 resets
Patch 2: Add driver codes for Cix Sky1 resets
Patch 3: Add dts nodes for Cix Sky1 resets

Gary Yang (3):
dt-bindings: reset: add sky1 reset controller
Reset: cix: add support for cix sky1 resets
dts: reset: add support for cix sky1 resets

 .../bindings/reset/cix,sky1-rst.yaml          |  48 +++
 arch/arm64/boot/dts/cix/sky1.dtsi             |  14 +
 drivers/reset/Kconfig                         |   7 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/reset-sky1.c                    | 403 ++++++++++++++++++
 include/dt-bindings/reset/cix,sky1-rst-fch.h  |  45 ++
 include/dt-bindings/reset/cix,sky1-rst.h      | 167 ++++++++
 7 files changed, 685 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml
 create mode 100644 drivers/reset/reset-sky1.c
 create mode 100644 include/dt-bindings/reset/cix,sky1-rst-fch.h
 create mode 100644 include/dt-bindings/reset/cix,sky1-rst.h
Signature · 1 line
2.49.0
#2 lore raw

Re: [PATCH 1/3] dt-bindings: reset: add sky1 reset controller

In reply to Gary Yang

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 18

Quoted 10 lines · Gary Yang
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +10 -0
+maintainers:
+  - Gary Yang <[email protected]>
+
+description: |
+  CIX Sky1 reset controller can be used to reset various set of peripherals.
+  There are two reset controllers, one is located in S0 domain, the other
+  is located in S5 domain.
+
+  See also:
+  - dt-bindings/reset/cix,sky1-rst.h

Use full path here.

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 29

Quoted 11 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +11 -0
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - cix,sky1-rst
+          - cix,sky1-rst-fch
+      - const: syscon
+
+  reg:
+    maxItems: 2

You need to list the items.

Quoted 7 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +7 -0
+
+  '#reset-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 46

Quoted 10 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +10 -0
+  - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/reset/cix,sky1-rst.h>
+    reset-controller@16000000 {
+      compatible = "cix,sky1-rst", "syscon";
+      reg = <0x0 0x16000000 0x0 0x1000>;

Clearly wrong - you said two items.

Quoted 2 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +2 -0
+      #reset-cells = <1>;
+    };

...

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+#define SKY1_FCH_RESET_NUM	29

Drop, not ABI (usually).

Quoted 3 lines
include/dt-bindings/reset/cix,sky1-rst-fch.h new file +3 -0
+
+#endif
+

...

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+#define SKY1_RESET_NUM				143

Drop

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

In reply to Gary Yang
Quoted 5 lines · Gary Yang

There are two reset controllers on Cix Sky1 Soc. One is located in S0 domain, and the other is located in S5 domain.

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

It is not "Reset:". Mark capitals.

Quoted 1 line

---

...

drivers/reset/reset-sky1.c line 393

Quoted 12 lines
drivers/reset/reset-sky1.c new file +12 -0
+static struct platform_driver sky1_reset_driver = {
+	.probe	= sky1_reset_probe,
+	.driver = {
+		.name		= KBUILD_MODNAME,
+		.of_match_table	= sky1_reset_dt_ids,
+	},
+};
+static int __init reset_sky1_init(void)
+{
+	return platform_driver_register(&sky1_reset_driver);
+}
+subsys_initcall(reset_sky1_init);

This should be rather just module_platform_driver. Does not look like part of subsystem, but looks like regular driver.

drivers/reset/reset-sky1.c line 403

Quoted 13 lines
drivers/reset/reset-sky1.c new file +10 -0
+
+static void __exit reset_sky1_exit(void)
+{
+	platform_driver_unregister(&sky1_reset_driver);
+}
+module_exit(reset_sky1_exit);
 
 
 
+
+MODULE_AUTHOR("Jerry Zhu <[email protected]>");
+MODULE_DESCRIPTION("Cix Sky1 reset driver");
+MODULE_LICENSE("GPL");

Best regards,
Krzysztof

#15 lore raw

Re: [PATCH 3/3] dts: reset: add support for cix sky1 resets

In reply to Gary Yang
Quoted 8 lines · Gary Yang

There are two reset conctrollers on Cix Sky1 Soc. One is located in S0 domain, and the other is located in S5 domain.

---
 arch/arm64/boot/dts/cix/sky1.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Please start paying attention to this.

Quoted 6 lines
arch/arm64/boot/dts/cix/sky1.dtsi +0 -0
index d21387224e79..fc68734f37c2 100644

arch/arm64/boot/dts/cix/sky1.dtsi i3c1: i3c@4100000 { · line 355

Quoted 8 lines
arch/arm64/boot/dts/cix/sky1.dtsi +5 -0
@@ -348,6 +348,13 @@ i3c1: i3c@4100000 {
 			status = "disabled";
 		};
 
+		src_fch: reset-controller@4160000 {
+			compatible = "cix,sky1-rst-fch", "syscon";
+			reg = <0x0 0x04160000 0x0 0x90>;
+			#reset-cells = <1>;
+			status = "okay";

Why?

Quoted 6 lines
arch/arm64/boot/dts/cix/sky1.dtsi +2 -0
+		};
+
 		iomuxc: pinctrl@4170000 {
 			compatible = "cix,sky1-iomuxc";
 			reg = <0x0 0x04170000 0x0 0x1000>;

arch/arm64/boot/dts/cix/sky1.dtsi ppi_partition1: interrupt-partition-1 { · line 582

Quoted 8 lines
arch/arm64/boot/dts/cix/sky1.dtsi +5 -0
@@ -568,6 +575,13 @@ ppi_partition1: interrupt-partition-1 {
 			};
 		};
 
+		src: reset-controller@16000000 {
+			compatible = "cix,sky1-rst", "syscon";
+			reg = <0x0 0x16000000 0x0 0x1000>;
+			#reset-cells = <1>;
+			status = "okay";

No, really, why?

Best regards,
Krzysztof

maintainer
#13 lore raw

Re: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

In reply to Gary Yang
Quoted 12 lines · Gary Yang

There are two reset controllers on Cix Sky1 Soc. One is located in S0 domain, and the other is located in S5 domain.

---
 drivers/reset/Kconfig      |   7 +
 drivers/reset/Makefile     |   1 +
 drivers/reset/reset-sky1.c | 403 +++++++++++++++++++++++++++++++++++++
 3 files changed, 411 insertions(+)
 create mode 100644 drivers/reset/reset-sky1.c

[...]

Quoted 6 lines
drivers/reset/reset-sky1.c new file +0 -0
new file mode 100644
index 000000000000..14aa7292c0d5

drivers/reset/reset-sky1.c line 10

Quoted 10 lines
drivers/reset/reset-sky1.c new file +10 -0
@@ -0,0 +1,403 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ *
+ * CIX System Reset Controller (SRC) driver
+ *
+ * Author: Jerry Zhu <[email protected]>
+ */
+
+#include <linux/delay.h>
+#include <linux/mfd/syscon.h>

This appears to be unused.

Is this a left-over or did you intend to register the regmap with syscon?

Quoted 5 lines
drivers/reset/reset-sky1.c new file +5 -0
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include <linux/reset-controller.h>

drivers/reset/reset-sky1.c line 25

Quoted 10 lines
drivers/reset/reset-sky1.c new file +10 -0
+#include <linux/regmap.h>
+
+#include <dt-bindings/reset/cix,sky1-rst.h>
+#include <dt-bindings/reset/cix,sky1-rst-fch.h>
+
+#define SKY1_RESET_SLEEP_MIN_US		10000
+#define SKY1_RESET_SLEEP_MAX_US		20000
+
+struct sky1_src_signal {
+	unsigned int offset, mask;

Since all masks only contain a single BIT(), consider storing the bit index instead.

Quoted 19 lines
drivers/reset/reset-sky1.c new file +19 -0
+};
+
+struct sky1_src_variant {
+	const struct sky1_src_signal *signals;
+	unsigned int signals_num;
+};
+
+struct sky1_src {
+	struct reset_controller_dev rcdev;
+	struct regmap *regmap;
+	const struct sky1_src_signal *signals;
+};
+
+enum {
+	CSU_PM_RESET				= 0x304,
+	SENSORHUB_RESET				= 0x308,
+	SENSORHUB_NOC_RESET			= 0x30c,
+
+	RESET_GROUP0_S0_DOMAIN_0		= 0x400,

drivers/reset/reset-sky1.c line 54

Quoted 10 lines
drivers/reset/reset-sky1.c new file +10 -0
+	RESET_GROUP0_S0_DOMAIN_1		= 0x404,
+	RESET_GROUP1_USB_PHYS			= 0x408,
+	RESET_GROUP1_USB_CONTROLLERS		= 0x40c,
+
+	RESET_GROUP0_RCSU			= 0x800,
+	RESET_GROUP1_RCSU			= 0x804,
+
+};
+
+static const struct sky1_src_signal sky1_src_signals[SKY1_RESET_NUM] = {

Just drop SKY1_RESET_NUM.

Quoted 154 lines
drivers/reset/reset-sky1.c new file +154 -0
+	/* reset group1 for s0 domain modules */
+	[SKY1_CSU_PM_RESET_N]		= { CSU_PM_RESET, BIT(0) },
+	[SKY1_SENSORHUB_RESET_N]	= { SENSORHUB_RESET, BIT(0) },
+	[SKY1_SENSORHUB_NOC_RESET_N]	= { SENSORHUB_NOC_RESET, BIT(0) },
+	[SKY1_DDRC_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(0) },
+	[SKY1_GIC_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(1) },
+	[SKY1_CI700_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(2) },
+	[SKY1_SYS_NI700_RESET_N]	= { RESET_GROUP0_S0_DOMAIN_0, BIT(3) },
+	[SKY1_MM_NI700_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(4) },
+	[SKY1_PCIE_NI700_RESET_N]	= { RESET_GROUP0_S0_DOMAIN_0, BIT(5) },
+	[SKY1_GPU_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(6) },
+	[SKY1_NPUTOP_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(7) },
+	[SKY1_NPUCORE0_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(8) },
+	[SKY1_NPUCORE1_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(9) },
+	[SKY1_NPUCORE2_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(10) },
+	[SKY1_VPU_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(11) },
+	[SKY1_ISP_SRESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(12) },
+	[SKY1_ISP_ARESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(13) },
+	[SKY1_ISP_HRESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(14) },
+	[SKY1_ISP_GDCRESET_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(15) },
+	[SKY1_DPU_RESET0_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(16) },
+	[SKY1_DPU_RESET1_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(17) },
+	[SKY1_DPU_RESET2_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(18) },
+	[SKY1_DPU_RESET3_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(19) },
+	[SKY1_DPU_RESET4_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(20) },
+	[SKY1_DP_RESET0_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(21) },
+	[SKY1_DP_RESET1_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(22) },
+	[SKY1_DP_RESET2_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(23) },
+	[SKY1_DP_RESET3_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(24) },
+	[SKY1_DP_RESET4_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(25) },
+	[SKY1_DP_PHY_RST_N]		= { RESET_GROUP0_S0_DOMAIN_0, BIT(26) },
+
+	/* reset group1 for s0 domain modules */
+	[SKY1_AUDIO_HIFI5_RESET_N]	= { RESET_GROUP0_S0_DOMAIN_1, BIT(0) },
+	[SKY1_AUDIO_HIFI5_NOC_RESET_N]	= { RESET_GROUP0_S0_DOMAIN_1, BIT(1) },
+	[SKY1_CSIDPHY_PRST0_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(2) },
+	[SKY1_CSIDPHY_CMNRST0_N]	= { RESET_GROUP0_S0_DOMAIN_1, BIT(3) },
+	[SKY1_CSI0_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(4) },
+	[SKY1_CSIDPHY_PRST1_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(5) },
+	[SKY1_CSIDPHY_CMNRST1_N]	= { RESET_GROUP0_S0_DOMAIN_1, BIT(6) },
+	[SKY1_CSI1_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(7) },
+	[SKY1_CSI2_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(8) },
+	[SKY1_CSI3_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(9) },
+	[SKY1_CSIBRDGE0_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(10) },
+	[SKY1_CSIBRDGE1_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(11) },
+	[SKY1_CSIBRDGE2_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(12) },
+	[SKY1_CSIBRDGE3_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(13) },
+	[SKY1_GMAC0_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(14) },
+	[SKY1_GMAC1_RST_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(15) },
+	[SKY1_PCIE0_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(16) },
+	[SKY1_PCIE1_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(17) },
+	[SKY1_PCIE2_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(18) },
+	[SKY1_PCIE3_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(19) },
+	[SKY1_PCIE4_RESET_N]		= { RESET_GROUP0_S0_DOMAIN_1, BIT(20) },
+
+	/* reset group1 for usb phys */
+	[SKY1_USB_DP_PHY0_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(0) },
+	[SKY1_USB_DP_PHY1_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(1) },
+	[SKY1_USB_DP_PHY2_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(2) },
+	[SKY1_USB_DP_PHY3_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(3) },
+	[SKY1_USB_DP_PHY0_RST_N]		= { RESET_GROUP1_USB_PHYS, BIT(4) },
+	[SKY1_USB_DP_PHY1_RST_N]		= { RESET_GROUP1_USB_PHYS, BIT(5) },
+	[SKY1_USB_DP_PHY2_RST_N]		= { RESET_GROUP1_USB_PHYS, BIT(6) },
+	[SKY1_USB_DP_PHY3_RST_N]		= { RESET_GROUP1_USB_PHYS, BIT(7) },
+	[SKY1_USBPHY_SS_PST_N]			= { RESET_GROUP1_USB_PHYS, BIT(8) },
+	[SKY1_USBPHY_SS_RST_N]			= { RESET_GROUP1_USB_PHYS, BIT(9) },
+	[SKY1_USBPHY_HS0_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(10) },
+	[SKY1_USBPHY_HS1_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(11) },
+	[SKY1_USBPHY_HS2_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(12) },
+	[SKY1_USBPHY_HS3_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(13) },
+	[SKY1_USBPHY_HS4_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(14) },
+	[SKY1_USBPHY_HS5_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(15) },
+	[SKY1_USBPHY_HS6_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(16) },
+	[SKY1_USBPHY_HS7_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(17) },
+	[SKY1_USBPHY_HS8_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(18) },
+	[SKY1_USBPHY_HS9_PRST_N]		= { RESET_GROUP1_USB_PHYS, BIT(19) },
+
+	/* reset group1 for usb controllers */
+	[SKY1_USBC_SS0_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(0) },
+	[SKY1_USBC_SS1_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(1) },
+	[SKY1_USBC_SS2_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(2) },
+	[SKY1_USBC_SS3_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(3) },
+	[SKY1_USBC_SS4_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(4) },
+	[SKY1_USBC_SS5_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(5) },
+	[SKY1_USBC_SS0_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(6) },
+	[SKY1_USBC_SS1_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(7) },
+	[SKY1_USBC_SS2_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(8) },
+	[SKY1_USBC_SS3_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(9) },
+	[SKY1_USBC_SS4_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(10) },
+	[SKY1_USBC_SS5_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(11) },
+	[SKY1_USBC_HS0_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(12) },
+	[SKY1_USBC_HS1_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(13) },
+	[SKY1_USBC_HS2_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(14) },
+	[SKY1_USBC_HS3_PRST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(15) },
+	[SKY1_USBC_HS0_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(16) },
+	[SKY1_USBC_HS1_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(17) },
+	[SKY1_USBC_HS2_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(18) },
+	[SKY1_USBC_HS3_RST_N]		= { RESET_GROUP1_USB_CONTROLLERS, BIT(19) },
+
+	/* reset group0 for rcsu */
+	[SKY1_AUDIO_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(0) },
+	[SKY1_CI700_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(1) },
+	[SKY1_CSI_RCSU0_RESET_N]		= { RESET_GROUP0_RCSU, BIT(2) },
+	[SKY1_CSI_RCSU1_RESET_N]		= { RESET_GROUP0_RCSU, BIT(3) },
+	[SKY1_CSU_PM_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(4) },
+	[SKY1_DDR_BROADCAST_RCSU_RESET_N]	= { RESET_GROUP0_RCSU, BIT(5) },
+	[SKY1_DDR_CTRL_RCSU_0_RESET_N]		= { RESET_GROUP0_RCSU, BIT(6) },
+	[SKY1_DDR_CTRL_RCSU_1_RESET_N]		= { RESET_GROUP0_RCSU, BIT(7) },
+	[SKY1_DDR_CTRL_RCSU_2_RESET_N]		= { RESET_GROUP0_RCSU, BIT(8) },
+	[SKY1_DDR_CTRL_RCSU_3_RESET_N]		= { RESET_GROUP0_RCSU, BIT(9) },
+	[SKY1_DDR_TZC400_RCSU_0_RESET_N]	= { RESET_GROUP0_RCSU, BIT(10) },
+	[SKY1_DDR_TZC400_RCSU_1_RESET_N]	= { RESET_GROUP0_RCSU, BIT(11) },
+	[SKY1_DDR_TZC400_RCSU_2_RESET_N]	= { RESET_GROUP0_RCSU, BIT(12) },
+	[SKY1_DDR_TZC400_RCSU_3_RESET_N]	= { RESET_GROUP0_RCSU, BIT(13) },
+	[SKY1_DP0_RCSU_RESET_N]			= { RESET_GROUP0_RCSU, BIT(14) },
+	[SKY1_DP1_RCSU_RESET_N]			= { RESET_GROUP0_RCSU, BIT(15) },
+	[SKY1_DP2_RCSU_RESET_N]			= { RESET_GROUP0_RCSU, BIT(16) },
+	[SKY1_DP3_RCSU_RESET_N]			= { RESET_GROUP0_RCSU, BIT(17) },
+	[SKY1_DP4_RCSU_RESET_N]			= { RESET_GROUP0_RCSU, BIT(18) },
+	[SKY1_DPU0_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(19) },
+	[SKY1_DPU1_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(20) },
+	[SKY1_DPU2_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(21) },
+	[SKY1_DPU3_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(22) },
+	[SKY1_DPU4_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(23) },
+	[SKY1_DSU_RCSU_RESET_N]			= { RESET_GROUP0_RCSU, BIT(24) },
+	[SKY1_FCH_RCSU_RESET_N]			= { RESET_GROUP0_RCSU, BIT(25) },
+	[SKY1_GICD_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(26) },
+	[SKY1_GMAC_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(27) },
+	[SKY1_GPU_RCSU_RESET_N]			= { RESET_GROUP0_RCSU, BIT(28) },
+	[SKY1_ISP_RCSU0_RESET_N]		= { RESET_GROUP0_RCSU, BIT(29) },
+	[SKY1_ISP_RCSU1_RESET_N]		= { RESET_GROUP0_RCSU, BIT(30) },
+	[SKY1_NI700_MMHUB_RCSU_RESET_N]		= { RESET_GROUP0_RCSU, BIT(31) },
+
+	/* reset group1 for rcsu */
+	[SKY1_NPU_RCSU_RESET_N]			= { RESET_GROUP1_RCSU, BIT(0) },
+	[SKY1_NI700_PCIE_RCSU_RESET_N]		= { RESET_GROUP1_RCSU, BIT(1) },
+	[SKY1_PCIE_X421_RCSU_RESET_N]		= { RESET_GROUP1_RCSU, BIT(2) },
+	[SKY1_PCIE_X8_RCSU_RESET_N]		= { RESET_GROUP1_RCSU, BIT(3) },
+	[SKY1_SF_RCSU_RESET_N]			= { RESET_GROUP1_RCSU, BIT(4) },
+	[SKY1_RCSU_SMMU_MMHUB_RESET_N]		= { RESET_GROUP1_RCSU, BIT(5) },
+	[SKY1_RCSU_SMMU_PCIEHUB_RESET_N]	= { RESET_GROUP1_RCSU, BIT(6) },
+	[SKY1_RCSU_SYSHUB_RESET_N]		= { RESET_GROUP1_RCSU, BIT(7) },
+	[SKY1_NI700_SMN_RCSU_RESET_N]		= { RESET_GROUP1_RCSU, BIT(8) },
+	[SKY1_NI700_SYSHUB_RCSU_RESET_N]	= { RESET_GROUP1_RCSU, BIT(9) },
+	[SKY1_RCSU_USB2_HOST0_RESET_N]		= { RESET_GROUP1_RCSU, BIT(10) },
+	[SKY1_RCSU_USB2_HOST1_RESET_N]		= { RESET_GROUP1_RCSU, BIT(11) },
+	[SKY1_RCSU_USB2_HOST2_RESET_N]		= { RESET_GROUP1_RCSU, BIT(12) },
+	[SKY1_RCSU_USB2_HOST3_RESET_N]		= { RESET_GROUP1_RCSU, BIT(13) },
+	[SKY1_RCSU_USB3_TYPEA_DRD_RESET_N]	= { RESET_GROUP1_RCSU, BIT(14) },
+	[SKY1_RCSU_USB3_TYPEC_DRD_RESET_N]	= { RESET_GROUP1_RCSU, BIT(15) },
+	[SKY1_RCSU_USB3_TYPEC_HOST0_RESET_N]	= { RESET_GROUP1_RCSU, BIT(16) },
+	[SKY1_RCSU_USB3_TYPEC_HOST1_RESET_N]	= { RESET_GROUP1_RCSU, BIT(17) },
+	[SKY1_RCSU_USB3_TYPEC_HOST2_RESET_N]	= { RESET_GROUP1_RCSU, BIT(18) },
+	[SKY1_VPU_RCSU_RESET_N]			= { RESET_GROUP1_RCSU, BIT(19) },

drivers/reset/reset-sky1.c line 218

Quoted 10 lines
drivers/reset/reset-sky1.c new file +10 -0
+
+};
+
+enum {
+	FCH_SW_RST_FUNC			= 0x008,
+	FCH_SW_RST_BUS			= 0x00c,
+	FCH_SW_XSPI			= 0x010,
+};
+
+static const struct sky1_src_signal sky1_src_fch_signals[SKY1_FCH_RESET_NUM] = {

Same, drop SKY1_FCH_RESET_NUM.

Quoted 48 lines
drivers/reset/reset-sky1.c new file +48 -0
+	/* resets for fch_sw_rst_func */
+	[SW_I3C0_RST_FUNC_G_N]	= { FCH_SW_RST_FUNC, BIT(0) },
+	[SW_I3C0_RST_FUNC_I_N]	= { FCH_SW_RST_FUNC, BIT(1) },
+	[SW_I3C1_RST_FUNC_G_N]	= { FCH_SW_RST_FUNC, BIT(2) },
+	[SW_I3C1_RST_FUNC_I_N]	= { FCH_SW_RST_FUNC, BIT(3) },
+	[SW_UART0_RST_FUNC_N]	= { FCH_SW_RST_FUNC, BIT(4) },
+	[SW_UART1_RST_FUNC_N]	= { FCH_SW_RST_FUNC, BIT(5) },
+	[SW_UART2_RST_FUNC_N]	= { FCH_SW_RST_FUNC, BIT(6) },
+	[SW_UART3_RST_FUNC_N]	= { FCH_SW_RST_FUNC, BIT(7) },
+	[SW_TIMER_RST_FUNC_N]	= { FCH_SW_RST_FUNC, BIT(20) },
+
+	/* resets for fch_sw_rst_bus */
+	[SW_I3C0_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(0) },
+	[SW_I3C1_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(1) },
+	[SW_DMA_RST_AXI_N]	= { FCH_SW_RST_BUS, BIT(2) },
+	[SW_UART0_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(4) },
+	[SW_UART1_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(5) },
+	[SW_UART2_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(6) },
+	[SW_UART3_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(7) },
+	[SW_SPI0_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(8) },
+	[SW_SPI1_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(9) },
+	[SW_I2C0_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(12) },
+	[SW_I2C1_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(13) },
+	[SW_I2C2_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(14) },
+	[SW_I2C3_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(15) },
+	[SW_I2C4_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(16) },
+	[SW_I2C5_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(17) },
+	[SW_I2C6_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(18) },
+	[SW_I2C7_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(19) },
+	[SW_GPIO_RST_APB_N]	= { FCH_SW_RST_BUS, BIT(21) },
+
+	/* resets for fch_sw_xspi */
+	[SW_XSPI_REG_RST_N]	= { FCH_SW_XSPI, BIT(0) },
+	[SW_XSPI_SYS_RST_N]	= { FCH_SW_XSPI, BIT(1) },
+};
+
+static struct sky1_src *to_sky1_src(struct reset_controller_dev *rcdev)
+{
+	return container_of(rcdev, struct sky1_src, rcdev);
+}
+
+static int sky1_reset_update(struct sky1_src *sky1src,
+			     unsigned long id, unsigned int value)
+{
+	const struct sky1_src_signal *signal = &sky1src->signals[id];
+
+	return regmap_update_bits(sky1src->regmap,
+				  signal->offset, signal->mask, value);

drivers/reset/reset-sky1.c line 276

Quoted 10 lines
drivers/reset/reset-sky1.c new file +10 -0
+}
+
+static int sky1_reset_set(struct reset_controller_dev *rcdev,
+			  unsigned long id, bool assert)
+{
+	struct sky1_src *sky1src = to_sky1_src(rcdev);
+	unsigned int value = assert ? 0 : sky1src->signals[id].mask;
+
+	return sky1_reset_update(sky1src, id, value);
+}

Merge sky1_reset_update() and sky1_reset_set() into a single function.

Quoted 7 lines
drivers/reset/reset-sky1.c new file +7 -0
+
+static int sky1_reset(struct reset_controller_dev *rcdev,
+			     unsigned long id)
+{
+	sky1_reset_set(rcdev, id, true);
+	usleep_range(SKY1_RESET_SLEEP_MIN_US,
+		     SKY1_RESET_SLEEP_MAX_US);

drivers/reset/reset-sky1.c line 293

Quoted 10 lines
drivers/reset/reset-sky1.c new file +10 -0
+
+	sky1_reset_set(rcdev, id, false);
+
+	/*
+	 * Ensure component is taken out reset state by sleeping also after
+	 * deasserting the reset, Otherwise, the component may not be ready
+	 * for operation.
+	 */
+	usleep_range(SKY1_RESET_SLEEP_MIN_US,
+		     SKY1_RESET_SLEEP_MAX_US);

Why is the delay needed here but not in sky1_reset_deassert()?

Quoted 58 lines
drivers/reset/reset-sky1.c new file +58 -0
+	return 0;
+}
+
+static int sky1_reset_assert(struct reset_controller_dev *rcdev,
+			     unsigned long id)
+{
+	return sky1_reset_set(rcdev, id, true);
+}
+
+static int sky1_reset_deassert(struct reset_controller_dev *rcdev,
+			       unsigned long id)
+{
+	return sky1_reset_set(rcdev, id, false);
+}
+
+static int sky1_reset_status(struct reset_controller_dev *rcdev,
+			       unsigned long id)
+{
+	unsigned int value = 0;
+	struct sky1_src *sky1_src = to_sky1_src(rcdev);
+	const struct sky1_src_signal *signal = &sky1_src->signals[id];
+
+	regmap_read(sky1_src->regmap, signal->offset, &value);
+	return !(value & signal->mask);
+}
+
+static const struct reset_control_ops sky1_src_ops = {
+	.reset    = sky1_reset,
+	.assert   = sky1_reset_assert,
+	.deassert = sky1_reset_deassert,
+	.status   = sky1_reset_status
+};
+
+static const struct sky1_src_variant variant_sky1 = {
+	.signals = sky1_src_signals,
+	.signals_num = ARRAY_SIZE(sky1_src_signals),
+};
+
+static const struct sky1_src_variant variant_sky1_fch = {
+	.signals = sky1_src_fch_signals,
+	.signals_num = ARRAY_SIZE(sky1_src_fch_signals),
+};
+
+static const struct regmap_config sky1_src_config = {
+	.reg_bits = 32,
+	.val_bits = 32,
+	.reg_stride = 4,
+	.name = "src",
+};
+
+static int sky1_reset_probe(struct platform_device *pdev)
+{
+	struct sky1_src *sky1src;
+	struct device *dev = &pdev->dev;
+	void __iomem *base;
+	const struct sky1_src_variant *variant = device_get_match_data(dev);
+
+	sky1src = devm_kzalloc(dev, sizeof(*sky1src), GFP_KERNEL);

drivers/reset/reset-sky1.c line 361

Quoted 10 lines
drivers/reset/reset-sky1.c new file +10 -0
+	if (!sky1src)
+		return -ENOMEM;
+
+	base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(base))
+		return PTR_ERR(base);
+
+	sky1src->regmap = devm_regmap_init_mmio(dev, base, &sky1_src_config);
+	if (IS_ERR(sky1src->regmap)) {
+		dev_err(dev, "Unable to get sky1-src regmap");

I'd use dev_err_probe() to also print the error value.

regards
Philipp

maintainer
#4 lore raw

Re: [PATCH 1/3] dt-bindings: reset: add sky1 reset controller

In reply to Gary Yang
Quoted 36 lines · Gary Yang

There are two reset controllers on Cix sky1 Soc. One is located in S0 domain, and the other is located in S5 domain.

---
 .../bindings/reset/cix,sky1-rst.yaml          |  48 +++++
 include/dt-bindings/reset/cix,sky1-rst-fch.h  |  45 +++++
 include/dt-bindings/reset/cix,sky1-rst.h      | 167 ++++++++++++++++++
 3 files changed, 260 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml
 create mode 100644 include/dt-bindings/reset/cix,sky1-rst-fch.h
 create mode 100644 include/dt-bindings/reset/cix,sky1-rst.h
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +16 -0
new file mode 100644
index 000000000000..72de480b064c
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/cix,sky1-rst.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CIX Sky1 Reset Controller
+
+maintainers:
+  - Gary Yang <[email protected]>
+
+description: |
+  CIX Sky1 reset controller can be used to reset various set of peripherals.
+  There are two reset controllers, one is located in S0 domain, the other
+  is located in S5 domain.
+

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 26

Quoted 10 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +10 -0
+  See also:
+  - dt-bindings/reset/cix,sky1-rst.h
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - cix,sky1-rst
+          - cix,sky1-rst-fch
+      - const: syscon

Why is this syscon? Is there anything besides reset controls in the register space?

regards
Philipp

author maintainer
#3 lore raw

回复: [PATCH 1/3] dt-bindings: reset: add sky1 reset controller

In reply to Krzysztof Kozlowski

Hi Krzysztof:

I'm glad to see your comments again.

Quoted 13 lines

-----邮件原件-----
发件人: Krzysztof Kozlowski <[email protected]>
发送时间: 2025年11月7日 15:18
收件人: Gary Yang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected] 抄送: [email protected]; [email protected]; [email protected]; cix-kernel-upstream <[email protected]>
主题: Re: [PATCH 1/3] dt-bindings: reset: add sky1 reset controller

EXTERNAL EMAIL

On 07/11/2025 04:38, Gary Yang wrote:

Quoted 13 lines

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 18

Quoted 10 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +10 -0
+maintainers:
+  - Gary Yang <[email protected]>
+
+description: |
+  CIX Sky1 reset controller can be used to reset various set of peripherals.
+  There are two reset controllers, one is located in S0 domain, the other
+  is located in S5 domain.
+
+  See also:
+  - dt-bindings/reset/cix,sky1-rst.h

Use full path here.

OK, we will use full path: include/dt-bindings/reset/cix,sky1-rst.h

Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +5 -0
+
+properties:
+  compatible:
+    items:
+      - enum:
Quoted 9 lines

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 29

Quoted 6 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +6 -0
+          - cix,sky1-rst
+          - cix,sky1-rst-fch
+      - const: syscon
+
+  reg:
+    maxItems: 2

You need to list the items.

Sorry, to fix a build warning, make a mistake, we will fix it

Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +11 -0
+
+  '#reset-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - '#reset-cells'
+
+additionalProperties: false
+
Quoted 9 lines

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 46

Quoted 6 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +6 -0
+examples:
+  - |
+    #include <dt-bindings/reset/cix,sky1-rst.h>
+    reset-controller@16000000 {
+      compatible = "cix,sky1-rst", "syscon";
+      reg = <0x0 0x16000000 0x0 0x1000>;

Clearly wrong - you said two items.

We will use reg = <0x16000000 0x1000> to instead of it

Quoted 4 lines

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 48

Quoted 2 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +2 -0
+      #reset-cells = <1>;
+    };
Quoted 8 lines

...

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+#define SKY1_FCH_RESET_NUM   29

Drop, not ABI (usually).

Ok, we will delete it

Quoted 6 lines
Quoted 3 lines
include/dt-bindings/reset/cix,sky1-rst-fch.h new file +3 -0
+
+#endif
+

...

Quoted 6 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+
+#define SKY1_RESET_NUM                               143

Drop

Ok, we will delete it

Best wishes
Gary

Quoted 3 lines

Best regards,
Krzysztof

author maintainer
#5 lore raw

回复: [PATCH 1/3] dt-bindings: reset: add sky1 reset controller

In reply to Philipp Zabel

Hi Philipp:

First thanks for your comments

Quoted 61 lines

-----邮件原件-----
发件人: Philipp Zabel <[email protected]>
发送时间: 2025年11月7日 21:25
收件人: Gary Yang <[email protected]>; [email protected]; [email protected]; [email protected]
抄送: [email protected]; [email protected]; [email protected]; cix-kernel-upstream <[email protected]>
主题: Re: [PATCH 1/3] dt-bindings: reset: add sky1 reset controller

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

EXTERNAL EMAIL

CAUTION: Suspicious Email from unusual domain.

Quoted 8 lines · Gary Yang

There are two reset controllers on Cix sky1 Soc.
One is located in S0 domain, and the other is located in S5 domain.

---
 .../bindings/reset/cix,sky1-rst.yaml          |  48 +++++
 include/dt-bindings/reset/cix,sky1-rst-fch.h  |  45 +++++
 include/dt-bindings/reset/cix,sky1-rst.h      | 167

++++++++++++++++++

Quoted 34 lines
 3 files changed, 260 insertions(+)
 create mode 100644
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml
 create mode 100644 include/dt-bindings/reset/cix,sky1-rst-fch.h
 create mode 100644 include/dt-bindings/reset/cix,sky1-rst.h
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +21 -0
new file mode 100644
index 000000000000..72de480b064c
@@ -0,0 +1,48 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/cix,sky1-rst.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: CIX Sky1 Reset Controller
+
+maintainers:
+  - Gary Yang <[email protected]>
+
+description: |
+  CIX Sky1 reset controller can be used to reset various set of peripherals.
+  There are two reset controllers, one is located in S0 domain, the
+other
+  is located in S5 domain.
+
+  See also:
+  - dt-bindings/reset/cix,sky1-rst.h
+
+properties:
+  compatible:
Quoted 9 lines

Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml line 26

Quoted 5 lines
Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +5 -0
+    items:
+      - enum:
+          - cix,sky1-rst
+          - cix,sky1-rst-fch
+      - const: syscon

Why is this syscon? Is there anything besides reset controls in the register space?

Yes, there are some controllers in the register space, for example, a controller used to manager wake up sources.

Best wishes
Gary

Quoted 2 lines

regards
Philipp

author maintainer
#8 lore raw

回复: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

In reply to Krzysztof Kozlowski

Hi Krzysztof:

Quoted 18 lines

-----邮件原件-----
发件人: Krzysztof Kozlowski <[email protected]>
发送时间: 2025年11月7日 15:19
收件人: Gary Yang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected] 抄送: [email protected]; [email protected]; [email protected]; cix-kernel-upstream <[email protected]>
主题: Re: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

EXTERNAL EMAIL

Quoted 4 lines · Gary Yang

There are two reset controllers on Cix Sky1 Soc.
One is located in S0 domain, and the other is located in S5 domain.

Quoted 8 lines

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patch
es.html#i-for-patch-submitters

It is not "Reset:". Mark capitals.

OK, We will use "reset:" instead of it

Quoted 5 lines
Quoted 1 line

---

...

Quoted 15 lines

drivers/reset/reset-sky1.c line 393

Quoted 11 lines
drivers/reset/reset-sky1.c new file +11 -0
+static struct platform_driver sky1_reset_driver = {
+     .probe  = sky1_reset_probe,
+     .driver = {
+             .name           = KBUILD_MODNAME,
+             .of_match_table = sky1_reset_dt_ids,
+     },
+};
+static int __init reset_sky1_init(void) {
+     return platform_driver_register(&sky1_reset_driver);
+}
+subsys_initcall(reset_sky1_init);

This should be rather just module_platform_driver. Does not look like part of subsystem, but looks like regular driver.

Some modules depend reset module. When boot system, these modules can't probe before register reset. To make these modules probe earlier, we use subsys_initcall() to instead of module_platform_driver(). Do you have better suggestions?

Best wishes
Gary

Quoted 16 lines

drivers/reset/reset-sky1.c

Quoted 11 lines
drivers/reset/reset-sky1.c new file +8 -0
+
+static void __exit reset_sky1_exit(void) {
+     platform_driver_unregister(&sky1_reset_driver);
+}
+module_exit(reset_sky1_exit);
 
 
 
+
+MODULE_AUTHOR("Jerry Zhu <[email protected]>");
+MODULE_DESCRIPTION("Cix Sky1 reset driver"); MODULE_LICENSE("GPL");

Best regards,
Krzysztof

#9 lore raw

Re: 回复: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

Quoted 17 lines · Gary Yang
Quoted 16 lines

drivers/reset/reset-sky1.c line 393

Quoted 12 lines
drivers/reset/reset-sky1.c new file +11 -0
+static struct platform_driver sky1_reset_driver = {
+     .probe  = sky1_reset_probe,
+     .driver = {
+             .name           = KBUILD_MODNAME,
+             .of_match_table = sky1_reset_dt_ids,
+     },
+};
+static int __init reset_sky1_init(void) {
+     return platform_driver_register(&sky1_reset_driver);
+}
+subsys_initcall(reset_sky1_init);

This should be rather just module_platform_driver. Does not look like part of subsystem, but looks like regular driver.

Quoted 1 line

Some modules depend reset module. When boot system, these modules can't probe before register reset.

Which modules? You statement is so imprecise that my only answer is:
sorry, deferred probe is old thing now and everyone should use it.

Quoted 2 lines

To make these modules probe earlier, we use subsys_initcall() to instead of module_platform_driver(). Do you have better suggestions?

Look how deferred probe works.

Best regards,
Krzysztof

author maintainer
#16 lore raw

回复: [PATCH 3/3] dts: reset: add support for cix sky1 resets

In reply to Krzysztof Kozlowski

Hi Krzysztof:

Quoted 22 lines

-----邮件原件-----
发件人: Krzysztof Kozlowski <[email protected]>
发送时间: 2025年11月7日 15:20
收件人: Gary Yang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected] 抄送: [email protected]; [email protected]; [email protected]; cix-kernel-upstream <[email protected]>
主题: Re: [PATCH 3/3] dts: reset: add support for cix sky1 resets

EXTERNAL EMAIL

Quoted 7 lines · Gary Yang

There are two reset conctrollers on Cix Sky1 Soc.
One is located in S0 domain, and the other is located in S5 domain.

---
 arch/arm64/boot/dts/cix/sky1.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
Quoted 8 lines

Please use subject prefixes matching the subsystem. You can get them for example with git log --oneline -- DIRECTORY_OR_FILE on the directory your patch is touching. For bindings, the preferred subjects are explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patch
es.html#i-for-patch-submitters

Please start paying attention to this.

Ok, we will use " arm64: dts: cix: add support for cix sky1 resets ". All right?

Quoted 10 lines
Quoted 10 lines
arch/arm64/boot/dts/cix/sky1.dtsi +0 -0
index d21387224e79..fc68734f37c2 100644
@@ -348,6 +348,13 @@ i3c1: i3c@4100000 {
                      status = "disabled";
              };
 
Quoted 6 lines

arch/arm64/boot/dts/cix/sky1.dtsi i3c1: i3c@4100000 { · line 355

Quoted 5 lines
arch/arm64/boot/dts/cix/sky1.dtsi +5 -0
+             src_fch: reset-controller@4160000 {
+                     compatible = "cix,sky1-rst-fch", "syscon";
+                     reg = <0x0 0x04160000 0x0 0x90>;
+                     #reset-cells = <1>;
+                     status = "okay";

Why?

Sorry, We will delete status property

Quoted 10 lines
Quoted 10 lines
arch/arm64/boot/dts/cix/sky1.dtsi +3 -0
+             };
+
              iomuxc: pinctrl@4170000 {
                      compatible = "cix,sky1-iomuxc";
                      reg = <0x0 0x04170000 0x0 0x1000>; @@ -568,6
+575,13 @@ ppi_partition1: interrupt-partition-1 {
                      };
              };
Quoted 8 lines

arch/arm64/boot/dts/cix/sky1.dtsi ppi_partition1: interrupt-partition-1 { · line 582

Quoted 5 lines
arch/arm64/boot/dts/cix/sky1.dtsi +5 -0
+             src: reset-controller@16000000 {
+                     compatible = "cix,sky1-rst", "syscon";
+                     reg = <0x0 0x16000000 0x0 0x1000>;
+                     #reset-cells = <1>;
+                     status = "okay";

No, really, why?

Sorry, We will delete status property

Best wishes
Gary

Quoted 3 lines

Best regards,
Krzysztof

author maintainer
#10 lore raw

回复: 回复: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

In reply to Krzysztof Kozlowski

Hi krzysztof:

Quoted 33 lines

-----邮件原件-----
发件人: Krzysztof Kozlowski <[email protected]>
发送时间: 2025年11月10日 19:22
收件人: Gary Yang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected] 抄送: [email protected]; [email protected]; [email protected]; cix-kernel-upstream <[email protected]>
主题: Re: 回复: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

EXTERNAL EMAIL

Quoted 17 lines · Gary Yang
Quoted 16 lines

drivers/reset/reset-sky1.c line 393

Quoted 12 lines
drivers/reset/reset-sky1.c new file +11 -0
+static struct platform_driver sky1_reset_driver = {
+     .probe  = sky1_reset_probe,
+     .driver = {
+             .name           = KBUILD_MODNAME,
+             .of_match_table = sky1_reset_dt_ids,
+     },
+};
+static int __init reset_sky1_init(void) {
+     return platform_driver_register(&sky1_reset_driver);
+}
+subsys_initcall(reset_sky1_init);

This should be rather just module_platform_driver. Does not look like part of subsystem, but looks like regular driver.

Quoted 1 line

Some modules depend reset module. When boot system, these modules

can't probe before register reset.

Quoted 8 lines

Which modules? You statement is so imprecise that my only answer is:
sorry, deferred probe is old thing now and everyone should use it.

Quoted 2 lines

To make these modules probe earlier, we use subsys_initcall() to instead of module_platform_driver(). Do you have better suggestions?

Look how deferred probe works.

Yes, you're right. But deferred probe needs to take more time on booting. To make the boot faster, better experiences, we have to use subsys_initcall()

Best wishes
Gary

Quoted 2 lines

Best regards,
Krzysztof

#11 lore raw

Re: 回复: 回复: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

Quoted 38 lines · Gary Yang

Hi krzysztof:

Quoted 36 lines

-----邮件原件-----
发件人: Krzysztof Kozlowski <[email protected]>
发送时间: 2025年11月10日 19:22
收件人: Gary Yang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected] 抄送: [email protected]; [email protected]; [email protected]; cix-kernel-upstream <[email protected]>
主题: Re: 回复: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

EXTERNAL EMAIL

Quoted 17 lines · Gary Yang
Quoted 16 lines

drivers/reset/reset-sky1.c line 393

Quoted 12 lines
drivers/reset/reset-sky1.c new file +11 -0
+static struct platform_driver sky1_reset_driver = {
+     .probe  = sky1_reset_probe,
+     .driver = {
+             .name           = KBUILD_MODNAME,
+             .of_match_table = sky1_reset_dt_ids,
+     },
+};
+static int __init reset_sky1_init(void) {
+     return platform_driver_register(&sky1_reset_driver);
+}
+subsys_initcall(reset_sky1_init);

This should be rather just module_platform_driver. Does not look like part of subsystem, but looks like regular driver.

Quoted 1 line

Some modules depend reset module. When boot system, these modules

can't probe before register reset.

Which modules? You statement is so imprecise that my only answer is:
sorry, deferred probe is old thing now and everyone should use it.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

To make these modules probe earlier, we use subsys_initcall() to instead of module_platform_driver(). Do you have better suggestions?

Look how deferred probe works.

Yes, you're right. But deferred probe needs to take more time on booting. To make the boot faster, better experiences, we have to use subsys_initcall()

Again, imprecise statement. How faster? With such arguments - twice (first list of unspecified modules and now of unspecified boot faster) the answer is the same. And I will not wait for third imprecise argument, because this is not a ping pong game.

Anyway, manual core ordering is not the solution.

Best regards,
Krzysztof

author maintainer
#12 lore raw

回复: 回复: 回复: [PATCH 2/3] Reset: cix: add support for cix sky1 resets

Hi Krzysztof:

Quoted 36 lines
Quoted 29 lines
Quoted 29 lines

EXTERNAL EMAIL

Quoted 17 lines · Gary Yang
Quoted 16 lines

drivers/reset/reset-sky1.c line 393

Quoted 12 lines
drivers/reset/reset-sky1.c new file +11 -0
+static struct platform_driver sky1_reset_driver = {
+     .probe  = sky1_reset_probe,
+     .driver = {
+             .name           = KBUILD_MODNAME,
+             .of_match_table = sky1_reset_dt_ids,
+     },
+};
+static int __init reset_sky1_init(void) {
+     return platform_driver_register(&sky1_reset_driver);
+}
+subsys_initcall(reset_sky1_init);

This should be rather just module_platform_driver. Does not look like part of subsystem, but looks like regular driver.

Quoted 1 line

Some modules depend reset module. When boot system, these modules

can't probe before register reset.

Which modules? You statement is so imprecise that my only answer is:
sorry, deferred probe is old thing now and everyone should use it.

Quoted 2 lines

To make these modules probe earlier, we use subsys_initcall() to instead of module_platform_driver(). Do you have better suggestions?

Quoted 6 lines
Quoted 2 lines

Look how deferred probe works.

Yes, you're right. But deferred probe needs to take more time on booting. To make the boot faster, better experiences, we have to use subsys_initcall()

Quoted 7 lines

Again, imprecise statement. How faster? With such arguments - twice (first list of unspecified modules and now of unspecified boot faster) the answer is the same. And I will not wait for third imprecise argument, because this is not a ping pong game.

Anyway, manual core ordering is not the solution.

Sorry, we need not take performance into consider just now. We will use module_platform_driver() to instead of it.

Best wishes
Gary

Quoted 2 lines

Best regards,
Krzysztof