1 --- a/arch/arm/dts/Makefile
2 +++ b/arch/arm/dts/Makefile
3 @@ -475,6 +475,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
5 sun6i-a31-mele-a1000g-quad.dtb \
6 sun6i-a31-mixtile-loftq.dtb \
7 + sun6i-a31-pangolin.dtb \
8 sun6i-a31s-colorfly-e708-q1.dtb \
10 sun6i-a31s-inet-q972.dtb \
11 --- a/arch/arm/dts/sun6i-a31.dtsi
12 +++ b/arch/arm/dts/sun6i-a31.dtsi
17 + i2c3_pins_a: i2c3@0 {
18 + allwinner,pins = "PB5", "PB6";
19 + allwinner,function = "i2c3";
23 pins = "PF0", "PF1", "PF2",
26 +++ b/arch/arm/dts/sun6i-a31-pangolin.dts
29 + * Copyright 2015, Theobroma Systems Design und Consulting GmbH
31 + * This file is dual-licensed: you can use it either under the terms
32 + * of the GPL or the X11 license, at your option. Note that this dual
33 + * licensing only applies to this file, and not this project as a
36 + * a) This file is free software; you can redistribute it and/or
37 + * modify it under the terms of the GNU General Public License as
38 + * published by the Free Software Foundation; either version 2 of the
39 + * License, or (at your option) any later version.
41 + * This file is distributed in the hope that it will be useful,
42 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
43 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 + * GNU General Public License for more details.
46 + * Or, alternatively,
48 + * b) Permission is hereby granted, free of charge, to any person
49 + * obtaining a copy of this software and associated documentation
50 + * files (the "Software"), to deal in the Software without
51 + * restriction, including without limitation the rights to use,
52 + * copy, modify, merge, publish, distribute, sublicense, and/or
53 + * sell copies of the Software, and to permit persons to whom the
54 + * Software is furnished to do so, subject to the following
57 + * The above copyright notice and this permission notice shall be
58 + * included in all copies or substantial portions of the Software.
60 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
61 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
62 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
63 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
64 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
65 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
66 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
67 + * OTHER DEALINGS IN THE SOFTWARE.
71 +#include "sun6i-a31.dtsi"
72 +#include "sunxi-common-regulators.dtsi"
74 +#include <dt-bindings/gpio/gpio.h>
75 +#include <dt-bindings/pinctrl/sun4i-a10.h>
78 + model = "Theobroma Systems A31 Pangolin";
79 + compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31";
91 + stdout-path = "serial2:115200n8";
116 + pinctrl-names = "default";
117 + pinctrl-0 = <&gmac_pins_rgmii_a>;
119 + phy-mode = "rgmii";
120 + snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
121 + snps,reset-active-low;
122 + snps,reset-delays-us = <0 10000 30000>;
125 + phy1: ethernet-phy@4 {
131 + pinctrl-names = "default";
132 + pinctrl-0 = <&i2c0_pins_a>;
137 + pinctrl-names = "default";
138 + pinctrl-0 = <&i2c1_pins_a>;
143 + pinctrl-names = "default";
144 + pinctrl-0 = <&i2c2_pins_a>;
149 + pinctrl-names = "default";
150 + pinctrl-0 = <&i2c3_pins_a>;
154 + compatible = "isil,isl1208";
158 + compatible = "ti,amc6821";
160 + cooling-min-state = <0>;
161 + cooling-max-state = <9>;
162 + #cooling-cells = <2>;
170 + compatible = "spansion,m25p40";
171 + spi-max-frequency = <16000000>;
182 + pinctrl-names = "default";
183 + pinctrl-0 = <&ir_pins_a>;
188 + pinctrl-names = "default";
189 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>;
190 + vmmc-supply = <®_vcc3v0>;
192 + cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
197 + /* external pull-ups missing for some pins */
198 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
202 + pinctrl-names = "default";
203 + pinctrl-0 = <&mmc2_pins_a>;
204 + vmmc-supply = <®_vcc3v0>;
211 + mmc0_cd_pin_pangolin: mmc0_cd_pin@0 {
212 + allwinner,pins = "PC19";
213 + allwinner,function = "gpio_in";
214 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
215 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
218 + leds_pins_pangolin: led_pins@0 {
219 + allwinner,pins = "PH7", "PC16";
220 + allwinner,function = "gpio_out";
221 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
222 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
225 + mmc2_pins_a: mmc2@0 {
226 + allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11",
227 + "PC12","PC13","PC14","PC15";
228 + allwinner,function = "mmc2";
229 + allwinner,drive = <SUN4I_PINCTRL_30_MA>;
230 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
238 + compatible = "x-powers,axp221";
240 + interrupt-parent = <&nmi_intc>;
241 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
242 + interrupt-controller;
243 + #interrupt-cells = <1>;
244 + dcdc1-supply = <&vcc_3v0>;
245 + dcdc5-supply = <&vcc_dram>;
248 + x-powers,dcdc-freq = <3000>;
251 + regulator-always-on;
252 + regulator-min-microvolt = <3000000>;
253 + regulator-max-microvolt = <3000000>;
254 + regulator-name = "vcc-3v0";
258 + regulator-always-on;
259 + regulator-min-microvolt = <700000>;
260 + regulator-max-microvolt = <1320000>;
261 + regulator-name = "vdd-cpu";
265 + regulator-always-on;
266 + regulator-min-microvolt = <700000>;
267 + regulator-max-microvolt = <1320000>;
268 + regulator-name = "vdd-gpu";
271 + vdd_sys_dll: dcdc4 {
272 + regulator-always-on;
273 + regulator-min-microvolt = <1100000>;
274 + regulator-max-microvolt = <1100000>;
275 + regulator-name = "vdd-sys-dll";
279 + regulator-always-on;
280 + regulator-min-microvolt = <1500000>;
281 + regulator-max-microvolt = <1500000>;
282 + regulator-name = "vcc-dram";
286 + regulator-min-microvolt = <3300000>;
287 + regulator-max-microvolt = <3300000>;
288 + regulator-name = "vcc_wifi";
292 + regulator-always-on;
293 + regulator-min-microvolt = <3000000>;
294 + regulator-max-microvolt = <3000000>;
295 + regulator-name = "avcc";
302 + pinctrl-names = "default";
303 + pinctrl-0 = <&uart0_pins_a>;
308 + allwinner,pins = "PD23";
312 + gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD 23 */
318 + usb1_vbus-supply = <®_usb1_vbus>;
321 +++ b/configs/pangolin_defconfig
323 +CONFIG_SUNXI_PANGOLIN=y
325 +CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC,RGMII"
326 +CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-pangolin"
327 +CONFIG_VIDEO_VGA_VIA_LCD=y
328 +CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
332 +CONFIG_DRAM_CHANNELS=1
335 +CONFIG_AXP_DCDC1_VOLT=3300
336 +CONFIG_AXP_ALDO1_VOLT=0
337 +CONFIG_AXP_ALDO2_VOLT=1800
338 +CONFIG_AXP_ALDO3_VOLT=3000
339 +CONFIG_AXP_DLDO4_VOLT=3300
340 +CONFIG_AXP_ELDO1_VOLT=1200
341 +CONFIG_AXP_ELDO2_VOLT=2500
342 +CONFIG_AXP_ELDO3_VOLT=3300
343 +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
345 +# Vbus gpio for usb1
346 +CONFIG_USB1_VBUS_PIN=""
347 +# No Vbus gpio for usb2
348 +CONFIG_USB2_VBUS_PIN=""
352 +CONFIG_USB_KEYBOARD=y
355 +CONFIG_ETH_DESIGNWARE=y
357 +CONFIG_DM_SPI_FLASH=y
359 --- a/arch/arm/mach-sunxi/Kconfig
360 +++ b/arch/arm/mach-sunxi/Kconfig
361 @@ -896,6 +896,14 @@ config VIDEO_LCD_PANEL_I2C_SCL
362 Set the SCL pin for the LCD i2c interface. This takes a string in the
363 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
366 + prompt "Sunxi Board Variant"
369 +config SUNXI_PANGOLIN
370 + bool "Theobroma A31 uQ7 Board"
374 # Note only one of these may be selected at a time! But hidden choices are
375 # not supported by Kconfig