From 859b3f1432df7210f118fdbe6535afa4426e49f2 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Fri, 3 Oct 2014 20:16:22 +0800 Subject: ARM: sunxi: Fix build break when CONFIG_USB_EHCI is not defined BOOT_TARGET_DEVICES includes USB unconditionally. This breaks when CONFIG_CMD_USB is not defined. Use a secondary macro to conditionally include it when CONFIG_EHCI is enabled, as we do for CONFIG_AHCI. Signed-off-by: Chen-Yu Tsai Acked-by: Ian Campbell --- include/configs/sunxi-common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 0c117bc5e7..318f526d34 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -231,10 +231,16 @@ #define BOOT_TARGET_DEVICES_SCSI(func) #endif +#ifdef CONFIG_USB_EHCI +#define BOOT_TARGET_DEVICES_USB(func) func(USB, usb, 0) +#else +#define BOOT_TARGET_DEVICES_USB(func) +#endif + #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \ BOOT_TARGET_DEVICES_SCSI(func) \ - func(USB, usb, 0) \ + BOOT_TARGET_DEVICES_USB(func) \ func(PXE, pxe, na) \ func(DHCP, dhcp, na) -- cgit From 8a6564dacb7e24e82077d109d7d5992d2a14dac3 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 3 Oct 2014 20:16:29 +0800 Subject: ARM: sunxi: Add basic A31 support Add a new sun6i machine that supports UART and MMC. Signed-off-by: Maxime Ripard Signed-off-by: Hans de Goede [wens@csie.org: use SPDX labels, adapt to Kconfig system, drop ifdef around mmc and smp code, drop MACH_TYPE] Signed-off-by: Chen-Yu Tsai Acked-by: Ian Campbell --- include/configs/sun6i.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/configs/sun6i.h (limited to 'include') diff --git a/include/configs/sun6i.h b/include/configs/sun6i.h new file mode 100644 index 0000000000..93a1d965ca --- /dev/null +++ b/include/configs/sun6i.h @@ -0,0 +1,26 @@ +/* + * (C) Copyright 2012-2013 Henrik Nordstrom + * (C) Copyright 2013 Luke Kenneth Casson Leighton + * (C) Copyright 2013 Maxime Ripard + * + * Configuration settings for the Allwinner A31 (sun6i) CPU + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* + * A31 specific configuration + */ +#define CONFIG_SUN6I /* sun6i SoC generation */ + +#define CONFIG_SYS_PROMPT "sun6i# " + +/* + * Include common sunxi configuration where most the settings are + */ +#include + +#endif /* __CONFIG_H */ -- cgit From cd82113a98e152b34e727718b729d0c5be44da99 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 2 Oct 2014 20:29:26 +0200 Subject: sunxi: Add mmc card-detect functionality Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- include/configs/sunxi-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 318f526d34..5f54c01653 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -181,6 +181,7 @@ /* GPIO */ #define CONFIG_SUNXI_GPIO +#define CONFIG_SPL_GPIO_SUPPORT #define CONFIG_CMD_GPIO /* Ethernet support */ -- cgit From e71189168553ddf59f25132027d662458db8f3c5 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 13 Oct 2014 07:41:16 +0200 Subject: sunxi: Add CONFIG_MACH_TYPE defines to sun4i, sun5i and sun7i Many people are still using old linux-sunxi-3.4 kernels on sunxi devices, adding the proper MACH_TYPE defines for this allows people to switch to upstream u-boot, so that we can stop maintaining the linux-sunxi u-boot fork. These machine-ids are all properly registered at: http://www.arm.linux.org.uk/developer/machines/ Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- include/configs/sun4i.h | 1 + include/configs/sun5i.h | 1 + include/configs/sun7i.h | 1 + 3 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/configs/sun4i.h b/include/configs/sun4i.h index 5611ecc85f..d0191a32b1 100644 --- a/include/configs/sun4i.h +++ b/include/configs/sun4i.h @@ -15,6 +15,7 @@ #define CONFIG_CLK_FULL_SPEED 1008000000 #define CONFIG_SYS_PROMPT "sun4i# " +#define CONFIG_MACH_TYPE 4104 #ifdef CONFIG_USB_EHCI #define CONFIG_USB_EHCI_SUNXI diff --git a/include/configs/sun5i.h b/include/configs/sun5i.h index 6066371a17..7b683e9c89 100644 --- a/include/configs/sun5i.h +++ b/include/configs/sun5i.h @@ -15,6 +15,7 @@ #define CONFIG_CLK_FULL_SPEED 1008000000 #define CONFIG_SYS_PROMPT "sun5i# " +#define CONFIG_MACH_TYPE 4138 #ifdef CONFIG_USB_EHCI #define CONFIG_USB_EHCI_SUNXI diff --git a/include/configs/sun7i.h b/include/configs/sun7i.h index a902b84574..966cbd8e83 100644 --- a/include/configs/sun7i.h +++ b/include/configs/sun7i.h @@ -16,6 +16,7 @@ #define CONFIG_CLK_FULL_SPEED 912000000 #define CONFIG_SYS_PROMPT "sun7i# " +#define CONFIG_MACH_TYPE 4283 #ifdef CONFIG_USB_EHCI #define CONFIG_USB_EHCI_SUNXI -- cgit From 41f8e9f5c48ec919b1a44591008ddc3e5a045228 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Tue, 7 Oct 2014 15:11:49 +0800 Subject: ARM: sunxi: Fix build break when CONFIG_MMC is not defined BOOT_TARGET_DEVICES includes MMC unconditionally. This breaks when CONFIG_CMD_MMC is not defined. Use a secondary macro to conditionally include it when CONFIG_MMC is enabled, as we do for CONFIG_AHCI. This is used when we want to use uart0 from port F, which conflicts with mmc0. Signed-off-by: Chen-Yu Tsai Acked-by: Ian Campbell --- include/configs/sunxi-common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 5f54c01653..d55e4cab06 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -226,6 +226,12 @@ "pxefile_addr_r=0x43200000\0" \ "ramdisk_addr_r=0x43300000\0" +#ifdef CONFIG_MMC +#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC(func) +#endif + #ifdef CONFIG_AHCI #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) #else @@ -239,7 +245,7 @@ #endif #define BOOT_TARGET_DEVICES(func) \ - func(MMC, mmc, 0) \ + BOOT_TARGET_DEVICES_MMC(func) \ BOOT_TARGET_DEVICES_SCSI(func) \ BOOT_TARGET_DEVICES_USB(func) \ func(PXE, pxe, na) \ -- cgit From ff2b47f6a9cc10251cc601d34241ee02933c2187 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Wed, 22 Oct 2014 16:47:42 +0800 Subject: ARM: sunxi: Add support for uart0 on port F (mmc0) Allwinner SoCs provide uart0 muxed with mmc0, which can then be used with a micro SD breakout board. On the A23, this is the only way to use uart0. Signed-off-by: Chen-Yu Tsai Acked-by: Ian Campbell --- include/configs/sunxi-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index d55e4cab06..dfcb9a8e5e 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -77,6 +77,7 @@ #define CONFIG_INITRD_TAG /* mmc config */ +#if !defined(CONFIG_UART0_PORT_F) #define CONFIG_MMC #define CONFIG_GENERIC_MMC #define CONFIG_CMD_MMC @@ -84,6 +85,7 @@ #define CONFIG_MMC_SUNXI_SLOT 0 #define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 /* first detected MMC controller */ +#endif /* 4MB of malloc() pool */ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (4 << 20)) -- cgit From 8ebe4f429266a7cb9011f5b3ab51226297f41210 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Wed, 22 Oct 2014 16:47:44 +0800 Subject: ARM: sunxi: Add basic A23 support The basic blocks of the A23 are similar to the A31 (sun6i). Re-use sun6i code for initial clock, gpio, and uart setup. There is no SPL support for A23, as we do not have any documentation or sample code for DRAM initialization. Signed-off-by: Chen-Yu Tsai Acked-by: Ian Campbell --- include/configs/sun8i.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/configs/sun8i.h (limited to 'include') diff --git a/include/configs/sun8i.h b/include/configs/sun8i.h new file mode 100644 index 0000000000..1c1a7cde5e --- /dev/null +++ b/include/configs/sun8i.h @@ -0,0 +1,23 @@ +/* + * (C) Copyright 2014 Chen-Yu Tsai + * + * Configuration settings for the Allwinner A23 (sun8i) CPU + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* + * A23 specific configuration + */ +#define CONFIG_SUN8I /* sun8i SoC generation */ +#define CONFIG_SYS_PROMPT "sun8i# " + +/* + * Include common sunxi configuration where most the settings are + */ +#include + +#endif /* __CONFIG_H */ -- cgit From c757a50bd12b4f4f1c44a7cc42354918e8d60cd7 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Wed, 22 Oct 2014 16:47:47 +0800 Subject: ARM: sunxi: Add support for using R_UART as console The A23 only has UART0 muxed with MMC0. Some of the boards we encountered expose R_UART as a set of pads. Add support for R_UART so we can have a console while using mmc. Signed-off-by: Chen-Yu Tsai Acked-by: Ian Campbell --- include/configs/sunxi-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index dfcb9a8e5e..2b0241b7fe 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -42,6 +42,7 @@ #define CONFIG_SYS_NS16550_COM2 SUNXI_UART1_BASE #define CONFIG_SYS_NS16550_COM3 SUNXI_UART2_BASE #define CONFIG_SYS_NS16550_COM4 SUNXI_UART3_BASE +#define CONFIG_SYS_NS16550_COM5 SUNXI_R_UART_BASE /* DRAM Base */ #define CONFIG_SYS_SDRAM_BASE 0x40000000 -- cgit From 06beadb0015984da655acbb671aaa5f69ac53c5f Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 7 Oct 2014 14:20:30 +0100 Subject: sunxi: Increase command line buffer size (CONFIG_SYS_CBSIZE) I was running into this limit with a not overly long PXE append line. Since the PXE code wants to print the resulting command line increase CONFIG_SYS_PBSIZE too. Signed-off-by: Ian Campbell Acked-by: Hans de Goede --- include/configs/sunxi-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h index 2b0241b7fe..cc450e02e6 100644 --- a/include/configs/sunxi-common.h +++ b/include/configs/sunxi-common.h @@ -95,8 +95,8 @@ * Miscellaneous configurable options */ #define CONFIG_CMD_ECHO -#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ -#define CONFIG_SYS_PBSIZE 384 /* Print Buffer Size */ +#define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ +#define CONFIG_SYS_PBSIZE 1024 /* Print Buffer Size */ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_GENERIC_BOARD -- cgit