Re: [PATCH 2/3] dt-bindings: media: i2c: Add vision-components,mipi-module-controller
From: Laurent Pinchart
Date: Thu Sep 17 2026 - 04:20:24 EST
On Thu, Sep 17, 2026 at 10:08:15AM +0200, Krzysztof Kozlowski wrote:
> On 17/09/2026 09:55, Richard Leitner wrote:
> >> There is no "clocks" property in the binding. If there is input, then
> >> there is a "clocks".
> >>
> >> Then we never describe external oscillators with "clock-frequency"
> >> property. ACPI does, but not DT.
> >
> > So how would that be best solved in DT?
> >
> > Should there be a "fixed-clock" child node for that external oscillator?
> > Something like:
> >
> > vc_mipi_ctrl: controller@10 {
> > ...
> >
> > vc_mipi_clk: clock {
> > compatible = "fixed-clock";
> > #clock-cells = <0>;
> > clock-frequency = <37125000>;
> > };
> >
>
> Oh, wait, I misread. The external oscillator is not external to the
> module? Below...
>
> > i2c-tunnel {
> > ...
> >
> > vc_mipi_sensor: camera@60 {
> > ...
> >
> > clocks = <&vc_mipi_clk>;
> > clock-names = "inck";
> > };
> > };
> >
> > Or should (as discussed in the other branch of this thread) there be a
> > separate compatible for every vc-mipi sensor variant board? Then this
> > could also be part of the compatible-dependent driver data.
> >
> > Or are there any other/better approaches to this?
> >
> >>
> >>
> >>> uses it for internal purpose, and also to provide a clock to the sensor.
> >>> Very roughly speaking, and ignoring power supplies as we focus on the
> >>> clocks, the camera module is architectured this way:
> >>>
> >>> Connector
> >>> || +--------+
> >>> || <------------ MIPI CSI-2 ------------ | |
> >>> || +-------+ | |
> >>> || <--- I2C ---> | | <--- I2C ---> | Sensor |
> >>> || | FPGA | | |
> >>> || | | --- Clock --> | |
> >>> || +-------+ +--------+
> >>> ^
> >>> |
> >>> +-------+
> >>> | Clock |
> >>> | Osc. |
> >>> +-------+
> >>>
> >>> The frequency of the external clock oscillator is what the
> >>> clock-frequency models.
>
> ... this sentence confused me. If the oscillator is part of the module,
> then clock-frequency property is applicable or it is implied by the
> compatible.
Our replies have crossed each other. I should have waited, it would have
saved me time writing a long message :-)
Yes, the external oscillator is in the module. That's why I initially
proposed using the clock-frequency property. We could still model it as
a separate DT node (see my other e-mail), but I think it brings
complexity for little gain.
--
Regards,
Laurent Pinchart