Skip to content

Commit b39e919

Browse files
Sean ParkerLinus Walleij
authored andcommitted
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>
1 parent 203a831 commit b39e919

1 file changed

Lines changed: 47 additions & 34 deletions

File tree

drivers/pinctrl/qcom/pinctrl-sm8250.c

Lines changed: 47 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ enum {
4949
.mux_bit = 2, \
5050
.pull_bit = 0, \
5151
.drv_bit = 6, \
52+
.egpio_enable = 12, \
53+
.egpio_present = 11, \
5254
.oe_bit = 9, \
5355
.in_bit = 0, \
5456
.out_bit = 1, \
@@ -511,6 +513,7 @@ enum sm8250_functions {
511513
msm_mux_ddr_pxi2,
512514
msm_mux_ddr_pxi3,
513515
msm_mux_dp_hot,
516+
msm_mux_egpio,
514517
msm_mux_dp_lcd,
515518
msm_mux_gcc_gp1,
516519
msm_mux_gcc_gp2,
@@ -830,6 +833,14 @@ static const char * const gpio_groups[] = {
830833
"gpio171", "gpio172", "gpio173", "gpio174", "gpio175", "gpio176",
831834
"gpio177", "gpio178", "gpio179",
832835
};
836+
static const char * const egpio_groups[] = {
837+
"gpio146", "gpio147", "gpio148", "gpio149", "gpio150", "gpio151",
838+
"gpio152", "gpio153", "gpio154", "gpio155", "gpio156", "gpio157",
839+
"gpio158", "gpio159", "gpio160", "gpio161", "gpio162", "gpio163",
840+
"gpio164", "gpio165", "gpio166", "gpio167", "gpio168", "gpio169",
841+
"gpio170", "gpio171", "gpio172", "gpio173", "gpio174", "gpio175",
842+
"gpio176", "gpio177", "gpio178", "gpio179",
843+
};
833844
static const char * const qdss_cti_groups[] = {
834845
"gpio0", "gpio2", "gpio2", "gpio44", "gpio45", "gpio46", "gpio92",
835846
"gpio93",
@@ -1018,6 +1029,7 @@ static const struct pinfunction sm8250_functions[] = {
10181029
MSM_PIN_FUNCTION(ddr_pxi3),
10191030
MSM_PIN_FUNCTION(dp_hot),
10201031
MSM_PIN_FUNCTION(dp_lcd),
1032+
MSM_PIN_FUNCTION(egpio),
10211033
MSM_PIN_FUNCTION(gcc_gp1),
10221034
MSM_PIN_FUNCTION(gcc_gp2),
10231035
MSM_PIN_FUNCTION(gcc_gp3),
@@ -1265,40 +1277,40 @@ static const struct msm_pingroup sm8250_groups[] = {
12651277
[143] = PINGROUP(143, WEST, lpass_slimbus, mi2s1_data0, ddr_bist, _, _, _, _, _, _),
12661278
[144] = PINGROUP(144, WEST, lpass_slimbus, mi2s1_data1, ddr_bist, _, _, _, _, _, _),
12671279
[145] = PINGROUP(145, WEST, lpass_slimbus, mi2s1_ws, _, _, _, _, _, _, _),
1268-
[146] = PINGROUP(146, WEST, _, _, _, _, _, _, _, _, _),
1269-
[147] = PINGROUP(147, WEST, _, _, _, _, _, _, _, _, _),
1270-
[148] = PINGROUP(148, WEST, _, _, _, _, _, _, _, _, _),
1271-
[149] = PINGROUP(149, WEST, _, _, _, _, _, _, _, _, _),
1272-
[150] = PINGROUP(150, WEST, _, _, _, _, _, _, _, _, _),
1273-
[151] = PINGROUP(151, WEST, _, _, _, _, _, _, _, _, _),
1274-
[152] = PINGROUP(152, WEST, _, _, _, _, _, _, _, _, _),
1275-
[153] = PINGROUP(153, WEST, _, _, _, _, _, _, _, _, _),
1276-
[154] = PINGROUP(154, WEST, _, _, _, _, _, _, _, _, _),
1277-
[155] = PINGROUP(155, WEST, _, _, _, _, _, _, _, _, _),
1278-
[156] = PINGROUP(156, WEST, _, _, _, _, _, _, _, _, _),
1279-
[157] = PINGROUP(157, WEST, _, _, _, _, _, _, _, _, _),
1280-
[158] = PINGROUP(158, WEST, _, _, _, _, _, _, _, _, _),
1281-
[159] = PINGROUP(159, WEST, cri_trng0, _, _, _, _, _, _, _, _),
1282-
[160] = PINGROUP(160, WEST, cri_trng1, qdss_gpio, _, _, _, _, _, _, _),
1283-
[161] = PINGROUP(161, WEST, cri_trng, qdss_gpio, _, _, _, _, _, _, _),
1284-
[162] = PINGROUP(162, WEST, sp_cmu, qdss_gpio, _, _, _, _, _, _, _),
1285-
[163] = PINGROUP(163, WEST, prng_rosc, qdss_gpio, _, _, _, _, _, _, _),
1286-
[164] = PINGROUP(164, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1287-
[165] = PINGROUP(165, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1288-
[166] = PINGROUP(166, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1289-
[167] = PINGROUP(167, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1290-
[168] = PINGROUP(168, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1291-
[169] = PINGROUP(169, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1292-
[170] = PINGROUP(170, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1293-
[171] = PINGROUP(171, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1294-
[172] = PINGROUP(172, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1295-
[173] = PINGROUP(173, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1296-
[174] = PINGROUP(174, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1297-
[175] = PINGROUP(175, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1298-
[176] = PINGROUP(176, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1299-
[177] = PINGROUP(177, WEST, qdss_gpio, _, _, _, _, _, _, _, _),
1300-
[178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, _),
1301-
[179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, _),
1280+
[146] = PINGROUP(146, WEST, _, _, _, _, _, _, _, _, egpio),
1281+
[147] = PINGROUP(147, WEST, _, _, _, _, _, _, _, _, egpio),
1282+
[148] = PINGROUP(148, WEST, _, _, _, _, _, _, _, _, egpio),
1283+
[149] = PINGROUP(149, WEST, _, _, _, _, _, _, _, _, egpio),
1284+
[150] = PINGROUP(150, WEST, _, _, _, _, _, _, _, _, egpio),
1285+
[151] = PINGROUP(151, WEST, _, _, _, _, _, _, _, _, egpio),
1286+
[152] = PINGROUP(152, WEST, _, _, _, _, _, _, _, _, egpio),
1287+
[153] = PINGROUP(153, WEST, _, _, _, _, _, _, _, _, egpio),
1288+
[154] = PINGROUP(154, WEST, _, _, _, _, _, _, _, _, egpio),
1289+
[155] = PINGROUP(155, WEST, _, _, _, _, _, _, _, _, egpio),
1290+
[156] = PINGROUP(156, WEST, _, _, _, _, _, _, _, _, egpio),
1291+
[157] = PINGROUP(157, WEST, _, _, _, _, _, _, _, _, egpio),
1292+
[158] = PINGROUP(158, WEST, _, _, _, _, _, _, _, _, egpio),
1293+
[159] = PINGROUP(159, WEST, cri_trng0, _, _, _, _, _, _, _, egpio),
1294+
[160] = PINGROUP(160, WEST, cri_trng1, qdss_gpio, _, _, _, _, _, _, egpio),
1295+
[161] = PINGROUP(161, WEST, cri_trng, qdss_gpio, _, _, _, _, _, _, egpio),
1296+
[162] = PINGROUP(162, WEST, sp_cmu, qdss_gpio, _, _, _, _, _, _, egpio),
1297+
[163] = PINGROUP(163, WEST, prng_rosc, qdss_gpio, _, _, _, _, _, _, egpio),
1298+
[164] = PINGROUP(164, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1299+
[165] = PINGROUP(165, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1300+
[166] = PINGROUP(166, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1301+
[167] = PINGROUP(167, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1302+
[168] = PINGROUP(168, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1303+
[169] = PINGROUP(169, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1304+
[170] = PINGROUP(170, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1305+
[171] = PINGROUP(171, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1306+
[172] = PINGROUP(172, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1307+
[173] = PINGROUP(173, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1308+
[174] = PINGROUP(174, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1309+
[175] = PINGROUP(175, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1310+
[176] = PINGROUP(176, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1311+
[177] = PINGROUP(177, WEST, qdss_gpio, _, _, _, _, _, _, _, egpio),
1312+
[178] = PINGROUP(178, WEST, _, _, _, _, _, _, _, _, egpio),
1313+
[179] = PINGROUP(179, WEST, _, _, _, _, _, _, _, _, egpio),
13021314
[180] = UFS_RESET(ufs_reset, 0xb8000),
13031315
[181] = SDC_PINGROUP(sdc2_clk, 0xb7000, 14, 6),
13041316
[182] = SDC_PINGROUP(sdc2_cmd, 0xb7000, 11, 3),
@@ -1333,6 +1345,7 @@ static const struct msm_pinctrl_soc_data sm8250_pinctrl = {
13331345
.ntiles = ARRAY_SIZE(sm8250_tiles),
13341346
.wakeirq_map = sm8250_pdc_map,
13351347
.nwakeirq_map = ARRAY_SIZE(sm8250_pdc_map),
1348+
.egpio_func = 9,
13361349
};
13371350

13381351
static int sm8250_pinctrl_probe(struct platform_device *pdev)

0 commit comments

Comments
 (0)