[PATCH 0/6] siemens,am335x: clean up the draco board family

The boards were not maintained upstream since the development phase.
Restore SPL and remove unused settings. We need i2c to read the DDR settings from EEPROM, get u-boot from NAND, the console output and the watchdog.
Restore u-boot up to the user prompt. The complete functionality will be restored in future patches.
Signed-off-by: Enrico Leto enrico.leto@siemens.com --- Enrico Leto (6): siemens,am335x: clean-up draco targets configs: draco: remove spi flash support configs: thuban, rastaban: remove emmc configs: draco: remove unused resources from spl configs: draco: disable misc init configs: draco: restore clock driver
arch/arm/mach-omap2/am33xx/Kconfig | 9 -- board/siemens/draco/Kconfig | 22 +-- board/siemens/draco/MAINTAINERS | 15 +-- ...tamin_defconfig => draco-etamin_defconfig} | 13 +- ...ban_defconfig => draco-rastaban_defconfig} | 19 +-- ...huban_defconfig => draco-thuban_defconfig} | 19 +-- configs/draco_defconfig | 127 ------------------ include/configs/{etamin.h => draco-etamin.h} | 0 .../configs/{rastaban.h => draco-rastaban.h} | 0 include/configs/{thuban.h => draco-thuban.h} | 0 include/configs/draco.h | 41 ------ 11 files changed, 20 insertions(+), 245 deletions(-) rename configs/{etamin_defconfig => draco-etamin_defconfig} (92%) rename configs/{rastaban_defconfig => draco-rastaban_defconfig} (90%) rename configs/{thuban_defconfig => draco-thuban_defconfig} (89%) delete mode 100644 configs/draco_defconfig rename include/configs/{etamin.h => draco-etamin.h} (100%) rename include/configs/{rastaban.h => draco-rastaban.h} (100%) rename include/configs/{thuban.h => draco-thuban.h} (100%) delete mode 100644 include/configs/draco.h

Draco is a family of 3 boards: thuban, rastaban & etamin. Rename all targets of the family adding the draco- prefix to increase readibility and simplify future commits about concerning all boards of the family.
The name draco was initially used for the first target. It's deprecated since a 2nd target was introduced. Unfortunately the draco target was copied to the thuban target instead to be renamed. Remove it to save unnecessary maintenance effort.
Signed-off-by: Enrico Leto enrico.leto@siemens.com --- arch/arm/mach-omap2/am33xx/Kconfig | 9 -- board/siemens/draco/Kconfig | 22 +-- board/siemens/draco/MAINTAINERS | 15 +-- ...tamin_defconfig => draco-etamin_defconfig} | 0 ...ban_defconfig => draco-rastaban_defconfig} | 0 ...huban_defconfig => draco-thuban_defconfig} | 0 configs/draco_defconfig | 127 ------------------ include/configs/{etamin.h => draco-etamin.h} | 0 .../configs/{rastaban.h => draco-rastaban.h} | 0 include/configs/{thuban.h => draco-thuban.h} | 0 include/configs/draco.h | 41 ------ 11 files changed, 10 insertions(+), 204 deletions(-) rename configs/{etamin_defconfig => draco-etamin_defconfig} (100%) rename configs/{rastaban_defconfig => draco-rastaban_defconfig} (100%) rename configs/{thuban_defconfig => draco-thuban_defconfig} (100%) delete mode 100644 configs/draco_defconfig rename include/configs/{etamin.h => draco-etamin.h} (100%) rename include/configs/{rastaban.h => draco-rastaban.h} (100%) rename include/configs/{thuban.h => draco-thuban.h} (100%) delete mode 100644 include/configs/draco.h
diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig index 8cb0c57163b..bd5129b04e0 100644 --- a/arch/arm/mach-omap2/am33xx/Kconfig +++ b/arch/arm/mach-omap2/am33xx/Kconfig @@ -105,15 +105,6 @@ config TARGET_CHILIBOARD select DM_SERIAL imply CMD_DM
-config TARGET_DRACO - bool "Support draco" - select BOARD_LATE_INIT - select DM - select DM_GPIO - select DM_SERIAL - select FACTORYSET - imply CMD_DM - config TARGET_ETAMIN bool "Support etamin" select BOARD_LATE_INIT diff --git a/board/siemens/draco/Kconfig b/board/siemens/draco/Kconfig index 1eb8a4886f4..0cdf5bc9812 100644 --- a/board/siemens/draco/Kconfig +++ b/board/siemens/draco/Kconfig @@ -1,19 +1,3 @@ -if TARGET_DRACO - -config SYS_BOARD - default "draco" - -config SYS_VENDOR - default "siemens" - -config SYS_SOC - default "am33xx" - -config SYS_CONFIG_NAME - default "draco" - -endif - if TARGET_THUBAN
config SYS_BOARD @@ -26,7 +10,7 @@ config SYS_SOC default "am33xx"
config SYS_CONFIG_NAME - default "thuban" + default "draco-thuban"
endif
@@ -42,7 +26,7 @@ config SYS_SOC default "am33xx"
config SYS_CONFIG_NAME - default "rastaban" + default "draco-rastaban"
endif
@@ -58,7 +42,7 @@ config SYS_SOC default "am33xx"
config SYS_CONFIG_NAME - default "etamin" + default "draco-etamin"
config NAND_CS_INIT def_bool y diff --git a/board/siemens/draco/MAINTAINERS b/board/siemens/draco/MAINTAINERS index c73f18c002f..82e01eb62ed 100644 --- a/board/siemens/draco/MAINTAINERS +++ b/board/siemens/draco/MAINTAINERS @@ -1,11 +1,10 @@ DRACO BOARD -M: Samuel Egli samuel.egli@siemens.com +M: Enrico Leto enrico.leto@siemens.com S: Maintained F: board/siemens/draco/ -F: include/configs/draco.h -F: configs/draco_defconfig -F: configs/etamin_defconfig -F: include/configs/thuban.h -F: configs/thuban_defconfig -F: include/configs/rastaban.h -F: configs/rastaban_defconfig +F: configs/draco-etamin_defconfig +F: configs/draco-rastaban_defconfig +F: configs/draco-thuban_defconfig +F: include/configs/draco-etamin.h +F: include/configs/draco-rastaban.h +F: include/configs/draco-thuban.h diff --git a/configs/etamin_defconfig b/configs/draco-etamin_defconfig similarity index 100% rename from configs/etamin_defconfig rename to configs/draco-etamin_defconfig diff --git a/configs/rastaban_defconfig b/configs/draco-rastaban_defconfig similarity index 100% rename from configs/rastaban_defconfig rename to configs/draco-rastaban_defconfig diff --git a/configs/thuban_defconfig b/configs/draco-thuban_defconfig similarity index 100% rename from configs/thuban_defconfig rename to configs/draco-thuban_defconfig diff --git a/configs/draco_defconfig b/configs/draco_defconfig deleted file mode 100644 index ee19920a703..00000000000 --- a/configs/draco_defconfig +++ /dev/null @@ -1,127 +0,0 @@ -CONFIG_ARM=y -CONFIG_ARCH_OMAP2PLUS=y -CONFIG_TEXT_BASE=0x80100000 -CONFIG_SYS_MALLOC_LEN=0x1000000 -CONFIG_SPL_GPIO=y -CONFIG_SPL_LIBCOMMON_SUPPORT=y -CONFIG_SPL_LIBGENERIC_SUPPORT=y -CONFIG_NR_DRAM_BANKS=1 -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4030ff00 -CONFIG_ENV_SIZE=0x2000 -CONFIG_SPL_DM_SPI=y -CONFIG_DEFAULT_DEVICE_TREE="am335x-draco" -CONFIG_AM33XX=y -CONFIG_SYS_MPUCLK=300 -CONFIG_TARGET_DRACO=y -CONFIG_SPL_MMC=y -CONFIG_SPL_SERIAL=y -CONFIG_BOOTCOUNT_BOOTLIMIT=3 -CONFIG_SPL=y -CONFIG_ENV_OFFSET_REDUND=0x2E0000 -CONFIG_SPL_FS_FAT=y -CONFIG_SPL_LIBDISK_SUPPORT=y -CONFIG_SPL_SPI_FLASH_SUPPORT=y -CONFIG_SPL_SPI=y -CONFIG_SYS_LOAD_ADDR=0x81000000 -CONFIG_ENV_VARS_UBOOT_CONFIG=y -CONFIG_BOOTDELAY=3 -CONFIG_AUTOBOOT_KEYED=y -CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press "<Esc><Esc>" to stop\n" -CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b" -CONFIG_BOOT_RETRY=y -CONFIG_BOOT_RETRY_TIME=60 -CONFIG_RESET_TO_RETRY=y -CONFIG_USE_PREBOOT=y -CONFIG_SYS_CONSOLE_INFO_QUIET=y -# CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_ARCH_MISC_INIT=y -CONFIG_SPL_BSS_START_ADDR=0x80000000 -CONFIG_SPL_SYS_MALLOC=y -CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y -CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x80208000 -CONFIG_SPL_I2C=y -CONFIG_SPL_NAND_DRIVERS=y -CONFIG_SPL_NAND_ECC=y -CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_DM_SPI_FLASH=y -CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 -CONFIG_SPL_WATCHDOG=y -CONFIG_SPL_YMODEM_SUPPORT=y -# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set -CONFIG_HUSH_PARSER=y -CONFIG_SYS_PROMPT="U-Boot# " -CONFIG_SYS_MAXARGS=32 -CONFIG_SYS_PBSIZE=1049 -CONFIG_CMD_ASKENV=y -CONFIG_CMD_DFU=y -# CONFIG_CMD_FLASH is not set -CONFIG_CMD_GPIO=y -CONFIG_CMD_I2C=y -CONFIG_CMD_MMC=y -CONFIG_CMD_NAND=y -CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -CONFIG_BOOTP_DNS2=y -CONFIG_CMD_MII=y -CONFIG_CMD_PING=y -CONFIG_CMD_CACHE=y -CONFIG_CMD_TIME=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0" -CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:128k(spl),128k(spl.backup1),128k(spl.backup2),128k(spl.backup3),1920k(u-boot),512k(u-boot.env0),512k(u-boot.env1),512k(mtdoops),-(rootfs)" -CONFIG_CMD_UBI=y -CONFIG_OF_CONTROL=y -CONFIG_SPL_OF_CONTROL=y -CONFIG_OF_EMBED=y -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_NAND=y -CONFIG_ENV_RANGE=0x80000 -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_NET_RETRY_COUNT=10 -CONFIG_BOOTP_SEND_HOSTNAME=y -CONFIG_USE_ROOTPATH=y -CONFIG_ROOTPATH="/opt/eldk" -CONFIG_SPL_DM=y -# CONFIG_SPL_BLK is not set -CONFIG_BOOTCOUNT_LIMIT=y -CONFIG_BOOTCOUNT_ENV=y -CONFIG_DFU_NAND=y -CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 -CONFIG_SYS_I2C_LEGACY=y -CONFIG_SPL_SYS_I2C_LEGACY=y -# CONFIG_SPL_DM_MMC is not set -CONFIG_MMC_OMAP_HS=y -CONFIG_MTD=y -CONFIG_MTD_RAW_NAND=y -CONFIG_SYS_NAND_BLOCK_SIZE=0x20000 -CONFIG_SYS_NAND_ONFI_DETECTION=y -CONFIG_SYS_NAND_PAGE_COUNT=0x40 -CONFIG_SYS_NAND_PAGE_SIZE=0x800 -CONFIG_SYS_NAND_OOBSIZE=0x40 -CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y -CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 -CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_WINBOND=y -CONFIG_MTD_UBI_FASTMAP=y -CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1 -CONFIG_PHY_SMSC=y -CONFIG_DRIVER_TI_CPSW=y -CONFIG_SPI=y -CONFIG_DM_SPI=y -CONFIG_OMAP3_SPI=y -CONFIG_USB=y -# CONFIG_SPL_DM_USB is not set -CONFIG_USB_MUSB_HOST=y -CONFIG_USB_MUSB_GADGET=y -CONFIG_USB_MUSB_DSPS=y -CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="Siemens AG" -CONFIG_USB_GADGET_VENDOR_NUM=0x0908 -CONFIG_USB_GADGET_PRODUCT_NUM=0x02d2 -CONFIG_USB_GADGET_DOWNLOAD=y -CONFIG_USB_ETHER=y diff --git a/include/configs/etamin.h b/include/configs/draco-etamin.h similarity index 100% rename from include/configs/etamin.h rename to include/configs/draco-etamin.h diff --git a/include/configs/rastaban.h b/include/configs/draco-rastaban.h similarity index 100% rename from include/configs/rastaban.h rename to include/configs/draco-rastaban.h diff --git a/include/configs/thuban.h b/include/configs/draco-thuban.h similarity index 100% rename from include/configs/thuban.h rename to include/configs/draco-thuban.h diff --git a/include/configs/draco.h b/include/configs/draco.h deleted file mode 100644 index 4c67174572f..00000000000 --- a/include/configs/draco.h +++ /dev/null @@ -1,41 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2013 Siemens Schweiz AG - * (C) Heiko Schocher, DENX Software Engineering, hs@denx.de. - * - * Based on: - * U-Boot file:/include/configs/am335x_evm.h - * - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ - */ - -#ifndef __CONFIG_DRACO_H -#define __CONFIG_DRACO_H - -#include "siemens-am33x-common.h" - -#define DDR_PLL_FREQ 303 - -#define BOARD_DFU_BUTTON_GPIO 27 /* Use as default */ -#define GPIO_LAN9303_NRST 88 /* GPIO2_24 = gpio88 */ - -#define CFG_ENV_SETTINGS_BUTTONS_AND_LEDS \ - "button_dfu0=27\0" \ - "led0=103,1,0\0" \ - "led1=64,0,1\0" - - /* Physical Memory Map */ -#define CFG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */ - -/* Default env settings */ -#define CFG_EXTRA_ENV_SETTINGS \ - "hostname=draco\0" \ - "ubi_off=2048\0"\ - "nand_img_size=0x400000\0" \ - "optargs=\0" \ - "preboot=draco_led 0\0" \ - CFG_ENV_SETTINGS_BUTTONS_AND_LEDS \ - CFG_ENV_SETTINGS_V2 \ - CFG_ENV_SETTINGS_NAND_V2 - -#endif /* ! __CONFIG_DRACO_H */

