Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'samsung-pinctrl-6.18' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel

Samsung pinctrl drivers changes for v6.18

1. Add pin controller drivers for new Axis ARTPEC-8 SoC. The SoC shares
all main blocks, including the pin controller, with Samsung SoC, so
same drivers and bindings are used.

2. Drop remaining support for Samsung S3C2410 SoC pin controllers. The
actual SoC support was removed in January 2023, so this is just
remaining cleanup.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+65 -26
+1 -18
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
··· 30 30 compatible: 31 31 oneOf: 32 32 - enum: 33 - - samsung,s3c2410-wakeup-eint 34 - - samsung,s3c2412-wakeup-eint 35 33 - samsung,s3c64xx-wakeup-eint 36 34 - samsung,s5pv210-wakeup-eint 37 35 - samsung,exynos4210-wakeup-eint ··· 57 59 description: 58 60 Interrupt used by multiplexed external wake-up interrupts. 59 61 minItems: 1 60 - maxItems: 6 62 + maxItems: 4 61 63 62 64 required: 63 65 - compatible 64 66 65 67 allOf: 66 - - if: 67 - properties: 68 - compatible: 69 - contains: 70 - enum: 71 - - samsung,s3c2410-wakeup-eint 72 - - samsung,s3c2412-wakeup-eint 73 - then: 74 - properties: 75 - interrupts: 76 - minItems: 6 77 - maxItems: 6 78 - required: 79 - - interrupts 80 - 81 68 - if: 82 69 properties: 83 70 compatible:
+1 -4
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml
··· 35 35 36 36 compatible: 37 37 enum: 38 + - axis,artpec8-pinctrl 38 39 - google,gs101-pinctrl 39 - - samsung,s3c2412-pinctrl 40 - - samsung,s3c2416-pinctrl 41 - - samsung,s3c2440-pinctrl 42 - - samsung,s3c2450-pinctrl 43 40 - samsung,s3c64xx-pinctrl 44 41 - samsung,s5pv210-pinctrl 45 42 - samsung,exynos2200-pinctrl
+50
drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
··· 76 76 .reg_offset = { 0x00, 0x04, 0x08, 0x0c, 0x10, 0x14, }, 77 77 }; 78 78 79 + /* 80 + * Bank type for non-alive type. Bit fields: 81 + * CON: 4, DAT: 1, PUD: 4, DRV: 4 82 + */ 83 + static const struct samsung_pin_bank_type artpec_bank_type_off = { 84 + .fld_width = { 4, 1, 4, 4, }, 85 + .reg_offset = { 0x00, 0x04, 0x08, 0x0c, }, 86 + }; 87 + 79 88 /* Pad retention control code for accessing PMU regmap */ 80 89 static atomic_t exynos_shared_retention_refcnt; 81 90 ··· 1824 1815 const struct samsung_pinctrl_of_match_data gs101_of_data __initconst = { 1825 1816 .ctrl = gs101_pin_ctrl, 1826 1817 .num_ctrl = ARRAY_SIZE(gs101_pin_ctrl), 1818 + }; 1819 + 1820 + /* pin banks of artpec8 pin-controller (FSYS0) */ 1821 + static const struct samsung_pin_bank_data artpec8_pin_banks0[] __initconst = { 1822 + ARTPEC_PIN_BANK_EINTG(5, 0x000, "gpf0", 0x00), 1823 + ARTPEC_PIN_BANK_EINTG(4, 0x020, "gpf1", 0x04), 1824 + ARTPEC_PIN_BANK_EINTG(8, 0x040, "gpf2", 0x08), 1825 + ARTPEC_PIN_BANK_EINTG(4, 0x060, "gpf3", 0x0c), 1826 + ARTPEC_PIN_BANK_EINTG(7, 0x080, "gpf4", 0x10), 1827 + ARTPEC_PIN_BANK_EINTG(8, 0x0a0, "gpe0", 0x14), 1828 + ARTPEC_PIN_BANK_EINTG(8, 0x0c0, "gpe1", 0x18), 1829 + ARTPEC_PIN_BANK_EINTG(6, 0x0e0, "gpe2", 0x1c), 1830 + ARTPEC_PIN_BANK_EINTG(8, 0x100, "gps0", 0x20), 1831 + ARTPEC_PIN_BANK_EINTG(8, 0x120, "gps1", 0x24), 1832 + }; 1833 + 1834 + /* pin banks of artpec8 pin-controller (PERIC) */ 1835 + static const struct samsung_pin_bank_data artpec8_pin_banks1[] __initconst = { 1836 + ARTPEC_PIN_BANK_EINTG(8, 0x000, "gpa0", 0x00), 1837 + ARTPEC_PIN_BANK_EINTG(8, 0x020, "gpa1", 0x04), 1838 + ARTPEC_PIN_BANK_EINTG(8, 0x040, "gpa2", 0x08), 1839 + ARTPEC_PIN_BANK_EINTG(2, 0x060, "gpk0", 0x0c), 1840 + }; 1841 + 1842 + static const struct samsung_pin_ctrl artpec8_pin_ctrl[] __initconst = { 1843 + { 1844 + /* pin-controller instance 0 FSYS data */ 1845 + .pin_banks = artpec8_pin_banks0, 1846 + .nr_banks = ARRAY_SIZE(artpec8_pin_banks0), 1847 + .eint_gpio_init = exynos_eint_gpio_init, 1848 + }, { 1849 + /* pin-controller instance 1 PERIC data */ 1850 + .pin_banks = artpec8_pin_banks1, 1851 + .nr_banks = ARRAY_SIZE(artpec8_pin_banks1), 1852 + .eint_gpio_init = exynos_eint_gpio_init, 1853 + }, 1854 + }; 1855 + 1856 + const struct samsung_pinctrl_of_match_data artpec8_of_data __initconst = { 1857 + .ctrl = artpec8_pin_ctrl, 1858 + .num_ctrl = ARRAY_SIZE(artpec8_pin_ctrl), 1827 1859 };
+10
drivers/pinctrl/samsung/pinctrl-exynos.h
··· 236 236 .name = id \ 237 237 } 238 238 239 + #define ARTPEC_PIN_BANK_EINTG(pins, reg, id, offs) \ 240 + { \ 241 + .type = &artpec_bank_type_off, \ 242 + .pctl_offset = reg, \ 243 + .nr_pins = pins, \ 244 + .eint_type = EINT_TYPE_GPIO, \ 245 + .eint_offset = offs, \ 246 + .name = id \ 247 + } 248 + 239 249 /** 240 250 * struct exynos_weint_data: irq specific data for all the wakeup interrupts 241 251 * generated by the external wakeup interrupt controller.
+2
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 1482 1482 .data = &s5pv210_of_data }, 1483 1483 #endif 1484 1484 #ifdef CONFIG_PINCTRL_EXYNOS_ARM64 1485 + { .compatible = "axis,artpec8-pinctrl", 1486 + .data = &artpec8_of_data }, 1485 1487 { .compatible = "google,gs101-pinctrl", 1486 1488 .data = &gs101_of_data }, 1487 1489 { .compatible = "samsung,exynos2200-pinctrl",
+1 -4
drivers/pinctrl/samsung/pinctrl-samsung.h
··· 381 381 }; 382 382 383 383 /* list of all exported SoC specific data */ 384 + extern const struct samsung_pinctrl_of_match_data artpec8_of_data; 384 385 extern const struct samsung_pinctrl_of_match_data exynos2200_of_data; 385 386 extern const struct samsung_pinctrl_of_match_data exynos3250_of_data; 386 387 extern const struct samsung_pinctrl_of_match_data exynos4210_of_data; ··· 403 402 extern const struct samsung_pinctrl_of_match_data fsd_of_data; 404 403 extern const struct samsung_pinctrl_of_match_data gs101_of_data; 405 404 extern const struct samsung_pinctrl_of_match_data s3c64xx_of_data; 406 - extern const struct samsung_pinctrl_of_match_data s3c2412_of_data; 407 - extern const struct samsung_pinctrl_of_match_data s3c2416_of_data; 408 - extern const struct samsung_pinctrl_of_match_data s3c2440_of_data; 409 - extern const struct samsung_pinctrl_of_match_data s3c2450_of_data; 410 405 extern const struct samsung_pinctrl_of_match_data s5pv210_of_data; 411 406 412 407 #endif /* __PINCTRL_SAMSUNG_H */