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

Alex Riesen
2020-03-02T13:40:28Z

Geert Uytterhoeven, Mon, Mar 02, 2020 13:28:13 +0100:
> Hi Alex,
>
> Thanks for your patch!
>
> On Mon, Jan 13, 2020 at 3:24 PM Alex Riesen
> <alexander.riesen@cetitec.com> wrote:
> > Not sure if all variants of the Salvator board have the HDMI decoder
> > chip (the ADV7482) connected to the SSI4 on R-Car SoC, as it is on
> > Salvator-X ES1, so the the ADV7482 endpoint and connection definitions
> > are placed in the board file.
>
> Both Salvator-X and Salvator-XS have SSI4 wired to the ADV7482.
>
> > I do assume though that all Salvator variants have the CLK_C clock line
> > hard-wired to the ADV7482 HDMI decoder, and remove it from the list of
> > clocks provided by the R-Car sound system.
>
> Yes, both Salvator-X and Salvator-XS have it wired that way.

Ok, seems like I can move that part into the common file as well.
Integrations of ADV7482 and R-Car which use salvator-common.dts can still
redefine the endpoint settings in their board files, right?

> But please see below.

...

> > The I2C wiring is also likely to persist across the variants (similar
> > to ak4613, connected to the same interface), so that is in the common
> > file.
> >
> > Signed-off-by: Alexander Riesen <alexander.riesen@cetitec.com>
>
> Below are my comments w.r.t. the board-specific wiring.
> I'll defer to the multimedia people for commenting on the audio parts.
>
> BTW, what is the status of the other patches in this series?

"Submitted", at the moment. Besides you and Rob Herring no one said anything
yet (either that or I missed the replies).

> > --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
> > @@ -322,6 +322,10 @@
> > clock-frequency = <22579200>;
> > };
> >
> > +&audio_clk_c {
> > + clock-frequency = <12288000>;
> > +};
>
> Does the ADV7482 always generate a 12.288 MHz clock signal?
> Or is this programmable?

Oops. It looks like it is and the value is derived from the sampling rate
(48kHz) and the master clock multiplier. Both hard-coded in the board file.

> > video-receiver@70 {
> > compatible = "adi,adv7482";
> > ...
> > + clocks = <&rcar_sound 3>, <&audio_clk_c>;
> > + clock-names = "clk-hdmi-video", "clk-hdmi-i2s-mclk";
>
> The above declares the Audio CLK C to be a clock input of the ADV7482, while
> it is an output.

I would gladly give it right direction if I *really* understood what I was
doing...

> Furthermore, the DT bindings do not document that clocks can be specified.

Should the DT bindings document that the clock cannot be specified than?

> > @@ -686,7 +700,8 @@
> > };
> >
> > sound_pins: sound {
> > - groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
> > + groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a",
> > + "ssi4_data";
>
> Missing "ss4_ctrl", for the SCK4 and WS4 pins.

I'll add them.
As the device seems to function even without thoes, does this mean the pins in
the group are used "on demand" by whatever needs them?

> > @@ -760,8 +775,18 @@
> > <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
> > <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
> > <&audio_clk_a>, <&cs2000>,
> > - <&audio_clk_c>,
>
> Why remove it? This is the list of clock inputs, not outputs.

...probably because I was thinking the specification was exactly the other way
around.

Does a "clocks = ..." statement always mean input clocks?

I shall correct that and re-test (might take a while, I don't have the
hardware anymore).

Thanks for looking!
Regards,
Alex