Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
@ 2023-03-31 14:10 Niklas Söderlund
  2023-03-31 15:14 ` Geert Uytterhoeven
  2023-04-02 11:29 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 5+ messages in thread
From: Niklas Söderlund @ 2023-03-31 14:10 UTC (permalink / raw)
  To: Rob Herring, Mauro Carvalho Chehab, Sakari Ailus, devicetree,
	linux-media
  Cc: linux-renesas-soc, Niklas Söderlund

The MAX96712 can support both CSI-2 C-PHY and D-PHY bus. Document the
supported bus-types and make the property mandatory.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
Hi,

This is done in conjunction with adding C-PHY support to the driver,
patches on list. The current driver only supports D-PHY so this was
assumed in the driver.

There is a single user of this binding, r8a779a0-falcon-csi-dsi.dtsi. A
separate patch to update that binding with a bus-type property is be
submitted.

Without the property present the driver fall-back to D-PHY (even with
the C-PHY work applied). So this change is backward compatible with old
versions of the only effected DTS file.
---
 .../devicetree/bindings/media/i2c/maxim,max96712.yaml      | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
index 444f24838d3d..fccbf287ff79 100644
--- a/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
@@ -65,9 +65,14 @@ properties:
 
             properties:
               data-lanes: true
+              bus-type:
+                enum:
+                  - 1 # CSI-2 C-PHY
+                  - 4 # CSI-2 D-PHY
 
             required:
               - data-lanes
+              - bus-type
 
     required:
       - port@4
@@ -82,6 +87,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
+    #include <dt-bindings/media/video-interfaces.h>
 
     i2c@e6508000 {
             #address-cells = <1>;
@@ -101,6 +107,7 @@ examples:
                             port@4 {
                                     reg = <4>;
                                     max96712_out0: endpoint {
+                                            bus-type = <MEDIA_BUS_TYPE_CSI2_DPHY>;
                                             clock-lanes = <0>;
                                             data-lanes = <1 2 3 4>;
                                             remote-endpoint = <&csi40_in>;
-- 
2.40.0


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

end of thread, other threads:[~2023-04-02 11:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-31 14:10 [PATCH] dt-bindings: i2c: maxim,max96712: Require setting bus-type property Niklas Söderlund
2023-03-31 15:14 ` Geert Uytterhoeven
2023-03-31 15:39   ` Niklas Söderlund
2023-03-31 15:41     ` Geert Uytterhoeven
2023-04-02 11:29 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox