* [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
* Re: [PATCH] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
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-04-02 11:29 ` Krzysztof Kozlowski
1 sibling, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-03-31 15:14 UTC (permalink / raw)
To: Niklas Söderlund
Cc: Rob Herring, Mauro Carvalho Chehab, Sakari Ailus, devicetree,
linux-media, linux-renesas-soc
Hi Niklas,
On Fri, Mar 31, 2023 at 4:15 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> 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>
Thanks for your patch!
> --- 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
Perhaps use/refer to the symbolic names, too?
Sounds like an opportunity for improvement for
Documentation/devicetree/bindings/media/video-interfaces.yaml, too.
>
> 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>;
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] 5+ messages in thread
* Re: [PATCH] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
2023-03-31 15:14 ` Geert Uytterhoeven
@ 2023-03-31 15:39 ` Niklas Söderlund
2023-03-31 15:41 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: Niklas Söderlund @ 2023-03-31 15:39 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Rob Herring, Mauro Carvalho Chehab, Sakari Ailus, devicetree,
linux-media, linux-renesas-soc
Hi Geert,
On 2023-03-31 17:14:42 +0200, Geert Uytterhoeven wrote:
> Hi Niklas,
>
> On Fri, Mar 31, 2023 at 4:15 PM Niklas Söderlund
> <niklas.soderlund+renesas@ragnatech.se> wrote:
> > 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>
>
> Thanks for your patch!
>
> > --- 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
>
> Perhaps use/refer to the symbolic names, too?
I tired that, but dt_binding_check complained.
$ cat Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
...
bus-type:
enum:
- MEDIA_BUS_TYPE_CSI2_CPHY
- MEDIA_BUS_TYPE_CSI2_DPHY
...
$ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
...
.../obj/Documentation/devicetree/bindings/media/i2c/maxim,max96712.example.dtb:
gmsl-deserializer@49: ports:port@4:endpoint:bus-type:0: [4] is not one of ['MEDIA_BUS_TYPE_CSI2_CPHY', 'MEDIA_BUS_TYPE_CSI2_DPHY']
Or did I misunderstand you? I checked other bindings and the numerical
values where used in all media/i2c bindings.
>
> Sounds like an opportunity for improvement for
> Documentation/devicetree/bindings/media/video-interfaces.yaml, too.
>
> >
> > 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>;
>
> 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
--
Kind Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
2023-03-31 15:39 ` Niklas Söderlund
@ 2023-03-31 15:41 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-03-31 15:41 UTC (permalink / raw)
To: Niklas Söderlund
Cc: Rob Herring, Mauro Carvalho Chehab, Sakari Ailus, devicetree,
linux-media, linux-renesas-soc
Hi Niklas,
On Fri, Mar 31, 2023 at 5:39 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> On 2023-03-31 17:14:42 +0200, Geert Uytterhoeven wrote:
> > On Fri, Mar 31, 2023 at 4:15 PM Niklas Söderlund
> > <niklas.soderlund+renesas@ragnatech.se> wrote:
> > > 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>
> >
> > Thanks for your patch!
> >
> > > --- 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
> >
> > Perhaps use/refer to the symbolic names, too?
>
> I tired that, but dt_binding_check complained.
>
> $ cat Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> ...
> bus-type:
> enum:
> - MEDIA_BUS_TYPE_CSI2_CPHY
> - MEDIA_BUS_TYPE_CSI2_DPHY
> ...
>
> $ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/i2c/maxim,max96712.yaml
> ...
> .../obj/Documentation/devicetree/bindings/media/i2c/maxim,max96712.example.dtb:
> gmsl-deserializer@49: ports:port@4:endpoint:bus-type:0: [4] is not one of ['MEDIA_BUS_TYPE_CSI2_CPHY', 'MEDIA_BUS_TYPE_CSI2_DPHY']
>
> Or did I misunderstand you? I checked other bindings and the numerical
> values where used in all media/i2c bindings.
Yeah, I don't think you can do it that way.
But this should work:
- 1 # MEDIA_BUS_TYPE_CSI2_CPHY
- 4 # MEDIA_BUS_TYPE_CSI2_DPHY
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] 5+ messages in thread
* Re: [PATCH] dt-bindings: i2c: maxim,max96712: Require setting bus-type property
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-04-02 11:29 ` Krzysztof Kozlowski
1 sibling, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-02 11:29 UTC (permalink / raw)
To: Niklas Söderlund, Rob Herring, Mauro Carvalho Chehab,
Sakari Ailus, devicetree, linux-media
Cc: linux-renesas-soc
On 31/03/2023 16:10, Niklas Söderlund wrote:
> The MAX96712 can support both CSI-2 C-PHY and D-PHY bus. Document the
> supported bus-types and make the property mandatory.
Why making it mandatory? Commit msg should focus on "why" because "what"
is easy to see.
>
> 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.
> ---
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.
> .../devicetree/bindings/media/i2c/maxim,max96712.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
Best regards,
Krzysztof
^ permalink raw reply [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;
as well as URLs for NNTP newsgroup(s).