public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm: mvebu: helios-4: add config fragment for spi booting et al
@ 2024-02-02 15:13 Josua Mayer
  2024-02-02 15:13 ` [PATCH v2 1/3] arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus Josua Mayer
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Josua Mayer @ 2024-02-02 15:13 UTC (permalink / raw)
  To: Dennis Gilmore, Tom Rini; +Cc: Stefan Roese, u-boot, Josua Mayer

This patch-set introduces a new config fragment 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.

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
Changes in v2:
- replaced new defconfig with config fragment in board directory
  (suggested by Tom Rini <trini@konsulko.com>)
- Link to v1: https://lore.kernel.org/r/20240113-helios4-spi-v1-0-2a5663a10e6a@solid-run.com

---
Josua Mayer (3):
      arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus
      arm: mvebu: helios4_defconfig: enable setexpr command
      board: helios-4: add config fragment for spi booting

 arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++
 board/kobol/helios4/spiboot.config             | 4 ++++
 configs/helios4_defconfig                      | 1 -
 3 files changed, 9 insertions(+), 1 deletion(-)
---
base-commit: 050a9b981d6a835133521b599be3ae189ce70f41
change-id: 20240113-helios4-spi-144085c0bbc7

Sincerely,
-- 
Josua Mayer <josua@solid-run.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/3] arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus
  2024-02-02 15:13 [PATCH v2 0/3] arm: mvebu: helios-4: add config fragment for spi booting et al Josua Mayer
@ 2024-02-02 15:13 ` Josua Mayer
  2024-03-05 10:32   ` Stefan Roese
  2024-02-02 15:13 ` [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command Josua Mayer
  2024-02-02 15:13 ` [PATCH v2 3/3] board: helios-4: add config fragment for spi booting Josua Mayer
  2 siblings, 1 reply; 10+ messages in thread
From: Josua Mayer @ 2024-02-02 15:13 UTC (permalink / raw)
  To: Dennis Gilmore, Tom Rini; +Cc: Stefan Roese, u-boot, Josua Mayer

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.

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
 arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi
index f6ae784bed..1540162e03 100644
--- a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi
+++ b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi
@@ -99,6 +99,11 @@
 };
 
 &i2c0 {
+	clock-frequency = <400000>;
+	pinctrl-0 = <&i2c0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
 	eeprom@53 {
 		compatible = "atmel,24c02";
 		reg = <0x53>;

-- 
2.35.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command
  2024-02-02 15:13 [PATCH v2 0/3] arm: mvebu: helios-4: add config fragment for spi booting et al Josua Mayer
  2024-02-02 15:13 ` [PATCH v2 1/3] arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus Josua Mayer
@ 2024-02-02 15:13 ` Josua Mayer
  2024-02-12 20:40   ` Dennis Gilmore
  2024-03-05 10:32   ` Stefan Roese
  2024-02-02 15:13 ` [PATCH v2 3/3] board: helios-4: add config fragment for spi booting Josua Mayer
  2 siblings, 2 replies; 10+ messages in thread
From: Josua Mayer @ 2024-02-02 15:13 UTC (permalink / raw)
  To: Dennis Gilmore, Tom Rini; +Cc: Stefan Roese, u-boot, Josua Mayer

Update the helios4 defconfig to enable the 'setexpr' command, which is a
default and useful for various complex boot-scripts.

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
 configs/helios4_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
index 04194004f0..73f0638344 100644
--- a/configs/helios4_defconfig
+++ b/configs/helios4_defconfig
@@ -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

-- 
2.35.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/3] board: helios-4: add config fragment for spi booting
  2024-02-02 15:13 [PATCH v2 0/3] arm: mvebu: helios-4: add config fragment for spi booting et al Josua Mayer
  2024-02-02 15:13 ` [PATCH v2 1/3] arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus Josua Mayer
  2024-02-02 15:13 ` [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command Josua Mayer
@ 2024-02-02 15:13 ` Josua Mayer
  2024-02-02 16:06   ` Tom Rini
  2024-03-05 10:32   ` Stefan Roese
  2 siblings, 2 replies; 10+ messages in thread
From: Josua Mayer @ 2024-02-02 15:13 UTC (permalink / raw)
  To: Dennis Gilmore, Tom Rini; +Cc: Stefan Roese, u-boot, Josua Mayer

Add a config fragment with required differences for booting from spi
flash instead of sd-card (default).

Settings for environment location are based on vendor u-boot:
https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59

The fragment can be applied on top of helios4_defconfig by make:
make helios4_defconfig spiboot.config

Signed-off-by: Josua Mayer <josua@solid-run.com>
---
 board/kobol/helios4/spiboot.config | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/board/kobol/helios4/spiboot.config b/board/kobol/helios4/spiboot.config
new file mode 100644
index 0000000000..5ffb7d2e3b
--- /dev/null
+++ b/board/kobol/helios4/spiboot.config
@@ -0,0 +1,4 @@
+CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI=y
+# CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC is not set
+CONFIG_ENV_OFFSET=0x100000
+CONFIG_ENV_SECT_SIZE=0x10000

-- 
2.35.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/3] board: helios-4: add config fragment for spi booting
  2024-02-02 15:13 ` [PATCH v2 3/3] board: helios-4: add config fragment for spi booting Josua Mayer
@ 2024-02-02 16:06   ` Tom Rini
  2024-03-05 10:32   ` Stefan Roese
  1 sibling, 0 replies; 10+ messages in thread
From: Tom Rini @ 2024-02-02 16:06 UTC (permalink / raw)
  To: Josua Mayer; +Cc: Dennis Gilmore, Stefan Roese, u-boot

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

On Fri, Feb 02, 2024 at 04:13:34PM +0100, Josua Mayer wrote:

> Add a config fragment with required differences for booting from spi
> flash instead of sd-card (default).
> 
> Settings for environment location are based on vendor u-boot:
> https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59
> 
> The fragment can be applied on top of helios4_defconfig by make:
> make helios4_defconfig spiboot.config
> 
> Signed-off-by: Josua Mayer <josua@solid-run.com>
> ---
>  board/kobol/helios4/spiboot.config | 4 ++++

Can you please follow-up by adding doc/board/kobol/ content (and adding
to the index and making sure make htmldocs is happy) ? Thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command
  2024-02-02 15:13 ` [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command Josua Mayer
@ 2024-02-12 20:40   ` Dennis Gilmore
  2024-02-13 13:07     ` Josua Mayer
  2024-03-05 10:32   ` Stefan Roese
  1 sibling, 1 reply; 10+ messages in thread
From: Dennis Gilmore @ 2024-02-12 20:40 UTC (permalink / raw)
  To: Josua Mayer; +Cc: Tom Rini, Stefan Roese, u-boot

I am curious about your use cases for this. as ideally all systems use the
generic distro boot paths and it is not needed for them.

Dennis

On Fri, Feb 2, 2024 at 9:13 AM Josua Mayer <josua@solid-run.com> wrote:

> Update the helios4 defconfig to enable the 'setexpr' command, which is a
> default and useful for various complex boot-scripts.
>
> Signed-off-by: Josua Mayer <josua@solid-run.com>
> ---
>  configs/helios4_defconfig | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
> index 04194004f0..73f0638344 100644
> --- a/configs/helios4_defconfig
> +++ b/configs/helios4_defconfig
> @@ -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
>
> --
> 2.35.3
>
>

-- 
Dennis Gilmore
Senior Manager Systems Enablement OpenShift Development

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command
  2024-02-12 20:40   ` Dennis Gilmore
@ 2024-02-13 13:07     ` Josua Mayer
  0 siblings, 0 replies; 10+ messages in thread
From: Josua Mayer @ 2024-02-13 13:07 UTC (permalink / raw)
  To: Dennis Gilmore; +Cc: Tom Rini, Stefan Roese, u-boot@lists.denx.de

Hi Dennis,

Use-case is with separate boot and rootfs partitions to calculate
next partition number as argument for further commands:

setexpr openwrt_rootpart ${distro_bootpart} + 1
part uuid ${devtype} ${devnum}:${openwrt_rootpart} uuid
setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait

- Josua Mayer

Am 12.02.24 um 21:40 schrieb Dennis Gilmore:
> I am curious about your use cases for this. as ideally all systems use the generic distro boot paths and it is not needed for them.
>
> Dennis
>
> On Fri, Feb 2, 2024 at 9:13 AM Josua Mayer <josua@solid-run.com> wrote:
>
>     Update the helios4 defconfig to enable the 'setexpr' command, which is a
>     default and useful for various complex boot-scripts.
>
>     Signed-off-by: Josua Mayer <josua@solid-run.com>
>     ---
>      configs/helios4_defconfig | 1 -
>      1 file changed, 1 deletion(-)
>
>     diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
>     index 04194004f0..73f0638344 100644
>     --- a/configs/helios4_defconfig
>     +++ b/configs/helios4_defconfig
>     @@ -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
>
>     -- 
>     2.35.3
>
>
>
> -- 
> Dennis Gilmore
> Senior Manager Systems Enablement OpenShift Development

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/3] arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus
  2024-02-02 15:13 ` [PATCH v2 1/3] arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus Josua Mayer
@ 2024-03-05 10:32   ` Stefan Roese
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Roese @ 2024-03-05 10:32 UTC (permalink / raw)
  To: Josua Mayer, Dennis Gilmore, Tom Rini; +Cc: u-boot

On 2/2/24 16:13, Josua Mayer wrote:
> 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.
> 
> Signed-off-by: Josua Mayer <josua@solid-run.com>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   arch/arm/dts/armada-38x-solidrun-microsom.dtsi | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi
> index f6ae784bed..1540162e03 100644
> --- a/arch/arm/dts/armada-38x-solidrun-microsom.dtsi
> +++ b/arch/arm/dts/armada-38x-solidrun-microsom.dtsi
> @@ -99,6 +99,11 @@
>   };
>   
>   &i2c0 {
> +	clock-frequency = <400000>;
> +	pinctrl-0 = <&i2c0_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +
>   	eeprom@53 {
>   		compatible = "atmel,24c02";
>   		reg = <0x53>;
> 

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command
  2024-02-02 15:13 ` [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command Josua Mayer
  2024-02-12 20:40   ` Dennis Gilmore
@ 2024-03-05 10:32   ` Stefan Roese
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Roese @ 2024-03-05 10:32 UTC (permalink / raw)
  To: Josua Mayer, Dennis Gilmore, Tom Rini; +Cc: u-boot

On 2/2/24 16:13, Josua Mayer wrote:
> Update the helios4 defconfig to enable the 'setexpr' command, which is a
> default and useful for various complex boot-scripts.
> 
> Signed-off-by: Josua Mayer <josua@solid-run.com>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   configs/helios4_defconfig | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/configs/helios4_defconfig b/configs/helios4_defconfig
> index 04194004f0..73f0638344 100644
> --- a/configs/helios4_defconfig
> +++ b/configs/helios4_defconfig
> @@ -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
> 

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/3] board: helios-4: add config fragment for spi booting
  2024-02-02 15:13 ` [PATCH v2 3/3] board: helios-4: add config fragment for spi booting Josua Mayer
  2024-02-02 16:06   ` Tom Rini
@ 2024-03-05 10:32   ` Stefan Roese
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Roese @ 2024-03-05 10:32 UTC (permalink / raw)
  To: Josua Mayer, Dennis Gilmore, Tom Rini; +Cc: u-boot

On 2/2/24 16:13, Josua Mayer wrote:
> Add a config fragment with required differences for booting from spi
> flash instead of sd-card (default).
> 
> Settings for environment location are based on vendor u-boot:
> https://github.com/kobol-io/u-boot/blob/helios4/include/configs/helios4.h#L59
> 
> The fragment can be applied on top of helios4_defconfig by make:
> make helios4_defconfig spiboot.config
> 
> Signed-off-by: Josua Mayer <josua@solid-run.com>

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   board/kobol/helios4/spiboot.config | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/board/kobol/helios4/spiboot.config b/board/kobol/helios4/spiboot.config
> new file mode 100644
> index 0000000000..5ffb7d2e3b
> --- /dev/null
> +++ b/board/kobol/helios4/spiboot.config
> @@ -0,0 +1,4 @@
> +CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI=y
> +# CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC is not set
> +CONFIG_ENV_OFFSET=0x100000
> +CONFIG_ENV_SECT_SIZE=0x10000
> 

Viele Grüße,
Stefan Roese

-- 
DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-05 10:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 15:13 [PATCH v2 0/3] arm: mvebu: helios-4: add config fragment for spi booting et al Josua Mayer
2024-02-02 15:13 ` [PATCH v2 1/3] arm: dts: armada-38x-solidrun-microsom: configure i2c0 bus Josua Mayer
2024-03-05 10:32   ` Stefan Roese
2024-02-02 15:13 ` [PATCH v2 2/3] arm: mvebu: helios4_defconfig: enable setexpr command Josua Mayer
2024-02-12 20:40   ` Dennis Gilmore
2024-02-13 13:07     ` Josua Mayer
2024-03-05 10:32   ` Stefan Roese
2024-02-02 15:13 ` [PATCH v2 3/3] board: helios-4: add config fragment for spi booting Josua Mayer
2024-02-02 16:06   ` Tom Rini
2024-03-05 10:32   ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox