Skip to contentSkip to conversation

dt-bindings: Add macros for video interface bus types

PATCH Applied Laurent Pinchart 11 participants 34 messages Jun 15, 2022 – Jan 25, 2023

Subsystems (11)
lore
Share & tools
lore

Laurent Pinchart

author reviewer
#0 lore raw

v3 cover dt-bindings: Add macros for video interface bus types

Hello,

This small patch series is the result of me getting a bus-type numerical value wrong in a device tree file and spending too long debugging the issue. Hopefully there's nothing controversial here.

Compared to v2, the PARALLEL bus type came back to replace BT601, as it turned out that BT601 doesn't actually describe what is usually referred to as the parallel bus type. Patch 3/3 has been split in per-vendor patches at the request of Alexandre Torgue.

Laurent Pinchart (6):
dt-bindings: media: Add macros for video interface bus types
dt-bindings: Use new video interface bus type macros in examples
ARM: dts: freescale: Use new media bus type macros
ARM: dts: omap: Use new media bus type macros
ARM: dts: renesas: Use new media bus type macros
ARM: dts: stm32: Use new media bus type macros

 .../display/bridge/analogix,anx7625.yaml         |  1 +
 .../devicetree/bindings/media/i2c/mipi-ccs.yaml  |  3 ++-
 .../bindings/media/i2c/ovti,ov772x.yaml          |  3 ++-
 .../bindings/media/marvell,mmp2-ccic.yaml        |  3 ++-
 .../bindings/media/microchip,xisc.yaml           |  3 ++-
 .../devicetree/bindings/media/st,stm32-dcmi.yaml |  4 +++-
 arch/arm/boot/dts/imx6ul-14x14-evk.dtsi          |  4 +++-
 arch/arm/boot/dts/omap3-n900.dts                 |  5 +++--
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts  | 11 +++++++----
 .../r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi    |  4 +++-
 .../r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi    |  4 +++-
 arch/arm/boot/dts/stm32429i-eval.dts             |  3 ++-
 arch/arm/boot/dts/stm32mp157c-ev1.dts            |  3 ++-
 include/dt-bindings/media/video-interfaces.h     | 16 ++++++++++++++++
 14 files changed, 51 insertions(+), 16 deletions(-)
 create mode 100644 include/dt-bindings/media/video-interfaces.h

base-commit: b13baccc3850ca8b8cccbf8ed9912dbaa0fdf7f3

Signature · 3 lines
Regards,

Laurent Pinchart
author reviewer
#1 lore raw

PATCH v3 1/6 dt-bindings: media: Add macros for video interface bus types

Add a new dt-bindings/media/video-interfaces.h header that defines macros corresponding to the bus types from media/video-interfaces.yaml. This allows avoiding hardcoded constants in device tree sources.

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Dual-license under GPL-2.0-only or MIT
- Rename PARALLEL TO BT601

---
 include/dt-bindings/media/video-interfaces.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 include/dt-bindings/media/video-interfaces.h
include/dt-bindings/media/video-interfaces.h new file +16 -0
new file mode 100644
index 000000000000..68ac4e05e37f
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (C) 2022 Laurent Pinchart <[email protected]>
+ */
+
+#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__
+#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__
+
+#define MEDIA_BUS_TYPE_CSI2_CPHY		1
+#define MEDIA_BUS_TYPE_CSI1			2
+#define MEDIA_BUS_TYPE_CCP2			3
+#define MEDIA_BUS_TYPE_CSI2_DPHY		4
+#define MEDIA_BUS_TYPE_PARALLEL			5
+#define MEDIA_BUS_TYPE_BT656			6
+
+#endif /* __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ */
Signature · 3 lines
Regards,

Laurent Pinchart
maintainer Reviewed-by on v3 1/6
#2 lore raw

Re: [PATCH v3 1/6] dt-bindings: media: Add macros for video interface bus types

Quoted 10 lines · Laurent Pinchart

Add a new dt-bindings/media/video-interfaces.h header that defines macros corresponding to the bus types from media/video-interfaces.yaml. This allows avoiding hardcoded constants in device tree sources.

---
Changes since v2:

- Go back to PARALLEL

Quoted 9 lines

Changes since v1:

- Dual-license under GPL-2.0-only or MIT
- Rename PARALLEL TO BT601

---
 include/dt-bindings/media/video-interfaces.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 include/dt-bindings/media/video-interfaces.h
maintainer Reviewed-by on v3 1/6
#3 lore raw

Re: [PATCH v3 1/6] dt-bindings: media: Add macros for video interface bus types

In reply to Laurent Pinchart

Hi Laurent

Quoted 5 lines · Laurent Pinchart

Add a new dt-bindings/media/video-interfaces.h header that defines macros corresponding to the bus types from media/video-interfaces.yaml. This allows avoiding hardcoded constants in device tree sources.

Just putting a tag here as we have more flags to add here (in example the device orientation)

Quoted 41 lines

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Dual-license under GPL-2.0-only or MIT
- Rename PARALLEL TO BT601

---
 include/dt-bindings/media/video-interfaces.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 include/dt-bindings/media/video-interfaces.h
include/dt-bindings/media/video-interfaces.h new file +16 -1
new file mode 100644
index 000000000000..68ac4e05e37f
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (C) 2022 Laurent Pinchart <[email protected]>
+ */
+
+#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__
+#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__
+
+#define MEDIA_BUS_TYPE_CSI2_CPHY		1
+#define MEDIA_BUS_TYPE_CSI1			2
+#define MEDIA_BUS_TYPE_CCP2			3
+#define MEDIA_BUS_TYPE_CSI2_DPHY		4
+#define MEDIA_BUS_TYPE_PARALLEL			5
+#define MEDIA_BUS_TYPE_BT656			6
+
+#endif /* __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ */
--

Regards,

Laurent Pinchart

Reviewed-by on v3 1/6
#4 lore raw

Re: [PATCH v3 1/6] dt-bindings: media: Add macros for video interface bus types

In reply to Laurent Pinchart
Quoted 5 lines · Laurent Pinchart

Add a new dt-bindings/media/video-interfaces.h header that defines macros corresponding to the bus types from media/video-interfaces.yaml. This allows avoiding hardcoded constants in device tree sources.

Quoted 36 lines

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Dual-license under GPL-2.0-only or MIT
- Rename PARALLEL TO BT601

---
 include/dt-bindings/media/video-interfaces.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 include/dt-bindings/media/video-interfaces.h
include/dt-bindings/media/video-interfaces.h new file +16 -0
new file mode 100644
index 000000000000..68ac4e05e37f
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (C) 2022 Laurent Pinchart <[email protected]>
+ */
+
+#ifndef __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__
+#define __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__
+
+#define MEDIA_BUS_TYPE_CSI2_CPHY		1
+#define MEDIA_BUS_TYPE_CSI1			2
+#define MEDIA_BUS_TYPE_CCP2			3
+#define MEDIA_BUS_TYPE_CSI2_DPHY		4
+#define MEDIA_BUS_TYPE_PARALLEL			5
+#define MEDIA_BUS_TYPE_BT656			6
+
+#endif /* __DT_BINDINGS_MEDIA_VIDEO_INTERFACES_H__ */
author reviewer
#5 lore raw

PATCH v3 2/6 dt-bindings: Use new video interface bus type macros in examples

In reply to Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT binding examples.

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Rename PARALLEL to BT601

---
 .../devicetree/bindings/display/bridge/analogix,anx7625.yaml  | 1 +
 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml     | 3 ++-
 Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml  | 3 ++-
 .../devicetree/bindings/media/marvell,mmp2-ccic.yaml          | 3 ++-
 Documentation/devicetree/bindings/media/microchip,xisc.yaml   | 3 ++-
 Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml    | 4 +++-
 6 files changed, 12 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +1 -0
index 35a48515836e..b0e5585f93e2 100644
@@ -118,6 +118,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c0 {
         #address-cells = <1>;
Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml +2 -1
index 39395ea8c318..edde4201116f 100644
@@ -104,6 +104,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c2 {
         #address-cells = <1>;
@@ -124,7 +125,7 @@ examples:
                     remote-endpoint = <&csi2a_ep>;
                     link-frequencies = /bits/ 64 <199200000 210000000
                                                   499200000>;
-                    bus-type = <4>;
+                    bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
                 };
             };
         };
Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml +2 -1
index 44529425ce3a..161e6d598e1c 100644
@@ -105,6 +105,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c0 {
         #address-cells = <1>;
@@ -118,7 +119,7 @@ examples:
 
             port {
                 ov772x_0: endpoint {
-                    bus-type = <5>;
+                    bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                     vsync-active = <0>;
                     hsync-active = <0>;
                     pclk-sample = <0>;
Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml +2 -1
index b39b84c5f012..0e3478551e13 100644
@@ -68,6 +68,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/clock/marvell,mmp2.h>
+    #include <dt-bindings/media/video-interfaces.h>
     #include <dt-bindings/power/marvell,mmp2.h>
 
     camera@d420a000 {
@@ -83,7 +84,7 @@ examples:
       port {
         camera0_0: endpoint {
           remote-endpoint = <&ov7670_0>;
-          bus-type = <5>;      /* Parallel */
+          bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
           hsync-active = <1>;  /* Active high */
           vsync-active = <1>;  /* Active high */
           pclk-sample = <0>;   /* Falling */
Documentation/devicetree/bindings/media/microchip,xisc.yaml +2 -1
index 8b37fccab5e2..25f5f79d40ce 100644
@@ -106,6 +106,7 @@ examples:
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/clock/at91.h>
     #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     xisc: xisc@e1408000 {
         compatible = "microchip,sama7g5-isc";
@@ -118,7 +119,7 @@ examples:
 
         port {
                 xisc_in: endpoint {
-                       bus-type = <5>; /* Parallel */
+                       bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                        remote-endpoint = <&csi2dc_out>;
                        hsync-active = <1>;
                        vsync-active = <1>;
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +3 -1
index 9c1262a276b5..285c6075950a 100644
@@ -90,7 +90,9 @@ examples:
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/clock/stm32mp1-clks.h>
+    #include <dt-bindings/media/video-interfaces.h>
     #include <dt-bindings/reset/stm32mp1-resets.h>
+    #
     dcmi: dcmi@4c006000 {
         compatible = "st,stm32-dcmi";
         reg = <0x4c006000 0x400>;
@@ -104,7 +106,7 @@ examples:
         port {
              dcmi_0: endpoint {
                    remote-endpoint = <&ov5640_0>;
-                   bus-type = <5>;
+                   bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                    bus-width = <8>;
                    hsync-active = <0>;
                    vsync-active = <0>;
Signature · 3 lines
Regards,

Laurent Pinchart
maintainer Reviewed-by on v3 2/6
#6 lore raw

Re: [PATCH v3 2/6] dt-bindings: Use new video interface bus type macros in examples

Quoted 123 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT binding examples.

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Rename PARALLEL to BT601

---
 .../devicetree/bindings/display/bridge/analogix,anx7625.yaml  | 1 +
 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml     | 3 ++-
 Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml  | 3 ++-
 .../devicetree/bindings/media/marvell,mmp2-ccic.yaml          | 3 ++-
 Documentation/devicetree/bindings/media/microchip,xisc.yaml   | 3 ++-
 Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml    | 4 +++-
 6 files changed, 12 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +1 -0
index 35a48515836e..b0e5585f93e2 100644
@@ -118,6 +118,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c0 {
         #address-cells = <1>;
Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml +2 -1
index 39395ea8c318..edde4201116f 100644
@@ -104,6 +104,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c2 {
         #address-cells = <1>;
@@ -124,7 +125,7 @@ examples:
                     remote-endpoint = <&csi2a_ep>;
                     link-frequencies = /bits/ 64 <199200000 210000000
                                                   499200000>;
-                    bus-type = <4>;
+                    bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
                 };
             };
         };
Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml +2 -1
index 44529425ce3a..161e6d598e1c 100644
@@ -105,6 +105,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c0 {
         #address-cells = <1>;
@@ -118,7 +119,7 @@ examples:
 
             port {
                 ov772x_0: endpoint {
-                    bus-type = <5>;
+                    bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                     vsync-active = <0>;
                     hsync-active = <0>;
                     pclk-sample = <0>;
Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml +2 -1
index b39b84c5f012..0e3478551e13 100644
@@ -68,6 +68,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/clock/marvell,mmp2.h>
+    #include <dt-bindings/media/video-interfaces.h>
     #include <dt-bindings/power/marvell,mmp2.h>
 
     camera@d420a000 {
@@ -83,7 +84,7 @@ examples:
       port {
         camera0_0: endpoint {
           remote-endpoint = <&ov7670_0>;
-          bus-type = <5>;      /* Parallel */
+          bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
           hsync-active = <1>;  /* Active high */
           vsync-active = <1>;  /* Active high */
           pclk-sample = <0>;   /* Falling */
Documentation/devicetree/bindings/media/microchip,xisc.yaml +2 -1
index 8b37fccab5e2..25f5f79d40ce 100644
@@ -106,6 +106,7 @@ examples:
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/clock/at91.h>
     #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     xisc: xisc@e1408000 {
         compatible = "microchip,sama7g5-isc";
@@ -118,7 +119,7 @@ examples:
 
         port {
                 xisc_in: endpoint {
-                       bus-type = <5>; /* Parallel */
+                       bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                        remote-endpoint = <&csi2dc_out>;
                        hsync-active = <1>;
                        vsync-active = <1>;
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +0 -0
index 9c1262a276b5..285c6075950a 100644

Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml examples: · line 95

Quoted 6 lines
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +2 -0
@@ -90,7 +90,9 @@ examples:
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/clock/stm32mp1-clks.h>
+    #include <dt-bindings/media/video-interfaces.h>
     #include <dt-bindings/reset/stm32mp1-resets.h>
+    #

?

In any case,

Quoted 18 lines
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +1 -1
     dcmi: dcmi@4c006000 {
         compatible = "st,stm32-dcmi";
         reg = <0x4c006000 0x400>;
@@ -104,7 +106,7 @@ examples:
         port {
              dcmi_0: endpoint {
                    remote-endpoint = <&ov5640_0>;
-                   bus-type = <5>;
+                   bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                    bus-width = <8>;
                    hsync-active = <0>;
                    vsync-active = <0>;
Signature · 3 lines
Regards,

Laurent Pinchart
author reviewer
#7 lore raw

Re: [PATCH v3 2/6] dt-bindings: Use new video interface bus type macros in examples

Hi Rob,

Quoted 124 lines · Rob Herring
Quoted 123 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT binding examples.

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Rename PARALLEL to BT601

---
 .../devicetree/bindings/display/bridge/analogix,anx7625.yaml  | 1 +
 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml     | 3 ++-
 Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml  | 3 ++-
 .../devicetree/bindings/media/marvell,mmp2-ccic.yaml          | 3 ++-
 Documentation/devicetree/bindings/media/microchip,xisc.yaml   | 3 ++-
 Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml    | 4 +++-
 6 files changed, 12 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +1 -0
index 35a48515836e..b0e5585f93e2 100644
@@ -118,6 +118,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c0 {
         #address-cells = <1>;
Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml +2 -1
index 39395ea8c318..edde4201116f 100644
@@ -104,6 +104,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c2 {
         #address-cells = <1>;
@@ -124,7 +125,7 @@ examples:
                     remote-endpoint = <&csi2a_ep>;
                     link-frequencies = /bits/ 64 <199200000 210000000
                                                   499200000>;
-                    bus-type = <4>;
+                    bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
                 };
             };
         };
Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml +2 -1
index 44529425ce3a..161e6d598e1c 100644
@@ -105,6 +105,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c0 {
         #address-cells = <1>;
@@ -118,7 +119,7 @@ examples:
 
             port {
                 ov772x_0: endpoint {
-                    bus-type = <5>;
+                    bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                     vsync-active = <0>;
                     hsync-active = <0>;
                     pclk-sample = <0>;
Documentation/devicetree/bindings/media/marvell,mmp2-ccic.yaml +2 -1
index b39b84c5f012..0e3478551e13 100644
@@ -68,6 +68,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/clock/marvell,mmp2.h>
+    #include <dt-bindings/media/video-interfaces.h>
     #include <dt-bindings/power/marvell,mmp2.h>
 
     camera@d420a000 {
@@ -83,7 +84,7 @@ examples:
       port {
         camera0_0: endpoint {
           remote-endpoint = <&ov7670_0>;
-          bus-type = <5>;      /* Parallel */
+          bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
           hsync-active = <1>;  /* Active high */
           vsync-active = <1>;  /* Active high */
           pclk-sample = <0>;   /* Falling */
Documentation/devicetree/bindings/media/microchip,xisc.yaml +2 -1
index 8b37fccab5e2..25f5f79d40ce 100644
@@ -106,6 +106,7 @@ examples:
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/clock/at91.h>
     #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     xisc: xisc@e1408000 {
         compatible = "microchip,sama7g5-isc";
@@ -118,7 +119,7 @@ examples:
 
         port {
                 xisc_in: endpoint {
-                       bus-type = <5>; /* Parallel */
+                       bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                        remote-endpoint = <&csi2dc_out>;
                        hsync-active = <1>;
                        vsync-active = <1>;
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +0 -0
index 9c1262a276b5..285c6075950a 100644
@@ -90,7 +90,9 @@ examples:
Quoted 8 lines

Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml examples: · line 95

Quoted 6 lines
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +2 -0
   - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/clock/stm32mp1-clks.h>
+    #include <dt-bindings/media/video-interfaces.h>
     #include <dt-bindings/reset/stm32mp1-resets.h>
+    #

?

Oops. I'll blame vim :-) I wonder why I didn't catch that when running validation. I'll fix it in any case.

Quoted 16 lines

In any case,

Quoted 12 lines
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +1 -1
     dcmi: dcmi@4c006000 {
         compatible = "st,stm32-dcmi";
         reg = <0x4c006000 0x400>;
@@ -104,7 +106,7 @@ examples:
         port {
              dcmi_0: endpoint {
                    remote-endpoint = <&ov5640_0>;
-                   bus-type = <5>;
+                   bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
                    bus-width = <8>;
                    hsync-active = <0>;
                    vsync-active = <0>;
Signature · 3 lines
Regards,

Laurent Pinchart
#8 lore raw

Re: [PATCH v3 2/6] dt-bindings: Use new video interface bus type macros in examples

In reply to Laurent Pinchart

Hi Laurent,

Quoted 27 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT binding examples.

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Rename PARALLEL to BT601

---
 .../devicetree/bindings/display/bridge/analogix,anx7625.yaml  | 1 +
 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml     | 3 ++-
 Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml  | 3 ++-
 .../devicetree/bindings/media/marvell,mmp2-ccic.yaml          | 3 ++-
 Documentation/devicetree/bindings/media/microchip,xisc.yaml   | 3 ++-
 Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml    | 4 +++-
 6 files changed, 12 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +0 -0
index 35a48515836e..b0e5585f93e2 100644

Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml additionalProperties: false · line 124

Quoted 7 lines
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +1 -0
@@ -118,6 +118,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c0 {
         #address-cells = <1>;

The definition doesn't seem to be used here. Is there a need to include this?

I could drop this chunk while applying. There's just one trivial change elsewhere in this patch to make.

Signature · 3 lines
Kind regards,

Sakari Ailus
author reviewer
#9 lore raw

Re: [PATCH v3 2/6] dt-bindings: Use new video interface bus type macros in examples

Hi Sakari,

Quoted 33 lines · Sakari Ailus
Quoted 32 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT binding examples.

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Rename PARALLEL to BT601

---
 .../devicetree/bindings/display/bridge/analogix,anx7625.yaml  | 1 +
 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml     | 3 ++-
 Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml  | 3 ++-
 .../devicetree/bindings/media/marvell,mmp2-ccic.yaml          | 3 ++-
 Documentation/devicetree/bindings/media/microchip,xisc.yaml   | 3 ++-
 Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml    | 4 +++-
 6 files changed, 12 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +1 -0
index 35a48515836e..b0e5585f93e2 100644
@@ -118,6 +118,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
Quoted 5 lines

Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml additionalProperties: false · line 124

Quoted 2 lines
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +0 -0
     i2c0 {
         #address-cells = <1>;

The definition doesn't seem to be used here. Is there a need to include this?

There was, but the change that added bus-type to this binding got reverted in commit 979452fbc430 ("dt-bindings: drm/bridge: anx7625:
Revert DPI support") and I forgot to drop the header when rebasing.

Quoted 2 lines

I could drop this chunk while applying. There's just one trivial change elsewhere in this patch to make.

Please do :-)

Signature · 3 lines
Regards,

Laurent Pinchart
maintainer
#10 lore raw

Re: [PATCH v3 2/6] dt-bindings: Use new video interface bus type macros in examples

Hi Laurent,

Quoted 42 lines · Laurent Pinchart

Hi Sakari,

Quoted 33 lines · Sakari Ailus
Quoted 32 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT binding examples.

---
Changes since v2:

- Go back to PARALLEL

Changes since v1:

- Rename PARALLEL to BT601

---
 .../devicetree/bindings/display/bridge/analogix,anx7625.yaml  | 1 +
 Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml     | 3 ++-
 Documentation/devicetree/bindings/media/i2c/ovti,ov772x.yaml  | 3 ++-
 .../devicetree/bindings/media/marvell,mmp2-ccic.yaml          | 3 ++-
 Documentation/devicetree/bindings/media/microchip,xisc.yaml   | 3 ++-
 Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml    | 4 +++-
 6 files changed, 12 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +1 -0
index 35a48515836e..b0e5585f93e2 100644
@@ -118,6 +118,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
Quoted 5 lines

Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml additionalProperties: false · line 124

Quoted 2 lines
Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +0 -0
     i2c0 {
         #address-cells = <1>;

The definition doesn't seem to be used here. Is there a need to include this?

Quoted 8 lines

There was, but the change that added bus-type to this binding got reverted in commit 979452fbc430 ("dt-bindings: drm/bridge: anx7625:
Revert DPI support") and I forgot to drop the header when rebasing.

Quoted 2 lines

I could drop this chunk while applying. There's just one trivial change elsewhere in this patch to make.

Please do :-)

Applied with the following diff:

Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml +0 -1
index 7fa7a667c764a..4590186c4a0b8 100644
@@ -133,7 +133,6 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
-    #include <dt-bindings/media/video-interfaces.h>
 
     i2c0 {
         #address-cells = <1>;
Documentation/devicetree/bindings/media/st,stm32-dcmi.yaml +1 -1
index 285c6075950ad..e80fcdf280f0b 100644
@@ -92,7 +92,7 @@ examples:
     #include <dt-bindings/clock/stm32mp1-clks.h>
     #include <dt-bindings/media/video-interfaces.h>
     #include <dt-bindings/reset/stm32mp1-resets.h>
-    #
+
     dcmi: dcmi@4c006000 {
         compatible = "st,stm32-dcmi";
         reg = <0x4c006000 0x400>;

It seems that there's also bus-type 7 that corresponds to MIPI DPI. Could you add a macro for this one as well? :-) In particular it's used by Documentation/devicetree/bindings/display/bridge/analogix,anx7625.yaml .

Signature · 3 lines
Kind regards,

Sakari Ailus
author reviewer
#11 lore raw

PATCH v3 3/6 ARM: dts: freescale: Use new media bus type macros

In reply to Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
 arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx6ul-14x14-evk.dtsi +3 -1
index 1a18c41ce385..d98111f2100f 100644
@@ -2,6 +2,8 @@
 //
 // Copyright (C) 2015 Freescale Semiconductor, Inc.
 
+#include <dt-bindings/media/video-interfaces.h>
+
 / {
 	chosen {
 		stdout-path = &uart1;
@@ -170,7 +172,7 @@ &csi {
 	port {
 		parallel_from_ov5640: endpoint {
 			remote-endpoint = <&ov5640_to_parallel>;
-			bus-type = <5>; /* Parallel bus */
+			bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
 		};
 	};
 };
Signature · 3 lines
Regards,

Laurent Pinchart
author reviewer
#12 lore raw

Re: [PATCH v3 3/6] ARM: dts: freescale: Use new media bus type macros

Shawn, could you please take this in your tree for v6.3 ? The two patches that the DT changes depend on have been merged in v6.2.

Quoted 31 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
 arch/arm/boot/dts/imx6ul-14x14-evk.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx6ul-14x14-evk.dtsi +3 -1
index 1a18c41ce385..d98111f2100f 100644
@@ -2,6 +2,8 @@
 //
 // Copyright (C) 2015 Freescale Semiconductor, Inc.
 
+#include <dt-bindings/media/video-interfaces.h>
+
 / {
 	chosen {
 		stdout-path = &uart1;
@@ -170,7 +172,7 @@ &csi {
 	port {
 		parallel_from_ov5640: endpoint {
 			remote-endpoint = <&ov5640_to_parallel>;
-			bus-type = <5>; /* Parallel bus */
+			bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
 		};
 	};
 };
Signature · 3 lines
Regards,

Laurent Pinchart
author reviewer
#14 lore raw

PATCH v3 4/6 ARM: dts: omap: Use new media bus type macros

In reply to Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
 arch/arm/boot/dts/omap3-n900.dts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap3-n900.dts +3 -2
index d40c3d2c4914..9cad9d6a83e2 100644
@@ -9,6 +9,7 @@
 #include "omap34xx.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/media/video-interfaces.h>
 
 /*
  * Default secure signed bootloader (Nokia X-Loader) does not enable L3 firewall
@@ -194,7 +195,7 @@ port@1 {
 
 			csi_isp: endpoint {
 				remote-endpoint = <&csi_cam1>;
-				bus-type = <3>; /* CCP2 */
+				bus-type = <MEDIA_BUS_TYPE_CCP2>;
 				clock-lanes = <1>;
 				data-lanes = <0>;
 				lane-polarity = <0 0>;
@@ -835,7 +836,7 @@ cam1: camera@3e {
 
 		port {
 			csi_cam1: endpoint {
-				bus-type = <3>; /* CCP2 */
+				bus-type = <MEDIA_BUS_TYPE_CCP2>;
 				strobe = <1>;
 				clock-inv = <0>;
 				crc = <1>;
Signature · 3 lines
Regards,

Laurent Pinchart
author reviewer
#15 lore raw

Re: [PATCH v3 4/6] ARM: dts: omap: Use new media bus type macros

Tony, could you take this patch in your tree for v6.3 ? The two patches that it depends on have both been merged in v6.2.

Quoted 39 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
 arch/arm/boot/dts/omap3-n900.dts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap3-n900.dts +3 -2
index d40c3d2c4914..9cad9d6a83e2 100644
@@ -9,6 +9,7 @@
 #include "omap34xx.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/media/video-interfaces.h>
 
 /*
  * Default secure signed bootloader (Nokia X-Loader) does not enable L3 firewall
@@ -194,7 +195,7 @@ port@1 {
 
 			csi_isp: endpoint {
 				remote-endpoint = <&csi_cam1>;
-				bus-type = <3>; /* CCP2 */
+				bus-type = <MEDIA_BUS_TYPE_CCP2>;
 				clock-lanes = <1>;
 				data-lanes = <0>;
 				lane-polarity = <0 0>;
@@ -835,7 +836,7 @@ cam1: camera@3e {
 
 		port {
 			csi_cam1: endpoint {
-				bus-type = <3>; /* CCP2 */
+				bus-type = <MEDIA_BUS_TYPE_CCP2>;
 				strobe = <1>;
 				clock-inv = <0>;
 				crc = <1>;
Signature · 3 lines
Regards,

Laurent Pinchart
#16 lore raw

Re: [PATCH v3 4/6] ARM: dts: omap: Use new media bus type macros

Quoted 2 lines · Laurent Pinchart

Tony, could you take this patch in your tree for v6.3 ? The two patches that it depends on have both been merged in v6.2.

OK applying into omap-for-v6.3/dt.

Thanks,

Tony

author reviewer
#17 lore raw

PATCH v3 5/6 ARM: dts: renesas: Use new media bus type macros

In reply to Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts       | 11 +++++++----
 .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi     |  4 +++-
 .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi     |  4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +7 -4
index 4e58c54cde17..33ac4bd1e63b 100644
@@ -7,6 +7,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/media/video-interfaces.h>
+
 #include "r8a7742-iwg21d-q7.dts"
 
 / {
@@ -242,7 +245,7 @@ port {
 		vin0ep: endpoint {
 			remote-endpoint = <&cam0ep>;
 			bus-width = <8>;
-			bus-type = <6>;
+			bus-type = <MEDIA_BUS_TYPE_BT656>;
 		};
 	};
 };
@@ -273,7 +276,7 @@ port {
 		vin1ep: endpoint {
 			remote-endpoint = <&cam1ep>;
 			bus-width = <8>;
-			bus-type = <6>;
+			bus-type = <MEDIA_BUS_TYPE_BT656>;
 		};
 	};
 };
@@ -305,7 +308,7 @@ vin2ep: endpoint {
 			remote-endpoint = <&cam2ep>;
 			bus-width = <8>;
 			data-shift = <8>;
-			bus-type = <6>;
+			bus-type = <MEDIA_BUS_TYPE_BT656>;
 		};
 	};
 };
@@ -335,7 +338,7 @@ port {
 		vin3ep: endpoint {
 			remote-endpoint = <&cam3ep>;
 			bus-width = <8>;
-			bus-type = <6>;
+			bus-type = <MEDIA_BUS_TYPE_BT656>;
 		};
 	};
 };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +3 -1
index 40cef0b1d1e6..c73160df619d 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
+#include <dt-bindings/media/video-interfaces.h>
+
 #define CAM_ENABLED	1
 
 &CAM_PARENT_I2C {
@@ -26,7 +28,7 @@ port {
 			CAM_EP: endpoint {
 				bus-width = <8>;
 				data-shift = <2>;
-				bus-type = <6>;
+				bus-type = <MEDIA_BUS_TYPE_BT656>;
 				pclk-sample = <1>;
 				remote-endpoint = <&VIN_EP>;
 			};
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +3 -1
index f5e77f024251..a7f5cfec64b8 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
+#include <dt-bindings/media/video-interfaces.h>
+
 #define CAM_ENABLED	1
 
 &CAM_PARENT_I2C {
@@ -21,7 +23,7 @@ ov7725@21 {
 		port {
 			CAM_EP: endpoint {
 				bus-width = <8>;
-				bus-type = <6>;
+				bus-type = <MEDIA_BUS_TYPE_BT656>;
 				remote-endpoint = <&VIN_EP>;
 			};
 		};
Signature · 3 lines
Regards,

Laurent Pinchart
Reviewed-by Lad Prabhakar on v3 5/6
#18 lore raw

Re: [PATCH v3 5/6] ARM: dts: renesas: Use new media bus type macros

Hi Laurent,

Thank you for the patch.

Quoted 5 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

Quoted 7 lines
---
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts       | 11 +++++++----
 .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi     |  4 +++-
 .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi     |  4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)

Cheers,
Prabhakar

author reviewer
#19 lore raw

Re: [PATCH v3 5/6] ARM: dts: renesas: Use new media bus type macros

In reply to Laurent Pinchart

Geert, could you please take this in your tree for v6.3 ? The two patches that the DT changes depend on have been merged in v6.2.

Quoted 105 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts       | 11 +++++++----
 .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi     |  4 +++-
 .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi     |  4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +7 -4
index 4e58c54cde17..33ac4bd1e63b 100644
@@ -7,6 +7,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/media/video-interfaces.h>
+
 #include "r8a7742-iwg21d-q7.dts"
 
 / {
@@ -242,7 +245,7 @@ port {
 		vin0ep: endpoint {
 			remote-endpoint = <&cam0ep>;
 			bus-width = <8>;
-			bus-type = <6>;
+			bus-type = <MEDIA_BUS_TYPE_BT656>;
 		};
 	};
 };
@@ -273,7 +276,7 @@ port {
 		vin1ep: endpoint {
 			remote-endpoint = <&cam1ep>;
 			bus-width = <8>;
-			bus-type = <6>;
+			bus-type = <MEDIA_BUS_TYPE_BT656>;
 		};
 	};
 };
@@ -305,7 +308,7 @@ vin2ep: endpoint {
 			remote-endpoint = <&cam2ep>;
 			bus-width = <8>;
 			data-shift = <8>;
-			bus-type = <6>;
+			bus-type = <MEDIA_BUS_TYPE_BT656>;
 		};
 	};
 };
@@ -335,7 +338,7 @@ port {
 		vin3ep: endpoint {
 			remote-endpoint = <&cam3ep>;
 			bus-width = <8>;
-			bus-type = <6>;
+			bus-type = <MEDIA_BUS_TYPE_BT656>;
 		};
 	};
 };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +3 -1
index 40cef0b1d1e6..c73160df619d 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
+#include <dt-bindings/media/video-interfaces.h>
+
 #define CAM_ENABLED	1
 
 &CAM_PARENT_I2C {
@@ -26,7 +28,7 @@ port {
 			CAM_EP: endpoint {
 				bus-width = <8>;
 				data-shift = <2>;
-				bus-type = <6>;
+				bus-type = <MEDIA_BUS_TYPE_BT656>;
 				pclk-sample = <1>;
 				remote-endpoint = <&VIN_EP>;
 			};
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +3 -1
index f5e77f024251..a7f5cfec64b8 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
+#include <dt-bindings/media/video-interfaces.h>
+
 #define CAM_ENABLED	1
 
 &CAM_PARENT_I2C {
@@ -21,7 +23,7 @@ ov7725@21 {
 		port {
 			CAM_EP: endpoint {
 				bus-width = <8>;
-				bus-type = <6>;
+				bus-type = <MEDIA_BUS_TYPE_BT656>;
 				remote-endpoint = <&VIN_EP>;
 			};
 		};
Signature · 3 lines
Regards,

Laurent Pinchart
Reviewed-by
#20 lore raw

Re: [PATCH v3 5/6] ARM: dts: renesas: Use new media bus type macros

Hi Laurent,

CC linux-renesas-soc

Quoted 2 lines · Laurent Pinchart

Geert, could you please take this in your tree for v6.3 ? The two patches that the DT changes depend on have been merged in v6.2.

Thank you, I had missed these.

Quoted 6 lines · Laurent Pinchart
Quoted 5 lines

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

Quoted 64 lines
Quoted 64 lines
---
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts       | 11 +++++++----
 .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi     |  4 +++-
 .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi     |  4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +7 -4
index 4e58c54cde17..33ac4bd1e63b 100644
@@ -7,6 +7,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/media/video-interfaces.h>
+
 #include "r8a7742-iwg21d-q7.dts"
 
 / {
@@ -242,7 +245,7 @@ port {
              vin0ep: endpoint {
                      remote-endpoint = <&cam0ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -273,7 +276,7 @@ port {
              vin1ep: endpoint {
                      remote-endpoint = <&cam1ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -305,7 +308,7 @@ vin2ep: endpoint {
                      remote-endpoint = <&cam2ep>;
                      bus-width = <8>;
                      data-shift = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -335,7 +338,7 @@ port {
              vin3ep: endpoint {
                      remote-endpoint = <&cam3ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +0 -0
index 40cef0b1d1e6..c73160df619d 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
Quoted 1 line

arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi line 10

Quoted 1 line
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +1 -0
+#include <dt-bindings/media/video-interfaces.h>

This .dtsi file is only intended to be included by arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts, which already has the include. Hence if you don't mind, I would like to drop this part while applying and queuing in renesas-devel for v6.3.

Quoted 21 lines
Quoted 21 lines
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +2 -1
+
 #define CAM_ENABLED  1
 
 &CAM_PARENT_I2C {
@@ -26,7 +28,7 @@ port {
                      CAM_EP: endpoint {
                              bus-width = <8>;
                              data-shift = <2>;
-                             bus-type = <6>;
+                             bus-type = <MEDIA_BUS_TYPE_BT656>;
                              pclk-sample = <1>;
                              remote-endpoint = <&VIN_EP>;
                      };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +0 -0
index f5e77f024251..a7f5cfec64b8 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
Quoted 1 line

arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi line 10

Quoted 1 line
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +1 -0
+#include <dt-bindings/media/video-interfaces.h>

Likewise

Quoted 13 lines

arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi ov7725@21 { · line 29

Quoted 13 lines
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +2 -1
+
 #define CAM_ENABLED  1
 
 &CAM_PARENT_I2C {
@@ -21,7 +23,7 @@ ov7725@21 {
              port {
                      CAM_EP: endpoint {
                              bus-width = <8>;
-                             bus-type = <6>;
+                             bus-type = <MEDIA_BUS_TYPE_BT656>;
                              remote-endpoint = <&VIN_EP>;
                      };
              };

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author reviewer
#21 lore raw

Re: [PATCH v3 5/6] ARM: dts: renesas: Use new media bus type macros

Hi Geert,

Quoted 79 lines · Geert Uytterhoeven
Quoted 2 lines · Laurent Pinchart

Geert, could you please take this in your tree for v6.3 ? The two patches that the DT changes depend on have been merged in v6.2.

Thank you, I had missed these.

Quoted 6 lines · Laurent Pinchart
Quoted 5 lines

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

Quoted 64 lines
Quoted 64 lines
---
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts       | 11 +++++++----
 .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi     |  4 +++-
 .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi     |  4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +7 -4
index 4e58c54cde17..33ac4bd1e63b 100644
@@ -7,6 +7,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/media/video-interfaces.h>
+
 #include "r8a7742-iwg21d-q7.dts"
 
 / {
@@ -242,7 +245,7 @@ port {
              vin0ep: endpoint {
                      remote-endpoint = <&cam0ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -273,7 +276,7 @@ port {
              vin1ep: endpoint {
                      remote-endpoint = <&cam1ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -305,7 +308,7 @@ vin2ep: endpoint {
                      remote-endpoint = <&cam2ep>;
                      bus-width = <8>;
                      data-shift = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -335,7 +338,7 @@ port {
              vin3ep: endpoint {
                      remote-endpoint = <&cam3ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +0 -0
index 40cef0b1d1e6..c73160df619d 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
Quoted 6 lines
Quoted 1 line

arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi line 10

Quoted 1 line
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +1 -0
+#include <dt-bindings/media/video-interfaces.h>

This .dtsi file is only intended to be included by arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts, which already has the include. Hence if you don't mind, I would like to drop this part while applying and queuing in renesas-devel for v6.3.

Isn't it better to include headers as needed to avoid depending on indirect includes ?

Quoted 38 lines
Quoted 21 lines
Quoted 21 lines
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +2 -1
+
 #define CAM_ENABLED  1
 
 &CAM_PARENT_I2C {
@@ -26,7 +28,7 @@ port {
                      CAM_EP: endpoint {
                              bus-width = <8>;
                              data-shift = <2>;
-                             bus-type = <6>;
+                             bus-type = <MEDIA_BUS_TYPE_BT656>;
                              pclk-sample = <1>;
                              remote-endpoint = <&VIN_EP>;
                      };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +0 -0
index f5e77f024251..a7f5cfec64b8 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
Quoted 1 line

arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi line 10

Quoted 1 line
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +1 -0
+#include <dt-bindings/media/video-interfaces.h>

Likewise

Quoted 13 lines
Quoted 13 lines
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi +2 -1
+
 #define CAM_ENABLED  1
 
 &CAM_PARENT_I2C {
@@ -21,7 +23,7 @@ ov7725@21 {
              port {
                      CAM_EP: endpoint {
                              bus-width = <8>;
-                             bus-type = <6>;
+                             bus-type = <MEDIA_BUS_TYPE_BT656>;
                              remote-endpoint = <&VIN_EP>;
                      };
              };
Signature · 3 lines
Regards,

Laurent Pinchart
#22 lore raw

Re: [PATCH v3 5/6] ARM: dts: renesas: Use new media bus type macros

Hi Laurent,

Quoted 87 lines · Laurent Pinchart
Quoted 79 lines · Geert Uytterhoeven
Quoted 2 lines · Laurent Pinchart

Geert, could you please take this in your tree for v6.3 ? The two patches that the DT changes depend on have been merged in v6.2.

Thank you, I had missed these.

Quoted 6 lines · Laurent Pinchart
Quoted 5 lines

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

Quoted 64 lines
Quoted 64 lines
---
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts       | 11 +++++++----
 .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi     |  4 +++-
 .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi     |  4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +7 -4
index 4e58c54cde17..33ac4bd1e63b 100644
@@ -7,6 +7,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/media/video-interfaces.h>
+
 #include "r8a7742-iwg21d-q7.dts"
 
 / {
@@ -242,7 +245,7 @@ port {
              vin0ep: endpoint {
                      remote-endpoint = <&cam0ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -273,7 +276,7 @@ port {
              vin1ep: endpoint {
                      remote-endpoint = <&cam1ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -305,7 +308,7 @@ vin2ep: endpoint {
                      remote-endpoint = <&cam2ep>;
                      bus-width = <8>;
                      data-shift = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -335,7 +338,7 @@ port {
              vin3ep: endpoint {
                      remote-endpoint = <&cam3ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +0 -0
index 40cef0b1d1e6..c73160df619d 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
Quoted 6 lines
Quoted 1 line

arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi line 10

Quoted 1 line
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +1 -0
+#include <dt-bindings/media/video-interfaces.h>

This .dtsi file is only intended to be included by arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts, which already has the include. Hence if you don't mind, I would like to drop this part while applying and queuing in renesas-devel for v6.3.

Quoted 2 lines

Isn't it better to include headers as needed to avoid depending on indirect includes ?

In general, I agree.
In this particular case, (the multiple inclusions of) the r8a7742-iwg21d-q7-dbcm-ov*-single.dtsi files are tied very intimately to r8a7742-iwg21d-q7-dbcm-ca.dts.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author reviewer
#23 lore raw

Re: [PATCH v3 5/6] ARM: dts: renesas: Use new media bus type macros

Quoted 88 lines · Geert Uytterhoeven
Quoted 87 lines · Laurent Pinchart
Quoted 85 lines · Geert Uytterhoeven
Quoted 2 lines · Laurent Pinchart

Geert, could you please take this in your tree for v6.3 ? The two patches that the DT changes depend on have been merged in v6.2.

Thank you, I had missed these.

Quoted 6 lines · Laurent Pinchart
Quoted 5 lines

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

Quoted 64 lines
Quoted 64 lines
---
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts       | 11 +++++++----
 .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi     |  4 +++-
 .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi     |  4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +7 -4
index 4e58c54cde17..33ac4bd1e63b 100644
@@ -7,6 +7,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/media/video-interfaces.h>
+
 #include "r8a7742-iwg21d-q7.dts"
 
 / {
@@ -242,7 +245,7 @@ port {
              vin0ep: endpoint {
                      remote-endpoint = <&cam0ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -273,7 +276,7 @@ port {
              vin1ep: endpoint {
                      remote-endpoint = <&cam1ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -305,7 +308,7 @@ vin2ep: endpoint {
                      remote-endpoint = <&cam2ep>;
                      bus-width = <8>;
                      data-shift = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -335,7 +338,7 @@ port {
              vin3ep: endpoint {
                      remote-endpoint = <&cam3ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +0 -0
index 40cef0b1d1e6..c73160df619d 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
Quoted 1 line

arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi line 10

Quoted 1 line
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +1 -0
+#include <dt-bindings/media/video-interfaces.h>

This .dtsi file is only intended to be included by arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts, which already has the include. Hence if you don't mind, I would like to drop this part while applying and queuing in renesas-devel for v6.3.

Quoted 7 lines
Quoted 2 lines

Isn't it better to include headers as needed to avoid depending on indirect includes ?

In general, I agree.
In this particular case, (the multiple inclusions of) the r8a7742-iwg21d-q7-dbcm-ov*-single.dtsi files are tied very intimately to r8a7742-iwg21d-q7-dbcm-ca.dts.

I'd still prefer keeping the #include here, but you're the maintainer :-)

Signature · 3 lines
Regards,

Laurent Pinchart
#24 lore raw

Re: [PATCH v3 5/6] ARM: dts: renesas: Use new media bus type macros

Hi Laurent,

Quoted 92 lines · Laurent Pinchart
Quoted 91 lines · Geert Uytterhoeven
Quoted 89 lines · Laurent Pinchart
Quoted 79 lines · Geert Uytterhoeven
Quoted 2 lines · Laurent Pinchart

Geert, could you please take this in your tree for v6.3 ? The two patches that the DT changes depend on have been merged in v6.2.

Thank you, I had missed these.

Quoted 6 lines · Laurent Pinchart
Quoted 5 lines

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

Quoted 64 lines
Quoted 64 lines
---
 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts       | 11 +++++++----
 .../dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi     |  4 +++-
 .../dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi     |  4 +++-
 3 files changed, 13 insertions(+), 6 deletions(-)
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +7 -4
index 4e58c54cde17..33ac4bd1e63b 100644
@@ -7,6 +7,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/media/video-interfaces.h>
+
 #include "r8a7742-iwg21d-q7.dts"
 
 / {
@@ -242,7 +245,7 @@ port {
              vin0ep: endpoint {
                      remote-endpoint = <&cam0ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -273,7 +276,7 @@ port {
              vin1ep: endpoint {
                      remote-endpoint = <&cam1ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -305,7 +308,7 @@ vin2ep: endpoint {
                      remote-endpoint = <&cam2ep>;
                      bus-width = <8>;
                      data-shift = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
@@ -335,7 +338,7 @@ port {
              vin3ep: endpoint {
                      remote-endpoint = <&cam3ep>;
                      bus-width = <8>;
-                     bus-type = <6>;
+                     bus-type = <MEDIA_BUS_TYPE_BT656>;
              };
      };
 };
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +0 -0
index 40cef0b1d1e6..c73160df619d 100644
@@ -7,6 +7,8 @@
  * Copyright (C) 2020 Renesas Electronics Corp.
  */
 
Quoted 6 lines
Quoted 1 line

arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi line 10

Quoted 1 line
arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi +1 -0
+#include <dt-bindings/media/video-interfaces.h>

This .dtsi file is only intended to be included by arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts, which already has the include. Hence if you don't mind, I would like to drop this part while applying and queuing in renesas-devel for v6.3.

Isn't it better to include headers as needed to avoid depending on indirect includes ?

Quoted 7 lines
Quoted 4 lines

In general, I agree.
In this particular case, (the multiple inclusions of) the r8a7742-iwg21d-q7-dbcm-ov*-single.dtsi files are tied very intimately to r8a7742-iwg21d-q7-dbcm-ca.dts.

I'd still prefer keeping the #include here, but you're the maintainer :-)

OK, will keep them.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

author reviewer
#25 lore raw

PATCH v3 6/6 ARM: dts: stm32: Use new media bus type macros

In reply to Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
 arch/arm/boot/dts/stm32429i-eval.dts  | 3 ++-
 arch/arm/boot/dts/stm32mp157c-ev1.dts | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/stm32429i-eval.dts +2 -1
index 0d98aca01736..5fae11e6607b 100644
@@ -50,6 +50,7 @@
 #include "stm32f429-pinctrl.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/media/video-interfaces.h>
 
 / {
 	model = "STMicroelectronics STM32429i-EVAL board";
@@ -186,7 +187,7 @@ &dcmi {
 	port {
 		dcmi_0: endpoint {
 			remote-endpoint = <&ov2640_0>;
-			bus-type = <5>;
+			bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
 			bus-width = <8>;
 			hsync-active = <0>;
 			vsync-active = <0>;
arch/arm/boot/dts/stm32mp157c-ev1.dts +2 -1
index d142dd30e16b..306d41a6138f 100644
@@ -8,6 +8,7 @@
 #include "stm32mp157c-ed1.dts"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/media/video-interfaces.h>
 
 / {
 	model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
@@ -90,7 +91,7 @@ &dcmi {
 	port {
 		dcmi_0: endpoint {
 			remote-endpoint = <&ov5640_0>;
-			bus-type = <5>;
+			bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
 			bus-width = <8>;
 			hsync-active = <0>;
 			vsync-active = <0>;
Signature · 3 lines
Regards,

Laurent Pinchart
author reviewer
#26 lore raw

Re: [PATCH v3 6/6] ARM: dts: stm32: Use new media bus type macros

Hugues, Maxime, Alexandre, could one of you take this patch in your tree for v6.3 ? The two patches that it depends on have both been merged in v6.2.

Quoted 52 lines · Laurent Pinchart

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
 arch/arm/boot/dts/stm32429i-eval.dts  | 3 ++-
 arch/arm/boot/dts/stm32mp157c-ev1.dts | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/stm32429i-eval.dts +2 -1
index 0d98aca01736..5fae11e6607b 100644
@@ -50,6 +50,7 @@
 #include "stm32f429-pinctrl.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/media/video-interfaces.h>
 
 / {
 	model = "STMicroelectronics STM32429i-EVAL board";
@@ -186,7 +187,7 @@ &dcmi {
 	port {
 		dcmi_0: endpoint {
 			remote-endpoint = <&ov2640_0>;
-			bus-type = <5>;
+			bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
 			bus-width = <8>;
 			hsync-active = <0>;
 			vsync-active = <0>;
arch/arm/boot/dts/stm32mp157c-ev1.dts +2 -1
index d142dd30e16b..306d41a6138f 100644
@@ -8,6 +8,7 @@
 #include "stm32mp157c-ed1.dts"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/media/video-interfaces.h>
 
 / {
 	model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
@@ -90,7 +91,7 @@ &dcmi {
 	port {
 		dcmi_0: endpoint {
 			remote-endpoint = <&ov5640_0>;
-			bus-type = <5>;
+			bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
 			bus-width = <8>;
 			hsync-active = <0>;
 			vsync-active = <0>;
Signature · 3 lines
Regards,

Laurent Pinchart
maintainer
#27 lore raw

Re: [PATCH v3 6/6] ARM: dts: stm32: Use new media bus type macros

Hi Laurent

Quoted 3 lines · Laurent Pinchart

Hugues, Maxime, Alexandre, could one of you take this patch in your tree for v6.3 ? The two patches that it depends on have both been merged in v6.2.

Yes sure.

Cheers
Alex

Quoted 55 lines · Laurent Pinchart
Quoted 52 lines

Now that a header exists with macros for the media interface bus-type values, replace hardcoding numerical constants with the corresponding macros in the DT sources.

---
  arch/arm/boot/dts/stm32429i-eval.dts  | 3 ++-
  arch/arm/boot/dts/stm32mp157c-ev1.dts | 3 ++-
  2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm/boot/dts/stm32429i-eval.dts +2 -1
index 0d98aca01736..5fae11e6607b 100644
@@ -50,6 +50,7 @@
  #include "stm32f429-pinctrl.dtsi"
  #include <dt-bindings/input/input.h>
  #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/media/video-interfaces.h>
 
  / {
  	model = "STMicroelectronics STM32429i-EVAL board";
@@ -186,7 +187,7 @@ &dcmi {
  	port {
  		dcmi_0: endpoint {
  			remote-endpoint = <&ov2640_0>;
-			bus-type = <5>;
+			bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
  			bus-width = <8>;
  			hsync-active = <0>;
  			vsync-active = <0>;
arch/arm/boot/dts/stm32mp157c-ev1.dts +2 -1
index d142dd30e16b..306d41a6138f 100644
@@ -8,6 +8,7 @@
  #include "stm32mp157c-ed1.dts"
  #include <dt-bindings/gpio/gpio.h>
  #include <dt-bindings/input/input.h>
+#include <dt-bindings/media/video-interfaces.h>
 
  / {
  	model = "STMicroelectronics STM32MP157C eval daughter on eval mother";
@@ -90,7 +91,7 @@ &dcmi {
  	port {
  		dcmi_0: endpoint {
  			remote-endpoint = <&ov5640_0>;
-			bus-type = <5>;
+			bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
  			bus-width = <8>;
  			hsync-active = <0>;
  			vsync-active = <0>;
maintainer
#29 lore raw
In reply to Laurent Pinchart

Folks,

Quoted 7 lines

Laurent Pinchart (6):
dt-bindings: media: Add macros for video interface bus types
dt-bindings: Use new video interface bus type macros in examples
ARM: dts: freescale: Use new media bus type macros
ARM: dts: omap: Use new media bus type macros
ARM: dts: renesas: Use new media bus type macros
ARM: dts: stm32: Use new media bus type macros

What's the preference on the tree through which these would be merged?

The two first should probably go through the media tree but what about the DTS? There's a dependency to the first patch. I can take these all if people are fine with that.

Signature · 3 lines
Kind regards,

Sakari Ailus
#30 lore raw

Hi Sakari,

Gentle ping.

Quoted 10 lines · Sakari Ailus

Folks,

Quoted 7 lines

Laurent Pinchart (6):
dt-bindings: media: Add macros for video interface bus types
dt-bindings: Use new video interface bus type macros in examples
ARM: dts: freescale: Use new media bus type macros
ARM: dts: omap: Use new media bus type macros
ARM: dts: renesas: Use new media bus type macros
ARM: dts: stm32: Use new media bus type macros

Quoted 5 lines

What's the preference on the tree through which these would be merged?

The two first should probably go through the media tree but what about the DTS? There's a dependency to the first patch. I can take these all if people are fine with that.

How is this going?

Thanks,

Paul

author reviewer
#31 lore raw

Hello,

Quoted 15 lines · Paul Elder

Hi Sakari,

Gentle ping.

Quoted 10 lines · Sakari Ailus

Folks,

Quoted 7 lines

Laurent Pinchart (6):
dt-bindings: media: Add macros for video interface bus types
dt-bindings: Use new video interface bus type macros in examples
ARM: dts: freescale: Use new media bus type macros
ARM: dts: omap: Use new media bus type macros
ARM: dts: renesas: Use new media bus type macros
ARM: dts: stm32: Use new media bus type macros

Quoted 7 lines
Quoted 5 lines

What's the preference on the tree through which these would be merged?

The two first should probably go through the media tree but what about the DTS? There's a dependency to the first patch. I can take these all if people are fine with that.

How is this going?

Sakari, if there's a concern taking patches 3/6 to 6/6 in the media tree, could you merge 1/6 and 2/6 ? If they can still be included in a pull request for v6.2, I'll work on getting the dts changes in v6.3 through their respective trees.

Signature · 3 lines
Regards,

Laurent Pinchart
maintainer
#32 lore raw

Hi Laurent,

Quoted 24 lines · Laurent Pinchart

Hello,

Quoted 21 lines · Paul Elder

Hi Sakari,

Gentle ping.

Quoted 15 lines · Sakari Ailus

Folks,

Quoted 7 lines

Laurent Pinchart (6):
dt-bindings: media: Add macros for video interface bus types
dt-bindings: Use new video interface bus type macros in examples
ARM: dts: freescale: Use new media bus type macros
ARM: dts: omap: Use new media bus type macros
ARM: dts: renesas: Use new media bus type macros
ARM: dts: stm32: Use new media bus type macros

What's the preference on the tree through which these would be merged?

The two first should probably go through the media tree but what about the DTS? There's a dependency to the first patch. I can take these all if people are fine with that.

Quoted 6 lines
Quoted 1 line

How is this going?

Sakari, if there's a concern taking patches 3/6 to 6/6 in the media tree, could you merge 1/6 and 2/6 ? If they can still be included in a pull request for v6.2, I'll work on getting the dts changes in v6.3 through their respective trees.

I think I was expecting v4 from you. But I can address the comments, too, they were minor matters.

For applying the DTS patches I'd like to have ack from respective treemaintainers it's fine to take these through the media tree.

Signature · 3 lines
Kind regards,

Sakari Ailus
author reviewer
#33 lore raw

Hi Sakari,

Quoted 21 lines · Sakari Ailus
Quoted 20 lines · Laurent Pinchart
Quoted 18 lines · Paul Elder
Quoted 10 lines · Sakari Ailus

Folks,

Quoted 7 lines

Laurent Pinchart (6):
dt-bindings: media: Add macros for video interface bus types
dt-bindings: Use new video interface bus type macros in examples
ARM: dts: freescale: Use new media bus type macros
ARM: dts: omap: Use new media bus type macros
ARM: dts: renesas: Use new media bus type macros
ARM: dts: stm32: Use new media bus type macros

Quoted 5 lines

What's the preference on the tree through which these would be merged?

The two first should probably go through the media tree but what about the DTS? There's a dependency to the first patch. I can take these all if people are fine with that.

How is this going?

Quoted 7 lines
Quoted 4 lines

Sakari, if there's a concern taking patches 3/6 to 6/6 in the media tree, could you merge 1/6 and 2/6 ? If they can still be included in a pull request for v6.2, I'll work on getting the dts changes in v6.3 through their respective trees.

I think I was expecting v4 from you. But I can address the comments, too, they were minor matters.

That would be nice :-) Could it still be done for v6.2 ?

Quoted 2 lines

For applying the DTS patches I'd like to have ack from respective treemaintainers it's fine to take these through the media tree.

Works for me, this can be done in v6.3.

Signature · 3 lines
Regards,

Laurent Pinchart