7a58972680
The current uboot default config for the A13 SOM erroneously enables support for the AXP209 power regulator IC which is not present on the board. This superfluous support module sets an incorrect initial clock frequency and confuses the kernel, ultimately leading to a boot failure later on. Properly disable the PMIC support and enable the EHCI support by translating the deprecated SYS_EXTRA_OPTIONS values into proper SUNXI_NO_PMIC and USB_EHCI_HCD symbols respectively. Also rename 002-add-olimex-a13-som.diff to 002-add-olimex-a13-som.patch and refresh the remaining patches of the series while we're at it. Reported-by: Mario Fischer <mario-fischer@web.de> Signed-off-by: Jo-Philipp Wich <jo@mein.io>
385 lines
9.1 KiB
Diff
385 lines
9.1 KiB
Diff
--- a/arch/arm/dts/Makefile
|
|
+++ b/arch/arm/dts/Makefile
|
|
@@ -152,6 +152,7 @@ dtb-$(CONFIG_MACH_SUN6I) += \
|
|
sun6i-a31-m9.dtb \
|
|
sun6i-a31-mele-a1000g-quad.dtb \
|
|
sun6i-a31-mixtile-loftq.dtb \
|
|
+ sun6i-a31-pangolin.dtb \
|
|
sun6i-a31s-cs908.dtb \
|
|
sun6i-a31s-primo81.dtb \
|
|
sun6i-a31s-sinovoip-bpi-m2.dtb
|
|
--- a/arch/arm/dts/sun6i-a31.dtsi
|
|
+++ b/arch/arm/dts/sun6i-a31.dtsi
|
|
@@ -643,6 +643,13 @@
|
|
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
|
};
|
|
|
|
+ i2c3_pins_a: i2c3@0 {
|
|
+ allwinner,pins = "PB5", "PB6";
|
|
+ allwinner,function = "i2c3";
|
|
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
|
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
|
+ };
|
|
+
|
|
mmc0_pins_a: mmc0@0 {
|
|
allwinner,pins = "PF0", "PF1", "PF2",
|
|
"PF3", "PF4", "PF5";
|
|
--- /dev/null
|
|
+++ b/arch/arm/dts/sun6i-a31-pangolin.dts
|
|
@@ -0,0 +1,292 @@
|
|
+/*
|
|
+ * Copyright 2015, Theobroma Systems Design und Consulting GmbH
|
|
+ *
|
|
+ * This file is dual-licensed: you can use it either under the terms
|
|
+ * of the GPL or the X11 license, at your option. Note that this dual
|
|
+ * licensing only applies to this file, and not this project as a
|
|
+ * whole.
|
|
+ *
|
|
+ * a) This file is free software; you can redistribute it and/or
|
|
+ * modify it under the terms of the GNU General Public License as
|
|
+ * published by the Free Software Foundation; either version 2 of the
|
|
+ * License, or (at your option) any later version.
|
|
+ *
|
|
+ * This file is distributed in the hope that it will be useful,
|
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+ * GNU General Public License for more details.
|
|
+ *
|
|
+ * Or, alternatively,
|
|
+ *
|
|
+ * b) Permission is hereby granted, free of charge, to any person
|
|
+ * obtaining a copy of this software and associated documentation
|
|
+ * files (the "Software"), to deal in the Software without
|
|
+ * restriction, including without limitation the rights to use,
|
|
+ * copy, modify, merge, publish, distribute, sublicense, and/or
|
|
+ * sell copies of the Software, and to permit persons to whom the
|
|
+ * Software is furnished to do so, subject to the following
|
|
+ * conditions:
|
|
+ *
|
|
+ * The above copyright notice and this permission notice shall be
|
|
+ * included in all copies or substantial portions of the Software.
|
|
+ *
|
|
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
+ * OTHER DEALINGS IN THE SOFTWARE.
|
|
+ */
|
|
+
|
|
+/dts-v1/;
|
|
+#include "sun6i-a31.dtsi"
|
|
+#include "sunxi-common-regulators.dtsi"
|
|
+
|
|
+#include <dt-bindings/gpio/gpio.h>
|
|
+#include <dt-bindings/pinctrl/sun4i-a10.h>
|
|
+
|
|
+/ {
|
|
+ model = "Theobroma Systems A31 Pangolin";
|
|
+ compatible = "tsd,a31-pangolin", "allwinner,sun6i-a31";
|
|
+
|
|
+ aliases {
|
|
+ serial0 = &uart0;
|
|
+ serial2 = &uart2;
|
|
+ spi0 = &spi0;
|
|
+ spi1 = &spi1;
|
|
+ spi2 = &spi2;
|
|
+ spi3 = &spi3;
|
|
+ };
|
|
+
|
|
+ chosen {
|
|
+ stdout-path = "serial2:115200n8";
|
|
+ };
|
|
+};
|
|
+
|
|
+&ehci0 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci0 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ehci1 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci1 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci2 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&gmac {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&gmac_pins_rgmii_a>;
|
|
+ phy = <&phy1>;
|
|
+ phy-mode = "rgmii";
|
|
+ snps,reset-gpio = <&pio 0 7 GPIO_ACTIVE_LOW>;
|
|
+ snps,reset-active-low;
|
|
+ snps,reset-delays-us = <0 10000 30000>;
|
|
+ status = "okay";
|
|
+
|
|
+ phy1: ethernet-phy@4 {
|
|
+ reg = <4>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&i2c0 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&i2c0_pins_a>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&i2c1 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&i2c1_pins_a>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&i2c2 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&i2c2_pins_a>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&i2c3 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&i2c3_pins_a>;
|
|
+ status = "okay";
|
|
+
|
|
+ rtc_twi: rtc@6f {
|
|
+ compatible = "isil,isl1208";
|
|
+ reg = <0x6f>;
|
|
+ };
|
|
+ fan: fan@18 {
|
|
+ compatible = "ti,amc6821";
|
|
+ reg = <0x18>;
|
|
+ cooling-min-state = <0>;
|
|
+ cooling-max-state = <9>;
|
|
+ #cooling-cells = <2>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&spi0 {
|
|
+ status = "okay";
|
|
+
|
|
+ flash: flash@0 {
|
|
+ compatible = "spansion,m25p40";
|
|
+ spi-max-frequency = <16000000>;
|
|
+ spi-cpol;
|
|
+ spi-cpha;
|
|
+ };
|
|
+};
|
|
+
|
|
+&spi1 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ir {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&ir_pins_a>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&mmc0 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_pangolin>;
|
|
+ vmmc-supply = <®_vcc3v0>;
|
|
+ bus-width = <4>;
|
|
+ cd-gpios = <&pio 2 19 GPIO_ACTIVE_LOW>; /* PC19 */
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&mmc0_pins_a {
|
|
+ /* external pull-ups missing for some pins */
|
|
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
|
+};
|
|
+
|
|
+&mmc2 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&mmc2_pins_a>;
|
|
+ vmmc-supply = <®_vcc3v0>;
|
|
+ bus-width = <8>;
|
|
+ non-removable;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&pio {
|
|
+ mmc0_cd_pin_pangolin: mmc0_cd_pin@0 {
|
|
+ allwinner,pins = "PC19";
|
|
+ allwinner,function = "gpio_in";
|
|
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
|
|
+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
|
|
+ };
|
|
+
|
|
+ leds_pins_pangolin: led_pins@0 {
|
|
+ allwinner,pins = "PH7", "PC16";
|
|
+ allwinner,function = "gpio_out";
|
|
+ allwinner,drive = <SUN4I_PINCTRL_20_MA>;
|
|
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
|
+ };
|
|
+
|
|
+ mmc2_pins_a: mmc2@0 {
|
|
+ allwinner,pins = "PC6","PC7","PC8","PC9","PC10","PC11",
|
|
+ "PC12","PC13","PC14","PC15";
|
|
+ allwinner,function = "mmc2";
|
|
+ allwinner,drive = <SUN4I_PINCTRL_30_MA>;
|
|
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&p2wi {
|
|
+ status = "okay";
|
|
+
|
|
+ axp221: pmic@68 {
|
|
+ compatible = "x-powers,axp221";
|
|
+ reg = <0x68>;
|
|
+ interrupt-parent = <&nmi_intc>;
|
|
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <1>;
|
|
+ dcdc1-supply = <&vcc_3v0>;
|
|
+ dcdc5-supply = <&vcc_dram>;
|
|
+
|
|
+ regulators {
|
|
+ x-powers,dcdc-freq = <3000>;
|
|
+
|
|
+ vcc_3v0: dcdc1 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <3000000>;
|
|
+ regulator-max-microvolt = <3000000>;
|
|
+ regulator-name = "vcc-3v0";
|
|
+ };
|
|
+
|
|
+ vdd_cpu: dcdc2 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <700000>;
|
|
+ regulator-max-microvolt = <1320000>;
|
|
+ regulator-name = "vdd-cpu";
|
|
+ };
|
|
+
|
|
+ vdd_gpu: dcdc3 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <700000>;
|
|
+ regulator-max-microvolt = <1320000>;
|
|
+ regulator-name = "vdd-gpu";
|
|
+ };
|
|
+
|
|
+ vdd_sys_dll: dcdc4 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <1100000>;
|
|
+ regulator-max-microvolt = <1100000>;
|
|
+ regulator-name = "vdd-sys-dll";
|
|
+ };
|
|
+
|
|
+ vcc_dram: dcdc5 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <1500000>;
|
|
+ regulator-max-microvolt = <1500000>;
|
|
+ regulator-name = "vcc-dram";
|
|
+ };
|
|
+
|
|
+ vcc_wifi: aldo1 {
|
|
+ regulator-min-microvolt = <3300000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-name = "vcc_wifi";
|
|
+ };
|
|
+
|
|
+ avcc: aldo3 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <3000000>;
|
|
+ regulator-max-microvolt = <3000000>;
|
|
+ regulator-name = "avcc";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&uart0 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&uart0_pins_a>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&usb1_vbus_pin_a {
|
|
+ allwinner,pins = "PD23";
|
|
+};
|
|
+
|
|
+®_usb1_vbus {
|
|
+ gpio = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD 23 */
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&usbphy {
|
|
+ status = "okay";
|
|
+ usb1_vbus-supply = <®_usb1_vbus>;
|
|
+};
|
|
--- /dev/null
|
|
+++ b/configs/pangolin_defconfig
|
|
@@ -0,0 +1,36 @@
|
|
+CONFIG_SUNXI_PANGOLIN=y
|
|
+CONFIG_SPL=y
|
|
+CONFIG_SYS_EXTRA_OPTIONS="USB_EHCI,SUNXI_GMAC,RGMII"
|
|
+CONFIG_DEFAULT_DEVICE_TREE="sun6i-a31-pangolin"
|
|
+CONFIG_VIDEO_VGA_VIA_LCD=y
|
|
+CONFIG_VIDEO_VGA_EXTERNAL_DAC_EN="PH25"
|
|
+CONFIG_ARM=y
|
|
+CONFIG_ARCH_SUNXI=y
|
|
+CONFIG_MACH_SUN6I=y
|
|
+CONFIG_DRAM_CHANNELS=1
|
|
+CONFIG_DRAM_CLK=360
|
|
+CONFIG_DRAM_ZQ=70
|
|
+CONFIG_AXP_DCDC1_VOLT=3300
|
|
+CONFIG_AXP_ALDO1_VOLT=0
|
|
+CONFIG_AXP_ALDO2_VOLT=1800
|
|
+CONFIG_AXP_ALDO3_VOLT=3000
|
|
+CONFIG_AXP_DLDO4_VOLT=3300
|
|
+CONFIG_AXP_ELDO1_VOLT=1200
|
|
+CONFIG_AXP_ELDO2_VOLT=2500
|
|
+CONFIG_AXP_ELDO3_VOLT=3300
|
|
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
|
+CONFIG_CONS_INDEX=3
|
|
+# Vbus gpio for usb1
|
|
+CONFIG_USB1_VBUS_PIN=""
|
|
+# No Vbus gpio for usb2
|
|
+CONFIG_USB2_VBUS_PIN=""
|
|
+CONFIG_USB=y
|
|
+CONFIG_DM_USB=y
|
|
+CONFIG_USB_EHCI=y
|
|
+CONFIG_USB_KEYBOARD=y
|
|
+CONFIG_DM_ETH=y
|
|
+CONFIG_CMD_IMLS=n
|
|
+CONFIG_ETH_DESIGNWARE=y
|
|
+CONFIG_DM_SPI=y
|
|
+CONFIG_DM_SPI_FLASH=y
|
|
+CONFIG_SUNXI_SPI=y
|
|
--- a/board/sunxi/Kconfig
|
|
+++ b/board/sunxi/Kconfig
|
|
@@ -15,7 +15,6 @@ config SUNXI_GEN_SUN6I
|
|
separate ahb reset control registers, custom pmic bus, new style
|
|
watchdog, etc.
|
|
|
|
-
|
|
choice
|
|
prompt "Sunxi SoC Variant"
|
|
optional
|
|
@@ -533,6 +532,14 @@ config VIDEO_LCD_PANEL_I2C_SCL
|
|
Set the SCL pin for the LCD i2c interface. This takes a string in the
|
|
format understood by sunxi_name_to_gpio, e.g. PH1 for pin 1 of port H.
|
|
|
|
+choice
|
|
+ prompt "Sunxi Board Variant"
|
|
+ optional
|
|
+
|
|
+config SUNXI_PANGOLIN
|
|
+ bool "Theobroma A31 uQ7 Board"
|
|
+
|
|
+endchoice
|
|
|
|
# Note only one of these may be selected at a time! But hidden choices are
|
|
# not supported by Kconfig
|