|
25 | 25 |
|
26 | 26 | #define SWRM_COMP_SW_RESET 0x008
|
27 | 27 | #define SWRM_COMP_STATUS 0x014
|
| 28 | +#define SWRM_LINK_MANAGER_EE 0x018 |
| 29 | +#define SWRM_EE_CPU 1 |
28 | 30 | #define SWRM_FRM_GEN_ENABLED BIT(0)
|
29 | 31 | #define SWRM_COMP_HW_VERSION 0x00
|
30 | 32 | #define SWRM_COMP_CFG_ADDR 0x04
|
@@ -684,7 +686,14 @@ static int qcom_swrm_init(struct qcom_swrm_ctrl *ctrl)
|
684 | 686 | u32p_replace_bits(&val, SWRM_DEF_CMD_NO_PINGS, SWRM_MCP_CFG_MAX_NUM_OF_CMD_NO_PINGS_BMSK);
|
685 | 687 | ctrl->reg_write(ctrl, SWRM_MCP_CFG_ADDR, val);
|
686 | 688 |
|
687 |
| - ctrl->reg_write(ctrl, SWRM_MCP_BUS_CTRL, SWRM_MCP_BUS_CLK_START); |
| 689 | + if (ctrl->version >= 0x01070000) { |
| 690 | + ctrl->reg_write(ctrl, SWRM_LINK_MANAGER_EE, SWRM_EE_CPU); |
| 691 | + ctrl->reg_write(ctrl, SWRM_MCP_BUS_CTRL, |
| 692 | + SWRM_MCP_BUS_CLK_START << SWRM_EE_CPU); |
| 693 | + } else { |
| 694 | + ctrl->reg_write(ctrl, SWRM_MCP_BUS_CTRL, SWRM_MCP_BUS_CLK_START); |
| 695 | + } |
| 696 | + |
688 | 697 | /* Configure number of retries of a read/write cmd */
|
689 | 698 | if (ctrl->version > 0x01050001) {
|
690 | 699 | /* Only for versions >= 1.5.1 */
|
@@ -1509,7 +1518,13 @@ static int __maybe_unused swrm_runtime_resume(struct device *dev)
|
1509 | 1518 | } else {
|
1510 | 1519 | reset_control_reset(ctrl->audio_cgcr);
|
1511 | 1520 |
|
1512 |
| - ctrl->reg_write(ctrl, SWRM_MCP_BUS_CTRL, SWRM_MCP_BUS_CLK_START); |
| 1521 | + if (ctrl->version >= 0x01070000) { |
| 1522 | + ctrl->reg_write(ctrl, SWRM_LINK_MANAGER_EE, SWRM_EE_CPU); |
| 1523 | + ctrl->reg_write(ctrl, SWRM_MCP_BUS_CTRL, |
| 1524 | + SWRM_MCP_BUS_CLK_START << SWRM_EE_CPU); |
| 1525 | + } else { |
| 1526 | + ctrl->reg_write(ctrl, SWRM_MCP_BUS_CTRL, SWRM_MCP_BUS_CLK_START); |
| 1527 | + } |
1513 | 1528 | ctrl->reg_write(ctrl, SWRM_INTERRUPT_CLEAR,
|
1514 | 1529 | SWRM_INTERRUPT_STATUS_MASTER_CLASH_DET);
|
1515 | 1530 |
|
@@ -1573,6 +1588,7 @@ static const struct of_device_id qcom_swrm_of_match[] = {
|
1573 | 1588 | { .compatible = "qcom,soundwire-v1.3.0", .data = &swrm_v1_3_data },
|
1574 | 1589 | { .compatible = "qcom,soundwire-v1.5.1", .data = &swrm_v1_5_data },
|
1575 | 1590 | { .compatible = "qcom,soundwire-v1.6.0", .data = &swrm_v1_6_data },
|
| 1591 | + { .compatible = "qcom,soundwire-v1.7.0", .data = &swrm_v1_5_data }, |
1576 | 1592 | {/* sentinel */},
|
1577 | 1593 | };
|
1578 | 1594 |
|
|
0 commit comments