* [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves
@ 2017-03-23 6:26 Wenyou Yang
2017-03-23 6:26 ` [U-Boot] [PATCH 1/7] ARM: dts: sama5d2: add clock property for uart1 node Wenyou Yang
` (6 more replies)
0 siblings, 7 replies; 15+ messages in thread
From: Wenyou Yang @ 2017-03-23 6:26 UTC (permalink / raw)
To: u-boot
Update to make SPL work, enable the early debug UART work in SPL,
convert MACB to support driver model, and some miscs removals.
Wenyou Yang (7):
ARM: dts: sama5d2: add clock property for uart1 node
ARM: dts: sama5d2_xplained: update for SPL
configs: sama5d2_xplained: enable CONFIG_DM_ETH
board: sama5d2_xplained: clean up macb init code
board: sama5d2_xplained: remove uart1 init
board: sama5d2_xplained: remove unnecessary header files
configs: sama5d2_xplained: update for SPL
arch/arm/dts/at91-sama5d2_xplained.dts | 12 ++++++
arch/arm/dts/sama5d2.dtsi | 22 +++++++++++
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 49 +------------------------
configs/sama5d2_xplained_mmc_defconfig | 10 ++++-
configs/sama5d2_xplained_spiflash_defconfig | 9 ++++-
include/configs/sama5d2_xplained.h | 19 ++--------
6 files changed, 56 insertions(+), 65 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/7] ARM: dts: sama5d2: add clock property for uart1 node
2017-03-23 6:26 [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves Wenyou Yang
@ 2017-03-23 6:26 ` Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 2/7] ARM: dts: sama5d2_xplained: update for SPL Wenyou Yang
` (5 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Wenyou Yang @ 2017-03-23 6:26 UTC (permalink / raw)
To: u-boot
Add clock property for uart1 node.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
arch/arm/dts/sama5d2.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/dts/sama5d2.dtsi b/arch/arm/dts/sama5d2.dtsi
index a881d9e05c..d976fd4936 100644
--- a/arch/arm/dts/sama5d2.dtsi
+++ b/arch/arm/dts/sama5d2.dtsi
@@ -600,6 +600,8 @@
uart1: serial at f8020000 {
compatible = "atmel,at91sam9260-usart";
reg = <0xf8020000 0x100>;
+ clocks = <&uart1_clk>;
+ clock-names = "usart";
status = "disabled";
};
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/7] ARM: dts: sama5d2_xplained: update for SPL
2017-03-23 6:26 [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves Wenyou Yang
2017-03-23 6:26 ` [U-Boot] [PATCH 1/7] ARM: dts: sama5d2: add clock property for uart1 node Wenyou Yang
@ 2017-03-23 6:26 ` Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 3/7] configs: sama5d2_xplained: enable CONFIG_DM_ETH Wenyou Yang
` (4 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Wenyou Yang @ 2017-03-23 6:26 UTC (permalink / raw)
To: u-boot
Add the "u-boot,dm-pre-reloc" property to determine which nodes
which are needed by SPL and by the board_init_f stage.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
arch/arm/dts/at91-sama5d2_xplained.dts | 12 ++++++++++++
arch/arm/dts/sama5d2.dtsi | 20 ++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/arch/arm/dts/at91-sama5d2_xplained.dts b/arch/arm/dts/at91-sama5d2_xplained.dts
index 37094376b9..3e624f142c 100644
--- a/arch/arm/dts/at91-sama5d2_xplained.dts
+++ b/arch/arm/dts/at91-sama5d2_xplained.dts
@@ -7,6 +7,7 @@
compatible = "atmel,sama5d2-xplained", "atmel,sama5d2", "atmel,sama5";
chosen {
+ u-boot,dm-pre-reloc;
stdout-path = &uart1;
};
@@ -28,6 +29,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sdmmc0_cmd_dat_default &pinctrl_sdmmc0_ck_cd_default>;
status = "okay";
+ u-boot,dm-pre-reloc;
};
sdmmc1: sdio-host at b0000000 {
@@ -35,6 +37,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sdmmc1_cmd_dat_default &pinctrl_sdmmc1_ck_cd_default>;
status = "okay"; /* conflict with qspi0 */
+ u-boot,dm-pre-reloc;
};
apb {
@@ -67,11 +70,13 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi0_default>;
status = "okay";
+ u-boot,dm-pre-reloc;
spi_flash at 0 {
compatible = "spi-flash";
reg = <0>;
spi-max-frequency = <50000000>;
+ u-boot,dm-pre-reloc;
};
};
@@ -90,6 +95,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1_default>;
status = "okay";
+ u-boot,dm-pre-reloc;
};
i2c1: i2c at fc028000 {
@@ -146,6 +152,7 @@
<PIN_PA8__SDMMC0_DAT6>,
<PIN_PA9__SDMMC0_DAT7>;
bias-pull-up;
+ u-boot,dm-pre-reloc;
};
pinctrl_sdmmc0_ck_cd_default: sdmmc0_ck_cd_default {
@@ -154,6 +161,7 @@
<PIN_PA11__SDMMC0_VDDSEL>,
<PIN_PA13__SDMMC0_CD>;
bias-disable;
+ u-boot,dm-pre-reloc;
};
pinctrl_sdmmc1_cmd_dat_default: sdmmc1_cmd_dat_default {
@@ -163,12 +171,14 @@
<PIN_PA20__SDMMC1_DAT2>,
<PIN_PA21__SDMMC1_DAT3>;
bias-pull-up;
+ u-boot,dm-pre-reloc;
};
pinctrl_sdmmc1_ck_cd_default: sdmmc1_ck_cd_default {
pinmux = <PIN_PA22__SDMMC1_CK>,
<PIN_PA30__SDMMC1_CD>;
bias-disable;
+ u-boot,dm-pre-reloc;
};
pinctrl_spi0_default: spi0_default {
@@ -176,12 +186,14 @@
<PIN_PA15__SPI0_MOSI>,
<PIN_PA16__SPI0_MISO>;
bias-disable;
+ u-boot,dm-pre-reloc;
};
pinctrl_uart1_default: uart1_default {
pinmux = <PIN_PD2__URXD1>,
<PIN_PD3__UTXD1>;
bias-disable;
+ u-boot,dm-pre-reloc;
};
pinctrl_usb_default: usb_default {
diff --git a/arch/arm/dts/sama5d2.dtsi b/arch/arm/dts/sama5d2.dtsi
index d976fd4936..8d89b83b53 100644
--- a/arch/arm/dts/sama5d2.dtsi
+++ b/arch/arm/dts/sama5d2.dtsi
@@ -29,6 +29,7 @@
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
+ u-boot,dm-pre-reloc;
usb1: ohci at 00400000 {
compatible = "atmel,at91rm9200-ohci", "usb-ohci";
@@ -66,6 +67,7 @@
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
+ u-boot,dm-pre-reloc;
pmc: pmc at f0014000 {
compatible = "atmel,sama5d2-pmc", "syscon";
@@ -73,10 +75,12 @@
#address-cells = <1>;
#size-cells = <0>;
#interrupt-cells = <1>;
+ u-boot,dm-pre-reloc;
main: mainck {
compatible = "atmel,at91sam9x5-clk-main";
#clock-cells = <0>;
+ u-boot,dm-pre-reloc;
};
plla: pllack at 0 {
@@ -87,6 +91,7 @@
atmel,clk-input-range = <12000000 12000000>;
#atmel,pll-clk-output-range-cells = <4>;
atmel,pll-clk-output-ranges = <600000000 1200000000 0 0>;
+ u-boot,dm-pre-reloc;
};
plladiv: plladivck {
@@ -117,6 +122,7 @@
compatible = "atmel,at91sam9x5-clk-utmi";
#clock-cells = <0>;
clocks = <&main>;
+ u-boot,dm-pre-reloc;
};
mck: masterck {
@@ -125,12 +131,14 @@
clocks = <&main>, <&plladiv>, <&utmi>;
atmel,clk-output-range = <124000000 166000000>;
atmel,clk-divisors = <1 2 4 3>;
+ u-boot,dm-pre-reloc;
};
h32ck: h32mxck {
#clock-cells = <0>;
compatible = "atmel,sama5d4-clk-h32mx";
clocks = <&mck>;
+ u-boot,dm-pre-reloc;
};
usb: usbck {
@@ -221,6 +229,7 @@
#address-cells = <1>;
#size-cells = <0>;
clocks = <&h32ck>;
+ u-boot,dm-pre-reloc;
macb0_clk: macb0_clk at 5 {
#clock-cells = <0>;
@@ -248,6 +257,7 @@
#clock-cells = <0>;
reg = <18>;
atmel,clk-output-range = <0 83000000>;
+ u-boot,dm-pre-reloc;
};
flx0_clk: flx0_clk at 19 {
@@ -290,6 +300,7 @@
#clock-cells = <0>;
reg = <25>;
atmel,clk-output-range = <0 83000000>;
+ u-boot,dm-pre-reloc;
};
uart2_clk: uart2_clk at 26 {
@@ -326,6 +337,7 @@
#clock-cells = <0>;
reg = <33>;
atmel,clk-output-range = <0 83000000>;
+ u-boot,dm-pre-reloc;
};
spi1_clk: spi1_clk at 34 {
@@ -430,6 +442,7 @@
#address-cells = <1>;
#size-cells = <0>;
clocks = <&mck>;
+ u-boot,dm-pre-reloc;
dma0_clk: dma0_clk at 6 {
#clock-cells = <0>;
@@ -469,11 +482,13 @@
sdmmc0_hclk: sdmmc0_hclk at 31 {
#clock-cells = <0>;
reg = <31>;
+ u-boot,dm-pre-reloc;
};
sdmmc1_hclk: sdmmc1_hclk at 32 {
#clock-cells = <0>;
reg = <32>;
+ u-boot,dm-pre-reloc;
};
lcdc_clk: lcdc_clk at 45 {
@@ -503,15 +518,18 @@
#size-cells = <0>;
interrupt-parent = <&pmc>;
clocks = <&main>, <&plla>, <&utmi>, <&mck>;
+ u-boot,dm-pre-reloc;
sdmmc0_gclk: sdmmc0_gclk at 31 {
#clock-cells = <0>;
reg = <31>;
+ u-boot,dm-pre-reloc;
};
sdmmc1_gclk: sdmmc1_gclk at 32 {
#clock-cells = <0>;
reg = <32>;
+ u-boot,dm-pre-reloc;
};
tcb0_gclk: tcb0_gclk at 35 {
@@ -663,9 +681,11 @@
clocks = <&pioA_clk>;
gpio-controller;
#gpio-cells = <2>;
+ u-boot,dm-pre-reloc;
pinctrl {
compatible = "atmel,sama5d2-pinctrl";
+ u-boot,dm-pre-reloc;
};
};
};
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/7] configs: sama5d2_xplained: enable CONFIG_DM_ETH
2017-03-23 6:26 [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves Wenyou Yang
2017-03-23 6:26 ` [U-Boot] [PATCH 1/7] ARM: dts: sama5d2: add clock property for uart1 node Wenyou Yang
2017-03-23 6:26 ` [U-Boot] [PATCH 2/7] ARM: dts: sama5d2_xplained: update for SPL Wenyou Yang
@ 2017-03-23 6:26 ` Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 4/7] board: sama5d2_xplained: clean up macb init code Wenyou Yang
` (3 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Wenyou Yang @ 2017-03-23 6:26 UTC (permalink / raw)
To: u-boot
Enable CONFIG_DM_ETH to make MACB to support driver model.
Because the USB Ether doesn't support driver model so far,
remove this feature.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
configs/sama5d2_xplained_mmc_defconfig | 2 ++
configs/sama5d2_xplained_spiflash_defconfig | 2 ++
include/configs/sama5d2_xplained.h | 11 -----------
3 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index 500f497a03..8378c4e8b5 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -48,6 +48,8 @@ CONFIG_MMC_SDHCI_ATMEL=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_AT91PIO4=y
CONFIG_DM_SERIAL=y
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index 9fc8aa2c8d..ea51293706 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -47,6 +47,8 @@ CONFIG_MMC_SDHCI_ATMEL=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
+CONFIG_DM_ETH=y
+CONFIG_MACB=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_AT91PIO4=y
CONFIG_DM_SERIAL=y
diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h
index ccbcc765c3..a257ff0683 100644
--- a/include/configs/sama5d2_xplained.h
+++ b/include/configs/sama5d2_xplained.h
@@ -38,21 +38,10 @@
/* NAND flash */
#undef CONFIG_CMD_NAND
-/* USB device */
-#define CONFIG_USB_ETHER
-#define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_MANUFACTURER "Atmel SAMA5D2 XPlained"
-
/* I2C */
#define AT24MAC_ADDR 0x5c
#define AT24MAC_REG 0x9a
-/* Ethernet Hardware */
-#define CONFIG_MACB
-#define CONFIG_RMII
-#define CONFIG_NET_RETRY_COUNT 20
-#define CONFIG_MACB_SEARCH_PHY
-
/* LCD */
#ifdef CONFIG_LCD
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 4/7] board: sama5d2_xplained: clean up macb init code
2017-03-23 6:26 [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves Wenyou Yang
` (2 preceding siblings ...)
2017-03-23 6:26 ` [U-Boot] [PATCH 3/7] configs: sama5d2_xplained: enable CONFIG_DM_ETH Wenyou Yang
@ 2017-03-23 6:26 ` Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 5/7] board: sama5d2_xplained: remove uart1 init Wenyou Yang
` (2 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Wenyou Yang @ 2017-03-23 6:26 UTC (permalink / raw)
To: u-boot
Because the MACB driver supports the driver model and device tree,
the pins configuration and clock enabling are handled by the
pinctrl driver and clock driver, remove this hardcoded init code.
The USB Ether init code is removed as well.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 43 -------------------------
1 file changed, 43 deletions(-)
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index c5337af4de..5f38ebc2d2 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -12,15 +12,12 @@
#include <i2c.h>
#include <lcd.h>
#include <mmc.h>
-#include <net.h>
-#include <netdev.h>
#include <spi.h>
#include <version.h>
#include <asm/io.h>
#include <asm/arch/at91_common.h>
#include <asm/arch/atmel_pio4.h>
#include <asm/arch/atmel_mpddrc.h>
-#include <asm/arch/atmel_usba_udc.h>
#include <asm/arch/atmel_sdhci.h>
#include <asm/arch/clk.h>
#include <asm/arch/gpio.h>
@@ -118,22 +115,6 @@ void lcd_show_board_info(void)
#endif /* CONFIG_LCD_INFO */
#endif /* CONFIG_LCD */
-static void board_gmac_hw_init(void)
-{
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 14, 0); /* GTXCK */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 15, 0); /* GTXEN */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 16, 0); /* GRXDV */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 17, 0); /* GRXER */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 18, 0); /* GRX0 */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 19, 0); /* GRX1 */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 20, 0); /* GTX0 */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 21, 0); /* GTX1 */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 22, 0); /* GMDC */
- atmel_pio4_set_f_periph(AT91_PIO_PORTB, 23, 0); /* GMDIO */
-
- at91_periph_clk_enable(ATMEL_ID_GMAC);
-}
-
static void board_uart1_hw_init(void)
{
atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1); /* URXD1 */
@@ -167,18 +148,12 @@ int board_init(void)
/* address of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
-#ifdef CONFIG_MACB
- board_gmac_hw_init();
-#endif
#ifdef CONFIG_LCD
board_lcd_hw_init();
#endif
#ifdef CONFIG_CMD_USB
board_usb_hw_init();
#endif
-#ifdef CONFIG_USB_GADGET_ATMEL_USBA
- at91_udp_hw_init();
-#endif
return 0;
}
@@ -190,24 +165,6 @@ int dram_init(void)
return 0;
}
-int board_eth_init(bd_t *bis)
-{
- int rc = 0;
-
-#ifdef CONFIG_MACB
- rc = macb_eth_initialize(0, (void *)ATMEL_BASE_GMAC, 0x00);
-#endif
-
-#ifdef CONFIG_USB_GADGET_ATMEL_USBA
- usba_udc_probe(&pdata);
-#ifdef CONFIG_USB_ETH_RNDIS
- usb_eth_initialize(bis);
-#endif
-#endif
-
- return rc;
-}
-
#ifdef CONFIG_CMD_I2C
static int set_ethaddr_from_eeprom(void)
{
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/7] board: sama5d2_xplained: remove uart1 init
2017-03-23 6:26 [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves Wenyou Yang
` (3 preceding siblings ...)
2017-03-23 6:26 ` [U-Boot] [PATCH 4/7] board: sama5d2_xplained: clean up macb init code Wenyou Yang
@ 2017-03-23 6:26 ` Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 6/7] board: sama5d2_xplained: remove unnecessary header files Wenyou Yang
2017-03-23 6:26 ` [U-Boot] [PATCH 7/7] configs: sama5d2_xplained: update for SPL Wenyou Yang
6 siblings, 1 reply; 15+ messages in thread
From: Wenyou Yang @ 2017-03-23 6:26 UTC (permalink / raw)
To: u-boot
Due to the pin configuration and clock enabling is handling by the
driver, remove the unneeded hardcode uart1 init during
board_early_init_f stage.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index 5f38ebc2d2..c23cb0ecdd 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -115,6 +115,7 @@ void lcd_show_board_info(void)
#endif /* CONFIG_LCD_INFO */
#endif /* CONFIG_LCD */
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
static void board_uart1_hw_init(void)
{
atmel_pio4_set_a_periph(AT91_PIO_PORTD, 2, 1); /* URXD1 */
@@ -123,7 +124,6 @@ static void board_uart1_hw_init(void)
at91_periph_clk_enable(ATMEL_ID_UART1);
}
-#ifdef CONFIG_DEBUG_UART_BOARD_INIT
void board_debug_uart_init(void)
{
board_uart1_hw_init();
@@ -135,8 +135,6 @@ int board_early_init_f(void)
{
#ifdef CONFIG_DEBUG_UART
debug_uart_init();
-#else
- board_uart1_hw_init();
#endif
return 0;
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 6/7] board: sama5d2_xplained: remove unnecessary header files
2017-03-23 6:26 [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves Wenyou Yang
` (4 preceding siblings ...)
2017-03-23 6:26 ` [U-Boot] [PATCH 5/7] board: sama5d2_xplained: remove uart1 init Wenyou Yang
@ 2017-03-23 6:26 ` Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 7/7] configs: sama5d2_xplained: update for SPL Wenyou Yang
6 siblings, 1 reply; 15+ messages in thread
From: Wenyou Yang @ 2017-03-23 6:26 UTC (permalink / raw)
To: u-boot
Remove the unnecessary header files.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
index c23cb0ecdd..48f45b35ce 100644
--- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c
+++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c
@@ -11,8 +11,6 @@
#include <dm.h>
#include <i2c.h>
#include <lcd.h>
-#include <mmc.h>
-#include <spi.h>
#include <version.h>
#include <asm/io.h>
#include <asm/arch/at91_common.h>
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 7/7] configs: sama5d2_xplained: update for SPL
2017-03-23 6:26 [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves Wenyou Yang
` (5 preceding siblings ...)
2017-03-23 6:26 ` [U-Boot] [PATCH 6/7] board: sama5d2_xplained: remove unnecessary header files Wenyou Yang
@ 2017-03-23 6:26 ` Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
6 siblings, 1 reply; 15+ messages in thread
From: Wenyou Yang @ 2017-03-23 6:26 UTC (permalink / raw)
To: u-boot
Enable config options to support the SPL, increase the malloc
memory size for the SPL and board_init_f stage and increase
the memory space for the SPL binary.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
configs/sama5d2_xplained_mmc_defconfig | 8 +++++++-
configs/sama5d2_xplained_spiflash_defconfig | 7 ++++++-
include/configs/sama5d2_xplained.h | 8 ++++----
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index 8378c4e8b5..f064a43c6b 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -8,12 +8,15 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_FAT_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
CONFIG_FIT=y
CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
CONFIG_BOOTDELAY=3
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_SPL=y
+CONFIG_SPL_SEPARATE_BSS=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMI is not set
@@ -30,8 +33,10 @@ CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
CONFIG_DM=y
CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
CONFIG_CLK_AT91=y
@@ -51,12 +56,13 @@ CONFIG_SPI_FLASH_ATMEL=y
CONFIG_DM_ETH=y
CONFIG_MACB=y
CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_AT91PIO4=y
CONFIG_DM_SERIAL=y
CONFIG_DEBUG_UART=y
CONFIG_DEBUG_UART_ATMEL=y
CONFIG_DEBUG_UART_BASE=0xf8020000
-CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_DEBUG_UART_CLOCK=83000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index ea51293706..70a17ed135 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -4,9 +4,11 @@ CONFIG_TARGET_SAMA5D2_XPLAINED=y
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
CONFIG_FIT=y
CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
@@ -29,8 +31,10 @@ CONFIG_CMD_PING=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
+CONFIG_OF_SPL_REMOVE_PROPS="interrupts interrupt-parent dmas dma-names"
CONFIG_DM=y
CONFIG_SPL_DM=y
+CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_CLK=y
CONFIG_SPL_CLK=y
CONFIG_CLK_AT91=y
@@ -50,12 +54,13 @@ CONFIG_SPI_FLASH_ATMEL=y
CONFIG_DM_ETH=y
CONFIG_MACB=y
CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_AT91PIO4=y
CONFIG_DM_SERIAL=y
CONFIG_DEBUG_UART=y
CONFIG_DEBUG_UART_ATMEL=y
CONFIG_DEBUG_UART_BASE=0xf8020000
-CONFIG_DEBUG_UART_CLOCK=0
+CONFIG_DEBUG_UART_CLOCK=83000000
CONFIG_DEBUG_UART_BOARD_INIT=y
CONFIG_DEBUG_UART_ANNOUNCE=y
CONFIG_ATMEL_USART=y
diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h
index a257ff0683..d16a66ee67 100644
--- a/include/configs/sama5d2_xplained.h
+++ b/include/configs/sama5d2_xplained.h
@@ -20,10 +20,10 @@
#define CONFIG_SYS_SDRAM_SIZE 0x20000000
#ifdef CONFIG_SPL_BUILD
-#define CONFIG_SYS_INIT_SP_ADDR 0x210000
+#define CONFIG_SYS_INIT_SP_ADDR 0x218000
#else
#define CONFIG_SYS_INIT_SP_ADDR \
- (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
+ (CONFIG_SYS_SDRAM_BASE + 16 * 1024 - GENERATED_GBL_DATA_SIZE)
#endif
#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
@@ -74,7 +74,7 @@
/* SPL */
#define CONFIG_SPL_FRAMEWORK
#define CONFIG_SPL_TEXT_BASE 0x200000
-#define CONFIG_SPL_MAX_SIZE 0x10000
+#define CONFIG_SPL_MAX_SIZE 0x18000
#define CONFIG_SPL_BSS_START_ADDR 0x20000000
#define CONFIG_SPL_BSS_MAX_SIZE 0x80000
#define CONFIG_SYS_SPL_MALLOC_START 0x20080000
@@ -90,7 +90,7 @@
#elif CONFIG_SYS_USE_SERIALFLASH
#define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x8000
+#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x10000
#endif
--
2.11.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 7/7] configs: sama5d2_xplained: update for SPL
2017-03-23 6:26 ` [U-Boot] [PATCH 7/7] configs: sama5d2_xplained: update for SPL Wenyou Yang
@ 2017-04-22 3:07 ` sjg at google.com
0 siblings, 0 replies; 15+ messages in thread
From: sjg at google.com @ 2017-04-22 3:07 UTC (permalink / raw)
To: u-boot
Enable config options to support the SPL, increase the malloc
memory size for the SPL and board_init_f stage and increase
the memory space for the SPL binary.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
configs/sama5d2_xplained_mmc_defconfig | 8 +++++++-
configs/sama5d2_xplained_spiflash_defconfig | 7 ++++++-
include/configs/sama5d2_xplained.h | 8 ++++----
3 files changed, 17 insertions(+), 6 deletions(-)
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 6/7] board: sama5d2_xplained: remove unnecessary header files
2017-03-23 6:26 ` [U-Boot] [PATCH 6/7] board: sama5d2_xplained: remove unnecessary header files Wenyou Yang
@ 2017-04-22 3:07 ` sjg at google.com
0 siblings, 0 replies; 15+ messages in thread
From: sjg at google.com @ 2017-04-22 3:07 UTC (permalink / raw)
To: u-boot
Remove the unnecessary header files.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 2 --
1 file changed, 2 deletions(-)
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/7] board: sama5d2_xplained: remove uart1 init
2017-03-23 6:26 ` [U-Boot] [PATCH 5/7] board: sama5d2_xplained: remove uart1 init Wenyou Yang
@ 2017-04-22 3:07 ` sjg at google.com
0 siblings, 0 replies; 15+ messages in thread
From: sjg at google.com @ 2017-04-22 3:07 UTC (permalink / raw)
To: u-boot
Due to the pin configuration and clock enabling is handling by the
driver, remove the unneeded hardcode uart1 init during
board_early_init_f stage.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/7] configs: sama5d2_xplained: enable CONFIG_DM_ETH
2017-03-23 6:26 ` [U-Boot] [PATCH 3/7] configs: sama5d2_xplained: enable CONFIG_DM_ETH Wenyou Yang
@ 2017-04-22 3:07 ` sjg at google.com
0 siblings, 0 replies; 15+ messages in thread
From: sjg at google.com @ 2017-04-22 3:07 UTC (permalink / raw)
To: u-boot
Enable CONFIG_DM_ETH to make MACB to support driver model.
Because the USB Ether doesn't support driver model so far,
remove this feature.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
configs/sama5d2_xplained_mmc_defconfig | 2 ++
configs/sama5d2_xplained_spiflash_defconfig | 2 ++
include/configs/sama5d2_xplained.h | 11 -----------
3 files changed, 4 insertions(+), 11 deletions(-)
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 4/7] board: sama5d2_xplained: clean up macb init code
2017-03-23 6:26 ` [U-Boot] [PATCH 4/7] board: sama5d2_xplained: clean up macb init code Wenyou Yang
@ 2017-04-22 3:07 ` sjg at google.com
0 siblings, 0 replies; 15+ messages in thread
From: sjg at google.com @ 2017-04-22 3:07 UTC (permalink / raw)
To: u-boot
Because the MACB driver supports the driver model and device tree,
the pins configuration and clock enabling are handled by the
pinctrl driver and clock driver, remove this hardcoded init code.
The USB Ether init code is removed as well.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
board/atmel/sama5d2_xplained/sama5d2_xplained.c | 43 -------------------------
1 file changed, 43 deletions(-)
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 2/7] ARM: dts: sama5d2_xplained: update for SPL
2017-03-23 6:26 ` [U-Boot] [PATCH 2/7] ARM: dts: sama5d2_xplained: update for SPL Wenyou Yang
@ 2017-04-22 3:07 ` sjg at google.com
0 siblings, 0 replies; 15+ messages in thread
From: sjg at google.com @ 2017-04-22 3:07 UTC (permalink / raw)
To: u-boot
Add the "u-boot,dm-pre-reloc" property to determine which nodes
which are needed by SPL and by the board_init_f stage.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
arch/arm/dts/at91-sama5d2_xplained.dts | 12 ++++++++++++
arch/arm/dts/sama5d2.dtsi | 20 ++++++++++++++++++++
2 files changed, 32 insertions(+)
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/7] ARM: dts: sama5d2: add clock property for uart1 node
2017-03-23 6:26 ` [U-Boot] [PATCH 1/7] ARM: dts: sama5d2: add clock property for uart1 node Wenyou Yang
@ 2017-04-22 3:07 ` sjg at google.com
0 siblings, 0 replies; 15+ messages in thread
From: sjg at google.com @ 2017-04-22 3:07 UTC (permalink / raw)
To: u-boot
Add clock property for uart1 node.
Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
---
arch/arm/dts/sama5d2.dtsi | 2 ++
1 file changed, 2 insertions(+)
Applied to u-boot-dm/next, thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-04-22 3:07 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 6:26 [U-Boot] [PATCH 0/7] board: sama5d2_xplained: improves Wenyou Yang
2017-03-23 6:26 ` [U-Boot] [PATCH 1/7] ARM: dts: sama5d2: add clock property for uart1 node Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 2/7] ARM: dts: sama5d2_xplained: update for SPL Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 3/7] configs: sama5d2_xplained: enable CONFIG_DM_ETH Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 4/7] board: sama5d2_xplained: clean up macb init code Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 5/7] board: sama5d2_xplained: remove uart1 init Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 6/7] board: sama5d2_xplained: remove unnecessary header files Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
2017-03-23 6:26 ` [U-Boot] [PATCH 7/7] configs: sama5d2_xplained: update for SPL Wenyou Yang
2017-04-22 3:07 ` sjg at google.com
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.