|
22 | 22 | #define SPT_GPI_IS 0x100 |
23 | 23 | #define SPT_GPI_IE 0x120 |
24 | 24 |
|
25 | | -#define SPT_COMMUNITY(b, s, e) \ |
| 25 | +#define SPT_COMMUNITY(b, s, e, pl, gs, gn, g, n) \ |
26 | 26 | { \ |
27 | 27 | .barno = (b), \ |
28 | 28 | .padown_offset = SPT_PAD_OWN, \ |
29 | | - .padcfglock_offset = SPT_LP_PADCFGLOCK, \ |
| 29 | + .padcfglock_offset = (pl), \ |
30 | 30 | .hostown_offset = SPT_HOSTSW_OWN, \ |
31 | 31 | .is_offset = SPT_GPI_IS, \ |
32 | 32 | .ie_offset = SPT_GPI_IE, \ |
33 | | - .gpp_size = 24, \ |
34 | | - .gpp_num_padown_regs = 4, \ |
| 33 | + .gpp_size = (gs), \ |
| 34 | + .gpp_num_padown_regs = (gn), \ |
35 | 35 | .pin_base = (s), \ |
36 | 36 | .npins = ((e) - (s) + 1), \ |
| 37 | + .gpps = (g), \ |
| 38 | + .ngpps = (n), \ |
37 | 39 | } |
38 | 40 |
|
39 | | -#define SPTH_GPP(r, s, e, g) \ |
| 41 | +#define SPT_LP_COMMUNITY(b, s, e) \ |
| 42 | + SPT_COMMUNITY(b, s, e, SPT_LP_PADCFGLOCK, 24, 4, NULL, 0) |
| 43 | + |
| 44 | +#define SPT_H_GPP(r, s, e, g) \ |
40 | 45 | { \ |
41 | 46 | .reg_num = (r), \ |
42 | 47 | .base = (s), \ |
43 | 48 | .size = ((e) - (s) + 1), \ |
44 | 49 | .gpio_base = (g), \ |
45 | 50 | } |
46 | 51 |
|
47 | | -#define SPTH_COMMUNITY(b, s, e, g) \ |
48 | | - { \ |
49 | | - .barno = (b), \ |
50 | | - .padown_offset = SPT_PAD_OWN, \ |
51 | | - .padcfglock_offset = SPT_H_PADCFGLOCK, \ |
52 | | - .hostown_offset = SPT_HOSTSW_OWN, \ |
53 | | - .is_offset = SPT_GPI_IS, \ |
54 | | - .ie_offset = SPT_GPI_IE, \ |
55 | | - .pin_base = (s), \ |
56 | | - .npins = ((e) - (s) + 1), \ |
57 | | - .gpps = (g), \ |
58 | | - .ngpps = ARRAY_SIZE(g), \ |
59 | | - } |
| 52 | +#define SPT_H_COMMUNITY(b, s, e, g) \ |
| 53 | + SPT_COMMUNITY(b, s, e, SPT_H_PADCFGLOCK, 0, 0, g, ARRAY_SIZE(g)) |
60 | 54 |
|
61 | 55 | /* Sunrisepoint-LP */ |
62 | 56 | static const struct pinctrl_pin_desc sptlp_pins[] = { |
@@ -292,9 +286,9 @@ static const struct intel_function sptlp_functions[] = { |
292 | 286 | }; |
293 | 287 |
|
294 | 288 | static const struct intel_community sptlp_communities[] = { |
295 | | - SPT_COMMUNITY(0, 0, 47), |
296 | | - SPT_COMMUNITY(1, 48, 119), |
297 | | - SPT_COMMUNITY(2, 120, 151), |
| 289 | + SPT_LP_COMMUNITY(0, 0, 47), |
| 290 | + SPT_LP_COMMUNITY(1, 48, 119), |
| 291 | + SPT_LP_COMMUNITY(2, 120, 151), |
298 | 292 | }; |
299 | 293 |
|
300 | 294 | static const struct intel_pinctrl_soc_data sptlp_soc_data = { |
@@ -554,27 +548,27 @@ static const struct intel_function spth_functions[] = { |
554 | 548 | }; |
555 | 549 |
|
556 | 550 | static const struct intel_padgroup spth_community0_gpps[] = { |
557 | | - SPTH_GPP(0, 0, 23, 0), /* GPP_A */ |
558 | | - SPTH_GPP(1, 24, 47, 24), /* GPP_B */ |
| 551 | + SPT_H_GPP(0, 0, 23, 0), /* GPP_A */ |
| 552 | + SPT_H_GPP(1, 24, 47, 24), /* GPP_B */ |
559 | 553 | }; |
560 | 554 |
|
561 | 555 | static const struct intel_padgroup spth_community1_gpps[] = { |
562 | | - SPTH_GPP(0, 48, 71, 48), /* GPP_C */ |
563 | | - SPTH_GPP(1, 72, 95, 72), /* GPP_D */ |
564 | | - SPTH_GPP(2, 96, 108, 96), /* GPP_E */ |
565 | | - SPTH_GPP(3, 109, 132, 120), /* GPP_F */ |
566 | | - SPTH_GPP(4, 133, 156, 144), /* GPP_G */ |
567 | | - SPTH_GPP(5, 157, 180, 168), /* GPP_H */ |
| 556 | + SPT_H_GPP(0, 48, 71, 48), /* GPP_C */ |
| 557 | + SPT_H_GPP(1, 72, 95, 72), /* GPP_D */ |
| 558 | + SPT_H_GPP(2, 96, 108, 96), /* GPP_E */ |
| 559 | + SPT_H_GPP(3, 109, 132, 120), /* GPP_F */ |
| 560 | + SPT_H_GPP(4, 133, 156, 144), /* GPP_G */ |
| 561 | + SPT_H_GPP(5, 157, 180, 168), /* GPP_H */ |
568 | 562 | }; |
569 | 563 |
|
570 | 564 | static const struct intel_padgroup spth_community3_gpps[] = { |
571 | | - SPTH_GPP(0, 181, 191, 192), /* GPP_I */ |
| 565 | + SPT_H_GPP(0, 181, 191, 192), /* GPP_I */ |
572 | 566 | }; |
573 | 567 |
|
574 | 568 | static const struct intel_community spth_communities[] = { |
575 | | - SPTH_COMMUNITY(0, 0, 47, spth_community0_gpps), |
576 | | - SPTH_COMMUNITY(1, 48, 180, spth_community1_gpps), |
577 | | - SPTH_COMMUNITY(2, 181, 191, spth_community3_gpps), |
| 569 | + SPT_H_COMMUNITY(0, 0, 47, spth_community0_gpps), |
| 570 | + SPT_H_COMMUNITY(1, 48, 180, spth_community1_gpps), |
| 571 | + SPT_H_COMMUNITY(2, 181, 191, spth_community3_gpps), |
578 | 572 | }; |
579 | 573 |
|
580 | 574 | static const struct intel_pinctrl_soc_data spth_soc_data = { |
|
0 commit comments