ARM: sunxi: DT: convert DTs to use common GPIOs includes
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / sun5i-a10s-olinuxino-micro.dts
index fe3c559ca6a8e6d24412abe6d2a81c2a6b97bdda..f80d2facc15814a1dfd5a3196b2ce73d5effd695 100644 (file)
  */
 
 /dts-v1/;
-/include/ "sun5i-a10s.dtsi"
-/include/ "sunxi-common-regulators.dtsi"
+#include "sun5i-a10s.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        model = "Olimex A10s-Olinuxino Micro";
@@ -76,7 +79,7 @@
                        pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino_micro>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 6 1 0>; /* PG1 */
+                       cd-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
                        cd-inverted;
                        status = "okay";
                };
@@ -86,7 +89,7 @@
                        pinctrl-0 = <&mmc1_pins_a>, <&mmc1_cd_pin_olinuxino_micro>;
                        vmmc-supply = <&reg_vcc3v3>;
                        bus-width = <4>;
-                       cd-gpios = <&pio 6 13 0>; /* PG13 */
+                       cd-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
                        cd-inverted;
                        status = "okay";
                };
                        };
                };
 
+               lradc: lradc@01c22800 {
+                       vref-supply = <&reg_vcc3v0>;
+                       status = "okay";
+
+                       button@191 {
+                               label = "Volume Up";
+                               linux,code = <KEY_VOLUMEUP>;
+                               channel = <0>;
+                               voltage = <191274>;
+                       };
+
+                       button@392 {
+                               label = "Volume Down";
+                               linux,code = <KEY_VOLUMEDOWN>;
+                               channel = <0>;
+                               voltage = <392644>;
+                       };
+
+                       button@601 {
+                               label = "Menu";
+                               linux,code = <KEY_MENU>;
+                               channel = <0>;
+                               voltage = <601151>;
+                       };
+
+                       button@795 {
+                               label = "Enter";
+                               linux,code = <KEY_ENTER>;
+                               channel = <0>;
+                               voltage = <795090>;
+                       };
+
+                       button@987 {
+                               label = "Home";
+                               linux,code = <KEY_HOMEPAGE>;
+                               channel = <0>;
+                               voltage = <987387>;
+                       };
+               };
+
                uart0: serial@01c28000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&uart0_pins_a>;
 
                green {
                        label = "a10s-olinuxino-micro:green:usr";
-                       gpios = <&pio 4 3 0>;
+                       gpios = <&pio 4 3 GPIO_ACTIVE_HIGH>;
                        default-state = "on";
                };
        };
 
        reg_usb1_vbus: usb1-vbus {
                pinctrl-0 = <&usb1_vbus_pin_olinuxino_m>;
-               gpio = <&pio 1 10 0>;
+               gpio = <&pio 1 10 GPIO_ACTIVE_HIGH>;
                status = "okay";
        };
 };