pinctrl: qcom: sm8250: Add egpio support

This mirrors the egpio support added to sc7280/sm8450/etc. This change
is necessary for GPIOs 146 - 179 (34 GPIOs) to be used as normal GPIOs.

Signed-off-by: Sean Parker <sean.parker@viasat.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Sean Parker 2025-09-04 10:04:26 -07:00 committed by Linus Walleij
parent 203a83112e
commit b39e9199fb
1 changed files with 47 additions and 34 deletions

View File

@ -49,6 +49,8 @@ enum {
.mux_bit = 2, \
.pull_bit = 0, \
.drv_bit = 6, \
.egpio_enable = 12, \
.egpio_present = 11, \
.oe_bit = 9, \
.in_bit = 0, \
.out_bit = 1, \
@ -511,6 +513,7 @@ enum sm8250_functions {
msm_mux_ddr_pxi2,
msm_mux_ddr_pxi3,
msm_mux_dp_hot,
msm_mux_egpio,
msm_mux_dp_lcd,
msm_mux_gcc_gp1,
msm_mux_gcc_gp2,
@ -830,6 +833,14 @@ static const char * const gpio_groups[] = {
"gpio171", "gpio172", "gpio173", "gpio174", "gpio175", "gpio176",
"gpio177", "gpio178", "gpio179",
};
static const char * const egpio_groups[] = {
"gpio146", "gpio147", "gpio148", "gpio149", "gpio150", "gpio151",
"gpio152", "gpio153", "gpio154", "gpio155", "gpio156", "gpio157",
"gpio158", "gpio159", "gpio160", "gpio161", "gpio162", "gpio163",
"gpio164", "gpio165", "gpio166", "gpio167", "gpio168", "gpio169",
"gpio170", "gpio171", "gpio172", "gpio173", "gpio174", "gpio175",
"gpio176", "gpio177", "gpio178", "gpio179",
};
static const char * const qdss_cti_groups[] = {
"gpio0", "gpio2", "gpio2", "gpio44", "gpio45", "gpio46", "gpio92",
"gpio93",
@ -1018,6 +1029,7 @@ static const struct pinfunction sm8250_functions[] = {
MSM_PIN_FUNCTION(ddr_pxi3),
MSM_PIN_FUNCTION(dp_hot),
MSM_PIN_FUNCTION(dp_lcd),
MSM_PIN_FUNCTION(egpio),
MSM_PIN_FUNCTION(gcc_gp1),
MSM_PIN_FUNCTION(gcc_gp2),
MSM_PIN_FUNCTION(gcc_gp3),
@ -1265,40 +1277,40 @@ static const struct msm_pingroup sm8250_groups[] = {
[143] = PINGROUP(143, WEST, lpass_slimbus, mi2s1_data0, ddr_bist, _, _, _, _, _, _),
[144] = PINGROUP(144, WEST, lpass_slimbus, mi2s1_data1, ddr_bist, _, _, _, _, _, _),
[145] = PINGROUP(145, WEST, lpass_slimbus, mi2s1_ws, _, _, _, _, _, _, _),
[146] = PINGROUP(146, WEST, _, _, _, _, _, _, _, _, _),
[147] = PINGROUP(147, WEST, _, _, _, _, _, _, _, _, _),
[148] = PINGROUP(148, WEST, _, _, _, _, _, _, _, _, _),
[149] = PINGROUP(149, WEST, _, _, _, _, _, _, _, _, _),
[150] = PINGROUP(150, WEST, _, _, _, _, _, _, _, _, _),
[151] = PINGROUP(151, WEST, _, _, _, _, _, _, _, _, _),
[152] = PINGROUP(152, WEST, _, _, _, _, _, _, _, _, _),
[153] = PINGROUP(153, WEST, _, _, _, _, _, _, _, _, _),
[154] = PINGROUP(154, WEST, _, _, _, _, _, _, _, _, _),
[155] = PINGROUP(155, WEST, _, _, _, _, _, _, _, _, _),
[156] = PINGROUP(156, WEST, _, _, _, _, _, _, _, _, _),
[157] = PINGROUP(157, WEST, _, _, _, _, _, _, _, _, _),
[158] = PINGROUP(158, WEST, _, _, _, _, _, _, _, _, _),
[159] = PINGROUP(159, WEST, cri_trng0, _, _, _, _, _, _, _, _),
[160] = PINGROUP(160, WEST, cri_trng1, qdss_gpio, _, _, _, _, _, _, _),
[161] = PINGROUP(161, WEST, cri_trng, qdss_gpio, _, _, _, _, _, _, _),
[162] = PINGROUP(162, WEST, sp_cmu, qdss_gpio, _, _, _, _, _, _, _),
[163] = PINGROUP(163, WEST, prng_rosc, qdss_gpio, _, _, _, _, _, _, _),
[164] = PINGROUP(164, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[165] = PINGROUP(165, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[166] = PINGROUP(166, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[167] = PINGROUP(167, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[168] = PINGROUP(168, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[169] = PINGROUP(169, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[170] = PINGROUP(170, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[171] = PINGROUP(171, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[172] = PINGROUP(172, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[173] = PINGROUP(173, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[174] = PINGROUP(174, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[175] = PINGROUP(175, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[176] = PINGROUP(176, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[177] = PINGROUP(177, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
[178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, _),
[179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, _),
[146] = PINGROUP(146, WEST, _, _, _, _, _, _, _, _, egpio),
[147] = PINGROUP(147, WEST, _, _, _, _, _, _, _, _, egpio),
[148] = PINGROUP(148, WEST, _, _, _, _, _, _, _, _, egpio),
[149] = PINGROUP(149, WEST, _, _, _, _, _, _, _, _, egpio),
[150] = PINGROUP(150, WEST, _, _, _, _, _, _, _, _, egpio),
[151] = PINGROUP(151, WEST, _, _, _, _, _, _, _, _, egpio),
[152] = PINGROUP(152, WEST, _, _, _, _, _, _, _, _, egpio),
[153] = PINGROUP(153, WEST, _, _, _, _, _, _, _, _, egpio),
[154] = PINGROUP(154, WEST, _, _, _, _, _, _, _, _, egpio),
[155] = PINGROUP(155, WEST, _, _, _, _, _, _, _, _, egpio),
[156] = PINGROUP(156, WEST, _, _, _, _, _, _, _, _, egpio),
[157] = PINGROUP(157, WEST, _, _, _, _, _, _, _, _, egpio),
[158] = PINGROUP(158, WEST, _, _, _, _, _, _, _, _, egpio),
[159] = PINGROUP(159, WEST, cri_trng0, _, _, _, _, _, _, _, egpio),
[160] = PINGROUP(160, WEST, cri_trng1, qdss_gpio, _, _, _, _, _, _, egpio),
[161] = PINGROUP(161, WEST, cri_trng, qdss_gpio, _, _, _, _, _, _, egpio),
[162] = PINGROUP(162, WEST, sp_cmu, qdss_gpio, _, _, _, _, _, _, egpio),
[163] = PINGROUP(163, WEST, prng_rosc, qdss_gpio, _, _, _, _, _, _, egpio),
[164] = PINGROUP(164, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[165] = PINGROUP(165, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[166] = PINGROUP(166, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[167] = PINGROUP(167, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[168] = PINGROUP(168, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[169] = PINGROUP(169, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[170] = PINGROUP(170, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[171] = PINGROUP(171, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[172] = PINGROUP(172, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[173] = PINGROUP(173, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[174] = PINGROUP(174, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[175] = PINGROUP(175, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[176] = PINGROUP(176, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[177] = PINGROUP(177, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
[178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, egpio),
[179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, egpio),
[180] = UFS_RESET(ufs_reset, 0xb8000),
[181] = SDC_PINGROUP(sdc2_clk, 0xb7000, 14, 6),
[182] = SDC_PINGROUP(sdc2_cmd, 0xb7000, 11, 3),
@ -1333,6 +1345,7 @@ static const struct msm_pinctrl_soc_data sm8250_pinctrl = {
.ntiles = ARRAY_SIZE(sm8250_tiles),
.wakeirq_map = sm8250_pdc_map,
.nwakeirq_map = ARRAY_SIZE(sm8250_pdc_map),
.egpio_func = 9,
};
static int sm8250_pinctrl_probe(struct platform_device *pdev)