diff options
author | Icenowy Zheng <icenowy@aosc.io> | 2018-02-08 05:06:13 -0500 |
---|---|---|
committer | Maxime Ripard <maxime.ripard@bootlin.com> | 2018-02-14 07:17:56 -0500 |
commit | 8b8061fcbfaecd4b15deb01819ddd2cb3c4d40c6 (patch) | |
tree | 62f00cec83eb7e9bd0ea63768122d50e5e2941bd | |
parent | 45e01f401a2a16a8d7ca910fe01c124451980bd8 (diff) |
ARM: dts: sun8i: h2+: add support for Banana Pi M2 Zero board
Banana Pi M2 Zero board is a H2+-based board by Sinovoip, with a form
factor and GPIO holes similar to Raspberry Pi Zero.
It features:
- Allwinner H2+ SoC
- Single-chip (16-bit) 512MiB DDR3 DRAM
- Ampak AP6212 Wi-Fi/Bluetooth module
- MicroSD slot
- Two MicroUSB Type-B ports (one can only be used to power the board and
the other features OTG functionality)
- Two keys, a reset and a GPIO-connected key.
- HDMI Type-C (miniHDMI) connector connected to the HDMI part of H2+.
- CSI connector to connect the camera sensor provided by Sinovoip.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
-rw-r--r-- | arch/arm/boot/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 125 |
2 files changed, 126 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index ade7a38543dc..d5a17e6e8b0f 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -974,6 +974,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \ | |||
974 | sun8i-a83t-cubietruck-plus.dtb \ | 974 | sun8i-a83t-cubietruck-plus.dtb \ |
975 | sun8i-a83t-tbs-a711.dtb \ | 975 | sun8i-a83t-tbs-a711.dtb \ |
976 | sun8i-h2-plus-orangepi-r1.dtb \ | 976 | sun8i-h2-plus-orangepi-r1.dtb \ |
977 | sun8i-h2-plus-bananapi-m2-zero.dtb \ | ||
977 | sun8i-h2-plus-orangepi-zero.dtb \ | 978 | sun8i-h2-plus-orangepi-zero.dtb \ |
978 | sun8i-h3-bananapi-m2-plus.dtb \ | 979 | sun8i-h3-bananapi-m2-plus.dtb \ |
979 | sun8i-h3-beelink-x2.dtb \ | 980 | sun8i-h3-beelink-x2.dtb \ |
diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts new file mode 100644 index 000000000000..1cdbd9a3ef57 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | |||
@@ -0,0 +1,125 @@ | |||
1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) | ||
2 | /* | ||
3 | * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io> | ||
4 | * | ||
5 | * Based on sun8i-h3-bananapi-m2-plus.dts, which is: | ||
6 | * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org> | ||
7 | */ | ||
8 | |||
9 | /dts-v1/; | ||
10 | #include "sun8i-h3.dtsi" | ||
11 | #include "sunxi-common-regulators.dtsi" | ||
12 | |||
13 | #include <dt-bindings/gpio/gpio.h> | ||
14 | #include <dt-bindings/input/input.h> | ||
15 | |||
16 | / { | ||
17 | model = "Banana Pi BPI-M2-Zero"; | ||
18 | compatible = "sinovoip,bpi-m2-zero", "allwinner,sun8i-h2-plus"; | ||
19 | |||
20 | aliases { | ||
21 | serial0 = &uart0; | ||
22 | serial1 = &uart1; | ||
23 | }; | ||
24 | |||
25 | chosen { | ||
26 | stdout-path = "serial0:115200n8"; | ||
27 | }; | ||
28 | |||
29 | leds { | ||
30 | compatible = "gpio-leds"; | ||
31 | pinctrl-names = "default"; | ||
32 | |||
33 | pwr_led { | ||
34 | label = "bananapi-m2-zero:red:pwr"; | ||
35 | gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */ | ||
36 | default-state = "on"; | ||
37 | }; | ||
38 | }; | ||
39 | |||
40 | gpio_keys { | ||
41 | compatible = "gpio-keys"; | ||
42 | pinctrl-names = "default"; | ||
43 | |||
44 | sw4 { | ||
45 | label = "power"; | ||
46 | linux,code = <BTN_0>; | ||
47 | gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; | ||
48 | }; | ||
49 | }; | ||
50 | |||
51 | wifi_pwrseq: wifi_pwrseq { | ||
52 | compatible = "mmc-pwrseq-simple"; | ||
53 | pinctrl-names = "default"; | ||
54 | reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */ | ||
55 | }; | ||
56 | }; | ||
57 | |||
58 | &ehci0 { | ||
59 | status = "okay"; | ||
60 | }; | ||
61 | |||
62 | &mmc0 { | ||
63 | pinctrl-names = "default"; | ||
64 | pinctrl-0 = <&mmc0_pins_a>; | ||
65 | vmmc-supply = <®_vcc3v3>; | ||
66 | bus-width = <4>; | ||
67 | /* | ||
68 | * On the production batch of this board the card detect GPIO is | ||
69 | * high active (card inserted), although on the early samples it's | ||
70 | * low active. | ||
71 | */ | ||
72 | cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ | ||
73 | status = "okay"; | ||
74 | }; | ||
75 | |||
76 | &mmc1 { | ||
77 | pinctrl-names = "default"; | ||
78 | pinctrl-0 = <&mmc1_pins_a>; | ||
79 | vmmc-supply = <®_vcc3v3>; | ||
80 | vqmmc-supply = <®_vcc3v3>; | ||
81 | mmc-pwrseq = <&wifi_pwrseq>; | ||
82 | bus-width = <4>; | ||
83 | non-removable; | ||
84 | status = "okay"; | ||
85 | |||
86 | brcmf: wifi@1 { | ||
87 | reg = <1>; | ||
88 | compatible = "brcm,bcm4329-fmac"; | ||
89 | interrupt-parent = <&pio>; | ||
90 | interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */ | ||
91 | interrupt-names = "host-wake"; | ||
92 | }; | ||
93 | }; | ||
94 | |||
95 | &ohci0 { | ||
96 | status = "okay"; | ||
97 | }; | ||
98 | |||
99 | &uart0 { | ||
100 | pinctrl-names = "default"; | ||
101 | pinctrl-0 = <&uart0_pins_a>; | ||
102 | status = "okay"; | ||
103 | }; | ||
104 | |||
105 | &uart1 { | ||
106 | pinctrl-names = "default"; | ||
107 | pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; | ||
108 | status = "okay"; | ||
109 | }; | ||
110 | |||
111 | &usb_otg { | ||
112 | dr_mode = "otg"; | ||
113 | status = "okay"; | ||
114 | }; | ||
115 | |||
116 | &usbphy { | ||
117 | usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ | ||
118 | /* | ||
119 | * There're two micro-USB connectors, one is power-only and another is | ||
120 | * OTG. The Vbus of these two connectors are connected together, so | ||
121 | * the external USB device will be powered just by the power input | ||
122 | * from the power-only USB port. | ||
123 | */ | ||
124 | status = "okay"; | ||
125 | }; | ||