diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c index 049266c9fdee..e2def45763e2 100644 --- a/soc/swr-mstr-ctrl.c +++ b/soc/swr-mstr-ctrl.c @@ -2578,6 +2578,7 @@ static int swrm_probe(struct platform_device *pdev) int ret = 0; struct clk *lpass_core_hw_vote = NULL; struct clk *lpass_core_audio = NULL; + u32 is_wcd937x = 0; /* Allocate soundwire master driver structure */ swrm = devm_kzalloc(&pdev->dev, sizeof(struct swr_mstr_ctrl), @@ -2610,6 +2611,14 @@ static int swrm_probe(struct platform_device *pdev) dev_err(&pdev->dev, "%s: failed to get master id\n", __func__); goto err_pdata_fail; } + /* update the physical device address if wcd937x. */ + ret = of_property_read_u32(pdev->dev.of_node, "qcom,is_wcd937x", + &is_wcd937x); + if (ret) + dev_dbg(&pdev->dev, "%s: failed to get wcd info\n", __func__); + else if (is_wcd937x) + swrm_phy_dev[1] = 0xa01170223; + ret = of_property_read_u32(pdev->dev.of_node, "qcom,dynamic-port-map-supported", &swrm->dynamic_port_map_supported); if (ret) { diff --git a/soc/swr-slave-port-config.h b/soc/swr-slave-port-config.h index 3c70d795a10e..c8124d88b1cd 100644 --- a/soc/swr-slave-port-config.h +++ b/soc/swr-slave-port-config.h @@ -23,12 +23,21 @@ static struct port_params tx_dummy[SWR_MSTR_PORT_LEN] = { }; /* AMIC 9.6 MHz clock */ +#ifdef CONFIG_SND_SOC_HOLI +static struct port_params tx_wcd_9p6MHz[SWR_MSTR_PORT_LEN] = { + {3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX1 */ + {3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */ + {7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */ + {7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX4 */ +}; +#else static struct port_params tx_wcd_9p6MHz[SWR_MSTR_PORT_LEN] = { {3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX1 */ {7, 5, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */ {7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */ {7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX4 */ }; +#endif /* AMIC 4.8 MHz clock */ static struct port_params tx_wcd_4p8MHz[SWR_MSTR_PORT_LEN] = {