1 --- a/arch/arm/dts/Makefile
2 +++ b/arch/arm/dts/Makefile
3 @@ -290,6 +290,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
14 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
17 + i2c3_pins_a: i2c3@0 {
18 + allwinner,pins = "PB5", "PB6";
19 + allwinner,function = "i2c3";
20 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
21 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
25 allwinner,pins = "PF0", "PF1", "PF2",
28 +++ b/arch/arm/dts/sun6i-a31-pangolin.dts
31 + * Copyright 2015, Theobroma Systems Design und Consulting GmbH
33 + * This file is dual-licensed: you can use it either under the terms
34 + * of the GPL or the X11 license, at your option. Note that this dual
35 + * licensing only applies to this file, and not this project as a
38 + * a) This file is free software; you can redistribute it and/or
39 + * modify it under the terms of the GNU General Public License as
40 + * published by the Free Software Foundation; either version 2 of the
41 + * License, or (at your option) any later version.
43 + * This file is distributed in the hope that it will be useful,
44 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
45 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 + * GNU General Public License for more details.
48 + * Or, alternatively,
50 + * b) Permission is hereby granted, free of charge, to any person
51 + * obtaining a copy of this software and associated documentation
52 + * files (the "Software"), to deal in the Software without
53 + * restriction, including without limitation the rights to use,
54 + * copy, modify, merge, publish, distribute, sublicense, and/or
55 + * sell copies of the Software, and to permit persons to whom the
56 + * Software is furnished to do so, subject to the following
59 + * The above copyright notice and this permission notice shall be
60 + * included in all copies or substantial portions of the Software.
62 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
63 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
64 + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
65 + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
66 + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
67 + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
68 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
69 + * OTHER DEALINGS IN THE SOFTWARE.
73 +#include "sun6i-a31.dtsi"
74 +#include "sunxi-common-regulators.dtsi"
76 +#include <dt-bindings/gpio/gpio.h>
77 +#include <dt-bindings/pinctrl/sun4i-a10.h>
80 + model = "Theobroma Systems A31 Pangolin";
81 + compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31";
93 + stdout-path = "serial2:115200n8";
118 + pinctrl-names = "default";
119 + pinctrl-0 = <&gmac_pins_rgmii_a>;
121 + phy-mode = "rgmii";
122 + snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
123 + snps,reset-active-low;
124 + snps,reset-delays-us = <0 10000 30000>;
127 + phy1: ethernet-phy@4 {
133 + pinctrl-names = "default";
134 + pinctrl-0 = <&i2c0_pins_a>;
139 + pinctrl-names = "default";
140 + pinctrl-0 = <&i2c1_pins_a>;
145 + pinctrl-names = "default";
146 + pinctrl-0 = <&i2c2_pins_a>;
151 + pinctrl-names = "default";
152 + pinctrl-0 = <&i2c3_pins_a>;
156 + compatible = "isil,isl1208";
160 + compatible = "ti,amc6821";
162 + cooling-min-state = <0>;
163 + cooling-max-state = <9>;
164 + #cooling-cells = <2>;
172 + compatible = "spansion,m25p40";
173 + spi-max-frequency = <16000000>;
184 + pinctrl-names = "default";
185 + pinctrl-0 = <&ir_pins_a>;
190 + pinctrl-names = "default";
191 + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>;
192 + vmmc-supply = <®_vcc3v0>;
194 + cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
199 + /* external pull-ups missing for some pins */
200 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
204 + pinctrl-names = "default";
205 + pinctrl-0 = <&mmc2_pins_a>;
206 + vmmc-supply = <®_vcc3v0>;
213 + mmc0_cd_pin_pangolin: mmc0_cd_pin@0 {
214 + allwinner,pins = "PC19";
215 + allwinner,function = "gpio_in";
216 + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
217 + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
220 + leds_pins_pangolin: led_pins@0 {
221 + allwinner,pins = "PH7", "PC16";
222 + allwinner,function = "gpio_out";
223 + allwinner,drive = <SUN4I_PINCTRL_20_MA>;
224 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
227 + mmc2_pins_a: mmc2@0 {
228 + allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11",
229 + "PC12","PC13","PC14","PC15";
230 + allwinner,function = "mmc2";
231 + allwinner,drive = <SUN4I_PINCTRL_30_MA>;
232 + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
240 + compatible = "x-powers,axp221";
242 + interrupt-parent = <&nmi_intc>;
243 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
244 + interrupt-controller;
245 + #interrupt-cells = <1>;
246 + dcdc1-supply = <&vcc_3v0>;
247 + dcdc5-supply = <&vcc_dram>;
250 + x-powers,dcdc-freq = <3000>;
253 + regulator-always-on;
254 + regulator-min-microvolt = <3000000>;
255 + regulator-max-microvolt = <3000000>;
256 + regulator-name = "vcc-3v0";
260 + regulator-always-on;
261 + regulator-min-microvolt = <700000>;
262 + regulator-max-microvolt = <1320000>;
263 + regulator-name = "vdd-cpu";
267 + regulator-always-on;
268 + regulator-min-microvolt = <700000>;
269 + regulator-max-microvolt = <1320000>;
270 + regulator-name = "vdd-gpu";
273 + vdd_sys_dll: dcdc4 {
274 + regulator-always-on;
275 + regulator-min-microvolt = <1100000>;
276 + regulator-max-microvolt = <1100000>;
277 + regulator-name = "vdd-sys-dll";
281 + regulator-always-on;
282 + regulator-min-microvolt = <1500000>;
283 + regulator-max-microvolt = <1500000>;
284 + regulator-name = "vcc-dram";
288 + regulator-min-microvolt = <3300000>;
289 + regulator-max-microvolt = <3300000>;
290 + regulator-name = "vcc_wifi";
294 + regulator-always-on;
295 + regulator-min-microvolt = <3000000>;
296 + regulator-max-microvolt = <3000000>;
297 + regulator-name = "avcc";
304 + pinctrl-names = "default";
305 + pinctrl-0 = <&uart0_pins_a>;
310 + allwinner,pins = "PD23";
314 + gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD 23 */
320 + usb1_vbus-supply = <®_usb1_vbus>;
323 +++ b/configs/pangolin_defconfig
325 +CONFIG_SUNXI_PANGOLIN=y
327 +CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC,RGMII"
328 +CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-pangolin"
329 +CONFIG_VIDEO_VGA_VIA_LCD=y
330 +CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
334 +CONFIG_DRAM_CHANNELS=1
337 +CONFIG_AXP_DCDC1_VOLT=3300
338 +CONFIG_AXP_ALDO1_VOLT=0
339 +CONFIG_AXP_ALDO2_VOLT=1800
340 +CONFIG_AXP_ALDO3_VOLT=3000
341 +CONFIG_AXP_DLDO4_VOLT=3300
342 +CONFIG_AXP_ELDO1_VOLT=1200
343 +CONFIG_AXP_ELDO2_VOLT=2500
344 +CONFIG_AXP_ELDO3_VOLT=3300
345 +CONFIG_MMC_SUNXI_SLOT_EXTRA=2
347 +# Vbus gpio for usb1
348 +CONFIG_USB1_VBUS_PIN=""
349 +# No Vbus gpio for usb2
350 +CONFIG_USB2_VBUS_PIN=""
354 +CONFIG_USB_KEYBOARD=y
357 +CONFIG_ETH_DESIGNWARE=y
359 +CONFIG_DM_SPI_FLASH=y
361 --- a/arch/arm/mach-sunxi/Kconfig
362 +++ b/arch/arm/mach-sunxi/Kconfig
363 @@ -836,6 +836,14 @@ config VIDEO_LCD_PANEL_I2C_SCL
364 Set the SCL pin for the LCD i2c interface. This takes a string in the
365 format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
368 + prompt "Sunxi Board Variant"
371 +config SUNXI_PANGOLIN
372 + bool "Theobroma A31 uQ7 Board"
376 # Note only one of these may be selected at a time! But hidden choices are
377 # not supported by Kconfig