dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML
@ 2021-01-15 22:23 Laurent Pinchart
  2021-01-15 22:23 ` [PATCH v3 1/3] dt-bindings: display: mxsfb: Convert binding " Laurent Pinchart
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Laurent Pinchart @ 2021-01-15 22:23 UTC (permalink / raw)
  To: dri-devel
  Cc: Marek Vasut, devicetree, Martin Kepplinger, Rob Herring,
	Pengutronix Kernel Team, linux-arm-kernel

Hello,

This patch series has previously been posted as part of "[PATCH v2 0/7]
drm: mxsfb: Allow overriding bus width". I've split the DT bindings
conversion to a separate series as I believe they're ready, and Martin
has a patch that he would like to submit to the bindings.

All the patches have been acked, and changes to v2 are minor. Rob, could
you take this through your tree ?

Laurent Pinchart (2):
  dt-bindings: display: mxsfb: Convert binding to YAML
  dt-bindings: display: mxsfb: Add and fix compatible strings

Marek Vasut (1):
  dt-bindings: display: mxsfb: Add compatible for i.MX8MM

 .../bindings/display/fsl,lcdif.yaml           | 110 ++++++++++++++++++
 .../devicetree/bindings/display/mxsfb.txt     |  87 --------------
 MAINTAINERS                                   |   2 +-
 3 files changed, 111 insertions(+), 88 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/fsl,lcdif.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/mxsfb.txt

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/3] dt-bindings: display: mxsfb: Convert binding to YAML
  2021-01-15 22:23 [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML Laurent Pinchart
@ 2021-01-15 22:23 ` Laurent Pinchart
  2021-01-15 22:23 ` [PATCH v3 2/3] dt-bindings: display: mxsfb: Add and fix compatible strings Laurent Pinchart
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2021-01-15 22:23 UTC (permalink / raw)
  To: dri-devel
  Cc: Marek Vasut, devicetree, Martin Kepplinger, Rob Herring,
	Pengutronix Kernel Team, linux-arm-kernel

Convert the mxsfb binding to YAML. The deprecated binding is dropped, as
neither the DT sources nor the driver support it anymore. The converted
binding is named fsl,lcdif.yaml to match the usual bindings naming
scheme.

The compatible strings are messy, and DT sources use different kinds of
combination of documented and undocumented values. Keep it simple for
now, and update the example to make it valid. Aligning the binding with
the existing DT sources will be performed separately.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Rob Herring <robh@kernel.org>
--
Changes since v2:

- Use OF graph schema

Changes since v1:

- Drop unneeded quotes in string
- Replace minItems with maxItems in conditional check
- Add blank line before ...
- Squash the rename in this commit
---
 .../bindings/display/fsl,lcdif.yaml           | 101 ++++++++++++++++++
 .../devicetree/bindings/display/mxsfb.txt     |  87 ---------------
 MAINTAINERS                                   |   2 +-
 3 files changed, 102 insertions(+), 88 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/fsl,lcdif.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/mxsfb.txt

diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
new file mode 100644
index 000000000000..bbd47d80d253
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
@@ -0,0 +1,101 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/fsl,lcdif.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale/NXP i.MX LCD Interface (LCDIF)
+
+maintainers:
+  - Marek Vasut <marex@denx.de>
+  - Stefan Agner <stefan@agner.ch>
+
+description: |
+  (e)LCDIF display controller found in the Freescale/NXP i.MX SoCs.
+
+properties:
+  compatible:
+    enum:
+      - fsl,imx23-lcdif
+      - fsl,imx28-lcdif
+      - fsl,imx6sx-lcdif
+      - fsl,imx8mq-lcdif
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Pixel clock
+      - description: Bus clock
+      - description: Display AXI clock
+    minItems: 1
+
+  clock-names:
+    items:
+      - const: pix
+      - const: axi
+      - const: disp_axi
+    minItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  port:
+    $ref: /schemas/graph.yaml#/properties/port
+    description: The LCDIF output port
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - interrupts
+  - port
+
+additionalProperties: false
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx6sx-lcdif
+    then:
+      properties:
+        clocks:
+          minItems: 2
+          maxItems: 3
+        clock-names:
+          minItems: 2
+          maxItems: 3
+      required:
+        - clock-names
+    else:
+      properties:
+        clocks:
+          maxItems: 1
+        clock-names:
+          maxItems: 1
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx6sx-clock.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    display-controller@2220000 {
+        compatible = "fsl,imx6sx-lcdif";
+        reg = <0x02220000 0x4000>;
+        interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
+                 <&clks IMX6SX_CLK_LCDIF_APB>,
+                 <&clks IMX6SX_CLK_DISPLAY_AXI>;
+        clock-names = "pix", "axi", "disp_axi";
+
+        port {
+            endpoint {
+                remote-endpoint = <&panel_in>;
+            };
+        };
+    };
+
+...
diff --git a/Documentation/devicetree/bindings/display/mxsfb.txt b/Documentation/devicetree/bindings/display/mxsfb.txt
deleted file mode 100644
index c985871c46b3..000000000000
--- a/Documentation/devicetree/bindings/display/mxsfb.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-* Freescale MXS LCD Interface (LCDIF)
-
-New bindings:
-=============
-Required properties:
-- compatible:	Should be "fsl,imx23-lcdif" for i.MX23.
-		Should be "fsl,imx28-lcdif" for i.MX28.
-		Should be "fsl,imx6sx-lcdif" for i.MX6SX.
-		Should be "fsl,imx8mq-lcdif" for i.MX8MQ.
-- reg:		Address and length of the register set for LCDIF
-- interrupts:	Should contain LCDIF interrupt
-- clocks:	A list of phandle + clock-specifier pairs, one for each
-		entry in 'clock-names'.
-- clock-names:	A list of clock names. For MXSFB it should contain:
-    - "pix" for the LCDIF block clock
-    - (MX6SX-only) "axi", "disp_axi" for the bus interface clock
-
-Required sub-nodes:
-  - port: The connection to an encoder chip.
-
-Example:
-
-	lcdif1: display-controller@2220000 {
-		compatible = "fsl,imx6sx-lcdif", "fsl,imx28-lcdif";
-		reg = <0x02220000 0x4000>;
-		interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&clks IMX6SX_CLK_LCDIF1_PIX>,
-			 <&clks IMX6SX_CLK_LCDIF_APB>,
-			 <&clks IMX6SX_CLK_DISPLAY_AXI>;
-		clock-names = "pix", "axi", "disp_axi";
-
-		port {
-			parallel_out: endpoint {
-				remote-endpoint = <&panel_in_parallel>;
-			};
-		};
-	};
-
-Deprecated bindings:
-====================
-Required properties:
-- compatible:	Should be "fsl,imx23-lcdif" for i.MX23.
-		Should be "fsl,imx28-lcdif" for i.MX28.
-- reg:		Address and length of the register set for LCDIF
-- interrupts:	Should contain LCDIF interrupts
-- display:	phandle to display node (see below for details)
-
-* display node
-
-Required properties:
-- bits-per-pixel:	<16> for RGB565, <32> for RGB888/666.
-- bus-width:		number of data lines.  Could be <8>, <16>, <18> or <24>.
-
-Required sub-node:
-- display-timings:	Refer to binding doc display-timing.txt for details.
-
-Examples:
-
-lcdif@80030000 {
-	compatible = "fsl,imx28-lcdif";
-	reg = <0x80030000 2000>;
-	interrupts = <38 86>;
-
-	display: display {
-		bits-per-pixel = <32>;
-		bus-width = <24>;
-
-		display-timings {
-			native-mode = <&timing0>;
-			timing0: timing0 {
-				clock-frequency = <33500000>;
-				hactive = <800>;
-				vactive = <480>;
-				hfront-porch = <164>;
-				hback-porch = <89>;
-				hsync-len = <10>;
-				vback-porch = <23>;
-				vfront-porch = <10>;
-				vsync-len = <10>;
-				hsync-active = <0>;
-				vsync-active = <0>;
-				de-active = <1>;
-				pixelclk-active = <0>;
-			};
-		};
-	};
-};
diff --git a/MAINTAINERS b/MAINTAINERS
index d082757ca672..9d241b832aae 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12180,7 +12180,7 @@ M:	Stefan Agner <stefan@agner.ch>
 L:	dri-devel@lists.freedesktop.org
 S:	Supported
 T:	git git://anongit.freedesktop.org/drm/drm-misc
-F:	Documentation/devicetree/bindings/display/mxsfb.txt
+F:	Documentation/devicetree/bindings/display/fsl,lcdif.yaml
 F:	drivers/gpu/drm/mxsfb/
 
 MYLEX DAC960 PCI RAID Controller
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/3] dt-bindings: display: mxsfb: Add and fix compatible strings
  2021-01-15 22:23 [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML Laurent Pinchart
  2021-01-15 22:23 ` [PATCH v3 1/3] dt-bindings: display: mxsfb: Convert binding " Laurent Pinchart
@ 2021-01-15 22:23 ` Laurent Pinchart
  2021-01-15 22:23 ` [PATCH v3 3/3] dt-bindings: display: mxsfb: Add compatible for i.MX8MM Laurent Pinchart
  2021-01-22 15:06 ` [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML Rob Herring
  3 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2021-01-15 22:23 UTC (permalink / raw)
  To: dri-devel
  Cc: Marek Vasut, devicetree, Martin Kepplinger, Rob Herring,
	Pengutronix Kernel Team, linux-arm-kernel

Additional compatible strings have been added in DT source for the
i.MX6SL, i.MX6SLL, i.MX6UL and i.MX7D without updating the bindings.
Most of the upstream DT sources use the fsl,imx28-lcdif compatible
string, which mostly predates the realization that the LCDIF in the
i.MX6 and newer SoCs have extra features compared to the i.MX28.

Update the bindings to add the missing compatible strings, with the
correct fallback values. This fails to validate some of the upstream DT
sources. Instead of adding the incorrect compatible fallback to the
binding, the sources should be updated separately.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes since v2:

- Fix indentation under items too

Changes since v1:

- Fix indentation under enum
---
 .../devicetree/bindings/display/fsl,lcdif.yaml | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
index bbd47d80d253..4fc24d482b1c 100644
--- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
+++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
@@ -15,11 +15,19 @@ description: |
 
 properties:
   compatible:
-    enum:
-      - fsl,imx23-lcdif
-      - fsl,imx28-lcdif
-      - fsl,imx6sx-lcdif
-      - fsl,imx8mq-lcdif
+    oneOf:
+      - enum:
+          - fsl,imx23-lcdif
+          - fsl,imx28-lcdif
+          - fsl,imx6sx-lcdif
+      - items:
+          - enum:
+              - fsl,imx6sl-lcdif
+              - fsl,imx6sll-lcdif
+              - fsl,imx6ul-lcdif
+              - fsl,imx7d-lcdif
+              - fsl,imx8mq-lcdif
+          - const: fsl,imx6sx-lcdif
 
   reg:
     maxItems: 1
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 3/3] dt-bindings: display: mxsfb: Add compatible for i.MX8MM
  2021-01-15 22:23 [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML Laurent Pinchart
  2021-01-15 22:23 ` [PATCH v3 1/3] dt-bindings: display: mxsfb: Convert binding " Laurent Pinchart
  2021-01-15 22:23 ` [PATCH v3 2/3] dt-bindings: display: mxsfb: Add and fix compatible strings Laurent Pinchart
@ 2021-01-15 22:23 ` Laurent Pinchart
  2021-01-22 15:06 ` [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML Rob Herring
  3 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2021-01-15 22:23 UTC (permalink / raw)
  To: dri-devel
  Cc: Marek Vasut, devicetree, Martin Kepplinger, Shawn Guo,
	Guido Günther, Rob Herring, NXP Linux Team,
	Pengutronix Kernel Team, linux-arm-kernel

From: Marek Vasut <marex@denx.de>

NXP's i.MX8MM has an LCDIF as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
Changes since v1:

- Rebased on top of the YAML conversion

Cc: Fabio Estevam <festevam@gmail.com>
Cc: Guido Günther <agx@sigxcpu.org>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Shawn Guo <shawnguo@kernel.org>
---
 Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
index 4fc24d482b1c..a4c3064c778c 100644
--- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
+++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
@@ -26,6 +26,7 @@ properties:
               - fsl,imx6sll-lcdif
               - fsl,imx6ul-lcdif
               - fsl,imx7d-lcdif
+              - fsl,imx8mm-lcdif
               - fsl,imx8mq-lcdif
           - const: fsl,imx6sx-lcdif
 
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML
  2021-01-15 22:23 [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML Laurent Pinchart
                   ` (2 preceding siblings ...)
  2021-01-15 22:23 ` [PATCH v3 3/3] dt-bindings: display: mxsfb: Add compatible for i.MX8MM Laurent Pinchart
@ 2021-01-22 15:06 ` Rob Herring
  3 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-01-22 15:06 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Marek Vasut, devicetree, Martin Kepplinger, dri-devel,
	Pengutronix Kernel Team, linux-arm-kernel

On Sat, Jan 16, 2021 at 12:23:01AM +0200, Laurent Pinchart wrote:
> Hello,
> 
> This patch series has previously been posted as part of "[PATCH v2 0/7]
> drm: mxsfb: Allow overriding bus width". I've split the DT bindings
> conversion to a separate series as I believe they're ready, and Martin
> has a patch that he would like to submit to the bindings.
> 
> All the patches have been acked, and changes to v2 are minor. Rob, could
> you take this through your tree ?

Better to go thru drm-misc-next given other changes coming, so I applied 
the series there.

Rob
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-22 15:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 22:23 [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML Laurent Pinchart
2021-01-15 22:23 ` [PATCH v3 1/3] dt-bindings: display: mxsfb: Convert binding " Laurent Pinchart
2021-01-15 22:23 ` [PATCH v3 2/3] dt-bindings: display: mxsfb: Add and fix compatible strings Laurent Pinchart
2021-01-15 22:23 ` [PATCH v3 3/3] dt-bindings: display: mxsfb: Add compatible for i.MX8MM Laurent Pinchart
2021-01-22 15:06 ` [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).