Asus Zenbook A14 improvements
cover Asus Zenbook A14 improvements
First round of improvements for Asus Zenbook A14 which has just landed to linux-next.
* First patch updates DTs from v5 to v7 that was mailed earlier. Fixes GPU enable and mistake in firmware path for Purwa/X1P
* Second patch adds audio support. Audioreach topology and Alsa UCM configs were already merged [1],[2].
[1] https://github.com/linux-msm/audioreach-topology/commit/952d16b16c4ee23578c001c97a31540c61315a0c
[2] https://github.com/alsa-project/alsa-ucm-conf/commit/87a48b90213106f6e310dd611590e6a608ae6596
Aleksandrs Vinarskis (2):
arm64: dts: qcom: x1-asus-zenbook: fixup GPU nodes
arm64: dts: qcom: x1-asus-zenbook: support sound
.../boot/dts/qcom/x1-asus-zenbook-a14.dtsi | 198 +++++++++++++++++- .../dts/qcom/x1e80100-asus-zenbook-a14.dts | 4 + .../dts/qcom/x1p42100-asus-zenbook-a14.dts | 6 +- 3 files changed, 203 insertions(+), 5 deletions(-)
Signature · 1 line
2.45.2
PATCH 1/2 arm64: dts: qcom: x1-asus-zenbook: fixup GPU nodes
It appears not the latest version of the patch was merged. Align with latest upstreamed version by correcting GPU enable location and typo in GPU firmware path for x1p42100 variant.
--- arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi | 4 ---- arch/arm64/boot/dts/qcom/x1e80100-asus-zenbook-a14.dts | 4 ++++ arch/arm64/boot/dts/qcom/x1p42100-asus-zenbook-a14.dts | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi +0 -4
@@ -645,10 +645,6 @@ vreg_l3j_0p8: ldo3 { }; }; -&gpu { - status = "okay"; -}; - &i2c0 { clock-frequency = <400000>;
arch/arm64/boot/dts/qcom/x1e80100-asus-zenbook-a14.dts +4 -0
@@ -14,6 +14,10 @@ / { compatible = "asus,zenbook-a14-ux3407ra", "qcom,x1e80100"; }; +&gpu { + status = "okay"; +}; + &gpu_zap_shader { firmware-name = "qcom/x1e80100/ASUSTeK/zenbook-a14/qcdxkmsuc8380.mbn"; };
arch/arm64/boot/dts/qcom/x1p42100-asus-zenbook-a14.dts +5 -1
@@ -80,8 +80,12 @@ vreg_pmu_rfa_1p7: ldo9 { }; }; +&gpu { + status = "okay"; +}; + &gpu_zap_shader { - firmware-name = "qcom/x1e80100/ASUSTeK/zenbook-a14/qcdxkmsucpurwa.mbn"; + firmware-name = "qcom/x1p42100/ASUSTeK/zenbook-a14/qcdxkmsucpurwa.mbn"; }; &pcie4_port0 {
Signature · 1 line
2.45.2
PATCH 2/2 arm64: dts: qcom: x1-asus-zenbook: support sound
In reply to Aleksandrs VinarskisWorks:
* Both speakers
* Both MICs
* Headphones jack, L/R channels
* Headphones jack, MIC
Now working/untested:
* Sound over DisplayPort
* Sound over HDMI
--- .../boot/dts/qcom/x1-asus-zenbook-a14.dtsi | 194 ++++++++++++++++++ 1 file changed, 194 insertions(+)
arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi +194 -0
@@ -22,6 +22,32 @@ aliases { serial1 = &uart14; }; + wcd938x: audio-codec { + compatible = "qcom,wcd9385-codec"; + + pinctrl-0 = <&wcd_default>; + pinctrl-names = "default"; + + qcom,micbias1-microvolt = <1800000>; + qcom,micbias2-microvolt = <1800000>; + qcom,micbias3-microvolt = <1800000>; + qcom,micbias4-microvolt = <1800000>; + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; + qcom,mbhc-headset-vthreshold-microvolt = <1700000>; + qcom,mbhc-headphone-vthreshold-microvolt = <50000>; + qcom,rx-device = <&wcd_rx>; + qcom,tx-device = <&wcd_tx>; + + reset-gpios = <&tlmm 191 GPIO_ACTIVE_LOW>; + + vdd-buck-supply = <&vreg_l15b_1p8>; + vdd-rxtx-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l15b_1p8>; + vdd-mic-bias-supply = <&vreg_bob1>; + + #sound-dai-cells = <1>; + }; + gpio-keys { compatible = "gpio-keys";
@@ -149,6 +175,88 @@ linux,cma { }; }; + sound { + compatible = "qcom,x1e80100-sndcard"; + model = "X1E80100-ASUS-Zenbook-A14"; + audio-routing = "SpkrLeft IN", "WSA WSA_SPK1 OUT", + "SpkrRight IN", "WSA WSA_SPK2 OUT", + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "AMIC2", "MIC BIAS2", + "VA DMIC0", "MIC BIAS1", + "VA DMIC1", "MIC BIAS1", + "VA DMIC0", "VA MIC BIAS1", + "VA DMIC1", "VA MIC BIAS1", + "TX SWR_INPUT1", "ADC2_OUTPUT"; + + va-dai-link { + link-name = "VA Capture"; + + cpu { + sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>; + }; + + codec { + sound-dai = <&lpass_vamacro 0>; + }; + + platform { + sound-dai = <&q6apm>; + }; + }; + + wcd-capture-dai-link { + link-name = "WCD Capture"; + + cpu { + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>; + }; + + codec { + sound-dai = <&wcd938x 1>, <&swr2 1>, + <&lpass_txmacro 0>; + }; + + platform { + sound-dai = <&q6apm>; + }; + }; + + wcd-playback-dai-link { + link-name = "WCD Playback"; + + cpu { + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>; + }; + + codec { + sound-dai = <&wcd938x 0>, <&swr1 0>, + <&lpass_rxmacro 0>; + }; + + platform { + sound-dai = <&q6apm>; + }; + }; + + wsa-dai-link { + link-name = "WSA Playback"; + + cpu { + sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>; + }; + + codec { + sound-dai = <&left_spkr>, <&right_spkr>, + <&swr0 0>, <&lpass_wsamacro 0>; + }; + + platform { + sound-dai = <&q6apm>; + }; + }; + }; + vreg_edp_3p3: regulator-edp-3p3 { compatible = "regulator-fixed";
@@ -372,6 +480,13 @@ vreg_bob2: bob2 { regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; }; + vreg_l1b_1p8: ldo1 { + regulator-name = "vreg_l1b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + vreg_l2b_3p0: ldo2 { regulator-name = "vreg_l2b_3p0"; regulator-min-microvolt = <3072000>;
@@ -843,6 +958,24 @@ keyboard@15 { }; }; +&lpass_tlmm { + spkr_01_sd_n_active: spkr-01-sd-n-active-state { + pins = "gpio12"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-low; + }; +}; + +&lpass_vamacro { + pinctrl-0 = <&dmic01_default>; + pinctrl-names = "default"; + + vdd-micb-supply = <&vreg_l1b_1p8>; + qcom,dmic-sample-rate = <4800000>; +}; + &mdss { status = "okay"; };
@@ -1045,6 +1178,59 @@ &spi10 { /* Unknown device */ }; +&swr0 { + status = "okay"; + + pinctrl-0 = <&wsa_swr_active>, <&spkr_01_sd_n_active>; + pinctrl-names = "default"; + + /* WSA8845, Left Speaker */ + left_spkr: speaker@0,0 { + compatible = "sdw20217020400"; + reg = <0 0>; + reset-gpios = <&lpass_tlmm 12 GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + sound-name-prefix = "SpkrLeft"; + vdd-1p8-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l12b_1p2>; + qcom,port-mapping = <1 2 3 7 10 13>; + }; + + /* WSA8845, Right Speaker */ + right_spkr: speaker@0,1 { + compatible = "sdw20217020400"; + reg = <0 1>; + reset-gpios = <&lpass_tlmm 12 GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + sound-name-prefix = "SpkrRight"; + vdd-1p8-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l12b_1p2>; + qcom,port-mapping = <4 5 6 7 11 13>; + }; +}; + +&swr1 { + status = "okay"; + + /* WCD9385 RX */ + wcd_rx: codec@0,4 { + compatible = "sdw20217010d00"; + reg = <0 4>; + qcom,rx-port-mapping = <1 2 3 4 5>; + }; +}; + +&swr2 { + status = "okay"; + + /* WCD9385 TX */ + wcd_tx: codec@0,3 { + compatible = "sdw20217010d00"; + reg = <0 3>; + qcom,tx-port-mapping = <2 2 3 4>; + }; +}; + &tlmm { gpio-reserved-ranges = <44 4>, /* SPI11, TZ Protected */ <90 1>; /* Unknown, TZ Protected */
@@ -1175,6 +1361,14 @@ usb1_pwr_3p3_reg_en: usb1-pwr-3p3-reg-en-state { bias-disable; }; + wcd_default: wcd-reset-n-active-state { + pins = "gpio191"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-low; + }; + wcn_bt_en: wcn-bt-en-state { pins = "gpio116"; function = "gpio";
Signature · 1 line
2.45.2
Re: [PATCH v1 2/2] arm64: dts: qcom: x1-asus-zenbook: support sound
Quoted 12 lines · Aleksandrs Vinarskis
Works:
* Both speakers
* Both MICs
* Headphones jack, L/R channels
* Headphones jack, MICNow working/untested:
* Sound over DisplayPort
* Sound over HDMISigned-off-by Aleksandrs Vinarskis <[email protected]>---
[...]
arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi linux,cma { · line 199
Quoted 8 lines
arch/arm64/boot/dts/qcom/x1-asus-zenbook-a14.dtsi +8
-0+ va-dai-link { + link-name = "VA Capture"; + + cpu { + sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>; + }; + + codec {
'co'dec < 'cp'u
with that
Konrad