]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of http://git.denx.de/u-boot-sunxi
authorTom Rini <trini@konsulko.com>
Mon, 6 Jul 2015 01:22:22 +0000 (21:22 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 6 Jul 2015 01:22:22 +0000 (21:22 -0400)
arch/arm/cpu/armv7/sunxi/board.c
arch/arm/cpu/armv7/sunxi/rsb.c
arch/arm/dts/Makefile
arch/arm/dts/sun8i-a23-a33.dtsi
arch/arm/dts/sun8i-a33-sinlinx-sina33.dts [new file with mode: 0644]
arch/arm/dts/sun8i-a33.dtsi
arch/arm/include/asm/arch-sunxi/gpio.h
board/sunxi/MAINTAINERS
configs/Sinlinx_SinA33_defconfig [new file with mode: 0644]

index 03443629bcd10fda335c75be2c19e1fc1ac43575..5f39aa07cfb03dc66c35cc8b973f14ee49aeeda1 100644 (file)
@@ -45,11 +45,11 @@ static int gpio_init(void)
        sunxi_gpio_set_cfgpin(SUNXI_GPB(23), SUNXI_GPIO_INPUT);
 #endif
 #if defined(CONFIG_MACH_SUN8I)
-       sunxi_gpio_set_cfgpin(SUNXI_GPF(2), SUN8I_GPF_UART0_TX);
-       sunxi_gpio_set_cfgpin(SUNXI_GPF(4), SUN8I_GPF_UART0_RX);
+       sunxi_gpio_set_cfgpin(SUNXI_GPF(2), SUN8I_GPF_UART0);
+       sunxi_gpio_set_cfgpin(SUNXI_GPF(4), SUN8I_GPF_UART0);
 #else
-       sunxi_gpio_set_cfgpin(SUNXI_GPF(2), SUNXI_GPF_UART0_TX);
-       sunxi_gpio_set_cfgpin(SUNXI_GPF(4), SUNXI_GPF_UART0_RX);
+       sunxi_gpio_set_cfgpin(SUNXI_GPF(2), SUNXI_GPF_UART0);
+       sunxi_gpio_set_cfgpin(SUNXI_GPF(4), SUNXI_GPF_UART0);
 #endif
        sunxi_gpio_set_pull(SUNXI_GPF(4), 1);
 #elif CONFIG_CONS_INDEX == 1 && (defined(CONFIG_MACH_SUN4I) || defined(CONFIG_MACH_SUN7I))
@@ -64,6 +64,10 @@ static int gpio_init(void)
        sunxi_gpio_set_cfgpin(SUNXI_GPH(20), SUN6I_GPH_UART0);
        sunxi_gpio_set_cfgpin(SUNXI_GPH(21), SUN6I_GPH_UART0);
        sunxi_gpio_set_pull(SUNXI_GPH(21), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN8I_A33)
+       sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_A33_GPB_UART0);
+       sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_A33_GPB_UART0);
+       sunxi_gpio_set_pull(SUNXI_GPB(1), SUNXI_GPIO_PULL_UP);
 #elif CONFIG_CONS_INDEX == 1 && defined(CONFIG_MACH_SUN9I)
        sunxi_gpio_set_cfgpin(SUNXI_GPH(12), SUN9I_GPH_UART0);
        sunxi_gpio_set_cfgpin(SUNXI_GPH(13), SUN9I_GPH_UART0);
index f115a9cac41ecaa66260f5111f48a771b92d139e..6fd11f1529833f3e484a4b3d6bd488d28c7981b0 100644 (file)
@@ -60,11 +60,12 @@ int rsb_init(void)
        struct sunxi_rsb_reg * const rsb =
                (struct sunxi_rsb_reg *)SUNXI_RSB_BASE;
 
-       rsb_cfg_io();
-
        /* Enable RSB and PIO clk, and de-assert their resets */
        prcm_apb0_enable(PRCM_APB0_GATE_PIO | PRCM_APB0_GATE_RSB);
 
+       /* Setup external pins */
+       rsb_cfg_io();
+
        writel(RSB_CTRL_SOFT_RST, &rsb->ctrl);
        rsb_set_clk();
 
index 9c735c672abce4087c7db6052590e6a75529ef5f..bbca94f1a08e12736557485d34700ce6248c3806 100644 (file)
@@ -128,7 +128,8 @@ dtb-$(CONFIG_MACH_SUN8I_A23) += \
 dtb-$(CONFIG_MACH_SUN8I_A33) += \
        sun8i-a33-et-q8-v1.6.dtb \
        sun8i-a33-ga10h-v1.1.dtb \
-       sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dtb
+       sun8i-a33-ippo-q8h-v1.2-lcd1024x600.dtb \
+       sun8i-a33-sinlinx-sina33.dtb
 dtb-$(CONFIG_MACH_SUN9I) += \
        sun9i-a80-optimus.dtb \
        sun9i-a80-cubieboard4.dtb
index faea94e45eeb4761ba06d15b9eb5901ca359b147..7abd0ae3143d74e1f9ba9b2638fc55353a306d7c 100644 (file)
                                allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
                        };
 
+                       mmc2_8bit_pins: mmc2_8bit {
+                               allwinner,pins = "PC5", "PC6", "PC8",
+                                                "PC9", "PC10", "PC11",
+                                                "PC12", "PC13", "PC14",
+                                                "PC15";
+                               allwinner,function = "mmc2";
+                               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
+                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+                       };
+
                        i2c0_pins_a: i2c0@0 {
                                allwinner,pins = "PH2", "PH3";
                                allwinner,function = "i2c0";
diff --git a/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts b/arch/arm/dts/sun8i-a33-sinlinx-sina33.dts
new file mode 100644 (file)
index 0000000..5788c29
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2015 Chen-Yu Tsai
+ *
+ * Chen-Yu Tsai <wens@csie.org>
+ *
+ * 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 "sun8i-a33.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+       model = "Sinlinx SinA33";
+       compatible = "sinlinx,sina33", "allwinner,sun8i-a33";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0:115200n8";
+       };
+};
+
+&lradc {
+       vref-supply = <&reg_vcc3v0>;
+       status = "okay";
+
+       button@200 {
+               label = "Volume Up";
+               linux,code = <KEY_VOLUMEUP>;
+               channel = <0>;
+               voltage = <191011>;
+       };
+
+       button@400 {
+               label = "Volume Down";
+               linux,code = <KEY_VOLUMEDOWN>;
+               channel = <0>;
+               voltage = <391304>;
+       };
+
+       button@600 {
+               label = "Home";
+               linux,code = <KEY_HOME>;
+               channel = <0>;
+               voltage = <600000>;
+       };
+};
+
+&mmc0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_sina33>;
+       vmmc-supply = <&reg_vcc3v0>;
+       bus-width = <4>;
+       cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
+       cd-inverted;
+       status = "okay";
+};
+
+&mmc2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mmc2_8bit_pins>;
+       vmmc-supply = <&reg_vcc3v0>;
+       bus-width = <8>;
+       non-removable;
+       status = "okay";
+};
+
+&mmc2_8bit_pins {
+       /* eMMC is missing pull-ups */
+       allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+};
+
+&pio {
+       mmc0_cd_pin_sina33: mmc0_cd_pin@0 {
+               allwinner,pins = "PB4";
+               allwinner,function = "gpio_in";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins_b>;
+       status = "okay";
+};
index 9b43bc6e7926bed16f0c2f933c1f055864cff2c9..85ee08098b7b1dcbd684d3311caa56c74e16103c 100644 (file)
        compatible = "allwinner,sun8i-a33-pinctrl";
        interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
+
+       uart0_pins_b: uart0@1 {
+               allwinner,pins = "PB0", "PB1";
+               allwinner,function = "uart0";
+               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+       };
+
 };
index 496295d35735ebc2ca468ff184a79a4c3c8fb70f..8e67b3bcb87d0fe411fb95588fe85e1fbcd22f27 100644 (file)
@@ -156,6 +156,7 @@ enum sunxi_gpio_number {
 #define SUN4I_GPB_UART0                2
 #define SUN5I_GPB_UART0                2
 #define SUN8I_GPB_UART2                2
+#define SUN8I_A33_GPB_UART0    3
 
 #define SUNXI_GPC_SDC2         3
 #define SUN6I_GPC_SDC3         4
index 7a420555593e88debceaa368d31a5e2d12a3b3b0..1f12a646e48a95f36bfc81e0cafd68370908b348 100644 (file)
@@ -162,6 +162,12 @@ M: Siarhei Siamashka <siarhei.siamashka@gmail.com>
 S:     Maintained
 F:     configs/MSI_Primo81_defconfig
 
+SINLINX SINA33 BOARD
+M:     Chen-Yu Tsai <wens@csie.org>
+S:     Maintained
+F:     configs/Sinlinx_SinA33_defconfig
+W:     http://linux-sunxi.org/Sinlinx_SinA33
+
 TZX-Q8-713B7 BOARD
 M:     Paul Kocialkowski <contact@paulk.fr>
 S:     Maintained
diff --git a/configs/Sinlinx_SinA33_defconfig b/configs/Sinlinx_SinA33_defconfig
new file mode 100644 (file)
index 0000000..e9e62da
--- /dev/null
@@ -0,0 +1,16 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN8I_A33=y
+CONFIG_DRAM_CLK=552
+CONFIG_DRAM_ZQ=15291
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-a33-sinlinx-sina33"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+CONFIG_DM_ETH=y
+CONFIG_DM_SERIAL=y
+CONFIG_AXP221_ALDO1_VOLT=3000
+CONFIG_USB=y
+CONFIG_DM_USB=y