From: Viorel Suman <[email protected]>
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 (13):
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
dt-bindings: arm: freescale: Remove fsl,scu txt file
Viorel Suman (1):
arm64: dts: freescale: imx8qxp: Remove unnecessary clock related
entries
.../bindings/arm/freescale/fsl,scu.txt | 271 ------------------
.../bindings/clock/fsl,scu-clk.yaml | 43 +++
.../devicetree/bindings/firmware/fsl,scu.yaml | 160 +++++++++++
.../bindings/input/fsl,scu-key.yaml | 40 +++
.../bindings/nvmem/fsl,scu-ocotp.yaml | 57 ++++
.../bindings/pinctrl/fsl,scu-pinctrl.yaml | 68 +++++
.../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 | 2 +-
arch/arm64/boot/dts/freescale/imx8qxp.dtsi | 8 +-
12 files changed, 516 insertions(+), 277 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
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]>
---
.../bindings/pinctrl/fsl,scu-pinctrl.yaml | 68 +++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
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..76a2e7b28172
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
@@ -0,0 +1,68 @@
+# 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 config 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 CONFIG is
+ the pad setting value like pull-up on this pin. Please refer to the
+ appropriate i.MX8 Reference Manual for detailed CONFIG settings.
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+
+ required:
+ - fsl,pins
+
+ additionalProperties: false
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/pinctrl/pads-imx8qxp.h>
+
+ pinctrl {
+ compatible = "fsl,imx8qxp-iomuxc";
+
+ pinctrl_lpuart0: lpuart0grp {
+ fsl,pins = <
+ 111 0 0x06000020
+ 112 0 0x06000020
+ >;
+ };
+ };
--
2.25.1
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/nvmem/fsl,scu-ocotp.yaml | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
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..a8972acb1b01
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
@@ -0,0 +1,57 @@
+# 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.
+ Detailed bindings are described in bindings/nvmem/nvmem.txt
+
+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:
+ - |
+ imx8qx-ocotp {
+ compatible = "fsl,imx8qxp-scu-ocotp";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ fec_mac0: mac@2c4 {
+ reg = <0x2c4 6>;
+ };
+ };
--
2.25.1
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]>
---
.../devicetree/bindings/rtc/fsl,scu-rtc.yaml | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/fsl,scu-rtc.yaml
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..940588e278fb
--- /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
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]>
---
.../devicetree/bindings/firmware/fsl,scu.yaml | 160 ++++++++++++++++++
1 file changed, 160 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/fsl,scu.yaml
diff --git a/Documentation/devicetree/bindings/firmware/fsl,scu.yaml b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml
new file mode 100644
index 000000000000..bf13a1e88ecf
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/fsl,scu.yaml
@@ -0,0 +1,160 @@
+# 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: System Controller Device Node
+ 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
+
+ imx8qx-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: |
+ 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.
+ minItems: 1
+ maxItems: 10
+
+ mbox-names:
+ description:
+ include "gip3" if want to support general MU interrupt.
+ minItems: 1
+ maxItems: 10
+
+ 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
+ >;
+ };
+ };
+
+ imx8qx-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
From: Viorel Suman <[email protected]>
"clocks" and "clock-names" are not used the driver, so
remove them in order to match the yaml definition.
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
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]>
---
.../bindings/thermal/fsl,scu-thermal.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/thermal/fsl,scu-thermal.yaml
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..50c462027aa6
--- /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: /schemas/thermal/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
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
From: Abel Vesa <[email protected]>
Now that all the child nodes have been properly documented in the
yaml files, within their proper subystems, we can drop the fsl,scu.txt.
Signed-off-by: Abel Vesa <[email protected]>
Signed-off-by: Viorel Suman <[email protected]>
---
.../bindings/arm/freescale/fsl,scu.txt | 271 ------------------
1 file changed, 271 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
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 a87ec15e28d2..000000000000
--- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
+++ /dev/null
@@ -1,271 +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.
-
-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
-
-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
-------------------------------------------------------------
-
-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.
-
-[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
-
-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
-------------------------------------------------------------
-
-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.
-
-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
-------------------------------------------------------------
-
-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 {
- 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>;
-
- clk: clk {
- compatible = "fsl,imx8qxp-clk", "fsl,scu-clk";
- #clock-cells = <2>;
- };
-
- 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>;
- #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>;
- };
-
- rtc: rtc {
- 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>;
- };
-
- tsens: thermal-sensor {
- compatible = "fsl,imx8qxp-sc-thermal", "fsl,imx-sc-thermal";
- #thermal-sensor-cells = <1>;
- };
- };
-};
-
-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>;
-};
--
2.25.1
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]>
---
.../bindings/watchdog/fsl,scu-wdt.yaml | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 Documentation/devicetree/bindings/watchdog/fsl,scu-wdt.yaml
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..6403c6f454db
--- /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: /schemas/watchdog/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
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]>
---
.../bindings/clock/fsl,scu-clk.yaml | 43 +++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml
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
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]>
---
.../bindings/input/fsl,scu-key.yaml | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 Documentation/devicetree/bindings/input/fsl,scu-key.yaml
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..7d870cbed02d
--- /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: /schemas/input/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
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
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]>
---
.../devicetree/bindings/power/fsl,scu-pd.yaml | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/fsl,scu-pd.yaml
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..031c7a5a59cb
--- /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: /schemas/power/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
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 d0f56e4dee77..5db693535e53 100644
--- a/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8qxp.dtsi
@@ -230,7 +230,7 @@ ocotp: imx8qx-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
On 29/06/2022 18:44, 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 'rtc' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> ---
> .../devicetree/bindings/rtc/fsl,scu-rtc.yaml | 31 +++++++++++++++++++
> 1 file changed, 31 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rtc/fsl,scu-rtc.yaml
>
> 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..940588e278fb
> --- /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#"
No need for quotes.
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 29/06/2022 18:44, 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]>
> ---
> .../bindings/nvmem/fsl,scu-ocotp.yaml | 57 +++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
>
> 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..a8972acb1b01
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
> @@ -0,0 +1,57 @@
> +# 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.
> + Detailed bindings are described in bindings/nvmem/nvmem.txt
Skip last sentence, does not make sense anymore.
> +
> +allOf:
> + - $ref: "nvmem.yaml#"
Don't mix quotes. I mentioned it last time, although in other place.
> +
> +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:
> + - |
> + imx8qx-ocotp {
Just "ocotp" (generic node naming).
> + compatible = "fsl,imx8qxp-scu-ocotp";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + fec_mac0: mac@2c4 {
> + reg = <0x2c4 6>;
> + };
> + };
Best regards,
Krzysztof
On 29/06/2022 18:44, 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]>
> ---
> .../bindings/clock/fsl,scu-clk.yaml | 43 +++++++++++++++++++
> 1 file changed, 43 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/fsl,scu-clk.yaml
>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 29/06/2022 18:44, 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 'power controller' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> ---
Assuming all patches are taken independently:
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 29/06/2022 18:44, 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 'watchdog' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> ---
Assuming all patches are taken independently:
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 29/06/2022 18:44, 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]>
> ---
> .../devicetree/bindings/firmware/fsl,scu.yaml | 160 ++++++++++++++++++
> 1 file changed, 160 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/firmware/fsl,scu.yaml
>
This depends on all other previous patches, so it cannot go
independently. Therefore I expect that everything will be going through
one tree thus removal of TXT hunks should happen gradually.
Best regards,
Krzysztof
On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> From: Abel Vesa <[email protected]>
>
> Now that all the child nodes have been properly documented in the
> yaml files, within their proper subystems, we can drop the fsl,scu.txt.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> ---
> .../bindings/arm/freescale/fsl,scu.txt | 271 ------------------
> 1 file changed, 271 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt
>
This cannot be separate patch. Conversion is add+remove in one commit,
so even if you remove everything in one patch, it should be then
squashed into patch #9. Anyway, I think better approach is to remove
gradually, so each piece is removed in each converted part.
Best regards,
Krzysztof
On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> From: Viorel Suman <[email protected]>
>
> "clocks" and "clock-names" are not used the driver, so
> remove them in order to match the yaml definition.
So this explains the unexpected change in the bindings... but actually
it does not explain whether it is correct or not. Just because driver
does not use it, is not a proof that clocks are not there. In different
OS/implementation this DTS might break stuff, so basically it is ABI
break. DTS should describe the hardware fully, so if the clocks are
there, should be in DTS regardless of the driver.
Best regards,
Krzysztof
On 29/06/2022 18:44, 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 'keys' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> ---
> .../bindings/input/fsl,scu-key.yaml | 40 +++++++++++++++++++
> 1 file changed, 40 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/input/fsl,scu-key.yaml
>
Assuming all patches are taken independently:
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 29/06/2022 18:44, 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 'iomux/pinctrl' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> ---
> .../bindings/pinctrl/fsl,scu-pinctrl.yaml | 68 +++++++++++++++++++
> 1 file changed, 68 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
>
> 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..76a2e7b28172
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
> @@ -0,0 +1,68 @@
> +# 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#"
Don't mix the quotes. You changed them to ', so stick with it.
> +
> +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 config 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 CONFIG is
> + the pad setting value like pull-up on this pin. Please refer to the
> + appropriate i.MX8 Reference Manual for detailed CONFIG settings.
> + $ref: /schemas/types.yaml#/definitions/uint32-matrix
Look at fsl,imx8mq-pinctrl.yaml. Each item is described (items under items).
> +
> + required:
> + - fsl,pins
> +
> + additionalProperties: false
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/pinctrl/pads-imx8qxp.h>
> +
> + pinctrl {
> + compatible = "fsl,imx8qxp-iomuxc";
> +
> + pinctrl_lpuart0: lpuart0grp {
> + fsl,pins = <
> + 111 0 0x06000020
> + 112 0 0x06000020
> + >;
> + };
> + };
Best regards,
Krzysztof
On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> 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]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 29/06/2022 18:44, 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]>
> ---
> .../bindings/nvmem/fsl,scu-ocotp.yaml | 57 +++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
>
> 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..a8972acb1b01
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/fsl,scu-ocotp.yaml
> @@ -0,0 +1,57 @@
> +# 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.
> + Detailed bindings are described in bindings/nvmem/nvmem.txt
> +
> +allOf:
> + - $ref: "nvmem.yaml#"
Actually, you do not need the quotes here at all.
Best regards,
Krzysztof
On 29/06/2022 18:44, 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 'thermal' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> ---
Assuming all patches are taken independently:
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> From: Viorel Suman <[email protected]>
>
> Changes since v5: https://lore.kernel.org/lkml/[email protected]/
> * Updated according to Krzysztof Kozlowski comments
>
My comment a about removal of each part of TXT bindings in each patch,
was not addressed. Your approach makes it more difficult to read patches
and makes sense only if each subsystem maintainer will take the patches
(separately). If the patches are going through one tree, then better to
remove the TXT gradually.
So the question - who is going to take each of the patches?
Best regards,
Krzysztof
On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> 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]>
> ---
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> 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]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Best regards,
Krzysztof
On 22-06-29 20:04:43, Krzysztof Kozlowski wrote:
> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> > From: Viorel Suman <[email protected]>
> >
> > "clocks" and "clock-names" are not used the driver, so
> > remove them in order to match the yaml definition.
>
> So this explains the unexpected change in the bindings... but actually
> it does not explain whether it is correct or not. Just because driver
> does not use it, is not a proof that clocks are not there. In different
> OS/implementation this DTS might break stuff, so basically it is ABI
> break. DTS should describe the hardware fully, so if the clocks are
> there, should be in DTS regardless of the driver.
Hi Krzysztof,
Both XTAL clocks - 24MHz and 32kHz - are still defined in DTSI files, see for instance in
arch/arm64/boot/dts/freescale/imx8qxp.dtsi :
---------------
xtal32k: clock-xtal32k {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "xtal_32KHz";
};
xtal24m: clock-xtal24m {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "xtal_24MHz";
};
---------------
Both can be seen in /sys/kernel/debug/clk/clk_summary once boot is complete, both can be referenced
in any DTS node, so there is no ABI break.
"DTS should describe the hardware fully" - this is true in case the OS is supposed to controll the
hardware fully. i.MX8 System Controller Unit concept implies resources being allocated and managed
by SCU, there is no direct OS access to some hardware. SCU actually defines the hardware environment
the OS is being able to see and run within. SCU is able to define several such isolated hardware
environments, each having its own OS running. So, in this particular case - i.MX8 SCU concept -
DTS should describe the hardware from the perspective of the hardware environment exposed by SCU to
OS.
Best regards,
Viorel
On 22-06-29 19:51:06, Krzysztof Kozlowski wrote:
> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> > From: Viorel Suman <[email protected]>
> >
> > Changes since v5: https://lore.kernel.org/lkml/[email protected]/
> > * Updated according to Krzysztof Kozlowski comments
> >
>
> My comment a about removal of each part of TXT bindings in each patch,
> was not addressed. Your approach makes it more difficult to read patches
> and makes sense only if each subsystem maintainer will take the patches
> (separately). If the patches are going through one tree, then better to
> remove the TXT gradually.
>
> So the question - who is going to take each of the patches?
Hi Krzysztof,
I just understood the context of your comment, will do it in the next version.
Assuming TXT is removed from aggregating TXT - fsl,scu.txt - gradually, do you expect the
removed to be added into the aggregating YAML - fsl,scu.yaml - also gradually within the
same patch ?
Thank you,
Viorel
On 22-06-29 19:53:51, Krzysztof Kozlowski wrote:
> On 29/06/2022 18:44, 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 'iomux/pinctrl' child node of the SCU main node.
> >
> > Signed-off-by: Abel Vesa <[email protected]>
> > Signed-off-by: Viorel Suman <[email protected]>
> > ---
> > .../bindings/pinctrl/fsl,scu-pinctrl.yaml | 68 +++++++++++++++++++
> > 1 file changed, 68 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
> >
> > 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..76a2e7b28172
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
[...]
> > + fsl,pins:
> > + description:
> > + each entry consists of 3 integers and represents the pin ID, the mux value
> > + and config 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 CONFIG is
> > + the pad setting value like pull-up on this pin. Please refer to the
> > + appropriate i.MX8 Reference Manual for detailed CONFIG settings.
> > + $ref: /schemas/types.yaml#/definitions/uint32-matrix
>
> Look at fsl,imx8mq-pinctrl.yaml. Each item is described (items under items).
Added them initially, but later dropped because of some logs like
"pinctrl@xxxxxxx: usdhc1grp:fsl,pins:0: [...] is too long" shown by
"make dt_binding_check dtbs_check DT_SCHEMA_FILES=[...]/fsl,scu-pinctrl.yaml"
Same logs are shown for "fsl,imx8mq-pinctrl.yaml". Will add the items description in the next
version.
Thank you,
Viorel
On Wed, 29 Jun 2022 19:44:09 +0300, 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]>
> ---
> .../devicetree/bindings/firmware/fsl,scu.yaml | 160 ++++++++++++++++++
> 1 file changed, 160 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/firmware/fsl,scu.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/firmware/fsl,scu.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/clock/fsl,scu-clk.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/fsl,scu.example.dtb: system-controller: clock-controller: False schema does not allow {'compatible': ['fsl,imx8qxp-clk', 'fsl,scu-clk'], '#clock-cells': [[2]]}
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/fsl,scu.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/fsl,scu.example.dtb: system-controller: pinctrl: False schema does not allow {'compatible': ['fsl,imx8qxp-iomuxc'], 'lpuart0grp': {'fsl,pins': [[111, 0, 100663328, 112, 0, 100663328]]}}
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/firmware/fsl,scu.yaml
Documentation/devicetree/bindings/firmware/fsl,scu.example.dtb:0:0: /example-0/firmware/system-controller/clock-controller: failed to match any schema with compatible: ['fsl,imx8qxp-clk', 'fsl,scu-clk']
Documentation/devicetree/bindings/firmware/fsl,scu.example.dtb:0:0: /example-0/firmware/system-controller/clock-controller: failed to match any schema with compatible: ['fsl,imx8qxp-clk', 'fsl,scu-clk']
Documentation/devicetree/bindings/firmware/fsl,scu.example.dtb:0:0: /example-0/firmware/system-controller/pinctrl: failed to match any schema with compatible: ['fsl,imx8qxp-iomuxc']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
On Wed, 29 Jun 2022 19:44:02 +0300, 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 'iomux/pinctrl' child node of the SCU main node.
>
> Signed-off-by: Abel Vesa <[email protected]>
> Signed-off-by: Viorel Suman <[email protected]>
> ---
> .../bindings/pinctrl/fsl,scu-pinctrl.yaml | 68 +++++++++++++++++++
> 1 file changed, 68 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8ulp-pinctrl.example.dtb: pinctrl@298c0000: lpuart5grp:fsl,pins:0: [312, 2288, 4, 3, 3, 316, 2284, 4, 3, 3] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8ulp-pinctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.example.dtb: pinctrl@30330000: uart2grp:fsl,pins:0: [572, 1188, 1276, 0, 0, 320, 576, 1192, 0, 0, 0, 320] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx93-pinctrl.example.dtb: pinctrl@443c0000: uart3grp:fsl,pins:0: [72, 504, 1052, 1, 0, 73, 76, 508, 1048, 1, 0, 73] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx93-pinctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8mm-pinctrl.example.dtb: pinctrl@30330000: uart2grp:fsl,pins:0: [572, 1188, 1276, 0, 0, 320, 576, 1192, 0, 0, 0, 320] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8mm-pinctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.example.dtb: pinctrl@30330000: uart5grp:fsl,pins:0: [352, 976, 1812, 1, 0, 126, 356, 980, 0, 1, 0, 118] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.example.dtb: pinctrl@302c0000: gpio1-grp:fsl,pins:0: [8, 56, 0, 0, 0, 89, 12, 60, 0, 0, 0, 89] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8mq-pinctrl.example.dtb: pinctrl@30330000: uart1grp:fsl,pins:0: [564, 1180, 1268, 0, 0, 73, 568, 1184, 1268, 0, 0, 73] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8mq-pinctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imxrt1050.example.dtb: iomuxc@401f8000: lpuart1grp:fsl,pins:0: [236, 732, 0, 2, 0, 241, 240, 736, 0, 2, 0, 241] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imxrt1050.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8mp-pinctrl.example.dtb: pinctrl@30330000: uart2grp:fsl,pins:0: [552, 1160, 1520, 0, 6, 73, 552, 1160, 0, 0, 0, 73] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imx8mp-pinctrl.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imxrt1170.example.dtb: iomuxc@400e8000: lpuart1grp:fsl,pins:0: [364, 944, 1568, 0, 0, 241, 368, 948, 1564, 0, 0, 241] is too long
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/pinctrl/fsl,imxrt1170.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
On 6/29/22 10:59, Krzysztof Kozlowski wrote:
> On 29/06/2022 18:44, 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 'watchdog' child node of the SCU main node.
>>
>> Signed-off-by: Abel Vesa <[email protected]>
>> Signed-off-by: Viorel Suman <[email protected]>
>> ---
>
> Assuming all patches are taken independently:
>
>
Assuming the same:
Reviewed-by: Guenter Roeck <[email protected]>
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> >
> Best regards,
> Krzysztof
On 30/06/2022 10:36, Viorel Suman wrote:
> On 22-06-29 20:04:43, Krzysztof Kozlowski wrote:
>> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
>>> From: Viorel Suman <[email protected]>
>>>
>>> "clocks" and "clock-names" are not used the driver, so
>>> remove them in order to match the yaml definition.
>>
>> So this explains the unexpected change in the bindings... but actually
>> it does not explain whether it is correct or not. Just because driver
>> does not use it, is not a proof that clocks are not there. In different
>> OS/implementation this DTS might break stuff, so basically it is ABI
>> break. DTS should describe the hardware fully, so if the clocks are
>> there, should be in DTS regardless of the driver.
>
> Hi Krzysztof,
>
> Both XTAL clocks - 24MHz and 32kHz - are still defined in DTSI files, see for instance in
> arch/arm64/boot/dts/freescale/imx8qxp.dtsi :
> ---------------
> xtal32k: clock-xtal32k {
> compatible = "fixed-clock";
> #clock-cells = <0>;
> clock-frequency = <32768>;
> clock-output-names = "xtal_32KHz";
> };
>
> xtal24m: clock-xtal24m {
> compatible = "fixed-clock";
> #clock-cells = <0>;
> clock-frequency = <24000000>;
> clock-output-names = "xtal_24MHz";
> };
> ---------------
> Both can be seen in /sys/kernel/debug/clk/clk_summary once boot is complete, both can be referenced
> in any DTS node, so there is no ABI break.
ABI break is not relevant to the fixed clocks being or not being defined
in the DTS. You have a device which was taking the clock inputs, so the
clocks stayed enabled.
Now, you don't take these inputs, so for example the clocks are getting
disabled as not used.
>
> "DTS should describe the hardware fully" - this is true in case the OS is supposed to controll the
> hardware fully. i.MX8 System Controller Unit concept implies resources being allocated and managed
> by SCU, there is no direct OS access to some hardware. SCU actually defines the hardware environment
> the OS is being able to see and run within. SCU is able to define several such isolated hardware
> environments, each having its own OS running. So, in this particular case - i.MX8 SCU concept -
> DTS should describe the hardware from the perspective of the hardware environment exposed by SCU to
> OS.
OK, that sounds good, but the question about these clocks remain - are
they inputs to the SCU or not.
Regardless whether they are actual input or not, you used not
appropriate argument here - that Linux OS implementation does not use
them. The proper argument is - whether the hardware environment has them
connected or not.
Best regards,
Krzysztof
On 30/06/2022 14:13, Viorel Suman (OSS) wrote:
> On 22-06-29 19:51:06, Krzysztof Kozlowski wrote:
>> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
>>> From: Viorel Suman <[email protected]>
>>>
>>> Changes since v5: https://lore.kernel.org/lkml/[email protected]/
>>> * Updated according to Krzysztof Kozlowski comments
>>>
>>
>> My comment a about removal of each part of TXT bindings in each patch,
>> was not addressed. Your approach makes it more difficult to read patches
>> and makes sense only if each subsystem maintainer will take the patches
>> (separately). If the patches are going through one tree, then better to
>> remove the TXT gradually.
>>
>> So the question - who is going to take each of the patches?
>
> Hi Krzysztof,
>
> I just understood the context of your comment, will do it in the next version.
>
> Assuming TXT is removed from aggregating TXT - fsl,scu.txt - gradually, do you expect the
> removed to be added into the aggregating YAML - fsl,scu.yaml - also gradually within the
> same patch ?
Each patch making the conversion should remove the piece being
converted. Then finally the patch adding fsl,scu.yaml should remove the
last pieces (remaining ones).
Best regards,
Krzysztof
On 22-06-30 20:03:07, Krzysztof Kozlowski wrote:
> On 30/06/2022 14:13, Viorel Suman (OSS) wrote:
> > On 22-06-29 19:51:06, Krzysztof Kozlowski wrote:
> >> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> >>> From: Viorel Suman <[email protected]>
> >>>
> >>> Changes since v5: https://lore.kernel.org/lkml/[email protected]/
> >>> * Updated according to Krzysztof Kozlowski comments
> >>>
> >>
> >> My comment a about removal of each part of TXT bindings in each patch,
> >> was not addressed. Your approach makes it more difficult to read patches
> >> and makes sense only if each subsystem maintainer will take the patches
> >> (separately). If the patches are going through one tree, then better to
> >> remove the TXT gradually.
> >>
> >> So the question - who is going to take each of the patches?
> >
> > Hi Krzysztof,
> >
> > I just understood the context of your comment, will do it in the next version.
> >
> > Assuming TXT is removed from aggregating TXT - fsl,scu.txt - gradually, do you expect the
> > removed to be added into the aggregating YAML - fsl,scu.yaml - also gradually within the
> > same patch ?
>
> Each patch making the conversion should remove the piece being
> converted. Then finally the patch adding fsl,scu.yaml should remove the
> last pieces (remaining ones).
Thank you for clarification, will follow this approach in the next version.
Regards,
Viorel
On 30/06/2022 14:37, Viorel Suman (OSS) wrote:
> On 22-06-29 19:53:51, Krzysztof Kozlowski wrote:
>> On 29/06/2022 18:44, 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 'iomux/pinctrl' child node of the SCU main node.
>>>
>>> Signed-off-by: Abel Vesa <[email protected]>
>>> Signed-off-by: Viorel Suman <[email protected]>
>>> ---
>>> .../bindings/pinctrl/fsl,scu-pinctrl.yaml | 68 +++++++++++++++++++
>>> 1 file changed, 68 insertions(+)
>>> create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
>>>
>>> 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..76a2e7b28172
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
> [...]
>>> + fsl,pins:
>>> + description:
>>> + each entry consists of 3 integers and represents the pin ID, the mux value
>>> + and config 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 CONFIG is
>>> + the pad setting value like pull-up on this pin. Please refer to the
>>> + appropriate i.MX8 Reference Manual for detailed CONFIG settings.
>>> + $ref: /schemas/types.yaml#/definitions/uint32-matrix
>>
>> Look at fsl,imx8mq-pinctrl.yaml. Each item is described (items under items).
>
> Added them initially, but later dropped because of some logs like
> "pinctrl@xxxxxxx: usdhc1grp:fsl,pins:0: [...] is too long" shown by
> "make dt_binding_check dtbs_check DT_SCHEMA_FILES=[...]/fsl,scu-pinctrl.yaml"
>
> Same logs are shown for "fsl,imx8mq-pinctrl.yaml". Will add the items description in the next
> version.
>
The fsl,imx8mq-pinctrl.yaml should be correct and I don't see the reason
why dtschema complains in some of the entries. It's like one define was
not correct... I'll take a look at this later, but anyway keep the same
as fsl,imx8mq-pinctrl.yaml even if it complains.
Best regards,
Krzysztof
On 22-06-30 20:01:31, Krzysztof Kozlowski wrote:
> On 30/06/2022 10:36, Viorel Suman wrote:
> > On 22-06-29 20:04:43, Krzysztof Kozlowski wrote:
> >> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> >>> From: Viorel Suman <[email protected]>
> >>>
> >>> "clocks" and "clock-names" are not used the driver, so
> >>> remove them in order to match the yaml definition.
> >>
> >> So this explains the unexpected change in the bindings... but actually
> >> it does not explain whether it is correct or not. Just because driver
> >> does not use it, is not a proof that clocks are not there. In different
> >> OS/implementation this DTS might break stuff, so basically it is ABI
> >> break. DTS should describe the hardware fully, so if the clocks are
> >> there, should be in DTS regardless of the driver.
> >
> > Hi Krzysztof,
> >
> > Both XTAL clocks - 24MHz and 32kHz - are still defined in DTSI files, see for instance in
> > arch/arm64/boot/dts/freescale/imx8qxp.dtsi :
> > ---------------
> > xtal32k: clock-xtal32k {
> > compatible = "fixed-clock";
> > #clock-cells = <0>;
> > clock-frequency = <32768>;
> > clock-output-names = "xtal_32KHz";
> > };
> >
> > xtal24m: clock-xtal24m {
> > compatible = "fixed-clock";
> > #clock-cells = <0>;
> > clock-frequency = <24000000>;
> > clock-output-names = "xtal_24MHz";
> > };
> > ---------------
> > Both can be seen in /sys/kernel/debug/clk/clk_summary once boot is complete, both can be referenced
> > in any DTS node, so there is no ABI break.
>
> ABI break is not relevant to the fixed clocks being or not being defined
> in the DTS. You have a device which was taking the clock inputs, so the
> clocks stayed enabled.
>
> Now, you don't take these inputs, so for example the clocks are getting
> disabled as not used.
Ok, thanks for the explanation.
> >
> > "DTS should describe the hardware fully" - this is true in case the OS is supposed to controll the
> > hardware fully. i.MX8 System Controller Unit concept implies resources being allocated and managed
> > by SCU, there is no direct OS access to some hardware. SCU actually defines the hardware environment
> > the OS is being able to see and run within. SCU is able to define several such isolated hardware
> > environments, each having its own OS running. So, in this particular case - i.MX8 SCU concept -
> > DTS should describe the hardware from the perspective of the hardware environment exposed by SCU to
> > OS.
>
> OK, that sounds good, but the question about these clocks remain - are
> they inputs to the SCU or not.
The question context looks a bit shifted. The "clocks" and "clock-names"
attributes are removed from a clock provider device.
The OS clock provider in this case is a client which uses some protocol
to communicate with SCU via a messaging unit. There is no
access to xtal clocks via the existing OS<->SCU communication protocol.
>
> Regardless whether they are actual input or not, you used not
> appropriate argument here - that Linux OS implementation does not use
> them. The proper argument is - whether the hardware environment has them
> connected or not.
Right, agreed.
Regards,
Viorel
On 30/06/2022 21:48, Viorel Suman wrote:
>
> The question context looks a bit shifted. The "clocks" and "clock-names"
> attributes are removed from a clock provider device.
>
> The OS clock provider in this case is a client which uses some protocol
> to communicate with SCU via a messaging unit. There is no
> access to xtal clocks via the existing OS<->SCU communication protocol.
SCU does not need to access them via communication protocol. It's enough
that they are clock inputs, physical clocks being fed to your hardware
which you describe in the DTS.
Best regards,
Krzysztof
On Wed, Jun 29, 2022 at 07:51:06PM +0200, Krzysztof Kozlowski wrote:
> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> > From: Viorel Suman <[email protected]>
> >
> > Changes since v5: https://lore.kernel.org/lkml/[email protected]/
> > * Updated according to Krzysztof Kozlowski comments
> >
>
> My comment a about removal of each part of TXT bindings in each patch,
> was not addressed. Your approach makes it more difficult to read patches
> and makes sense only if each subsystem maintainer will take the patches
> (separately). If the patches are going through one tree, then better to
> remove the TXT gradually.
>
> So the question - who is going to take each of the patches?
I can take the series through IMX tree if that makes the most sense.
Shawn
On 05/07/2022 02:39, Shawn Guo wrote:
> On Wed, Jun 29, 2022 at 07:51:06PM +0200, Krzysztof Kozlowski wrote:
>> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
>>> From: Viorel Suman <[email protected]>
>>>
>>> Changes since v5: https://lore.kernel.org/lkml/[email protected]/
>>> * Updated according to Krzysztof Kozlowski comments
>>>
>>
>> My comment a about removal of each part of TXT bindings in each patch,
>> was not addressed. Your approach makes it more difficult to read patches
>> and makes sense only if each subsystem maintainer will take the patches
>> (separately). If the patches are going through one tree, then better to
>> remove the TXT gradually.
>>
>> So the question - who is going to take each of the patches?
>
> I can take the series through IMX tree if that makes the most sense.
Sounds fine to me. Then however each piece of TXT file should be removed
in each commit doing that piece conversion.
Best regards,
Krzysztof
On 22-07-05 09:28:24, Krzysztof Kozlowski wrote:
> On 05/07/2022 02:39, Shawn Guo wrote:
> > On Wed, Jun 29, 2022 at 07:51:06PM +0200, Krzysztof Kozlowski wrote:
> >> On 29/06/2022 18:44, Viorel Suman (OSS) wrote:
> >>> From: Viorel Suman <[email protected]>
> >>>
> >>> Changes since v5: https://lore.kernel.org/lkml/[email protected]/
> >>> * Updated according to Krzysztof Kozlowski comments
> >>>
> >>
> >> My comment a about removal of each part of TXT bindings in each patch,
> >> was not addressed. Your approach makes it more difficult to read patches
> >> and makes sense only if each subsystem maintainer will take the patches
> >> (separately). If the patches are going through one tree, then better to
> >> remove the TXT gradually.
> >>
> >> So the question - who is going to take each of the patches?
> >
> > I can take the series through IMX tree if that makes the most sense.
>
> Sounds fine to me. Then however each piece of TXT file should be removed
> in each commit doing that piece conversion.
>
> Best regards,
> Krzysztof
Just sent v7 which removes TXT in each commit which does the conversion.
Regards,
Viorel
On Thu, Jun 30, 2022 at 12:33 PM Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 30/06/2022 14:37, Viorel Suman (OSS) wrote:
> > On 22-06-29 19:53:51, Krzysztof Kozlowski wrote:
> >> On 29/06/2022 18:44, 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 'iomux/pinctrl' child node of the SCU main node.
> >>>
> >>> Signed-off-by: Abel Vesa <[email protected]>
> >>> Signed-off-by: Viorel Suman <[email protected]>
> >>> ---
> >>> .../bindings/pinctrl/fsl,scu-pinctrl.yaml | 68 +++++++++++++++++++
> >>> 1 file changed, 68 insertions(+)
> >>> create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
> >>>
> >>> 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..76a2e7b28172
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
> > [...]
> >>> + fsl,pins:
> >>> + description:
> >>> + each entry consists of 3 integers and represents the pin ID, the mux value
> >>> + and config 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 CONFIG is
> >>> + the pad setting value like pull-up on this pin. Please refer to the
> >>> + appropriate i.MX8 Reference Manual for detailed CONFIG settings.
> >>> + $ref: /schemas/types.yaml#/definitions/uint32-matrix
> >>
> >> Look at fsl,imx8mq-pinctrl.yaml. Each item is described (items under items).
> >
> > Added them initially, but later dropped because of some logs like
> > "pinctrl@xxxxxxx: usdhc1grp:fsl,pins:0: [...] is too long" shown by
> > "make dt_binding_check dtbs_check DT_SCHEMA_FILES=[...]/fsl,scu-pinctrl.yaml"
> >
> > Same logs are shown for "fsl,imx8mq-pinctrl.yaml". Will add the items description in the next
> > version.
> >
>
> The fsl,imx8mq-pinctrl.yaml should be correct and I don't see the reason
> why dtschema complains in some of the entries. It's like one define was
> not correct... I'll take a look at this later, but anyway keep the same
> as fsl,imx8mq-pinctrl.yaml even if it complains.
The issue is that 'fsl,pins' is problematic for the new dtb decoding
because it has a variable definition in terms of matrix bounds as each
i.MX platform has its own length (typ 5 or 6). The tools try to work
around it by figuring out which size fits. That works until there are
multiple answers which seems to be what's happening here.
The easiest solution I think is to just strip the constraints in
occurances of this property. I'll look into that.
Rob
On Tue, Jul 5, 2022 at 12:33 PM Rob Herring <[email protected]> wrote:
>
> On Thu, Jun 30, 2022 at 12:33 PM Krzysztof Kozlowski
> <[email protected]> wrote:
> >
> > On 30/06/2022 14:37, Viorel Suman (OSS) wrote:
> > > On 22-06-29 19:53:51, Krzysztof Kozlowski wrote:
> > >> On 29/06/2022 18:44, 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 'iomux/pinctrl' child node of the SCU main node.
> > >>>
> > >>> Signed-off-by: Abel Vesa <[email protected]>
> > >>> Signed-off-by: Viorel Suman <[email protected]>
> > >>> ---
> > >>> .../bindings/pinctrl/fsl,scu-pinctrl.yaml | 68 +++++++++++++++++++
> > >>> 1 file changed, 68 insertions(+)
> > >>> create mode 100644 Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
> > >>>
> > >>> 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..76a2e7b28172
> > >>> --- /dev/null
> > >>> +++ b/Documentation/devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml
> > > [...]
> > >>> + fsl,pins:
> > >>> + description:
> > >>> + each entry consists of 3 integers and represents the pin ID, the mux value
> > >>> + and config 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 CONFIG is
> > >>> + the pad setting value like pull-up on this pin. Please refer to the
> > >>> + appropriate i.MX8 Reference Manual for detailed CONFIG settings.
> > >>> + $ref: /schemas/types.yaml#/definitions/uint32-matrix
> > >>
> > >> Look at fsl,imx8mq-pinctrl.yaml. Each item is described (items under items).
> > >
> > > Added them initially, but later dropped because of some logs like
> > > "pinctrl@xxxxxxx: usdhc1grp:fsl,pins:0: [...] is too long" shown by
> > > "make dt_binding_check dtbs_check DT_SCHEMA_FILES=[...]/fsl,scu-pinctrl.yaml"
> > >
> > > Same logs are shown for "fsl,imx8mq-pinctrl.yaml". Will add the items description in the next
> > > version.
> > >
> >
> > The fsl,imx8mq-pinctrl.yaml should be correct and I don't see the reason
> > why dtschema complains in some of the entries. It's like one define was
> > not correct... I'll take a look at this later, but anyway keep the same
> > as fsl,imx8mq-pinctrl.yaml even if it complains.
>
> The issue is that 'fsl,pins' is problematic for the new dtb decoding
> because it has a variable definition in terms of matrix bounds as each
> i.MX platform has its own length (typ 5 or 6). The tools try to work
> around it by figuring out which size fits. That works until there are
> multiple answers which seems to be what's happening here.
>
> The easiest solution I think is to just strip the constraints in
> occurances of this property. I'll look into that.
This is now fixed in the dt-schema main branch.
Rob
On 06/07/2022 16:11, Rob Herring wrote:
>>> The fsl,imx8mq-pinctrl.yaml should be correct and I don't see the reason
>>> why dtschema complains in some of the entries. It's like one define was
>>> not correct... I'll take a look at this later, but anyway keep the same
>>> as fsl,imx8mq-pinctrl.yaml even if it complains.
>>
>> The issue is that 'fsl,pins' is problematic for the new dtb decoding
>> because it has a variable definition in terms of matrix bounds as each
>> i.MX platform has its own length (typ 5 or 6). The tools try to work
>> around it by figuring out which size fits. That works until there are
>> multiple answers which seems to be what's happening here.
>>
>> The easiest solution I think is to just strip the constraints in
>> occurances of this property. I'll look into that.
>
> This is now fixed in the dt-schema main branch.
Great, thanks!
Best regards,
Krzysztof