* [PATCH v2] media: dt-bindings: ov8856: decouple lanes and link frequency from driver
@ 2023-12-07 14:23 Krzysztof Kozlowski
2023-12-07 17:15 ` Conor Dooley
2023-12-08 18:07 ` Sakari Ailus
0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-07 14:23 UTC (permalink / raw)
To: Sakari Ailus, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Laurent Pinchart,
Maxime Ripard, linux-media, devicetree, linux-kernel
Cc: Krzysztof Kozlowski
The data lanes and link frequency were set to match exiting Linux driver
limitations, however bindings should be independent of chosen Linux
driver support.
Decouple these properties from the driver to match what is actually
supported by the hardware.
This also fixes DTS example:
ov8856.example.dtb: camera@10: port:endpoint:link-frequencies:0: [360000000] is too short
Fixes: 066a94e28a23 ("media: dt-bindings: media: Use graph and video-interfaces schemas")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes in v2:
1. Rework approach: decouple bindings from driver instead of fixing
DTS example (Sakari)
---
.../devicetree/bindings/media/i2c/ov8856.yaml | 21 +++++++++++--------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
index 57f5e48fd8e0..71102a71cf81 100644
--- a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
@@ -67,19 +67,22 @@ properties:
properties:
data-lanes:
- description: |-
- The driver only supports four-lane operation.
- items:
- - const: 1
- - const: 2
- - const: 3
- - const: 4
+ oneOf:
+ - items:
+ - const: 1
+ - items:
+ - const: 1
+ - const: 2
+ - items:
+ - const: 1
+ - const: 2
+ - const: 3
+ - const: 4
link-frequencies:
description: Frequencies listed are driver, not h/w limitations.
- maxItems: 2
items:
- enum: [ 360000000, 180000000 ]
+ enum: [ 1440000000, 720000000, 360000000, 180000000 ]
required:
- link-frequencies
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] media: dt-bindings: ov8856: decouple lanes and link frequency from driver
2023-12-07 14:23 [PATCH v2] media: dt-bindings: ov8856: decouple lanes and link frequency from driver Krzysztof Kozlowski
@ 2023-12-07 17:15 ` Conor Dooley
2023-12-08 18:07 ` Sakari Ailus
1 sibling, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2023-12-07 17:15 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Sakari Ailus, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Laurent Pinchart,
Maxime Ripard, linux-media, devicetree, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]
On Thu, Dec 07, 2023 at 03:23:56PM +0100, Krzysztof Kozlowski wrote:
> The data lanes and link frequency were set to match exiting Linux driver
> limitations, however bindings should be independent of chosen Linux
> driver support.
>
> Decouple these properties from the driver to match what is actually
> supported by the hardware.
>
> This also fixes DTS example:
>
> ov8856.example.dtb: camera@10: port:endpoint:link-frequencies:0: [360000000] is too short
>
> Fixes: 066a94e28a23 ("media: dt-bindings: media: Use graph and video-interfaces schemas")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Changes in v2:
> 1. Rework approach: decouple bindings from driver instead of fixing
> DTS example (Sakari)
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Cheers,
Conor.
> ---
> .../devicetree/bindings/media/i2c/ov8856.yaml | 21 +++++++++++--------
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> index 57f5e48fd8e0..71102a71cf81 100644
> --- a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> @@ -67,19 +67,22 @@ properties:
>
> properties:
> data-lanes:
> - description: |-
> - The driver only supports four-lane operation.
> - items:
> - - const: 1
> - - const: 2
> - - const: 3
> - - const: 4
> + oneOf:
> + - items:
> + - const: 1
> + - items:
> + - const: 1
> + - const: 2
> + - items:
> + - const: 1
> + - const: 2
> + - const: 3
> + - const: 4
>
> link-frequencies:
> description: Frequencies listed are driver, not h/w limitations.
> - maxItems: 2
> items:
> - enum: [ 360000000, 180000000 ]
> + enum: [ 1440000000, 720000000, 360000000, 180000000 ]
>
> required:
> - link-frequencies
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] media: dt-bindings: ov8856: decouple lanes and link frequency from driver
2023-12-07 14:23 [PATCH v2] media: dt-bindings: ov8856: decouple lanes and link frequency from driver Krzysztof Kozlowski
2023-12-07 17:15 ` Conor Dooley
@ 2023-12-08 18:07 ` Sakari Ailus
2023-12-08 19:37 ` Krzysztof Kozlowski
1 sibling, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2023-12-08 18:07 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Laurent Pinchart, Maxime Ripard, linux-media,
devicetree, linux-kernel
Hi Krzysztof,
Thanks for the update.
On Thu, Dec 07, 2023 at 03:23:56PM +0100, Krzysztof Kozlowski wrote:
> The data lanes and link frequency were set to match exiting Linux driver
> limitations, however bindings should be independent of chosen Linux
> driver support.
>
> Decouple these properties from the driver to match what is actually
> supported by the hardware.
>
> This also fixes DTS example:
>
> ov8856.example.dtb: camera@10: port:endpoint:link-frequencies:0: [360000000] is too short
>
> Fixes: 066a94e28a23 ("media: dt-bindings: media: Use graph and video-interfaces schemas")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Changes in v2:
> 1. Rework approach: decouple bindings from driver instead of fixing
> DTS example (Sakari)
> ---
> .../devicetree/bindings/media/i2c/ov8856.yaml | 21 +++++++++++--------
> 1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> index 57f5e48fd8e0..71102a71cf81 100644
> --- a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> @@ -67,19 +67,22 @@ properties:
>
> properties:
> data-lanes:
> - description: |-
> - The driver only supports four-lane operation.
> - items:
> - - const: 1
> - - const: 2
> - - const: 3
> - - const: 4
> + oneOf:
> + - items:
> + - const: 1
> + - items:
> + - const: 1
> + - const: 2
> + - items:
> + - const: 1
> + - const: 2
> + - const: 3
> + - const: 4
>
> link-frequencies:
> description: Frequencies listed are driver, not h/w limitations.
This should be dropped, too.
> - maxItems: 2
> items:
> - enum: [ 360000000, 180000000 ]
> + enum: [ 1440000000, 720000000, 360000000, 180000000 ]
These frequencies are listed in the datasheet but they're just an
example---the sensor hardware isn't limited to these, the resulting
frequency on the CSI-2 bus is simply up to the external clock frequency and
PLL configuration. I'd remove the values here altogether.
>
> required:
> - link-frequencies
--
Regards,
Sakari Ailus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] media: dt-bindings: ov8856: decouple lanes and link frequency from driver
2023-12-08 18:07 ` Sakari Ailus
@ 2023-12-08 19:37 ` Krzysztof Kozlowski
2023-12-08 19:47 ` Sakari Ailus
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 19:37 UTC (permalink / raw)
To: Sakari Ailus
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Laurent Pinchart, Maxime Ripard, linux-media,
devicetree, linux-kernel
On 08/12/2023 19:07, Sakari Ailus wrote:
> Hi Krzysztof,
>
> Thanks for the update.
>
> On Thu, Dec 07, 2023 at 03:23:56PM +0100, Krzysztof Kozlowski wrote:
>> The data lanes and link frequency were set to match exiting Linux driver
>> limitations, however bindings should be independent of chosen Linux
>> driver support.
>>
>> Decouple these properties from the driver to match what is actually
>> supported by the hardware.
>>
>> This also fixes DTS example:
>>
>> ov8856.example.dtb: camera@10: port:endpoint:link-frequencies:0: [360000000] is too short
>>
>> Fixes: 066a94e28a23 ("media: dt-bindings: media: Use graph and video-interfaces schemas")
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Changes in v2:
>> 1. Rework approach: decouple bindings from driver instead of fixing
>> DTS example (Sakari)
>> ---
>> .../devicetree/bindings/media/i2c/ov8856.yaml | 21 +++++++++++--------
>> 1 file changed, 12 insertions(+), 9 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
>> index 57f5e48fd8e0..71102a71cf81 100644
>> --- a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
>> +++ b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
>> @@ -67,19 +67,22 @@ properties:
>>
>> properties:
>> data-lanes:
>> - description: |-
>> - The driver only supports four-lane operation.
>> - items:
>> - - const: 1
>> - - const: 2
>> - - const: 3
>> - - const: 4
>> + oneOf:
>> + - items:
>> + - const: 1
>> + - items:
>> + - const: 1
>> + - const: 2
>> + - items:
>> + - const: 1
>> + - const: 2
>> + - const: 3
>> + - const: 4
>>
>> link-frequencies:
>> description: Frequencies listed are driver, not h/w limitations.
>
> This should be dropped, too.
Ack, I forgot.
>
>> - maxItems: 2
>> items:
>> - enum: [ 360000000, 180000000 ]
>> + enum: [ 1440000000, 720000000, 360000000, 180000000 ]
>
> These frequencies are listed in the datasheet but they're just an
> example---the sensor hardware isn't limited to these, the resulting
> frequency on the CSI-2 bus is simply up to the external clock frequency and
> PLL configuration. I'd remove the values here altogether.
Hm, are you sure? Isn't it quite difficult to program device to any
frequency? But if that's not the case here, I can drop it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] media: dt-bindings: ov8856: decouple lanes and link frequency from driver
2023-12-08 19:37 ` Krzysztof Kozlowski
@ 2023-12-08 19:47 ` Sakari Ailus
0 siblings, 0 replies; 5+ messages in thread
From: Sakari Ailus @ 2023-12-08 19:47 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Laurent Pinchart, Maxime Ripard, linux-media,
devicetree, linux-kernel
On Fri, Dec 08, 2023 at 08:37:10PM +0100, Krzysztof Kozlowski wrote:
> On 08/12/2023 19:07, Sakari Ailus wrote:
> > Hi Krzysztof,
> >
> > Thanks for the update.
> >
> > On Thu, Dec 07, 2023 at 03:23:56PM +0100, Krzysztof Kozlowski wrote:
> >> The data lanes and link frequency were set to match exiting Linux driver
> >> limitations, however bindings should be independent of chosen Linux
> >> driver support.
> >>
> >> Decouple these properties from the driver to match what is actually
> >> supported by the hardware.
> >>
> >> This also fixes DTS example:
> >>
> >> ov8856.example.dtb: camera@10: port:endpoint:link-frequencies:0: [360000000] is too short
> >>
> >> Fixes: 066a94e28a23 ("media: dt-bindings: media: Use graph and video-interfaces schemas")
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>
> >> ---
> >>
> >> Changes in v2:
> >> 1. Rework approach: decouple bindings from driver instead of fixing
> >> DTS example (Sakari)
> >> ---
> >> .../devicetree/bindings/media/i2c/ov8856.yaml | 21 +++++++++++--------
> >> 1 file changed, 12 insertions(+), 9 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> >> index 57f5e48fd8e0..71102a71cf81 100644
> >> --- a/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> >> +++ b/Documentation/devicetree/bindings/media/i2c/ov8856.yaml
> >> @@ -67,19 +67,22 @@ properties:
> >>
> >> properties:
> >> data-lanes:
> >> - description: |-
> >> - The driver only supports four-lane operation.
> >> - items:
> >> - - const: 1
> >> - - const: 2
> >> - - const: 3
> >> - - const: 4
> >> + oneOf:
> >> + - items:
> >> + - const: 1
> >> + - items:
> >> + - const: 1
> >> + - const: 2
> >> + - items:
> >> + - const: 1
> >> + - const: 2
> >> + - const: 3
> >> + - const: 4
> >>
> >> link-frequencies:
> >> description: Frequencies listed are driver, not h/w limitations.
> >
> > This should be dropped, too.
>
> Ack, I forgot.
>
> >
> >> - maxItems: 2
> >> items:
> >> - enum: [ 360000000, 180000000 ]
> >> + enum: [ 1440000000, 720000000, 360000000, 180000000 ]
> >
> > These frequencies are listed in the datasheet but they're just an
> > example---the sensor hardware isn't limited to these, the resulting
> > frequency on the CSI-2 bus is simply up to the external clock frequency and
> > PLL configuration. I'd remove the values here altogether.
>
> Hm, are you sure? Isn't it quite difficult to program device to any
> frequency? But if that's not the case here, I can drop it.
The driver doesn't currently do that, no, but that doesn't mean the
hardware wouldn't support that. There are a few sensor drivers that
calculate the PLL configuration, such as ccs and ov5640.
I'd drop it as it's indeed a driver, not a device limitation.
--
Sakari Ailus
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-08 19:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-07 14:23 [PATCH v2] media: dt-bindings: ov8856: decouple lanes and link frequency from driver Krzysztof Kozlowski
2023-12-07 17:15 ` Conor Dooley
2023-12-08 18:07 ` Sakari Ailus
2023-12-08 19:37 ` Krzysztof Kozlowski
2023-12-08 19:47 ` Sakari Ailus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox