Merge tag 'at91-dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux...
[cascardo/linux.git] / arch / arm / boot / dts / at91-sama5d2_xplained.dts
index 5b65ffe..21c780f 100644 (file)
@@ -46,6 +46,7 @@
 #include "sama5d2.dtsi"
 #include "sama5d2-pinfunc.h"
 #include <dt-bindings/mfd/atmel-flexcom.h>
+#include <dt-bindings/gpio/gpio.h>
 
 / {
        model = "Atmel SAMA5D2 Xplained";
 
        ahb {
                usb0: gadget@00300000 {
+                       atmel,vbus-gpio = <&pioA 31 GPIO_ACTIVE_HIGH>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usba_vbus>;
                        status = "okay";
                };
 
                usb1: ohci@00400000 {
                        num-ports = <3>;
+                       atmel,vbus-gpio = <0 /* &pioA 41 GPIO_ACTIVE_HIGH */
+                                          &pioA 42 GPIO_ACTIVE_HIGH
+                                          0
+                                         >;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&pinctrl_usb_default>;
                        status = "okay";
                };
 
                                        bias-disable;
                                };
 
+                               pinctrl_key_gpio_default: key_gpio_default {
+                                       pinmux = <PIN_PB9__GPIO>;
+                                       bias-pull-up;
+                               };
+
+                               pinctrl_led_gpio_default: led_gpio_default {
+                                       pinmux = <PIN_PB0__GPIO>,
+                                                <PIN_PB5__GPIO>,
+                                                <PIN_PB6__GPIO>;
+                                       bias-pull-up;
+                               };
+
                                pinctrl_macb0_default: macb0_default {
                                        pinmux = <PIN_PB14__GTXCK>,
                                                 <PIN_PB15__GTXEN>,
 
                                pinctrl_macb0_phy_irq: macb0_phy_irq {
                                        pinmux = <PIN_PC9__GPIO>;
+                                       bias-disable;
                                };
 
                                pinctrl_pdmic_default: pdmic_default {
                                                 <PIN_PB12__UTXD3>;
                                        bias-disable;
                                };
+
+                               pinctrl_usb_default: usb_default {
+                                       pinmux = <PIN_PB10__GPIO>;
+                                       bias-disable;
+                               };
+
+                               pinctrl_usba_vbus: usba_vbus {
+                                       pinmux = <PIN_PA31__GPIO>;
+                                       bias-disable;
+                               };
+
                        };
                };
        };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_key_gpio_default>;
+
+               bp1 {
+                       label = "PB_USER";
+                       gpios = <&pioA 41 GPIO_ACTIVE_LOW>;
+                       linux,code = <0x104>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_led_gpio_default>;
+               status = "okay";
+
+               red {
+                       label = "red";
+                       gpios = <&pioA 38 GPIO_ACTIVE_LOW>;
+               };
+
+               green {
+                       label = "green";
+                       gpios = <&pioA 37 GPIO_ACTIVE_LOW>;
+               };
+
+               blue {
+                       label = "blue";
+                       gpios = <&pioA 32 GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
 };