On Wed, Nov 08, 2023 at 03:53:17PM +0100, Enrico Leto wrote:
Draco is a family of 3 boards: thuban, rastaban & etamin. Rename all targets of the family adding the draco- prefix to increase readibility and simplify future commits about concerning all boards of the family.
The name draco was initially used for the first target. It's deprecated since a 2nd target was introduced. Unfortunately the draco target was copied to the thuban target instead to be renamed. Remove it to save unnecessary maintenance effort.
Signed-off-by: Enrico Leto enrico.leto@siemens.com
For the series, applied to u-boot/next, thanks!

The SPI FLASH was set in the early development phase for evaluations. Any target use it anymore.
Signed-off-by: Enrico Leto enrico.leto@siemens.com --- configs/draco-etamin_defconfig | 6 ------ configs/draco-rastaban_defconfig | 6 ------ configs/draco-thuban_defconfig | 6 ------ 3 files changed, 18 deletions(-)
diff --git a/configs/draco-etamin_defconfig b/configs/draco-etamin_defconfig index c0ce7a33569..3f9e91810ed 100644 --- a/configs/draco-etamin_defconfig +++ b/configs/draco-etamin_defconfig @@ -22,7 +22,6 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xB80000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y -CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_ENV_VARS_UBOOT_CONFIG=y @@ -45,9 +44,6 @@ CONFIG_SPL_I2C=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_DM_SPI_FLASH=y -CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 CONFIG_SPL_WATCHDOG=y CONFIG_SPL_YMODEM_SUPPORT=y # CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set @@ -109,8 +105,6 @@ CONFIG_SYS_NAND_PAGE_SIZE=0x1000 CONFIG_SYS_NAND_OOBSIZE=0xe0 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x200000 -CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_WINBOND=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1 CONFIG_PHY_SMSC=y diff --git a/configs/draco-rastaban_defconfig b/configs/draco-rastaban_defconfig index 9f538a2f83d..994d0c81827 100644 --- a/configs/draco-rastaban_defconfig +++ b/configs/draco-rastaban_defconfig @@ -21,7 +21,6 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x2E0000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y -CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_ENV_VARS_UBOOT_CONFIG=y @@ -44,9 +43,6 @@ CONFIG_SPL_I2C=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_DM_SPI_FLASH=y -CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 CONFIG_SPL_WATCHDOG=y CONFIG_SPL_YMODEM_SUPPORT=y # CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set @@ -105,8 +101,6 @@ CONFIG_SYS_NAND_PAGE_SIZE=0x800 CONFIG_SYS_NAND_OOBSIZE=0x40 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 -CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_WINBOND=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1 CONFIG_PHY_SMSC=y diff --git a/configs/draco-thuban_defconfig b/configs/draco-thuban_defconfig index 116700e0df0..4fd5865115d 100644 --- a/configs/draco-thuban_defconfig +++ b/configs/draco-thuban_defconfig @@ -21,7 +21,6 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x2E0000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y -CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_ENV_VARS_UBOOT_CONFIG=y @@ -44,9 +43,6 @@ CONFIG_SPL_I2C=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y CONFIG_SPL_NAND_BASE=y -CONFIG_SPL_DM_SPI_FLASH=y -CONFIG_SPL_SPI_LOAD=y -CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000 CONFIG_SPL_WATCHDOG=y CONFIG_SPL_YMODEM_SUPPORT=y # CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set @@ -105,8 +101,6 @@ CONFIG_SYS_NAND_PAGE_SIZE=0x800 CONFIG_SYS_NAND_OOBSIZE=0x40 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000 -CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_WINBOND=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1 CONFIG_PHY_SMSC=y

