Add support for imx8ulp's SIM
v3 cover Add support for imx8ulp's SIM
From: Laurentiu Mihalcea <[email protected]>
i.MX8ULP's SIM (System Integration Module) allows
control and configuration of certain components
form the domain it's assigned to. Add DT node
and schema for it. Its child shall also be
included.
---
Changes in v3:
- Addressed Krzysztof's comments
- The "reset: add driver for imx8ulp SIM reset controller" patch might generate conflict when applied to Rob and Shawn Guo's trees (for-next branch). Tested all patches with linux-next, next-20240715 tag and no conflicts.
- Link to v2: https://lore.kernel.org/all/[email protected]/
Changes in v2:
- Reset controller is now also a syscon provider.
- Changed vendor prefix to nxp.
- Link to v1: https://lore.kernel.org/all/[email protected]/
---
Laurentiu Mihalcea (3):
dt-bindings: reset: add schema for imx8ulp SIM reset
reset: add driver for imx8ulp SIM reset controller
arm64: dts: imx8ulp: add AVD-SIM node
.../reset/nxp,imx8ulp-avd-sim-reset.yaml | 59 ++++++++++ arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 13 +++ drivers/reset/Kconfig | 7 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-imx8ulp-sim.c | 106 ++++++++++++++++++ 5 files changed, 186 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml create mode 100644 drivers/reset/reset-imx8ulp-sim.c
---
base-commit: 91e3b24eb7d297d9d99030800ed96944b8652eaf
PATCH v3 1/3 dt-bindings: reset: add schema for imx8ulp SIM reset
From: Laurentiu Mihalcea <[email protected]>
Add schema for imx8ulp's SIM reset controller.
--- .../reset/nxp,imx8ulp-avd-sim-reset.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml new file +59 -0
@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/reset/nxp,imx8ulp-avd-sim-reset.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8ULP System Integration Module Reset Controller + +maintainers: + - Liu Ying <[email protected]> + +description: > + Some instances of i.MX8ULP's SIM may offer control + over the reset of some components of a certain domain + (e.g: AVD-SIM). + +properties: + compatible: + items: + - enum: + - nxp,imx8ulp-avd-sim-reset + - const: syscon + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + '#reset-cells': + const: 1 + + mux-controller: + $ref: /schemas/mux/reg-mux.yaml# + +required: + - compatible + - reg + - '#reset-cells' + - mux-controller + - clocks + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/imx8ulp-clock.h> + syscon@2da50000 { + compatible = "nxp,imx8ulp-avd-sim-reset", "syscon"; + reg = <0x2da50000 0x38>; + clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>; + #reset-cells = <1>; + + mux-controller { + compatible = "mmio-mux"; + #mux-control-cells = <1>; + mux-reg-masks = <0x8 0x00000200>; + }; + };
Signature · 1 line
2.34.1
Re: [PATCH v3 1/3] dt-bindings: reset: add schema for imx8ulp SIM reset
Quoted 6 lines · Laurentiu Mihalcea
From: Laurentiu Mihalcea <[email protected]>
Add schema for imx8ulp's SIM reset controller.
Signed-off-by Liu Ying <[email protected]>Signed-off-by Laurentiu Mihalcea <[email protected]>
...
Quoted 5 lines
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml new file +5
-0+ clocks: + maxItems: 1 + + '#reset-cells': + const: 1
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml line 41
Quoted 10 lines
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml new file +10
-0+ + mux-controller: + $ref: /schemas/mux/reg-mux.yaml# + +required: + - compatible + - reg + - '#reset-cells' + - mux-controller + - clocks
List here should have the same order as list of properties.
Best regards,
Krzysztof
Rob Herring
maintainerRe: [PATCH v3 1/3] dt-bindings: reset: add schema for imx8ulp SIM reset
In reply to Laurentiu MihalceaQuoted 19 lines · Laurentiu Mihalcea
From: Laurentiu Mihalcea <[email protected]>
Add schema for imx8ulp's SIM reset controller.
Signed-off-by Liu Ying <[email protected]>Signed-off-by Laurentiu Mihalcea <[email protected]>--- .../reset/nxp,imx8ulp-avd-sim-reset.yaml | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yamlDocumentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml new file +2
-0@@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml line 12
Quoted 10 lines
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml new file +10
-0+--- +$id: http://devicetree.org/schemas/reset/nxp,imx8ulp-avd-sim-reset.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8ULP System Integration Module Reset Controller + +maintainers: + - Liu Ying <[email protected]> + +description: >
Don't need '>'.
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml line 15
Quoted 3 lines
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml new file +3
-0+ Some instances of i.MX8ULP's SIM may offer control + over the reset of some components of a certain domain + (e.g: AVD-SIM).
Wrap lines at 80 char.
Quoted 47 lines
Documentation/devicetree/bindings/reset/nxp,imx8ulp-avd-sim-reset.yaml new file +44
-0+ +properties: + compatible: + items: + - enum: + - nxp,imx8ulp-avd-sim-reset + - const: syscon + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + '#reset-cells': + const: 1 + + mux-controller: + $ref: /schemas/mux/reg-mux.yaml# + +required: + - compatible + - reg + - '#reset-cells' + - mux-controller + - clocks + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/imx8ulp-clock.h> + syscon@2da50000 { + compatible = "nxp,imx8ulp-avd-sim-reset", "syscon"; + reg = <0x2da50000 0x38>; + clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>; + #reset-cells = <1>; + + mux-controller { + compatible = "mmio-mux"; + #mux-control-cells = <1>; + mux-reg-masks = <0x8 0x00000200>; + }; + };Signature · 1 line
2.34.1
PATCH v3 2/3 reset: add driver for imx8ulp SIM reset controller
In reply to Laurentiu MihalceaFrom: Laurentiu Mihalcea <[email protected]>
Certain components can be reset via the SIM module. Add reset controller driver for the SIM module to allow drivers for said components to control the reset signal(s).
--- drivers/reset/Kconfig | 7 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-imx8ulp-sim.c | 106 ++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 drivers/reset/reset-imx8ulp-sim.c
drivers/reset/Kconfig +7 -0
@@ -100,6 +100,13 @@ config RESET_IMX8MP_AUDIOMIX help This enables the reset controller driver for i.MX8MP AudioMix +config RESET_IMX8ULP_SIM + tristate "i.MX8ULP SIM Reset Driver" + depends on ARCH_MXC + help + This enables the SIM (System Integration Module) reset driver + for i.MX8ULP SoC. + config RESET_INTEL_GW bool "Intel Reset Controller Driver" depends on X86 || COMPILE_TEST
drivers/reset/Makefile +1 -0
@@ -15,6 +15,7 @@ obj-$(CONFIG_RESET_GPIO) += reset-gpio.o obj-$(CONFIG_RESET_HSDK) += reset-hsdk.o obj-$(CONFIG_RESET_IMX7) += reset-imx7.o obj-$(CONFIG_RESET_IMX8MP_AUDIOMIX) += reset-imx8mp-audiomix.o +obj-$(CONFIG_RESET_IMX8ULP_SIM) += reset-imx8ulp-sim.o obj-$(CONFIG_RESET_INTEL_GW) += reset-intel-gw.o obj-$(CONFIG_RESET_K210) += reset-k210.o obj-$(CONFIG_RESET_LANTIQ) += reset-lantiq.o
drivers/reset/reset-imx8ulp-sim.c new file +106 -0
106 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v3 3/3 arm64: dts: imx8ulp: add AVD-SIM node
In reply to Laurentiu MihalceaFrom: Laurentiu Mihalcea <[email protected]>
Add node for imx8ulp's AVD-SIM module. This also
includes its children.
--- arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/freescale/imx8ulp.dtsi +13 -0
@@ -614,6 +614,19 @@ per_bridge5: bus@2d800000 { #size-cells = <1>; ranges; + avd_sim: syscon@2da50000 { + compatible = "nxp,imx8ulp-avd-sim-reset", "syscon"; + reg = <0x2da50000 0x38>; + clocks = <&pcc5 IMX8ULP_CLK_AVD_SIM>; + #reset-cells = <1>; + + mux: mux-controller { + compatible = "mmio-mux"; + #mux-control-cells = <1>; + mux-reg-masks = <0x8 0x00000200>; + }; + }; + cgc2: clock-controller@2da60000 { compatible = "fsl,imx8ulp-cgc2"; reg = <0x2da60000 0x10000>;
Signature · 1 line
2.34.1