Skip to content

Commit 4a8be01

Browse files
petegriffinkrzk
authored andcommitted
pinctrl: samsung: Add gs101 SoC pinctrl configuration
Add support for the pin-controller found on the gs101 SoC used in Pixel 6 phones. Reviewed-by: Sam Protsenko <[email protected]> Signed-off-by: Peter Griffin <[email protected]> Acked-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent e1564d6 commit 4a8be01

File tree

3 files changed

+143
-0
lines changed

3 files changed

+143
-0
lines changed

drivers/pinctrl/samsung/pinctrl-exynos-arm64.c

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,3 +796,143 @@ const struct samsung_pinctrl_of_match_data fsd_of_data __initconst = {
796796
.ctrl = fsd_pin_ctrl,
797797
.num_ctrl = ARRAY_SIZE(fsd_pin_ctrl),
798798
};
799+
800+
/* pin banks of gs101 pin-controller (ALIVE) */
801+
static const struct samsung_pin_bank_data gs101_pin_alive[] = {
802+
EXYNOS850_PIN_BANK_EINTW(8, 0x0, "gpa0", 0x00),
803+
EXYNOS850_PIN_BANK_EINTW(7, 0x20, "gpa1", 0x04),
804+
EXYNOS850_PIN_BANK_EINTW(5, 0x40, "gpa2", 0x08),
805+
EXYNOS850_PIN_BANK_EINTW(4, 0x60, "gpa3", 0x0c),
806+
EXYNOS850_PIN_BANK_EINTW(4, 0x80, "gpa4", 0x10),
807+
EXYNOS850_PIN_BANK_EINTW(7, 0xa0, "gpa5", 0x14),
808+
EXYNOS850_PIN_BANK_EINTW(8, 0xc0, "gpa9", 0x18),
809+
EXYNOS850_PIN_BANK_EINTW(2, 0xe0, "gpa10", 0x1c),
810+
};
811+
812+
/* pin banks of gs101 pin-controller (FAR_ALIVE) */
813+
static const struct samsung_pin_bank_data gs101_pin_far_alive[] = {
814+
EXYNOS850_PIN_BANK_EINTW(8, 0x0, "gpa6", 0x00),
815+
EXYNOS850_PIN_BANK_EINTW(4, 0x20, "gpa7", 0x04),
816+
EXYNOS850_PIN_BANK_EINTW(8, 0x40, "gpa8", 0x08),
817+
EXYNOS850_PIN_BANK_EINTW(2, 0x60, "gpa11", 0x0c),
818+
};
819+
820+
/* pin banks of gs101 pin-controller (GSACORE) */
821+
static const struct samsung_pin_bank_data gs101_pin_gsacore[] = {
822+
EXYNOS850_PIN_BANK_EINTG(2, 0x0, "gps0", 0x00),
823+
EXYNOS850_PIN_BANK_EINTG(8, 0x20, "gps1", 0x04),
824+
EXYNOS850_PIN_BANK_EINTG(3, 0x40, "gps2", 0x08),
825+
};
826+
827+
/* pin banks of gs101 pin-controller (GSACTRL) */
828+
static const struct samsung_pin_bank_data gs101_pin_gsactrl[] = {
829+
EXYNOS850_PIN_BANK_EINTW(6, 0x0, "gps3", 0x00),
830+
};
831+
832+
/* pin banks of gs101 pin-controller (PERIC0) */
833+
static const struct samsung_pin_bank_data gs101_pin_peric0[] = {
834+
EXYNOS850_PIN_BANK_EINTG(5, 0x0, "gpp0", 0x00),
835+
EXYNOS850_PIN_BANK_EINTG(4, 0x20, "gpp1", 0x04),
836+
EXYNOS850_PIN_BANK_EINTG(4, 0x40, "gpp2", 0x08),
837+
EXYNOS850_PIN_BANK_EINTG(2, 0x60, "gpp3", 0x0c),
838+
EXYNOS850_PIN_BANK_EINTG(4, 0x80, "gpp4", 0x10),
839+
EXYNOS850_PIN_BANK_EINTG(2, 0xa0, "gpp5", 0x14),
840+
EXYNOS850_PIN_BANK_EINTG(4, 0xc0, "gpp6", 0x18),
841+
EXYNOS850_PIN_BANK_EINTG(2, 0xe0, "gpp7", 0x1c),
842+
EXYNOS850_PIN_BANK_EINTG(4, 0x100, "gpp8", 0x20),
843+
EXYNOS850_PIN_BANK_EINTG(2, 0x120, "gpp9", 0x24),
844+
EXYNOS850_PIN_BANK_EINTG(4, 0x140, "gpp10", 0x28),
845+
EXYNOS850_PIN_BANK_EINTG(2, 0x160, "gpp11", 0x2c),
846+
EXYNOS850_PIN_BANK_EINTG(4, 0x180, "gpp12", 0x30),
847+
EXYNOS850_PIN_BANK_EINTG(2, 0x1a0, "gpp13", 0x34),
848+
EXYNOS850_PIN_BANK_EINTG(4, 0x1c0, "gpp14", 0x38),
849+
EXYNOS850_PIN_BANK_EINTG(2, 0x1e0, "gpp15", 0x3c),
850+
EXYNOS850_PIN_BANK_EINTG(4, 0x200, "gpp16", 0x40),
851+
EXYNOS850_PIN_BANK_EINTG(2, 0x220, "gpp17", 0x44),
852+
EXYNOS850_PIN_BANK_EINTG(4, 0x240, "gpp18", 0x48),
853+
EXYNOS850_PIN_BANK_EINTG(4, 0x260, "gpp19", 0x4c),
854+
};
855+
856+
/* pin banks of gs101 pin-controller (PERIC1) */
857+
static const struct samsung_pin_bank_data gs101_pin_peric1[] = {
858+
EXYNOS850_PIN_BANK_EINTG(8, 0x0, "gpp20", 0x00),
859+
EXYNOS850_PIN_BANK_EINTG(4, 0x20, "gpp21", 0x04),
860+
EXYNOS850_PIN_BANK_EINTG(2, 0x40, "gpp22", 0x08),
861+
EXYNOS850_PIN_BANK_EINTG(8, 0x60, "gpp23", 0x0c),
862+
EXYNOS850_PIN_BANK_EINTG(4, 0x80, "gpp24", 0x10),
863+
EXYNOS850_PIN_BANK_EINTG(4, 0xa0, "gpp25", 0x14),
864+
EXYNOS850_PIN_BANK_EINTG(5, 0xc0, "gpp26", 0x18),
865+
EXYNOS850_PIN_BANK_EINTG(4, 0xe0, "gpp27", 0x1c),
866+
};
867+
868+
/* pin banks of gs101 pin-controller (HSI1) */
869+
static const struct samsung_pin_bank_data gs101_pin_hsi1[] = {
870+
EXYNOS850_PIN_BANK_EINTG(6, 0x0, "gph0", 0x00),
871+
EXYNOS850_PIN_BANK_EINTG(7, 0x20, "gph1", 0x04),
872+
};
873+
874+
/* pin banks of gs101 pin-controller (HSI2) */
875+
static const struct samsung_pin_bank_data gs101_pin_hsi2[] = {
876+
EXYNOS850_PIN_BANK_EINTG(6, 0x0, "gph2", 0x00),
877+
EXYNOS850_PIN_BANK_EINTG(2, 0x20, "gph3", 0x04),
878+
EXYNOS850_PIN_BANK_EINTG(6, 0x40, "gph4", 0x08),
879+
};
880+
881+
static const struct samsung_pin_ctrl gs101_pin_ctrl[] __initconst = {
882+
{
883+
/* pin banks of gs101 pin-controller (ALIVE) */
884+
.pin_banks = gs101_pin_alive,
885+
.nr_banks = ARRAY_SIZE(gs101_pin_alive),
886+
.eint_wkup_init = exynos_eint_wkup_init,
887+
.suspend = exynos_pinctrl_suspend,
888+
.resume = exynos_pinctrl_resume,
889+
}, {
890+
/* pin banks of gs101 pin-controller (FAR_ALIVE) */
891+
.pin_banks = gs101_pin_far_alive,
892+
.nr_banks = ARRAY_SIZE(gs101_pin_far_alive),
893+
.eint_wkup_init = exynos_eint_wkup_init,
894+
.suspend = exynos_pinctrl_suspend,
895+
.resume = exynos_pinctrl_resume,
896+
}, {
897+
/* pin banks of gs101 pin-controller (GSACORE) */
898+
.pin_banks = gs101_pin_gsacore,
899+
.nr_banks = ARRAY_SIZE(gs101_pin_gsacore),
900+
}, {
901+
/* pin banks of gs101 pin-controller (GSACTRL) */
902+
.pin_banks = gs101_pin_gsactrl,
903+
.nr_banks = ARRAY_SIZE(gs101_pin_gsactrl),
904+
}, {
905+
/* pin banks of gs101 pin-controller (PERIC0) */
906+
.pin_banks = gs101_pin_peric0,
907+
.nr_banks = ARRAY_SIZE(gs101_pin_peric0),
908+
.eint_gpio_init = exynos_eint_gpio_init,
909+
.suspend = exynos_pinctrl_suspend,
910+
.resume = exynos_pinctrl_resume,
911+
}, {
912+
/* pin banks of gs101 pin-controller (PERIC1) */
913+
.pin_banks = gs101_pin_peric1,
914+
.nr_banks = ARRAY_SIZE(gs101_pin_peric1),
915+
.eint_gpio_init = exynos_eint_gpio_init,
916+
.suspend = exynos_pinctrl_suspend,
917+
.resume = exynos_pinctrl_resume,
918+
}, {
919+
/* pin banks of gs101 pin-controller (HSI1) */
920+
.pin_banks = gs101_pin_hsi1,
921+
.nr_banks = ARRAY_SIZE(gs101_pin_hsi1),
922+
.eint_gpio_init = exynos_eint_gpio_init,
923+
.suspend = exynos_pinctrl_suspend,
924+
.resume = exynos_pinctrl_resume,
925+
}, {
926+
/* pin banks of gs101 pin-controller (HSI2) */
927+
.pin_banks = gs101_pin_hsi2,
928+
.nr_banks = ARRAY_SIZE(gs101_pin_hsi2),
929+
.eint_gpio_init = exynos_eint_gpio_init,
930+
.suspend = exynos_pinctrl_suspend,
931+
.resume = exynos_pinctrl_resume,
932+
},
933+
};
934+
935+
const struct samsung_pinctrl_of_match_data gs101_of_data __initconst = {
936+
.ctrl = gs101_pin_ctrl,
937+
.num_ctrl = ARRAY_SIZE(gs101_pin_ctrl),
938+
};

