Add support for Cix Sky1 resets
Gary Yang
maintainerv5 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
v5 changes:
- Pass dts build check with below commands:
make O=$OUTKNL dt_binding_check
make O=$OUTKNL dt_binding_check DT_SCHEMA_FILES=cix,sky1-rst.yaml make O=$OUTKNL dt_binding_check DT_SCHEMA_FILES=cix,sky1-system-controller.yaml make O=$OUTKNL CHECK_DTBS=y W=1 cix/sky1-orion-o6.dtb scripts/checkpatch.pl 000*.patch
- refine reset driver
- fix dt-bindings style
v4 changes:
- Pass dts build check with below commands:
make O=$OUTKNL dt_binding_check
make O=$OUTKNL dt_binding_check DT_SCHEMA_FILES=cix,sky1-rst.yaml make O=$OUTKNL CHECK_DTBS=y W=1 cix/sky1-orion-o6.dtb scripts/checkpatch.pl 000*.patch
- add syscon
- refine reset driver
- fix dt-bindings style
v3 changes:
- Pass dts build check with below commands:
make O=$OUTKNL dt_binding_check
make O=$OUTKNL dt_binding_check DT_SCHEMA_FILES=cix,sky1-rst.yaml make O=$OUTKNL CHECK_DTBS=y W=1 cix/sky1-orion-o6.dtb scripts/checkpatch.pl 000*.patch
- remove syscon
v2 changes:
- Pass dts build check with below commands:
make O=$OUTKNL dt_binding_check
make O=$OUTKNL dt_binding_check DT_SCHEMA_FILES=cix,sky1-rst.yaml make O=$OUTKNL CHECK_DTBS=y W=1 cix/sky1-orion-o6.dtb scripts/checkpatch.pl 000*.patch
- fix dt-bindings style
- refine reset driver
Gary Yang (3):
dt-bindings: reset: add sky1 reset controller
reset: cix: add support for cix sky1 resets
arm64: dts: cix: add support for cix sky1 resets
.../bindings/reset/cix,sky1-rst.yaml | 41 ++ .../soc/cix/cix,sky1-system-controller.yaml | 48 +++ arch/arm64/boot/dts/cix/sky1.dtsi | 22 ++ drivers/reset/Kconfig | 7 + drivers/reset/Makefile | 1 + drivers/reset/reset-sky1.c | 367 ++++++++++++++++++ include/dt-bindings/reset/cix,sky1-rst-fch.h | 42 ++ include/dt-bindings/reset/cix,sky1-rst.h | 164 ++++++++ 8 files changed, 692 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml create mode 100644 Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.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
Gary Yang
maintainerPATCH v5 1/3 dt-bindings: reset: add sky1 reset controller
There are two reset controllers on Cix sky1 Soc. One is located in S0 domain, and the other is located in S0 and S5 domain.
--- .../bindings/reset/cix,sky1-rst.yaml | 41 +++++ .../soc/cix/cix,sky1-system-controller.yaml | 48 +++++ include/dt-bindings/reset/cix,sky1-rst-fch.h | 42 +++++ include/dt-bindings/reset/cix,sky1-rst.h | 164 ++++++++++++++++++ 4 files changed, 295 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml create mode 100644 Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.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 +41 -0
@@ -0,0 +1,41 @@ +# 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 S0 and S5 domain. + + See also: + - include/dt-bindings/reset/cix,sky1-rst.h + +properties: + compatible: + items: + - enum: + - cix,sky1-rst + - cix,sky1-rst-fch + + '#reset-cells': + const: 1 + +required: + - compatible + - '#reset-cells' + +additionalProperties: false + +examples: + - | + reset-controller { + compatible = "cix,sky1-rst"; + #reset-cells = <1>; + };
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.yaml new file +48 -0
48 lines not on this page · raw message
include/dt-bindings/reset/cix,sky1-rst-fch.h new file +42 -0
42 lines not on this page · raw message
include/dt-bindings/reset/cix,sky1-rst.h new file +164 -0
164 lines not on this page · raw message
Signature · 1 line
2.49.0
Rob Herring
maintainerRe: [PATCH v5 1/3] dt-bindings: reset: add sky1 reset controller
Quoted 2 lines · Gary Yang
There are two reset controllers on Cix sky1 Soc. One is located in S0 domain, and the other is located in S0 and S5 domain.
The comments on v4 still apply... Repeated below...
Quoted 88 lines
Signed-off-by Gary Yang <[email protected]>Signed-off-by Peter Chen <[email protected]>--- .../bindings/reset/cix,sky1-rst.yaml | 41 +++++ .../soc/cix/cix,sky1-system-controller.yaml | 48 +++++ include/dt-bindings/reset/cix,sky1-rst-fch.h | 42 +++++ include/dt-bindings/reset/cix,sky1-rst.h | 164 ++++++++++++++++++ 4 files changed, 295 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml create mode 100644 Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.yaml create mode 100644 include/dt-bindings/reset/cix,sky1-rst-fch.h create mode 100644 include/dt-bindings/reset/cix,sky1-rst.hDocumentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +41
-0@@ -0,0 +1,41 @@ +# 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 S0 and S5 domain. + + See also: + - include/dt-bindings/reset/cix,sky1-rst.h + +properties: + compatible: + items: + - enum: + - cix,sky1-rst + - cix,sky1-rst-fch + + '#reset-cells': + const: 1 + +required: + - compatible + - '#reset-cells' + +additionalProperties: false + +examples: + - | + reset-controller { + compatible = "cix,sky1-rst"; + #reset-cells = <1>; + };Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.yaml new file +21
-0@@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/cix/cix,sky1-system-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cix Sky1 SoC system controller register region + +maintainers: + - Gary Yang <[email protected]> + +description: + An wide assortment of registers of the system controller on Sky1 SoC, + including resets and usb. + +properties: + compatible: + items: + - enum: + - cix,sky1-system-controller + - cix,sky1-s5-system-controller
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.yaml line 31
Quoted 10 lines
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.yaml new file +10
-0+ - const: syscon + - const: simple-mfd + + reg: + maxItems: 1 + +patternProperties: + "^reset(-controller)?$": + type: object + $ref: /schemas/reset/cix,sky1-rst.yaml#
This is not a separate device.
Quoted 5 lines
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.yaml new file +5
-0+ +required: + - compatible + - reg +
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.yaml line 46
Quoted 10 lines
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.yaml new file +10
-0+additionalProperties: false + +examples: + - | + syscon@16000000 { + compatible = "cix,sky1-s5-system-controller", "syscon", "simple-mfd"; + reg = <0x16000000 0x1000>; + reset-controller { + compatible = "cix,sky1-rst"; + #reset-cells = <1>;
Move #reset-cells to the parent node and drop this node. And then drop "simple-mfd". Or perhaps the definition for what's in the "cix,sky1-s5-system-controller" is incomplete? If so, please define all the binding.
Rob
Gary Yang
maintainer回复: [PATCH v5 1/3] dt-bindings: reset: add sky1 reset controller
Hi Rob:
Thanks for your comments
Quoted 8 lines
EXTERNAL EMAIL
Quoted 2 lines · Gary Yang
There are two reset controllers on Cix sky1 Soc. One is located in S0 domain, and the other is located in S0 and S5 domain.
The comments on v4 still apply... Repeated below...
Yes, I will read carefully those comments on V3 and V4, Thanks for your kindly remind
Quoted 102 lines
Quoted 102 lines
Signed-off-by Gary Yang <[email protected]>Signed-off-by Peter Chen <[email protected]>--- .../bindings/reset/cix,sky1-rst.yaml | 41 +++++ .../soc/cix/cix,sky1-system-controller.yaml | 48 +++++ include/dt-bindings/reset/cix,sky1-rst-fch.h | 42 +++++ include/dt-bindings/reset/cix,sky1-rst.h | 164 ++++++++++++++++++ 4 files changed, 295 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/cix,sky1-rst.yaml create mode 100644 Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller.y aml create mode 100644 include/dt-bindings/reset/cix,sky1-rst-fch.h create mode 100644 include/dt-bindings/reset/cix,sky1-rst.hDocumentation/devicetree/bindings/reset/cix,sky1-rst.yaml new file +41
-0@@ -0,0 +1,41 @@ +# 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 S0 and S5 domain. + + See also: + - include/dt-bindings/reset/cix,sky1-rst.h + +properties: + compatible: + items: + - enum: + - cix,sky1-rst + - cix,sky1-rst-fch + + '#reset-cells': + const: 1 + +required: + - compatible + - '#reset-cells' + +additionalProperties: false + +examples: + - | + reset-controller { + compatible = "cix,sky1-rst"; + #reset-cells = <1>; + };diff --git a/Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller .yaml b/Documentation/devicetree/bindings/soc/cix/cix,sky1-system-controller .yaml
new file mode 100644
index 000000000000..913e77fc522aDocumentation/devicetree/bindings/soc/cix/cix,sky1-system-contro new file +28
-0+++ ller.yaml@@ -0,0 +1,48 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 +--- +$id: +http://devicetree.org/schemas/soc/cix/cix,sky1-system-controller.yaml +# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cix Sky1 SoC system controller register region + +maintainers: + - Gary Yang <[email protected]> + +description: + An wide assortment of registers of the system controller on Sky1 +SoC, + including resets and usb. + +properties: + compatible: + items: + - enum: + - cix,sky1-system-controller + - cix,sky1-s5-system-controller + - const: syscon + - const: simple-mfd + + reg:
Quoted 9 lines
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-contro line 33
Quoted 6 lines
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-contro new file +6
-0+ maxItems: 1 + +patternProperties: + "^reset(-controller)?$": + type: object + $ref: /schemas/reset/cix,sky1-rst.yaml#This is not a separate device.
As Conor's suggestion in V3, we refer to microchip,mpfs-mss-top-sysreg.yaml. In this file, you can see codes below 40
41 pinctrl@200:
42 type: object
43 $ref: /schemas/pinctrl/microchip,mpfs-pinctrl-iomux0.yaml
and in microchip,mpfs-pinctrl-iomux0.yaml, you can also see:
73 pinctrl@200 {
74 compatible = "microchip,mpfs-pinctrl-iomux0"; 75 reg = <0x200 0x4>; 76 ........
86 };
pinctrl@200 is also a device node, all right? If not, how to describe a separate device?
Quoted 17 lines
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-contro line 44
Quoted 11 lines
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-contro new file +11
-0+ +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + syscon@16000000 { + compatible = "cix,sky1-s5-system-controller", "syscon","simple-mfd";
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-contro line 48
Quoted 4 lines
Documentation/devicetree/bindings/soc/cix/cix,sky1-system-contro new file +4
-0+ reg = <0x16000000 0x1000>; + reset-controller { + compatible = "cix,sky1-rst"; + #reset-cells = <1>;
Quoted 6 lines
Move #reset-cells to the parent node and drop this node. And then drop "simple-mfd". Or perhaps the definition for what's in the "cix,sky1-s5-system-controller" is incomplete? If so, please define all the binding.
Rob
If we move #reset-cells to the parent node, the parent node acts as a reset controller. All right? There is not only a reset controller, and are some other modules. How do we add these modules to the parent node in the future? If you feel confuse this scheme, Can we refer to the syscon node via phandle?
Best Regards
Gary
Gary Yang
maintainerPATCH v5 2/3 reset: cix: add support for cix sky1 resets
In reply to Gary YangThere are two reset controllers on Cix Sky1 Soc. One is located in S0 domain, and the other is located in S0 and S5 domain.
--- drivers/reset/Kconfig | 7 + drivers/reset/Makefile | 1 + drivers/reset/reset-sky1.c | 367 +++++++++++++++++++++++++++++++++++++ 3 files changed, 375 insertions(+) create mode 100644 drivers/reset/reset-sky1.c
drivers/reset/Kconfig +7 -0
@@ -291,6 +291,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
@@ -37,6 +37,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 +367 -0
367 lines not on this page · raw message
Signature · 1 line
2.49.0
Gary Yang
maintainerPATCH v5 3/3 arm64: dts: cix: add support for cix sky1 resets
In reply to Gary YangThere are two reset conctrollers on Cix Sky1 Soc. One is located in S0 domain, and the other is located in S0 and S5 domain.
--- arch/arm64/boot/dts/cix/sky1.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/cix/sky1.dtsi +22 -0
@@ -348,6 +348,17 @@ i3c1: i3c@4100000 { status = "disabled"; }; + syscon: syscon@4160000 { + compatible = "cix,sky1-system-controller", "syscon", + "simple-mfd"; + reg = <0x0 0x4160000 0x0 0x100>; + + src_fch: reset-controller { + compatible = "cix,sky1-rst-fch"; + #reset-cells = <1>; + }; + }; + iomuxc: pinctrl@4170000 { compatible = "cix,sky1-pinctrl"; reg = <0x0 0x04170000 0x0 0x1000>;
@@ -568,6 +579,17 @@ ppi_partition1: interrupt-partition-1 { }; }; + s5_syscon: s5-syscon@16000000 { + compatible = "cix,sky1-s5-system-controller", "syscon", + "simple-mfd"; + reg = <0x0 0x16000000 0x0 0x1000>; + + src: reset-controller { + compatible = "cix,sky1-rst"; + #reset-cells = <1>; + }; + }; + iomuxc_s5: pinctrl@16007000 { compatible = "cix,sky1-pinctrl-s5"; reg = <0x0 0x16007000 0x0 0x1000>;
Signature · 1 line
2.49.0