linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
@ 2023-05-09 19:00 Niklas Söderlund
  2023-05-09 19:37 ` Conor Dooley
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Niklas Söderlund @ 2023-05-09 19:00 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sakari Ailus, devicetree, linux-media
  Cc: linux-renesas-soc, Niklas Söderlund

The MAX96712 can support both a CSI-2 C-PHY and D-PHY bus. The initial
staging driver however only supported D-PHY and the bus-type property
was left optional.

In preparation for adding C-PHY support to the staging driver make the
bus-type property mandatory as it is needed to select the correct PHY
mode. Without the bus-type property present, the driver falls-back to
D-PHY mode, so the change is functionally backward compatible with old
DTS files lacking the property.

The only in-tree DTS file (renesas/r8a779a0-falcon-csi-dsi.dtsi) that
lacked the property uses D-PHY and have been updated.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
* Changes since v1
- Use symbolic names in comments for the bus-type properties.
- Improve the commit message.
- Rebased to v6.4-rc1.
---
 .../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..6c72e77b927c 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 # MEDIA_BUS_TYPE_CSI2_CPHY
+                  - 4 # MEDIA_BUS_TYPE_CSI2_DPHY
 
             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.1


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

* Re: [PATCH v2] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
  2023-05-09 19:00 [PATCH v2] dt-bindings: i2c: maxim,max96712: Require setting bus-type property Niklas Söderlund
@ 2023-05-09 19:37 ` Conor Dooley
  2023-05-10  7:14 ` Krzysztof Kozlowski
  2023-05-10  7:33 ` Geert Uytterhoeven
  2 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2023-05-09 19:37 UTC (permalink / raw)
  To: Niklas Söderlund
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sakari Ailus, devicetree, linux-media,
	linux-renesas-soc

[-- Attachment #1: Type: text/plain, Size: 2621 bytes --]

On Tue, May 09, 2023 at 09:00:31PM +0200, Niklas Söderlund wrote:
> The MAX96712 can support both a CSI-2 C-PHY and D-PHY bus. The initial
> staging driver however only supported D-PHY and the bus-type property
> was left optional.
> 
> In preparation for adding C-PHY support to the staging driver make the
> bus-type property mandatory as it is needed to select the correct PHY
> mode. Without the bus-type property present, the driver falls-back to
> D-PHY mode, so the change is functionally backward compatible with old
> DTS files lacking the property.
> 
> The only in-tree DTS file (renesas/r8a779a0-falcon-csi-dsi.dtsi) that
> lacked the property uses D-PHY and have been updated.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
> * Changes since v1
> - Use symbolic names in comments for the bus-type properties.
> - Improve the commit message.
> - Rebased to v6.4-rc1.
> ---
>  .../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..6c72e77b927c 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 # MEDIA_BUS_TYPE_CSI2_CPHY
> +                  - 4 # MEDIA_BUS_TYPE_CSI2_DPHY
>  
>              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.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
  2023-05-09 19:00 [PATCH v2] dt-bindings: i2c: maxim,max96712: Require setting bus-type property Niklas Söderlund
  2023-05-09 19:37 ` Conor Dooley
@ 2023-05-10  7:14 ` Krzysztof Kozlowski
  2023-05-10  7:33 ` Geert Uytterhoeven
  2 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-10  7:14 UTC (permalink / raw)
  To: Niklas Söderlund, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Sakari Ailus, devicetree,
	linux-media
  Cc: linux-renesas-soc

On 09/05/2023 21:00, Niklas Söderlund wrote:
> The MAX96712 can support both a CSI-2 C-PHY and D-PHY bus. The initial
> staging driver however only supported D-PHY and the bus-type property
> was left optional.
> 
> In preparation for adding C-PHY support to the staging driver make the
> bus-type property mandatory as it is needed to select the correct PHY
> mode. Without the bus-type property present, the driver falls-back to
> D-PHY mode, so the change is functionally backward compatible with old
> DTS files lacking the property.
> 
> The only in-tree DTS file (renesas/r8a779a0-falcon-csi-dsi.dtsi) that
> lacked the property uses D-PHY and have been updated.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> * Changes since v1
> - Use symbolic names in comments for the bus-type properties.
> - Improve the commit message.
> - Rebased to v6.4-rc1.
> ---
>  .../devicetree/bindings/media/i2c/maxim,max96712.yaml      | 7 +++++++
>  1 file changed, 7 insertions(+)
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH v2] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
  2023-05-09 19:00 [PATCH v2] dt-bindings: i2c: maxim,max96712: Require setting bus-type property Niklas Söderlund
  2023-05-09 19:37 ` Conor Dooley
  2023-05-10  7:14 ` Krzysztof Kozlowski
@ 2023-05-10  7:33 ` Geert Uytterhoeven
  2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2023-05-10  7:33 UTC (permalink / raw)
  To: Niklas Söderlund
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Sakari Ailus, devicetree, linux-media,
	linux-renesas-soc

On Tue, May 9, 2023 at 9:03 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> The MAX96712 can support both a CSI-2 C-PHY and D-PHY bus. The initial
> staging driver however only supported D-PHY and the bus-type property
> was left optional.
>
> In preparation for adding C-PHY support to the staging driver make the
> bus-type property mandatory as it is needed to select the correct PHY
> mode. Without the bus-type property present, the driver falls-back to
> D-PHY mode, so the change is functionally backward compatible with old
> DTS files lacking the property.
>
> The only in-tree DTS file (renesas/r8a779a0-falcon-csi-dsi.dtsi) that
> lacked the property uses D-PHY and have been updated.

has

>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> * Changes since v1
> - Use symbolic names in comments for the bus-type properties.
> - Improve the commit message.
> - Rebased to v6.4-rc1.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

end of thread, other threads:[~2023-05-10  7:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 19:00 [PATCH v2] dt-bindings: i2c: maxim,max96712: Require setting bus-type property Niklas Söderlund
2023-05-09 19:37 ` Conor Dooley
2023-05-10  7:14 ` Krzysztof Kozlowski
2023-05-10  7:33 ` Geert Uytterhoeven

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).