All of lore.kernel.org
 help / color / mirror / Atom feed
* ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog
@ 2020-12-09  3:07 dgilmore at redhat.com
  2020-12-09  3:07 ` [V2 1/3] ARM: mvebu: helios4 adjust env sizes to enable SPI to work dgilmore at redhat.com
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: dgilmore at redhat.com @ 2020-12-09  3:07 UTC (permalink / raw)
  To: u-boot

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

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

* [V2 1/3] ARM: mvebu: helios4 adjust env sizes to enable SPI to work
  2020-12-09  3:07 ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog dgilmore at redhat.com
@ 2020-12-09  3:07 ` dgilmore at redhat.com
  2020-12-09  3:07 ` [V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI dgilmore at redhat.com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: dgilmore at redhat.com @ 2020-12-09  3:07 UTC (permalink / raw)
  To: u-boot

From: Dennis Gilmore <dennis@ausil.us>

mirror the clearfog setup to enable SPI to work

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
---
 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 0000000000..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 0x10000
+
+config ENV_OFFSET
+	hex "Environment offset"
+	default 0xF0000
+
+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 0x10000 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 0x20000
+	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=0x40000030
 CONFIG_SPL_SERIAL_SUPPORT=y
-- 
2.28.0

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

* [V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI
  2020-12-09  3:07 ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog dgilmore at redhat.com
  2020-12-09  3:07 ` [V2 1/3] ARM: mvebu: helios4 adjust env sizes to enable SPI to work dgilmore at redhat.com
@ 2020-12-09  3:07 ` dgilmore at redhat.com
  2021-02-10 19:28   ` Dennis Gilmore
  2020-12-09  3:07 ` [V2 3/3] ARM: mvebu: ClearFog make sure that SATA and UART images are buildable dgilmore at redhat.com
  2020-12-09 13:56 ` ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog Stefan Roese
  3 siblings, 1 reply; 9+ messages in thread
From: dgilmore at redhat.com @ 2020-12-09  3:07 UTC (permalink / raw)
  To: u-boot

From: Dennis Gilmore <dennis@ausil.us>

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 <dennis@ausil.us>
---
 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;
-	};
-};
-
 &eth0 {
 	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 at 52 {
+		u-boot,dm-spl;
+	};
+
+	eeprom at 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 = &eth0;
+		spi1 = &spi1;
+		i2c0 = &i2c0;
+		i2c1 = &i2c1;
 	};
 
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
@@ -306,3 +310,11 @@
 		};
 	};
 };
+
+&w25q32 {
+	status = "okay";
+};
+
+&spi1 {
+	status = "okay";
+};
-- 
2.28.0

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

* [V2 3/3] ARM: mvebu: ClearFog make sure that SATA and UART images are buildable
  2020-12-09  3:07 ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog dgilmore at redhat.com
  2020-12-09  3:07 ` [V2 1/3] ARM: mvebu: helios4 adjust env sizes to enable SPI to work dgilmore at redhat.com
  2020-12-09  3:07 ` [V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI dgilmore at redhat.com
@ 2020-12-09  3:07 ` dgilmore at redhat.com
  2020-12-09 13:56 ` ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog Stefan Roese
  3 siblings, 0 replies; 9+ messages in thread
From: dgilmore at redhat.com @ 2020-12-09  3:07 UTC (permalink / raw)
  To: u-boot

From: Dennis Gilmore <dennis@ausil.us>

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 <dennis@ausil.us>
---
 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 0x10000 if MVEBU_SPL_BOOT_DEVICE_MMC
+	default 0x10000 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

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

* ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog
  2020-12-09  3:07 ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog dgilmore at redhat.com
                   ` (2 preceding siblings ...)
  2020-12-09  3:07 ` [V2 3/3] ARM: mvebu: ClearFog make sure that SATA and UART images are buildable dgilmore at redhat.com
@ 2020-12-09 13:56 ` Stefan Roese
  2020-12-09 14:34   ` Dennis Gilmore
  3 siblings, 1 reply; 9+ messages in thread
From: Stefan Roese @ 2020-12-09 13:56 UTC (permalink / raw)
  To: u-boot

Hi Dennis,

On 09.12.20 04:07, dgilmore at redhat.com wrote:
> 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

Could you please test this small patch on the db-mv784mp-gp and report
back, if this works:

diff --git a/arch/arm/dts/armada-xp-gp.dts b/arch/arm/dts/armada-xp-gp.dts
index 1139e9469a..57abbbba58 100644
--- a/arch/arm/dts/armada-xp-gp.dts
+++ b/arch/arm/dts/armada-xp-gp.dts
@@ -93,6 +93,7 @@
                 internal-regs {
                         serial at 12000 {
                                 status = "okay";
+                               u-boot,dm-pre-reloc;
                         };
                         serial at 12100 {
                                 status = "okay";


Thanks,
Stefan

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

* ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog
  2020-12-09 13:56 ` ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog Stefan Roese
@ 2020-12-09 14:34   ` Dennis Gilmore
  0 siblings, 0 replies; 9+ messages in thread
From: Dennis Gilmore @ 2020-12-09 14:34 UTC (permalink / raw)
  To: u-boot

On Wed, Dec 9, 2020 at 7:57 AM Stefan Roese <sr@denx.de> wrote:
>
> Hi Dennis,
>
> On 09.12.20 04:07, dgilmore at redhat.com wrote:
> > 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
>
> Could you please test this small patch on the db-mv784mp-gp and report
> back, if this works:
>
> diff --git a/arch/arm/dts/armada-xp-gp.dts b/arch/arm/dts/armada-xp-gp.dts
> index 1139e9469a..57abbbba58 100644
> --- a/arch/arm/dts/armada-xp-gp.dts
> +++ b/arch/arm/dts/armada-xp-gp.dts
> @@ -93,6 +93,7 @@
>                  internal-regs {
>                          serial at 12000 {
>                                  status = "okay";
> +                               u-boot,dm-pre-reloc;

with this dts change the serial port is registered correctly

Dennis
>                          };
>                          serial at 12100 {
>                                  status = "okay";
>
>
> Thanks,
> Stefan
>


-- 
Dennis Gilmore
Multiple Architecture Portfolio Enablement
T: +1-312-660-3523

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

* [V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI
  2020-12-09  3:07 ` [V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI dgilmore at redhat.com
@ 2021-02-10 19:28   ` Dennis Gilmore
  2021-02-10 20:42     ` Tom Rini
  2021-02-11  3:22     ` Stefan Roese
  0 siblings, 2 replies; 9+ messages in thread
From: Dennis Gilmore @ 2021-02-10 19:28 UTC (permalink / raw)
  To: u-boot

could I please get someone to review this patch

Dennis

On Tue, Dec 8, 2020 at 9:07 PM <dgilmore@redhat.com> wrote:
>
> From: Dennis Gilmore <dennis@ausil.us>
>
> 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 <dennis@ausil.us>
> ---
>  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;
> -       };
> -};
> -
>  &eth0 {
>         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 at 52 {
> +               u-boot,dm-spl;
> +       };
> +
> +       eeprom at 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 = &eth0;
> +               spi1 = &spi1;
> +               i2c0 = &i2c0;
> +               i2c1 = &i2c1;
>         };
>
> +
>         chosen {
>                 stdout-path = "serial0:115200n8";
>         };
> @@ -306,3 +310,11 @@
>                 };
>         };
>  };
> +
> +&w25q32 {
> +       status = "okay";
> +};
> +
> +&spi1 {
> +       status = "okay";
> +};
> --
> 2.28.0
>

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

* [V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI
  2021-02-10 19:28   ` Dennis Gilmore
@ 2021-02-10 20:42     ` Tom Rini
  2021-02-11  3:22     ` Stefan Roese
  1 sibling, 0 replies; 9+ messages in thread
From: Tom Rini @ 2021-02-10 20:42 UTC (permalink / raw)
  To: u-boot

On Wed, Feb 10, 2021 at 01:28:33PM -0600, Dennis Gilmore wrote:

> could I please get someone to review this patch

Do the changes in armada-388-helios4.dts bring us more in sync with the
Linux kernel side?  Thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210210/a867a2cc/attachment.sig>

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

* [V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI
  2021-02-10 19:28   ` Dennis Gilmore
  2021-02-10 20:42     ` Tom Rini
@ 2021-02-11  3:22     ` Stefan Roese
  1 sibling, 0 replies; 9+ messages in thread
From: Stefan Roese @ 2021-02-11  3:22 UTC (permalink / raw)
  To: u-boot

Hi Dennis,

On 10.02.21 20:28, Dennis Gilmore wrote:
> could I please get someone to review this patch
> 
> Dennis

It's already included in mainline. I pulled it in a few days ago.
Please check if something else is missing.

Thanks,
Stefan

> On Tue, Dec 8, 2020 at 9:07 PM <dgilmore@redhat.com> wrote:
>>
>> From: Dennis Gilmore <dennis@ausil.us>
>>
>> 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 <dennis@ausil.us>
>> ---
>>   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;
>> -       };
>> -};
>> -
>>   &eth0 {
>>          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 at 52 {
>> +               u-boot,dm-spl;
>> +       };
>> +
>> +       eeprom at 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 = &eth0;
>> +               spi1 = &spi1;
>> +               i2c0 = &i2c0;
>> +               i2c1 = &i2c1;
>>          };
>>
>> +
>>          chosen {
>>                  stdout-path = "serial0:115200n8";
>>          };
>> @@ -306,3 +310,11 @@
>>                  };
>>          };
>>   };
>> +
>> +&w25q32 {
>> +       status = "okay";
>> +};
>> +
>> +&spi1 {
>> +       status = "okay";
>> +};
>> --
>> 2.28.0
>>


Viele Gr??e,
Stefan

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

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

end of thread, other threads:[~2021-02-11  3:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09  3:07 ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog dgilmore at redhat.com
2020-12-09  3:07 ` [V2 1/3] ARM: mvebu: helios4 adjust env sizes to enable SPI to work dgilmore at redhat.com
2020-12-09  3:07 ` [V2 2/3] ARM: mvebu: helios4 dts changes to enable SPI dgilmore at redhat.com
2021-02-10 19:28   ` Dennis Gilmore
2021-02-10 20:42     ` Tom Rini
2021-02-11  3:22     ` Stefan Roese
2020-12-09  3:07 ` [V2 3/3] ARM: mvebu: ClearFog make sure that SATA and UART images are buildable dgilmore at redhat.com
2020-12-09 13:56 ` ARM: mvebu: enable SPI for helios4 and sata and uart images for clearfog Stefan Roese
2020-12-09 14:34   ` Dennis Gilmore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.