[PATCH v2] ARM: Distro boot: document the need for fdtfile variable to be set
From: Dennis Gilmore When testing builds provided in https://github.com/openwrt/openwrt/pull/3360 I discovered that fdtfile was not set and as a result the firmware was not functional. So I am documenting what is needed. Signed-off-by: Dennis Gilmore Cc: Atish Patra Cc: Lukas Auer Cc: Tom Rini Cc: Masahiro Yamada Cc: Vagrant Cascadian Cc: Stephen Warren Cc: Karsten Merker --- doc/README.distro | 11 +++ 1 file changed, 11 insertions(+) diff --git a/doc/README.distro b/doc/README.distro index 5076bebd18..cc1c41ecb3 100644 --- a/doc/README.distro +++ b/doc/README.distro @@ -224,6 +224,17 @@ fdt_addr_r: A size of 1MB for the FDT/DTB seems reasonable. +fdtfile: + + Mandatory. the name of the DTB file for the specific board for instance + the espressobin v5 board the value is "marvell/armada-3720-espressobin.dtb" + while on a clearfog pro it is "armada-388-clearfog-pro.dtb" in the case of + a board providing its firmware based DTB this value can be used to override + the DTB with a different DTB. fdtfile will automatically be set for you if + it matches the format ${soc}-${board}.dtb which covers most 32 bit use cases. + AArch64 generally does not match as the Linux kernel put the dtb files under + SoC vendor directories. + ramdisk_addr_r: Mandatory. The location in RAM where the initial ramdisk will be loaded to -- 2.28.0
[PATCH] sync helios4 config to clearfog and dts to kernel
From: Dennis Gilmore The helios4 is built on the same microsom as the clearfog, by syncing the config we enable the same featureset that exists in the som on the helios4. The current config does not boot as some of the clearfog changes needed to be made on the helios4 also, generally speaking most changes for the clearfog should also be made on the helios4. Signed-off-by: Dennis Gilmore --- arch/arm/dts/armada-388-helios4-u-boot.dtsi | 15 arch/arm/dts/armada-388-helios4.dts | 16 ++-- configs/helios4_defconfig | 20 +++-- include/configs/helios4.h | 95 - 4 files changed, 93 insertions(+), 53 deletions(-) diff --git a/arch/arm/dts/armada-388-helios4-u-boot.dtsi b/arch/arm/dts/armada-388-helios4-u-boot.dtsi index f0da9f42de..0753889854 100644 --- a/arch/arm/dts/armada-388-helios4-u-boot.dtsi +++ b/arch/arm/dts/armada-388-helios4-u-boot.dtsi @@ -14,6 +14,9 @@ &spi1 { u-boot,dm-spl; + spi-flash@0 { + u-boot,dm-spl; + }; }; &w25q32 { @@ -21,6 +24,18 @@ u-boot,dm-spl; }; +&gpio0 { + u-boot,dm-spl; +}; + +&ahci0 { + u-boot,dm-spl; +}; + +&ahci1 { + u-boot,dm-spl; +}; + &sdhci { u-boot,dm-spl; }; diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts index a154e0f4f4..fb49df2a3b 100644 --- a/arch/arm/dts/armada-388-helios4.dts +++ b/arch/arm/dts/armada-388-helios4.dts @@ -140,11 +140,6 @@ soc { internal-regs { i2c@11000 { - clock-frequency = <40>; - pinctrl-0 = <&i2c0_pins>; - pinctrl-names = "default"; - status = "okay"; - /* * PCA9655 GPIO expander, up to 1MHz clock. * 0-Board Revision bit 0 # @@ -187,8 +182,7 @@ gpio-hog; gpios = <5 GPIO_ACTIVE_HIGH>; input; - line-name = - "usb-overcurrent-status"; + line-name = "usb-overcurrent-status"; }; }; @@ -248,7 +242,7 @@ bus-width = <4>; cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; no-1-8-v; - pinctrl-0 = <µsom_sdhci_pins + pinctrl-0 = <&helios_sdhci_pins &helios_sdhci_cd_pins>; pinctrl-names = "default"; status = "okay"; @@ -286,6 +280,12 @@ marvell,pins = "mpp20"; marvell,function = "gpio"; }; + helios_sdhci_pins: helios-sdhci-pins { + marvell,pins = "mpp21", "mpp28", + "mpp37", "mpp38", + "mpp39", "mpp40"; + marvell,function = "sd0"; + }; helios_led_pins: helios-led-pins { marvell,pins = "mpp24", "mpp25", "mpp49", "mpp50", diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index e15f10cdd5..9cc87fd96a 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_CPU_INIT=y +CONFIG_SYS_THUMB_BUILD=y CONFIG_ARCH_MVEBU=y CONFIG_SYS_TEXT_BASE=0x0080 CONFIG_SPL_LIBCOMMON_SUPPORT=y @@ -24,40 +25,47 @@ CONFIG_USE_PREBOOT=y CONFIG_SYS_CONSOLE_INFO_QUIET=y # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_SPL_SYS_MALLOC_SIMPLE=y -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x141 +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x1 +CONFIG_SPL_I2C_SUPPORT=y +CONFIG_CMD_TLV_EEPROM=y +CONFIG_SPL_CMD_TLV_EEPROM=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TFTPPUT=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y +CONFIG_CMD_MVEBU_BUBT=y # CONFIG_SPL_PARTITION_UUIDS is not set CONFIG_DEFAULT_DEVICE_TREE="armada-388-helios4" CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_OF_TRANSLATE=y -CONFIG_SCSI_AHCI=y +CONFIG_AHCI_MVEBU=y CONFIG_DM_PCA953X=y CONFIG_DM_I2C=y -CONFIG_I2C_SET_DEFAULT_BUS_NUM=y -CONFIG_I2C_DEFAULT_BUS_N
[PATCH 1/4] ARM: mvebu: helios4 adjust env sizes to enable SPI to work
From: Dennis Gilmore mirror the clearfog setup to enable SPI to work Signed-off-by: Dennis Gilmore --- arch/arm/mach-mvebu/Kconfig | 1 + board/kobol/helios4/Kconfig | 24 configs/helios4_defconfig | 2 -- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 board/kobol/helios4/Kconfig diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 0d8e0922a2..66fd771dff 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -293,5 +293,6 @@ config SECURED_MODE_CSK_INDEX depends on SECURED_MODE_IMAGE source "board/solidrun/clearfog/Kconfig" +source "board/kobol/helios4/Kconfig" endif diff --git a/board/kobol/helios4/Kconfig b/board/kobol/helios4/Kconfig new file mode 100644 index 00..cad51c1cf0 --- /dev/null +++ b/board/kobol/helios4/Kconfig @@ -0,0 +1,24 @@ +menu "Helios4 configuration" + depends on TARGET_HELIOS4 + +config ENV_SIZE + hex "Environment Size" + default 0x1 + +config ENV_OFFSET + hex "Environment offset" + default 0xF + +config ENV_SECT_SIZE + hex "Environment Sector-Size" + # Use SPI or SATA flash erase block size of 4 KiB + default 0x1000 if MVEBU_SPL_BOOT_DEVICE_SPI || MVEBU_SPL_BOOT_DEVICE_SATA + # Use optimistic 64 KiB erase block, will vary between actual media + default 0x1 if MVEBU_SPL_BOOT_DEVICE_MMC || MVEBU_SPL_BOOT_DEVICE_UART + +config SYS_SPI_U_BOOT_OFFS + hex "address of u-boot payload in SPI flash" + default 0x2 + depends on MVEBU_SPL_BOOT_DEVICE_SPI + +endmenu diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index eceb85f082..bdc6f43554 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -9,8 +9,6 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_NR_DRAM_BANKS=2 CONFIG_TARGET_HELIOS4=y CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y -CONFIG_ENV_SIZE=0x2000 -CONFIG_ENV_OFFSET=0xFE000 CONFIG_DM_GPIO=y CONFIG_SPL_TEXT_BASE=0x4030 CONFIG_SPL_SERIAL_SUPPORT=y -- 2.28.0
[PATCH 4/4] ARM: mvebu: fixup building a SPI image for db-mv784mp-gp
From: Dennis Gilmore sync config options from clearfog to db-mv784mp-gp to enable building a SPI image Signed-off-by: Dennis Gilmore --- include/configs/db-mv784mp-gp.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h index 3e20516e94..79ee5909d5 100644 --- a/include/configs/db-mv784mp-gp.h +++ b/include/configs/db-mv784mp-gp.h @@ -78,8 +78,17 @@ #define CONFIG_SPL_STACK (0x4000 + ((192 - 16) << 10)) #define CONFIG_SPL_BOOTROM_SAVE(CONFIG_SPL_STACK + 4) +#if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI) /* SPL related SPI defines */ -#define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS +#define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_SPI_U_BOOT_OFFS +#elif defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) || defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA) +/* SPL related MMC defines */ +#define CONFIG_SYS_MMC_U_BOOT_OFFS (160 << 10) +#define CONFIG_SYS_U_BOOT_OFFS CONFIG_SYS_MMC_U_BOOT_OFFS +#ifdef CONFIG_SPL_BUILD +#define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER 0x0018 /* in SDRAM */ +#endif +#endif /* Enable DDR support in SPL (DDR3 training from Marvell bin_hdr) */ #define CONFIG_SPD_EEPROM 0x4e -- 2.28.0
[PATCH 3/4] ARM: mvebu: ClearFog make sure that SATA and UART images are buildable
From: Dennis Gilmore SATA and UART ClearFog imaages are not buildable as ENV_SECT_SIZE is not defined set values for both possible targets Signed-off-by: Dennis Gilmore --- board/solidrun/clearfog/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/solidrun/clearfog/Kconfig b/board/solidrun/clearfog/Kconfig index e8c3f53d84..cf95258090 100644 --- a/board/solidrun/clearfog/Kconfig +++ b/board/solidrun/clearfog/Kconfig @@ -50,9 +50,9 @@ config ENV_OFFSET config ENV_SECT_SIZE hex "Environment Sector-Size" # Use SPI flash erase block size of 4 KiB - default 0x1000 if MVEBU_SPL_BOOT_DEVICE_SPI + default 0x1000 if MVEBU_SPL_BOOT_DEVICE_SPI || MVEBU_SPL_BOOT_DEVICE_SATA # Use optimistic 64 KiB erase block, will vary between actual media - default 0x1 if MVEBU_SPL_BOOT_DEVICE_MMC + default 0x1 if MVEBU_SPL_BOOT_DEVICE_MMC || MVEBU_SPL_BOOT_DEVICE_UART config SYS_SPI_U_BOOT_OFFS hex "address of u-boot payload in SPI flash" -- 2.28.0
[PATCH 2/4] ARM: mvebu: helios4 dts changes to enable SPI
From: Dennis Gilmore mirror seettings for the clearfog on the helios4 to get SPI working. Signed-off-by: Dennis Gilmore --- arch/arm/dts/armada-388-helios4-u-boot.dtsi | 22 ++ arch/arm/dts/armada-388-helios4.dts | 46 - 2 files changed, 58 insertions(+), 10 deletions(-) diff --git a/arch/arm/dts/armada-388-helios4-u-boot.dtsi b/arch/arm/dts/armada-388-helios4-u-boot.dtsi index 0753889854..82513a1ce7 100644 --- a/arch/arm/dts/armada-388-helios4-u-boot.dtsi +++ b/arch/arm/dts/armada-388-helios4-u-boot.dtsi @@ -1,13 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ -/ { - aliases { - i2c0 = &i2c0; - i2c1 = &i2c1; - spi1 = &spi1; - }; -}; - ð0 { phy-reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; @@ -37,5 +29,17 @@ }; &sdhci { - u-boot,dm-spl; + u-boot,dm-spl; +}; + +&i2c0 { + u-boot,dm-spl; + + eeprom@52 { + u-boot,dm-spl; + }; + + eeprom@53 { + u-boot,dm-spl; + }; }; diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts index fb49df2a3b..e948b94090 100644 --- a/arch/arm/dts/armada-388-helios4.dts +++ b/arch/arm/dts/armada-388-helios4.dts @@ -22,10 +22,14 @@ }; aliases { - /* So that mvebu u-boot can update the MAC addresses */ + /* So that mvebu u-boot can update the MAC address */ ethernet1 = ð0; + spi1 = &spi1; + i2c0 = &i2c0; + i2c1 = &i2c1; }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -306,3 +310,43 @@ }; }; }; + +&pinctrl { + helios4_spi1_cs_pins: spi1-cs-pins { + marvell,pins = "mpp55"; + marvell,function = "spi1"; + }; + mikro_pins: mikro-pins { + /* int: mpp22 rst: mpp29 */ + marvell,pins = "mpp22", "mpp29"; + marvell,function = "gpio"; + }; + mikro_spi_pins: mikro-spi-pins { + marvell,pins = "mpp43"; + marvell,function = "spi1"; + }; + mikro_uart_pins: mikro-uart-pins { + marvell,pins = "mpp24", "mpp25"; + marvell,function = "ua1"; + }; + rear_button_pins: rear-button-pins { + marvell,pins = "mpp34"; + marvell,function = "gpio"; + }; +}; + +&w25q32 { + status = "okay"; +}; + +&spi1 { + /* +* Add SPI CS pins for helios4: +* CS0: W25Q32 +* CS1: +* CS2: mikrobus +*/ + pinctrl-0 = <&spi1_pins &mikro_spi_pins>; + pinctrl-names = "default"; + status = "okay"; +}; -- 2.28.0
ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog
In an effort to build SPI images for clearfog and helios4 I needed to make some minor changes to the dts and Kconfig for the helios4 and set some variables for UART and SATA images for ClearFog. Version 2 dropped changes for db-mv784mp-gp as the board turns out to be currently broken, the serial port is not available and the system bails after loading the SPL the dts changes for the helios4 have been shrunk back to remove everything not needed or valid Dennis
[V2 1/3] ARM: mvebu: helios4 adjust env sizes to enable SPI to work
From: Dennis Gilmore mirror the clearfog setup to enable SPI to work Signed-off-by: Dennis Gilmore --- arch/arm/mach-mvebu/Kconfig | 1 + board/kobol/helios4/Kconfig | 24 configs/helios4_defconfig | 2 -- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 board/kobol/helios4/Kconfig diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index 0d8e0922a2..66fd771dff 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -293,5 +293,6 @@ config SECURED_MODE_CSK_INDEX depends on SECURED_MODE_IMAGE source "board/solidrun/clearfog/Kconfig" +source "board/kobol/helios4/Kconfig" endif diff --git a/board/kobol/helios4/Kconfig b/board/kobol/helios4/Kconfig new file mode 100644 index 00..cad51c1cf0 --- /dev/null +++ b/board/kobol/helios4/Kconfig @@ -0,0 +1,24 @@ +menu "Helios4 configuration" + depends on TARGET_HELIOS4 + +config ENV_SIZE + hex "Environment Size" + default 0x1 + +config ENV_OFFSET + hex "Environment offset" + default 0xF + +config ENV_SECT_SIZE + hex "Environment Sector-Size" + # Use SPI or SATA flash erase block size of 4 KiB + default 0x1000 if MVEBU_SPL_BOOT_DEVICE_SPI || MVEBU_SPL_BOOT_DEVICE_SATA + # Use optimistic 64 KiB erase block, will vary between actual media + default 0x1 if MVEBU_SPL_BOOT_DEVICE_MMC || MVEBU_SPL_BOOT_DEVICE_UART + +config SYS_SPI_U_BOOT_OFFS + hex "address of u-boot payload in SPI flash" + default 0x2 + depends on MVEBU_SPL_BOOT_DEVICE_SPI + +endmenu diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig index eceb85f082..bdc6f43554 100644 --- a/configs/helios4_defconfig +++ b/configs/helios4_defconfig @@ -9,8 +9,6 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_NR_DRAM_BANKS=2 CONFIG_TARGET_HELIOS4=y CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC=y -CONFIG_ENV_SIZE=0x2000 -CONFIG_ENV_OFFSET=0xFE000 CONFIG_DM_GPIO=y CONFIG_SPL_TEXT_BASE=0x4030 CONFIG_SPL_SERIAL_SUPPORT=y -- 2.28.0
[V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI
From: Dennis Gilmore Move all aliases defintions into the main dts file Add u-boot definiton to i2c0 based on clearfog set spi1 status to okay Signed-off-by: Dennis Gilmore --- arch/arm/dts/armada-388-helios4-u-boot.dtsi | 23 - arch/arm/dts/armada-388-helios4.dts | 14 - 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/arch/arm/dts/armada-388-helios4-u-boot.dtsi b/arch/arm/dts/armada-388-helios4-u-boot.dtsi index 0753889854..1047c1af23 100644 --- a/arch/arm/dts/armada-388-helios4-u-boot.dtsi +++ b/arch/arm/dts/armada-388-helios4-u-boot.dtsi @@ -1,13 +1,5 @@ // SPDX-License-Identifier: GPL-2.0+ -/ { - aliases { - i2c0 = &i2c0; - i2c1 = &i2c1; - spi1 = &spi1; - }; -}; - ð0 { phy-reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; }; @@ -20,7 +12,6 @@ }; &w25q32 { - status = "okay"; u-boot,dm-spl; }; @@ -37,5 +28,17 @@ }; &sdhci { - u-boot,dm-spl; + u-boot,dm-spl; +}; + +&i2c0 { + u-boot,dm-spl; + + eeprom@52 { + u-boot,dm-spl; + }; + + eeprom@53 { + u-boot,dm-spl; + }; }; diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts index fb49df2a3b..cbc296a46c 100644 --- a/arch/arm/dts/armada-388-helios4.dts +++ b/arch/arm/dts/armada-388-helios4.dts @@ -22,10 +22,14 @@ }; aliases { - /* So that mvebu u-boot can update the MAC addresses */ + /* So that mvebu u-boot can update the MAC address */ ethernet1 = ð0; + spi1 = &spi1; + i2c0 = &i2c0; + i2c1 = &i2c1; }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -306,3 +310,11 @@ }; }; }; + +&w25q32 { + status = "okay"; +}; + +&spi1 { + status = "okay"; +}; -- 2.28.0
[V2 3/3] ARM: mvebu: ClearFog make sure that SATA and UART images are buildable
From: Dennis Gilmore SATA and UART ClearFog imaages are not buildable as ENV_SECT_SIZE is not defined set values for both possible targets Signed-off-by: Dennis Gilmore --- board/solidrun/clearfog/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/solidrun/clearfog/Kconfig b/board/solidrun/clearfog/Kconfig index e8c3f53d84..cf95258090 100644 --- a/board/solidrun/clearfog/Kconfig +++ b/board/solidrun/clearfog/Kconfig @@ -50,9 +50,9 @@ config ENV_OFFSET config ENV_SECT_SIZE hex "Environment Sector-Size" # Use SPI flash erase block size of 4 KiB - default 0x1000 if MVEBU_SPL_BOOT_DEVICE_SPI + default 0x1000 if MVEBU_SPL_BOOT_DEVICE_SPI || MVEBU_SPL_BOOT_DEVICE_SATA # Use optimistic 64 KiB erase block, will vary between actual media - default 0x1 if MVEBU_SPL_BOOT_DEVICE_MMC + default 0x1 if MVEBU_SPL_BOOT_DEVICE_MMC || MVEBU_SPL_BOOT_DEVICE_UART config SYS_SPI_U_BOOT_OFFS hex "address of u-boot payload in SPI flash" -- 2.28.0
[U-Boot] [PATCH] wandboard: add pxe support, set default boot command like highbank
From: Dennis Gilmore Signed-off-by: Dennis Gilmore --- include/configs/wandboard.h | 42 +++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index ee6bf21..a5052c5 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -58,6 +58,8 @@ #define CONFIG_LOADADDR0x1200 #define CONFIG_SYS_TEXT_BASE 0x1780 +#define CONFIG_SUPPORT_RAW_INITRD + /* MMC Configuration */ #define CONFIG_FSL_ESDHC #define CONFIG_FSL_USDHC @@ -72,6 +74,14 @@ #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION +/* PXE support */ +#define CONFIG_BOOTP_PXE +#define CONFIG_BOOTP_PXE_CLIENTARCH 0x100 +#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7.wandboard" +#define CONFIG_CMD_PXE +#define CONFIG_MENU + + /* Ethernet Configuration */ #define CONFIG_CMD_PING #define CONFIG_CMD_DHCP @@ -117,7 +127,32 @@ "initrd_high=0x\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ "fdt_addr=0x1100\0" \ + "pxefile_addr_r=0x1200\0" \ + "kernel_addr_r=0x1300\0" \ + "ramdisk_addr_r=0x3200\0" \ + "fdt_addr_r=0x1100\0" \ "boot_fdt=try\0" \ + "bootcmd_setup=mmc rescan\0" \ + "bootcmd_pxe=setenv bootfile \"\" ;dhcp; pxe get; pxe boot\0" \ + "bootcmd_disk_scr=ext2load ${boot_ifc} ${bootdevice} ${scr_addr_r} boot.scr && source ${scr_addr_r}\0" \ + "bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} ext2\0" \ + "bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} ext2\0" \ + "bootcmd_disk_uenv=ext2load ${boot_ifc} ${bootdevice} ${uenv_addr_r} uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0" \ + "bootcmd_disk_kernel=ext2load ${boot_ifc} ${bootdevice} ${kernel_addr_r} vmlinuz && ext2load ${boot_ifc} ${bootdevice} ${ramdisk_addr_r} initrd.img && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}\0" \ + "bootcmd_disk=run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0" \ + "bootcmd_sata=setenv boot_ifc scsi; scsi scan && run bootcmd_disk\0" \ + "bootcmd_mmc=setenv boot_ifc mmc; mmc rescan && run bootcmd_disk\0" \ + "bootcmd_default=run bootcmd_mmc; run bootcmd_sata; run bootcmd_pxe\0" \ + "bootcmd0=run bootcmd_setup; run bootcmd_default\0" \ + "bootcmd1=run bootcmd_setup; run bootcmd_pxe; run bootcmd_default\0" \ + "bootcmd2=run bootcmd_setup; run bootcmd_sata; run bootcmd_default\0" \ + "bootcmd15=run bootcmd_setup; run bootcmd_mmc; run bootcmd_default\0" \ + "localcmd=run bootcmd_sata\0" \ + "bootdevice=0\0" \ + "bootargs=console=ttymxc0 root=LABEL=rootfs\0" \ + "bootdelay=2\0" \ + "bootretry=90\0" \ + "netretry=once\0" \ "ip_dyn=yes\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=1\0" \ @@ -139,11 +174,11 @@ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot}\0" \ "loadbootscript=" \ - "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ + "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source\0" \ - "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ - "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ + "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ + "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ @@ -186,6 +221,7 @@ #define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \ + "run bootcmd_default; " \ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ -- 1.8.3.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: mvebu: Add Helios4 Armada 38x initial support
From: Dennis Gilmore The helios4 is built on the SolidRun Armada 38x SOM. The port os based on the ClearFog board, using information from https://github.com/helios-4/u-boot-marvell as well as dtb input from https://github.com/helios-4/linux-marvell Signed-off-by: Dennis Gilmore Signed-off-by: Dennis Gilmore --- changes since RFC add armada-38x-solidrun-microsom.dtsi minus buffer-memory nodes from linux kernel fix up maintainers file use correct switch in README file add SPDX header to kwbimage.cfg and dts file Port to DM_I2C I have not ported to generic gpio yet, not had time to investigate and none of the marvell boards that already exist even thoughse with some generic gpio have ported the functions in helios4.c --- arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-388-helios4.dts | 308 ++ .../arm/dts/armada-38x-solidrun-microsom.dtsi | 100 ++ arch/arm/mach-mvebu/Kconfig | 7 + board/solidrun/helios4/MAINTAINERS| 6 + board/solidrun/helios4/Makefile | 5 + board/solidrun/helios4/README | 46 +++ board/solidrun/helios4/helios4.c | 172 ++ board/solidrun/helios4/kwbimage.cfg | 13 + configs/helios4_defconfig | 58 include/configs/helios4.h | 178 ++ 11 files changed, 894 insertions(+) create mode 100644 arch/arm/dts/armada-388-helios4.dts create mode 100644 arch/arm/dts/armada-38x-solidrun-microsom.dtsi create mode 100644 board/solidrun/helios4/MAINTAINERS create mode 100644 board/solidrun/helios4/Makefile create mode 100644 board/solidrun/helios4/README create mode 100644 board/solidrun/helios4/helios4.c create mode 100644 board/solidrun/helios4/kwbimage.cfg create mode 100644 configs/helios4_defconfig create mode 100644 include/configs/helios4.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index a0349a8975..a18f4bbf7b 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -91,6 +91,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \ armada-375-db.dtb \ armada-388-clearfog.dtb \ armada-388-gp.dtb \ + armada-388-helios4.dtb \ armada-385-amc.dtb \ armada-7040-db.dtb \ armada-7040-db-nand.dtb \ diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts new file mode 100644 index 00..3223e4d71f --- /dev/null +++ b/arch/arm/dts/armada-388-helios4.dts @@ -0,0 +1,308 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) + +/dts-v1/; +#include "armada-388.dtsi" +#include "armada-38x-solidrun-microsom.dtsi" + +/ { + model = "Helios4"; + compatible = "solidrun,helios4", "marvell,armada388", + "marvell,armada385", "marvell,armada380"; + + memory { + device_type = "memory"; + reg = <0x 0x8000>; /* 2 GB */ + }; + + aliases { + /* So that mvebu u-boot can update the MAC addresses */ + ethernet1 = ð0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_12v: regulator-12v { + compatible = "regulator-fixed"; + regulator-name = "power_brick_12V"; + regulator-min-microvolt = <1200>; + regulator-max-microvolt = <1200>; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-always-on; + vin-supply = <®_12v>; + }; + + reg_5p0v_hdd: regulator-5v-hdd { + compatible = "regulator-fixed"; + regulator-name = "5V_HDD"; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + regulator-always-on; + vin-supply = <®_12v>; + }; + + reg_5p0v_usb: regulator-5v-usb { + compatible = "regulator-fixed"; + regulator-name = "USB-PWR"; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + regulator-boot-on; + regulator-always-on; + enable-active-high; + gpio = <&expander0 6 GPIO_ACTIVE_HIGH>; + vin-supply = <®_12v>; + }; + +system-leds { +compatible = "gpio-leds"; +status-led { +label = "helios4:green:status"; +gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; +linux,default-trigger = "heartbeat"; +
[U-Boot] [PATCH] arm: mvebu: Add Helios4 Armada 38x initial support
From: Dennis Gilmore The helios4 is built on the SolidRun Armada 38x SOM. The port os based on the ClearFog board, using information from https://github.com/helios-4/u-boot-marvell as well as dtb input from https://github.com/helios-4/linux-marvell Signed-off-by: Dennis Gilmore Signed-off-by: Dennis Gilmore --- changes since RFC add armada-38x-solidrun-microsom.dtsi minus buffer-memory nodes from linux kernel fix up maintainers file use correct switch in README file add SPDX header to kwbimage.cfg and dts file Port to DM_I2C Changes since V1 moved to kobol namespace at the request of the board supplier remove gpio resets they are clearfog specific set maintainer to myself and update copyrights remove unused config options --- arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-388-helios4.dts | 313 ++ .../arm/dts/armada-38x-solidrun-microsom.dtsi | 101 ++ arch/arm/mach-mvebu/Kconfig | 7 + board/kobol/helios4/MAINTAINERS | 6 + board/kobol/helios4/Makefile | 5 + board/kobol/helios4/README| 46 +++ board/kobol/helios4/helios4.c | 162 + board/kobol/helios4/kwbimage.cfg | 13 + configs/helios4_defconfig | 58 include/configs/helios4.h | 172 ++ 11 files changed, 884 insertions(+) create mode 100644 arch/arm/dts/armada-388-helios4.dts create mode 100644 arch/arm/dts/armada-38x-solidrun-microsom.dtsi create mode 100644 board/kobol/helios4/MAINTAINERS create mode 100644 board/kobol/helios4/Makefile create mode 100644 board/kobol/helios4/README create mode 100644 board/kobol/helios4/helios4.c create mode 100644 board/kobol/helios4/kwbimage.cfg create mode 100644 configs/helios4_defconfig create mode 100644 include/configs/helios4.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index a0349a8975..a18f4bbf7b 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -91,6 +91,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \ armada-375-db.dtb \ armada-388-clearfog.dtb \ armada-388-gp.dtb \ + armada-388-helios4.dtb \ armada-385-amc.dtb \ armada-7040-db.dtb \ armada-7040-db-nand.dtb \ diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts new file mode 100644 index 00..705adfa8c6 --- /dev/null +++ b/arch/arm/dts/armada-388-helios4.dts @@ -0,0 +1,313 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Device Tree file for Helios4 + * based on SolidRun Clearfog revision A1 rev 2.0 (88F6828) + * + * Copyright (C) 2017 Aditya Prayoga + * + */ + +/dts-v1/; +#include "armada-388.dtsi" +#include "armada-38x-solidrun-microsom.dtsi" + +/ { + model = "Helios4"; + compatible = "kobol,helios4", "marvell,armada388", + "marvell,armada385", "marvell,armada380"; + + memory { + device_type = "memory"; + reg = <0x 0x8000>; /* 2 GB */ + }; + + aliases { + /* So that mvebu u-boot can update the MAC addresses */ + ethernet1 = ð0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_12v: regulator-12v { + compatible = "regulator-fixed"; + regulator-name = "power_brick_12V"; + regulator-min-microvolt = <1200>; + regulator-max-microvolt = <1200>; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-always-on; + vin-supply = <®_12v>; + }; + + reg_5p0v_hdd: regulator-5v-hdd { + compatible = "regulator-fixed"; + regulator-name = "5V_HDD"; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + regulator-always-on; + vin-supply = <®_12v>; + }; + + reg_5p0v_usb: regulator-5v-usb { + compatible = "regulator-fixed"; + regulator-name = "USB-PWR"; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + regulator-boot-on; + regulator-always-on; + enable-active-high; + gpio = <&expander0 6 GPIO_ACTIVE_HIGH>; + vin-supply = <®_12v>; + }; + + system-leds { + compatible = "gpio-leds"; + status-led { + label = "helios4:green:status"; +
[U-Boot] [PATCH V3] arm: mvebu: Add Helios4 Armada 38x initial support
From: Dennis Gilmore The helios4 is built on the SolidRun Armada 38x SOM. The port os based on the ClearFog board, using information from https://github.com/helios-4/u-boot-marvell as well as dtb input from https://github.com/helios-4/linux-marvell Signed-off-by: Dennis Gilmore Signed-off-by: Dennis Gilmore --- changes since RFC add armada-38x-solidrun-microsom.dtsi minus buffer-memory nodes from linux kernel fix up maintainers file use correct switch in README file add SPDX header to kwbimage.cfg and dts file Port to DM_I2C Changes since V1 moved to kobol namespace at the request of the board supplier remove gpio resets they are clearfog specific set maintainer to myself and update copyrights remove unused config options Changes since V2 fixup issues identifed by checkpatch.pl --- arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-388-helios4.dts | 314 ++ .../arm/dts/armada-38x-solidrun-microsom.dtsi | 101 ++ arch/arm/mach-mvebu/Kconfig | 7 + board/kobol/helios4/MAINTAINERS | 6 + board/kobol/helios4/Makefile | 5 + board/kobol/helios4/README| 46 +++ board/kobol/helios4/helios4.c | 162 + board/kobol/helios4/kwbimage.cfg | 13 + configs/helios4_defconfig | 58 include/configs/helios4.h | 172 ++ 11 files changed, 885 insertions(+) create mode 100644 arch/arm/dts/armada-388-helios4.dts create mode 100644 arch/arm/dts/armada-38x-solidrun-microsom.dtsi create mode 100644 board/kobol/helios4/MAINTAINERS create mode 100644 board/kobol/helios4/Makefile create mode 100644 board/kobol/helios4/README create mode 100644 board/kobol/helios4/helios4.c create mode 100644 board/kobol/helios4/kwbimage.cfg create mode 100644 configs/helios4_defconfig create mode 100644 include/configs/helios4.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 790571b773..3dcd6dd7a8 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -91,6 +91,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \ armada-375-db.dtb \ armada-388-clearfog.dtb \ armada-388-gp.dtb \ + armada-388-helios4.dtb \ armada-385-amc.dtb \ armada-7040-db.dtb \ armada-7040-db-nand.dtb \ diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts new file mode 100644 index 00..049d322964 --- /dev/null +++ b/arch/arm/dts/armada-388-helios4.dts @@ -0,0 +1,314 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Device Tree file for Helios4 + * based on SolidRun Clearfog revision A1 rev 2.0 (88F6828) + * + * Copyright (C) 2017 Aditya Prayoga + * + */ + +/dts-v1/; +#include "armada-388.dtsi" +#include "armada-38x-solidrun-microsom.dtsi" + +/ { + model = "Helios4"; + compatible = "kobol,helios4", "marvell,armada388", + "marvell,armada385", "marvell,armada380"; + + memory { + device_type = "memory"; + reg = <0x 0x8000>; /* 2 GB */ + }; + + aliases { + /* So that mvebu u-boot can update the MAC addresses */ + ethernet1 = ð0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + reg_12v: regulator-12v { + compatible = "regulator-fixed"; + regulator-name = "power_brick_12V"; + regulator-min-microvolt = <1200>; + regulator-max-microvolt = <1200>; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <330>; + regulator-max-microvolt = <330>; + regulator-always-on; + vin-supply = <®_12v>; + }; + + reg_5p0v_hdd: regulator-5v-hdd { + compatible = "regulator-fixed"; + regulator-name = "5V_HDD"; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + regulator-always-on; + vin-supply = <®_12v>; + }; + + reg_5p0v_usb: regulator-5v-usb { + compatible = "regulator-fixed"; + regulator-name = "USB-PWR"; + regulator-min-microvolt = <500>; + regulator-max-microvolt = <500>; + regulator-boot-on; + regulator-always-on; + enable-active-high; + gpio = <&expander0 6 GPIO_ACTIVE_HIGH>; + vin-supply = <®_12v>; + }; + + system-leds { + compatible = "gpio-leds"; + status-led { +
[U-Boot] [RFC] arm: mvebu: Add Helios4 Armada 38x initial support
From: Dennis Gilmore The helios4 is built on the SolidRun Armada 38x SOM. The port os based on the ClearFog board, using information from https://github.com/helios-4/u-boot-marvell as well as dtb input from https://github.com/helios-4/linux-marvell Currently ECC is not enabled Signed-off-by: Dennis Gilmore --- arch/arm/dts/Makefile | 1 + arch/arm/dts/armada-388-helios4.dts | 454 arch/arm/mach-mvebu/Kconfig | 7 + board/solidrun/helios4/MAINTAINERS | 6 + board/solidrun/helios4/Makefile | 5 + board/solidrun/helios4/README | 46 +++ board/solidrun/helios4/helios4.c| 160 ++ board/solidrun/helios4/kwbimage.cfg | 12 + configs/helios4_defconfig | 57 include/configs/helios4.h | 185 10 files changed, 933 insertions(+) create mode 100644 arch/arm/dts/armada-388-helios4.dts create mode 100644 board/solidrun/helios4/MAINTAINERS create mode 100644 board/solidrun/helios4/Makefile create mode 100644 board/solidrun/helios4/README create mode 100644 board/solidrun/helios4/helios4.c create mode 100644 board/solidrun/helios4/kwbimage.cfg create mode 100644 configs/helios4_defconfig create mode 100644 include/configs/helios4.h diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index a0349a8975..a18f4bbf7b 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -91,6 +91,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \ armada-375-db.dtb \ armada-388-clearfog.dtb \ armada-388-gp.dtb \ + armada-388-helios4.dtb \ armada-385-amc.dtb \ armada-7040-db.dtb \ armada-7040-db-nand.dtb \ diff --git a/arch/arm/dts/armada-388-helios4.dts b/arch/arm/dts/armada-388-helios4.dts new file mode 100644 index 00..562cce4c2b --- /dev/null +++ b/arch/arm/dts/armada-388-helios4.dts @@ -0,0 +1,454 @@ +/* + * Device Tree file for SolidRun Clearfog revision A1 rev 2.0 (88F6828) + * + * Copyright (C) 2015 Russell King + * + * This board is in development; the contents of this file work with + * the A1 rev 2.0 of the board, which does not represent final + * production board. Things will change, don't expect this file to + * remain compatible info the future. + * + * 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 + * version 2 as published by the Free Software Foundation. + * + * 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 , 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 +#include +#include "armada-388.dtsi" + +/ { + model = "Helios4"; + compatible = "solidrun,helios4", "marvell,armada388", + "marvell,armada385", "marvell,armada380"; + + aliases { + /* So that mvebu u-boot can update the MAC addresses */ + ethernet1 = ð0; + spi1 = &spi1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory { + device_type = "memory"; +reg = <0x 0x1000>; /* 256 MB */ + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + r
[U-Boot] [PATCH] arm: mvebu: helios4: add MMC to SPL DT
From: Dennis Gilmore This allows SPL to load the main U-Boot image from MMC once DM_MMC is enabled. Signed-off-by: Dennis Gilmore --- arch/arm/dts/armada-388-helios4-u-boot.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/dts/armada-388-helios4-u-boot.dtsi b/arch/arm/dts/armada-388-helios4-u-boot.dtsi index 4b20610d83..f0da9f42de 100644 --- a/arch/arm/dts/armada-388-helios4-u-boot.dtsi +++ b/arch/arm/dts/armada-388-helios4-u-boot.dtsi @@ -20,3 +20,7 @@ status = "okay"; u-boot,dm-spl; }; + +&sdhci { + u-boot,dm-spl; +}; -- 2.21.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot