Commit
fbfd6d0d3596d072f7546b25228e4eb599f68a95
pinctrl: qcom: nord: Split QUP1 SE2/SE3 into lane-pair functions
QUP1 SE2 and SE3 pack all four of their lanes pair-wise onto only two
pins each: lanes 0/1 (I2C SDA/SCL) at mux value 2 and lanes 2/3 (UART
TX/RX) at mux value 1, on gpio127/gpio128 and gpio129/gpio130
respectively.
Both mux values were named "qup1_se2" (respectively "qup1_se3"), so the
two distinct lane pairs became indistinguishable. msm_pinmux_set_mux()
stops at the first entry matching the requested function, which means
mux value 1 was always selected and the I2C lanes could never be muxed
out. In practice i2c9 and i2c10 got the UART lanes and did not work,
while uart9 and uart10 happened to be muxed correctly.
Give each lane pair its own function, following the _01/_23 naming
already used for the same hardware arrangement by the shikra, eliza,
hawi and maili TLMM drivers. Both functions still cover the full pin
pair, so a single pinctrl state per protocol remains sufficient.
Drop gpio129/gpio130 from the SE2 group list, since those pins
belong to SE3 and were never reachable through the SE2 function.
Also rename QUP1 SE2/SE3 functions in the binding doc accordingly.
While at it, add missing "gpio", "qup3_se0_mira" and "qup3_se0_mirb"
to the binding function enum to get the list complete.
Fixes: c24dd0826f06 ("pinctrl: qcom: add the TLMM driver for the Nord platforms")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260830030201.135637-1-shengchao.guo@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Shawn Guo <shengchao.guo@oss.qualcomm.com> · 2026-08-30 03:02 UTC · committed by Bartosz Golaszewski
2 files changed,
+27
−14
modified Documentation/devicetree/bindings/pinctrl/qcom,nord-tlmm.yaml
| @@ -67,7 +67,7 @@ $defs: | |||
| 67 | 67 | Specify the alternative function to be configured for the specified | |
| 68 | 68 | pins. | |
| 69 | 69 | ||
| 70 | - | enum: [ aoss_cti, atest_char, atest_usb20, atest_usb21, | |
| 70 | + | enum: [ gpio, aoss_cti, atest_char, atest_usb20, atest_usb21, | |
| 71 | 71 | aud_intfc0_clk, aud_intfc0_data, aud_intfc0_ws, | |
| 72 | 72 | aud_intfc10_clk, aud_intfc10_data, aud_intfc10_ws, | |
| 73 | 73 | aud_intfc1_clk, aud_intfc1_data, aud_intfc1_ws, | |
| @@ -98,9 +98,10 @@ $defs: | |||
| 98 | 98 | pcie3_clk_req_n, phase_flag, pll_bist_sync, pll_clk_aux, | |
| 99 | 99 | prng_rosc0, prng_rosc1, pwrbrk_i_n, qdss, qdss_cti, qspi, | |
| 100 | 100 | qup0_se0, qup0_se1, qup0_se2, qup0_se3, qup0_se4, qup0_se5, | |
| 101 | - | qup1_se0, qup1_se1, qup1_se3, qup1_se2, qup1_se4, qup1_se5, | |
| 101 | + | qup1_se0, qup1_se1, qup1_se2_01, qup1_se2_23, qup1_se3_01, | |
| 102 | + | qup1_se3_23, qup1_se4, qup1_se5, | |
| 102 | 103 | qup1_se6, qup2_se0, qup2_se1, qup2_se2, qup2_se3, qup2_se4, | |
| 103 | - | qup2_se5, qup2_se6, | |
| 104 | + | qup2_se5, qup2_se6, qup3_se0_mira, qup3_se0_mirb, | |
| 104 | 105 | sailss_ospi, sdc4_clk, sdc4_cmd, sdc4_data, smb_alert, | |
| 105 | 106 | smb_alert_n, smb_clk, smb_dat, tb_trig_sdc4, tmess_prng0, | |
| 106 | 107 | tmess_prng1, tsc_timer, tsense_pwm, usb0_hs, | |
modified drivers/pinctrl/qcom/pinctrl-nord.c
| @@ -570,8 +570,10 @@ enum nord_functions { | |||
| 570 | 570 | msm_mux_qup0_se5, | |
| 571 | 571 | msm_mux_qup1_se0, | |
| 572 | 572 | msm_mux_qup1_se1, | |
| 573 | - | msm_mux_qup1_se2, | |
| 574 | - | msm_mux_qup1_se3, | |
| 573 | + | msm_mux_qup1_se2_01, | |
| 574 | + | msm_mux_qup1_se2_23, | |
| 575 | + | msm_mux_qup1_se3_01, | |
| 576 | + | msm_mux_qup1_se3_23, | |
| 575 | 577 | msm_mux_qup1_se4, | |
| 576 | 578 | msm_mux_qup1_se5, | |
| 577 | 579 | msm_mux_qup1_se6, | |
| @@ -1152,11 +1154,19 @@ static const char *const qup1_se1_groups[] = { | |||
| 1152 | 1154 | "gpio123", "gpio124", "gpio125", "gpio126", | |
| 1153 | 1155 | }; | |
| 1154 | 1156 | ||
| 1155 | - | static const char *const qup1_se2_groups[] = { | |
| 1156 | - | "gpio127", "gpio128", "gpio129", "gpio130", | |
| 1157 | + | static const char *const qup1_se2_01_groups[] = { | |
| 1158 | + | "gpio127", "gpio128", | |
| 1157 | 1159 | }; | |
| 1158 | 1160 | ||
| 1159 | - | static const char *const qup1_se3_groups[] = { | |
| 1161 | + | static const char *const qup1_se2_23_groups[] = { | |
| 1162 | + | "gpio127", "gpio128", | |
| 1163 | + | }; | |
| 1164 | + | ||
| 1165 | + | static const char *const qup1_se3_01_groups[] = { | |
| 1166 | + | "gpio129", "gpio130", | |
| 1167 | + | }; | |
| 1168 | + | ||
| 1169 | + | static const char *const qup1_se3_23_groups[] = { | |
| 1160 | 1170 | "gpio129", "gpio130", | |
| 1161 | 1171 | }; | |
| 1162 | 1172 | ||
| @@ -1428,8 +1438,10 @@ static const struct pinfunction nord_functions[] = { | |||
| 1428 | 1438 | MSM_PIN_FUNCTION(qup0_se5), | |
| 1429 | 1439 | MSM_PIN_FUNCTION(qup1_se0), | |
| 1430 | 1440 | MSM_PIN_FUNCTION(qup1_se1), | |
| 1431 | - | MSM_PIN_FUNCTION(qup1_se2), | |
| 1432 | - | MSM_PIN_FUNCTION(qup1_se3), | |
| 1441 | + | MSM_PIN_FUNCTION(qup1_se2_01), | |
| 1442 | + | MSM_PIN_FUNCTION(qup1_se2_23), | |
| 1443 | + | MSM_PIN_FUNCTION(qup1_se3_01), | |
| 1444 | + | MSM_PIN_FUNCTION(qup1_se3_23), | |
| 1433 | 1445 | MSM_PIN_FUNCTION(qup1_se4), | |
| 1434 | 1446 | MSM_PIN_FUNCTION(qup1_se5), | |
| 1435 | 1447 | MSM_PIN_FUNCTION(qup1_se6), | |
| @@ -1633,13 +1645,13 @@ static const struct msm_pingroup nord_groups[] = { | |||
| 1633 | 1645 | _, _, _, _, _, _, _), | |
| 1634 | 1646 | [126] = PINGROUP(126, qup1_se1, qup1_se0, ccu_i2c_scl, mdp1_vsync_out, | |
| 1635 | 1647 | _, atest_usb20, ddr_pxi, _, _, _, _), | |
| 1636 | - | [127] = PINGROUP(127, qup1_se2, qup1_se2, _, atest_usb21, ddr_pxi, | |
| 1648 | + | [127] = PINGROUP(127, qup1_se2_23, qup1_se2_01, _, atest_usb21, ddr_pxi, | |
| 1637 | 1649 | _, _, _, _, _, _), | |
| 1638 | - | [128] = PINGROUP(128, qup1_se2, qup1_se2, _, atest_usb20, ddr_pxi, | |
| 1650 | + | [128] = PINGROUP(128, qup1_se2_23, qup1_se2_01, _, atest_usb20, ddr_pxi, | |
| 1639 | 1651 | _, _, _, _, _, _), | |
| 1640 | - | [129] = PINGROUP(129, qup1_se3, qup1_se3, ccu_i2c_sda, mdp1_vsync_out, | |
| 1652 | + | [129] = PINGROUP(129, qup1_se3_23, qup1_se3_01, ccu_i2c_sda, mdp1_vsync_out, | |
| 1641 | 1653 | _, atest_usb21, ddr_pxi, _, _, _, _), | |
| 1642 | - | [130] = PINGROUP(130, qup1_se3, qup1_se3, ccu_i2c_scl, mdp1_vsync_out, | |
| 1654 | + | [130] = PINGROUP(130, qup1_se3_23, qup1_se3_01, ccu_i2c_scl, mdp1_vsync_out, | |
| 1643 | 1655 | _, atest_usb20, ddr_pxi, _, _, _, _), | |
| 1644 | 1656 | [131] = PINGROUP(131, qup1_se4, qup1_se6, ccu_i2c_sda, mdp1_vsync_out, | |
| 1645 | 1657 | _, atest_usb21, ddr_pxi, _, _, _, _), | |