These targets use NAND FLASH only. Maybe some MMC definitions were added by trying MMC for the etamin target evaluation and were not removed.
Signed-off-by: Enrico Leto enrico.leto@siemens.com --- configs/draco-rastaban_defconfig | 6 ++---- configs/draco-thuban_defconfig | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/configs/draco-rastaban_defconfig b/configs/draco-rastaban_defconfig index 994d0c81827..218177b6d97 100644 --- a/configs/draco-rastaban_defconfig +++ b/configs/draco-rastaban_defconfig @@ -14,7 +14,6 @@ CONFIG_DEFAULT_DEVICE_TREE="am335x-draco" CONFIG_AM33XX=y CONFIG_SYS_MPUCLK=300 CONFIG_TARGET_RASTABAN=y -CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y CONFIG_BOOTCOUNT_BOOTLIMIT=3 CONFIG_SPL=y @@ -39,6 +38,7 @@ CONFIG_SPL_BSS_START_ADDR=0x80000000 CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x80208000 +# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set CONFIG_SPL_I2C=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y @@ -55,7 +55,6 @@ CONFIG_CMD_DFU=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y -CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set @@ -90,8 +89,7 @@ CONFIG_DFU_NAND=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 CONFIG_SYS_I2C_LEGACY=y CONFIG_SPL_SYS_I2C_LEGACY=y -# CONFIG_SPL_DM_MMC is not set -CONFIG_MMC_OMAP_HS=y +# CONFIG_MMC is not set CONFIG_MTD=y CONFIG_MTD_RAW_NAND=y CONFIG_SYS_NAND_BLOCK_SIZE=0x20000 diff --git a/configs/draco-thuban_defconfig b/configs/draco-thuban_defconfig index 4fd5865115d..80841135229 100644 --- a/configs/draco-thuban_defconfig +++ b/configs/draco-thuban_defconfig @@ -14,7 +14,6 @@ CONFIG_DEFAULT_DEVICE_TREE="am335x-draco" CONFIG_AM33XX=y CONFIG_SYS_MPUCLK=300 CONFIG_TARGET_THUBAN=y -CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y CONFIG_BOOTCOUNT_BOOTLIMIT=3 CONFIG_SPL=y @@ -39,6 +38,7 @@ CONFIG_SPL_BSS_START_ADDR=0x80000000 CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x80208000 +# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set CONFIG_SPL_I2C=y CONFIG_SPL_NAND_DRIVERS=y CONFIG_SPL_NAND_ECC=y @@ -55,7 +55,6 @@ CONFIG_CMD_DFU=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y -CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set @@ -90,8 +89,7 @@ CONFIG_DFU_NAND=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 CONFIG_SYS_I2C_LEGACY=y CONFIG_SPL_SYS_I2C_LEGACY=y -# CONFIG_SPL_DM_MMC is not set -CONFIG_MMC_OMAP_HS=y +# CONFIG_MMC is not set CONFIG_MTD=y CONFIG_MTD_RAW_NAND=y CONFIG_SYS_NAND_BLOCK_SIZE=0x20000

