All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 10/10] ARM: socfpga: add Arrow AXE5 Agilex5 board
Date: Wed, 19 Feb 2025 14:54:46 +0100	[thread overview]
Message-ID: <Z7XipiIsN9Vk1Lpu@pengutronix.de> (raw)
In-Reply-To: <20250218-v2024-10-0-topic-socfpga-agilex5-v2-10-30b6f507810b@pengutronix.de>

On Tue, Feb 18, 2025 at 10:21:35AM +0100, Steffen Trumtrar wrote:
> diff --git a/arch/arm/boards/arrow-axe5-eagle/lowlevel.c b/arch/arm/boards/arrow-axe5-eagle/lowlevel.c
> new file mode 100644
> index 0000000000000000000000000000000000000000..b736ca643f86b031dc070baf62f15a4a09e5aaba
> --- /dev/null
> +++ b/arch/arm/boards/arrow-axe5-eagle/lowlevel.c
> @@ -0,0 +1,74 @@
> +// SPDX-License-Identifier: GPL-2.0
> +#include <common.h>
> +#include <io.h>
> +#include <linux/sizes.h>
> +#include <asm/barebox-arm.h>
> +#include <asm/system.h>
> +#include <pbl.h>
> +#include <mach/socfpga/debug_ll.h>
> +#include <mach/socfpga/init.h>
> +#include <mach/socfpga/generic.h>
> +#include <mach/socfpga/mailbox_s10.h>
> +#include <mach/socfpga/soc64-firewall.h>
> +#include <mach/socfpga/soc64-regs.h>
> +#include <mach/socfpga/soc64-sdram.h>
> +#include <mach/socfpga/soc64-system-manager.h>
> +
> +extern char __dtb_z_socfpga_agilex5_axe5_eagle_start[];
> +
> +#define AXE5_STACKTOP	(SZ_512K)
> +
> +static noinline void axe5_eagle_continue(void)
> +{
> +	void *fdt;
> +
> +	agilex5_clk_init();
> +
> +	socfpga_uart_setup_ll();
> +	pbl_set_putc(socfpga_uart_putc, (void *) SOCFPGA_UART0_ADDRESS);
> +
> +	pr_debug("Lowlevel init done\n");
> +
> +	printk("Change the pullup values on EMAC2 HPS mii signals\n");

debugging leftover?

> +	writel(0x14, SOCFPGA_PINMUX_ADDRESS + 0x224);
> +	writel(0x14, SOCFPGA_PINMUX_ADDRESS + 0x228);
> +	writel(0x14, SOCFPGA_PINMUX_ADDRESS + 0x23c);
> +	writel(0x14, SOCFPGA_PINMUX_ADDRESS + 0x234);
> +	writel(0x14, SOCFPGA_PINMUX_ADDRESS + 0x248);
> +	writel(0x14, SOCFPGA_PINMUX_ADDRESS + 0x24c);
> +
> +	writel(0x410, 0x10c03304);
> +	writel(0x410, 0x10c03300);
> +	/* reset the phy via GPIO10. We currently haven't got enough space
> +	 * to enable the gpio driver in barebox. */
> +	writel(0x000, 0x10c03300);
> +	mdelay(1000);

Quite a long time. Is this necessary?

> +	writel(0x410, 0x10c03300);
> +
> +	if (current_el() == 3) {
> +		agilex5_initialize_security_policies();
> +		pr_debug("Security policies initialized\n");
> +
> +		agilex5_ddr_init_full();
> +
> +		socfpga_mailbox_s10_init();
> +		socfpga_mailbox_s10_qspi_open();
> +
> +		agilex5_load_and_start_image_via_tfa(SZ_1G);
> +	}
> +
> +	fdt = __dtb_z_socfpga_agilex5_axe5_eagle_start;
> +
> +	barebox_arm_entry(SOCFPGA_AGILEX5_DDR_BASE + SZ_1M, SZ_1G - SZ_1M, fdt);
> +}
> +
> +ENTRY_FUNCTION_WITHSTACK(start_socfpga_agilex5_axe5_eagle, AXE5_STACKTOP, r0, r1, r2)
> +{
> +	if (current_el() == 3)
> +		socfpga_agilex5_cpu_lowlevel_init();
> +
> +	relocate_to_current_adr();
> +	setup_c();
> +
> +	axe5_eagle_continue();
> +}
> diff --git a/arch/arm/configs/socfpga-agilex5_defconfig b/arch/arm/configs/socfpga-agilex5_defconfig
> new file mode 100644
> index 0000000000000000000000000000000000000000..b443a1281e6ad621d7270cade3ea0d60ccdc9af5
> --- /dev/null
> +++ b/arch/arm/configs/socfpga-agilex5_defconfig

Do we need another defconfig? Can we add it to multi_v8_defconfig
instead?

Sascha

-- 
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:[~2025-02-19 13:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18  9:21 [PATCH v2 00/10] ARM: SoCFPGA: Add initial support for Agilex5 Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 01/10] ARM: socfpga: kconfig: sort entries Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 02/10] mach: socfpga: debug_ll: rework putc_ll Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 03/10] reset: reset-socfpga: build only for 32-bit socfpga Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 04/10] arm: socfgpa: add support for SoCFPGA Agilex5 Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 05/10] linux: clk: add clk_parent_data Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 06/10] clk: support init->parent_data Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 07/10] clk: socfpga: add agilex5 clock support Steffen Trumtrar
2025-02-19 12:21   ` Sascha Hauer
2025-02-18  9:21 ` [PATCH v2 08/10] net: phy: add Analog Devices ADIN1300 Steffen Trumtrar
2025-02-19 12:20   ` Sascha Hauer
2025-02-18  9:21 ` [PATCH v2 09/10] net: add support for Designware XGMAC (10gb) ethernet Steffen Trumtrar
2025-02-19 13:47   ` Sascha Hauer
2025-02-18  9:21 ` [PATCH v2 10/10] ARM: socfpga: add Arrow AXE5 Agilex5 board Steffen Trumtrar
2025-02-19 13:54   ` Sascha Hauer [this message]
2025-08-05 10:11 ` [PATCH v2 00/10] ARM: SoCFPGA: Add initial support for Agilex5 Sascha Hauer

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=Z7XipiIsN9Vk1Lpu@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.trumtrar@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 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.