2022-07-07 12:53:15

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 00/15] dt-bindings: arm: freescale: Switch fsl,scu from txt to yaml

From: Viorel Suman <[email protected]>

Changes since v7: https://lore.kernel.org/lkml/[email protected]/
* added missing Reviewed-By:
* Defined "mboxes" and "mbox-names" sections in scu-key.yaml as schema.

Changes since v6: https://lore.kernel.org/lkml/[email protected]/
* The series updated so that each patch making the conversion removes
the piece being converted, then finally the patch adding fsl,scu.yaml
removes the last pieces, as suggested by Krzysztof Kozlowski.
* Updated ocotp and system-controller node names in the existing DTS
files

Changes since v5: https://lore.kernel.org/lkml/[email protected]/
* Updated according to Krzysztof Kozlowski comments

Changes since v4: https://lore.kernel.org/lkml/[email protected]/
* Missing SoB added

Changes since v3: https://lore.kernel.org/lkml/[email protected]/
* Examples included
* Included Abel's patches fixing thermal zone, keys and power controller names.

Abel Vesa (12):
dt-bindings: clk: imx: Add fsl,scu-clk yaml file
dt-bindings: pinctrl: imx: Add fsl,scu-iomux yaml file
dt-bindings: input: Add fsl,scu-key yaml file
dt-bindings: nvmem: Add fsl,scu-ocotp yaml file
dt-bindings: power: Add fsl,scu-pd yaml file
dt-bindings: rtc: Add fsl,scu-rtc yaml file
dt-bindings: thermal: Add fsl,scu-thermal yaml file
dt-bindings: watchdog: Add fsl,scu-wdt yaml file
dt-bindings: firmware: Add fsl,scu yaml file
arm64: dts: freescale: imx8: Fix power controller name
arm64: dts: freescale: imx8qxp: Add fallback compatible for clock
controller
arm64: dts: freescale: imx8qxp: Fix the keys node name

Viorel Suman (3):
arm64: dts: freescale: imx8qxp: Remove unnecessary clock related
entries
arm64: dts: freescale: imx8qxp: Fix the ocotp node name
arm64: dts: freescale: imx8: Fix the system-controller node name

.../bindings/arm/freescale/fsl,scu.txt | 271 ------------------
.../bindings/clock/fsl,scu-clk.yaml | 43 +++
.../devicetree/bindings/firmware/fsl,scu.yaml | 210 ++++++++++++++
.../bindings/input/fsl,scu-key.yaml | 40 +++
.../bindings/nvmem/fsl,scu-ocotp.yaml | 56 ++++
.../bindings/pinctrl/fsl,scu-pinctrl.yaml | 74 +++++
.../devicetree/bindings/power/fsl,scu-pd.yaml | 41 +++
.../devicetree/bindings/rtc/fsl,scu-rtc.yaml | 31 ++
.../bindings/thermal/fsl,scu-thermal.yaml | 38 +++
.../bindings/watchdog/fsl,scu-wdt.yaml | 34 +++
arch/arm64/boot/dts/freescale/imx8qm.dtsi | 4 +-
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 12 +-
12 files changed, 574 insertions(+), 280 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
create mode 100644 Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml
create mode 100644 Documentation/devicetree/bindings/firmware/fsl,scu.yaml
create mode 100644 Documentation/devicetree/bindings/input/fsl,scu-key.yaml
create mode 100644 Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
create mode 100644 Documentation/devicetree/bindings/power/fsl,scu-pd.yaml
create mode 100644 Documentation/devicetree/bindings/rtc/fsl,scu-rtc.yaml
create mode 100644 Documentation/devicetree/bindings/thermal/fsl,scu-thermal.yaml
create mode 100644 Documentation/devicetree/bindings/watchdog/fsl,scu-wdt.yaml

--
2.25.1


2022-07-07 12:53:17

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 02/15] dt-bindings: pinctrl: imx: Add fsl,scu-iomux yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'iomux/pinctrl' child node of the SCU main node.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 40 ----------
.../bindings/pinctrl/fsl,scu-pinctrl.yaml | 74 +++++++++++++++++++
2 files changed, 74 insertions(+), 40 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index ef7f5222ac48..5ec2a031194e 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -79,33 +79,7 @@ Required properties:
See detailed Resource ID list from:
include/dt-bindings/firmware/imx/rsrc.h

-Pinctrl bindings based on SCU Message Protocol
-------------------------------------------------------------
-
-This binding uses the i.MX common pinctrl binding[3].
-
-Required properties:
-- compatible: Should be one of:
- "fsl,imx8qm-iomuxc",
- "fsl,imx8qxp-iomuxc",
- "fsl,imx8dxl-iomuxc".
-
-Required properties for Pinctrl sub nodes:
-- fsl,pins: Each entry consists of 3 integers which represents
- the mux and config setting for one pin. The first 2
- integers <pin_id mux_mode> are specified using a
- PIN_FUNC_ID macro, which can be found in
- <dt-bindings/pinctrl/pads-imx8qm.h>,
- <dt-bindings/pinctrl/pads-imx8qxp.h>,
- <dt-bindings/pinctrl/pads-imx8dxl.h>.
- The last integer CONFIG is the pad setting value like
- pull-up on this pin.
-
- Please refer to i.MX8QXP Reference Manual for detailed
- CONFIG settings.
-
[2] Documentation/devicetree/bindings/power/power-domain.yaml
-[3] Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt

RTC bindings based on SCU Message Protocol
------------------------------------------------------------
@@ -184,18 +158,6 @@ firmware {
&lsio_mu1 1 3
&lsio_mu1 3 3>;

- iomuxc {
- compatible = "fsl,imx8qxp-iomuxc";
-
- pinctrl_lpuart0: lpuart0grp {
- fsl,pins = <
- SC_P_UART0_RX_ADMA_UART0_RX 0x06000020
- SC_P_UART0_TX_ADMA_UART0_TX 0x06000020
- >;
- };
- ...
- };
-
ocotp: imx8qx-ocotp {
compatible = "fsl,imx8qxp-scu-ocotp";
#address-cells = <1>;
@@ -234,7 +196,5 @@ firmware {

serial@5a060000 {
...
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_lpuart0>;
power-domains = <&pd IMX_SC_R_UART_0>;
};
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
new file mode 100644
index 000000000000..45ea565ce238
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
@@ -0,0 +1,74 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/fsl,scu-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - Pinctrl bindings based on SCU Message Protocol
+
+maintainers:
+ - Dong Aisheng <[email protected]>
+
+description: i.MX SCU Client Device Node
+ Client nodes are maintained as children of the relevant IMX-SCU device node.
+ This binding uses the i.MX common pinctrl binding.
+ (Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt)
+
+allOf:
+ - $ref: pinctrl.yaml#
+
+properties:
+ compatible:
+ enum:
+ - fsl,imx8qm-iomuxc
+ - fsl,imx8qxp-iomuxc
+ - fsl,imx8dxl-iomuxc
+
+patternProperties:
+ 'grp$':
+ type: object
+ description:
+ Pinctrl node's client devices use subnodes for desired pin configuration.
+ Client device subnodes use below standard properties.
+
+ properties:
+ fsl,pins:
+ description:
+ each entry consists of 3 integers and represents the pin ID, the mux value
+ and pad setting for the pin. The first 2 integers - pin_id and mux_val - are
+ specified using a PIN_FUNC_ID macro, which can be found in
+ <include/dt-bindings/pinctrl/pads-imx8qxp.h>. The last integer is
+ the pad setting value like pull-up on this pin. Please refer to the
+ appropriate i.MX8 Reference Manual for detailed pad CONFIG settings.
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ items:
+ items:
+ - description: |
+ "pin_id" indicates the pin ID
+ - description: |
+ "mux_val" indicates the mux value to be applied.
+ - description: |
+ "pad_setting" indicates the pad configuration value to be applied.
+
+ required:
+ - fsl,pins
+
+ additionalProperties: false
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ pinctrl {
+ compatible = "fsl,imx8qxp-iomuxc";
+
+ pinctrl_lpuart0: lpuart0grp {
+ fsl,pins = <
+ 111 0 0x06000020
+ 112 0 0x06000020
+ >;
+ };
+ };
--
2.25.1

2022-07-07 12:53:24

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 12/15] arm64: dts: freescale: imx8qxp: Add fallback compatible for clock controller

From: Abel Vesa <[email protected]>

Both i.MX8QM and i.MX8DXL use the fallback fsl,scu-clk compatible.
They rely on the same driver generic part as the i.MX8QXP, so
lets add it to i.MX8QXP too, for consitency.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
index 4f8cd7339112..d0f56e4dee77 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -216,7 +216,7 @@ pd: power-controller {
};

clk: clock-controller {
- compatible = "fsl,imx8qxp-clk";
+ compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
#clock-cells = <2>;
};

--
2.25.1

2022-07-07 12:53:31

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 05/15] dt-bindings: power: Add fsl,scu-pd yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'power controller' child node of the SCU main node.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 25 -----------
.../devicetree/bindings/power/fsl,scu-pd.yaml | 41 +++++++++++++++++++
2 files changed, 41 insertions(+), 25 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/fsl,scu-pd.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index 0841ad8bbd22..1a06f627b125 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -62,25 +62,6 @@ i.MX SCU Client Device Node:

Client nodes are maintained as children of the relevant IMX-SCU device node.

-Power domain bindings based on SCU Message Protocol
-------------------------------------------------------------
-
-This binding for the SCU power domain providers uses the generic power
-domain binding[2].
-
-Required properties:
-- compatible: Should be one of:
- "fsl,imx8qm-scu-pd",
- "fsl,imx8qxp-scu-pd"
- followed by "fsl,scu-pd"
-
-- #power-domain-cells: Must be 1. Contains the Resource ID used by
- SCU commands.
- See detailed Resource ID list from:
- include/dt-bindings/firmware/imx/rsrc.h
-
-[2] Documentation/devicetree/bindings/power/power-domain.yaml
-
RTC bindings based on SCU Message Protocol
------------------------------------------------------------

@@ -135,11 +116,6 @@ firmware {
&lsio_mu1 1 3
&lsio_mu1 3 3>;

- pd: imx8qx-pd {
- compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
- #power-domain-cells = <1>;
- };
-
rtc: rtc {
compatible = "fsl,imx8qxp-sc-rtc";
};
@@ -158,5 +134,4 @@ firmware {

serial@5a060000 {
...
- power-domains = <&pd IMX_SC_R_UART_0>;
};
diff --git a/Documentation/devicetree/bindings/power/fsl,scu-pd.yaml b/Documentation/devicetree/bindings/power/fsl,scu-pd.yaml
new file mode 100644
index 000000000000..1f72b18ca0fc
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/fsl,scu-pd.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/fsl,scu-pd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - Power domain bindings based on SCU Message Protocol
+
+maintainers:
+ - Dong Aisheng <[email protected]>
+
+description: i.MX SCU Client Device Node
+ Client nodes are maintained as children of the relevant IMX-SCU device node.
+ Power domain bindings based on SCU Message Protocol
+
+allOf:
+ - $ref: power-domain.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - fsl,imx8qm-scu-pd
+ - fsl,imx8qxp-scu-pd
+ - const: fsl,scu-pd
+
+ '#power-domain-cells':
+ const: 1
+
+required:
+ - compatible
+ - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ power-controller {
+ compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
+ #power-domain-cells = <1>;
+ };
--
2.25.1

2022-07-07 12:53:35

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 06/15] dt-bindings: rtc: Add fsl,scu-rtc yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'rtc' child node of the SCU main node.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 10 ------
.../devicetree/bindings/rtc/fsl,scu-rtc.yaml | 31 +++++++++++++++++++
2 files changed, 31 insertions(+), 10 deletions(-)
create mode 100644 Documentation/devicetree/bindings/rtc/fsl,scu-rtc.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index 1a06f627b125..6c0161fa4adf 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -62,12 +62,6 @@ i.MX SCU Client Device Node:

Client nodes are maintained as children of the relevant IMX-SCU device node.

-RTC bindings based on SCU Message Protocol
-------------------------------------------------------------
-
-Required properties:
-- compatible: should be "fsl,imx8qxp-sc-rtc";
-
Watchdog bindings based on SCU Message Protocol
------------------------------------------------------------

@@ -116,10 +110,6 @@ firmware {
&lsio_mu1 1 3
&lsio_mu1 3 3>;

- rtc: rtc {
- compatible = "fsl,imx8qxp-sc-rtc";
- };
-
watchdog {
compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt";
timeout-sec = <60>;
diff --git a/Documentation/devicetree/bindings/rtc/fsl,scu-rtc.yaml b/Documentation/devicetree/bindings/rtc/fsl,scu-rtc.yaml
new file mode 100644
index 000000000000..8c102b70d735
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/fsl,scu-rtc.yaml
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/fsl,scu-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - RTC bindings based on SCU Message Protocol
+
+maintainers:
+ - Dong Aisheng <[email protected]>
+
+description: i.MX SCU Client Device Node
+ Client nodes are maintained as children of the relevant IMX-SCU device node.
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: fsl,imx8qxp-sc-rtc
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ rtc {
+ compatible = "fsl,imx8qxp-sc-rtc";
+ };
--
2.25.1

2022-07-07 12:53:36

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 04/15] dt-bindings: nvmem: Add fsl,scu-ocotp yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'ocotp' child node of the SCU main node.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 24 --------
.../bindings/nvmem/fsl,scu-ocotp.yaml | 56 +++++++++++++++++++
2 files changed, 56 insertions(+), 24 deletions(-)
create mode 100644 Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index 572cb2e628bf..0841ad8bbd22 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -87,20 +87,6 @@ RTC bindings based on SCU Message Protocol
Required properties:
- compatible: should be "fsl,imx8qxp-sc-rtc";

-OCOTP bindings based on SCU Message Protocol
-------------------------------------------------------------
-Required properties:
-- compatible: Should be one of:
- "fsl,imx8qm-scu-ocotp",
- "fsl,imx8qxp-scu-ocotp".
-- #address-cells: Must be 1. Contains byte index
-- #size-cells: Must be 1. Contains byte length
-
-Optional Child nodes:
-
-- Data cells of ocotp:
- Detailed bindings are described in bindings/nvmem/nvmem.txt
-
Watchdog bindings based on SCU Message Protocol
------------------------------------------------------------

@@ -149,16 +135,6 @@ firmware {
&lsio_mu1 1 3
&lsio_mu1 3 3>;

- ocotp: imx8qx-ocotp {
- compatible = "fsl,imx8qxp-scu-ocotp";
- #address-cells = <1>;
- #size-cells = <1>;
-
- fec_mac0: mac@2c4 {
- reg = <0x2c4 8>;
- };
- };
-
pd: imx8qx-pd {
compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
#power-domain-cells = <1>;
diff --git a/Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
new file mode 100644
index 000000000000..682688299b26
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/fsl,scu-ocotp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - OCOTP bindings based on SCU Message Protocol
+
+maintainers:
+ - Dong Aisheng <[email protected]>
+
+description: i.MX SCU Client Device Node
+ Client nodes are maintained as children of the relevant IMX-SCU device node.
+
+allOf:
+ - $ref: nvmem.yaml#
+
+properties:
+ compatible:
+ enum:
+ - fsl,imx8qm-scu-ocotp
+ - fsl,imx8qxp-scu-ocotp
+
+patternProperties:
+ '^mac@[0-9a-f]*$':
+ type: object
+ description:
+ MAC address.
+
+ properties:
+ reg:
+ description:
+ Byte offset within OCOTP where the MAC address is stored
+ maxItems: 1
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ ocotp {
+ compatible = "fsl,imx8qxp-scu-ocotp";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ fec_mac0: mac@2c4 {
+ reg = <0x2c4 6>;
+ };
+ };
--
2.25.1

2022-07-07 12:53:37

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 09/15] dt-bindings: firmware: Add fsl,scu yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch adds the
fsl,scu.yaml in the firmware bindings folder. This one is only for
the main SCU node. The old txt file will be removed only after all
the child nodes have been properly switch to yaml.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 96 --------
.../devicetree/bindings/firmware/fsl,scu.yaml | 210 ++++++++++++++++++
2 files changed, 210 insertions(+), 96 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
create mode 100644 Documentation/devicetree/bindings/firmware/fsl,scu.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
deleted file mode 100644
index e1cc72741f1f..000000000000
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-NXP i.MX System Controller Firmware (SCFW)
---------------------------------------------------------------------
-
-The System Controller Firmware (SCFW) is a low-level system function
-which runs on a dedicated Cortex-M core to provide power, clock, and
-resource management. It exists on some i.MX8 processors. e.g. i.MX8QM
-(QM, QP), and i.MX8QX (QXP, DX).
-
-The AP communicates with the SC using a multi-ported MU module found
-in the LSIO subsystem. The current definition of this MU module provides
-5 remote AP connections to the SC to support up to 5 execution environments
-(TZ, HV, standard Linux, etc.). The SC side of this MU module interfaces
-with the LSIO DSC IP bus. The SC firmware will communicate with this MU
-using the MSI bus.
-
-System Controller Device Node:
-============================================================
-
-The scu node with the following properties shall be under the /firmware/ node.
-
-Required properties:
--------------------
-- compatible: should be "fsl,imx-scu".
-- mbox-names: should include "tx0", "tx1", "tx2", "tx3",
- "rx0", "rx1", "rx2", "rx3";
- include "gip3" if want to support general MU interrupt.
-- mboxes: List of phandle of 4 MU channels for tx, 4 MU channels for
- rx, and 1 optional MU channel for general interrupt.
- All MU channels must be in the same MU instance.
- Cross instances are not allowed. The MU instance can only
- be one of LSIO MU0~M4 for imx8qxp and imx8qm. Users need
- to make sure use the one which is not conflict with other
- execution environments. e.g. ATF.
- Note:
- Channel 0 must be "tx0" or "rx0".
- Channel 1 must be "tx1" or "rx1".
- Channel 2 must be "tx2" or "rx2".
- Channel 3 must be "tx3" or "rx3".
- General interrupt rx channel must be "gip3".
- e.g.
- mboxes = <&lsio_mu1 0 0
- &lsio_mu1 0 1
- &lsio_mu1 0 2
- &lsio_mu1 0 3
- &lsio_mu1 1 0
- &lsio_mu1 1 1
- &lsio_mu1 1 2
- &lsio_mu1 1 3
- &lsio_mu1 3 3>;
- See Documentation/devicetree/bindings/mailbox/fsl,mu.yaml
- for detailed mailbox binding.
-
-Note: Each mu which supports general interrupt should have an alias correctly
-numbered in "aliases" node.
-e.g.
-aliases {
- mu1 = &lsio_mu1;
-};
-
-i.MX SCU Client Device Node:
-============================================================
-
-Client nodes are maintained as children of the relevant IMX-SCU device node.
-
-Example (imx8qxp):
--------------
-aliases {
- mu1 = &lsio_mu1;
-};
-
-lsio_mu1: mailbox@5d1c0000 {
- ...
- #mbox-cells = <2>;
-};
-
-firmware {
- scu {
- compatible = "fsl,imx-scu";
- mbox-names = "tx0", "tx1", "tx2", "tx3",
- "rx0", "rx1", "rx2", "rx3",
- "gip3";
- mboxes = <&lsio_mu1 0 0
- &lsio_mu1 0 1
- &lsio_mu1 0 2
- &lsio_mu1 0 3
- &lsio_mu1 1 0
- &lsio_mu1 1 1
- &lsio_mu1 1 2
- &lsio_mu1 1 3
- &lsio_mu1 3 3>;
- };
-};
-
-serial@5a060000 {
- ...
-};
diff --git a/Documentation/devicetree/bindings/firmware/fsl,scu.yaml b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml
new file mode 100644
index 000000000000..b40b0ef56978
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml
@@ -0,0 +1,210 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/firmware/fsl,scu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX System Controller Firmware (SCFW)
+
+maintainers:
+ - Dong Aisheng <[email protected]>
+
+description:
+ The System Controller Firmware (SCFW) is a low-level system function
+ which runs on a dedicated Cortex-M core to provide power, clock, and
+ resource management. It exists on some i.MX8 processors. e.g. i.MX8QM
+ (QM, QP), and i.MX8QX (QXP, DX).
+ The AP communicates with the SC using a multi-ported MU module found
+ in the LSIO subsystem. The current definition of this MU module provides
+ 5 remote AP connections to the SC to support up to 5 execution environments
+ (TZ, HV, standard Linux, etc.). The SC side of this MU module interfaces
+ with the LSIO DSC IP bus. The SC firmware will communicate with this MU
+ using the MSI bus.
+
+properties:
+ compatible:
+ const: fsl,imx-scu
+
+ clock-controller:
+ description:
+ Clock controller node that provides the clocks controlled by the SCU
+ $ref: /schemas/clock/fsl,scu-clk.yaml
+
+ ocotp:
+ description:
+ OCOTP controller node provided by the SCU
+ $ref: /schemas/nvmem/fsl,scu-ocotp.yaml
+
+ keys:
+ description:
+ Keys provided by the SCU
+ $ref: /schemas/input/fsl,scu-key.yaml
+
+ mboxes:
+ description:
+ A list of phandles of TX MU channels followed by a list of phandles of
+ RX MU channels. The list may include at the end one more optional MU
+ channel for general interrupt. The number of expected tx and rx
+ channels is 1 TX and 1 RX channels if MU instance is "fsl,imx8-mu-scu"
+ compatible, 4 TX and 4 RX channels otherwise. All MU channels must be
+ within the same MU instance. Cross instances are not allowed. The MU
+ instance can only be one of LSIO MU0~M4 for imx8qxp and imx8qm. Users
+ need to ensure that one is used that does not conflict with other
+ execution environments such as ATF.
+ oneOf:
+ - items:
+ - description: TX0 MU channel
+ - description: RX0 MU channel
+ - items:
+ - description: TX0 MU channel
+ - description: RX0 MU channel
+ - description: optional MU channel for general interrupt
+ - items:
+ - description: TX0 MU channel
+ - description: TX1 MU channel
+ - description: TX2 MU channel
+ - description: TX3 MU channel
+ - description: RX0 MU channel
+ - description: RX1 MU channel
+ - description: RX2 MU channel
+ - description: RX3 MU channel
+ - items:
+ - description: TX0 MU channel
+ - description: TX1 MU channel
+ - description: TX2 MU channel
+ - description: TX3 MU channel
+ - description: RX0 MU channel
+ - description: RX1 MU channel
+ - description: RX2 MU channel
+ - description: RX3 MU channel
+ - description: optional MU channel for general interrupt
+
+ mbox-names:
+ oneOf:
+ - items:
+ - const: tx0
+ - const: rx0
+ - items:
+ - const: tx0
+ - const: rx0
+ - const: gip3
+ - items:
+ - const: tx0
+ - const: tx1
+ - const: tx2
+ - const: tx3
+ - const: rx0
+ - const: rx1
+ - const: rx2
+ - const: rx3
+ - items:
+ - const: tx0
+ - const: tx1
+ - const: tx2
+ - const: tx3
+ - const: rx0
+ - const: rx1
+ - const: rx2
+ - const: rx3
+ - const: gip3
+
+ pinctrl:
+ description:
+ Pin controller provided by the SCU
+ $ref: /schemas/pinctrl/fsl,scu-pinctrl.yaml
+
+ power-controller:
+ description:
+ Power domains controller node that provides the power domains
+ controlled by the SCU
+ $ref: /schemas/power/fsl,scu-pd.yaml
+
+ rtc:
+ description:
+ RTC controller provided by the SCU
+ $ref: /schemas/rtc/fsl,scu-rtc.yaml
+
+ thermal-sensor:
+ description:
+ Thermal sensor provided by the SCU
+ $ref: /schemas/thermal/fsl,scu-thermal.yaml
+
+ watchdog:
+ description:
+ Watchdog controller provided by the SCU
+ $ref: /schemas/watchdog/fsl,scu-wdt.yaml
+
+required:
+ - compatible
+ - mbox-names
+ - mboxes
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/firmware/imx/rsrc.h>
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/pinctrl/pads-imx8qxp.h>
+
+ firmware {
+ system-controller {
+ compatible = "fsl,imx-scu";
+ mbox-names = "tx0", "tx1", "tx2", "tx3",
+ "rx0", "rx1", "rx2", "rx3",
+ "gip3";
+ mboxes = <&lsio_mu1 0 0 &lsio_mu1 0 1 &lsio_mu1 0 2 &lsio_mu1 0 3
+ &lsio_mu1 1 0 &lsio_mu1 1 1 &lsio_mu1 1 2 &lsio_mu1 1 3
+ &lsio_mu1 3 3>;
+
+ clock-controller {
+ compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
+ #clock-cells = <2>;
+ };
+
+ pinctrl {
+ compatible = "fsl,imx8qxp-iomuxc";
+
+ pinctrl_lpuart0: lpuart0grp {
+ fsl,pins = <
+ IMX8QXP_UART0_RX_ADMA_UART0_RX 0x06000020
+ IMX8QXP_UART0_TX_ADMA_UART0_TX 0x06000020
+ >;
+ };
+ };
+
+ ocotp {
+ compatible = "fsl,imx8qxp-scu-ocotp";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ fec_mac0: mac@2c4 {
+ reg = <0x2c4 6>;
+ };
+ };
+
+ power-controller {
+ compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
+ #power-domain-cells = <1>;
+ };
+
+ rtc {
+ compatible = "fsl,imx8qxp-sc-rtc";
+ };
+
+ keys {
+ compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key";
+ linux,keycodes = <KEY_POWER>;
+ };
+
+ watchdog {
+ compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt";
+ timeout-sec = <60>;
+ };
+
+ thermal-sensor {
+ compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal";
+ #thermal-sensor-cells = <1>;
+ };
+ };
+ };
--
2.25.1

2022-07-07 12:54:16

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 14/15] arm64: dts: freescale: imx8: Fix the system-controller node name

From: Viorel Suman <[email protected]>

The proper name is 'system-controller', not 'scu'.

Signed-off-by: Viorel Suman <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 +-
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
index 5ad1c9a5933c..c9c2b6536233 100644
--- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
@@ -181,7 +181,7 @@ timer {
<GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>; /* Hypervisor */
};

- scu {
+ system-controller {
compatible = "fsl,imx-scu";
mbox-names = "tx0",
"rx0",
diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
index 563a006ababe..ddcc0131b861 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -201,7 +201,7 @@ psci {
method = "smc";
};

- scu {
+ system-controller {
compatible = "fsl,imx-scu";
mbox-names = "tx0",
"rx0",
--
2.25.1

2022-07-07 12:54:16

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 15/15] arm64: dts: freescale: imx8qxp: Fix the keys node name

From: Abel Vesa <[email protected]>

The proper name is 'keys', not 'scu-keys'.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
index ddcc0131b861..f4ea18bb95ab 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -230,7 +230,7 @@ ocotp: ocotp {
#size-cells = <1>;
};

- scu_key: scu-key {
+ scu_key: keys {
compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key";
linux,keycodes = <KEY_POWER>;
status = "disabled";
--
2.25.1

2022-07-07 12:54:23

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 10/15] arm64: dts: freescale: imx8qxp: Remove unnecessary clock related entries

From: Viorel Suman <[email protected]>

XTAL clocks are not exposed by SCU to OS via OS<->SCU communication protocol,
so remove unnecessary entries.

Signed-off-by: Viorel Suman <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
index 483996a1f2d5..878c2aa663f1 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -218,8 +218,6 @@ pd: imx8qx-pd {
clk: clock-controller {
compatible = "fsl,imx8qxp-clk";
#clock-cells = <2>;
- clocks = <&xtal32k &xtal24m>;
- clock-names = "xtal_32KHz", "xtal_24Mhz";
};

iomuxc: pinctrl {
--
2.25.1

2022-07-07 13:16:00

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 08/15] dt-bindings: watchdog: Add fsl,scu-wdt yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'watchdog' child node of the SCU main node.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 15 --------
.../bindings/watchdog/fsl,scu-wdt.yaml | 34 +++++++++++++++++++
2 files changed, 34 insertions(+), 15 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/fsl,scu-wdt.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index 03f927a33281..e1cc72741f1f 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -62,16 +62,6 @@ i.MX SCU Client Device Node:

Client nodes are maintained as children of the relevant IMX-SCU device node.

-Watchdog bindings based on SCU Message Protocol
-------------------------------------------------------------
-
-Required properties:
-- compatible: should be:
- "fsl,imx8qxp-sc-wdt"
- followed by "fsl,imx-sc-wdt";
-Optional properties:
-- timeout-sec: contains the watchdog timeout in seconds.
-
Example (imx8qxp):
-------------
aliases {
@@ -98,11 +88,6 @@ firmware {
&lsio_mu1 1 2
&lsio_mu1 1 3
&lsio_mu1 3 3>;
-
- watchdog {
- compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt";
- timeout-sec = <60>;
- };
};
};

diff --git a/Documentation/devicetree/bindings/watchdog/fsl,scu-wdt.yaml b/Documentation/devicetree/bindings/watchdog/fsl,scu-wdt.yaml
new file mode 100644
index 000000000000..f84c45d687d7
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/fsl,scu-wdt.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/fsl,scu-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - Watchdog bindings based on SCU Message Protocol
+
+maintainers:
+ - Dong Aisheng <[email protected]>
+
+description: i.MX SCU Client Device Node
+ Client nodes are maintained as children of the relevant IMX-SCU device node.
+
+allOf:
+ - $ref: watchdog.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: fsl,imx8qxp-sc-wdt
+ - const: fsl,imx-sc-wdt
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ watchdog {
+ compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt";
+ timeout-sec = <60>;
+ };
--
2.25.1

2022-07-07 13:16:04

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 03/15] dt-bindings: input: Add fsl,scu-key yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'keys' child node of the SCU main node.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 14 -------
.../bindings/input/fsl,scu-key.yaml | 40 +++++++++++++++++++
2 files changed, 40 insertions(+), 14 deletions(-)
create mode 100644 Documentation/devicetree/bindings/input/fsl,scu-key.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index 5ec2a031194e..572cb2e628bf 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -111,15 +111,6 @@ Required properties:
Optional properties:
- timeout-sec: contains the watchdog timeout in seconds.

-SCU key bindings based on SCU Message Protocol
-------------------------------------------------------------
-
-Required properties:
-- compatible: should be:
- "fsl,imx8qxp-sc-key"
- followed by "fsl,imx-sc-key";
-- linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml
-
Thermal bindings based on SCU Message Protocol
------------------------------------------------------------

@@ -177,11 +168,6 @@ firmware {
compatible = "fsl,imx8qxp-sc-rtc";
};

- scu_key: scu-key {
- compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key";
- linux,keycodes = <KEY_POWER>;
- };
-
watchdog {
compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt";
timeout-sec = <60>;
diff --git a/Documentation/devicetree/bindings/input/fsl,scu-key.yaml b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
new file mode 100644
index 000000000000..e6266d188266
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/fsl,scu-key.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/fsl,scu-key.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - SCU key bindings based on SCU Message Protocol
+
+maintainers:
+ - Dong Aisheng <[email protected]>
+
+description: i.MX SCU Client Device Node
+ Client nodes are maintained as children of the relevant IMX-SCU device node.
+
+allOf:
+ - $ref: input.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: fsl,imx8qxp-sc-key
+ - const: fsl,imx-sc-key
+
+ linux,keycodes:
+ maxItems: 1
+
+required:
+ - compatible
+ - linux,keycodes
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/input/input.h>
+
+ keys {
+ compatible = "fsl,imx8qxp-sc-key", "fsl,imx-sc-key";
+ linux,keycodes = <KEY_POWER>;
+ };
--
2.25.1

2022-07-07 13:17:10

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 11/15] arm64: dts: freescale: imx8: Fix power controller name

From: Abel Vesa <[email protected]>

The proper name is power-controller, not imx8qx-pd.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8qm.dtsi | 2 +-
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
index 4f767012f1f5..5ad1c9a5933c 100644
--- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi
@@ -190,7 +190,7 @@ scu {
&lsio_mu1 1 0
&lsio_mu1 3 3>;

- pd: imx8qx-pd {
+ pd: power-controller {
compatible = "fsl,imx8qm-scu-pd", "fsl,scu-pd";
#power-domain-cells = <1>;
};
diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
index 878c2aa663f1..4f8cd7339112 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -210,7 +210,7 @@ scu {
&lsio_mu1 1 0
&lsio_mu1 3 3>;

- pd: imx8qx-pd {
+ pd: power-controller {
compatible = "fsl,imx8qxp-scu-pd", "fsl,scu-pd";
#power-domain-cells = <1>;
};
--
2.25.1

2022-07-07 13:44:59

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 13/15] arm64: dts: freescale: imx8qxp: Fix the ocotp node name

From: Viorel Suman <[email protected]>

The proper name is 'ocotp', not 'imx8qx-ocotp'.

Signed-off-by: Viorel Suman <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
index d0f56e4dee77..563a006ababe 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -224,7 +224,7 @@ iomuxc: pinctrl {
compatible = "fsl,imx8qxp-iomuxc";
};

- ocotp: imx8qx-ocotp {
+ ocotp: ocotp {
compatible = "fsl,imx8qxp-scu-ocotp";
#address-cells = <1>;
#size-cells = <1>;
--
2.25.1

2022-07-07 13:45:52

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 01/15] dt-bindings: clk: imx: Add fsl,scu-clk yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'clock' child node of the SCU main node.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
Acked-by: Stephen Boyd <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 31 -------------
.../bindings/clock/fsl,scu-clk.yaml | 43 +++++++++++++++++++
2 files changed, 43 insertions(+), 31 deletions(-)
create mode 100644 Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index a87ec15e28d2..ef7f5222ac48 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -79,29 +79,6 @@ Required properties:
See detailed Resource ID list from:
include/dt-bindings/firmware/imx/rsrc.h

-Clock bindings based on SCU Message Protocol
-------------------------------------------------------------
-
-This binding uses the common clock binding[1].
-
-Required properties:
-- compatible: Should be one of:
- "fsl,imx8dxl-clk"
- "fsl,imx8qm-clk"
- "fsl,imx8qxp-clk"
- followed by "fsl,scu-clk"
-- #clock-cells: Should be 2.
- Contains the Resource and Clock ID value.
-- clocks: List of clock specifiers, must contain an entry for
- each required entry in clock-names
-- clock-names: Should include entries "xtal_32KHz", "xtal_24MHz"
-
-The clock consumer should specify the desired clock by having the clock
-ID in its "clocks" phandle cell.
-
-See the full list of clock IDs from:
-include/dt-bindings/clock/imx8qxp-clock.h
-
Pinctrl bindings based on SCU Message Protocol
------------------------------------------------------------

@@ -127,7 +104,6 @@ Required properties for Pinctrl sub nodes:
Please refer to i.MX8QXP Reference Manual for detailed
CONFIG settings.

-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
[2] Documentation/devicetree/bindings/power/power-domain.yaml
[3] Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt

@@ -208,11 +184,6 @@ firmware {
&lsio_mu1 1 3
&lsio_mu1 3 3>;

- clk: clk {
- compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
- #clock-cells = <2>;
- };
-
iomuxc {
compatible = "fsl,imx8qxp-iomuxc";

@@ -265,7 +236,5 @@ serial@5a060000 {
...
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpuart0>;
- clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>;
- clock-names = "ipg";
power-domains = <&pd IMX_SC_R_UART_0>;
};
diff --git a/Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml b/Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml
new file mode 100644
index 000000000000..f2c48460a399
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml
@@ -0,0 +1,43 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/fsl,scu-clk.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - Clock bindings based on SCU Message Protocol
+
+maintainers:
+ - Abel Vesa <[email protected]>
+
+description: i.MX SCU Client Device Node
+ Client nodes are maintained as children of the relevant IMX-SCU device node.
+ This binding uses the common clock binding.
+ (Documentation/devicetree/bindings/clock/clock-bindings.txt)
+ The clock consumer should specify the desired clock by having the clock
+ ID in its "clocks" phandle cell. See the full list of clock IDs from
+ include/dt-bindings/clock/imx8qxp-clock.h
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - fsl,imx8dxl-clk
+ - fsl,imx8qm-clk
+ - fsl,imx8qxp-clk
+ - const: fsl,scu-clk
+
+ '#clock-cells':
+ const: 2
+
+required:
+ - compatible
+ - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ clock-controller {
+ compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
+ #clock-cells = <2>;
+ };
--
2.25.1

2022-07-07 13:48:40

by Viorel Suman (OSS)

[permalink] [raw]
Subject: [PATCH v8 07/15] dt-bindings: thermal: Add fsl,scu-thermal yaml file

From: Abel Vesa <[email protected]>

In order to replace the fsl,scu txt file from bindings/arm/freescale,
we need to split it between the right subsystems. This patch documents
separately the 'thermal' child node of the SCU main node.

Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 16 --------
.../bindings/thermal/fsl,scu-thermal.yaml | 38 +++++++++++++++++++
2 files changed, 38 insertions(+), 16 deletions(-)
create mode 100644 Documentation/devicetree/bindings/thermal/fsl,scu-thermal.yaml

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
index 6c0161fa4adf..03f927a33281 100644
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
@@ -72,17 +72,6 @@ Required properties:
Optional properties:
- timeout-sec: contains the watchdog timeout in seconds.

-Thermal bindings based on SCU Message Protocol
-------------------------------------------------------------
-
-Required properties:
-- compatible: Should be :
- "fsl,imx8qxp-sc-thermal"
- followed by "fsl,imx-sc-thermal";
-
-- #thermal-sensor-cells: See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml
- for a description.
-
Example (imx8qxp):
-------------
aliases {
@@ -114,11 +103,6 @@ firmware {
compatible = "fsl,imx8qxp-sc-wdt", "fsl,imx-sc-wdt";
timeout-sec = <60>;
};
-
- tsens: thermal-sensor {
- compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal";
- #thermal-sensor-cells = <1>;
- };
};
};

diff --git a/Documentation/devicetree/bindings/thermal/fsl,scu-thermal.yaml b/Documentation/devicetree/bindings/thermal/fsl,scu-thermal.yaml
new file mode 100644
index 000000000000..f9e4b3c8d0ee
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/fsl,scu-thermal.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/fsl,scu-thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - Thermal bindings based on SCU Message Protocol
+
+maintainers:
+ - Dong Aisheng <[email protected]>
+
+description: i.MX SCU Client Device Node
+ Client nodes are maintained as children of the relevant IMX-SCU device node.
+
+allOf:
+ - $ref: thermal-sensor.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: fsl,imx8qxp-sc-thermal
+ - const: fsl,imx-sc-thermal
+
+ '#thermal-sensor-cells':
+ const: 1
+
+required:
+ - compatible
+ - '#thermal-sensor-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ thermal-sensor {
+ compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal";
+ #thermal-sensor-cells = <1>;
+ };
--
2.25.1

2022-07-08 12:38:22

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH v8 00/15] dt-bindings: arm: freescale: Switch fsl,scu from txt to yaml

On Thu, Jul 07, 2022 at 03:50:07PM +0300, Viorel Suman (OSS) wrote:
> From: Viorel Suman <[email protected]>
>
> Changes since v7: https://lore.kernel.org/lkml/[email protected]/
> * added missing Reviewed-By:
> * Defined "mboxes" and "mbox-names" sections in scu-key.yaml as schema.
>
> Changes since v6: https://lore.kernel.org/lkml/[email protected]/
> * The series updated so that each patch making the conversion removes
> the piece being converted, then finally the patch adding fsl,scu.yaml
> removes the last pieces, as suggested by Krzysztof Kozlowski.
> * Updated ocotp and system-controller node names in the existing DTS
> files
>
> Changes since v5: https://lore.kernel.org/lkml/[email protected]/
> * Updated according to Krzysztof Kozlowski comments
>
> Changes since v4: https://lore.kernel.org/lkml/[email protected]/
> * Missing SoB added
>
> Changes since v3: https://lore.kernel.org/lkml/[email protected]/
> * Examples included
> * Included Abel's patches fixing thermal zone, keys and power controller names.
>
> Abel Vesa (12):
> dt-bindings: clk: imx: Add fsl,scu-clk yaml file
> dt-bindings: pinctrl: imx: Add fsl,scu-iomux yaml file
> dt-bindings: input: Add fsl,scu-key yaml file
> dt-bindings: nvmem: Add fsl,scu-ocotp yaml file
> dt-bindings: power: Add fsl,scu-pd yaml file
> dt-bindings: rtc: Add fsl,scu-rtc yaml file
> dt-bindings: thermal: Add fsl,scu-thermal yaml file
> dt-bindings: watchdog: Add fsl,scu-wdt yaml file
> dt-bindings: firmware: Add fsl,scu yaml file
> arm64: dts: freescale: imx8: Fix power controller name
> arm64: dts: freescale: imx8qxp: Add fallback compatible for clock
> controller
> arm64: dts: freescale: imx8qxp: Fix the keys node name
>
> Viorel Suman (3):
> arm64: dts: freescale: imx8qxp: Remove unnecessary clock related
> entries
> arm64: dts: freescale: imx8qxp: Fix the ocotp node name
> arm64: dts: freescale: imx8: Fix the system-controller node name

I'm preparing material for the next merge window, so just picked the
series up. If there is more outstanding review comments coming up,
let's address them with follow-up changes.

Shawn

2022-07-09 23:39:27

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH v8 02/15] dt-bindings: pinctrl: imx: Add fsl,scu-iomux yaml file

On Thu, Jul 7, 2022 at 2:51 PM Viorel Suman (OSS)
<[email protected]> wrote:

> From: Abel Vesa <[email protected]>
>
> In order to replace the fsl,scu txt file from bindings/arm/freescale,
> we need to split it between the right subsystems. This patch documents
> separately the 'iomux/pinctrl' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>

Acked-by: Linus Walleij <[email protected]>

Tell me if you want me to apply this to the pinctrl tree.
(I guess Shawn is handling it?)

Yours,
Linus Walleij

2022-07-11 11:54:50

by Abel Vesa

[permalink] [raw]
Subject: Re: [PATCH v8 01/15] dt-bindings: clk: imx: Add fsl,scu-clk yaml file

On 22-07-07 15:50:08, Viorel Suman (OSS) wrote:
> From: Abel Vesa <[email protected]>
>
> In order to replace the fsl,scu txt file from bindings/arm/freescale,
> we need to split it between the right subsystems. This patch documents
> separately the 'clock' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> Acked-by: Stephen Boyd <[email protected]>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>

Shawn, I'm assuming you're going to pick this up through your tree,
right?

> ---
> .../bindings/arm/freescale/fsl,scu.txt | 31 -------------
> .../bindings/clock/fsl,scu-clk.yaml | 43 +++++++++++++++++++
> 2 files changed, 43 insertions(+), 31 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml
>
> diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> index a87ec15e28d2..ef7f5222ac48 100644
> --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
> @@ -79,29 +79,6 @@ Required properties:
> See detailed Resource ID list from:
> include/dt-bindings/firmware/imx/rsrc.h
>
> -Clock bindings based on SCU Message Protocol
> -------------------------------------------------------------
> -
> -This binding uses the common clock binding[1].
> -
> -Required properties:
> -- compatible: Should be one of:
> - "fsl,imx8dxl-clk"
> - "fsl,imx8qm-clk"
> - "fsl,imx8qxp-clk"
> - followed by "fsl,scu-clk"
> -- #clock-cells: Should be 2.
> - Contains the Resource and Clock ID value.
> -- clocks: List of clock specifiers, must contain an entry for
> - each required entry in clock-names
> -- clock-names: Should include entries "xtal_32KHz", "xtal_24MHz"
> -
> -The clock consumer should specify the desired clock by having the clock
> -ID in its "clocks" phandle cell.
> -
> -See the full list of clock IDs from:
> -include/dt-bindings/clock/imx8qxp-clock.h
> -
> Pinctrl bindings based on SCU Message Protocol
> ------------------------------------------------------------
>
> @@ -127,7 +104,6 @@ Required properties for Pinctrl sub nodes:
> Please refer to i.MX8QXP Reference Manual for detailed
> CONFIG settings.
>
> -[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
> [2] Documentation/devicetree/bindings/power/power-domain.yaml
> [3] Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt
>
> @@ -208,11 +184,6 @@ firmware {
> &lsio_mu1 1 3
> &lsio_mu1 3 3>;
>
> - clk: clk {
> - compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
> - #clock-cells = <2>;
> - };
> -
> iomuxc {
> compatible = "fsl,imx8qxp-iomuxc";
>
> @@ -265,7 +236,5 @@ serial@5a060000 {
> ...
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_lpuart0>;
> - clocks = <&uart0_clk IMX_SC_R_UART_0 IMX_SC_PM_CLK_PER>;
> - clock-names = "ipg";
> power-domains = <&pd IMX_SC_R_UART_0>;
> };
> diff --git a/Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml b/Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml
> new file mode 100644
> index 000000000000..f2c48460a399
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml
> @@ -0,0 +1,43 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/fsl,scu-clk.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: i.MX SCU Client Device Node - Clock bindings based on SCU Message Protocol
> +
> +maintainers:
> + - Abel Vesa <[email protected]>
> +
> +description: i.MX SCU Client Device Node
> + Client nodes are maintained as children of the relevant IMX-SCU device node.
> + This binding uses the common clock binding.
> + (Documentation/devicetree/bindings/clock/clock-bindings.txt)
> + The clock consumer should specify the desired clock by having the clock
> + ID in its "clocks" phandle cell. See the full list of clock IDs from
> + include/dt-bindings/clock/imx8qxp-clock.h
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - fsl,imx8dxl-clk
> + - fsl,imx8qm-clk
> + - fsl,imx8qxp-clk
> + - const: fsl,scu-clk
> +
> + '#clock-cells':
> + const: 2
> +
> +required:
> + - compatible
> + - '#clock-cells'
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + clock-controller {
> + compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
> + #clock-cells = <2>;
> + };
> --
> 2.25.1
>

2022-07-12 10:10:27

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v8 09/15] dt-bindings: firmware: Add fsl,scu yaml file

On 07/07/2022 14:50, Viorel Suman (OSS) wrote:
> From: Abel Vesa <[email protected]>
>
> In order to replace the fsl,scu txt file from bindings/arm/freescale,
> we need to split it between the right subsystems. This patch adds the
> fsl,scu.yaml in the firmware bindings folder. This one is only for
> the main SCU node. The old txt file will be removed only after all
> the child nodes have been properly switch to yaml.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>


Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof

2022-07-12 10:20:49

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v8 04/15] dt-bindings: nvmem: Add fsl,scu-ocotp yaml file

On 07/07/2022 14:50, Viorel Suman (OSS) wrote:
> From: Abel Vesa <[email protected]>
>
> In order to replace the fsl,scu txt file from bindings/arm/freescale,
> we need to split it between the right subsystems. This patch documents
> separately the 'ocotp' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>


Reviewed-by: Krzysztof Kozlowski <[email protected]>


Best regards,
Krzysztof