Qualcomm's lpass device tree changes for I2s dai
Subsystems (4)
v6 cover Qualcomm's lpass device tree changes for I2s dai
These patches are device tree changes to support audio over I2S. Changes Since v4:
-- Removed lpass macro in codec dai cell
-- Renamed multimedia dai codec alias name
Changes Since v4:
-- Removed duplication of dai-link in sound node.
-- Replaced reg values with common dt-bindings macros in coachz dtsi -- Included sc7180-lpass.h instead of qcom,lpass.h
-- Sound node placement change in coachz dtsi.
Changes Since v3:
-- Compatible name changed as per trogdor
Changes Since v2:
-- Sound node variable is added in sc7180-trogdor-coachz.dtsi. -- Audio-jack property is removed, as it may create conflicts with the boards
having different codecs.
-- Replaced reg values with common dt-bindings macros
Changes Since v1:
-- Ajith's Certification is added.
-- Alias name added for sound dai link node
Ajit Pandey (1):
arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver
Srinivasa Rao Mandadapu (1):
arm64: dts: qcom: Add sound node for sc7180-trogdor-coachz
.../boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 10 ++++ arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 58 +++++++++++++++++++ 2 files changed, 68 insertions(+)
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v6 1/2 arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver
From: Ajit Pandey <[email protected]>
Add dai link for supporting lpass I2S driver, which is used for audio capture and playback.
Add lpass-cpu node with pin controls and i2s primary and secondary dai-links
--- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+)
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +58 -0
@@ -9,6 +9,7 @@ #include <dt-bindings/input/gpio-keys.h> #include <dt-bindings/input/input.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> +#include <dt-bindings/sound/sc7180-lpass.h> /* PMICs depend on spmi_bus label and so must come after SoC */ #include "pm6150.dtsi"
@@ -283,6 +284,42 @@ keyboard_backlight: keyboard-backlight { max-brightness = <1023>; }; }; + + sound: sound { + compatible = "google,sc7180-trogdor"; + model = "sc7180-rt5682-max98357a-1mic"; + + audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + + #address-cells = <1>; + #size-cells = <0>; + + dai-link@0 { + link-name = "MultiMedia0"; + reg = <MI2S_PRIMARY>; + cpu { + sound-dai = <&lpass_cpu MI2S_PRIMARY>; + }; + + sound_multimedia0_codec: codec { + sound-dai = <&alc5682 0 /*aif1*/>; + }; + }; + + dai-link@1 { + link-name = "MultiMedia1"; + reg = <MI2S_SECONDARY>; + cpu { + sound-dai = <&lpass_cpu MI2S_SECONDARY>; + }; + + sound_multimedia1_codec: codec { + sound-dai = <&max98357a>; + }; + }; + }; }; &qfprom {
@@ -720,6 +757,27 @@ &ipa { modem-init; }; +&lpass_cpu { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&sec_mi2s_active &pri_mi2s_active &pri_mi2s_mclk_active>; + + #address-cells = <1>; + #size-cells = <0>; + + mi2s-primary@0 { + reg = <MI2S_PRIMARY>; + qcom,playback-sd-lines = <1>; + qcom,capture-sd-lines = <0>; + }; + + mi2s-secondary@1 { + reg = <MI2S_SECONDARY>; + qcom,playback-sd-lines = <0>; + }; +}; + &mdp { status = "okay"; };
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v6 1/2] arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver
Quoting Srinivasa Rao Mandadapu (2021-03-12 21:46:53)
Quoted 5 lines
From: Ajit Pandey <[email protected]>
Add dai link for supporting lpass I2S driver, which is used for audio capture and playback.
Add lpass-cpu node with pin controls and i2s primary
Why two spaces before 'pin'?
Quoted 1 line
and secondary dai-links
Please end sentence with a period.
Quoted 27 lines
Signed-off-by Ajit Pandey <[email protected]>Signed-off-by V Sujith Kumar Reddy <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>--- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+)arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +11
-0@@ -283,6 +284,42 @@ keyboard_backlight: keyboard-backlight { max-brightness = <1023>; }; }; + + sound: sound { + compatible = "google,sc7180-trogdor"; + model = "sc7180-rt5682-max98357a-1mic"; + + audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + + #address-cells = <1>; + #size-cells = <0>;
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi keyboard_backlight: keyboard-backlight { · line 307
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +10
-0+ + dai-link@0 { + link-name = "MultiMedia0"; + reg = <MI2S_PRIMARY>; + cpu { + sound-dai = <&lpass_cpu MI2S_PRIMARY>; + }; + + sound_multimedia0_codec: codec { + sound-dai = <&alc5682 0 /*aif1*/>;
Nitpick, add a space for comment
sound-dai = <&alc5682 0 /* aif1 */>;
Quoted 19 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +15
-0+ }; + }; + + dai-link@1 { + link-name = "MultiMedia1"; + reg = <MI2S_SECONDARY>; + cpu { + sound-dai = <&lpass_cpu MI2S_SECONDARY>; + }; + + sound_multimedia1_codec: codec { + sound-dai = <&max98357a>; + }; + }; + }; }; &qfprom {
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi &ipa { · line 764
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +5
-0@@ -720,6 +757,27 @@ &ipa { modem-init; }; +&lpass_cpu { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&sec_mi2s_active &pri_mi2s_active &pri_mi2s_mclk_active>;
Super nitpick: I prefer this style
pinctrl-0 = <&sec_mi2s_active>, <&pri_mi2s_active>, <&pri_mi2s_mclk_active>;
It's effectively the same but the brackets help us see that these are the end of the phandle specifier instead of having to figure out that the first phandle isn't specifying the second phandle as an argument.
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi &ipa { · line 769
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +5
-0+ + #address-cells = <1>; + #size-cells = <0>; + + mi2s-primary@0 {
Should the node name just be mi2s instead of mi2s-primary? We have reg property so I think 'mi2s' should be sufficient to differentiate.
Quoted 14 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +11
-0+ reg = <MI2S_PRIMARY>; + qcom,playback-sd-lines = <1>; + qcom,capture-sd-lines = <0>; + }; + + mi2s-secondary@1 { + reg = <MI2S_SECONDARY>; + qcom,playback-sd-lines = <0>; + }; +}; + &mdp { status = "okay"; };
Re: [PATCH v6 1/2] arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver
Hi Stephen,
Thanks for Your Time and Inputs!!!
Quoted 49 lines · Stephen Boyd
Quoting Srinivasa Rao Mandadapu (2021-03-12 21:46:53)
Quoted 5 lines
From: Ajit Pandey <[email protected]>
Add dai link for supporting lpass I2S driver, which is used for audio capture and playback.
Add lpass-cpu node with pin controls and i2s primaryWhy two spaces before 'pin'?
Quoted 1 line
and secondary dai-links
Please end sentence with a period.
Quoted 26 lines
Signed-off-by Ajit Pandey <[email protected]>Signed-off-by V Sujith Kumar Reddy <[email protected]>Signed-off-by Srinivasa Rao Mandadapu <[email protected]>--- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+)arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +11
-0@@ -283,6 +284,42 @@ keyboard_backlight: keyboard-backlight { max-brightness = <1023>; }; }; + + sound: sound { + compatible = "google,sc7180-trogdor"; + model = "sc7180-rt5682-max98357a-1mic"; + + audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + + #address-cells = <1>; + #size-cells = <0>;arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi keyboard_backlight: keyboard-backlight { · line 307
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +10
-0+ + dai-link@0 { + link-name = "MultiMedia0"; + reg = <MI2S_PRIMARY>; + cpu { + sound-dai = <&lpass_cpu MI2S_PRIMARY>; + }; + + sound_multimedia0_codec: codec { + sound-dai = <&alc5682 0 /*aif1*/>;Nitpick, add a space for comment
Quoted 1 line
sound-dai = <&alc5682 0 /* aif1 */>;
Okay. Will re post with Fix.
Quoted 30 lines
Quoted 20 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +15
-0+ }; + }; + + dai-link@1 { + link-name = "MultiMedia1"; + reg = <MI2S_SECONDARY>; + cpu { + sound-dai = <&lpass_cpu MI2S_SECONDARY>; + }; + + sound_multimedia1_codec: codec { + sound-dai = <&max98357a>; + }; + }; + }; }; &qfprom {arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi &ipa { · line 764
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +5
-0@@ -720,6 +757,27 @@ &ipa { modem-init; }; +&lpass_cpu { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&sec_mi2s_active &pri_mi2s_active &pri_mi2s_mclk_active>;Super nitpick: I prefer this style
Quoted 5 lines
pinctrl-0 = <&sec_mi2s_active>, <&pri_mi2s_active>, <&pri_mi2s_mclk_active>;It's effectively the same but the brackets help us see that these are the end of the phandle specifier instead of having to figure out that the first phandle isn't specifying the second phandle as an argument.
Okay. Will change accordingly.
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi &ipa { · line 769
Quoted 6 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +5
-0+ + #address-cells = <1>; + #size-cells = <0>; + + mi2s-primary@0 {Should the node name just be mi2s instead of mi2s-primary? We have reg property so I think 'mi2s' should be sufficient to differentiate.
Okay. I will change it as mi2s@0 instead of mi2s-primary@0
Quoted 15 lines
Quoted 15 lines
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +11
-0+ reg = <MI2S_PRIMARY>; + qcom,playback-sd-lines = <1>; + qcom,capture-sd-lines = <0>; + }; + + mi2s-secondary@1 { + reg = <MI2S_SECONDARY>; + qcom,playback-sd-lines = <0>; + }; +}; + &mdp { status = "okay"; };
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
PATCH v6 2/2 arm64: dts: qcom: Add sound node for sc7180-trogdor-coachz
In reply to Srinivasa Rao MandadapuThis is a trgodor variant, required to have sound node variable for coachz specific platform.
--- arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi +10 -0
@@ -89,6 +89,16 @@ &sn65dsi86_out { data-lanes = <0 1 2 3>; }; +&sound { + compatible = "google,sc7180-coachz"; + model = "sc7180-adau7002-max98357a"; + audio-routing = "PDM_DAT", "DMIC"; +}; + +&sound_multimedia0_codec { + sound-dai = <&adau7002>; +}; + /* PINCTRL - modifications to sc7180-trogdor.dtsi */ &en_pp3300_dx_edp {
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Re: [PATCH v6 2/2] arm64: dts: qcom: Add sound node for sc7180-trogdor-coachz
Quoting Srinivasa Rao Mandadapu (2021-03-12 21:46:54)
Quoted 5 lines
This is a trgodor variant, required to have sound node variable for coachz specific platform.
Signed-off-by Srinivasa Rao Mandadapu <[email protected]>---