/dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target-path = "/"; __overlay__ { gpio-keys { compatible = "gpio-keys"; autorepeat; pinctrl-names = "default"; pinctrl-0 = <&wifi_wake>; switch-4 { label = "sw4"; linux,code = <116>; /* KEY_POWER, see include/uapi/linux/input-event-codes.h */ gpios = <&r_pio 0 3 1>; /* GPIO_ACTIVE_LOW */ wakeup-source; }; wl_host_wake { linux,code = <143>; /* KEY_WAKEUP, see include/uapi/linux/input-event-codes.h */ label = "wifi-host-wakeup"; gpios = <&pio 6 10 1>; /* PG10 GPIO_ACTIVE_LOW */ wakeup-source; }; }; wifi_pwrseq: wifi_pwrseq { compatible = "mmc-pwrseq-simple"; pinctrl-names = "default"; pinctrl-0 = <&wifi_rst>; reset-gpios = <&r_pio 0 7 1>; /* GPIO_ACTIVE_LOW PL7 WIFI_EN */ post-power-on-delay-ms = <50>; clocks = <&rtc 1>; /* CLK_OSC32K_FANOUT */ clock-names = "ext_clock"; }; }; }; fragment@1 { target = <&mmc1>; __overlay__ { vqmmc-supply = <®_vcc3v3>; mmc-pwrseq = <&wifi_pwrseq>; non-removable; keep-power-in-suspend; }; }; fragment@2 { target = <&pio>; __overlay__ { wifi_wake: wifi_wake { pins = "PG10"; function = "gpio_in"; }; }; }; fragment@3 { target = <&r_pio>; __overlay__ { wifi_rst: wifi_rst { pins = "PL7"; function = "gpio_out"; }; }; }; };