diff --git a/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml b/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml index c1dffa2565..721e589eec 100644 --- a/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml +++ b/Documentation/devicetree/bindings/pinctrl/samsung,pinctrl-wakeup-interrupt.yaml @@ -61,6 +61,9 @@ properties: - const: google,gs101-wakeup-eint - const: samsung,exynos850-wakeup-eint - const: samsung,exynos7-wakeup-eint + - items: + - const: google,zuma-wakeup-eint + - const: google,zumapro-wakeup-eint interrupts: description: diff --git a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts index 979a1a6090..074eee930f 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts @@ -6,6 +6,7 @@ /dts-v1/; #include +#include #include "zuma.dtsi" / { @@ -77,6 +78,33 @@ }; }; + gpio-keys { + compatible = "gpio-keys"; + pinctrl-0 = <&key_voldown>, <&key_volup>, <&key_power>; + pinctrl-names = "default"; + + button-vol-down { + label = "KEY_VOLUMEDOWN"; + linux,code = ; + gpios = <&gpa4 1 GPIO_ACTIVE_LOW>; + wakeup-source; + }; + + button-vol-up { + label = "KEY_VOLUMEUP"; + linux,code = ; + gpios = <&gpa6 2 GPIO_ACTIVE_LOW>; + wakeup-source; + }; + + button-power { + label = "KEY_POWER"; + linux,code = ; + gpios = <&gpa4 0 GPIO_ACTIVE_LOW>; + wakeup-source; + }; + }; + reserved-memory { #address-cells = <2>; #size-cells = <1>; diff --git a/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi index 581cb8c8a5..724ef95913 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi @@ -7,6 +7,159 @@ #include "gs101-pinctrl.h" +&pinctrl_gpio_alive { + gpa0: gpa0-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + ; + }; + + gpa1: gpa1-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + , + , + ; + }; + + gpa2: gpa2-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + ; + }; + + gpa3: gpa3-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + ; + }; + + gpa4: gpa4-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + ; + }; + + gpa6: gpa6-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + , + , + ; + }; + + gpa7: gpa7-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + , + , + , + , + ; + }; + + gpa8: gpa8-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + ; + }; + + gpa9: gpa9-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + , + , + , + ; + }; + + gpa10: gpa10-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = , + , + , + , + ; + }; + + key_power: key-power-pins { + samsung,pins = "gpa4-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + key_voldown: key-voldown-pins { + samsung,pins = "gpa4-1"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + key_volup: key-volup-pins { + samsung,pins = "gpa6-2"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; +}; + &pinctrl_peric0 { gpp0: gpp0-gpio-bank { gpio-controller; diff --git a/arch/arm64/boot/dts/exynos/google/zuma.dtsi b/arch/arm64/boot/dts/exynos/google/zuma.dtsi index e47c62529d..92bef7f97d 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma.dtsi @@ -21,6 +21,7 @@ /* The pin controllers are numbered as in Tensor G4's driver data. */ aliases { + pinctrl0 = &pinctrl_gpio_alive; pinctrl10 = &pinctrl_hsi2ufs; pinctrl11 = &pinctrl_peric0; }; @@ -430,6 +431,18 @@ mode-recovery = <0xff>; }; }; + + pinctrl_gpio_alive: pinctrl@154d0000 { + compatible = "google,zuma-pinctrl"; + reg = <0x154d0000 0x1000>; + clocks = <&clk_gpio_stub>; + clock-names = "pclk"; + + wakeup-interrupt-controller { + compatible = "google,zuma-wakeup-eint", + "google,zumapro-wakeup-eint"; + }; + }; }; }; diff --git a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c index 74bcc38069..bab951eb0a 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos-arm64.c @@ -2658,7 +2658,6 @@ static const struct samsung_pin_ctrl zuma_pin_ctrl[] __initconst = { /* Controller 0: ALIVE */ .pin_banks = zuma_pin_alive, .nr_banks = ARRAY_SIZE(zuma_pin_alive), - .eint_gpio_init = exynos_eint_gpio_init, .eint_wkup_init = exynos_eint_wkup_init, }, { /* Controller 1: CUSTOM */