Add sound node for sc7280 based audioreach platforms.
Include audioreach dtsi into crd-rev3 platform specific dts file.
Also remove phandle to sound node, as audio routing is same as
audioreach specific dtsi file.
Signed-off-by: Srinivasa Rao Mandadapu <[email protected]>
Tested-by: Mohammad Rafi Shaik <[email protected]>
---
arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts | 25 +----
.../qcom/sc7280-herobrine-audioreach-wcd9385.dtsi | 112 +++++++++++++++++++++
2 files changed, 113 insertions(+), 24 deletions(-)
create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi
diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
index b024626..aea8cbd 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
+++ b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
@@ -8,7 +8,7 @@
/dts-v1/;
#include "sc7280-idp.dtsi"
-#include "sc7280-audio-idp.dtsi"
+#include "sc7280-herobrine-audioreach-wcd9385.dtsi"
#include "sc7280-idp-ec-h1.dtsi"
/ {
@@ -88,29 +88,6 @@ ap_ts_pen_1v8: &i2c13 {
pins = "gpio51";
};
-&sound {
- audio-routing =
- "IN1_HPHL", "HPHL_OUT",
- "IN2_HPHR", "HPHR_OUT",
- "AMIC1", "MIC BIAS1",
- "AMIC2", "MIC BIAS2",
- "VA DMIC0", "MIC BIAS1",
- "VA DMIC1", "MIC BIAS1",
- "VA DMIC2", "MIC BIAS3",
- "VA DMIC3", "MIC BIAS3",
- "TX SWR_ADC0", "ADC1_OUTPUT",
- "TX SWR_ADC1", "ADC2_OUTPUT",
- "TX SWR_ADC2", "ADC3_OUTPUT",
- "TX SWR_DMIC0", "DMIC1_OUTPUT",
- "TX SWR_DMIC1", "DMIC2_OUTPUT",
- "TX SWR_DMIC2", "DMIC3_OUTPUT",
- "TX SWR_DMIC3", "DMIC4_OUTPUT",
- "TX SWR_DMIC4", "DMIC5_OUTPUT",
- "TX SWR_DMIC5", "DMIC6_OUTPUT",
- "TX SWR_DMIC6", "DMIC7_OUTPUT",
- "TX SWR_DMIC7", "DMIC8_OUTPUT";
-};
-
&wcd9385 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&wcd_reset_n>, <&us_euro_hs_sel>;
diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi
new file mode 100644
index 0000000..1eac94e1
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi
@@ -0,0 +1,112 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * sc7280 device tree source for boards using Max98360 and wcd9385 codec
+ * along with ADSP
+ *
+ * Copyright (c) 2022, The Linux Foundation. All rights reserved.
+ */
+
+#include <dt-bindings/sound/qcom,q6afe.h>
+#include <dt-bindings/soc/qcom,gpr.h>
+#include <dt-bindings/clock/qcom,lpass-sc7280.h>
+
+/{
+ /* BOARD-SPECIFIC TOP LEVEL NODES */
+ sound: sound {
+ compatible = "google,sc7280-herobrine";
+ model = "SC7280-AUDIOREACH";
+ status = "okay";
+ adsp-mode;
+ audio-routing =
+ "IN1_HPHL", "HPHL_OUT",
+ "IN2_HPHR", "HPHR_OUT",
+ "AMIC1", "MIC BIAS1",
+ "AMIC2", "MIC BIAS2",
+ "VA DMIC0", "MIC BIAS1",
+ "VA DMIC1", "MIC BIAS1",
+ "VA DMIC2", "MIC BIAS3",
+ "VA DMIC3", "MIC BIAS3",
+ "TX SWR_ADC0", "ADC1_OUTPUT",
+ "TX SWR_ADC1", "ADC2_OUTPUT",
+ "TX SWR_ADC2", "ADC3_OUTPUT",
+ "TX SWR_DMIC0", "DMIC1_OUTPUT",
+ "TX SWR_DMIC1", "DMIC2_OUTPUT",
+ "TX SWR_DMIC2", "DMIC3_OUTPUT",
+ "TX SWR_DMIC3", "DMIC4_OUTPUT",
+ "TX SWR_DMIC4", "DMIC5_OUTPUT",
+ "TX SWR_DMIC5", "DMIC6_OUTPUT",
+ "TX SWR_DMIC6", "DMIC7_OUTPUT",
+ "TX SWR_DMIC7", "DMIC8_OUTPUT";
+
+ qcom,msm-mbhc-hphl-swh = <1>;
+ qcom,msm-mbhc-gnd-swh = <1>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #sound-dai-cells = <0>;
+
+ dai-link@0 {
+ link-name = "WCD9385 Playback";
+ reg = <0>;
+
+ cpu {
+ sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
+ };
+ codec {
+ sound-dai = <&wcd9385 0>, <&swr0 0>, <&lpass_rx_macro 0>;
+ };
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ dai-link@1 {
+ link-name = "WCD9385 Capture";
+ reg = <1>;
+
+ cpu {
+ sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
+ };
+ codec {
+ sound-dai = <&wcd9385 1>, <&swr1 0>, <&lpass_tx_macro 0>;
+ };
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ dai-link@2 {
+ link-name = "MAX98360A";
+ reg = <3>;
+
+ cpu {
+ sound-dai = <&q6apmbedai SECONDARY_MI2S_RX>;
+ };
+
+ codec {
+ sound-dai = <&max98360a>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ dai-link@3 {
+ link-name = "DMIC";
+ reg = <4>;
+
+ cpu {
+ sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
+ };
+
+ codec {
+ sound-dai = <&lpass_va_macro 0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+ };
+};
--
2.7.4
Hi Srinivasa,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20221220]
[also build test ERROR on linus/master]
[cannot apply to robh/for-next v6.1 v6.1-rc8 v6.1-rc7 v6.1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Srinivasa-Rao-Mandadapu/arm64-dts-qcom-sc7280-Extract-audio-nodes-from-common-idp-dtsi-file/20221222-175339
patch link: https://lore.kernel.org/r/1671702170-24781-3-git-send-email-quic_srivasam%40quicinc.com
patch subject: [PATCH 2/7] arm64: dts: qcom: sc7280: audioreach: Add sound node
config: arm64-allyesconfig
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/26819e04611062852015659fa831b7bd39627e06
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Srinivasa-Rao-Mandadapu/arm64-dts-qcom-sc7280-Extract-audio-nodes-from-common-idp-dtsi-file/20221222-175339
git checkout 26819e04611062852015659fa831b7bd39627e06
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
>> Error: arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts:91.1-9 Label or path wcd9385 not found
FATAL ERROR: Syntax error parsing input tree
--
0-DAY CI Kernel Test Service
https://01.org/lkp
On 22/12/2022 10:42, Srinivasa Rao Mandadapu wrote:
> Add sound node for sc7280 based audioreach platforms.
>
> Include audioreach dtsi into crd-rev3 platform specific dts file.
> Also remove phandle to sound node, as audio routing is same as
> audioreach specific dtsi file.
>
> Signed-off-by: Srinivasa Rao Mandadapu <[email protected]>
> Tested-by: Mohammad Rafi Shaik <[email protected]>
> ---
> arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts | 25 +----
> .../qcom/sc7280-herobrine-audioreach-wcd9385.dtsi | 112 +++++++++++++++++++++
> 2 files changed, 113 insertions(+), 24 deletions(-)
> create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi
>
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
> index b024626..aea8cbd 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
> +++ b/arch/arm64/boot/dts/qcom/sc7280-crd-r3.dts
> @@ -8,7 +8,7 @@
> /dts-v1/;
>
> #include "sc7280-idp.dtsi"
> -#include "sc7280-audio-idp.dtsi"
> +#include "sc7280-herobrine-audioreach-wcd9385.dtsi"
> #include "sc7280-idp-ec-h1.dtsi"
>
> / {
> @@ -88,29 +88,6 @@ ap_ts_pen_1v8: &i2c13 {
> pins = "gpio51";
> };
>
> -&sound {
> - audio-routing =
> - "IN1_HPHL", "HPHL_OUT",
> - "IN2_HPHR", "HPHR_OUT",
> - "AMIC1", "MIC BIAS1",
> - "AMIC2", "MIC BIAS2",
> - "VA DMIC0", "MIC BIAS1",
> - "VA DMIC1", "MIC BIAS1",
> - "VA DMIC2", "MIC BIAS3",
> - "VA DMIC3", "MIC BIAS3",
> - "TX SWR_ADC0", "ADC1_OUTPUT",
> - "TX SWR_ADC1", "ADC2_OUTPUT",
> - "TX SWR_ADC2", "ADC3_OUTPUT",
> - "TX SWR_DMIC0", "DMIC1_OUTPUT",
> - "TX SWR_DMIC1", "DMIC2_OUTPUT",
> - "TX SWR_DMIC2", "DMIC3_OUTPUT",
> - "TX SWR_DMIC3", "DMIC4_OUTPUT",
> - "TX SWR_DMIC4", "DMIC5_OUTPUT",
> - "TX SWR_DMIC5", "DMIC6_OUTPUT",
> - "TX SWR_DMIC6", "DMIC7_OUTPUT",
> - "TX SWR_DMIC7", "DMIC8_OUTPUT";
> -};
> -
> &wcd9385 {
> pinctrl-names = "default", "sleep";
> pinctrl-0 = <&wcd_reset_n>, <&us_euro_hs_sel>;
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi
> new file mode 100644
> index 0000000..1eac94e1
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audioreach-wcd9385.dtsi
> @@ -0,0 +1,112 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * sc7280 device tree source for boards using Max98360 and wcd9385 codec
> + * along with ADSP
> + *
> + * Copyright (c) 2022, The Linux Foundation. All rights reserved.
> + */
> +
> +#include <dt-bindings/sound/qcom,q6afe.h>
> +#include <dt-bindings/soc/qcom,gpr.h>
> +#include <dt-bindings/clock/qcom,lpass-sc7280.h>
> +
> +/{
> + /* BOARD-SPECIFIC TOP LEVEL NODES */
> + sound: sound {
> + compatible = "google,sc7280-herobrine";
> + model = "SC7280-AUDIOREACH";
> + status = "okay";
> + adsp-mode;
> + audio-routing =
> + "IN1_HPHL", "HPHL_OUT",
> + "IN2_HPHR", "HPHR_OUT",
> + "AMIC1", "MIC BIAS1",
> + "AMIC2", "MIC BIAS2",
> + "VA DMIC0", "MIC BIAS1",
> + "VA DMIC1", "MIC BIAS1",
> + "VA DMIC2", "MIC BIAS3",
> + "VA DMIC3", "MIC BIAS3",
> + "TX SWR_ADC0", "ADC1_OUTPUT",
> + "TX SWR_ADC1", "ADC2_OUTPUT",
> + "TX SWR_ADC2", "ADC3_OUTPUT",
> + "TX SWR_DMIC0", "DMIC1_OUTPUT",
> + "TX SWR_DMIC1", "DMIC2_OUTPUT",
> + "TX SWR_DMIC2", "DMIC3_OUTPUT",
> + "TX SWR_DMIC3", "DMIC4_OUTPUT",
> + "TX SWR_DMIC4", "DMIC5_OUTPUT",
> + "TX SWR_DMIC5", "DMIC6_OUTPUT",
> + "TX SWR_DMIC6", "DMIC7_OUTPUT",
> + "TX SWR_DMIC7", "DMIC8_OUTPUT";
> +
> + qcom,msm-mbhc-hphl-swh = <1>;
> + qcom,msm-mbhc-gnd-swh = <1>;
> +
> + #address-cells = <1>;
> + #size-cells = <0>;
> + #sound-dai-cells = <0>;
> +
> + dai-link@0 {
> + link-name = "WCD9385 Playback";
> + reg = <0>;
> +
> + cpu {
> + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
Just one space.
> + };
> + codec {
> + sound-dai = <&wcd9385 0>, <&swr0 0>, <&lpass_rx_macro 0>;
> + };
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + dai-link@1 {
> + link-name = "WCD9385 Capture";
> + reg = <1>;
> +
> + cpu {
> + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
> + };
> + codec {
> + sound-dai = <&wcd9385 1>, <&swr1 0>, <&lpass_tx_macro 0>;
> + };
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + dai-link@2 {
> + link-name = "MAX98360A";
Amplifier playback?
> + reg = <3>;
> +
> + cpu {
> + sound-dai = <&q6apmbedai SECONDARY_MI2S_RX>;
> + };
> +
> + codec {
> + sound-dai = <&max98360a>;
No redundant whitespaces around =.
> + };
> +
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> +
> + dai-link@3 {
> + link-name = "DMIC";
> + reg = <4>;
> +
> + cpu {
> + sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
> + };
> +
> + codec {
> + sound-dai = <&lpass_va_macro 0>;
> + };
> +
> + platform {
> + sound-dai = <&q6apm>;
> + };
> + };
> + };
> +};
Best regards,
Krzysztof