Skip to contentSkip to conversation

dt-bindings: display: bridge: ldb: Adjust imx6sx entries

PATCH Superseded Fabio Estevam 4 participants 13 messages May 22, 2023

Subsystems (8)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v5 1/4 dt-bindings: display: bridge: ldb: Adjust imx6sx entries

From: Fabio Estevam <[email protected]>

On the i.MX6SX there is a single entry for 'reg' and 'reg-names', so add some logic to reflect that.

---
Changes since v4:
- Replaced items: with const: for the single item (Conor)

 .../bindings/display/bridge/fsl,ldb.yaml      | 26 ++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/display/bridge/fsl,ldb.yaml +23 -3
index 07388bf2b90d..d97064140547 100644
@@ -28,12 +28,12 @@ properties:
     const: ldb
 
   reg:
+    minItems: 1
     maxItems: 2
 
   reg-names:
-    items:
-      - const: ldb
-      - const: lvds
+    minItems: 1
+    maxItems: 2
 
   ports:
     $ref: /schemas/graph.yaml#/properties/ports
@@ -74,6 +74,26 @@ allOf:
           properties:
             port@2: false
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx6sx-ldb
+    then:
+      properties:
+        reg:
+          maxItems: 1
+        reg-names:
+           const: ldb
+    else:
+      properties:
+        reg:
+          minItems: 2
+        reg-names:
+          items:
+            - const: ldb
+            - const: lvds
+
 additionalProperties: false
 
 examples:
Signature · 1 line
2.34.1
author reviewer
#1 lore raw

PATCH v5 2/4 dt-bindings: soc: Add i.MX6SX General Purpose Register

From: Fabio Estevam <[email protected]>

The i.MX6SX General Purpose Registers is a set of register that serves various different purposes and in particular, IOMUXC_GPR_GPR6, at offset 0x18, can be used to configure the LDB block.

---
Changes since v4:
- Renamed to syscon@20e4000 (Conor).

 .../bindings/soc/imx/fsl,imx6sx-gpr.yaml      | 84 +++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml
Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml new file +84 -0
new file mode 100644
index 000000000000..22777ecfb56b
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/imx/fsl,imx6sx-gpr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX6SX General Purpose Register
+
+maintainers:
+  - Fabio Estevam <[email protected]>
+
+description:
+  The i.MX6SX General Purpose Registers is a set of register that serves
+  for various purposes and in particular, IOMUXC_GPR_GPR6, at offset 0x18,
+  can be used to configure the LDB block.
+
+properties:
+  compatible:
+    items:
+      - const: fsl,imx6sx-iomuxc-gpr
+      - const: fsl,imx6q-iomuxc-gpr
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  bridge@18:
+    type: object
+    $ref: /schemas/display/bridge/fsl,ldb.yaml#
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx6sx-clock.h>
+
+    syscon@20e4000 {
+        compatible = "fsl,imx6sx-iomuxc-gpr", "fsl,imx6q-iomuxc-gpr", "syscon";
+        reg = <0x020e4000 0x4000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        bridge@18 {
+            compatible = "fsl,imx6sx-ldb";
+            reg = <0x18 0x4>;
+            reg-names = "ldb";
+            clocks = <&clks IMX6SX_CLK_LDB_DI0>;
+            clock-names = "ldb";
+
+            ports {
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                port@0 {
+                    reg = <0>;
+
+                    ldb_from_lcdif1: endpoint {
+                        remote-endpoint = <&lcdif1_to_ldb>;
+                    };
+                };
+
+               port@1 {
+                   reg = <1>;
+
+                   ldb_lvds_ch0: endpoint {
+                   };
+               };
+            };
+        };
+    };
+...
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v5 2/4] dt-bindings: soc: Add i.MX6SX General Purpose Register

Quoted 33 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

The i.MX6SX General Purpose Registers is a set of register that serves various different purposes and in particular, IOMUXC_GPR_GPR6, at offset 0x18, can be used to configure the LDB block.

---
Changes since v4:
- Renamed to syscon@20e4000 (Conor).

  .../bindings/soc/imx/fsl,imx6sx-gpr.yaml      | 84 +++++++++++++++++++
  1 file changed, 84 insertions(+)

create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml

Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml new file +12 -0
new file mode 100644
index 000000000000..22777ecfb56b
@@ -0,0 +1,84 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/imx/fsl,imx6sx-gpr.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP i.MX6SX General Purpose Register
+
+maintainers:
+  - Fabio Estevam <[email protected]>
+
+description:

Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml line 22

Quoted 10 lines
Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml new file +10 -0
+  The i.MX6SX General Purpose Registers is a set of register that serves
+  for various purposes and in particular, IOMUXC_GPR_GPR6, at offset 0x18,
+  can be used to configure the LDB block.
+
+properties:
+  compatible:
+    items:
+      - const: fsl,imx6sx-iomuxc-gpr
+      - const: fsl,imx6q-iomuxc-gpr
+      - const: syscon

Take a look at MX6Q and notice how the iomuxc and GPR register sets share the same base address . That's different on MX6SX where they are separate. So I think this binding should be specific to MX6SX ONLY and for MX6Q the subnode probing should be handled in the IOMUXC driver instead , i.e. drop the fsl,imx6q-iomuxc-gpr here and in imx6sx.dtsi .

$ git grep -A 2 @20e0000 arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/boot/dts/imx6qdl.dtsi:                 gpr: iomuxc-gpr@20e0000 {
arch/arm/boot/dts/imx6qdl.dtsi-                         compatible = "fsl,imx6q-iomuxc-gpr", "syscon", "simple-mfd";
arch/arm/boot/dts/imx6qdl.dtsi-                         reg = <0x20e0000 0x38>;
--
arch/arm/boot/dts/imx6qdl.dtsi:                 iomuxc: pinctrl@20e0000 {
arch/arm/boot/dts/imx6qdl.dtsi-                         compatible = "fsl,imx6dl-iomuxc", "fsl,imx6q-iomuxc";
arch/arm/boot/dts/imx6qdl.dtsi-                         reg = <0x20e0000 0x4000>;
#3 lore raw

Re: [PATCH v5 2/4] dt-bindings: soc: Add i.MX6SX General Purpose Register

Hi Marek,

Quoted 6 lines · Marek Vasut

Take a look at MX6Q and notice how the iomuxc and GPR register sets share the same base address . That's different on MX6SX where they are separate. So I think this binding should be specific to MX6SX ONLY and for MX6Q the subnode probing should be handled in the IOMUXC driver instead , i.e. drop the fsl,imx6q-iomuxc-gpr here and in imx6sx.dtsi .

Quoted 11 lines
$ git grep -A 2 @20e0000 arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/boot/dts/imx6qdl.dtsi:                 gpr: iomuxc-gpr@20e0000 {
arch/arm/boot/dts/imx6qdl.dtsi-                         compatible =
"fsl,imx6q-iomuxc-gpr", "syscon", "simple-mfd";
arch/arm/boot/dts/imx6qdl.dtsi-                         reg = <0x20e0000 0x38>;
--
arch/arm/boot/dts/imx6qdl.dtsi:                 iomuxc: pinctrl@20e0000 {
arch/arm/boot/dts/imx6qdl.dtsi-                         compatible =
"fsl,imx6dl-iomuxc", "fsl,imx6q-iomuxc";
arch/arm/boot/dts/imx6qdl.dtsi-                         reg =
<0x20e0000 0x4000>;

Removing fsl,imx6q-iomuxc-gpr causes PCI probe issue on imx6sx as the driver searches for "fsl,imx6q-iomuxc-gpr":

static const struct imx6_pcie_drvdata drvdata[] = {
         ....
	[IMX6SX] = {
		.variant = IMX6SX,
		.flags = IMX6_PCIE_FLAG_IMX6_PHY |
			 IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE |
			 IMX6_PCIE_FLAG_SUPPORTS_SUSPEND,
		.gpr = "fsl,imx6q-iomuxc-gpr",
# dmesg | grep pci
[    0.260212] imx6q-pcie 8ffc000.pcie: unable to find iomuxc registers
#4 lore raw

Re: [PATCH v5 2/4] dt-bindings: soc: Add i.MX6SX General Purpose Register

Quoted 35 lines · Fabio Estevam

Hi Marek,

Quoted 6 lines · Marek Vasut

Take a look at MX6Q and notice how the iomuxc and GPR register sets share the same base address . That's different on MX6SX where they are separate. So I think this binding should be specific to MX6SX ONLY and for MX6Q the subnode probing should be handled in the IOMUXC driver instead , i.e. drop the fsl,imx6q-iomuxc-gpr here and in imx6sx.dtsi .

Quoted 11 lines
$ git grep -A 2 @20e0000 arch/arm/boot/dts/imx6qdl.dtsi
arch/arm/boot/dts/imx6qdl.dtsi:                 gpr: iomuxc-gpr@20e0000 {
arch/arm/boot/dts/imx6qdl.dtsi-                         compatible =
"fsl,imx6q-iomuxc-gpr", "syscon", "simple-mfd";
arch/arm/boot/dts/imx6qdl.dtsi-                         reg = <0x20e0000 0x38>;
Signature · 5 lines
arch/arm/boot/dts/imx6qdl.dtsi:                 iomuxc: pinctrl@20e0000 {
arch/arm/boot/dts/imx6qdl.dtsi-                         compatible =
"fsl,imx6dl-iomuxc", "fsl,imx6q-iomuxc";
arch/arm/boot/dts/imx6qdl.dtsi-                         reg =
<0x20e0000 0x4000>;

Removing fsl,imx6q-iomuxc-gpr causes PCI probe issue on imx6sx as the driver searches for "fsl,imx6q-iomuxc-gpr":

static const struct imx6_pcie_drvdata drvdata[] = {
         ....
    [IMX6SX] = {
        .variant = IMX6SX,
        .flags = IMX6_PCIE_FLAG_IMX6_PHY | IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE | IMX6_PCIE_FLAG_SUPPORTS_SUSPEND, .gpr = "fsl,imx6q-iomuxc-gpr",

Quoted 2 lines
# dmesg | grep pci
[    0.260212] imx6q-pcie 8ffc000.pcie: unable to find iomuxc registers

I would say, this should use the mx6sx compatible string for the GPR look up (or even use phandle ?)

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer
#5 lore raw

Re: [PATCH v5 2/4] dt-bindings: soc: Add i.MX6SX General Purpose Register

In reply to Fabio Estevam
Quoted 6 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

The i.MX6SX General Purpose Registers is a set of register that serves various different purposes and in particular, IOMUXC_GPR_GPR6, at offset 0x18, can be used to configure the LDB block.

Quoted 9 lines

---
Changes since v4:
- Renamed to syscon@20e4000 (Conor).

 .../bindings/soc/imx/fsl,imx6sx-gpr.yaml      | 84 +++++++++++++++++++
 1 file changed, 84 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.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/dt-review-ci/linux/Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.example.dtb: syscon@20e4000: bridge@18:compatible:0: 'fsl,imx6sx-ldb' is not one of ['fsl,imx8mp-ldb', 'fsl,imx93-ldb']
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.example.dtb: syscon@20e4000: bridge@18:reg: [[24, 4]] is too short
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.example.dtb: syscon@20e4000: bridge@18:reg-names: ['ldb'] is too short
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.example.dtb: syscon@20e4000: bridge@18: Unevaluated properties are not allowed ('compatible', 'reg', 'reg-names' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.yaml
Documentation/devicetree/bindings/soc/imx/fsl,imx6sx-gpr.example.dtb: /example-0/syscon@20e4000/bridge@18: failed to match any schema with compatible: ['fsl,imx6sx-ldb']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

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 after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

author reviewer
#6 lore raw

PATCH v5 3/4 ARM: dts: imx6sx: Add LDB support

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

i.MX6SX has an LVDS controller that is connected to the eLCDIF.

Add support for it.

---
Changes since v4:
- None.

 arch/arm/boot/dts/imx6sx.dtsi | 39 +++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
arch/arm/boot/dts/imx6sx.dtsi +39 -0
index 4233943a1cca..442106565025 100644
@@ -844,7 +844,38 @@ iomuxc: pinctrl@20e0000 {
 			gpr: iomuxc-gpr@20e4000 {
 				compatible = "fsl,imx6sx-iomuxc-gpr",
 					     "fsl,imx6q-iomuxc-gpr", "syscon";
+				#address-cells = <1>;
+				#size-cells = <1>;
 				reg = <0x020e4000 0x4000>;
+
+				lvds_bridge: bridge@18 {
+					compatible = "fsl,imx6sx-ldb";
+					reg = <0x18 0x4>;
+					reg-names = "ldb";
+					clocks = <&clks IMX6SX_CLK_LDB_DI0>;
+					clock-names = "ldb";
+					status = "disabled";
+
+					ports {
+						#address-cells = <1>;
+						#size-cells = <0>;
+
+						port@0 {
+							reg = <0>;
+
+							ldb_from_lcdif1: endpoint {
+								remote-endpoint = <&lcdif1_to_ldb>;
+							};
+						};
+
+						port@1 {
+							reg = <1>;
+
+							ldb_lvds_ch0: endpoint {
+							};
+						};
+					};
+				};
 			};
 
 			sdma: dma-controller@20ec000 {
@@ -1278,6 +1309,14 @@ lcdif1: lcdif@2220000 {
 					clock-names = "pix", "axi", "disp_axi";
 					power-domains = <&pd_disp>;
 					status = "disabled";
+
+					ports {
+						port {
+							lcdif1_to_ldb: endpoint {
+								remote-endpoint = <&ldb_from_lcdif1>;
+							};
+						};
+					};
 				};
 
 				lcdif2: lcdif@2224000 {
Signature · 1 line
2.34.1
#7 lore raw

Re: [PATCH v5 3/4] ARM: dts: imx6sx: Add LDB support

Quoted 19 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

i.MX6SX has an LVDS controller that is connected to the eLCDIF.

Add support for it.

---
Changes since v4:
- None.

  arch/arm/boot/dts/imx6sx.dtsi | 39 +++++++++++++++++++++++++++++++++++
  1 file changed, 39 insertions(+)
arch/arm/boot/dts/imx6sx.dtsi +0 -0
index 4233943a1cca..442106565025 100644

arch/arm/boot/dts/imx6sx.dtsi iomuxc: pinctrl@20e0000 { · line 846

Quoted 3 lines
arch/arm/boot/dts/imx6sx.dtsi +0 -0
@@ -844,7 +844,38 @@ iomuxc: pinctrl@20e0000 {
  			gpr: iomuxc-gpr@20e4000 {
  				compatible = "fsl,imx6sx-iomuxc-gpr",
  					     "fsl,imx6q-iomuxc-gpr", "syscon";

Maybe this "fsl,imx6q-iomuxc-gpr" should be dropped here.

#8 lore raw

Re: [PATCH v5 3/4] ARM: dts: imx6sx: Add LDB support

Quoted 10 lines · Marek Vasut

arch/arm/boot/dts/imx6sx.dtsi iomuxc: pinctrl@20e0000 { · line 846

Quoted 8 lines
arch/arm/boot/dts/imx6sx.dtsi +0 -0
index 4233943a1cca..442106565025 100644
@@ -844,7 +844,38 @@ iomuxc: pinctrl@20e0000 {
  			gpr: iomuxc-gpr@20e4000 {
  				compatible = "fsl,imx6sx-iomuxc-gpr",
  					     "fsl,imx6q-iomuxc-gpr", "syscon";

Maybe this "fsl,imx6q-iomuxc-gpr" should be dropped here.

Cannot remove it as it breaks PCI:

imx6q-pcie 8ffc000.pcie: unable to find iomuxc registers

#9 lore raw

Re: [PATCH v5 3/4] ARM: dts: imx6sx: Add LDB support

Quoted 13 lines · Fabio Estevam
Quoted 10 lines · Marek Vasut

arch/arm/boot/dts/imx6sx.dtsi iomuxc: pinctrl@20e0000 { · line 846

Quoted 8 lines
arch/arm/boot/dts/imx6sx.dtsi +0 -0
index 4233943a1cca..442106565025 100644
@@ -844,7 +844,38 @@ iomuxc: pinctrl@20e0000 {
               gpr: iomuxc-gpr@20e4000 {
                   compatible = "fsl,imx6sx-iomuxc-gpr",
                            "fsl,imx6q-iomuxc-gpr", "syscon";

Maybe this "fsl,imx6q-iomuxc-gpr" should be dropped here.

Quoted 3 lines

Cannot remove it as it breaks PCI:

imx6q-pcie 8ffc000.pcie: unable to find iomuxc registers

This might help?

drivers/pci/controller/dwc/pci-imx6.c +1 -1
index 52906f999f2bb..4803e3c9ee37c 100644
@@ -1460,7 +1460,7 @@ static const struct imx6_pcie_drvdata drvdata[] = {
                .flags = IMX6_PCIE_FLAG_IMX6_PHY |
                         IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE |
                         IMX6_PCIE_FLAG_SUPPORTS_SUSPEND,
-               .gpr = "fsl,imx6q-iomuxc-gpr",
+               .gpr = "fsl,imx6sx-iomuxc-gpr",
        },
        [IMX6QP] = {
                .variant = IMX6QP,
author reviewer
#10 lore raw

PATCH v5 4/4 soc: imx: imx6sx-gpr: Introduce a GPR driver

In reply to Fabio Estevam

From: Fabio Estevam <[email protected]>

The motivation for this imx6sx-gpr driver is to allow describing the LVDS LDB bridge as a GPR subnode.

---
Changes since v4:
- None.

 drivers/soc/imx/Makefile     |  1 +
 drivers/soc/imx/imx6sx-gpr.c | 29 +++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 drivers/soc/imx/imx6sx-gpr.c
drivers/soc/imx/Makefile +1 -0
index a28c44a1f16a..9840d4c41015 100644
@@ -4,6 +4,7 @@ obj-$(CONFIG_ARCH_MXC) += soc-imx.o
 endif
 obj-$(CONFIG_HAVE_IMX_GPC) += gpc.o
 obj-$(CONFIG_IMX_GPCV2_PM_DOMAINS) += gpcv2.o
+obj-$(CONFIG_SOC_IMX6SX) += imx6sx-gpr.o
 obj-$(CONFIG_SOC_IMX8M) += soc-imx8m.o
 obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8m-blk-ctrl.o
 obj-$(CONFIG_IMX8M_BLK_CTRL) += imx8mp-blk-ctrl.o
drivers/soc/imx/imx6sx-gpr.c new file +29 -0
new file mode 100644
index 000000000000..7684acbe43ff
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/module.h>
+#include <linux/of_platform.h>
+#include <linux/platform_device.h>
+
+static int imx6sx_gpr_probe(struct platform_device *pdev)
+{
+	return devm_of_platform_populate(&pdev->dev);
+}
+
+static const struct of_device_id imx6sx_gpr_ids[] = {
+	{ .compatible = "fsl,imx6sx-iomuxc-gpr" },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, imx6sx_gpr_ids);
+
+static struct platform_driver imx6sx_gpr_driver = {
+	.driver = {
+		.name	= "imx6sx_gpr",
+		.of_match_table = imx6sx_gpr_ids,
+	},
+	.probe = imx6sx_gpr_probe,
+};
+module_platform_driver(imx6sx_gpr_driver);
+
+MODULE_AUTHOR("Fabio Estevam <[email protected]>");
+MODULE_DESCRIPTION("NXP i.MX6SX GPR driver");
+MODULE_LICENSE("GPL");
Signature · 1 line
2.34.1
#11 lore raw
In reply to Fabio Estevam
Quoted 38 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

On the i.MX6SX there is a single entry for 'reg' and 'reg-names', so add some logic to reflect that.

---
Changes since v4:
- Replaced items: with const: for the single item (Conor)

  .../bindings/display/bridge/fsl,ldb.yaml      | 26 ++++++++++++++++---
  1 file changed, 23 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/display/bridge/fsl,ldb.yaml +4 -3
index 07388bf2b90d..d97064140547 100644
@@ -28,12 +28,12 @@ properties:
      const: ldb
 
    reg:
+    minItems: 1
      maxItems: 2
 
    reg-names:
-    items:
-      - const: ldb
-      - const: lvds
+    minItems: 1
+    maxItems: 2
 
    ports:
      $ref: /schemas/graph.yaml#/properties/ports
@@ -74,6 +74,26 @@ allOf:
            properties:
              port@2: false
 
+  - if:

Documentation/devicetree/bindings/display/bridge/fsl,ldb.yaml allOf: · line 87

Quoted 10 lines
Documentation/devicetree/bindings/display/bridge/fsl,ldb.yaml +10 -0
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx6sx-ldb
+    then:
+      properties:
+        reg:
+          maxItems: 1
+        reg-names:
+           const: ldb

Can we drop the reg-names on MX6SX if we have reg maxItems=1 here ?

I think we can, but we need to retain that on the newer iMXes which have reg maxItems=2

maintainer
#12 lore raw
In reply to Fabio Estevam
Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

On the i.MX6SX there is a single entry for 'reg' and 'reg-names', so add some logic to reflect that.

Quoted 8 lines

---
Changes since v4:
- Replaced items: with const: for the single item (Conor)

 .../bindings/display/bridge/fsl,ldb.yaml      | 26 ++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

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:
./Documentation/devicetree/bindings/display/bridge/fsl,ldb.yaml:84:12: [warning] wrong indentation: expected 10 but found 11 (indentation)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

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 after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel