2022-09-30 16:02:25

by Judy Hsiao

[permalink] [raw]
Subject: [PATCH v5 0/3] Add dtsi for sc7280 boards that using rt5682

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.

Change Since V4
- Rebase and include sc7280-herobrine-villager-r0.dts change.

Changes Since V3:
- Remove Change-Id in the commit message.
- Add dependency in cover letter.

Changes Since V2:
- Fix sc7280-herobrine-audio-rt5682.dtsi syntax.

Changes Since V1:
- Not to include the herobrine-villager-r0.dts changes in this patch
series to avoid conflict.

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 herobrine-r1 and villager-r0

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

--
2.37.3.998.g577e59143f-goog


2022-09-30 16:03:07

by Judy Hsiao

[permalink] [raw]
Subject: [PATCH v5 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]>
Reviewed-by: Matthias Kaehlcke <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
---
.../qcom/sc7280-herobrine-audio-rt5682.dtsi | 122 ++++++++++++++++++
1 file changed, 122 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..2dbdeeb29ece
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi
@@ -0,0 +1,122 @@
+// 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.37.3.998.g577e59143f-goog

2022-09-30 18:44:50

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH v5 0/3] Add dtsi for sc7280 boards that using rt5682

Judy,

On Fri, Sep 30, 2022 at 8:36 AM Judy Hsiao <[email protected]> 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.
>
> Change Since V4
> - Rebase and include sc7280-herobrine-villager-r0.dts change.
>
> Changes Since V3:
> - Remove Change-Id in the commit message.
> - Add dependency in cover letter.
>
> Changes Since V2:
> - Fix sc7280-herobrine-audio-rt5682.dtsi syntax.
>
> Changes Since V1:
> - Not to include the herobrine-villager-r0.dts changes in this patch
> series to avoid conflict.
>
> 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 herobrine-r1 and villager-r0
>
> .../qcom/sc7280-herobrine-audio-rt5682.dtsi | 122 ++++++++++++++++++
> .../qcom/sc7280-herobrine-herobrine-r1.dts | 1 +
> .../dts/qcom/sc7280-herobrine-villager-r0.dts | 1 +
> .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 30 +++++
> 4 files changed, 154 insertions(+)
> create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi

Your two posts today were a bit confusing. You really need something
in the explaining what's going on. Specifically:

1. You posted a "v5" upstream a week ago [1].

2. Then you posted another "v5" [2] today.

3. Finally, you posted this "v5" [3] today.

They are all marked "v5" and there's nothing to explain why there are
3 versions of v5.

--

Better would have been:

a) Use some type of "prefix" in the subject line to help people
understand that the contents are the same as the previous "v5" patch
and this is just a new posting. Usually people will use "REPOST" or
"RESEND". So, for instance, the subject line for your cover letter
could have been "[RESEND PATCH v5 0/3] Add dtsi for sc7280 boards that
using rt5682". All of the individual patches would have also had the
"RESEND" in their subject.

b) You should explain somewhere _why_ you're re-sending the patches.
If you've got a cover letter (like you do), the cover letter is the
perfect place to explain why you're resending the patch. If you didn't
have a cover letter, you can explain "after the cut".

Brian's patch [4] is a great example of this. He has both the hint in
the subject line and an explanation: "Resending, because I missed the
mailing lists on the first version."

--

In your case, I assume you were trying to get Bjorn's email address
correct as I requested a week ago. Thus, I would have expected your
first patch from today [2] to say something like "I'm resending patch
v5 to get Bjorn's email address correct. Other than that this is
exactly the same as the previous v5". Then, I would have expected your
second patch from today [3] to say something like "Oops, I still
didn't get Bjorn's email address right in the earlier patch today.
Trying yet again. Contents of all of the v5 patches are identical"

--

In any case, I'm not expecting you to send yet-another v5, but hopefully:
* This explains to Bjorn what's going on this time.
* You'll know better for next time.


[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
[3] https://lore.kernel.org/r/[email protected]
[4] https://lore.kernel.org/r/20210907094628.RESEND.1.If29cd838efbcee4450a62b8d84a99b23c86e0a3f@changeid/