drivers/pinctrl/samsung/pinctrl-samsung.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,8 @@ static const struct of_device_id samsung_pinctrl_dt_match[] = {
13091309
.data = &s5pv210_of_data },
13101310
#endif
13111311
#ifdef CONFIG_PINCTRL_EXYNOS_ARM64
1312+
{ .compatible = "google,gs101-pinctrl",
1313+
.data = &gs101_of_data },
13121314
{ .compatible = "samsung,exynos5433-pinctrl",
13131315
.data = &exynos5433_of_data },
13141316
{ .compatible = "samsung,exynos7-pinctrl",

drivers/pinctrl/samsung/pinctrl-samsung.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ extern const struct samsung_pinctrl_of_match_data exynos7885_of_data;
351351
extern const struct samsung_pinctrl_of_match_data exynos850_of_data;
352352
extern const struct samsung_pinctrl_of_match_data exynosautov9_of_data;
353353
extern const struct samsung_pinctrl_of_match_data fsd_of_data;
354+
extern const struct samsung_pinctrl_of_match_data gs101_of_data;
354355
extern const struct samsung_pinctrl_of_match_data s3c64xx_of_data;
355356
extern const struct samsung_pinctrl_of_match_data s3c2412_of_data;
356357
extern const struct samsung_pinctrl_of_match_data s3c2416_of_data;

0 commit comments

Comments
 (0)