Re: [PATCH v1 03/12] arm64: dts: librem5-devkit: allow modem to wake the system from suspend

From: Shawn Guo
Date: Sun Feb 16 2020 - 23:02:29 EST


On Wed, Feb 05, 2020 at 03:29:54PM +0100, Martin Kepplinger wrote:
> From: "Angus Ainslie (Purism)" <angus@xxxxxxxx>
>
> Connect the WoWWAN signal to a gpio key to wake up the system from suspend.
>
> Signed-off-by: Angus Ainslie (Purism) <angus@xxxxxxxx>
> ---
> .../dts/freescale/imx8mq-librem5-devkit.dts | 27 +++++++++++++++----
> 1 file changed, 22 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> index 8162576e8f3d..ac6ba227e1da 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts
> @@ -33,7 +33,7 @@
> gpio-keys {
> compatible = "gpio-keys";
> pinctrl-names = "default";
> - pinctrl-0 = <&pinctrl_gpio_keys>;
> + pinctrl-0 = <&pinctrl_gpio_keys>, <&pinctrl_wwan_in>;
>
> btn1 {
> label = "VOL_UP";
> @@ -55,6 +55,15 @@
> wakeup-source;
> linux,code = <KEY_HP>;
> };
> +
> + wwan_wake {
> + label = "WWAN_WAKE";
> + gpios = <&gpio3 8 GPIO_ACTIVE_LOW>;
> + interrupt-parent = <&gpio3>;
> + interrupts = <8 GPIO_ACTIVE_LOW>;
> + wakeup-source;
> + linux,code = <KEY_PHONE>;
> + };
> };
>
> leds {
> @@ -767,11 +776,19 @@
> >;
> };
>
> - pinctrl_wwan: wwangrp {
> + pinctrl_wwan_in: wwaningrp {
> + fsl,pins = <
> + /* nWoWWAN */
> + MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8 0x80

Why not just add it to pinctrl_gpio_keys to make the change minimal.

> + >;
> + };
> +
> + pinctrl_wwan_out: wwanoutgrp {
> fsl,pins = <
> - MX8MQ_IOMUXC_NAND_CE3_B_GPIO3_IO4 0x09 /* nWWAN_DISABLE */
> - MX8MQ_IOMUXC_NAND_DATA02_GPIO3_IO8 0x80 /* nWoWWAN */
> - MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9 0x19 /* WWAN_RESET */
> + /* nWWAN_DISABLE */
> + MX8MQ_IOMUXC_NAND_CE3_B_GPIO3_IO4 0x09
> + /* WWAN_RESET */
> + MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9 0x19

Unnecessary changes.

Shawn

> >;
> };
> };
> --
> 2.20.1
>