kernel: refresh patches
[openwrt.git] / target / linux / sunxi / patches-3.14 / 302-2-dt-sun7i-add-bananapi-dts.patch
1 --- /dev/null
2 +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
3 @@ -0,0 +1,160 @@
4 +/*
5 + * Copyright 2014 Zoltan HERPAI
6 + * Zoltan HERPAI <wigyori@uid0.hu>
7 + *
8 + * The code contained herein is licensed under the GNU General Public
9 + * License. You may obtain a copy of the GNU General Public License
10 + * Version 2 or later at the following locations:
11 + *
12 + * http://www.opensource.org/licenses/gpl-license.html
13 + * http://www.gnu.org/copyleft/gpl.html
14 + */
15 +
16 +/dts-v1/;
17 +/include/ "sun7i-a20.dtsi"
18 +/include/ "sunxi-ahci-reg.dtsi"
19 +/include/ "sun4i-a10-usb-vbus-reg.dtsi"
20 +#include <dt-bindings/input/input.h>
21 +
22 +/ {
23 +       model = "Lemaker bananaPi";
24 +       compatible = "lemaker,bananapi", "allwinner,sun7i-a20";
25 +
26 +       aliases {
27 +               spi0 = &spi1;
28 +               spi1 = &spi2;
29 +       };
30 +
31 +       soc@01c00000 {
32 +               spi1: spi@01c06000 {
33 +                       pinctrl-names = "default";
34 +                       pinctrl-0 = <&spi1_pins_a>;
35 +                       status = "okay";
36 +               };
37 +
38 +               spi2: spi@01c17000 {
39 +                       pinctrl-names = "default";
40 +                       pinctrl-0 = <&spi2_pins_a>;
41 +                       status = "okay";
42 +               };
43 +
44 +               mmc0: mmc@01c0f000 {
45 +                       pinctrl-names = "default", "default";
46 +                       pinctrl-0 = <&mmc0_pins_a>;
47 +                       pinctrl-1 = <&mmc0_cd_pin_bananapi>;
48 +                       cd-gpios = <&pio 7 10 0>; /* PH10 */
49 +                       status = "okay";
50 +               };
51 +
52 +               usbphy: phy@01c13400 {
53 +                       usb1_vbus-supply = <&reg_usb1_vbus>;
54 +                       usb2_vbus-supply = <&reg_usb2_vbus>;
55 +                       status = "okay";
56 +               };
57 +
58 +               ehci0: usb@01c14000 {
59 +                       status = "okay";
60 +               };
61 +
62 +               ohci0: usb@01c14400 {
63 +                       status = "okay";
64 +               };
65 +
66 +               ahci: sata@01c18000 {
67 +                       target-supply = <&reg_ahci_5v>;
68 +                       status = "okay";
69 +               };
70 +
71 +               ehci1: usb@01c1c000 {
72 +                       status = "okay";
73 +               };
74 +
75 +               ohci1: usb@01c1c400 {
76 +                       status = "okay";
77 +               };
78 +
79 +               pinctrl@01c20800 {
80 +                       led_pins_bananapi: led_pins@0 {
81 +                               allwinner,pins = "PH2";
82 +                               allwinner,function = "gpio_out";
83 +                               allwinner,drive = <1>;
84 +                               allwinner,pull = <0>;
85 +                       };
86 +
87 +                       mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
88 +                               allwinner,pins = "PH10";
89 +                               allwinner,function = "gpio_in";
90 +                               allwinner,drive = <0>;
91 +                               allwinner,pull = <1>;
92 +                       };
93 +               };
94 +
95 +               lradc: lradc@01c22800 {
96 +                       allwinner,chan0-step = <200>;
97 +                       linux,chan0-keycodes = <KEY_VOLUMEUP KEY_VOLUMEDOWN
98 +                                               KEY_MENU KEY_SEARCH KEY_HOME
99 +                                               KEY_ESC KEY_ENTER>;
100 +                       status = "okay";
101 +               };
102 +
103 +               uart0: serial@01c28000 {
104 +                       pinctrl-names = "default";
105 +                       pinctrl-0 = <&uart0_pins_a>;
106 +                       status = "okay";
107 +               };
108 +
109 +               uart6: serial@01c29800 {
110 +                       pinctrl-names = "default";
111 +                       pinctrl-0 = <&uart6_pins_a>;
112 +                       status = "okay";
113 +               };
114 +
115 +               uart7: serial@01c29c00 {
116 +                       pinctrl-names = "default";
117 +                       pinctrl-0 = <&uart7_pins_a>;
118 +                       status = "okay";
119 +               };
120 +
121 +               i2c0: i2c@01c2ac00 {
122 +                       pinctrl-names = "default";
123 +                       pinctrl-0 = <&i2c0_pins_a>;
124 +                       status = "okay";
125 +               };
126 +
127 +               i2c1: i2c@01c2b000 {
128 +                       pinctrl-names = "default";
129 +                       pinctrl-0 = <&i2c1_pins_a>;
130 +                       status = "okay";
131 +               };
132 +
133 +               i2c2: i2c@01c2b400 {
134 +                       pinctrl-names = "default";
135 +                       pinctrl-0 = <&i2c2_pins_a>;
136 +                       status = "okay";
137 +               };
138 +
139 +               gmac: ethernet@01c50000 {
140 +                       pinctrl-names = "default";
141 +                       pinctrl-0 = <&gmac_pins_mii_a>;
142 +                       phy = <&phy1>;
143 +                       phy-mode = "mii";
144 +                       status = "okay";
145 +
146 +                       phy1: ethernet-phy@1 {
147 +                               reg = <1>;
148 +                       };
149 +               };
150 +       };
151 +
152 +       leds {
153 +               compatible = "gpio-leds";
154 +               pinctrl-names = "default";
155 +               pinctrl-0 = <&led_pins_bananapi>;
156 +
157 +               green {
158 +                       label = "bananapi:green:usr";
159 +                       gpios = <&pio 7 2 0>;
160 +                       default-state = "on";
161 +               };
162 +       };
163 +};