1 diff -ruN a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
2 --- a/arch/arm/dts/Makefile 2016-01-12 15:06:54.000000000 +0100
3 +++ b/arch/arm/dts/Makefile 2016-01-30 15:31:50.000000000 +0100
6 sun6i-a31-mele-a1000g-quad.dtb \
7 sun6i-a31-mixtile-loftq.dtb \
8 + sun6i-a31-pangolin.dtb \
10 sun6i-a31s-primo81.dtb \
11 sun6i-a31s-sinovoip-bpi-m2.dtb
12 diff -ruN a/arch/arm/dts/sun6i-a31.dtsi b/arch/arm/dts/sun6i-a31.dtsi
13 --- a/arch/arm/dts/sun6i-a31.dtsi 2016-01-12 15:06:54.000000000 +0100
14 +++ b/arch/arm/dts/sun6i-a31.dtsi 2016-01-31 15:06:47.000000000 +0100
16 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
19 + i2c3_pins_a: i2c3@0 {
20 + allwinner,pins = "PB5", "PB6";
21 + allwinner,function = "i2c3";
22 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
23 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
27 allwinner,pins = "PF0", "PF1", "PF2",
29 diff -ruN a/arch/arm/dts/sun6i-a31-pangolin.dts b/arch/arm/dts/sun6i-a31-pangolin.dts
30 --- a/arch/arm/dts/sun6i-a31-pangolin.dts 1970-01-01 01:00:00.000000000 +0100
31 +++ b/arch/arm/dts/sun6i-a31-pangolin.dts 2016-02-09 01:21:44.965168099 +0100
34 + * Copyright 2015, Theobroma Systems Design und Consulting GmbH
36 + * This file is dual-licensed: you can use it either under the terms
37 + * of the GPL or the X11 license, at your option. Note that this dual
38 + * licensing only applies to this file, and not this project as a
41 + * a) This file is free software; you can redistribute it and/or
42 + * modify it under the terms of the GNU General Public License as
43 + * published by the Free Software Foundation; either version 2 of the
44 + * License, or (at your option) any later version.
46 + * This file is distributed in the hope that it will be useful,
47 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
48 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49 + * GNU General Public License for more details.
51 + * Or, alternatively,
53 + * b) Permission is hereby granted, free of charge, to any person
54 + * obtaining a copy of this software and associated documentation
55 + * files (the "Software"), to deal in the Software without
56 + * restriction, including without limitation the rights to use,
57 + * copy, modify, merge, publish, distribute, sublicense, and/or
58 + * sell copies of the Software, and to permit persons to whom the
59 + * Software is furnished to do so, subject to the following
62 + * The above copyright notice and this permission notice shall be
63 + * included in all copies or substantial portions of the Software.
65 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
66 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
67 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
68 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
69 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
70 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
71 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
72 + * OTHER DEALINGS IN THE SOFTWARE.
76 +#include "sun6i-a31.dtsi"
77 +#include "sunxi-common-regulators.dtsi"
79 +#include <dt-bindings/gpio/gpio.h>
80 +#include <dt-bindings/pinctrl/sun4i-a10.h>
83 + model = "Theobroma Systems A31 Pangolin";
84 + compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31";
96 + stdout-path = "serial2:115200n8";
121 + pinctrl-names = "default";
122 + pinctrl-0 = <&gmac_pins_rgmii_a>;
124 + phy-mode = "rgmii";
125 + snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
126 + snps,reset-active-low;
127 + snps,reset-delays-us = <0 10000 30000>;
130 + phy1: ethernet-phy@4 {
136 + pinctrl-names = "default";
137 + pinctrl-0 = <&i2c0_pins_a>;
142 + pinctrl-names = "default";
143 + pinctrl-0 = <&i2c1_pins_a>;
148 + pinctrl-names = "default";
149 + pinctrl-0 = <&i2c2_pins_a>;
154 + pinctrl-names = "default";
155 + pinctrl-0 = <&i2c3_pins_a>;
159 + compatible = "isil,isl1208";
163 + compatible = "ti,amc6821";
165 + cooling-min-state = <0>;
166 + cooling-max-state = <9>;
167 + #cooling-cells = <2>;
175 + compatible = "spansion,m25p40";
176 + spi-max-frequency = <16000000>;
187 + pinctrl-names = "default";
188 + pinctrl-0 = <&ir_pins_a>;
193 + pinctrl-names = "default";
194 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>;
195 + vmmc-supply = <®_vcc3v0>;
197 + cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
202 + /* external pull-ups missing for some pins */
203 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
207 + pinctrl-names = "default";
208 + pinctrl-0 = <&mmc2_pins_a>;
209 + vmmc-supply = <®_vcc3v0>;
216 + mmc0_cd_pin_pangolin: mmc0_cd_pin@0 {
217 + allwinner,pins = "PC19";
218 + allwinner,function = "gpio_in";
219 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
220 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
223 + leds_pins_pangolin: led_pins@0 {
224 + allwinner,pins = "PH7", "PC16";
225 + allwinner,function = "gpio_out";
226 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
227 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
230 + mmc2_pins_a: mmc2@0 {
231 + allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11",
232 + "PC12","PC13","PC14","PC15";
233 + allwinner,function = "mmc2";
234 + allwinner,drive = <SUN4I_PINCTRL_30_MA>;
235 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
243 + compatible = "x-powers,axp221";
245 + interrupt-parent = <&nmi_intc>;
246 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
247 + interrupt-controller;
248 + #interrupt-cells = <1>;
249 + dcdc1-supply = <&vcc_3v0>;
250 + dcdc5-supply = <&vcc_dram>;
253 + x-powers,dcdc-freq = <3000>;
256 + regulator-always-on;
257 + regulator-min-microvolt = <3000000>;
258 + regulator-max-microvolt = <3000000>;
259 + regulator-name = "vcc-3v0";
263 + regulator-always-on;
264 + regulator-min-microvolt = <700000>;
265 + regulator-max-microvolt = <1320000>;
266 + regulator-name = "vdd-cpu";
270 + regulator-always-on;
271 + regulator-min-microvolt = <700000>;
272 + regulator-max-microvolt = <1320000>;
273 + regulator-name = "vdd-gpu";
276 + vdd_sys_dll: dcdc4 {
277 + regulator-always-on;
278 + regulator-min-microvolt = <1100000>;
279 + regulator-max-microvolt = <1100000>;
280 + regulator-name = "vdd-sys-dll";
284 + regulator-always-on;
285 + regulator-min-microvolt = <1500000>;
286 + regulator-max-microvolt = <1500000>;
287 + regulator-name = "vcc-dram";
291 + regulator-min-microvolt = <3300000>;
292 + regulator-max-microvolt = <3300000>;
293 + regulator-name = "vcc_wifi";
297 + regulator-always-on;
298 + regulator-min-microvolt = <3000000>;
299 + regulator-max-microvolt = <3000000>;
300 + regulator-name = "avcc";
307 + pinctrl-names = "default";
308 + pinctrl-0 = <&uart0_pins_a>;
313 + allwinner,pins = "PD23";
317 + gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD 23 */
323 + usb1_vbus-supply = <®_usb1_vbus>;
325 diff -ruN a/configs/pangolin_defconfig b/configs/pangolin_defconfig
326 --- a/configs/pangolin_defconfig 1970-01-01 01:00:00.000000000 +0100
327 +++ b/configs/pangolin_defconfig 2016-01-30 14:43:59.000000000 +0100
329 +CONFIG_SUNXI_PANGOLIN=y
331 +CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC,RGMII"
332 +CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-pangolin"
333 +CONFIG_VIDEO_VGA_VIA_LCD=y
334 +CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
338 +CONFIG_DRAM_CHANNELS=1
341 +CONFIG_AXP_DCDC1_VOLT=3300
342 +CONFIG_AXP_ALDO1_VOLT=0
343 +CONFIG_AXP_ALDO2_VOLT=1800
344 +CONFIG_AXP_ALDO3_VOLT=3000
345 +CONFIG_AXP_DLDO4_VOLT=3300
346 +CONFIG_AXP_ELDO1_VOLT=1200
347 +CONFIG_AXP_ELDO2_VOLT=2500
348 +CONFIG_AXP_ELDO3_VOLT=3300
349 +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
351 +# Vbus gpio for usb1
352 +CONFIG_USB1_VBUS_PIN=""
353 +# No Vbus gpio for usb2
354 +CONFIG_USB2_VBUS_PIN=""
358 +CONFIG_USB_KEYBOARD=y
361 +CONFIG_ETH_DESIGNWARE=y
363 +CONFIG_DM_SPI_FLASH=y
365 diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
366 index e155c4c..1b147b2 100644
367 --- a/board/sunxi/Kconfig
368 +++ b/board/sunxi/Kconfig
369 @@ -15,7 +15,6 @@ config SUNXI_GEN_SUN6I
370 separate ahb reset control registers, custom pmic bus, new style
375 prompt "Sunxi SoC Variant"
377 @@ -80,6 +79,14 @@ config MACH_SUN8I
379 default y if MACH_SUN8I_A23 || MACH_SUN8I_A33
382 + prompt "Sunxi Board Variant"
385 +config SUNXI_PANGOLIN
386 + bool "Theobroma A31 uQ7 Board"
391 int "sunxi dram clock speed"