From nobody Mon Oct 6 08:32:32 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A52A27A915 for ; Wed, 23 Jul 2025 08:30:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753259404; cv=none; b=dd+K8hDDMdNbvF3Jn8rut7KtemmbYGgA3xPZ5gXv2RHWZEC9bvH96xy1XERwTIblxwR7hYz48pLsRxegM6JsnmFzaiWqL8BT4uBYkQX5gE3Ztb8v9Vs0toDCaDollZ4utERCdKN7sNz3dlRF043KTljqP7hkqn6d8iVai0XSyy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753259404; c=relaxed/simple; bh=ypX3F6FEtHUpWnHV8fMyxlBQTRUCX2vP8Ra6yftMLBk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=dq+phU7+4CZ4QRNd4BSxS+8tgvb3wm42xYvxQBLUjPnL9SbNpqDlp5jTXWKOYiGNC1aNQvUpsLeFbKsJMRLOz62vz8t/yoje3WS8GFPacs0k0wrLCng95v/6MrC0sTWpHatmzMSiFTFCt5L3gFEfV19Wdtvcsa0i3N1S6EZB2W8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZMY87mwA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZMY87mwA" Received: by smtp.kernel.org (Postfix) with ESMTPS id BDF53C4CEE7; Wed, 23 Jul 2025 08:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753259403; bh=ypX3F6FEtHUpWnHV8fMyxlBQTRUCX2vP8Ra6yftMLBk=; h=From:Date:Subject:To:Cc:Reply-To:From; b=ZMY87mwALtXEms6czrxU64yUF6Yk6GarkxRl9Ig6nmV3KwkmCeJBwU2ELq9ACUo4k E00Al66kQ/605d1XlKkKYUf+c32L2iAMltkADQ+1vsyPl86hEeaGPp6HxOLfuVFbPI Pe+z137Xe6n4WflJ66OWgpCMV+lGpnHxbvR3pIyPThCFULW2YdzJeOaABwplk8SDPV 7LYbeIATMEXJDD+THyJfye62IZpDH/6ow1YD7OqXHdL+RG6RELc4ckcBz5IdkA4ew6 xWIM0gP8LCqLgVDxarpIFW5+Hrsbo/N3YDBhTXFDiKqCg3zcYcosechHSGKqNW3QBp TCY+SOokyA8NQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B44F8C83F1A; Wed, 23 Jul 2025 08:30:03 +0000 (UTC) From: leqi via B4 Relay Date: Wed, 23 Jul 2025 16:29:29 +0800 Subject: [PATCH] arm64: dts: qcom: Add initial audio support for Hamoa-IOT-EVK Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250723-initial_audio_support_for_qualcomm_hamoa_iot_evk_board-v1-1-816991701952@quicinc.com> X-B4-Tracking: v=1; b=H4sIAHqdgGgC/zWO2wqDMBBEf0Xy3IgXVJRS+h9Fwmo2dWl1NVEpi P/eoO3LwJmHObMJh5bQiSrYhMWVHPHgIb4Eou1geKIk7VkkUZJFRZJKGmgmeCtYNLFyyziynZV hq6YF3i33veqgZ1DEs8L1pRoGq2Ua52mCugDdlMKPjxYNfQ7xoz7Z4rR4/3yWokfn4PBXwfXUx 7n8bZ8n5BrLSJrcZDoyJXjFnZ0L/0dCHzdR7/sXxSGqNOYAAAA= X-Change-ID: 20250723-initial_audio_support_for_qualcomm_hamoa_iot_evk_board-31632ed7adb9 To: kernel@oss.qualcomm.com Cc: linux-kernel@vger.kernel.org, kernel@quicinc.com, leqi X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1753259402; l=7930; i=quic_leqi@quicinc.com; s=20250723; h=from:subject:message-id; bh=a2svwikEYCyvL62ztRMaDH16IYFKiZybi/L8fuaDPN8=; b=qLLOkSPB5dda+w7KLGnBobNLNBp0YqM/dsAq09z6J3ZLB2SZSoAZHvDW7bF1Iyh3BEPwjSj/5 UOTZ23VbbMEB0KROVDmpL18K7bHSOkN0aYWyYebBSnn+SNcY34+AYgw X-Developer-Key: i=quic_leqi@quicinc.com; a=ed25519; pk=zFi/rGGqo+G9Nw0VmaL7OqH7uu58kmZCRPPUqE9PH64= X-Endpoint-Received: by B4 Relay for quic_leqi@quicinc.com/20250723 with auth_id=465 X-Original-From: leqi Reply-To: quic_leqi@quicinc.com From: leqi This patch adds initial audio codec support for the Hamoa-IOT-EVK board, including WCD9385 configuration, micbias voltage settings, GPIO reset, and power supply bindings. It enables basic audio functionality for testing and development. Signed-off-by: leqi --- This patch adds initial audio codec support for the Qualcomm Hamoa-IOT-EVK = board. It brings up the WCD9385 codec with basic configuration, including micbias = voltage settings, GPIO reset handling, and power supply bindings. The DTS changes are adapted from the existing X1 CRD DTS and have not yet b= een validated on Hamoa-IOT-EVK hardware. They are intended to enable initial br= ing-up and provide a foundation for further testing and development. --- arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 232 +++++++++++++++++++++++++= ++++ 1 file changed, 232 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts b/arch/arm64/boot/d= ts/qcom/hamoa-iot-evk.dts index 843f39c9d59286a9303a545411b2518d7649a059..91618e22e86c46c698b3639f60b= c19314705b391 100644 --- a/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts +++ b/arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts @@ -124,6 +124,94 @@ pmic_glink_ss2_con_sbu_in: endpoint { }; }; =20 + sound { + compatible =3D "qcom,x1e80100-sndcard"; + model =3D "X1E80100-EVK"; + audio-routing =3D "WooferLeft IN", "WSA WSA_SPK1 OUT", + "TweeterLeft IN", "WSA WSA_SPK2 OUT", + "WooferRight IN", "WSA2 WSA_SPK2 OUT", + "TweeterRight IN", "WSA2 WSA_SPK2 OUT", + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "AMIC2", "MIC BIAS2", + "VA DMIC0", "MIC BIAS3", + "VA DMIC1", "MIC BIAS3", + "VA DMIC2", "MIC BIAS1", + "VA DMIC3", "MIC BIAS1", + "VA DMIC0", "VA MIC BIAS3", + "VA DMIC1", "VA MIC BIAS3", + "VA DMIC2", "VA MIC BIAS1", + "VA DMIC3", "VA MIC BIAS1", + "TX SWR_INPUT1", "ADC2_OUTPUT"; + + wcd-playback-dai-link { + link-name =3D "WCD Playback"; + + cpu { + sound-dai =3D <&q6apmbedai RX_CODEC_DMA_RX_0>; + }; + + codec { + sound-dai =3D <&wcd938x 0>, <&swr1 0>, <&lpass_rxmacro 0>; + }; + + platform { + sound-dai =3D <&q6apm>; + }; + }; + + wcd-capture-dai-link { + link-name =3D "WCD Capture"; + + cpu { + sound-dai =3D <&q6apmbedai TX_CODEC_DMA_TX_3>; + }; + + codec { + sound-dai =3D <&wcd938x 1>, <&swr2 1>, <&lpass_txmacro 0>; + }; + + platform { + sound-dai =3D <&q6apm>; + }; + }; + + wsa-dai-link { + link-name =3D "WSA Playback"; + + cpu { + sound-dai =3D <&q6apmbedai WSA_CODEC_DMA_RX_0>; + }; + + codec { + sound-dai =3D <&left_woofer>, <&left_tweeter>, + <&swr0 0>, <&lpass_wsamacro 0>, + <&right_woofer>, <&right_tweeter>, + <&swr3 0>, <&lpass_wsa2macro 0>; + }; + + platform { + sound-dai =3D <&q6apm>; + }; + }; + + va-dai-link { + link-name =3D "VA Capture"; + + cpu { + sound-dai =3D <&q6apmbedai VA_CODEC_DMA_TX_0>; + }; + + codec { + sound-dai =3D <&lpass_vamacro 0>; + }; + + platform { + sound-dai =3D <&q6apm>; + }; + }; + }; + vph_pwr: regulator-vph-pwr { compatible =3D "regulator-fixed"; =20 @@ -353,6 +441,33 @@ vreg_wwan: regulator-wwan { regulator-boot-on; }; =20 + wcd938x: audio-codec { + compatible =3D "qcom,wcd9385-codec"; + + pinctrl-names =3D "default"; + pinctrl-0 =3D <&wcd_default>; + + reset-gpios =3D <&tlmm 191 GPIO_ACTIVE_LOW>; + + qcom,micbias1-microvolt =3D <1800000>; + qcom,micbias2-microvolt =3D <1800000>; + qcom,micbias3-microvolt =3D <1800000>; + qcom,micbias4-microvolt =3D <1800000>; + qcom,mbhc-buttons-vthreshold-microvolt =3D <75000 150000 237000 500000 + 500000 500000 500000 500000>; + qcom,mbhc-headset-vthreshold-microvolt =3D <1700000>; + qcom,mbhc-headphone-vthreshold-microvolt =3D <50000>; + qcom,rx-device =3D <&wcd_rx>; + qcom,tx-device =3D <&wcd_tx>; + + vdd-buck-supply =3D <&vreg_l15b_1p8>; + vdd-rxtx-supply =3D <&vreg_l15b_1p8>; + vdd-io-supply =3D <&vreg_l15b_1p8>; + vdd-mic-bias-supply =3D <&vreg_bob1>; + + #sound-dai-cells =3D <1>; + }; + wcn7850-pmu { compatible =3D "qcom,wcn7850-pmu"; =20 @@ -572,6 +687,32 @@ retimer_ss1_con_sbu_out: endpoint { }; }; =20 +&lpass_tlmm { + spkr_01_sd_n_active: spkr-01-sd-n-active-state { + pins =3D "gpio12"; + function =3D "gpio"; + drive-strength =3D <16>; + bias-disable; + output-low; + }; + + spkr_23_sd_n_active: spkr-23-sd-n-active-state { + pins =3D "gpio13"; + function =3D "gpio"; + drive-strength =3D <16>; + bias-disable; + output-low; + }; +}; + +&lpass_vamacro { + pinctrl-0 =3D <&dmic01_default>, <&dmic23_default>; + pinctrl-names =3D "default"; + + vdd-micb-supply =3D <&vreg_l1b_1p8>; + qcom,dmic-sample-rate =3D <4800000>; +}; + &pcie6a { vddpe-3v3-supply =3D <&vreg_nvme>; }; @@ -645,6 +786,90 @@ &smb2360_2_eusb2_repeater { vdd3-supply =3D <&vreg_l8b_3p0>; }; =20 +&swr0 { + status =3D "okay"; + + pinctrl-0 =3D <&wsa_swr_active>, <&spkr_01_sd_n_active>; + pinctrl-names =3D "default"; + + /* WSA8845, Left Woofer */ + left_woofer: speaker@0,0 { + compatible =3D "sdw20217020400"; + reg =3D <0 0>; + reset-gpios =3D <&lpass_tlmm 12 GPIO_ACTIVE_LOW>; + #sound-dai-cells =3D <0>; + sound-name-prefix =3D "WooferLeft"; + vdd-1p8-supply =3D <&vreg_l15b_1p8>; + vdd-io-supply =3D <&vreg_l12b_1p2>; + qcom,port-mapping =3D <1 2 3 7 10 13>; + }; + + /* WSA8845, Left Tweeter */ + left_tweeter: speaker@0,1 { + compatible =3D "sdw20217020400"; + reg =3D <0 1>; + reset-gpios =3D <&lpass_tlmm 12 GPIO_ACTIVE_LOW>; + #sound-dai-cells =3D <0>; + sound-name-prefix =3D "TweeterLeft"; + vdd-1p8-supply =3D <&vreg_l15b_1p8>; + vdd-io-supply =3D <&vreg_l12b_1p2>; + qcom,port-mapping =3D <4 5 6 7 11 13>; + }; +}; + +&swr1 { + status =3D "okay"; + + /* WCD9385 RX */ + wcd_rx: codec@0,4 { + compatible =3D "sdw20217010d00"; + reg =3D <0 4>; + qcom,rx-port-mapping =3D <1 2 3 4 5>; + }; +}; + +&swr2 { + status =3D "okay"; + + /* WCD9385 TX */ + wcd_tx: codec@0,3 { + compatible =3D "sdw20217010d00"; + reg =3D <0 3>; + qcom,tx-port-mapping =3D <2 2 3 4>; + }; +}; + +&swr3 { + status =3D "okay"; + + pinctrl-0 =3D <&wsa2_swr_active>, <&spkr_23_sd_n_active>; + pinctrl-names =3D "default"; + + /* WSA8845, Right Woofer */ + right_woofer: speaker@0,0 { + compatible =3D "sdw20217020400"; + reg =3D <0 0>; + reset-gpios =3D <&lpass_tlmm 13 GPIO_ACTIVE_LOW>; + #sound-dai-cells =3D <0>; + sound-name-prefix =3D "WooferRight"; + vdd-1p8-supply =3D <&vreg_l15b_1p8>; + vdd-io-supply =3D <&vreg_l12b_1p2>; + qcom,port-mapping =3D <1 2 3 7 10 13>; + }; + + /* WSA8845, Right Tweeter */ + right_tweeter: speaker@0,1 { + compatible =3D "sdw20217020400"; + reg =3D <0 1>; + reset-gpios =3D <&lpass_tlmm 13 GPIO_ACTIVE_LOW>; + #sound-dai-cells =3D <0>; + sound-name-prefix =3D "TweeterRight"; + vdd-1p8-supply =3D <&vreg_l15b_1p8>; + vdd-io-supply =3D <&vreg_l12b_1p2>; + qcom,port-mapping =3D <4 5 6 7 11 13>; + }; +}; + &tlmm { eusb3_reset_n: eusb3-reset-n-state { pins =3D "gpio6"; @@ -733,6 +958,13 @@ usb2_pwr_3p3_reg_en: usb2-pwr-3p3-reg-en-state { bias-disable; }; =20 + wcd_default: wcd-reset-n-active-state { + pins =3D "gpio191"; + function =3D "gpio"; + drive-strength =3D <16>; + bias-disable; + output-low; + }; =20 wcn_bt_en: wcn-bt-en-state { pins =3D "gpio116"; --- base-commit: 3b28da3245e8c43f3f5948513b4e859a3d0fa820 change-id: 20250723-initial_audio_support_for_qualcomm_hamoa_iot_evk_board-= 31632ed7adb9 prerequisite-message-id: <20250716-hamoa_initial-v1-0-f6f5d0f9a163@oss.qual= comm.com> prerequisite-patch-id: 3c553b55d143eafc1036ce2e88df558ec61c4e83 prerequisite-patch-id: a4b2dabd376d32ecb159141c17113a8f3fc4ddfa prerequisite-patch-id: 24bf2ada12dc10f9980ed2c56347e5b6f7964ebd prerequisite-patch-id: c764e86c94055e56aaf9e701341bba52a54a998b Best regards, --=20 leqi