We don't need device tree, GPIO & SPI in SPL.
Signed-off-by: Enrico Leto enrico.leto@siemens.com --- configs/draco-etamin_defconfig | 4 ---- configs/draco-rastaban_defconfig | 4 ---- configs/draco-thuban_defconfig | 4 ---- 3 files changed, 12 deletions(-)
diff --git a/configs/draco-etamin_defconfig b/configs/draco-etamin_defconfig index 3f9e91810ed..7814e125c29 100644 --- a/configs/draco-etamin_defconfig +++ b/configs/draco-etamin_defconfig @@ -2,7 +2,6 @@ CONFIG_ARM=y CONFIG_ARCH_OMAP2PLUS=y CONFIG_TEXT_BASE=0x80100000 CONFIG_SYS_MALLOC_LEN=0x1000000 -CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 @@ -10,7 +9,6 @@ CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4030ff00 CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x980000 -CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="am335x-draco" CONFIG_AM33XX=y CONFIG_SYS_MPUCLK=300 @@ -22,7 +20,6 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0xB80000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y -CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_BOOTDELAY=3 @@ -72,7 +69,6 @@ CONFIG_MTDIDS_DEFAULT="nand2=omap2-nand_concat" CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand_concat:512k(spl),512k(spl.backup1),512k(spl.backup2),512k(spl.backup3),7680k(u-boot),2048k(u-boot.env0),2048k(u-boot.env1),2048k(mtdoops),-(rootfs)" CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y -CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y diff --git a/configs/draco-rastaban_defconfig b/configs/draco-rastaban_defconfig index 218177b6d97..2460182b12c 100644 --- a/configs/draco-rastaban_defconfig +++ b/configs/draco-rastaban_defconfig @@ -2,14 +2,12 @@ CONFIG_ARM=y CONFIG_ARCH_OMAP2PLUS=y CONFIG_TEXT_BASE=0x80100000 CONFIG_SYS_MALLOC_LEN=0x1000000 -CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4030ff00 CONFIG_ENV_SIZE=0x2000 -CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="am335x-draco" CONFIG_AM33XX=y CONFIG_SYS_MPUCLK=300 @@ -20,7 +18,6 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x2E0000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y -CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_BOOTDELAY=3 @@ -70,7 +67,6 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0" CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:128k(spl),128k(spl.backup1),128k(spl.backup2),128k(spl.backup3),1920k(u-boot),512k(u-boot.env0),512k(u-boot.env1),300m(rootfs),512k(mtdoops),-(configuration)" CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y -CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y diff --git a/configs/draco-thuban_defconfig b/configs/draco-thuban_defconfig index 80841135229..766b1596a17 100644 --- a/configs/draco-thuban_defconfig +++ b/configs/draco-thuban_defconfig @@ -2,14 +2,12 @@ CONFIG_ARM=y CONFIG_ARCH_OMAP2PLUS=y CONFIG_TEXT_BASE=0x80100000 CONFIG_SYS_MALLOC_LEN=0x1000000 -CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4030ff00 CONFIG_ENV_SIZE=0x2000 -CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="am335x-draco" CONFIG_AM33XX=y CONFIG_SYS_MPUCLK=300 @@ -20,7 +18,6 @@ CONFIG_SPL=y CONFIG_ENV_OFFSET_REDUND=0x2E0000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y -CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0x81000000 CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_BOOTDELAY=3 @@ -70,7 +67,6 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0" CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:128k(spl),128k(spl.backup1),128k(spl.backup2),128k(spl.backup3),1920k(u-boot),512k(u-boot.env0),512k(u-boot.env1),512k(mtdoops),-(rootfs)" CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y -CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y

The initcall sequence fails at arch_misc_init. Disable misc init until driver model and DT are clean.
Signed-off-by: Enrico Leto enrico.leto@siemens.com --- configs/draco-etamin_defconfig | 1 - configs/draco-rastaban_defconfig | 1 - configs/draco-thuban_defconfig | 1 - 3 files changed, 3 deletions(-)
diff --git a/configs/draco-etamin_defconfig b/configs/draco-etamin_defconfig index 7814e125c29..8180bb004cc 100644 --- a/configs/draco-etamin_defconfig +++ b/configs/draco-etamin_defconfig @@ -32,7 +32,6 @@ CONFIG_RESET_TO_RETRY=y CONFIG_USE_PREBOOT=y CONFIG_SYS_CONSOLE_INFO_QUIET=y # CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_ARCH_MISC_INIT=y CONFIG_SPL_BSS_START_ADDR=0x80000000 CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y diff --git a/configs/draco-rastaban_defconfig b/configs/draco-rastaban_defconfig index 2460182b12c..539ead3d862 100644 --- a/configs/draco-rastaban_defconfig +++ b/configs/draco-rastaban_defconfig @@ -30,7 +30,6 @@ CONFIG_RESET_TO_RETRY=y CONFIG_USE_PREBOOT=y CONFIG_SYS_CONSOLE_INFO_QUIET=y # CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_ARCH_MISC_INIT=y CONFIG_SPL_BSS_START_ADDR=0x80000000 CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y diff --git a/configs/draco-thuban_defconfig b/configs/draco-thuban_defconfig index 766b1596a17..f919754c2e4 100644 --- a/configs/draco-thuban_defconfig +++ b/configs/draco-thuban_defconfig @@ -30,7 +30,6 @@ CONFIG_RESET_TO_RETRY=y CONFIG_USE_PREBOOT=y CONFIG_SYS_CONSOLE_INFO_QUIET=y # CONFIG_DISPLAY_BOARDINFO is not set -CONFIG_ARCH_MISC_INIT=y CONFIG_SPL_BSS_START_ADDR=0x80000000 CONFIG_SPL_SYS_MALLOC=y CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y

