arm: mvebu: helios-4: add defconfig forspi booting et al
cover arm: mvebu: helios-4: add defconfig forspi booting et al
This patch-set introduces a new defconfig for spi booting on kobol helios-4.
Additionally add minor update for default defconfig to enable setexpr command, and fix u-boot command access to i2c0 bus.
---
Josua Mayer (3):
arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus
arm: mvebu: helios4_defconfig: enable setexpr command
arm: mvebu: helios-4: add defconfig for spi booting
arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 ++ configs/helios4_defconfig | 1 - configs/helios4_spi_defconfig | 81 ++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-)
---
base-commit: 547d3dd28a46a18d59e00a153c8becca8d4e8cf9
change-id: 20240113-helios4-spi-144085c0bbc7
Sincerely,
Signature · 1 line
Josua Mayer <[email protected]>
PATCH 1/3 arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus
SolidRun Armada-388 SoM has an i2c bus supporting on-som eeprom, and peripherals on a carrier.armada-38x.dtsi disables this bus by default, it should be enabled by som or carrier dts.
Linux has moved i2c0 from helios-4 board dts to som dtsi, including status, pinctrl and clock speed.
Copy these settings from mainline.
This fixes accessing i2c bus from u-boot commandline.
--- arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/dts/armada-38x-solidrun-microsom.dtsi +5 -0
@@ -99,6 +99,11 @@ }; &i2c0 { + clock-frequency = <400000>; + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + status = "okay"; + eeprom@53 { compatible = "atmel,24c02"; reg = <0x53>;
Signature · 1 line
2.35.3
PATCH 2/3 arm: mvebu: helios4_defconfig: enable setexpr command
In reply to Josua MayerUpdate the helios4 defconfig to enable the 'setexpr' command, which is a default and useful for various complex boot-scripts.
--- configs/helios4_defconfig | 1 - 1 file changed, 1 deletion(-)
configs/helios4_defconfig +0 -1
@@ -44,7 +44,6 @@ 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
Signature · 1 line
2.35.3
PATCH 3/3 arm: mvebu: helios-4: add defconfig for spi booting
In reply to Josua MayerAdd a new defconfig based on existing helios4_config file to support booting from spi flash.
Settings for environment location are based on vendor u-boot:
https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59
A separate defconfig is required because the options are not intuitive from menuconfig, numeric values in particular.
--- configs/helios4_spi_defconfig | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
configs/helios4_spi_defconfig new file +81 -0
@@ -0,0 +1,81 @@ +CONFIG_ARM=y +CONFIG_ARCH_CPU_INIT=y +CONFIG_SYS_THUMB_BUILD=y +CONFIG_ARCH_MVEBU=y +CONFIG_TEXT_BASE=0x00800000 +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xff0000 +CONFIG_TARGET_HELIOS4=y +CONFIG_ENV_OFFSET=0x100000 +CONFIG_ENV_SECT_SIZE=0x10000 +CONFIG_DEFAULT_DEVICE_TREE="armada-388-helios4" +CONFIG_SPL_TEXT_BASE=0x40000030 +CONFIG_SPL_SERIAL=y +CONFIG_SPL_STACK=0x4002c000 +CONFIG_SPL=y +CONFIG_DEBUG_UART_BASE=0xf1012000 +CONFIG_DEBUG_UART_CLOCK=250000000 +CONFIG_SYS_LOAD_ADDR=0x800000 +CONFIG_PCI=y +CONFIG_DEBUG_UART=y +CONFIG_AHCI=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_BOOTDELAY=3 +CONFIG_USE_PREBOOT=y +CONFIG_SYS_CONSOLE_INFO_QUIET=y +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_SPL_MAX_SIZE=0x22fd0 +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +CONFIG_SPL_BSS_START_ADDR=0x40023000 +CONFIG_SPL_BSS_MAX_SIZE=0x4000 +CONFIG_SPL_SYS_MALLOC_SIMPLE=y +# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set +CONFIG_SPL_I2C=y +CONFIG_SYS_MAXARGS=32 +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_TFTPPUT=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIME=y +CONFIG_ENV_OVERWRITE=y +CONFIG_ENV_MIN_ENTRIES=128 +CONFIG_ARP_TIMEOUT=200 +CONFIG_NET_RETRY_COUNT=50 +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_OF_TRANSLATE=y +CONFIG_AHCI_MVEBU=y +CONFIG_DM_PCA953X=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_MVTWSI=y +CONFIG_I2C_EEPROM=y +CONFIG_SPL_I2C_EEPROM=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y +CONFIG_MMC_SDHCI_MV=y +CONFIG_MTD=y +CONFIG_SF_DEFAULT_BUS=1 +CONFIG_SPI_FLASH_WINBOND=y +CONFIG_SPI_FLASH_MTD=y +CONFIG_PHY_MARVELL=y +CONFIG_PHY_GIGE=y +CONFIG_MVNETA=y +CONFIG_MII=y +CONFIG_MVMDIO=y +CONFIG_PCI_MVEBU=y +CONFIG_SPL_DEBUG_UART_BASE=0xd0012000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y +CONFIG_KIRKWOOD_SPI=y +CONFIG_USB=y +CONFIG_USB_XHCI_HCD=y
Signature · 1 line
2.35.3
Re: [PATCH 3/3] arm: mvebu: helios-4: add defconfig for spi booting
Quoted 6 lines · Josua Mayer
Add a new defconfig based on existing
helios4_configfile to support booting from spi flash.Settings for environment location are based on vendor u-boot:
https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59
Quoted 7 lines
A separate defconfig is required because the options are not intuitive from menuconfig, numeric values in particular.
Signed-off-by Josua Mayer <[email protected]>--- configs/helios4_spi_defconfig | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
So, a super new thing that might be of interest, but please try this since I'd like to prove/disprove the use-case. This could instead be:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
... enable/disable options specific to the SPI boot use case ...
And so now both boards will otherwise be kept in-sync for general config changes. It could further be done as:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
#include "board/kobol/helios4/spiboot.config"
And have board/kobol/helios4/spiboot.config contain the SPI-boot specific options. This path would allow for:
make helios4_defconfig spiboot.config
to be a valid alternative way of configuring a build for spiboot.
Signature · 1 line
Tom
Re: [PATCH 3/3] arm: mvebu: helios-4: add defconfig for spi booting
Hi Tim,
Am 13.01.24 um 18:22 schrieb Tom Rini:
Quoted 15 lines · Josua Mayer
Quoted 7 lines
Add a new defconfig based on existing
helios4_configfile to support booting from spi flash.Settings for environment location are based on vendor u-boot:
https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59Quoted 7 lines
A separate defconfig is required because the options are not intuitive from menuconfig, numeric values in particular.
Signed-off-by Josua Mayer <[email protected]>--- configs/helios4_spi_defconfig | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
Quoted 5 lines
So, a super new thing that might be of interest, but please try this since I'd like to prove/disprove the use-case. This could instead be:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
... enable/disable options specific to the SPI boot use case ...
I will try it, I like the idea conceptually.
Quoted 6 lines
And so now both boards will otherwise be kept in-sync for general config changes. It could further be done as:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
#include "board/kobol/helios4/spiboot.config"
Here is potential for making it infinitely complex. E.g. one might argue there should be an armada38x_spi.config
Quoted 6 lines
And have
board/kobol/helios4/spiboot.configcontain the SPI-boot specific options. This path would allow for:
makehelios4_defconfigspiboot.config
to be a valid alternative way of configuring a build for spiboot.
Re: [PATCH 3/3] arm: mvebu: helios-4: add defconfig for spi booting
Quoted 18 lines · Josua Mayer
Hi Tim,
Am 13.01.24 um 18:22 schrieb Tom Rini:
Quoted 15 lines · Josua Mayer
Quoted 14 lines
Add a new defconfig based on existing
helios4_configfile to support booting from spi flash.Settings for environment location are based on vendor u-boot:
https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59A separate defconfig is required because the options are not intuitive from menuconfig, numeric values in particular.
Signed-off-by Josua Mayer <[email protected]>--- configs/helios4_spi_defconfig | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)
Quoted 6 lines
Quoted 5 lines
So, a super new thing that might be of interest, but please try this since I'd like to prove/disprove the use-case. This could instead be:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
... enable/disable options specific to the SPI boot use case ...I will try it, I like the idea conceptually.
OK.
Quoted 7 lines
Quoted 5 lines
And so now both boards will otherwise be kept in-sync for general config changes. It could further be done as:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
#include "board/kobol/helios4/spiboot.config"Here is potential for making it infinitely complex. E.g. one might argue there should be an armada38x_spi.config
Yes, and it depends a little on the use cases of the hardware platforms what makes the most sense. Today we have some Tegra platforms that started out using config fragments, but thinking about it right now should perhaps change to this style of defconfig. On the other hand, TI is intentionally adding feature.config fragments as the "feature.config" doesn't change between parts of the K3 family and should also be re-used on custom designs to enable that feature. Things are new enough here that I want people to experiment and see what works best for their use cases rather than providing strict rules just yet.
Signature · 1 line
Tom
Re: [PATCH 3/3] arm: mvebu: helios-4: add defconfig for spi booting
Am 14.01.24 um 15:37 schrieb Tom Rini:
Quoted 32 lines · Josua Mayer
Quoted 18 lines
Hi Tim,
Am 13.01.24 um 18:22 schrieb Tom Rini:
Quoted 15 lines · Josua Mayer
Quoted 14 lines
Add a new defconfig based on existing
helios4_configfile to support booting from spi flash.Settings for environment location are based on vendor u-boot:
https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59A separate defconfig is required because the options are not intuitive from menuconfig, numeric values in particular.
Signed-off-by Josua Mayer <[email protected]>--- configs/helios4_spi_defconfig | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)Quoted 6 lines
Quoted 5 lines
So, a super new thing that might be of interest, but please try this since I'd like to prove/disprove the use-case. This could instead be:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
... enable/disable options specific to the SPI boot use case ...I will try it, I like the idea conceptually.
OK.
Quoted 5 lines
Quoted 5 lines
And so now both boards will otherwise be kept in-sync for general config changes. It could further be done as:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
#include "board/kobol/helios4/spiboot.config"
Quoted 6 lines
Quoted 2 lines
Here is potential for making it infinitely complex. E.g. one might argue there should be an armada38x_spi.config
Yes, and it depends a little on the use cases of the hardware platforms what makes the most sense. Today we have some Tegra platforms that started out using config fragments, but thinking about it right now should perhaps change to this style of defconfig.
Using the fragments avoids adding more defconfig files, and adding to MAINTAINERS file.
So I attempt this method for v2.
My reasoning would be that boot media related options
are mostly maintainers choices to be made once per product,
and then kept constant. So it fits better in board/ directory than configs/.
Quoted 7 lines
On the other hand, TI
is intentionally adding feature.config fragments as the "feature.config" doesn't change between parts of the K3 family and should also be re-used on custom designs to enable that feature. Things are new enough here that I want people to experiment and see what works best for their use cases rather than providing strict rules just yet.
Re: [PATCH 3/3] arm: mvebu: helios-4: add defconfig for spi booting
In reply to Tom RiniHi Josua,
Quoted 28 lines · Tom Rini
Quoted 6 lines · Josua Mayer
Add a new defconfig based on existing
helios4_configfile to support booting from spi flash.Settings for environment location are based on vendor u-boot:
https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59Quoted 7 lines
A separate defconfig is required because the options are not intuitive from menuconfig, numeric values in particular.
Signed-off-by Josua Mayer <[email protected]>--- configs/helios4_spi_defconfig | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+)So, a super new thing that might be of interest, but please try this since I'd like to prove/disprove the use-case. This could instead be:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
... enable/disable options specific to the SPI boot use case ...And so now both boards will otherwise be kept in-sync for general config changes. It could further be done as:
configs/helios4_spi_defconfig:
#include "configs/helios4_defconfig"
#include "board/kobol/helios4/spiboot.config"
Quoted 4 lines
And have
board/kobol/helios4/spiboot.configcontain the SPI-boot specific options. This path would allow for:
makehelios4_defconfigspiboot.config
to be a valid alternative way of configuring a build for spiboot.
That would be cool.
Still:
The current version leads to this compilation warning:
WARNING: no maintainers for 'helios4_spi'
Please fix in v2.
Thanks,
Stefan
BTW: Could you please also Cc me directly with such patches?