Add support for sound on Arduino UNO Q board, which includes
- Headset playback and record.
- Lineout
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
.../boot/dts/qcom/qrb2210-arduino-imola.dts | 137 ++++++++++++++++++
1 file changed, 137 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
index 197ab6eb1666..f36f7ff96252 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
@@ -109,6 +109,98 @@ multi-led {
leds = <&ledr>, <&ledg>, <&ledb>;
};
+ sound {
+ compatible = "qcom,qrb2210-sndcard";
+ model = "Arduino-Imola-HPH-LOUT";
+ audio-routing = "IN1_HPHL", "HPHL_OUT",
+ "IN2_HPHR", "HPHR_OUT",
+ "AMIC2", "MIC BIAS2";
+
+ mm1-dai-link {
+ link-name = "MultiMedia1";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ mm2-dai-link {
+ link-name = "MultiMedia2";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
+ };
+ };
+
+ mm3-dai-link {
+ link-name = "MultiMedia3";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
+ };
+ };
+
+ hph-playback-dai-link {
+ link-name = "HPH Playback";
+ cpu {
+ sound-dai = <&q6afedai RX_CODEC_DMA_RX_0>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&pmic4125_codec 0>, <&swr1 0>, <&rxmacro 0>;
+ };
+ };
+
+ lo-playback-dai-link {
+ link-name = "LO Playback";
+ cpu {
+ sound-dai = <&q6afedai RX_CODEC_DMA_RX_0>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&pmic4125_codec 0>, <&swr1 0>, <&rxmacro 0>;
+ };
+ };
+
+ ear-playback-dai-link {
+ link-name = "Ear Playback";
+ cpu {
+ sound-dai = <&q6afedai RX_CODEC_DMA_RX_0>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&pmic4125_codec 0>, <&swr1 0>, <&rxmacro 0>;
+ };
+ };
+
+ hph-capture-dai-link {
+ link-name = "HP Capture";
+ cpu {
+ sound-dai = <&q6afedai TX_CODEC_DMA_TX_3>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+
+ codec {
+ sound-dai = <&pmic4125_codec 1>, <&swr0 0>, <&txmacro 0>;
+ };
+ };
+ };
+
/* PM4125 charger out, supplied by VBAT */
vph_pwr: regulator-vph-pwr {
compatible = "regulator-fixed";
@@ -333,6 +425,51 @@ spidev@0 {
};
};
+&spmi_bus {
+ pmic@0 {
+ pmic4125_codec: audio-codec@f000{
+ compatible = "qcom,pm4125-codec";
+ reg =<0xf000>;
+ vdd-io-supply = <&pm4125_l15>;
+ vdd-cp-supply = <&pm4125_s4>;
+ vdd-pa-vpos-supply = <&pm4125_s4>;
+
+ vdd-mic-bias-supply = <&pm4125_l22>;
+ qcom,micbias1-microvolt = <1800000>;
+ qcom,micbias2-microvolt = <1800000>;
+ qcom,micbias3-microvolt = <1800000>;
+
+ qcom,rx-device = <&pm4125_rx>;
+ qcom,tx-device = <&pm4125_tx>;
+ #sound-dai-cells = <1>;
+ };
+ };
+};
+
+&swr0 {
+ pinctrl-0 = <&lpass_tx_swr_active>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ pm4125_tx: codec@0,3 {
+ compatible = "sdw20217010c00";
+ reg = <0 3>;
+ qcom,tx-port-mapping = <1 1 2 3>;
+ };
+};
+
+&swr1 {
+ pinctrl-0 = <&lpass_rx_swr_active>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ pm4125_rx: codec@0,4 {
+ compatible = "sdw20217010c00";
+ reg = <0 4>;
+ qcom,rx-port-mapping = <1 2 3 4 5>;
+ };
+};
+
&tlmm {
spidev_cs: spidev-cs-state {
pins = "gpio17";
--
2.47.3
On 2/9/26 3:24 PM, Srinivas Kandagatla wrote:
> Add support for sound on Arduino UNO Q board, which includes
> - Headset playback and record.
> - Lineout
Looking at the images, I can't see a speaker there..
And looking at https://docs.arduino.cc/resources/pinouts/ABX00162-full-pinout.pdf
I *thiiink* there's no I2S out (which is a little surprising)
[...]
> + hph-playback-dai-link {
> + link-name = "HPH Playback";
> + cpu {
> + sound-dai = <&q6afedai RX_CODEC_DMA_RX_0>;
> + };
> +
> + platform {
> + sound-dai = <&q6routing>;
> + };
> +
> + codec {
> + sound-dai = <&pmic4125_codec 0>, <&swr1 0>, <&rxmacro 0>;
> + };
> + };
> +
> + lo-playback-dai-link {
> + link-name = "LO Playback";
"Line Out", "Headphones", etc.? I know if it's user-visible..
> + cpu {
> + sound-dai = <&q6afedai RX_CODEC_DMA_RX_0>;
> + };
> +
> + platform {
> + sound-dai = <&q6routing>;
> + };
> +
> + codec {
> + sound-dai = <&pmic4125_codec 0>, <&swr1 0>, <&rxmacro 0>;
> + };
> + };
> +
> + ear-playback-dai-link {
> + link-name = "Ear Playback";
> + cpu {
Let's uniformly keep a newline between the last property and the following
subnodes, and let's sort all these nodes alphabetically (i.e. both under
/sound and codec/cpu/platform within them)
[...]
> +&spmi_bus {
> + pmic@0 {
> + pmic4125_codec: audio-codec@f000{
This definition should definitely live in pm4125.dtsi!
missing space before '{'
> + compatible = "qcom,pm4125-codec";
> + reg =<0xf000>;
missing space after '='
> + vdd-io-supply = <&pm4125_l15>;
> + vdd-cp-supply = <&pm4125_s4>;
> + vdd-pa-vpos-supply = <&pm4125_s4>;
> +
> + vdd-mic-bias-supply = <&pm4125_l22>;
> + qcom,micbias1-microvolt = <1800000>;
> + qcom,micbias2-microvolt = <1800000>;
> + qcom,micbias3-microvolt = <1800000>;
> +
> + qcom,rx-device = <&pm4125_rx>;
> + qcom,tx-device = <&pm4125_tx>;
> + #sound-dai-cells = <1>;
> + };
> + };
> +};
> +
> +&swr0 {
> + pinctrl-0 = <&lpass_tx_swr_active>;
> + pinctrl-names = "default";
> + status = "okay";
Please add a \n before status
otherwise this looks ok
Konrad
© 2016 - 2026 Red Hat, Inc.