Skip to content

Commit 9550fd3

Browse files
Manikanta MylavarapuLinus Walleij
authored andcommitted
pinctrl: qcom: ipq5424: split spi0 pin group
The GPIO configuration differs for the spi0 clk, cs, miso, mosi pins. Therefore, split the spi0 pin group and assign function to each pin as per the specification. Signed-off-by: Manikanta Mylavarapu <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent d992e52 commit 9550fd3

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

drivers/pinctrl/qcom/pinctrl-ipq5424.c

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ enum ipq5424_functions {
233233
msm_mux_sdc_clk,
234234
msm_mux_sdc_cmd,
235235
msm_mux_sdc_data,
236-
msm_mux_spi0,
236+
msm_mux_spi0_clk,
237+
msm_mux_spi0_cs,
238+
msm_mux_spi0_miso,
239+
msm_mux_spi0_mosi,
237240
msm_mux_spi1,
238241
msm_mux_spi10,
239242
msm_mux_spi11,
@@ -297,8 +300,8 @@ static const char * const qspi_clk_groups[] = {
297300
"gpio5",
298301
};
299302

300-
static const char * const spi0_groups[] = {
301-
"gpio6", "gpio7", "gpio8", "gpio9",
303+
static const char * const spi0_clk_groups[] = {
304+
"gpio6",
302305
};
303306

304307
static const char * const pwm1_groups[] = {
@@ -315,14 +318,26 @@ static const char * const qdss_tracedata_a_groups[] = {
315318
"gpio38", "gpio39",
316319
};
317320

321+
static const char * const spi0_cs_groups[] = {
322+
"gpio7",
323+
};
324+
318325
static const char * const cri_trng1_groups[] = {
319326
"gpio7",
320327
};
321328

329+
static const char * const spi0_miso_groups[] = {
330+
"gpio8",
331+
};
332+
322333
static const char * const cri_trng2_groups[] = {
323334
"gpio8",
324335
};
325336

337+
static const char * const spi0_mosi_groups[] = {
338+
"gpio9",
339+
};
340+
326341
static const char * const cri_trng3_groups[] = {
327342
"gpio9",
328343
};
@@ -680,7 +695,10 @@ static const struct pinfunction ipq5424_functions[] = {
680695
MSM_PIN_FUNCTION(sdc_clk),
681696
MSM_PIN_FUNCTION(sdc_cmd),
682697
MSM_PIN_FUNCTION(sdc_data),
683-
MSM_PIN_FUNCTION(spi0),
698+
MSM_PIN_FUNCTION(spi0_clk),
699+
MSM_PIN_FUNCTION(spi0_cs),
700+
MSM_PIN_FUNCTION(spi0_miso),
701+
MSM_PIN_FUNCTION(spi0_mosi),
684702
MSM_PIN_FUNCTION(spi1),
685703
MSM_PIN_FUNCTION(spi10),
686704
MSM_PIN_FUNCTION(spi11),
@@ -700,10 +718,10 @@ static const struct msm_pingroup ipq5424_groups[] = {
700718
PINGROUP(3, sdc_data, qspi_data, pwm2, _, _, _, _, _, _),
701719
PINGROUP(4, sdc_cmd, qspi_cs, _, _, _, _, _, _, _),
702720
PINGROUP(5, sdc_clk, qspi_clk, _, _, _, _, _, _, _),
703-
PINGROUP(6, spi0, pwm1, _, cri_trng0, qdss_tracedata_a, _, _, _, _),
704-
PINGROUP(7, spi0, pwm1, _, cri_trng1, qdss_tracedata_a, _, _, _, _),
705-
PINGROUP(8, spi0, pwm1, wci_txd, wci_rxd, _, cri_trng2, qdss_tracedata_a, _, _),
706-
PINGROUP(9, spi0, pwm1, _, cri_trng3, qdss_tracedata_a, _, _, _, _),
721+
PINGROUP(6, spi0_clk, pwm1, _, cri_trng0, qdss_tracedata_a, _, _, _, _),
722+
PINGROUP(7, spi0_cs, pwm1, _, cri_trng1, qdss_tracedata_a, _, _, _, _),
723+
PINGROUP(8, spi0_miso, pwm1, wci_txd, wci_rxd, _, cri_trng2, qdss_tracedata_a, _, _),
724+
PINGROUP(9, spi0_mosi, pwm1, _, cri_trng3, qdss_tracedata_a, _, _, _, _),
707725
PINGROUP(10, uart0, pwm0, spi11, _, wci_txd, wci_rxd, _, qdss_tracedata_a, _),
708726
PINGROUP(11, uart0, pwm0, spi1, _, wci_txd, wci_rxd, _, qdss_tracedata_a, _),
709727
PINGROUP(12, uart0, pwm0, spi11, _, prng_rosc0, qdss_tracedata_a, _, _, _),

0 commit comments

Comments
 (0)