2023-01-03 06:54:47

by Padmanabhan Rajanbabu

[permalink] [raw]
Subject: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for Tesla FSD

Add device tree node support for sound card on Tesla FSD board

Signed-off-by: Padmanabhan Rajanbabu <[email protected]>
---
arch/arm64/boot/dts/tesla/fsd-evb.dts | 37 +++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts
index e2fd49774f15..ce726bddfb50 100644
--- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
+++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
@@ -29,6 +29,43 @@
device_type = "memory";
reg = <0x0 0x80000000 0x2 0x00000000>;
};
+
+ sound {
+ compatible = "simple-audio-card";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ simple-audio-card,name = "FSD Audio Card";
+ simple-audio-card,widgets =
+ "Line", "Line Out",
+ "Line", "Line In";
+ simple-audio-card,routing =
+ "Line Out", "LLOUT",
+ "Line Out", "RLOUT",
+ "MIC2L", "Line In",
+ "MIC2R", "Line In";
+
+ status = "okay";
+
+ simple-audio-card,dai-link@0 {
+ reg = <0>;
+ format = "i2s";
+ bitclock-master = <&tlv320aic3x>;
+ frame-master = <&tlv320aic3x>;
+
+ cpu0 {
+ sound-dai = <&i2s_0 0>;
+ };
+ cpu1 {
+ sound-dai = <&i2s_0 1>;
+ };
+ codec {
+ sound-dai = <&tlv320aic3x>;
+ system-clock-frequency = <33000000>;
+ };
+ };
+ };
};

