Commit ea5b1e1efb5ebe5398f6c290babf7ab6fbf426b9

Authored by Jagan Teki
Committed by Maxime Ripard
1 parent d4aac530c6

sun7i: a20: Add Bananapi M1 Plus support

Banana Pi M1 Plus is an open-source single-board computer
that adds more connectivity to the classic board using
Allwinner A20 SOC.

Bananapi M1-Plus features:
- A20 Dual-core 1.0GHz
- 1 GB DDR3 SDRAM
- MicroSD
- 10/100/1000 Ethernet RJ45
- WiFi b/g/n
- 5V DC Micro USB power-supply

For dts file,
Sync with Linux commit f92ca09("Merge branch 'akpm/master'").

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>

Showing 3 changed files with 97 additions and 23 deletions Side-by-side Diff

arch/arm/dts/sun7i-a20-bananapi-m1-plus.dts
... ... @@ -105,6 +105,10 @@
105 105 status = "okay";
106 106 };
107 107  
  108 +&cpu0 {
  109 + cpu-supply = <&reg_dcdc2>;
  110 +};
  111 +
108 112 &ehci0 {
109 113 status = "okay";
110 114 };
111 115  
112 116  
... ... @@ -132,16 +136,14 @@
132 136 status = "okay";
133 137  
134 138 axp209: pmic@34 {
135   - compatible = "x-powers,axp209";
136 139 reg = <0x34>;
137 140 interrupt-parent = <&nmi_intc>;
138 141 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
139   -
140   - interrupt-controller;
141   - #interrupt-cells = <1>;
142 142 };
143 143 };
144 144  
  145 +#include "axp209.dtsi"
  146 +
145 147 &ir0 {
146 148 pinctrl-names = "default";
147 149 pinctrl-0 = <&ir0_rx_pins_a>;
148 150  
... ... @@ -167,10 +169,10 @@
167 169 mmc-pwrseq = <&mmc3_pwrseq>;
168 170 bus-width = <4>;
169 171 non-removable;
170   - enable-sdio-wakeup;
  172 + wakeup-source;
171 173 status = "okay";
172 174  
173   - brcmf: bcrmf@1 {
  175 + brcmf: wifi@1 {
174 176 reg = <1>;
175 177 compatible = "brcm,bcm4329-fmac";
176 178 interrupt-parent = <&pio>;
... ... @@ -181,7 +183,7 @@
181 183  
182 184 &mmc3_pins_a {
183 185 /* AP6210 requires pull-up */
184   - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  186 + bias-pull-up;
185 187 };
186 188  
187 189 &ohci0 {
188 190  
189 191  
190 192  
191 193  
192 194  
193 195  
... ... @@ -192,39 +194,82 @@
192 194 status = "okay";
193 195 };
194 196  
  197 +&otg_sram {
  198 + status = "okay";
  199 +};
  200 +
195 201 &pio {
196 202 gmac_power_pin_bpi_m1p: gmac_power_pin@0 {
197   - allwinner,pins = "PH23";
198   - allwinner,function = "gpio_out";
199   - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
200   - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  203 + pins = "PH23";
  204 + function = "gpio_out";
201 205 };
202 206  
203 207 led_pins_bpi_m1p: led_pins@0 {
204   - allwinner,pins = "PH24", "PH25";
205   - allwinner,function = "gpio_out";
206   - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
207   - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  208 + pins = "PH24", "PH25";
  209 + function = "gpio_out";
208 210 };
209 211  
210 212 mmc0_cd_pin_bpi_m1p: mmc0_cd_pin@0 {
211   - allwinner,pins = "PH10";
212   - allwinner,function = "gpio_in";
213   - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
214   - allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  213 + pins = "PH10";
  214 + function = "gpio_in";
  215 + bias-pull-up;
215 216 };
216 217  
217 218 mmc3_pwrseq_pin_bpi_m1p: mmc3_pwrseq_pin@0 {
218   - allwinner,pins = "PH22";
219   - allwinner,function = "gpio_out";
220   - allwinner,drive = <SUN4I_PINCTRL_10_MA>;
221   - allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  219 + pins = "PH22";
  220 + function = "gpio_out";
222 221 };
223 222 };
224 223  
  224 +&reg_dcdc2 {
  225 + regulator-always-on;
  226 + regulator-min-microvolt = <1000000>;
  227 + regulator-max-microvolt = <1400000>;
  228 + regulator-name = "vdd-cpu";
  229 +};
  230 +
  231 +&reg_dcdc3 {
  232 + regulator-always-on;
  233 + regulator-min-microvolt = <1000000>;
  234 + regulator-max-microvolt = <1400000>;
  235 + regulator-name = "vdd-int-dll";
  236 +};
  237 +
  238 +&reg_ldo1 {
  239 + regulator-name = "vdd-rtc";
  240 +};
  241 +
  242 +&reg_ldo2 {
  243 + regulator-always-on;
  244 + regulator-min-microvolt = <3000000>;
  245 + regulator-max-microvolt = <3000000>;
  246 + regulator-name = "avcc";
  247 +};
  248 +
  249 +&reg_usb0_vbus {
  250 + status = "okay";
  251 +};
  252 +
225 253 &uart0 {
226 254 pinctrl-names = "default";
227 255 pinctrl-0 = <&uart0_pins_a>;
  256 + status = "okay";
  257 +};
  258 +
  259 +&usb_otg {
  260 + dr_mode = "otg";
  261 + status = "okay";
  262 +};
  263 +
  264 +&usb_power_supply {
  265 + status = "okay";
  266 +};
  267 +
  268 +&usbphy {
  269 + usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  270 + usb0_vbus_power-supply = <&usb_power_supply>;
  271 + usb0_vbus-supply = <&reg_usb0_vbus>;
  272 + /* VBUS on usb host ports are tied to DC5V and therefore always on */
228 273 status = "okay";
229 274 };
board/sunxi/MAINTAINERS
... ... @@ -118,6 +118,11 @@
118 118 S: Maintained
119 119 F: configs/Ampe_A76_defconfig
120 120  
  121 +BANANAPI M1 PLUS
  122 +M: Jagan Teki <jagan@amarulasolutions.com>
  123 +S: Maintained
  124 +F: configs/bananapi_m1_plus_defconfig
  125 +
121 126 BANANAPI M2 ULTRA BOARD
122 127 M: Chen-Yu Tsai <wens@csie.org>
123 128 S: Maintained
configs/bananapi_m1_plus_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_ARCH_SUNXI=y
  3 +CONFIG_MACH_SUN7I=y
  4 +CONFIG_DRAM_CLK=432
  5 +CONFIG_MACPWR="PH23"
  6 +CONFIG_VIDEO_COMPOSITE=y
  7 +CONFIG_GMAC_TX_DELAY=3
  8 +CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-bananapi-m1-plus"
  9 +CONFIG_AHCI=y
  10 +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
  11 +CONFIG_SPL=y
  12 +CONFIG_SPL_I2C_SUPPORT=y
  13 +# CONFIG_CMD_IMLS is not set
  14 +# CONFIG_CMD_FLASH is not set
  15 +# CONFIG_CMD_FPGA is not set
  16 +# CONFIG_SPL_DOS_PARTITION is not set
  17 +# CONFIG_SPL_ISO_PARTITION is not set
  18 +# CONFIG_SPL_EFI_PARTITION is not set
  19 +CONFIG_NETCONSOLE=y
  20 +CONFIG_ETH_DESIGNWARE=y
  21 +CONFIG_RGMII=y
  22 +CONFIG_SUN7I_GMAC=y
  23 +CONFIG_SCSI=y
  24 +CONFIG_USB_EHCI_HCD=y