ARM: dts: rockchip: Configure BT_HOST_WAKE as wake-up signal on veyron
authorDouglas Anderson <dianders@chromium.org>
Mon, 10 Jun 2019 23:51:44 +0000 (16:51 -0700)
committerHeiko Stuebner <heiko@sntech.de>
Fri, 14 Jun 2019 09:37:15 +0000 (11:37 +0200)
This enables wake up on Bluetooth activity when the device is
suspended. The BT_HOST_WAKE signal is only connected on devices
with BT module that are connected through UART.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm/boot/dts/rk3288-veyron.dtsi

index 3257ca90f0e89545b7e36d4f5dc8b21670a1dc57..e2635ad574e758d60f9027f8ea6493b0759f0b91 100644 (file)
                reg = <0x0 0x0 0x0 0x80000000>;
        };
 
+       bt_activity: bt-activity {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&bt_host_wake>;
+
+               /*
+                * HACK: until we have an LPM driver, we'll use an
+                * ugly GPIO key to allow Bluetooth to wake from S3.
+                * This is expected to only be used by BT modules that
+                * use UART for comms.  For BT modules that talk over
+                * SDIO we should use a wakeup mechanism related to SDIO.
+                *
+                * Use KEY_RESERVED here since that will work as a wakeup but
+                * doesn't get reported to higher levels (so doesn't confuse
+                * Chrome).
+                */
+               bt-wake {
+                       label = "BT Wakeup";
+                       gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>;
+                       linux,code = <KEY_RESERVED>;
+                       wakeup-source;
+               };
+
+       };
+
        power_button: power-button {
                compatible = "gpio-keys";
                pinctrl-names = "default";
                        rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
                };
 
+               bt_host_wake: bt-host-wake {
+                       rockchip,pins = <4 RK_PD7 RK_FUNC_GPIO &pcfg_pull_down>;
+               };
+
                /*
                 * We run sdio0 at max speed; bump up drive strength.
                 * We also have external pulls, so disable the internal ones.