&fin_pll {
--
2.17.1


2023-01-03 11:31:04

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for Tesla FSD

On 03/01/2023 05:56, Padmanabhan Rajanbabu wrote:
> Add device tree node support for sound card on Tesla FSD board
>
> Signed-off-by: Padmanabhan Rajanbabu <[email protected]>
> ---
> arch/arm64/boot/dts/tesla/fsd-evb.dts | 37 +++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts b/arch/arm64/boot/dts/tesla/fsd-evb.dts
> index e2fd49774f15..ce726bddfb50 100644
> --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
> +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
> @@ -29,6 +29,43 @@
> device_type = "memory";
> reg = <0x0 0x80000000 0x2 0x00000000>;
> };
> +
> + sound {
> + compatible = "simple-audio-card";
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + simple-audio-card,name = "FSD Audio Card";
> + simple-audio-card,widgets =
> + "Line", "Line Out",

I don't think you need to break the line after '='.

> + "Line", "Line In";
> + simple-audio-card,routing =
> + "Line Out", "LLOUT",
> + "Line Out", "RLOUT",
> + "MIC2L", "Line In",
> + "MIC2R", "Line In";
> +
> + status = "okay";

Why?

> +
> + simple-audio-card,dai-link@0 {
> + reg = <0>;
> + format = "i2s";
> + bitclock-master = <&tlv320aic3x>;
> + frame-master = <&tlv320aic3x>;
> +
> + cpu0 {

Does not look like you tested the DTS against bindings. Please run `make
dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
for instructions).

> + sound-dai = <&i2s_0 0>;
> + };
> + cpu1 {
> + sound-dai = <&i2s_0 1>;
> + };
> + codec {
> + sound-dai = <&tlv320aic3x>;
> + system-clock-frequency = <33000000>;
> + };

Best regards,
Krzysztof

2023-01-09 05:02:44

by Padmanabhan Rajanbabu

[permalink] [raw]
Subject: RE: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for Tesla FSD



> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:[email protected]]
> Sent: 03 January 2023 04:43 PM
> To: Padmanabhan Rajanbabu <[email protected]>;
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]
> Subject: Re: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for Tesla
> FSD
>
> On 03/01/2023 05:56, Padmanabhan Rajanbabu wrote:
> > Add device tree node support for sound card on Tesla FSD board
> >
> > Signed-off-by: Padmanabhan Rajanbabu <[email protected]>
> > ---
> > arch/arm64/boot/dts/tesla/fsd-evb.dts | 37
> > +++++++++++++++++++++++++++
> > 1 file changed, 37 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts
> > b/arch/arm64/boot/dts/tesla/fsd-evb.dts
> > index e2fd49774f15..ce726bddfb50 100644
> > --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
> > +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
> > @@ -29,6 +29,43 @@
> > device_type = "memory";
> > reg = <0x0 0x80000000 0x2 0x00000000>;
> > };
> > +
> > + sound {
> > + compatible = "simple-audio-card";
> > +
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + simple-audio-card,name = "FSD Audio Card";
> > + simple-audio-card,widgets =
> > + "Line", "Line Out",
>
> I don't think you need to break the line after '='.

Okay, will change the same in the next patch set.

>
> > + "Line", "Line In";
> > + simple-audio-card,routing =
> > + "Line Out", "LLOUT",
> > + "Line Out", "RLOUT",
> > + "MIC2L", "Line In",
> > + "MIC2R", "Line In";
> > +
> > + status = "okay";
>
> Why?

Okay, I understood that if there is no status entry, it is
treated as "okay". I'll update the same in the next
patch set.

>
> > +
> > + simple-audio-card,dai-link@0 {
> > + reg = <0>;
> > + format = "i2s";
> > + bitclock-master = <&tlv320aic3x>;
> > + frame-master = <&tlv320aic3x>;
> > +
> > + cpu0 {
>
> Does not look like you tested the DTS against bindings. Please run `make
> dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
> for instructions).

I did not encounter any error while running dtbs_check for fsd-evb.dts

This is the command I executed
make dtbs_check > output.txt 2>&1

dt-mk-schema --version: 2022.11

Please let me know if I'm missing anything here.

>
> > + sound-dai = <&i2s_0 0>;
> > + };
> > + cpu1 {
> > + sound-dai = <&i2s_0 1>;
> > + };
> > + codec {
> > + sound-dai = <&tlv320aic3x>;
> > + system-clock-frequency = <33000000>;
> > + };
>
> Best regards,
> Krzysztof

Thanks,
Padmanabhan R.


2023-01-09 09:38:22

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for Tesla FSD

On 09/01/2023 05:05, Padmanabhan Rajanbabu wrote:
>
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski [mailto:[email protected]]
>> Sent: 03 January 2023 04:43 PM
>> To: Padmanabhan Rajanbabu <[email protected]>;
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected];
>> [email protected]; [email protected]; [email protected];
>> [email protected]; [email protected];
>> [email protected]
>> Cc: [email protected]; [email protected]; linux-
>> [email protected]; [email protected]
>> Subject: Re: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for Tesla
>> FSD
>>
>> On 03/01/2023 05:56, Padmanabhan Rajanbabu wrote:
>>> Add device tree node support for sound card on Tesla FSD board
>>>
>>> Signed-off-by: Padmanabhan Rajanbabu <[email protected]>
>>> ---
>>> arch/arm64/boot/dts/tesla/fsd-evb.dts | 37
>>> +++++++++++++++++++++++++++
>>> 1 file changed, 37 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts
>>> b/arch/arm64/boot/dts/tesla/fsd-evb.dts
>>> index e2fd49774f15..ce726bddfb50 100644
>>> --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
>>> +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
>>> @@ -29,6 +29,43 @@
>>> device_type = "memory";
>>> reg = <0x0 0x80000000 0x2 0x00000000>;
>>> };
>>> +
>>> + sound {
>>> + compatible = "simple-audio-card";
>>> +
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> +
>>> + simple-audio-card,name = "FSD Audio Card";
>>> + simple-audio-card,widgets =
>>> + "Line", "Line Out",
>>
>> I don't think you need to break the line after '='.
>
> Okay, will change the same in the next patch set.
>
>>
>>> + "Line", "Line In";
>>> + simple-audio-card,routing =
>>> + "Line Out", "LLOUT",
>>> + "Line Out", "RLOUT",
>>> + "MIC2L", "Line In",
>>> + "MIC2R", "Line In";
>>> +
>>> + status = "okay";
>>
>> Why?
>
> Okay, I understood that if there is no status entry, it is
> treated as "okay". I'll update the same in the next
> patch set.
>
>>
>>> +
>>> + simple-audio-card,dai-link@0 {
>>> + reg = <0>;
>>> + format = "i2s";
>>> + bitclock-master = <&tlv320aic3x>;
>>> + frame-master = <&tlv320aic3x>;
>>> +
>>> + cpu0 {
>>
>> Does not look like you tested the DTS against bindings. Please run `make
>> dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst
>> for instructions).
>
> I did not encounter any error while running dtbs_check for fsd-evb.dts
>
> This is the command I executed
> make dtbs_check > output.txt 2>&1
>
> dt-mk-schema --version: 2022.11
>
> Please let me know if I'm missing anything here.

You are right. I misread the pattern in simple-card.yaml. I'll fix the
file, so let's make these nodes: cpu-0 and cpu-1.

Best regards,
Krzysztof

2023-01-13 13:36:00

by Padmanabhan Rajanbabu

[permalink] [raw]
Subject: RE: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for Tesla FSD



> -----Original Message-----
> From: Krzysztof Kozlowski [mailto:[email protected]]
> Sent: 09 January 2023 01:58 PM
> To: Padmanabhan Rajanbabu <[email protected]>;
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]
> Subject: Re: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for Tesla
> FSD
>
> On 09/01/2023 05:05, Padmanabhan Rajanbabu wrote:
> >
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski [mailto:[email protected]]
> >> Sent: 03 January 2023 04:43 PM
> >> To: Padmanabhan Rajanbabu <[email protected]>;
> >> [email protected]; [email protected]; [email protected];
> >> [email protected]; [email protected];
> >> [email protected]; [email protected]; [email protected];
> >> [email protected]; [email protected];
> >> [email protected]
> >> Cc: [email protected]; [email protected]; linux-
> >> [email protected]; [email protected]
> >> Subject: Re: [PATCH v2 5/5] arm64: dts: fsd: Add sound card node for
> >> Tesla FSD
> >>
> >> On 03/01/2023 05:56, Padmanabhan Rajanbabu wrote:
> >>> Add device tree node support for sound card on Tesla FSD board
> >>>
> >>> Signed-off-by: Padmanabhan Rajanbabu <[email protected]>
> >>> ---
> >>> arch/arm64/boot/dts/tesla/fsd-evb.dts | 37
> >>> +++++++++++++++++++++++++++
> >>> 1 file changed, 37 insertions(+)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/tesla/fsd-evb.dts
> >>> b/arch/arm64/boot/dts/tesla/fsd-evb.dts
> >>> index e2fd49774f15..ce726bddfb50 100644
> >>> --- a/arch/arm64/boot/dts/tesla/fsd-evb.dts
> >>> +++ b/arch/arm64/boot/dts/tesla/fsd-evb.dts
> >>> @@ -29,6 +29,43 @@
> >>> device_type = "memory";
> >>> reg = <0x0 0x80000000 0x2 0x00000000>;
> >>> };
> >>> +
> >>> + sound {
> >>> + compatible = "simple-audio-card";
> >>> +
> >>> + #address-cells = <1>;
> >>> + #size-cells = <0>;
> >>> +
> >>> + simple-audio-card,name = "FSD Audio Card";
> >>> + simple-audio-card,widgets =
> >>> + "Line", "Line Out",
> >>
> >> I don't think you need to break the line after '='.
> >
> > Okay, will change the same in the next patch set.
> >
> >>
> >>> + "Line", "Line In";
> >>> + simple-audio-card,routing =
> >>> + "Line Out", "LLOUT",
> >>> + "Line Out", "RLOUT",
> >>> + "MIC2L", "Line In",
> >>> + "MIC2R", "Line In";
> >>> +
> >>> + status = "okay";
> >>
> >> Why?
> >
> > Okay, I understood that if there is no status entry, it is treated as
> > "okay". I'll update the same in the next patch set.
> >
> >>
> >>> +
> >>> + simple-audio-card,dai-link@0 {
> >>> + reg = <0>;
> >>> + format = "i2s";
> >>> + bitclock-master = <&tlv320aic3x>;
> >>> + frame-master = <&tlv320aic3x>;
> >>> +
> >>> + cpu0 {
> >>
> >> Does not look like you tested the DTS against bindings. Please run
> >> `make dtbs_check` (see
> >> Documentation/devicetree/bindings/writing-schema.rst
> >> for instructions).
> >
> > I did not encounter any error while running dtbs_check for fsd-evb.dts
> >
> > This is the command I executed
> > make dtbs_check > output.txt 2>&1
> >
> > dt-mk-schema --version: 2022.11
> >
> > Please let me know if I'm missing anything here.
>
> You are right. I misread the pattern in simple-card.yaml. I'll fix the file, so let's
> make these nodes: cpu-0 and cpu-1.

Okay, Thank you for confirming, I'll change the node names to cpu-0 and cpu-1

>
> Best regards,
> Krzysztof