Re: [PATCH v15 1/2] media: dt-bindings: media: i2c: Document OV02A10 bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 19, 2020 at 9:20 PM Tomasz Figa <tfiga@xxxxxxxxxxxx> wrote:
>
> On Mon, Oct 19, 2020 at 10:28 AM Sakari Ailus
> <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> >
> > On Wed, Oct 14, 2020 at 01:48:00PM +0200, Tomasz Figa wrote:
> > > On Wed, Oct 14, 2020 at 10:31 AM Sakari Ailus
> > > <sakari.ailus@xxxxxxxxxxxxxxx> wrote:
> > > >
> > > > On Wed, Oct 14, 2020 at 10:10:18AM +0800, Dongchun Zhu wrote:
> > > > > Hello Sakari,
> > > > >
> > > > > Thanks for your timely review.
> > > > >
> > > > > On Tue, 2020-10-13 at 19:19 +0300, Sakari Ailus wrote:
> > > > > > Hi Dongchun,
> > > > > >
> > > > > > On Tue, Oct 13, 2020 at 09:05:02PM +0800, Dongchun Zhu wrote:
> > > > > > > Add YAML device tree binding for OV02A10 CMOS image sensor, and the
> > > > > > > relevant MAINTAINERS entries.
> > > > > > >
> > > > > > > Signed-off-by: Dongchun Zhu <dongchun.zhu@xxxxxxxxxxxx>
> > > > > > > ---
> > > > > > >  .../bindings/media/i2c/ovti,ov02a10.yaml           | 162 +++++++++++++++++++++
> > > > > > >  MAINTAINERS                                        |   7 +
> > > > > > >  2 files changed, 169 insertions(+)
> > > > > > >  create mode 100644 Documentation/devicetree/bindings/media/i2c/ovti,ov02a10.yaml
> > > > > > >
> > > > >
> > > > > [snip]...
> > > > >
> > > > > > > +  ovti,mipi-clock-voltage:
> > > > > > > +    description:
> > > > > > > +      An array of 2-tuples items, and each item consists of link frequency and
> > > > > > > +      MIPI clock voltage unit like <freq-kHz volt-unit>. Clock voltage unit is
> > > > > > > +      dependent upon link speed, indicating MIPI transmission speed select that
> > > > > > > +      controls D-PHY timing setting by adjusting MIPI clock voltage to improve
> > > > > > > +      the clock driver capability.
> > > > > > > +    $ref: "/schemas/types.yaml#/definitions/uint32-array"
> > > > > > > +    minItems: 2
> > > > > > > +    default: [390000, 4]
> > > > > >
> > > > > > Why do you have the link frequency here as well?
> > > > > >
> > > > > > In principle this does belong to the endpoint as link frequencies are
> > > > > > specific to that, but I don't mind; there's just a single port anyway.
> > > > > >
> > > > >
> > > > > This is an optional property which we model as an array of <link speed,
> > > > > clock voltage> pairs. An example to have all link speeds up to 390MHz
> > > > > use the value 4 for current driver. If one wants to select different
> > > > > voltage for different link, they could do so as well.
> > > >
> > > > If you think you'd need that, then you need to put this to the endpoint.
> > >
> > > The mipi-clock-voltage property is not a property of the endpoint. The
> > > link frequency there does not set the link frequency - it only
> > > specifies which link frequency the given voltage should be used for.
> >
> > If it is not bound to the endpoint --- that specifies the properties of the
> > link --- then you could just put it to the driver, couldn't you?
> >
> > But earlier on, we established that this is specific to a given board, or a
> > given link. Endpoints are used to describe connections that a device may
> > have to other devices. Therefore their properties are different.
> >
> > The graph bindings allow for several endpoints on a single physical port,
> > some may be disabled in that case. This is admittedly mostly done with
> > CSI-2 receivers.
> >
> > Either way, putting this property to the device may affect how DT source is
> > arranged for boards that have this device. Any similar configuration on
> > other devices with multiple transmitters or receivers would be in endpoints
> > anyway --- because they have to, so I don't see why bindings for this
> > device should be different.
> >
> > If you put it to endpoint, the driver also doesn't need to match the link
> > frequencies in kHz and Hz between the two properties, but just use the same
> > index for both.
>
> I agree in general, but I think in this case this is a device-specific
> property and the sensor only has 1 CSI-2 interface, so maybe it
> doesn't really matter?
>
> Specifying frequency, voltage pairs is a common practice in other
> bindings, such as the OPP bindings, by the way.
>
> That said, if you insist, I'm fine with this being moved to the
> endpoint node too.

Is the conclusion that it needs to be moved?

Best regards,
Tomasz



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux