2022-05-25 14:42:22

by Judy Hsiao

[permalink] [raw]
Subject: [v3 0/3] Add dtsi for sc7280 herobrine boards that using rt5682 codec

Put sound node and lpass_cpu node settings for boards that use rt5682
codec in the sc7280-herobrine-audio-rt5682.dtsi as there are different
choices of headset codec for herobrine projects. Common audio setting
for the internal speaker is in sc7280-herobrine.dtsi.

This series depends on:
"Add lpass pin control support for audio on sc7280 based targets" [1]
"Add soundcard support for sc7280 based platforms" [2]

[1]
https://patchwork.kernel.org/project/linux-arm-msm/list/?series=638776
[2]
https://patchwork.kernel.org/project/linux-arm-msm/list/?series=643589


Changes Since V2:
-- Add bias-disable for i2s ws line.
-- Fix typo in the commit message.

Changes Since V1:
-- Remove sound-dai-cells in sound node.
-- Add dependency list.
-- Update patch subject.

Judy Hsiao (3):
arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1
arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi
arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi
in villager and herobrine-r1

.../qcom/sc7280-herobrine-audio-rt5682.dtsi | 121 ++++++++++++++++++
.../qcom/sc7280-herobrine-herobrine-r1.dts | 1 +
.../dts/qcom/sc7280-herobrine-villager-r0.dts | 1 +
.../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 15 +++
4 files changed, 138 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi

--
2.36.1.124.g0e6072fb45-goog



2022-05-25 20:01:42

by Judy Hsiao

[permalink] [raw]
Subject: [v3 2/3] arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi

Audio dtsi for sc7280 boards that using rt5682 headset codec:
1. Add dt nodes for sound card which use I2S playback and record
through rt5682s and I2S playback through max98357a.
2. Enable lpass cpu node and add pin control and dai-links.

Signed-off-by: Judy Hsiao <[email protected]>
---
.../qcom/sc7280-herobrine-audio-rt5682.dtsi | 121 ++++++++++++++++++
1 file changed, 121 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi

diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi
new file mode 100644
index 000000000000..ec8f2e555a14
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ *
+ * This file defines the common audio settings for the child boards using rt5682 codec.
+ *
+ * Copyright 2022 Google LLC.
+ */
+
+/ {
+ /* BOARD-SPECIFIC TOP LEVEL NODES */
+ sound: sound {
+ compatible = "google,sc7280-herobrine";
+ model = "sc7280-rt5682-max98360a-1mic";
+
+ status = "okay";
+ audio-routing =
+ "Headphone Jack", "HPOL",
+ "Headphone Jack", "HPOR";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dai-link@0 {
+ link-name = "MAX98360";
+ reg = <0>;
+
+ cpu {
+ sound-dai = <&lpass_cpu MI2S_SECONDARY>;
+ };
+
+ codec {
+ sound-dai = <&max98360a>;
+ };
+ };
+
+ dai-link@1 {
+ link-name = "ALC5682";
+ reg = <1>;
+
+ cpu {
+ sound-dai = <&lpass_cpu MI2S_PRIMARY>;
+ };
+
+ codec {
+ sound-dai = <&alc5682 0 /* aif1 */>;
+ };
+ };
+ };
+};
+
+hp_i2c: &i2c2 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ alc5682: codec@1a {
+ compatible = "realtek,rt5682s";
+ reg = <0x1a>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_irq>;
+
+ #sound-dai-cells = <1>;
+
+ interrupt-parent = <&tlmm>;
+ interrupts = <101 IRQ_TYPE_EDGE_BOTH>;
+
+ AVDD-supply = <&pp1800_alc5682>;
+ MICVDD-supply = <&pp3300_codec>;
+
+ realtek,dmic1-data-pin = <1>;
+ realtek,dmic1-clk-pin = <2>;
+ realtek,jd-src = <1>;
+ realtek,dmic-clk-rate-hz = <2048000>;
+ };
+};
+
+&lpass_cpu {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&mi2s0_data0 &mi2s0_data1 &mi2s0_mclk &mi2s0_sclk &mi2s0_ws
+ &mi2s1_data0 &mi2s1_sclk &mi2s1_ws>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dai-link@0 {
+ reg = <MI2S_PRIMARY>;
+ qcom,playback-sd-lines = <1>;
+ qcom,capture-sd-lines = <0>;
+ };
+
+ dai-link@1 {
+ reg = <MI2S_SECONDARY>;
+ qcom,playback-sd-lines = <0>;
+ };
+};
+
+&mi2s0_data0 {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&mi2s0_data1 {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&mi2s0_mclk {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&mi2s0_sclk {
+ drive-strength = <6>;
+ bias-disable;
+};
+
+&mi2s0_ws {
+ drive-strength = <6>;
+ bias-disable;
+};
--
2.36.1.124.g0e6072fb45-goog


2022-05-26 00:34:43

by Judy Hsiao

[permalink] [raw]
Subject: [v3 3/3] arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1

Include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1 as
these boards use rt5682 codec.

Signed-off-by: Judy Hsiao <[email protected]>
---
arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts | 1 +
arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts | 1 +
2 files changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts b/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts
index b69ca09d9bfb..f68d28f8701b 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts
@@ -8,6 +8,7 @@
/dts-v1/;

#include "sc7280-herobrine.dtsi"
+#include "sc7280-herobrine-audio-rt5682.dtsi"

/ {
model = "Google Herobrine (rev1+)";
diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts
index d3d6ffad4eff..7a4acd3b9ee3 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts
@@ -8,6 +8,7 @@
/dts-v1/;

#include "sc7280-herobrine.dtsi"
+#include "sc7280-herobrine-audio-rt5682.dtsi"

/ {
model = "Google Villager (rev0+)";
--
2.36.1.124.g0e6072fb45-goog


2022-05-26 04:44:11

by Doug Anderson

[permalink] [raw]
Subject: Re: [v3 2/3] arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi

Hi,

On Tue, May 24, 2022 at 6:43 PM Judy Hsiao <[email protected]> wrote:
>
> Audio dtsi for sc7280 boards that using rt5682 headset codec:
> 1. Add dt nodes for sound card which use I2S playback and record
> through rt5682s and I2S playback through max98357a.
> 2. Enable lpass cpu node and add pin control and dai-links.
>
> Signed-off-by: Judy Hsiao <[email protected]>
> ---
> .../qcom/sc7280-herobrine-audio-rt5682.dtsi | 121 ++++++++++++++++++
> 1 file changed, 121 insertions(+)

Reviewed-by: Douglas Anderson <[email protected]>

2022-05-26 12:41:27

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [v3 3/3] arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1

On Wed, May 25, 2022 at 01:43:08AM +0000, Judy Hsiao wrote:
> Include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1 as
> these boards use rt5682 codec.
>
> Signed-off-by: Judy Hsiao <[email protected]>

Reviewed-by: Matthias Kaehlcke <[email protected]>

and you for v2 you also had:

Reviewed-by: Douglas Anderson <[email protected]>

2022-05-26 17:22:12

by Doug Anderson

[permalink] [raw]
Subject: Re: [v3 3/3] arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1

Hi,

On Tue, May 24, 2022 at 6:43 PM Judy Hsiao <[email protected]> wrote:
>
> Include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1 as
> these boards use rt5682 codec.
>
> Signed-off-by: Judy Hsiao <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts | 1 +
> arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts | 1 +
> 2 files changed, 2 insertions(+)

Should have carried my review from v2:

Reviewed-by: Douglas Anderson <[email protected]>

2022-05-28 02:53:45

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [v3 2/3] arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi

On Wed, May 25, 2022 at 01:43:07AM +0000, Judy Hsiao wrote:
> Audio dtsi for sc7280 boards that using rt5682 headset codec:
> 1. Add dt nodes for sound card which use I2S playback and record
> through rt5682s and I2S playback through max98357a.
> 2. Enable lpass cpu node and add pin control and dai-links.
>
> Signed-off-by: Judy Hsiao <[email protected]>

Reviewed-by: Matthias Kaehlcke <[email protected]>

2022-06-26 02:57:19

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [v3 0/3] Add dtsi for sc7280 herobrine boards that using rt5682 codec

On Tue 24 May 20:43 CDT 2022, Judy Hsiao wrote:

> Put sound node and lpass_cpu node settings for boards that use rt5682
> codec in the sc7280-herobrine-audio-rt5682.dtsi as there are different
> choices of headset codec for herobrine projects. Common audio setting
> for the internal speaker is in sc7280-herobrine.dtsi.
>
> This series depends on:
> "Add lpass pin control support for audio on sc7280 based targets" [1]
> "Add soundcard support for sc7280 based platforms" [2]
>
> [1]
> https://patchwork.kernel.org/project/linux-arm-msm/list/?series=638776

Afaict this is applied.

> [2]
> https://patchwork.kernel.org/project/linux-arm-msm/list/?series=643589
>

But [2] doesn't compile and hence this series doesn't compile.

Can you please submit a single series with all the audio dts patches you
want me to apply, where it's possible to run "make dtbs" after every
single patch in the series.

Thanks,
Bjorn

>
> Changes Since V2:
> -- Add bias-disable for i2s ws line.
> -- Fix typo in the commit message.
>
> Changes Since V1:
> -- Remove sound-dai-cells in sound node.
> -- Add dependency list.
> -- Update patch subject.
>
> Judy Hsiao (3):
> arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1
> arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi
> arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi
> in villager and herobrine-r1
>
> .../qcom/sc7280-herobrine-audio-rt5682.dtsi | 121 ++++++++++++++++++
> .../qcom/sc7280-herobrine-herobrine-r1.dts | 1 +
> .../dts/qcom/sc7280-herobrine-villager-r0.dts | 1 +
> .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 15 +++
> 4 files changed, 138 insertions(+)
> create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi
>
> --
> 2.36.1.124.g0e6072fb45-goog
>

2022-06-27 16:07:18

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [v3 0/3] Add dtsi for sc7280 herobrine boards that using rt5682 codec

On Sat, Jun 25, 2022 at 09:50:57PM -0500, Bjorn Andersson wrote:
> On Tue 24 May 20:43 CDT 2022, Judy Hsiao wrote:
>
> > Put sound node and lpass_cpu node settings for boards that use rt5682
> > codec in the sc7280-herobrine-audio-rt5682.dtsi as there are different
> > choices of headset codec for herobrine projects. Common audio setting
> > for the internal speaker is in sc7280-herobrine.dtsi.
> >
> > This series depends on:
> > "Add lpass pin control support for audio on sc7280 based targets" [1]
> > "Add soundcard support for sc7280 based platforms" [2]
> >
> > [1]
> > https://patchwork.kernel.org/project/linux-arm-msm/list/?series=638776
>
> Afaict this is applied.
>
> > [2]
> > https://patchwork.kernel.org/project/linux-arm-msm/list/?series=643589
> >
>
> But [2] doesn't compile and hence this series doesn't compile.

If I'm not mistaken the main contender is the "Add support for audio clock
gating resets for SC7280" series [1], which still has open comments.

[1] https://patchwork.kernel.org/project/linux-arm-msm/list/?series=650267

> Can you please submit a single series with all the audio dts patches you
> want me to apply, where it's possible to run "make dtbs" after every
> single patch in the series.
>
> Thanks,
> Bjorn
>
> >
> > Changes Since V2:
> > -- Add bias-disable for i2s ws line.
> > -- Fix typo in the commit message.
> >
> > Changes Since V1:
> > -- Remove sound-dai-cells in sound node.
> > -- Add dependency list.
> > -- Update patch subject.
> >
> > Judy Hsiao (3):
> > arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1
> > arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi
> > arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi
> > in villager and herobrine-r1
> >
> > .../qcom/sc7280-herobrine-audio-rt5682.dtsi | 121 ++++++++++++++++++
> > .../qcom/sc7280-herobrine-herobrine-r1.dts | 1 +
> > .../dts/qcom/sc7280-herobrine-villager-r0.dts | 1 +
> > .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 15 +++
> > 4 files changed, 138 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi
> >
> > --
> > 2.36.1.124.g0e6072fb45-goog
> >

2022-09-13 19:28:58

by Matthias Kaehlcke

[permalink] [raw]
Subject: Re: [v3 3/3] arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1

Hi Judy,

this patch needs a re-spin to fix a conflict after

Add new board revision and LTE SKUs for sc7280-villager family
https://patchwork.kernel.org/project/linux-arm-msm/list/?series=663014

landed.

Thanks

Matthias

On Wed, May 25, 2022 at 01:43:08AM +0000, Judy Hsiao wrote:
> Include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1 as
> these boards use rt5682 codec.
>
> Signed-off-by: Judy Hsiao <[email protected]>
> Reviewed-by: Matthias Kaehlcke <[email protected]>
> Reviewed-by: Douglas Anderson <[email protected]>
> Reviewed-by: Douglas Anderson <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts | 1 +
> arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts b/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts
> index b69ca09d9bfb..f68d28f8701b 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts
> @@ -8,6 +8,7 @@
> /dts-v1/;
>
> #include "sc7280-herobrine.dtsi"
> +#include "sc7280-herobrine-audio-rt5682.dtsi"
>
> / {
> model = "Google Herobrine (rev1+)";
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts
> index d3d6ffad4eff..7a4acd3b9ee3 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts
> @@ -8,6 +8,7 @@
> /dts-v1/;
>
> #include "sc7280-herobrine.dtsi"
> +#include "sc7280-herobrine-audio-rt5682.dtsi"
>
> / {
> model = "Google Villager (rev0+)";

2022-10-18 03:27:00

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [v3 0/3] Add dtsi for sc7280 herobrine boards that using rt5682 codec

On Wed, 25 May 2022 01:43:05 +0000, Judy Hsiao wrote:
> Put sound node and lpass_cpu node settings for boards that use rt5682
> codec in the sc7280-herobrine-audio-rt5682.dtsi as there are different
> choices of headset codec for herobrine projects. Common audio setting
> for the internal speaker is in sc7280-herobrine.dtsi.
>
> This series depends on:
> "Add lpass pin control support for audio on sc7280 based targets" [1]
> "Add soundcard support for sc7280 based platforms" [2]
>
> [...]

Applied, thanks!

[1/3] arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1
commit: a1afae1ac6e71f9995fd87fea3a116859fd64fe1
[2/3] arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi
commit: 1c5b7afeaf5b6568dc2f36d444d70ad9f6632582
[3/3] arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi in villager and herobrine-r1
(no commit info)

Best regards,
--
Bjorn Andersson <[email protected]>