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

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

Samsung pinctrl drivers changes for v6.8

1. New hardware: Add pin controllers for Samsung ExynosAutov920 and
Google Tensor GS101.

2. Few DT bindings cleanups: add specific compatibles for each device
using generic compatible as fallback. This affects only DTS, no
driver changes are needed.

3. Allow setting affinity on non wake-up external GPIO interrupts.

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

+460 -26
+30 -15
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml
··· 28 28 29 29 properties: 30 30 compatible: 31 - enum: 32 - - samsung,s3c2410-wakeup-eint 33 - - samsung,s3c2412-wakeup-eint 34 - - samsung,s3c64xx-wakeup-eint 35 - - samsung,s5pv210-wakeup-eint 36 - - samsung,exynos4210-wakeup-eint 37 - - samsung,exynos7-wakeup-eint 38 - - samsung,exynos850-wakeup-eint 39 - - samsung,exynosautov9-wakeup-eint 31 + oneOf: 32 + - enum: 33 + - samsung,s3c2410-wakeup-eint 34 + - samsung,s3c2412-wakeup-eint 35 + - samsung,s3c64xx-wakeup-eint 36 + - samsung,s5pv210-wakeup-eint 37 + - samsung,exynos4210-wakeup-eint 38 + - samsung,exynos7-wakeup-eint 39 + - samsung,exynosautov920-wakeup-eint 40 + - items: 41 + - enum: 42 + - samsung,exynos5433-wakeup-eint 43 + - samsung,exynos7885-wakeup-eint 44 + - samsung,exynos850-wakeup-eint 45 + - const: samsung,exynos7-wakeup-eint 46 + - items: 47 + - enum: 48 + - google,gs101-wakeup-eint 49 + - samsung,exynosautov9-wakeup-eint 50 + - const: samsung,exynos850-wakeup-eint 51 + - const: samsung,exynos7-wakeup-eint 40 52 41 53 interrupts: 42 54 description: ··· 91 79 - if: 92 80 properties: 93 81 compatible: 94 - contains: 95 - enum: 96 - - samsung,s5pv210-wakeup-eint 97 - - samsung,exynos4210-wakeup-eint 98 - - samsung,exynos7-wakeup-eint 82 + # Match without "contains", to skip newer variants which are still 83 + # compatible with samsung,exynos7-wakeup-eint 84 + enum: 85 + - samsung,s5pv210-wakeup-eint 86 + - samsung,exynos4210-wakeup-eint 87 + - samsung,exynos5433-wakeup-eint 88 + - samsung,exynos7-wakeup-eint 89 + - samsung,exynos7885-wakeup-eint 99 90 then: 100 91 properties: 101 92 interrupts: ··· 113 98 contains: 114 99 enum: 115 100 - samsung,exynos850-wakeup-eint 116 - - samsung,exynosautov9-wakeup-eint 101 + - samsung,exynosautov920-wakeup-eint 117 102 then: 118 103 properties: 119 104 interrupts: false
+4 -1
Documentation/devicetree/bindings/pinctrl/samsung,pinctrl.yaml
··· 35 35 36 36 compatible: 37 37 enum: 38 + - google,gs101-pinctrl 38 39 - samsung,s3c2412-pinctrl 39 40 - samsung,s3c2416-pinctrl 40 41 - samsung,s3c2440-pinctrl ··· 54 53 - samsung,exynos7885-pinctrl 55 54 - samsung,exynos850-pinctrl 56 55 - samsung,exynosautov9-pinctrl 56 + - samsung,exynosautov920-pinctrl 57 57 - tesla,fsd-pinctrl 58 58 59 59 interrupts: ··· 315 313 pinctrl-0 = <&initial_alive>; 316 314 317 315 wakeup-interrupt-controller { 318 - compatible = "samsung,exynos7-wakeup-eint"; 316 + compatible = "samsung,exynos5433-wakeup-eint", 317 + "samsung,exynos7-wakeup-eint"; 319 318 interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>; 320 319 }; 321 320
-1
MAINTAINERS
··· 19227 19227 L: linux-samsung-soc@vger.kernel.org 19228 19228 S: Maintained 19229 19229 T: git git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git 19230 - T: git git://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk.git 19231 19230 F: Documentation/devicetree/bindings/clock/samsung,*.yaml 19232 19231 F: Documentation/devicetree/bindings/clock/samsung,s3c* 19233 19232 F: drivers/clk/samsung/
+280
drivers/pinctrl/samsung/pinctrl-exynos-arm64.c
··· 726 726 .num_ctrl = ARRAY_SIZE(exynosautov9_pin_ctrl), 727 727 }; 728 728 729 + /* pin banks of exynosautov920 pin-controller 0 (ALIVE) */ 730 + static const struct samsung_pin_bank_data exynosautov920_pin_banks0[] = { 731 + EXYNOSV920_PIN_BANK_EINTW(8, 0x0000, "gpa0", 0x18, 0x24, 0x28), 732 + EXYNOSV920_PIN_BANK_EINTW(2, 0x1000, "gpa1", 0x18, 0x20, 0x24), 733 + EXYNOS850_PIN_BANK_EINTN(2, 0x2000, "gpq0"), 734 + }; 735 + 736 + /* pin banks of exynosautov920 pin-controller 1 (AUD) */ 737 + static const struct samsung_pin_bank_data exynosautov920_pin_banks1[] = { 738 + EXYNOSV920_PIN_BANK_EINTG(7, 0x0000, "gpb0", 0x18, 0x24, 0x28), 739 + EXYNOSV920_PIN_BANK_EINTG(6, 0x1000, "gpb1", 0x18, 0x24, 0x28), 740 + EXYNOSV920_PIN_BANK_EINTG(8, 0x2000, "gpb2", 0x18, 0x24, 0x28), 741 + EXYNOSV920_PIN_BANK_EINTG(8, 0x3000, "gpb3", 0x18, 0x24, 0x28), 742 + EXYNOSV920_PIN_BANK_EINTG(8, 0x4000, "gpb4", 0x18, 0x24, 0x28), 743 + EXYNOSV920_PIN_BANK_EINTG(5, 0x5000, "gpb5", 0x18, 0x24, 0x28), 744 + EXYNOSV920_PIN_BANK_EINTG(5, 0x6000, "gpb6", 0x18, 0x24, 0x28), 745 + }; 746 + 747 + /* pin banks of exynosautov920 pin-controller 2 (HSI0) */ 748 + static const struct samsung_pin_bank_data exynosautov920_pin_banks2[] = { 749 + EXYNOSV920_PIN_BANK_EINTG(6, 0x0000, "gph0", 0x18, 0x24, 0x28), 750 + EXYNOSV920_PIN_BANK_EINTG(2, 0x1000, "gph1", 0x18, 0x20, 0x24), 751 + }; 752 + 753 + /* pin banks of exynosautov920 pin-controller 3 (HSI1) */ 754 + static const struct samsung_pin_bank_data exynosautov920_pin_banks3[] = { 755 + EXYNOSV920_PIN_BANK_EINTG(7, 0x000, "gph8", 0x18, 0x24, 0x28), 756 + }; 757 + 758 + /* pin banks of exynosautov920 pin-controller 4 (HSI2) */ 759 + static const struct samsung_pin_bank_data exynosautov920_pin_banks4[] = { 760 + EXYNOSV920_PIN_BANK_EINTG(8, 0x0000, "gph3", 0x18, 0x24, 0x28), 761 + EXYNOSV920_PIN_BANK_EINTG(7, 0x1000, "gph4", 0x18, 0x24, 0x28), 762 + EXYNOSV920_PIN_BANK_EINTG(8, 0x2000, "gph5", 0x18, 0x24, 0x28), 763 + EXYNOSV920_PIN_BANK_EINTG(7, 0x3000, "gph6", 0x18, 0x24, 0x28), 764 + }; 765 + 766 + /* pin banks of exynosautov920 pin-controller 5 (HSI2UFS) */ 767 + static const struct samsung_pin_bank_data exynosautov920_pin_banks5[] = { 768 + EXYNOSV920_PIN_BANK_EINTG(4, 0x000, "gph2", 0x18, 0x20, 0x24), 769 + }; 770 + 771 + /* pin banks of exynosautov920 pin-controller 6 (PERIC0) */ 772 + static const struct samsung_pin_bank_data exynosautov920_pin_banks6[] = { 773 + EXYNOSV920_PIN_BANK_EINTG(8, 0x0000, "gpp0", 0x18, 0x24, 0x28), 774 + EXYNOSV920_PIN_BANK_EINTG(8, 0x1000, "gpp1", 0x18, 0x24, 0x28), 775 + EXYNOSV920_PIN_BANK_EINTG(8, 0x2000, "gpp2", 0x18, 0x24, 0x28), 776 + EXYNOSV920_PIN_BANK_EINTG(5, 0x3000, "gpg0", 0x18, 0x24, 0x28), 777 + EXYNOSV920_PIN_BANK_EINTG(8, 0x4000, "gpp3", 0x18, 0x24, 0x28), 778 + EXYNOSV920_PIN_BANK_EINTG(4, 0x5000, "gpp4", 0x18, 0x20, 0x24), 779 + EXYNOSV920_PIN_BANK_EINTG(4, 0x6000, "gpg2", 0x18, 0x20, 0x24), 780 + EXYNOSV920_PIN_BANK_EINTG(4, 0x7000, "gpg5", 0x18, 0x20, 0x24), 781 + EXYNOSV920_PIN_BANK_EINTG(3, 0x8000, "gpg3", 0x18, 0x20, 0x24), 782 + EXYNOSV920_PIN_BANK_EINTG(5, 0x9000, "gpg4", 0x18, 0x24, 0x28), 783 + }; 784 + 785 + /* pin banks of exynosautov920 pin-controller 7 (PERIC1) */ 786 + static const struct samsung_pin_bank_data exynosautov920_pin_banks7[] = { 787 + EXYNOSV920_PIN_BANK_EINTG(8, 0x0000, "gpp5", 0x18, 0x24, 0x28), 788 + EXYNOSV920_PIN_BANK_EINTG(5, 0x1000, "gpp6", 0x18, 0x24, 0x28), 789 + EXYNOSV920_PIN_BANK_EINTG(4, 0x2000, "gpp10", 0x18, 0x20, 0x24), 790 + EXYNOSV920_PIN_BANK_EINTG(8, 0x3000, "gpp7", 0x18, 0x24, 0x28), 791 + EXYNOSV920_PIN_BANK_EINTG(4, 0x4000, "gpp8", 0x18, 0x20, 0x24), 792 + EXYNOSV920_PIN_BANK_EINTG(4, 0x5000, "gpp11", 0x18, 0x20, 0x24), 793 + EXYNOSV920_PIN_BANK_EINTG(4, 0x6000, "gpp9", 0x18, 0x20, 0x24), 794 + EXYNOSV920_PIN_BANK_EINTG(4, 0x7000, "gpp12", 0x18, 0x20, 0x24), 795 + EXYNOSV920_PIN_BANK_EINTG(8, 0x8000, "gpg1", 0x18, 0x24, 0x28), 796 + }; 797 + 798 + static const struct samsung_retention_data exynosautov920_retention_data __initconst = { 799 + .regs = NULL, 800 + .nr_regs = 0, 801 + .value = 0, 802 + .refcnt = &exynos_shared_retention_refcnt, 803 + .init = exynos_retention_init, 804 + }; 805 + 806 + static const struct samsung_pin_ctrl exynosautov920_pin_ctrl[] = { 807 + { 808 + /* pin-controller instance 0 ALIVE data */ 809 + .pin_banks = exynosautov920_pin_banks0, 810 + .nr_banks = ARRAY_SIZE(exynosautov920_pin_banks0), 811 + .eint_wkup_init = exynos_eint_wkup_init, 812 + .suspend = exynos_pinctrl_suspend, 813 + .resume = exynos_pinctrl_resume, 814 + .retention_data = &exynosautov920_retention_data, 815 + }, { 816 + /* pin-controller instance 1 AUD data */ 817 + .pin_banks = exynosautov920_pin_banks1, 818 + .nr_banks = ARRAY_SIZE(exynosautov920_pin_banks1), 819 + }, { 820 + /* pin-controller instance 2 HSI0 data */ 821 + .pin_banks = exynosautov920_pin_banks2, 822 + .nr_banks = ARRAY_SIZE(exynosautov920_pin_banks2), 823 + .eint_gpio_init = exynos_eint_gpio_init, 824 + .suspend = exynos_pinctrl_suspend, 825 + .resume = exynos_pinctrl_resume, 826 + }, { 827 + /* pin-controller instance 3 HSI1 data */ 828 + .pin_banks = exynosautov920_pin_banks3, 829 + .nr_banks = ARRAY_SIZE(exynosautov920_pin_banks3), 830 + .eint_gpio_init = exynos_eint_gpio_init, 831 + .suspend = exynos_pinctrl_suspend, 832 + .resume = exynos_pinctrl_resume, 833 + }, { 834 + /* pin-controller instance 4 HSI2 data */ 835 + .pin_banks = exynosautov920_pin_banks4, 836 + .nr_banks = ARRAY_SIZE(exynosautov920_pin_banks4), 837 + .eint_gpio_init = exynos_eint_gpio_init, 838 + .suspend = exynos_pinctrl_suspend, 839 + .resume = exynos_pinctrl_resume, 840 + }, { 841 + /* pin-controller instance 5 HSI2UFS data */ 842 + .pin_banks = exynosautov920_pin_banks5, 843 + .nr_banks = ARRAY_SIZE(exynosautov920_pin_banks5), 844 + .eint_gpio_init = exynos_eint_gpio_init, 845 + .suspend = exynos_pinctrl_suspend, 846 + .resume = exynos_pinctrl_resume, 847 + }, { 848 + /* pin-controller instance 6 PERIC0 data */ 849 + .pin_banks = exynosautov920_pin_banks6, 850 + .nr_banks = ARRAY_SIZE(exynosautov920_pin_banks6), 851 + .eint_gpio_init = exynos_eint_gpio_init, 852 + .suspend = exynos_pinctrl_suspend, 853 + .resume = exynos_pinctrl_resume, 854 + }, { 855 + /* pin-controller instance 7 PERIC1 data */ 856 + .pin_banks = exynosautov920_pin_banks7, 857 + .nr_banks = ARRAY_SIZE(exynosautov920_pin_banks7), 858 + .eint_gpio_init = exynos_eint_gpio_init, 859 + .suspend = exynos_pinctrl_suspend, 860 + .resume = exynos_pinctrl_resume, 861 + }, 862 + }; 863 + 864 + const struct samsung_pinctrl_of_match_data exynosautov920_of_data __initconst = { 865 + .ctrl = exynosautov920_pin_ctrl, 866 + .num_ctrl = ARRAY_SIZE(exynosautov920_pin_ctrl), 867 + }; 868 + 729 869 /* 730 870 * Pinctrl driver data for Tesla FSD SoC. FSD SoC includes three 731 871 * gpio/pin-mux/pinconfig controllers. ··· 935 795 const struct samsung_pinctrl_of_match_data fsd_of_data __initconst = { 936 796 .ctrl = fsd_pin_ctrl, 937 797 .num_ctrl = ARRAY_SIZE(fsd_pin_ctrl), 798 + }; 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 938 };
+100 -9
drivers/pinctrl/samsung/pinctrl-exynos.c
··· 52 52 struct irq_chip *chip = irq_data_get_irq_chip(irqd); 53 53 struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip); 54 54 struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 55 - unsigned long reg_mask = our_chip->eint_mask + bank->eint_offset; 55 + unsigned long reg_mask; 56 56 unsigned int mask; 57 57 unsigned long flags; 58 + 59 + if (bank->eint_mask_offset) 60 + reg_mask = bank->pctl_offset + bank->eint_mask_offset; 61 + else 62 + reg_mask = our_chip->eint_mask + bank->eint_offset; 58 63 59 64 raw_spin_lock_irqsave(&bank->slock, flags); 60 65 ··· 75 70 struct irq_chip *chip = irq_data_get_irq_chip(irqd); 76 71 struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip); 77 72 struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 78 - unsigned long reg_pend = our_chip->eint_pend + bank->eint_offset; 73 + unsigned long reg_pend; 74 + 75 + if (bank->eint_pend_offset) 76 + reg_pend = bank->pctl_offset + bank->eint_pend_offset; 77 + else 78 + reg_pend = our_chip->eint_pend + bank->eint_offset; 79 79 80 80 writel(1 << irqd->hwirq, bank->eint_base + reg_pend); 81 81 } ··· 90 80 struct irq_chip *chip = irq_data_get_irq_chip(irqd); 91 81 struct exynos_irq_chip *our_chip = to_exynos_irq_chip(chip); 92 82 struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 93 - unsigned long reg_mask = our_chip->eint_mask + bank->eint_offset; 83 + unsigned long reg_mask; 94 84 unsigned int mask; 95 85 unsigned long flags; 96 86 ··· 104 94 */ 105 95 if (irqd_get_trigger_type(irqd) & IRQ_TYPE_LEVEL_MASK) 106 96 exynos_irq_ack(irqd); 97 + 98 + if (bank->eint_mask_offset) 99 + reg_mask = bank->pctl_offset + bank->eint_mask_offset; 100 + else 101 + reg_mask = our_chip->eint_mask + bank->eint_offset; 107 102 108 103 raw_spin_lock_irqsave(&bank->slock, flags); 109 104 ··· 126 111 struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 127 112 unsigned int shift = EXYNOS_EINT_CON_LEN * irqd->hwirq; 128 113 unsigned int con, trig_type; 129 - unsigned long reg_con = our_chip->eint_con + bank->eint_offset; 114 + unsigned long reg_con; 130 115 131 116 switch (type) { 132 117 case IRQ_TYPE_EDGE_RISING: ··· 154 139 else 155 140 irq_set_handler_locked(irqd, handle_level_irq); 156 141 142 + if (bank->eint_con_offset) 143 + reg_con = bank->pctl_offset + bank->eint_con_offset; 144 + else 145 + reg_con = our_chip->eint_con + bank->eint_offset; 146 + 157 147 con = readl(bank->eint_base + reg_con); 158 148 con &= ~(EXYNOS_EINT_CON_MASK << shift); 159 149 con |= trig_type << shift; 160 150 writel(con, bank->eint_base + reg_con); 161 151 162 152 return 0; 153 + } 154 + 155 + static int exynos_irq_set_affinity(struct irq_data *irqd, 156 + const struct cpumask *dest, bool force) 157 + { 158 + struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); 159 + struct samsung_pinctrl_drv_data *d = bank->drvdata; 160 + struct irq_data *parent = irq_get_irq_data(d->irq); 161 + 162 + if (parent) 163 + return parent->chip->irq_set_affinity(parent, dest, force); 164 + 165 + return -EINVAL; 163 166 } 164 167 165 168 static int exynos_irq_request_resources(struct irq_data *irqd) ··· 245 212 .irq_mask = exynos_irq_mask, 246 213 .irq_ack = exynos_irq_ack, 247 214 .irq_set_type = exynos_irq_set_type, 215 + .irq_set_affinity = exynos_irq_set_affinity, 248 216 .irq_request_resources = exynos_irq_request_resources, 249 217 .irq_release_resources = exynos_irq_release_resources, 250 218 }, ··· 281 247 unsigned int svc, group, pin; 282 248 int ret; 283 249 284 - svc = readl(bank->eint_base + EXYNOS_SVC_OFFSET); 250 + if (bank->eint_con_offset) 251 + svc = readl(bank->eint_base + EXYNOSAUTO_SVC_OFFSET); 252 + else 253 + svc = readl(bank->eint_base + EXYNOS_SVC_OFFSET); 285 254 group = EXYNOS_SVC_GROUP(svc); 286 255 pin = svc & EXYNOS_SVC_NUM_MASK; 287 256 ··· 493 456 .set_eint_wakeup_mask = exynos_pinctrl_set_eint_wakeup_mask, 494 457 }; 495 458 459 + static const struct exynos_irq_chip exynosautov920_wkup_irq_chip __initconst = { 460 + .chip = { 461 + .name = "exynosautov920_wkup_irq_chip", 462 + .irq_unmask = exynos_irq_unmask, 463 + .irq_mask = exynos_irq_mask, 464 + .irq_ack = exynos_irq_ack, 465 + .irq_set_type = exynos_irq_set_type, 466 + .irq_set_wake = exynos_wkup_irq_set_wake, 467 + .irq_request_resources = exynos_irq_request_resources, 468 + .irq_release_resources = exynos_irq_release_resources, 469 + }, 470 + .eint_wake_mask_value = &eint_wake_mask_value, 471 + .eint_wake_mask_reg = EXYNOS5433_EINT_WAKEUP_MASK, 472 + .set_eint_wakeup_mask = exynos_pinctrl_set_eint_wakeup_mask, 473 + }; 474 + 496 475 /* list of external wakeup controllers supported */ 497 476 static const struct of_device_id exynos_wkup_irq_ids[] = { 498 477 { .compatible = "samsung,s5pv210-wakeup-eint", ··· 521 468 .data = &exynos7_wkup_irq_chip }, 522 469 { .compatible = "samsung,exynosautov9-wakeup-eint", 523 470 .data = &exynos7_wkup_irq_chip }, 471 + { .compatible = "samsung,exynosautov920-wakeup-eint", 472 + .data = &exynosautov920_wkup_irq_chip }, 524 473 { } 525 474 }; 526 475 ··· 710 655 pr_debug("%s: save mask %#010x\n", bank->name, save->eint_mask); 711 656 } 712 657 658 + static void exynosauto_pinctrl_suspend_bank(struct samsung_pinctrl_drv_data *drvdata, 659 + struct samsung_pin_bank *bank) 660 + { 661 + struct exynos_eint_gpio_save *save = bank->soc_priv; 662 + void __iomem *regs = bank->eint_base; 663 + 664 + save->eint_con = readl(regs + bank->pctl_offset + bank->eint_con_offset); 665 + save->eint_mask = readl(regs + bank->pctl_offset + bank->eint_mask_offset); 666 + 667 + pr_debug("%s: save con %#010x\n", bank->name, save->eint_con); 668 + pr_debug("%s: save mask %#010x\n", bank->name, save->eint_mask); 669 + } 670 + 713 671 void exynos_pinctrl_suspend(struct samsung_pinctrl_drv_data *drvdata) 714 672 { 715 673 struct samsung_pin_bank *bank = drvdata->pin_banks; ··· 730 662 int i; 731 663 732 664 for (i = 0; i < drvdata->nr_banks; ++i, ++bank) { 733 - if (bank->eint_type == EINT_TYPE_GPIO) 734 - exynos_pinctrl_suspend_bank(drvdata, bank); 665 + if (bank->eint_type == EINT_TYPE_GPIO) { 666 + if (bank->eint_con_offset) 667 + exynosauto_pinctrl_suspend_bank(drvdata, bank); 668 + else 669 + exynos_pinctrl_suspend_bank(drvdata, bank); 670 + } 735 671 else if (bank->eint_type == EINT_TYPE_WKUP) { 736 672 if (!irq_chip) { 737 673 irq_chip = bank->irq_chip; ··· 776 704 + bank->eint_offset); 777 705 } 778 706 707 + static void exynosauto_pinctrl_resume_bank(struct samsung_pinctrl_drv_data *drvdata, 708 + struct samsung_pin_bank *bank) 709 + { 710 + struct exynos_eint_gpio_save *save = bank->soc_priv; 711 + void __iomem *regs = bank->eint_base; 712 + 713 + pr_debug("%s: con %#010x => %#010x\n", bank->name, 714 + readl(regs + bank->pctl_offset + bank->eint_con_offset), save->eint_con); 715 + pr_debug("%s: mask %#010x => %#010x\n", bank->name, 716 + readl(regs + bank->pctl_offset + bank->eint_mask_offset), save->eint_mask); 717 + 718 + writel(save->eint_con, regs + bank->pctl_offset + bank->eint_con_offset); 719 + writel(save->eint_mask, regs + bank->pctl_offset + bank->eint_mask_offset); 720 + } 721 + 779 722 void exynos_pinctrl_resume(struct samsung_pinctrl_drv_data *drvdata) 780 723 { 781 724 struct samsung_pin_bank *bank = drvdata->pin_banks; 782 725 int i; 783 726 784 727 for (i = 0; i < drvdata->nr_banks; ++i, ++bank) 785 - if (bank->eint_type == EINT_TYPE_GPIO) 786 - exynos_pinctrl_resume_bank(drvdata, bank); 728 + if (bank->eint_type == EINT_TYPE_GPIO) { 729 + if (bank->eint_con_offset) 730 + exynosauto_pinctrl_resume_bank(drvdata, bank); 731 + else 732 + exynos_pinctrl_resume_bank(drvdata, bank); 733 + } 787 734 } 788 735 789 736 static void exynos_retention_enable(struct samsung_pinctrl_drv_data *drvdata)
+25
drivers/pinctrl/samsung/pinctrl-exynos.h
··· 31 31 #define EXYNOS7_WKUP_EMASK_OFFSET 0x900 32 32 #define EXYNOS7_WKUP_EPEND_OFFSET 0xA00 33 33 #define EXYNOS_SVC_OFFSET 0xB08 34 + #define EXYNOSAUTO_SVC_OFFSET 0xF008 34 35 35 36 /* helpers to access interrupt service register */ 36 37 #define EXYNOS_SVC_GROUP_SHIFT 3 ··· 139 138 .eint_type = EINT_TYPE_WKUP, \ 140 139 .eint_offset = offs, \ 141 140 .name = id \ 141 + } 142 + 143 + #define EXYNOSV920_PIN_BANK_EINTG(pins, reg, id, con_offs, mask_offs, pend_offs) \ 144 + { \ 145 + .type = &exynos850_bank_type_off, \ 146 + .pctl_offset = reg, \ 147 + .nr_pins = pins, \ 148 + .eint_type = EINT_TYPE_GPIO, \ 149 + .eint_con_offset = con_offs, \ 150 + .eint_mask_offset = mask_offs, \ 151 + .eint_pend_offset = pend_offs, \ 152 + .name = id \ 153 + } 154 + 155 + #define EXYNOSV920_PIN_BANK_EINTW(pins, reg, id, con_offs, mask_offs, pend_offs) \ 156 + { \ 157 + .type = &exynos850_bank_type_alive, \ 158 + .pctl_offset = reg, \ 159 + .nr_pins = pins, \ 160 + .eint_type = EINT_TYPE_WKUP, \ 161 + .eint_con_offset = con_offs, \ 162 + .eint_mask_offset = mask_offs, \ 163 + .eint_pend_offset = pend_offs, \ 164 + .name = id \ 142 165 } 143 166 144 167 /**
+7
drivers/pinctrl/samsung/pinctrl-samsung.c
··· 1106 1106 bank->eint_type = bdata->eint_type; 1107 1107 bank->eint_mask = bdata->eint_mask; 1108 1108 bank->eint_offset = bdata->eint_offset; 1109 + bank->eint_con_offset = bdata->eint_con_offset; 1110 + bank->eint_mask_offset = bdata->eint_mask_offset; 1111 + bank->eint_pend_offset = bdata->eint_pend_offset; 1109 1112 bank->name = bdata->name; 1110 1113 1111 1114 raw_spin_lock_init(&bank->slock); ··· 1312 1309 .data = &s5pv210_of_data }, 1313 1310 #endif 1314 1311 #ifdef CONFIG_PINCTRL_EXYNOS_ARM64 1312 + { .compatible = "google,gs101-pinctrl", 1313 + .data = &gs101_of_data }, 1315 1314 { .compatible = "samsung,exynos5433-pinctrl", 1316 1315 .data = &exynos5433_of_data }, 1317 1316 { .compatible = "samsung,exynos7-pinctrl", ··· 1324 1319 .data = &exynos850_of_data }, 1325 1320 { .compatible = "samsung,exynosautov9-pinctrl", 1326 1321 .data = &exynosautov9_of_data }, 1322 + { .compatible = "samsung,exynosautov920-pinctrl", 1323 + .data = &exynosautov920_of_data }, 1327 1324 { .compatible = "tesla,fsd-pinctrl", 1328 1325 .data = &fsd_of_data }, 1329 1326 #endif
+14
drivers/pinctrl/samsung/pinctrl-samsung.h
··· 122 122 * @eint_type: type of the external interrupt supported by the bank. 123 123 * @eint_mask: bit mask of pins which support EINT function. 124 124 * @eint_offset: SoC-specific EINT register or interrupt offset of bank. 125 + * @eint_con_offset: ExynosAuto SoC-specific EINT control register offset of bank. 126 + * @eint_mask_offset: ExynosAuto SoC-specific EINT mask register offset of bank. 127 + * @eint_pend_offset: ExynosAuto SoC-specific EINT pend register offset of bank. 125 128 * @name: name to be prefixed for each pin in this pin bank. 126 129 */ 127 130 struct samsung_pin_bank_data { ··· 136 133 enum eint_type eint_type; 137 134 u32 eint_mask; 138 135 u32 eint_offset; 136 + u32 eint_con_offset; 137 + u32 eint_mask_offset; 138 + u32 eint_pend_offset; 139 139 const char *name; 140 140 }; 141 141 ··· 153 147 * @eint_type: type of the external interrupt supported by the bank. 154 148 * @eint_mask: bit mask of pins which support EINT function. 155 149 * @eint_offset: SoC-specific EINT register or interrupt offset of bank. 150 + * @eint_con_offset: ExynosAuto SoC-specific EINT register or interrupt offset of bank. 151 + * @eint_mask_offset: ExynosAuto SoC-specific EINT mask register offset of bank. 152 + * @eint_pend_offset: ExynosAuto SoC-specific EINT pend register offset of bank. 156 153 * @name: name to be prefixed for each pin in this pin bank. 157 154 * @id: id of the bank, propagated to the pin range. 158 155 * @pin_base: starting pin number of the bank. ··· 179 170 enum eint_type eint_type; 180 171 u32 eint_mask; 181 172 u32 eint_offset; 173 + u32 eint_con_offset; 174 + u32 eint_mask_offset; 175 + u32 eint_pend_offset; 182 176 const char *name; 183 177 u32 id; 184 178 ··· 362 350 extern const struct samsung_pinctrl_of_match_data exynos7885_of_data; 363 351 extern const struct samsung_pinctrl_of_match_data exynos850_of_data; 364 352 extern const struct samsung_pinctrl_of_match_data exynosautov9_of_data; 353 + extern const struct samsung_pinctrl_of_match_data exynosautov920_of_data; 365 354 extern const struct samsung_pinctrl_of_match_data fsd_of_data; 355 + extern const struct samsung_pinctrl_of_match_data gs101_of_data; 366 356 extern const struct samsung_pinctrl_of_match_data s3c64xx_of_data; 367 357 extern const struct samsung_pinctrl_of_match_data s3c2412_of_data; 368 358 extern const struct samsung_pinctrl_of_match_data s3c2416_of_data;