* [PATCH 0/2] qcom: add Asus Vivobook 16 X1607QA DT + LPASS audio clock retry
@ 2026-11-13 13:24 yass27106
2026-11-13 13:24 ` [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA yass27106
0 siblings, 1 reply; 5+ messages in thread
From: yass27106 @ 2026-11-13 13:24 UTC (permalink / raw)
To: andersson, broonie, srini, konradybcio
Cc: robh, krzk+dt, conor+dt, vkoul, tiwai, perex, lgirdwood,
pierre-louis.bossart, yung-chuan.liao, abelvesa, linux-arm-msm,
linux-sound, devicetree, linux-kernel, yass27106
Hi,
Two patches against v7.4-rc1 (also sent as pull request 1439 to
qualcomm-linux/kernel, and to the Ubuntu kernel team):
[PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA
Initial DT for this Snapdragon X X1P-42-100 (purwa) laptop, including
sound nodes (WSA8845 speakers, WCD938x codec via SoundWire).
[PATCH 2/2] ASoC: qcom: lpass macro / soundwire: retry deferred clock acquisition
The LPASS WSA/RX/TX/VA macro and Qualcomm SoundWire drivers request
clocks whose providers (va-macro fsgen, q6prm clock controller under
the ADSP GPR service) can register after the consumers probe.
Clock-provider registration does not trigger deferred-probe retries,
so consumers stay deferred indefinitely. Adds a bounded retry
(60 x 500 ms) around the devm_clk_get calls in these drivers.
Both pass scripts/checkpatch.pl with no errors; the DTB builds cleanly.
The DT addition is for the v7.5 merge window; patch 2 is a fix that could
go into v7.4-rc if the maintainers see fit.
Signed-off-by: yass27106-hue <yass27106@users.noreply.github.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA
2026-11-13 13:24 [PATCH 0/2] qcom: add Asus Vivobook 16 X1607QA DT + LPASS audio clock retry yass27106
@ 2026-11-13 13:24 ` yass27106
2026-11-13 13:24 ` [PATCH 2/2] ASoC: qcom: lpass macro / soundwire: retry deferred clock acquisition yass27106
2026-11-13 13:39 ` [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA sashiko-bot
0 siblings, 2 replies; 5+ messages in thread
From: yass27106 @ 2026-11-13 13:24 UTC (permalink / raw)
To: andersson, broonie, srini, konradybcio
Cc: robh, krzk+dt, conor+dt, vkoul, tiwai, perex, lgirdwood,
pierre-louis.bossart, yung-chuan.liao, abelvesa, linux-arm-msm,
linux-sound, devicetree, linux-kernel, yass27106
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../x1p42100-asus-vivobook-16-x1607qa.dts | 239 ++++++++++++++++++
2 files changed, 240 insertions(+)
create mode 100644 arch/arm64/boot/dts/qcom/x1p42100-asus-vivobook-16-x1607qa.dts
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 88230c4e00e..7332a73dbac 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -509,6 +509,7 @@ x1e80100-qcp-el2-dtbs := x1e80100-qcp.dtb x1-el2.dtbo
dtb-$(CONFIG_ARCH_QCOM) += x1e80100-qcp.dtb x1e80100-qcp-el2.dtb
x1p42100-asus-vivobook-s15-el2-dtbs := x1p42100-asus-vivobook-s15.dtb x1-el2.dtbo
dtb-$(CONFIG_ARCH_QCOM) += x1p42100-asus-vivobook-s15.dtb x1p42100-asus-vivobook-s15-el2.dtb
+dtb-$(CONFIG_ARCH_QCOM) += x1p42100-asus-vivobook-16-x1607qa.dtb
x1p42100-asus-zenbook-a14-el2-dtbs := x1p42100-asus-zenbook-a14.dtb x1-el2.dtbo
dtb-$(CONFIG_ARCH_QCOM) += x1p42100-asus-zenbook-a14.dtb x1p42100-asus-zenbook-a14-el2.dtb
x1p42100-asus-zenbook-a14-lcd-el2-dtbs := x1p42100-asus-zenbook-a14-lcd.dtb x1-el2.dtbo
diff --git a/arch/arm64/boot/dts/qcom/x1p42100-asus-vivobook-16-x1607qa.dts b/arch/arm64/boot/dts/qcom/x1p42100-asus-vivobook-16-x1607qa.dts
new file mode 100644
index 00000000000..fc572d779b3
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/x1p42100-asus-vivobook-16-x1607qa.dts
@@ -0,0 +1,239 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/* Hybrid device tree for ASUS Vivobook 16 X1607QA (X1P-42-100).
+ * Base: proven x1p42100-asus-vivobook-s15 (panel, USB, boot path).
+ * Transplanted from x126100-asus-vivobook-16: audio stack
+ * (WCD9385 codec, WSA8845 speakers, soundwire, sndcard) + firmware paths.
+ */
+
+/dts-v1/;
+
+#include "purwa.dtsi"
+#include "x1-asus-vivobook-s15.dtsi"
+
+/ {
+ model = "ASUS Vivobook 16 (X1607QA)";
+ compatible = "asus,vivobook-16-x1607qa", "qcom,x1p42100";
+ chassis-type = "laptop";
+};
+
+/* Speaker VDD-IO rail, from vivobook-16 board regulators */
+&apps_rsc {
+ regulators-0 {
+ vreg_l12b_1p2: ldo12 {
+ regulator-name = "vreg_l12b_1p2";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
+ };
+ };
+};
+
+&tlmm {
+ wcd_default: wcd-reset-n-active-state {
+ pins = "gpio191";
+ function = "gpio";
+ drive-strength = <16>;
+ bias-disable;
+ output-low;
+ };
+};
+
+&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";
+};
+
+/ {
+ 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>;
+ };
+
+ sound {
+ compatible = "qcom,x1e80100-sndcard";
+ model = "X1E80100-ASUS-Vivobook-16";
+ 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";
+
+ 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>;
+ };
+ };
+
+ 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>;
+ };
+ };
+
+ va-dai-link {
+ link-name = "VA Capture";
+
+ codec {
+ sound-dai = <&lpass_vamacro 0>;
+ };
+
+ cpu {
+ sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+
+ wsa-dai-link {
+ link-name = "WSA Playback";
+
+ codec {
+ sound-dai = <&left_spkr>, <&right_spkr>,
+ <&swr0 0>, <&lpass_wsamacro 0>;
+ };
+
+ cpu {
+ sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
+ };
+
+ platform {
+ sound-dai = <&q6apm>;
+ };
+ };
+ };
+};
+
+&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>;
+ };
+};
+
+&remoteproc_adsp {
+ firmware-name = "qcom/x1p42100/ASUSTeK/vivobook-16-x1607qa/qcadsp8380.mbn",
+ "qcom/x1p42100/ASUSTeK/vivobook-16-x1607qa/adsp_dtbs.elf";
+
+ status = "okay";
+};
+
+&remoteproc_cdsp {
+ firmware-name = "qcom/x1p42100/ASUSTeK/vivobook-16-x1607qa/qccdsp8380.mbn",
+ "qcom/x1p42100/ASUSTeK/vivobook-16-x1607qa/cdsp_dtbs.elf";
+
+ status = "okay";
+};
+
+&gpu {
+ status = "okay";
+
+ zap-shader {
+ firmware-name = "qcom/x1p42100/ASUSTeK/vivobook-16-x1607qa/qcdxkmsucpurwa.mbn";
+ };
+};
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] ASoC: qcom: lpass macro / soundwire: retry deferred clock acquisition
2026-11-13 13:24 ` [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA yass27106
@ 2026-11-13 13:24 ` yass27106
2026-11-13 13:43 ` sashiko-bot
2026-11-13 13:39 ` [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA sashiko-bot
1 sibling, 1 reply; 5+ messages in thread
From: yass27106 @ 2026-11-13 13:24 UTC (permalink / raw)
To: andersson, broonie, srini, konradybcio
Cc: robh, krzk+dt, conor+dt, vkoul, tiwai, perex, lgirdwood,
pierre-louis.bossart, yung-chuan.liao, abelvesa, linux-arm-msm,
linux-sound, devicetree, linux-kernel, yass27106
drivers/soundwire/qcom.c | 37 +++++++++++++++++++++++-
sound/soc/codecs/lpass-rx-macro.c | 45 ++++++++++++++++++++++++++----
sound/soc/codecs/lpass-tx-macro.c | 45 ++++++++++++++++++++++++++----
sound/soc/codecs/lpass-va-macro.c | 43 +++++++++++++++++++++++++---
sound/soc/codecs/lpass-wsa-macro.c | 45 ++++++++++++++++++++++++++----
5 files changed, 195 insertions(+), 20 deletions(-)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 6e0c5fb10ef..cb50cf239cd 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -21,6 +21,41 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include "bus.h"
+#include <linux/delay.h>
+
+/*
+ * Bounded retry for deferred clock providers. Clock-provider registration
+ * does not trigger deferred-probe retries, so a consumer that loses the
+ * probe-order race stays deferred forever. Wait up to 30 s for providers
+ * that are registered milliseconds later.
+ */
+static struct clk *clk_get_retry(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
+
+static struct clk *clk_get_retry_optional(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get_optional(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
#define SWRM_COMP_SW_RESET 0x008
#define SWRM_COMP_STATUS 0x014
@@ -1669,7 +1704,7 @@ static int qcom_swrm_probe(struct platform_device *pdev)
goto err_init;
}
- ctrl->hclk = devm_clk_get(dev, "iface");
+ ctrl->hclk = clk_get_retry(dev, "iface");
if (IS_ERR(ctrl->hclk)) {
ret = dev_err_probe(dev, PTR_ERR(ctrl->hclk), "unable to get iface clock\n");
goto err_init;
diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
index c41eb8de616..5d893960dd8 100644
--- a/sound/soc/codecs/lpass-rx-macro.c
+++ b/sound/soc/codecs/lpass-rx-macro.c
@@ -18,6 +18,41 @@
#include <linux/clk-provider.h>
#include "lpass-macro-common.h"
+#include <linux/delay.h>
+
+/*
+ * Bounded retry for deferred clock providers. Clock-provider registration
+ * does not trigger deferred-probe retries, so a consumer that loses the
+ * probe-order race stays deferred forever. Wait up to 30 s for providers
+ * that are registered milliseconds later.
+ */
+static struct clk *clk_get_retry(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
+
+static struct clk *clk_get_retry_optional(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get_optional(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
#define CDC_RX_TOP_TOP_CFG0 (0x0000)
#define CDC_RX_TOP_SWR_CTRL (0x0008)
@@ -3780,25 +3815,25 @@ static int rx_macro_probe(struct platform_device *pdev)
if (!rx)
return -ENOMEM;
- rx->macro = devm_clk_get_optional(dev, "macro");
+ rx->macro = clk_get_retry_optional(dev, "macro");
if (IS_ERR(rx->macro))
return dev_err_probe(dev, PTR_ERR(rx->macro), "unable to get macro clock\n");
- rx->dcodec = devm_clk_get_optional(dev, "dcodec");
+ rx->dcodec = clk_get_retry_optional(dev, "dcodec");
if (IS_ERR(rx->dcodec))
return dev_err_probe(dev, PTR_ERR(rx->dcodec), "unable to get dcodec clock\n");
- rx->mclk = devm_clk_get(dev, "mclk");
+ rx->mclk = clk_get_retry(dev, "mclk");
if (IS_ERR(rx->mclk))
return dev_err_probe(dev, PTR_ERR(rx->mclk), "unable to get mclk clock\n");
if (flags & LPASS_MACRO_FLAG_HAS_NPL_CLOCK) {
- rx->npl = devm_clk_get(dev, "npl");
+ rx->npl = clk_get_retry(dev, "npl");
if (IS_ERR(rx->npl))
return dev_err_probe(dev, PTR_ERR(rx->npl), "unable to get npl clock\n");
}
- rx->fsgen = devm_clk_get(dev, "fsgen");
+ rx->fsgen = clk_get_retry(dev, "fsgen");
if (IS_ERR(rx->fsgen))
return dev_err_probe(dev, PTR_ERR(rx->fsgen), "unable to get fsgen clock\n");
diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
index 6deaaabe43a..4b8635cc2b2 100644
--- a/sound/soc/codecs/lpass-tx-macro.c
+++ b/sound/soc/codecs/lpass-tx-macro.c
@@ -16,6 +16,41 @@
#include <linux/clk-provider.h>
#include "lpass-macro-common.h"
+#include <linux/delay.h>
+
+/*
+ * Bounded retry for deferred clock providers. Clock-provider registration
+ * does not trigger deferred-probe retries, so a consumer that loses the
+ * probe-order race stays deferred forever. Wait up to 30 s for providers
+ * that are registered milliseconds later.
+ */
+static struct clk *clk_get_retry(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
+
+static struct clk *clk_get_retry_optional(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get_optional(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
#define CDC_TX_CLK_RST_CTRL_MCLK_CONTROL (0x0000)
#define CDC_TX_MCLK_EN_MASK BIT(0)
@@ -2258,25 +2293,25 @@ static int tx_macro_probe(struct platform_device *pdev)
tx->data = device_get_match_data(dev);
- tx->macro = devm_clk_get_optional(dev, "macro");
+ tx->macro = clk_get_retry_optional(dev, "macro");
if (IS_ERR(tx->macro))
return dev_err_probe(dev, PTR_ERR(tx->macro), "unable to get macro clock\n");
- tx->dcodec = devm_clk_get_optional(dev, "dcodec");
+ tx->dcodec = clk_get_retry_optional(dev, "dcodec");
if (IS_ERR(tx->dcodec))
return dev_err_probe(dev, PTR_ERR(tx->dcodec), "unable to get dcodec clock\n");
- tx->mclk = devm_clk_get(dev, "mclk");
+ tx->mclk = clk_get_retry(dev, "mclk");
if (IS_ERR(tx->mclk))
return dev_err_probe(dev, PTR_ERR(tx->mclk), "unable to get mclk clock\n");
if (tx->data->flags & LPASS_MACRO_FLAG_HAS_NPL_CLOCK) {
- tx->npl = devm_clk_get(dev, "npl");
+ tx->npl = clk_get_retry(dev, "npl");
if (IS_ERR(tx->npl))
return dev_err_probe(dev, PTR_ERR(tx->npl), "unable to get npl clock\n");
}
- tx->fsgen = devm_clk_get(dev, "fsgen");
+ tx->fsgen = clk_get_retry(dev, "fsgen");
if (IS_ERR(tx->fsgen))
return dev_err_probe(dev, PTR_ERR(tx->fsgen), "unable to get fsgen clock\n");
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
index 03d6434a4a1..fda1bbada11 100644
--- a/sound/soc/codecs/lpass-va-macro.c
+++ b/sound/soc/codecs/lpass-va-macro.c
@@ -19,6 +19,41 @@
#include <sound/tlv.h>
#include "lpass-macro-common.h"
+#include <linux/delay.h>
+
+/*
+ * Bounded retry for deferred clock providers. Clock-provider registration
+ * does not trigger deferred-probe retries, so a consumer that loses the
+ * probe-order race stays deferred forever. Wait up to 30 s for providers
+ * that are registered milliseconds later.
+ */
+static struct clk *clk_get_retry(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
+
+static struct clk *clk_get_retry_optional(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get_optional(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
/* VA macro registers */
#define CDC_VA_CLK_RST_CTRL_MCLK_CONTROL (0x0000)
@@ -1557,15 +1592,15 @@ static int va_macro_probe(struct platform_device *pdev)
va->dev = dev;
- va->macro = devm_clk_get_optional(dev, "macro");
+ va->macro = clk_get_retry_optional(dev, "macro");
if (IS_ERR(va->macro))
return dev_err_probe(dev, PTR_ERR(va->macro), "unable to get macro clock\n");
- va->dcodec = devm_clk_get_optional(dev, "dcodec");
+ va->dcodec = clk_get_retry_optional(dev, "dcodec");
if (IS_ERR(va->dcodec))
return dev_err_probe(dev, PTR_ERR(va->dcodec), "unable to get dcodec clock\n");
- va->mclk = devm_clk_get(dev, "mclk");
+ va->mclk = clk_get_retry(dev, "mclk");
if (IS_ERR(va->mclk))
return dev_err_probe(dev, PTR_ERR(va->mclk), "unable to get mclk clock\n");
@@ -1610,7 +1645,7 @@ static int va_macro_probe(struct platform_device *pdev)
goto err;
if (va->has_npl_clk) {
- va->npl = devm_clk_get(dev, "npl");
+ va->npl = clk_get_retry(dev, "npl");
if (IS_ERR(va->npl)) {
ret = PTR_ERR(va->npl);
goto err;
diff --git a/sound/soc/codecs/lpass-wsa-macro.c b/sound/soc/codecs/lpass-wsa-macro.c
index 899c8bee464..437a0876a8b 100644
--- a/sound/soc/codecs/lpass-wsa-macro.c
+++ b/sound/soc/codecs/lpass-wsa-macro.c
@@ -19,6 +19,41 @@
#include "lpass-macro-common.h"
#include "lpass-wsa-macro.h"
+#include <linux/delay.h>
+
+/*
+ * Bounded retry for deferred clock providers. Clock-provider registration
+ * does not trigger deferred-probe retries, so a consumer that loses the
+ * probe-order race stays deferred forever. Wait up to 30 s for providers
+ * that are registered milliseconds later.
+ */
+static struct clk *clk_get_retry(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
+
+static struct clk *clk_get_retry_optional(struct device *dev, const char *id)
+{
+ struct clk *c;
+ int i;
+
+ for (i = 0; i < 60; i++) {
+ c = devm_clk_get_optional(dev, id);
+ if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
+ return c;
+ msleep(500);
+ }
+ return c;
+}
#define CDC_WSA_CLK_RST_CTRL_MCLK_CONTROL (0x0000)
#define CDC_WSA_MCLK_EN_MASK BIT(0)
@@ -2701,25 +2736,25 @@ static int wsa_macro_probe(struct platform_device *pdev)
if (!wsa)
return -ENOMEM;
- wsa->macro = devm_clk_get_optional(dev, "macro");
+ wsa->macro = clk_get_retry_optional(dev, "macro");
if (IS_ERR(wsa->macro))
return dev_err_probe(dev, PTR_ERR(wsa->macro), "unable to get macro clock\n");
- wsa->dcodec = devm_clk_get_optional(dev, "dcodec");
+ wsa->dcodec = clk_get_retry_optional(dev, "dcodec");
if (IS_ERR(wsa->dcodec))
return dev_err_probe(dev, PTR_ERR(wsa->dcodec), "unable to get dcodec clock\n");
- wsa->mclk = devm_clk_get(dev, "mclk");
+ wsa->mclk = clk_get_retry(dev, "mclk");
if (IS_ERR(wsa->mclk))
return dev_err_probe(dev, PTR_ERR(wsa->mclk), "unable to get mclk clock\n");
if (flags & LPASS_MACRO_FLAG_HAS_NPL_CLOCK) {
- wsa->npl = devm_clk_get(dev, "npl");
+ wsa->npl = clk_get_retry(dev, "npl");
if (IS_ERR(wsa->npl))
return dev_err_probe(dev, PTR_ERR(wsa->npl), "unable to get npl clock\n");
}
- wsa->fsgen = devm_clk_get(dev, "fsgen");
+ wsa->fsgen = clk_get_retry(dev, "fsgen");
if (IS_ERR(wsa->fsgen))
return dev_err_probe(dev, PTR_ERR(wsa->fsgen), "unable to get fsgen clock\n");
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA
2026-11-13 13:24 ` [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA yass27106
2026-11-13 13:24 ` [PATCH 2/2] ASoC: qcom: lpass macro / soundwire: retry deferred clock acquisition yass27106
@ 2026-11-13 13:39 ` sashiko-bot
1 sibling, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-13 13:39 UTC (permalink / raw)
To: yass27106; +Cc: linux-sound, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 7 potential
issues to consider:
- [High] arm64: dts: qcom: missing Signed-off-by trailer and commit
message body
- [Medium] arm64: dts: qcom: missing /delete-node/ for pmc8380_6 on
Purwa X1P42100
- [Medium] arm64: dts: qcom: missing dmic-sample-rate and
vdd-micb-supply on lpass_vamacro
- [Medium] arm64: dts: qcom: Vivobook 16 DT inherits Vivobook S 15 panel
and board dtsi
- [Medium] arm64: dts: qcom: Makefile missing x1-el2.dtbo target and
alphabetical order
- [Low] arm64: dts: qcom: undocumented compatible
asus,vivobook-16-x1607qa in bindings
- [Low] arm64: dts: qcom: split root nodes, unsorted labels, and gpu
override style
--
commit 273985d644ee175b794950960be28ab5824da749
Author: yass27106 <yass27106@gmail.com>
> arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA
>
> arch/arm64/boot/dts/qcom/Makefile | 1 +
> .../x1p42100-asus-vivobook-16-x1607qa.dts | 239 ++++++++++++++++++
> 2 files changed, 240 insertions(+)
> create mode 100644 arch/arm64/boot/dts/qcom/x1p42100-asus-vivobook-16-x1607qa.dts
[Severity: High]
This commit is missing a Signed-off-by: trailer, uses a handle instead of
a real name in the Author header, and has a raw diffstat in place of a
commit description explaining the hardware and supported components.
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 88230c4e00ea9..7332a73dbac71 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -509,6 +509,7 @@ x1e80100-qcp-el2-dtbs := x1e80100-qcp.dtb x1-el2.dtbo
> dtb-$(CONFIG_ARCH_QCOM) += x1e80100-qcp.dtb x1e80100-qcp-el2.dtb
> x1p42100-asus-vivobook-s15-el2-dtbs := x1p42100-asus-vivobook-s15.dtb x1-el2.dtbo
> dtb-$(CONFIG_ARCH_QCOM) += x1p42100-asus-vivobook-s15.dtb x1p42100-asus-vivobook-s15-el2.dtb
> +dtb-$(CONFIG_ARCH_QCOM) += x1p42100-asus-vivobook-16-x1607qa.dtb
> x1p42100-asus-zenbook-a14-el2-dtbs := x1p42100-asus-zenbook-a14.dtb x1-el2.dtbo
> dtb-$(CONFIG_ARCH_QCOM) += x1p42100-asus-zenbook-a14.dtb x1p42100-asus-zenbook-a14-el2.dtb
> x1p42100-asus-zenbook-a14-lcd-el2-dtbs := x1p42100-asus-zenbook-a14-lcd.dtb x1-el2.dtbo
[Severity: Medium]
Should this also define x1p42100-asus-vivobook-16-x1607qa-el2-dtbs and add
x1p42100-asus-vivobook-16-x1607qa-el2.dtb like the other X1E/X1P boards?
Without the composite rule, the build neither produces the -el2.dtb image
nor compiles the base DTB with symbol metadata for x1-el2.dtbo, which is
needed for EL2 boot. Also, x1p42100-asus-vivobook-16-x1607qa belongs
before x1p42100-asus-vivobook-s15 in alphabetical order.
> diff --git a/arch/arm64/boot/dts/qcom/x1p42100-asus-vivobook-16-x1607qa.dts b/arch/arm64/boot/dts/qcom/x1p42100-asus-vivobook-16-x1607qa.dts
> new file mode 100644
> index 0000000000000..fc572d779b311
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/x1p42100-asus-vivobook-16-x1607qa.dts
> @@ -0,0 +1,239 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/* Hybrid device tree for ASUS Vivobook 16 X1607QA (X1P-42-100).
> + * Base: proven x1p42100-asus-vivobook-s15 (panel, USB, boot path).
> + * Transplanted from x126100-asus-vivobook-16: audio stack
> + * (WCD9385 codec, WSA8845 speakers, soundwire, sndcard) + firmware paths.
> + */
> +
> +/dts-v1/;
> +
> +#include "purwa.dtsi"
> +#include "x1-asus-vivobook-s15.dtsi"
[Severity: Medium]
Does including x1-asus-vivobook-s15.dtsi without deleting &pmc8380_6,
&pmc8380_6_thermal, and &pmc8380_6_die_temp leave the third CPU cluster's
PMIC enabled on Purwa? x1-asus-vivobook-s15.dtsi pulls in
hamoa-pmics.dtsi, so on 8-core X1P42100 where that PMIC is unpopulated,
the SPMI, VADC, and thermal drivers will probe and poll a non-existent
device at USID 6 unless those three nodes are deleted as in
x1p42100-asus-vivobook-s15.dts.
[Severity: Medium]
Does including x1-asus-vivobook-s15.dtsi directly also leave the 16-inch
16:10 Vivobook 16 (X1607QA) configured with the Vivobook S 15's 15.6-inch
16:9 2880x1620 eDP panel ("samsung,atna56ac03", "samsung,atna33xc20")
under &mdss_dp3 and other S5507-specific board definitions?
> +
> +/ {
> + model = "ASUS Vivobook 16 (X1607QA)";
> + compatible = "asus,vivobook-16-x1607qa", "qcom,x1p42100";
[Severity: Low]
"asus,vivobook-16-x1607qa" is not documented under the qcom,x1p42100
entry in Documentation/devicetree/bindings/arm/qcom.yaml, which causes
make dtbs_check to fail.
[ ... ]
> +&lpass_vamacro {
> + pinctrl-0 = <&dmic01_default>;
> + pinctrl-names = "default";
> +};
[Severity: Medium]
Should &lpass_vamacro also specify qcom,dmic-sample-rate and
vdd-micb-supply? Without them, va_macro_probe() logs an error
("qcom,dmic-sample-rate dt entry missing") and ASoC DAPM substitutes a
dummy regulator for the vdd-micb widget instead of enabling the DMIC
supply rail.
> +
> +/ {
> + wcd938x: audio-codec {
> + compatible = "qcom,wcd9385-codec";
[ ... ]
> +&gpu {
> + status = "okay";
> +
> + zap-shader {
> + firmware-name = "qcom/x1p42100/ASUSTeK/vivobook-16-x1607qa/qcdxkmsucpurwa.mbn";
> + };
> +};
[Severity: Low]
This isn't a bug, but the second / { ... }; block above should be merged
into the root node at the top of the file, the &label overrides should be
sorted alphabetically, and the zap shader override can reference
&gpu_zap_shader directly instead of repeating status = "okay" on &gpu
(which is already enabled in x1-asus-vivobook-s15.dtsi).
--
Sashiko AI review · https://sashiko.dev/#/patchset/01b2c920412848ab85493acc2d4f5fc1@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] ASoC: qcom: lpass macro / soundwire: retry deferred clock acquisition
2026-11-13 13:24 ` [PATCH 2/2] ASoC: qcom: lpass macro / soundwire: retry deferred clock acquisition yass27106
@ 2026-11-13 13:43 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-13 13:43 UTC (permalink / raw)
To: yass27106; +Cc: linux-sound, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [High] ASoC: qcom: 30s sleep in clk_get_retry() stalls sequential
probe
- [High] soundwire: qcom: unused clk_get_retry_optional() breaks -Werror
build
- [High] ASoC: qcom: missing Signed-off-by trailer and commit message
body
- [Low] ASoC: qcom: duplicate clk_get_retry() helpers across five
drivers
It also noticed 1 related pre-existing issue this patch does not
introduce:
- [High] soundwire: qcom: ignored clk_prepare_enable() return values [1]
--
commit e7d8a177bfe78eb7a13933e19bc2397f7ed88249
Author: yass27106 <yass27106@gmail.com>
> ASoC: qcom: lpass macro / soundwire: retry deferred clock acquisition
>
> drivers/soundwire/qcom.c | 37 +++++++++++++++++++++++-
> sound/soc/codecs/lpass-rx-macro.c | 45 ++++++++++++++++++++++++++----
> sound/soc/codecs/lpass-tx-macro.c | 45 ++++++++++++++++++++++++++----
> sound/soc/codecs/lpass-va-macro.c | 43 +++++++++++++++++++++++++---
> sound/soc/codecs/lpass-wsa-macro.c | 45 ++++++++++++++++++++++++++----
> 5 files changed, 195 insertions(+), 20 deletions(-)
[Severity: High]
This commit is missing a Signed-off-by trailer and a changelog description
explaining the problem and the reason for the change; the commit body only
contains a diffstat.
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index c31d921f679f9..afb71624dae2a 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -21,6 +21,41 @@
> #include <sound/pcm_params.h>
> #include <sound/soc.h>
> #include "bus.h"
> +#include <linux/delay.h>
> +
> +/*
> + * Bounded retry for deferred clock providers. Clock-provider registration
> + * does not trigger deferred-probe retries, so a consumer that loses the
> + * probe-order race stays deferred forever. Wait up to 30 s for providers
> + * that are registered milliseconds later.
> + */
> +static struct clk *clk_get_retry(struct device *dev, const char *id)
> +{
> + struct clk *c;
> + int i;
> +
> + for (i = 0; i < 60; i++) {
> + c = devm_clk_get(dev, id);
> + if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
> + return c;
> + msleep(500);
> + }
> + return c;
> +}
[Severity: High]
Won't sleeping for 30 seconds in clk_get_retry() and clk_get_retry_optional()
on -EPROBE_DEFER stall the same thread that needs to probe the clock
provider?
When any clock provider finishes probing, really_probe() -> driver_bound()
calls driver_deferred_probe_trigger() to schedule deferred_probe_work.
Because none of these drivers set PROBE_PREFER_ASYNCHRONOUS, both initial
probing in do_initcalls() and retries in deferred_probe_work_func() run
sequentially on a single thread.
In both link order and Device Tree node order, consumers are queued before
their suppliers: wsa_macro_probe(), rx_macro_probe(), and tx_macro_probe()
request the fsgen clock registered by va_macro_probe(), and qcom_swrm_probe()
requests the iface clock registered by the macro drivers. Sleeping inside the
consumer's probe callback blocks the initcall or deferred_probe_work thread
from advancing to probe the supplier, guaranteeing the clock cannot appear
during the 30-second sleep while holding device_lock(dev) (and active power
domains in va_macro_probe()).
> +
> +static struct clk *clk_get_retry_optional(struct device *dev, const char *id)
> +{
> + struct clk *c;
> + int i;
> +
> + for (i = 0; i < 60; i++) {
> + c = devm_clk_get_optional(dev, id);
> + if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
> + return c;
> + msleep(500);
> + }
> + return c;
> +}
[Severity: High]
Does clk_get_retry_optional() have any callers in drivers/soundwire/qcom.c?
qcom_swrm_probe() only calls clk_get_retry(), so defining
clk_get_retry_optional() here triggers a -Wunused-function warning and breaks
builds with CONFIG_WERROR=y.
> @@ -1669,7 +1704,7 @@ static int qcom_swrm_probe(struct platform_device *pdev)
> goto err_init;
> }
>
> - ctrl->hclk = devm_clk_get(dev, "iface");
> + ctrl->hclk = clk_get_retry(dev, "iface");
> if (IS_ERR(ctrl->hclk)) {
> ret = dev_err_probe(dev, PTR_ERR(ctrl->hclk), "unable to get iface clock\n");
> goto err_init;
[Severity: High]
This problem wasn't introduced by this patch, but clk_prepare_enable() on
ctrl->hclk is called without checking its return value in qcom_swrm_probe(),
qcom_swrm_irq_handler(), and swrm_runtime_resume() [1]:
drivers/soundwire/qcom.c:qcom_swrm_irq_handler() {
...
clk_prepare_enable(ctrl->hclk);
ctrl->reg_read(ctrl, ctrl->reg_layout[SWRM_REG_INTERRUPT_STATUS],
&intr_sts);
...
}
If clk_prepare_enable() fails, subsequent MMIO reads and writes access
unclocked SoundWire controller registers, triggering a synchronous external
abort on Qualcomm platforms.
> diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c
> index ab8a1c2b0489b..c953054eb7a38 100644
> --- a/sound/soc/codecs/lpass-rx-macro.c
> +++ b/sound/soc/codecs/lpass-rx-macro.c
> @@ -18,6 +18,41 @@
> #include <linux/clk-provider.h>
>
> #include "lpass-macro-common.h"
> +#include <linux/delay.h>
> +
> +/*
> + * Bounded retry for deferred clock providers. Clock-provider registration
> + * does not trigger deferred-probe retries, so a consumer that loses the
> + * probe-order race stays deferred forever. Wait up to 30 s for providers
> + * that are registered milliseconds later.
> + */
> +static struct clk *clk_get_retry(struct device *dev, const char *id)
> +{
> + struct clk *c;
> + int i;
> +
> + for (i = 0; i < 60; i++) {
> + c = devm_clk_get(dev, id);
> + if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
> + return c;
> + msleep(500);
> + }
> + return c;
> +}
> +
> +static struct clk *clk_get_retry_optional(struct device *dev, const char *id)
> +{
> + struct clk *c;
> + int i;
> +
> + for (i = 0; i < 60; i++) {
> + c = devm_clk_get_optional(dev, id);
> + if (!IS_ERR(c) || PTR_ERR(c) != -EPROBE_DEFER)
> + return c;
> + msleep(500);
> + }
> + return c;
> +}
[Severity: Low]
clk_get_retry() and clk_get_retry_optional() are duplicated verbatim across
drivers/soundwire/qcom.c, lpass-rx-macro.c, lpass-tx-macro.c,
lpass-va-macro.c, and lpass-wsa-macro.c, even though the four LPASS macro
drivers already share lpass-macro-common.h.
[1] https://sashiko.dev/#/bug/linux-f65cddc9-08ff-4531-9acf-76981d74d914
--
Sashiko AI review · https://sashiko.dev/#/patchset/01b2c920412848ab85493acc2d4f5fc1@gmail.com?part=2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-13 13:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-13 13:24 [PATCH 0/2] qcom: add Asus Vivobook 16 X1607QA DT + LPASS audio clock retry yass27106
2026-11-13 13:24 ` [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA yass27106
2026-11-13 13:24 ` [PATCH 2/2] ASoC: qcom: lpass macro / soundwire: retry deferred clock acquisition yass27106
2026-11-13 13:43 ` sashiko-bot
2026-11-13 13:39 ` [PATCH 1/2] arm64: dts: qcom: add device tree for Asus Vivobook 16 X1607QA sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox