[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200302160906.GC3717@pflmari>
Date: Mon, 2 Mar 2020 17:09:06 +0100
From: Alex Riesen <alexander.riesen@...itec.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
CC: Kieran Bingham <kieran.bingham@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
"Laurent Pinchart" <laurent.pinchart@...asonboard.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
driverdevel <devel@...verdev.osuosl.org>,
Linux Media Mailing List <linux-media@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCH 8/8] arm64: dts: renesas: salvator: add a connection from
adv748x codec (HDMI input) to the R-Car SoC
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
Powered by blists - more mailing lists