Fix 'failed to get fck clock' error on boot. Add missing configs.
Signed-off-by: Enrico Leto enrico.leto@siemens.com --- configs/draco-etamin_defconfig | 2 ++ configs/draco-rastaban_defconfig | 2 ++ configs/draco-thuban_defconfig | 2 ++ 3 files changed, 6 insertions(+)
diff --git a/configs/draco-etamin_defconfig b/configs/draco-etamin_defconfig index 8180bb004cc..eade2297229 100644 --- a/configs/draco-etamin_defconfig +++ b/configs/draco-etamin_defconfig @@ -82,6 +82,8 @@ CONFIG_SPL_DM=y # CONFIG_SPL_BLK is not set CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y +CONFIG_CLK=y +CONFIG_CLK_TI_CTRL=y CONFIG_DFU_NAND=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 CONFIG_SYS_I2C_LEGACY=y diff --git a/configs/draco-rastaban_defconfig b/configs/draco-rastaban_defconfig index 539ead3d862..252cbe3d78e 100644 --- a/configs/draco-rastaban_defconfig +++ b/configs/draco-rastaban_defconfig @@ -80,6 +80,8 @@ CONFIG_SPL_DM=y # CONFIG_SPL_BLK is not set CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y +CONFIG_CLK=y +CONFIG_CLK_TI_CTRL=y CONFIG_DFU_NAND=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 CONFIG_SYS_I2C_LEGACY=y diff --git a/configs/draco-thuban_defconfig b/configs/draco-thuban_defconfig index f919754c2e4..d8b80b83f10 100644 --- a/configs/draco-thuban_defconfig +++ b/configs/draco-thuban_defconfig @@ -80,6 +80,8 @@ CONFIG_SPL_DM=y # CONFIG_SPL_BLK is not set CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y +CONFIG_CLK=y +CONFIG_CLK_TI_CTRL=y CONFIG_DFU_NAND=y CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 CONFIG_SYS_I2C_LEGACY=y

On Wed, Nov 08, 2023 at 03:53:16PM +0100, Enrico Leto wrote:
The boards were not maintained upstream since the development phase.
Restore SPL and remove unused settings. We need i2c to read the DDR settings from EEPROM, get u-boot from NAND, the console output and the watchdog.
Restore u-boot up to the user prompt. The complete functionality will be restored in future patches.
Signed-off-by: Enrico Leto enrico.leto@siemens.com
I'm glad to see this series and in general it looks fine and is a good start. As some parts of the future cleanup work I'd love to see a file under doc/board/siemens for the family and moving to plain text environment, both of which iot2050 do so there's some in-house experience I am hopeful you can leverage as well if needed. It would also be good to reduce the include/configs/ files to as little as possible, I believe there's a number of dead-comments there, and other defines that are only needed in a local context and can move to a specific file or other header. Thanks!

Hello Tom,
On 08.11.23 17:11, Tom Rini wrote:
On Wed, Nov 08, 2023 at 03:53:16PM +0100, Enrico Leto wrote:
The boards were not maintained upstream since the development phase.
Restore SPL and remove unused settings. We need i2c to read the DDR settings from EEPROM, get u-boot from NAND, the console output and the watchdog.
Restore u-boot up to the user prompt. The complete functionality will be restored in future patches.
Signed-off-by: Enrico Leto enrico.leto@siemens.com
I'm glad to see this series and in general it looks fine and is a good start. As some parts of the future cleanup work I'd love to see a file under doc/board/siemens for the family and moving to plain text environment, both of which iot2050 do so there's some in-house experience I am hopeful you can leverage as well if needed. It would also be good to reduce the include/configs/ files to as little as possible, I believe there's a number of dead-comments there, and other defines that are only needed in a local context and can move to a specific file or other header. Thanks!
Yep, good points!
I tried this patchset on my dxr2 thuban board, and see a problem when booting from NAND.
SPL fails to load u-boot.img (wrong ecc calculation)
reverting commit:
commit 04fcd2587321: ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction")
from Roger Quadros rogerq@kernel.org (as for this reason added to cc)
and SPL/U-Boot 2023.10 comes up fine with Enricos patchset!
remark: for plain U-Boot 2023.10 even SPL does not boot, so Enricos patchset is a big step in getting back a working board again, thanks!
So first, I wonder, if there is any am335x based board booting from NAND with the above commit in?
If the above commit is in U-Boot, the following patch helps also to get this board back booting: """ diff --git a/drivers/mtd/nand/raw/omap_gpmc.c b/drivers/mtd/nand/raw/omap_gpmc.c index 1a5ed0de31..d1c73b389c 100644 --- a/drivers/mtd/nand/raw/omap_gpmc.c +++ b/drivers/mtd/nand/raw/omap_gpmc.c @@ -644,7 +644,11 @@ static int omap_correct_data_bch(struct mtd_info *mtd, uint8_t *dat,
/* check calculated ecc */ for (i = 0; i < ecc->bytes && !ecc_flag; i++) { +#ifdef CONFIG_SPL_BUILD + if (calc_ecc[i] != read_ecc[i]) +#else if (calc_ecc[i] != 0x00) +#endif goto not_ecc_match; } return 0; """
but of course, this is not the solution ...
Any ideas are welcome, Thanks!
bye, Heiko
(Damn, that I have not longer automated testing up and running for this board)
participants (3)
-
Enrico Leto
-
Heiko Schocher
-
Tom Rini