public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia
@ 2019-05-10  3:10 Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 1/6] arm: mvebu: turris_omnia: set default ethernet adapter Marek Behún
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Marek Behún @ 2019-05-10  3:10 UTC (permalink / raw)
  To: u-boot

Hi Stefan, I am sending five another fixes for Turris Omnia.

Marek

Marek Behún (6):
  arm: mvebu: turris_omnia: set default ethernet adapter
  arm: mvebu: turris_omnia: fix adapters MAC addresses
  arm: mvebu: turris_omnia: change environment address in SPI flash
  arm: mvebu: turris_omnia: remove unneeded macro from board config
  arm: mvebu: turris_omnia: prefer SCSI booting before USB
  arm: mvebu: turris_omnia: call pci_init from board init code

 board/CZ.NIC/turris_omnia/turris_omnia.c |  9 ++++++---
 include/configs/turris_omnia.h           | 12 ++++--------
 2 files changed, 10 insertions(+), 11 deletions(-)

-- 
2.21.0

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

* [U-Boot] [PATCH u-boot-marvell 1/6] arm: mvebu: turris_omnia: set default ethernet adapter
  2019-05-10  3:10 [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Marek Behún
@ 2019-05-10  3:10 ` Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 2/6] arm: mvebu: turris_omnia: fix adapters MAC addresses Marek Behún
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Marek Behún @ 2019-05-10  3:10 UTC (permalink / raw)
  To: u-boot

Set default value for the ethact variable to the WAN port.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 include/configs/turris_omnia.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 018f54428b..290828d73e 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -122,6 +122,7 @@
 	LOAD_ADDRESS_ENV_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
 	"console=ttyS0,115200\0" \
+	"ethact=ethernet at 34000\0" \
 	BOOTENV
 
 #endif /* CONFIG_SPL_BUILD */
-- 
2.21.0

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

* [U-Boot] [PATCH u-boot-marvell 2/6] arm: mvebu: turris_omnia: fix adapters MAC addresses
  2019-05-10  3:10 [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 1/6] arm: mvebu: turris_omnia: set default ethernet adapter Marek Behún
@ 2019-05-10  3:10 ` Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 3/6] arm: mvebu: turris_omnia: change environment address in SPI flash Marek Behún
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Marek Behún @ 2019-05-10  3:10 UTC (permalink / raw)
  To: u-boot

The board code reads MAC addresses from the ATSHA204A cryptochip.
For compatibility reasons the ethernet adapters on this SOC are not
enumerated in register address order. But when Omnia was first
manufactured this was done differently.

Change setting of MAC addresses to conform to the description on the
stickers sticked on actual Omnias.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 board/CZ.NIC/turris_omnia/turris_omnia.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index ad6e29021e..cddde50b96 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -514,17 +514,17 @@ int misc_init_r(void)
 	mac[5] = mac1[3];
 
 	if (is_valid_ethaddr(mac))
-		eth_env_set_enetaddr("ethaddr", mac);
+		eth_env_set_enetaddr("eth1addr", mac);
 
 	increment_mac(mac);
 
 	if (is_valid_ethaddr(mac))
-		eth_env_set_enetaddr("eth1addr", mac);
+		eth_env_set_enetaddr("eth2addr", mac);
 
 	increment_mac(mac);
 
 	if (is_valid_ethaddr(mac))
-		eth_env_set_enetaddr("eth2addr", mac);
+		eth_env_set_enetaddr("ethaddr", mac);
 
 out:
 	return 0;
-- 
2.21.0

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

* [U-Boot] [PATCH u-boot-marvell 3/6] arm: mvebu: turris_omnia: change environment address in SPI flash
  2019-05-10  3:10 [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 1/6] arm: mvebu: turris_omnia: set default ethernet adapter Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 2/6] arm: mvebu: turris_omnia: fix adapters MAC addresses Marek Behún
@ 2019-05-10  3:10 ` Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 4/6] arm: mvebu: turris_omnia: remove unneeded macro from board config Marek Behún
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Marek Behún @ 2019-05-10  3:10 UTC (permalink / raw)
  To: u-boot

The U-Boot partition is 1 MiB and environment is 64 KiB. It does not
make sense to have environment at 0xc0000 when it could be at 0xf0000
and we can have more space for U-Boot binary.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 include/configs/turris_omnia.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 290828d73e..8e3d5cc8cf 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -22,9 +22,9 @@
 #define CONFIG_EHCI_IS_TDI
 
 /* Environment in SPI NOR flash */
-#define CONFIG_ENV_OFFSET		(3*(1 << 18)) /* 768KiB in */
 #define CONFIG_ENV_SIZE			(64 << 10) /* 64KiB */
-#define CONFIG_ENV_SECT_SIZE		(256 << 10) /* 256KiB sectors */
+#define CONFIG_ENV_OFFSET		((1 << 20) - CONFIG_ENV_SIZE)
+#define CONFIG_ENV_SECT_SIZE		(64 << 10) /* 64KiB */
 
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
 
-- 
2.21.0

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

* [U-Boot] [PATCH u-boot-marvell 4/6] arm: mvebu: turris_omnia: remove unneeded macro from board config
  2019-05-10  3:10 [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Marek Behún
                   ` (2 preceding siblings ...)
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 3/6] arm: mvebu: turris_omnia: change environment address in SPI flash Marek Behún
@ 2019-05-10  3:10 ` Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 5/6] arm: mvebu: turris_omnia: prefer SCSI booting before USB Marek Behún
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Marek Behún @ 2019-05-10  3:10 UTC (permalink / raw)
  To: u-boot

This is not needed here since Omnia is using DM_PCI now.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 include/configs/turris_omnia.h | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 8e3d5cc8cf..26f85466a4 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -28,11 +28,6 @@
 
 #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
 
-/* PCIe support */
-#ifndef CONFIG_SPL_BUILD
-#define CONFIG_PCI_SCAN_SHOW
-#endif
-
 /* Keep device tree and initrd in lower memory so the kernel can access them */
 #define RELOCATION_LIMITS_ENV_SETTINGS	\
 	"fdt_high=0x10000000\0"		\
-- 
2.21.0

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

* [U-Boot] [PATCH u-boot-marvell 5/6] arm: mvebu: turris_omnia: prefer SCSI booting before USB
  2019-05-10  3:10 [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Marek Behún
                   ` (3 preceding siblings ...)
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 4/6] arm: mvebu: turris_omnia: remove unneeded macro from board config Marek Behún
@ 2019-05-10  3:10 ` Marek Behún
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 6/6] arm: mvebu: turris_omnia: call pci_init from board init code Marek Behún
  2019-05-10  8:23 ` [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Stefan Roese
  6 siblings, 0 replies; 11+ messages in thread
From: Marek Behún @ 2019-05-10  3:10 UTC (permalink / raw)
  To: u-boot

If SCSI and USB boot options are both available, try to boot from SCSI
first.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 include/configs/turris_omnia.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 26f85466a4..edd776ec70 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -92,8 +92,8 @@
 
 #define BOOT_TARGET_DEVICES(func) \
 	BOOT_TARGET_DEVICES_MMC(func) \
-	BOOT_TARGET_DEVICES_USB(func) \
 	BOOT_TARGET_DEVICES_SCSI(func) \
+	BOOT_TARGET_DEVICES_USB(func) \
 	func(PXE, pxe, na) \
 	func(DHCP, dhcp, na)
 
-- 
2.21.0

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

* [U-Boot] [PATCH u-boot-marvell 6/6] arm: mvebu: turris_omnia: call pci_init from board init code
  2019-05-10  3:10 [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Marek Behún
                   ` (4 preceding siblings ...)
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 5/6] arm: mvebu: turris_omnia: prefer SCSI booting before USB Marek Behún
@ 2019-05-10  3:10 ` Marek Behún
  2019-05-10  8:16   ` Stefan Roese
  2019-05-10  8:23 ` [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Stefan Roese
  6 siblings, 1 reply; 11+ messages in thread
From: Marek Behún @ 2019-05-10  3:10 UTC (permalink / raw)
  To: u-boot

We always want to enumerate PCIe devices, because withouth this they
won't work in Linux.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 board/CZ.NIC/turris_omnia/turris_omnia.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
index cddde50b96..db99db0ccf 100644
--- a/board/CZ.NIC/turris_omnia/turris_omnia.c
+++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
@@ -412,6 +412,9 @@ int board_late_init(void)
 	set_regdomain();
 	handle_reset_button();
 #endif
+#ifdef CONFIG_PCI_MVEBU
+	pci_init();
+#endif
 
 	return 0;
 }
-- 
2.21.0

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

* [U-Boot] [PATCH u-boot-marvell 6/6] arm: mvebu: turris_omnia: call pci_init from board init code
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 6/6] arm: mvebu: turris_omnia: call pci_init from board init code Marek Behún
@ 2019-05-10  8:16   ` Stefan Roese
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Roese @ 2019-05-10  8:16 UTC (permalink / raw)
  To: u-boot

On 10.05.19 05:10, Marek Behún wrote:
> We always want to enumerate PCIe devices, because withouth this they
> won't work in Linux.
> 
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> ---
>   board/CZ.NIC/turris_omnia/turris_omnia.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
> index cddde50b96..db99db0ccf 100644
> --- a/board/CZ.NIC/turris_omnia/turris_omnia.c
> +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
> @@ -412,6 +412,9 @@ int board_late_init(void)
>   	set_regdomain();
>   	handle_reset_button();
>   #endif
> +#ifdef CONFIG_PCI_MVEBU
> +	pci_init();
> +#endif

Do you have CONFIG_PCI_MVEBU enabled on this board defconfig? If yes,
then please remove the #ifdef here.

Thanks,
Stefan

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

* [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia
  2019-05-10  3:10 [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Marek Behún
                   ` (5 preceding siblings ...)
  2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 6/6] arm: mvebu: turris_omnia: call pci_init from board init code Marek Behún
@ 2019-05-10  8:23 ` Stefan Roese
  2019-05-10  9:50   ` Chris Packham
  2019-05-10 11:45   ` Marek Behun
  6 siblings, 2 replies; 11+ messages in thread
From: Stefan Roese @ 2019-05-10  8:23 UTC (permalink / raw)
  To: u-boot

Hi Marek,

(Added Chris to Cc)

On 10.05.19 05:10, Marek Behún wrote:
> Hi Stefan, I am sending five another fixes for Turris Omnia.

Thanks. I'll queue those once they are ready for the next merge
window.

BTW: I'm currently testing latest mainline on an Armada XP target
(theadorable). And it fails in SPL without any output on the
UART. v2019.04 works just fine. I'm debugging right now...

Did you already test latest mainline on turris_omnia?

Chris, could you please also do a quick test on an Armada XP / 38x
(or similar) board with latest mainline?

Thanks,
Stefan

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

* [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia
  2019-05-10  8:23 ` [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Stefan Roese
@ 2019-05-10  9:50   ` Chris Packham
  2019-05-10 11:45   ` Marek Behun
  1 sibling, 0 replies; 11+ messages in thread
From: Chris Packham @ 2019-05-10  9:50 UTC (permalink / raw)
  To: u-boot

On Fri, May 10, 2019 at 8:23 PM Stefan Roese <sr@denx.de> wrote:
>
> Hi Marek,
>
> (Added Chris to Cc)
>
> On 10.05.19 05:10, Marek Behún wrote:
> > Hi Stefan, I am sending five another fixes for Turris Omnia.
>
> Thanks. I'll queue those once they are ready for the next merge
> window.
>
> BTW: I'm currently testing latest mainline on an Armada XP target
> (theadorable). And it fails in SPL without any output on the
> UART. v2019.04 works just fine. I'm debugging right now...
>
> Did you already test latest mainline on turris_omnia?
>
> Chris, could you please also do a quick test on an Armada XP / 38x
> (or similar) board with latest mainline?
>

Tested master at commit f30f268a07b0 ("Merge tag
'rockchip-for-v2019.07-rc1' of git://git.denx.de/u-boot-rockchip") on
the x530 and it works fine. I haven't got any other boards accessible
at the moment (plus I've killed my Armada XP board).

> Thanks,
> Stefan

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

* [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia
  2019-05-10  8:23 ` [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Stefan Roese
  2019-05-10  9:50   ` Chris Packham
@ 2019-05-10 11:45   ` Marek Behun
  1 sibling, 0 replies; 11+ messages in thread
From: Marek Behun @ 2019-05-10 11:45 UTC (permalink / raw)
  To: u-boot

> Did you already test latest mainline on turris_omnia?

Yes, I am working on mainline + these patches.

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

end of thread, other threads:[~2019-05-10 11:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-10  3:10 [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Marek Behún
2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 1/6] arm: mvebu: turris_omnia: set default ethernet adapter Marek Behún
2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 2/6] arm: mvebu: turris_omnia: fix adapters MAC addresses Marek Behún
2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 3/6] arm: mvebu: turris_omnia: change environment address in SPI flash Marek Behún
2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 4/6] arm: mvebu: turris_omnia: remove unneeded macro from board config Marek Behún
2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 5/6] arm: mvebu: turris_omnia: prefer SCSI booting before USB Marek Behún
2019-05-10  3:10 ` [U-Boot] [PATCH u-boot-marvell 6/6] arm: mvebu: turris_omnia: call pci_init from board init code Marek Behún
2019-05-10  8:16   ` Stefan Roese
2019-05-10  8:23 ` [U-Boot] [PATCH u-boot-marvell 0/6] More fixes for Turris Omnia Stefan Roese
2019-05-10  9:50   ` Chris Packham
2019-05-10 11:45   ` Marek Behun

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