All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: Simon Glass <sjg@chromium.org>
Cc: trini@konsulko.com, ilias.apalodimas@linaro.org,
	marscheng@google.com, eleanor15x@gmail.com,
	jserv@ccns.ncku.edu.tw, u-boot@lists.u-boot-project.org
Subject: Re: [PATCH 2/4] board: google: Add Google Tensor G5 board support
Date: Fri, 27 Nov 2026 13:49:40 +0800	[thread overview]
Message-ID: <awkZ9GzPbbDBxp3v@google.com> (raw)
In-Reply-To: <CAFLszTj7zprFA34rZfsnqyPFNMUco6udWU=vZcwb4w29cuf0yQ@mail.gmail.com>

Hi Simon,

Just realized that my previous email didn't seem to go through.
Sorry about that.

On Mon, Oct 19, 2026 at 06:27:39AM -0700, Simon Glass wrote:
> Hi Kuan-Wei,
> 
> On 2026-10-16T04:02:12, Kuan-Wei Chiu <visitorckw@gmail.com> wrote:
> > board: google: Add Google Tensor G5 board support
> >
> > Add initial board support for Google Tensor G5 SoC boards. U-Boot
> > runs as BL33 loaded at 0xbe000000. Configure the MMU map, DRAM
> > bounds, and disable the APC watchdog left running by earlier
> > bootloader stages.
> >
> > Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
> >
> >  MAINTAINERS                  |  2 ++
> >  arch/arm/mach-google/Kconfig | 11 ++++++++
> >  board/google/lga/Kconfig     | 14 ++++++++++
> >  board/google/lga/MAINTAINERS |  5 ++++
> >  board/google/lga/Makefile    |  3 ++
> >  board/google/lga/lga.c       | 65 ++++++++++++++++++++++++++++++++++++++++++++
> >  include/configs/lga.h        |  9 ++++++
> >  7 files changed, 109 insertions(+)
> 
> > U-Boot 2026.10-00821-g86c1a8698ac2 (Oct 14 2026 - 21:47:47 +0000)
> 
> >
> > Model: Frankel
> > DRAM:  2 GiB
> > ERROR: reserving fdt memory region failed (addr=be000000 size=1000000 flags=2): -17
> 
> Just to check, is this -EEXIST because the DT already carries a
> reserved-memory entry covering the BL33 load region, or something
> U-Boot adds itself twice ? Worth tracking down before the series lands
> rather than leaving a visible ERROR on every boot.

Yes, upstream lga.dtsi reserves 0xbe000000..0xbf000000 as no-map.
With LGA_BL33_RAM_TOP at 0xc0000000, the 16 MiB stack reservation
below relocated U-Boot overlaps with it. Lowering LGA_BL33_RAM_TOP
to 0xbe000000 fixes this, and I'll update it in v2.

> 
> > diff --git a/board/google/lga/lga.c b/board/google/lga/lga.c
> > @@ -0,0 +1,65 @@
> > +#define LGA_SDRAM_BASE		0x80000000UL
> > +#define LGA_SDRAM_SIZE		0x80000000UL
> > +#define LGA_BL33_RAM_TOP	0xc0000000UL
> 
> The Kconfig help text lists Frankel, Blazer and Mustang, which ship
> with different DRAM sizes (Pixel 10 Pro / Pro XL have well over 2
> GiB). Hard-coding 2 GiB means those variants will only ever see the
> first bank and the mem_map will not cover the rest. Please can you
> pick the base/size up from the device tree
> (fdtdec_setup_mem_size_base() or similar) so the same board directory
> works for all three.

The upstream DT for Frankel, Blazer, and Mustang don't have a
/memory node, and earlier boot stages don't pass a DTB to BL33, so
fdtdec_setup_mem_size_base() would fail with -EINVAL. All three
boardphones actually ship with 12 GiB or more of DRAM, and they all
share the same first 2 GiB low DRAM window at 0x80000000 with the rest
mapped above 4 GiB, which is plenty for U-Boot across all three.

> 
> > diff --git a/board/google/lga/lga.c b/board/google/lga/lga.c
> > @@ -0,0 +1,65 @@
> > +int board_init(void)
> > +{
> > +	writel(LGA_WDT_KEY_UNLOCK, LGA_WDT1_BASE + LGA_WDT_KEY);
> > +	clrbits_le32(LGA_WDT1_BASE + LGA_WDT_CONTROL, LGA_WDT_CONTROL_ENABLE);
> > +	writel(0, LGA_WDT1_BASE + LGA_WDT_KEY);
> > +
> > +	return 0;
> > +}
> 
> The APC watchdog is a SoC-level block, so this would sit more
> naturally under arch/arm/mach-google/ and be shared by any future lga
> board. What do you think?
> 
I put it in board/google/lga/lga.c mostly because the hook is named
board_init() and other arm64 ports like axiado/scm3005 do something
similar. Also, arch/arm/mach-google/ is meant for multiple
generations where register layouts may differ, while board/google/lga/
already covers all LGA boards and we are unlikely to add another LGA
board directory. Keeping these few lines in lga.c seems simpler until
we have a proper driver under drivers/watchdog/.

Regards,
Kuan-Wei

  reply	other threads:[~2026-11-27  5:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  4:02 [PATCH 0/4] arm: google: Add initial support for Google Tensor G5 Kuan-Wei Chiu
2026-10-16  4:02 ` [PATCH 1/4] arm: Add Google Tensor SoC architecture support Kuan-Wei Chiu
2026-10-19 13:27   ` Simon Glass
2026-10-21  9:15     ` Kuan-Wei Chiu
2026-10-21 14:43       ` Tom Rini
2026-10-16  4:02 ` [PATCH 2/4] board: google: Add Google Tensor G5 board support Kuan-Wei Chiu
2026-10-16 19:21   ` Tom Rini
2026-10-17  6:56     ` Kuan-Wei Chiu
2026-10-19 13:27   ` Simon Glass
2026-11-27  5:49     ` Kuan-Wei Chiu [this message]
2026-10-16  4:02 ` [PATCH 3/4] arm: dts: lga: Enable console UART in U-Boot Kuan-Wei Chiu
2026-10-19 13:27   ` Simon Glass
2026-10-16  4:02 ` [PATCH 4/4] configs: google: Add lga default configuration Kuan-Wei Chiu
2026-10-19 13:27   ` Simon Glass
2026-10-19 13:27 ` [PATCH 0/4] arm: google: Add initial support for Google Tensor G5 Simon Glass
2026-10-21  9:11   ` Kuan-Wei Chiu
2026-10-21 14:39     ` Tom Rini

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=awkZ9GzPbbDBxp3v@google.com \
    --to=visitorckw@gmail.com \
    --cc=eleanor15x@gmail.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jserv@ccns.ncku.edu.tw \
    --cc=marscheng@google.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    /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.