mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4
@ 2023-07-06  8:11 Oleksij Rempel
  2023-07-06  8:11 ` [PATCH v2 2/3] ARM: at91: add support for SAMA5D3 - Ethernet Development System Board Oleksij Rempel
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Oleksij Rempel @ 2023-07-06  8:11 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

ddramc has already support for sama5d3 and sama5d4, so enable it
officially.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/arm/mach-at91/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index b803a1185d..349586b683 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -104,6 +104,7 @@ config SOC_SAMA5D3
 	select HAVE_AT91_UTMI
 	select PINCTRL_AT91
 	select HAS_MACB
+	select HAVE_AT91_DDRAMC
 
 config SOC_SAMA5D4
 	bool
@@ -116,6 +117,7 @@ config SOC_SAMA5D4
 	select HAVE_AT91_UTMI
 	select PINCTRL_AT91
 	select HAS_MACB
+	select HAVE_AT91_DDRAMC
 
 config SOC_SAM9X60
 	bool
-- 
2.39.2




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

* [PATCH v2 2/3] ARM: at91: add support for SAMA5D3 - Ethernet Development System Board
  2023-07-06  8:11 [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4 Oleksij Rempel
@ 2023-07-06  8:11 ` Oleksij Rempel
  2023-07-06  8:11 ` [PATCH v2 3/3] ARM: at91: microchip-ksz9477-evb: migrate to sama5d3_barebox_entry() Oleksij Rempel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Oleksij Rempel @ 2023-07-06  8:11 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel, Ahmad Fatoum

Microchip Technology SAMA5D3 Ethernet Development System (EDS) Board
(DM320114) is an MPU-based platform for evaluating Ethernet Switch and
PHY products. Compatible Ethernet Switch and PHY Evaluation Boards
connect to the SAMA5D3 EDS Board via either an RGMII or RMII connector.
The Microchip Technology SAMA5D3 EDS Board is not intended for
stand-alone use and has no Ethernet capabilities when no daughter board
or an USB Ethernet adapter is connected.

For more information see:
https://www.microchip.com/en-us/development-tool/DM320114

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 Documentation/boards/at91.rst                 |  2 +
 arch/arm/boards/Makefile                      |  1 +
 .../arm/boards/microchip-sama5d3-eds/Makefile |  3 +
 .../boards/microchip-sama5d3-eds/lowlevel.c   | 62 +++++++++++++++++++
 arch/arm/configs/at91_multi_defconfig         |  1 +
 arch/arm/dts/Makefile                         |  1 +
 arch/arm/dts/at91-microchip-sama5d3-eds.dts   | 14 +++++
 arch/arm/mach-at91/Kconfig                    | 10 +++
 images/Makefile.at91                          |  9 +++
 9 files changed, 103 insertions(+)
 create mode 100644 arch/arm/boards/microchip-sama5d3-eds/Makefile
 create mode 100644 arch/arm/boards/microchip-sama5d3-eds/lowlevel.c
 create mode 100644 arch/arm/dts/at91-microchip-sama5d3-eds.dts

diff --git a/Documentation/boards/at91.rst b/Documentation/boards/at91.rst
index f502979df6..961ef58d84 100644
--- a/Documentation/boards/at91.rst
+++ b/Documentation/boards/at91.rst
@@ -35,6 +35,8 @@ The resulting images will be placed under ``images/``:
   barebox-at91sam9263ek.img
   barebox-microchip-ksz9477-evb.img
   barebox-microchip-ksz9477-evb-xload-mmc.img
+  barebox-microchip-sama5d3-eds.img
+  barebox-microchip-sama5d3-eds-xload-mmc.img
   barebox-sama5d3-xplained.img
   barebox-sama5d3-xplained-xload-mmc.img
   barebox-sama5d27-som1-ek.img
diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile
index 2877debad5..382e649fce 100644
--- a/arch/arm/boards/Makefile
+++ b/arch/arm/boards/Makefile
@@ -121,6 +121,7 @@ obj-$(CONFIG_MACH_SAMA5D27_SOM1)		+= sama5d27-som1/
 obj-$(CONFIG_MACH_SAMA5D3XEK)			+= sama5d3xek/
 obj-$(CONFIG_MACH_SAMA5D3_XPLAINED)		+= sama5d3_xplained/
 obj-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB)	+= microchip-ksz9477-evb/
+obj-$(CONFIG_MACH_MICROCHIP_SAMA5D3_EDS)	+= microchip-sama5d3-eds/
 obj-$(CONFIG_MACH_SAMA5D4_XPLAINED)		+= sama5d4_xplained/
 obj-$(CONFIG_MACH_SAMA5D4_WIFX)			+= sama5d4_wifx/
 obj-$(CONFIG_MACH_SAMA5D4EK)			+= sama5d4ek/
diff --git a/arch/arm/boards/microchip-sama5d3-eds/Makefile b/arch/arm/boards/microchip-sama5d3-eds/Makefile
new file mode 100644
index 0000000000..458f520900
--- /dev/null
+++ b/arch/arm/boards/microchip-sama5d3-eds/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+lwl-y += lowlevel.o
diff --git a/arch/arm/boards/microchip-sama5d3-eds/lowlevel.c b/arch/arm/boards/microchip-sama5d3-eds/lowlevel.c
new file mode 100644
index 0000000000..79346a9b6a
--- /dev/null
+++ b/arch/arm/boards/microchip-sama5d3-eds/lowlevel.c
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: GPL-2.0-only AND BSD-1-Clause
+/*
+ * Copyright (C) 2014, Atmel Corporation
+ * Copyright (C) 2018 Ahmad Fatoum, Pengutronix
+ */
+
+#include <common.h>
+#include <init.h>
+
+#include <asm/barebox-arm-head.h>
+#include <debug_ll.h>
+#include <mach/at91/barebox-arm.h>
+#include <mach/at91/iomux.h>
+#include <mach/at91/sama5d3.h>
+#include <mach/at91/sama5d3-xplained-ddramc.h>
+#include <mach/at91/xload.h>
+
+/* PCK = 528MHz, MCK = 132MHz */
+#define MASTER_CLOCK	132000000
+
+static void dbgu_init(void)
+{
+	void __iomem *pio = IOMEM(SAMA5D3_BASE_PIOB);
+
+	sama5d3_pmc_enable_periph_clock(SAMA5D3_ID_PIOB);
+
+	at91_mux_pio3_pin(pio, pin_to_mask(AT91_PIN_PB31), AT91_MUX_PERIPH_A, 0);
+
+	sama5d3_pmc_enable_periph_clock(SAMA5D3_ID_DBGU);
+	at91_dbgu_setup_ll(IOMEM(AT91_BASE_DBGU1), MASTER_CLOCK, 115200);
+
+	putc_ll('>');
+}
+
+SAMA5D3_ENTRY_FUNCTION(start_microchip_sama5d3_eds_xload_mmc, r4)
+{
+	sama5d3_lowlevel_init();
+
+	relocate_to_current_adr();
+	setup_c();
+
+	sama5d3_udelay_init(MASTER_CLOCK);
+	sama5d3_xplained_ddrconf();
+	if (IS_ENABLED(CONFIG_DEBUG_LL))
+		dbgu_init();
+
+	sama5d3_atmci_start_image(0, MASTER_CLOCK, 0);
+}
+
+extern char __dtb_z_at91_microchip_sama5d3_eds_start[];
+
+SAMA5D3_ENTRY_FUNCTION(start_microchip_sama5d3_eds, r4)
+{
+	void *fdt;
+
+	if (IS_ENABLED(CONFIG_DEBUG_LL))
+		dbgu_init();
+
+	fdt = __dtb_z_at91_microchip_sama5d3_eds_start + get_runtime_offset();
+
+	sama5d3_barebox_entry(r4, fdt);
+}
diff --git a/arch/arm/configs/at91_multi_defconfig b/arch/arm/configs/at91_multi_defconfig
index c93c2f5786..de47af3bd0 100644
--- a/arch/arm/configs/at91_multi_defconfig
+++ b/arch/arm/configs/at91_multi_defconfig
@@ -4,6 +4,7 @@ CONFIG_MACH_SKOV_ARM9CPU=y
 CONFIG_MACH_AT91SAM9263EK=y
 CONFIG_MACH_AT91SAM9X5EK=y
 CONFIG_MACH_MICROCHIP_KSZ9477_EVB=y
+CONFIG_MACH_MICROCHIP_SAMA5D3_EDS=y
 CONFIG_MACH_SAMA5D3_XPLAINED=y
 CONFIG_MACH_SAMA5D27_SOM1=y
 CONFIG_MACH_SAMA5D27_GIANTBOARD=y
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 98f4c4e019..eb9e0e062a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -193,6 +193,7 @@ lwl-$(CONFIG_MACH_AC_SXB) += ac-sxb.dtb.o
 lwl-$(CONFIG_MACH_AT91SAM9263EK_DT) += at91sam9263ek.dtb.o
 lwl-$(CONFIG_MACH_SAMA5D3_XPLAINED) += at91-sama5d3_xplained.dtb.o
 lwl-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB) += at91-microchip-ksz9477-evb.dtb.o
+lwl-$(CONFIG_MACH_MICROCHIP_SAMA5D3_EDS) += at91-microchip-sama5d3-eds.dtb.o
 lwl-$(CONFIG_MACH_SAMA5D27_SOM1) += at91-sama5d27_som1_ek.dtb.o
 lwl-$(CONFIG_MACH_SAMA5D27_GIANTBOARD) += at91-sama5d27_giantboard.dtb.o
 lwl-$(CONFIG_MACH_SAMA5D4_WIFX) += at91-sama5d4_wifx_l1.dtb.o
diff --git a/arch/arm/dts/at91-microchip-sama5d3-eds.dts b/arch/arm/dts/at91-microchip-sama5d3-eds.dts
new file mode 100644
index 0000000000..ad75fc882c
--- /dev/null
+++ b/arch/arm/dts/at91-microchip-sama5d3-eds.dts
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/dts-v1/;
+#include <arm/at91-sama5d3_eds.dts>
+#include "sama5d3.dtsi"
+
+/ {
+	chosen {
+		environment {
+			compatible = "barebox,environment";
+			device-path = &mmc0, "partname:0";
+			file-path = "barebox.env";
+		};
+	};
+};
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 349586b683..d249974725 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -606,6 +606,16 @@ config MACH_MICROCHIP_KSZ9477_EVB
 	help
 	  Select this if you are using Microchip's EVB-KSZ9477 Evaluation Kit.
 
+config MACH_MICROCHIP_SAMA5D3_EDS
+	bool "Microchip SAMA5D3 Ethernet Development System"
+	select SOC_SAMA5D3
+	select OFDEVICE
+	select MCI_ATMEL_PBL
+	select COMMON_CLK_OF_PROVIDER
+	help
+	  Select this if you are using Microchip's SAMA5D3 Ethernet Development
+	  System.
+
 config MACH_SAMA5D3_XPLAINED
 	bool "Atmel SAMA5D3_XPLAINED Evaluation Kit"
 	select SOC_SAMA5D3
diff --git a/images/Makefile.at91 b/images/Makefile.at91
index 19a81e2e9a..36f7259406 100644
--- a/images/Makefile.at91
+++ b/images/Makefile.at91
@@ -20,6 +20,15 @@ MAX_PBL_IMAGE_SIZE_start_sama5d3_xplained_ung8071_xload_mmc = 0xffff
 FILE_barebox-microchip-ksz9477-evb-xload-mmc.img = start_sama5d3_xplained_ung8071_xload_mmc.pblb
 image-$(CONFIG_MACH_MICROCHIP_KSZ9477_EVB) += barebox-microchip-ksz9477-evb-xload-mmc.img
 
+pblb-$(CONFIG_MACH_MICROCHIP_SAMA5D3_EDS) += start_microchip_sama5d3_eds
+FILE_barebox-microchip-sama5d3-eds.img = start_microchip_sama5d3_eds.pblb
+image-$(CONFIG_MACH_MICROCHIP_SAMA5D3_EDS) += barebox-microchip-sama5d3-eds.img
+
+pblb-$(CONFIG_MACH_MICROCHIP_SAMA5D3_EDS) += start_microchip_sama5d3_eds_xload_mmc
+MAX_PBL_IMAGE_SIZE_start_microchip_sama5d3_eds_xload_mmc = 0xffff
+FILE_barebox-microchip-sama5d3-eds-xload-mmc.img = start_microchip_sama5d3_eds_xload_mmc.pblb
+image-$(CONFIG_MACH_MICROCHIP_SAMA5D3_EDS) += barebox-microchip-sama5d3-eds-xload-mmc.img
+
 pblb-$(CONFIG_MACH_SAMA5D3_XPLAINED) += start_sama5d3_xplained
 FILE_barebox-sama5d3-xplained.img = start_sama5d3_xplained.pblb
 image-$(CONFIG_MACH_SAMA5D3_XPLAINED) += barebox-sama5d3-xplained.img
-- 
2.39.2




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

* [PATCH v2 3/3] ARM: at91: microchip-ksz9477-evb: migrate to sama5d3_barebox_entry()
  2023-07-06  8:11 [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4 Oleksij Rempel
  2023-07-06  8:11 ` [PATCH v2 2/3] ARM: at91: add support for SAMA5D3 - Ethernet Development System Board Oleksij Rempel
@ 2023-07-06  8:11 ` Oleksij Rempel
  2023-07-06  8:32   ` Ahmad Fatoum
  2023-07-06  8:27 ` [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4 Ahmad Fatoum
  2023-07-28  6:20 ` Sascha Hauer
  3 siblings, 1 reply; 8+ messages in thread
From: Oleksij Rempel @ 2023-07-06  8:11 UTC (permalink / raw)
  To: barebox; +Cc: Oleksij Rempel

We have sama5d3_barebox_entry(), so make use of it.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/arm/boards/microchip-ksz9477-evb/lowlevel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
index bda6a94160..aa2161daee 100644
--- a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
+++ b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
@@ -58,5 +58,5 @@ SAMA5D3_ENTRY_FUNCTION(start_sama5d3_xplained_ung8071, r4)
 
 	fdt = __dtb_z_at91_microchip_ksz9477_evb_start + get_runtime_offset();
 
-	barebox_arm_entry(SAMA5_DDRCS, SZ_256M, fdt);
+	sama5d3_barebox_entry(r4, fdt);
 }
-- 
2.39.2




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

* Re: [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4
  2023-07-06  8:11 [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4 Oleksij Rempel
  2023-07-06  8:11 ` [PATCH v2 2/3] ARM: at91: add support for SAMA5D3 - Ethernet Development System Board Oleksij Rempel
  2023-07-06  8:11 ` [PATCH v2 3/3] ARM: at91: microchip-ksz9477-evb: migrate to sama5d3_barebox_entry() Oleksij Rempel
@ 2023-07-06  8:27 ` Ahmad Fatoum
  2023-07-28  6:20 ` Sascha Hauer
  3 siblings, 0 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2023-07-06  8:27 UTC (permalink / raw)
  To: Oleksij Rempel, barebox

On 06.07.23 10:11, Oleksij Rempel wrote:
> ddramc has already support for sama5d3 and sama5d4, so enable it
> officially.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  arch/arm/mach-at91/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index b803a1185d..349586b683 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -104,6 +104,7 @@ config SOC_SAMA5D3
>  	select HAVE_AT91_UTMI
>  	select PINCTRL_AT91
>  	select HAS_MACB
> +	select HAVE_AT91_DDRAMC
>  
>  config SOC_SAMA5D4
>  	bool
> @@ -116,6 +117,7 @@ config SOC_SAMA5D4
>  	select HAVE_AT91_UTMI
>  	select PINCTRL_AT91
>  	select HAS_MACB
> +	select HAVE_AT91_DDRAMC
>  
>  config SOC_SAM9X60
>  	bool

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [PATCH v2 3/3] ARM: at91: microchip-ksz9477-evb: migrate to sama5d3_barebox_entry()
  2023-07-06  8:11 ` [PATCH v2 3/3] ARM: at91: microchip-ksz9477-evb: migrate to sama5d3_barebox_entry() Oleksij Rempel
@ 2023-07-06  8:32   ` Ahmad Fatoum
  2023-07-06  8:40     ` Oleksij Rempel
  0 siblings, 1 reply; 8+ messages in thread
From: Ahmad Fatoum @ 2023-07-06  8:32 UTC (permalink / raw)
  To: Oleksij Rempel, barebox

On 06.07.23 10:11, Oleksij Rempel wrote:
> We have sama5d3_barebox_entry(), so make use of it.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

I expected to see a /memory node removed, but I see now that I removed
them already in commit:
2e7e1d2512b0 ("ARM: AT91: sama5d3: always read memory size from controller")

Given that I missed selecting HAVE_AT91_DDRAMC, this means that booting
recent barebox without your first patch would lead to an error message during
boot up that initmem is used as no driver or DT added memory banks.
System should continue normally though.

For boards that already have a memory region in the DT, adding a memory
region by the driver that is identical should be silently accepted.

Could you verify this to make sure we don't introduce breakage?
That would also make patch 1 a candidate for being applied to master.

Thanks,
Ahmad


> ---
>  arch/arm/boards/microchip-ksz9477-evb/lowlevel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
> index bda6a94160..aa2161daee 100644
> --- a/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
> +++ b/arch/arm/boards/microchip-ksz9477-evb/lowlevel.c
> @@ -58,5 +58,5 @@ SAMA5D3_ENTRY_FUNCTION(start_sama5d3_xplained_ung8071, r4)
>  
>  	fdt = __dtb_z_at91_microchip_ksz9477_evb_start + get_runtime_offset();
>  
> -	barebox_arm_entry(SAMA5_DDRCS, SZ_256M, fdt);
> +	sama5d3_barebox_entry(r4, fdt);
>  }

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [PATCH v2 3/3] ARM: at91: microchip-ksz9477-evb: migrate to sama5d3_barebox_entry()
  2023-07-06  8:32   ` Ahmad Fatoum
@ 2023-07-06  8:40     ` Oleksij Rempel
  2023-07-06  8:44       ` Ahmad Fatoum
  0 siblings, 1 reply; 8+ messages in thread
From: Oleksij Rempel @ 2023-07-06  8:40 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Thu, Jul 06, 2023 at 10:32:30AM +0200, Ahmad Fatoum wrote:
> On 06.07.23 10:11, Oleksij Rempel wrote:
> > We have sama5d3_barebox_entry(), so make use of it.
> > 
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> 
> I expected to see a /memory node removed, but I see now that I removed
> them already in commit:
> 2e7e1d2512b0 ("ARM: AT91: sama5d3: always read memory size from controller")
> 
> Given that I missed selecting HAVE_AT91_DDRAMC, this means that booting
> recent barebox without your first patch would lead to an error message during
> boot up that initmem is used as no driver or DT added memory banks.
> System should continue normally though.

Yes, I have this error message. But it work without noticeable issues.

> For boards that already have a memory region in the DT, adding a memory
> region by the driver that is identical should be silently accepted.
> 
> Could you verify this to make sure we don't introduce breakage?
> That would also make patch 1 a candidate for being applied to master.

So far, it seems to work fine.

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [PATCH v2 3/3] ARM: at91: microchip-ksz9477-evb: migrate to sama5d3_barebox_entry()
  2023-07-06  8:40     ` Oleksij Rempel
@ 2023-07-06  8:44       ` Ahmad Fatoum
  0 siblings, 0 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2023-07-06  8:44 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: barebox

On 06.07.23 10:40, Oleksij Rempel wrote:
> On Thu, Jul 06, 2023 at 10:32:30AM +0200, Ahmad Fatoum wrote:
>> On 06.07.23 10:11, Oleksij Rempel wrote:
>>> We have sama5d3_barebox_entry(), so make use of it.
>>>
>>> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
>>
>> I expected to see a /memory node removed, but I see now that I removed
>> them already in commit:
>> 2e7e1d2512b0 ("ARM: AT91: sama5d3: always read memory size from controller")
>>
>> Given that I missed selecting HAVE_AT91_DDRAMC, this means that booting
>> recent barebox without your first patch would lead to an error message during
>> boot up that initmem is used as no driver or DT added memory banks.
>> System should continue normally though.
> 
> Yes, I have this error message. But it work without noticeable issues.
> 
>> For boards that already have a memory region in the DT, adding a memory
>> region by the driver that is identical should be silently accepted.
>>
>> Could you verify this to make sure we don't introduce breakage?
>> That would also make patch 1 a candidate for being applied to master.
> 
> So far, it seems to work fine.

Ok, thanks for confirmation!

Cheers,
Ahmad

> 
> Regards,
> Oleksij

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4
  2023-07-06  8:11 [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4 Oleksij Rempel
                   ` (2 preceding siblings ...)
  2023-07-06  8:27 ` [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4 Ahmad Fatoum
@ 2023-07-28  6:20 ` Sascha Hauer
  3 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2023-07-28  6:20 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: barebox

On Thu, Jul 06, 2023 at 10:11:24AM +0200, Oleksij Rempel wrote:
> ddramc has already support for sama5d3 and sama5d4, so enable it
> officially.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  arch/arm/mach-at91/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index b803a1185d..349586b683 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -104,6 +104,7 @@ config SOC_SAMA5D3
>  	select HAVE_AT91_UTMI
>  	select PINCTRL_AT91
>  	select HAS_MACB
> +	select HAVE_AT91_DDRAMC
>  
>  config SOC_SAMA5D4
>  	bool
> @@ -116,6 +117,7 @@ config SOC_SAMA5D4
>  	select HAVE_AT91_UTMI
>  	select PINCTRL_AT91
>  	select HAS_MACB
> +	select HAVE_AT91_DDRAMC
>  
>  config SOC_SAM9X60
>  	bool
> -- 
> 2.39.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2023-07-28  6:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06  8:11 [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4 Oleksij Rempel
2023-07-06  8:11 ` [PATCH v2 2/3] ARM: at91: add support for SAMA5D3 - Ethernet Development System Board Oleksij Rempel
2023-07-06  8:11 ` [PATCH v2 3/3] ARM: at91: microchip-ksz9477-evb: migrate to sama5d3_barebox_entry() Oleksij Rempel
2023-07-06  8:32   ` Ahmad Fatoum
2023-07-06  8:40     ` Oleksij Rempel
2023-07-06  8:44       ` Ahmad Fatoum
2023-07-06  8:27 ` [PATCH v2 1/3] ARM: at91: enable ddramc for sama5d3 and sama5d4 Ahmad Fatoum
2023-07-28  6:20 ` Sascha Hauer

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