mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Oleksij Rempel <o.rempel@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH v1] ARM: at91: add support for SAMA5D3 - Ethernet Development System Board
Date: Thu, 6 Jul 2023 07:24:18 +0200	[thread overview]
Message-ID: <6aa34f8b-bdb7-b1e8-e8b1-c9d53a25dc77@pengutronix.de> (raw)
In-Reply-To: <20230706050343.558251-1-o.rempel@pengutronix.de>

Hello Oleksij,

On 06.07.23 07:03, Oleksij Rempel wrote:
> 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>

Few suggestions below. With these addressed:

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

> +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();
> +
> +	barebox_arm_entry(SAMA5_DDRCS, SZ_256M, fdt);

sama5d3_barebox_entry(r4, fdt);

This way you don't hardcode memory size and you can use $bootsource, $bootsource_instance
in barebox proper.

> 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..870d7905be
> --- /dev/null
> +++ b/arch/arm/dts/at91-microchip-sama5d3-eds.dts
> @@ -0,0 +1,19 @@
> +/* 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";
> +		};
> +	};
> +
> +	memory@20000000 {
> +		device_type = "memory";
> +		reg = <0x20000000 0x10000000>;
> +	};

You should be able to drop this and rely on the atmel,sama5d3-ddramc driver.

> +};
> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
> index b803a1185d..b7db8665aa 100644
> --- a/arch/arm/mach-at91/Kconfig
> +++ b/arch/arm/mach-at91/Kconfig
> @@ -604,6 +604,16 @@ config MACH_MICROCHIP_KSZ9477_EVB
>  	help
>  	  Select this if you are using Microchip's EVB-KSZ9477 Evaluation Kit.
>  
> +config MACH_MICROCHIP_SAMA5D3_EDS

Can you enable this board in at91_multi_defconfig?

Cheers,
Ahmad

-- 
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 |




      reply	other threads:[~2023-07-06  5:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06  5:03 Oleksij Rempel
2023-07-06  5:24 ` Ahmad Fatoum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6aa34f8b-bdb7-b1e8-e8b1-c9d53a25dc77@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=o.rempel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox