U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: trini@konsulko.com, ilias.apalodimas@linaro.org
Cc: marscheng@google.com, eleanor15x@gmail.com,
	jserv@ccns.ncku.edu.tw, u-boot@lists.u-boot-project.org,
	Kuan-Wei Chiu <visitorckw@gmail.com>
Subject: [PATCH 2/4] board: google: Add Google Tensor G5 board support
Date: Fri, 16 Oct 2026 04:02:14 +0000	[thread overview]
Message-ID: <20261016040216.3636305-3-visitorckw@gmail.com> (raw)
In-Reply-To: <20261016040216.3636305-1-visitorckw@gmail.com>

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(+)
 create mode 100644 board/google/lga/Kconfig
 create mode 100644 board/google/lga/MAINTAINERS
 create mode 100644 board/google/lga/Makefile
 create mode 100644 board/google/lga/lga.c
 create mode 100644 include/configs/lga.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 36b4c7f0246..2d8ffe7887a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -360,6 +360,8 @@ ARM GOOGLE TENSOR SOC SUPPORT
 M:	Kuan-Wei Chiu <visitorckw@gmail.com>
 S:	Maintained
 F:	arch/arm/mach-google/
+F:	board/google/lga/
+F:	include/configs/lga.h
 K:	[gG]oogle.?[tT]ensor
 
 ARM HISILICON
diff --git a/arch/arm/mach-google/Kconfig b/arch/arm/mach-google/Kconfig
index a9e605ebb82..f6a5c9c43f2 100644
--- a/arch/arm/mach-google/Kconfig
+++ b/arch/arm/mach-google/Kconfig
@@ -1,7 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
 
 if ARCH_GOOGLE
 
 config SYS_VENDOR
 	default "google"
 
+config TARGET_GOOGLE_LGA
+	bool "Google Tensor G5 (LGA)"
+	default y
+	help
+	  Support for Google Tensor G5 (Laguna) SoC and boards based on it,
+	  including Frankel (Pixel 10), Blazer (Pixel 10 Pro), and Mustang
+	  (Pixel 10 Pro XL).
+
+source "board/google/lga/Kconfig"
+
 endif
diff --git a/board/google/lga/Kconfig b/board/google/lga/Kconfig
new file mode 100644
index 00000000000..22bb233f140
--- /dev/null
+++ b/board/google/lga/Kconfig
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+if TARGET_GOOGLE_LGA
+
+config SYS_BOARD
+	default "lga"
+
+config SYS_SOC
+	default "lga"
+
+config SYS_CONFIG_NAME
+	default "lga"
+
+endif
diff --git a/board/google/lga/MAINTAINERS b/board/google/lga/MAINTAINERS
new file mode 100644
index 00000000000..1dd03afab42
--- /dev/null
+++ b/board/google/lga/MAINTAINERS
@@ -0,0 +1,5 @@
+GOOGLE TENSOR G5 (LGA) BOARD
+M:	Kuan-Wei Chiu <visitorckw@gmail.com>
+S:	Maintained
+F:	board/google/lga/
+F:	include/configs/lga.h
diff --git a/board/google/lga/Makefile b/board/google/lga/Makefile
new file mode 100644
index 00000000000..4343e05c78f
--- /dev/null
+++ b/board/google/lga/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+obj-y += lga.o
diff --git a/board/google/lga/lga.c b/board/google/lga/lga.c
new file mode 100644
index 00000000000..e495d34ce0b
--- /dev/null
+++ b/board/google/lga/lga.c
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright 2026 Google LLC
+ */
+
+#include <init.h>
+#include <asm/armv8/mmu.h>
+#include <asm/global_data.h>
+#include <asm/io.h>
+#include <linux/bitops.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define LGA_WDT1_BASE		0x200c5000
+#define LGA_WDT_CONTROL		0x08
+#define LGA_WDT_CONTROL_ENABLE	BIT(0)
+#define LGA_WDT_KEY		0x10
+#define LGA_WDT_KEY_UNLOCK	0x00c0ffee
+
+#define LGA_SDRAM_BASE		0x80000000UL
+#define LGA_SDRAM_SIZE		0x80000000UL
+#define LGA_BL33_RAM_TOP	0xc0000000UL
+
+static struct mm_region lga_mem_map[] = {
+	{
+		.virt = 0x00000000UL,
+		.phys = 0x00000000UL,
+		.size = 0x80000000UL,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+			 PTE_BLOCK_NON_SHARE |
+			 PTE_BLOCK_PXN | PTE_BLOCK_UXN,
+	}, {
+		.virt = LGA_SDRAM_BASE,
+		.phys = LGA_SDRAM_BASE,
+		.size = LGA_SDRAM_SIZE,
+		.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+			 PTE_BLOCK_INNER_SHARE,
+	}, {
+		0,
+	}
+};
+
+struct mm_region *mem_map = lga_mem_map;
+
+int dram_init(void)
+{
+	gd->ram_base = LGA_SDRAM_BASE;
+	gd->ram_size = LGA_SDRAM_SIZE;
+
+	return 0;
+}
+
+phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
+{
+	return LGA_BL33_RAM_TOP;
+}
+
+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;
+}
diff --git a/include/configs/lga.h b/include/configs/lga.h
new file mode 100644
index 00000000000..c770c5837f4
--- /dev/null
+++ b/include/configs/lga.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright 2026 Google LLC
+ */
+
+#ifndef __CONFIG_LGA_H
+#define __CONFIG_LGA_H
+
+#endif /* __CONFIG_LGA_H */
-- 
2.56.0.212.g129ede20d9-goog


  parent reply	other threads:[~2026-10-16  4:02 UTC|newest]

Thread overview: 16+ 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 ` Kuan-Wei Chiu [this message]
2026-10-16 19:21   ` [PATCH 2/4] board: google: Add Google Tensor G5 board support Tom Rini
2026-10-17  6:56     ` Kuan-Wei Chiu
2026-10-19 13:27   ` Simon Glass
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=20261016040216.3636305-3-visitorckw@gmail.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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox