Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC

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

 



Hi Geert,

Geert Uytterhoeven, Mon, Mar 02, 2020 16:32:32 +0100:
> > And this absence of documentation also means that whatever clocks (both input
> > in "clocks=" and output in "#clock-cells") listed in a specific .dts are just
> > an integration detail?
> 
> No, the absence probably means that any clock-related properties in a .dts
> file will just be ignored.
> 
> Looking at the driver source, it indeed has no support related to clocks at all.

...

> > Does this below makes more sense, than?
> >
> >     video-receiver@70 {
> >         compatible = "adi,adv7482";
> >         clocks = <&rcar_sound 3>;
> >         clock-names = "clk-hdmi-video";
> >         adv748x_mclk: mclk {
> >             compatible = "fixed-clock";
> >             #clock-cells =  <0>;
> >             /* frequency hard-coded for illustration */
> >             clock-frequency = <12288000>;
> >             clock-output-names = "clk-hdmi-i2s-mclk";
> >         };
> >     };
> 
> The #clock-cells should be in the main video-receiver node.
> Probably there is more than one clock output, so #clock-cells may be 1?

AFAICS, the device can provide only this one clock line (audio master clock
for I2S output)... I shall re-check, just in case.

> There is no need for a fixed-clock compatible, nor for clock-frequency
> and clock-output-names.
> 
> But most important: this should be documented in the adv748x DT bindings,
> and implemented in the adv748x driver.

So if the driver is to export that clock for the kernel (like in this case),
it must implement its support?

> > > > Does a "clocks = ..." statement always mean input clocks?
> > >
> > > Yes it does.
> > > If a device has clock outputs and is thus a clock provider, it should
> > > have a #clock-cells property, and this should be documented in the bindings.
> > >
> > > A clock consumer will refer to clocks of a provider using the "clocks"
> > > property, specifying a clock specifier (phandle and zero or more indices)
> > > for each clock referenced.
> >
> > Something like this?
> >
> >     &rcar_sound {
> >         clocks = ...,
> >                  <&adv748x_mclk>,
> >                  <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
> >         clock-names = ...,
> >                       "clk_c",
> >                       "clk_i";
> >     };
> 
> More or less.
> 
> Might become
> 
>     find_a_better_label_choice: video-receiver@70 {
>             ...
>     };
> 
>     &rcar_sound {
>             clock = ...,
>                     <&find_a_better_label_choice 0>,
>                     ...
>     };
> 
> as there may be multiple clock outputs on the ADV7482.

I see. Working on it.

Thanks a lot!

Regards,
Alex




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux