From 5c7f10fda362db16a7bf3e571b4ae1e88fac2466 Mon Sep 17 00:00:00 2001 From: Oliver Schinagl Date: Fri, 26 Jul 2013 12:56:58 +0200 Subject: sun6i: Add basic axp221 driver The A31 uses the AXP221 pmic for various voltages. Signed-off-by: Oliver Schinagl Signed-off-by: Hans de Goede Acked-by: Ian Campbell -- Changes in v2: -Rebase Changes in v3: -Add support for all dldo and aldo-s -Add Kconfig option to select building AXP221 and to select voltage of dldo and aldo-s Changes in v4: -Add axp221_setbits helper function -Use symbolic names for enabled bits in CTRL1 - CTRL3 registers --- board/sunxi/board.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'board') diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 03890c8..e6ec5b8 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -19,6 +19,9 @@ #ifdef CONFIG_AXP209_POWER #include #endif +#ifdef CONFIG_AXP221_POWER +#include +#endif #include #include #include @@ -169,6 +172,29 @@ void sunxi_board_init(void) power_failed |= axp209_set_ldo3(2800); power_failed |= axp209_set_ldo4(2800); #endif +#ifdef CONFIG_AXP221_POWER + power_failed = axp221_init(); + power_failed |= axp221_set_dcdc1(3000); + power_failed |= axp221_set_dcdc2(1200); + power_failed |= axp221_set_dcdc3(1200); + power_failed |= axp221_set_dcdc4(1200); + power_failed |= axp221_set_dcdc5(1500); +#if CONFIG_AXP221_DLDO1_VOLT != -1 + power_failed |= axp221_set_dldo1(CONFIG_AXP221_DLDO1_VOLT); +#endif +#if CONFIG_AXP221_DLDO4_VOLT != -1 + power_failed |= axp221_set_dldo4(CONFIG_AXP221_DLDO4_VOLT); +#endif +#if CONFIG_AXP221_ALDO1_VOLT != -1 + power_failed |= axp221_set_aldo1(CONFIG_AXP221_ALDO1_VOLT); +#endif +#if CONFIG_AXP221_ALDO2_VOLT != -1 + power_failed |= axp221_set_aldo2(CONFIG_AXP221_ALDO2_VOLT); +#endif +#if CONFIG_AXP221_ALDO3_VOLT != -1 + power_failed |= axp221_set_aldo3(CONFIG_AXP221_ALDO3_VOLT); +#endif +#endif printf("DRAM:"); ramsize = sunxi_dram_init(); -- cgit v1.1 From 8c2c9cfa7bfe1e5ee792b2e277f8dbff9bdf8ccf Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 25 Oct 2014 20:18:10 +0200 Subject: sun6i: Enable SPL Enable the SPL now that we've all the necessary bits in place. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- board/sunxi/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'board') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 5b2d091..6688386 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -16,6 +16,7 @@ config MACH_SUN5I config MACH_SUN6I bool "sun6i (Allwinner A31)" select CPU_V7 + select SUPPORT_SPL config MACH_SUN7I bool "sun7i (Allwinner A20)" -- cgit v1.1 From 505eceec874bdf03e00f0a0ddfccac912aa69821 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 27 Oct 2014 23:29:49 +0100 Subject: sun6i: Add Mele M9 board Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- board/sunxi/Kconfig | 4 ++++ board/sunxi/MAINTAINERS | 1 + 2 files changed, 5 insertions(+) (limited to 'board') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 6688386..5c3b932 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -112,6 +112,10 @@ config TARGET_MELE_M3 bool "MELE_M3" depends on MACH_SUN7I +config TARGET_MELE_M9 + bool "MELE_M9" + depends on MACH_SUN6I + config TARGET_MINI_X_1GB bool "MINI_X_1GB" depends on MACH_SUN4I diff --git a/board/sunxi/MAINTAINERS b/board/sunxi/MAINTAINERS index b3c77a8..ca03002 100644 --- a/board/sunxi/MAINTAINERS +++ b/board/sunxi/MAINTAINERS @@ -9,6 +9,7 @@ F: configs/Cubieboard_defconfig F: configs/Mele_A1000_defconfig F: configs/Mele_A1000G_defconfig F: configs/Mele_M3_defconfig +F: configs/Mele_M9_defconfig F: configs/Mini-X_defconfig F: configs/Mini-X-1Gb_defconfig F: include/configs/sun5i.h -- cgit v1.1 From 115200ceb0faad679bcc7d7dba4b63ff065606c5 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 7 Nov 2014 16:09:00 +0100 Subject: sunxi: ehci: Add proper Kconfig options to select the usb Vbus gpio-s Add proper Kconfig options to select the usb Vbus gpio-s, besides moving to Kconfig being the right thing to do, an added advantage of this is that it allows for boards without Vbus gpio-s. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- board/sunxi/Kconfig | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'board') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index 5c3b932..b2beea0 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -197,4 +197,18 @@ config MMC_SUNXI_SLOT_EXTRA slot or emmc on mmc1 - mmc3. Setting this to 1, 2 or 3 will enable support for this. +config USB1_VBUS_PIN + string "Vbus enable pin for usb1 (ehci0)" + default "PH6" if MACH_SUN4I || MACH_SUN7I + ---help--- + Set the Vbus enable pin for usb1 (ehci0, usb0 is the otg). This takes + a string in the format understood by sunxi_name_to_gpio, e.g. + PH1 for pin 1 of port H. + +config USB2_VBUS_PIN + string "Vbus enable pin for usb2 (ehci1)" + default "PH3" if MACH_SUN4I || MACH_SUN7I + ---help--- + See USB1_VBUS_PIN help text. + endif -- cgit v1.1 From 76946dfe69359496aa0fd144d102068334974916 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 7 Nov 2014 14:51:12 +0100 Subject: sun6i: ehci: Add sun6i ehci support Add support for the 2 ehci controllers found on the sun6i (A31) soc. Signed-off-by: Hans de Goede Acked-by: Ian Campbell Acked-by: Marek Vasut --- board/sunxi/Kconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'board') diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig index b2beea0..c3f865d 100644 --- a/board/sunxi/Kconfig +++ b/board/sunxi/Kconfig @@ -200,6 +200,7 @@ config MMC_SUNXI_SLOT_EXTRA config USB1_VBUS_PIN string "Vbus enable pin for usb1 (ehci0)" default "PH6" if MACH_SUN4I || MACH_SUN7I + default "PH27" if MACH_SUN6I ---help--- Set the Vbus enable pin for usb1 (ehci0, usb0 is the otg). This takes a string in the format understood by sunxi_name_to_gpio, e.g. @@ -208,6 +209,7 @@ config USB1_VBUS_PIN config USB2_VBUS_PIN string "Vbus enable pin for usb2 (ehci1)" default "PH3" if MACH_SUN4I || MACH_SUN7I + default "PH24" if MACH_SUN6I ---help--- See USB1_VBUS_PIN help text. -- cgit v1.1 From 64a97599b79e277600bc6f1b22cf48aa04ee9bd0 Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Tue, 11 Nov 2014 13:21:26 +0100 Subject: sunxi: gmac: Update bananapi fixup to the new CONFIG_TARGET_ structure The magic bit toucher needs to be updated to reflect the new board Kconfig structure Signed-off-by: Zoltan HERPAI Acked-by: Hans de Goede Signed-off-by: Hans de Goede --- board/sunxi/gmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c index 6348d27..051aca0 100644 --- a/board/sunxi/gmac.c +++ b/board/sunxi/gmac.c @@ -29,7 +29,7 @@ int sunxi_gmac_initialize(bd_t *bis) * need to set bits 10-12 GTXDC "GMAC Transmit Clock Delay Chain" * of the GMAC clk register to 3. */ -#ifdef CONFIG_BANANAPI +#ifdef CONFIG_TARGET_BANANAPI setbits_le32(&ccm->gmac_clk_cfg, 0x3 << 10); #endif -- cgit v1.1