* [PATCH 0/3] k3-am62-pocketbeagle2: add board and variant support
@ 2026-03-17 22:37 rs
2026-03-17 22:37 ` [PATCH 1/3] arm: mach-k3: am62: add &main_uart6 to clock and pwr tree rs
` (2 more replies)
0 siblings, 3 replies; 23+ messages in thread
From: rs @ 2026-03-17 22:37 UTC (permalink / raw)
To: robertcnelson, bb, nm, trini, afd; +Cc: u-boot
From: Randolph Sapp <rs@ti.com>
Add initial board support for the PocketBeagle 2 from BeagleBoard.org. This is
based on the current official series from Robert Nelson [1] and work from Bryan
Brattlof [2] with some light modifications to protect against certain
configurations changes.
This borrows a lot from Phytec's current DDR fixup logic, as that seems to be
the most complete implementation of a dynamic DDR correction for K3 in tree
currently. Thanks Wadim Egorov and Dominik Haller for setting that up.
I've run coccinelle, checkpatch, and qconfig. That being said, this is my first
contribution to U-Boot so feel free to yell if something looks off. (I may look
into getting qconfig to respect that defconfig include logic in the future, as I
don't like it's suggestions currently. Let me know if it is intended behavior to
flatten that include into a single file.)
[1] https://github.com/beagleboard/u-boot/tree/v2026.01-am62-pocketbeagle2
[2] https://github.com/bryanbrattlof/beagleboot/tree/b4/pb2i
Bryan Brattlof (1):
arm: mach-k3: am62: add &main_uart6 to clock and pwr tree
Randolph Sapp (2):
k3-am62-pocketbeagle2: add initial board support
k3-am62-pocketbeagle2: add support for 1GB variant
...> k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi} | 92 +++---
...dtsi => k3-am62-pocketbeagle2-u-boot.dtsi} | 154 ++++++----
arch/arm/dts/k3-am62-r5-pocketbeagle2.dts | 35 +++
arch/arm/mach-k3/am62x/Kconfig | 1 +
arch/arm/mach-k3/r5/am62x/clk-data.c | 19 +-
arch/arm/mach-k3/r5/am62x/dev-data.c | 5 +-
board/beagle/pocketbeagle2/Kconfig | 86 ++++++
board/beagle/pocketbeagle2/MAINTAINERS | 10 +
board/beagle/pocketbeagle2/Makefile | 11 +
.../board-cfg.yaml | 0
.../{beagleplay => pocketbeagle2}/pm-cfg.yaml | 0
board/beagle/pocketbeagle2/pocketbeagle2.c | 147 ++++++++++
.../pocketbeagle2/pocketbeagle2.env} | 21 +-
.../beagle/pocketbeagle2/pocketbeagle2_ddr.h | 50 ++++
.../pocketbeagle2}/rm-cfg.yaml | 0
.../sec-cfg.yaml | 0
...onfig => am62_pocketbeagle2_a53_defconfig} | 16 +-
...config => am62_pocketbeagle2_r5_defconfig} | 12 +-
doc/board/beagle/am62_pocketbeagle2.rst | 277 ++++++++++++++++++
doc/board/beagle/index.rst | 1 +
.../src/arm64/ti/k3-am62-pocketbeagle2.dts | 43 +++
.../configs/{beagley_ai.h => pocketbeagle2.h} | 8 +-
22 files changed, 854 insertions(+), 134 deletions(-)
copy arch/arm/dts/{k3-am62x-sk-ddr4-1600MTs.dtsi => k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi} (97%)
copy arch/arm/dts/{k3-am67a-beagley-ai-u-boot.dtsi => k3-am62-pocketbeagle2-u-boot.dtsi} (53%)
create mode 100644 arch/arm/dts/k3-am62-r5-pocketbeagle2.dts
create mode 100644 board/beagle/pocketbeagle2/Kconfig
create mode 100644 board/beagle/pocketbeagle2/MAINTAINERS
create mode 100644 board/beagle/pocketbeagle2/Makefile
copy board/beagle/{beagleplay => pocketbeagle2}/board-cfg.yaml (100%)
copy board/beagle/{beagleplay => pocketbeagle2}/pm-cfg.yaml (100%)
create mode 100644 board/beagle/pocketbeagle2/pocketbeagle2.c
copy board/{ti/am62x/am62x.env => beagle/pocketbeagle2/pocketbeagle2.env} (59%)
create mode 100644 board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
copy board/{phytec/phycore_am62x => beagle/pocketbeagle2}/rm-cfg.yaml (100%)
copy board/beagle/{beagleplay => pocketbeagle2}/sec-cfg.yaml (100%)
copy configs/{am62x_beagleplay_a53_defconfig => am62_pocketbeagle2_a53_defconfig} (91%)
copy configs/{am62x_beagleplay_r5_defconfig => am62_pocketbeagle2_r5_defconfig} (90%)
create mode 100644 doc/board/beagle/am62_pocketbeagle2.rst
copy include/configs/{beagley_ai.h => pocketbeagle2.h} (57%)
--
2.53.0
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/3] arm: mach-k3: am62: add &main_uart6 to clock and pwr tree
2026-03-17 22:37 [PATCH 0/3] k3-am62-pocketbeagle2: add board and variant support rs
@ 2026-03-17 22:37 ` rs
2026-03-17 22:37 ` [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support rs
2026-03-17 22:38 ` [PATCH 3/3] k3-am62-pocketbeagle2: add support for 1GB variant rs
2 siblings, 0 replies; 23+ messages in thread
From: rs @ 2026-03-17 22:37 UTC (permalink / raw)
To: robertcnelson, bb, nm, trini, afd; +Cc: u-boot
From: Bryan Brattlof <bb@ti.com>
The pocketbeagle2 uses the main_uart6 as the debug console. To get debug
console prints at the R5 SPL stage, add the &main_uart6 to the R5 clk
and dev data so we can configure the uart as early as possible during
the bootup of the pocketbeagle2
Signed-off-by: Bryan Brattlof <bb@ti.com>
---
arch/arm/mach-k3/r5/am62x/clk-data.c | 19 +++++++++++++++----
arch/arm/mach-k3/r5/am62x/dev-data.c | 5 +++--
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-k3/r5/am62x/clk-data.c b/arch/arm/mach-k3/r5/am62x/clk-data.c
index d7bfed0e031..05cced0b313 100644
--- a/arch/arm/mach-k3/r5/am62x/clk-data.c
+++ b/arch/arm/mach-k3/r5/am62x/clk-data.c
@@ -3,9 +3,9 @@
* AM62X specific clock platform data
*
* This file is auto generated. Please do not hand edit and report any issues
- * to Dave Gerlach <d-gerlach@ti.com>.
+ * to Bryan Brattlof <bb@ti.com>.
*
- * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2020-2025 Texas Instruments Incorporated - https://www.ti.com/
*/
#include <linux/clk-provider.h>
@@ -125,6 +125,11 @@ static const char * const main_usart0_fclk_sel_out0_parents[] = {
"hsdiv4_16fft_main_1_hsdivout1_clk",
};
+static const char * const main_usart6_fclk_sel_out0_parents[] = {
+ "usart_programmable_clock_divider_out6",
+ "hsdiv4_16fft_main_1_hsdivout1_clk",
+};
+
static const struct clk_data clk_list[] = {
CLK_FIXED_RATE("osc_26_mhz", 26000000, 0),
CLK_FIXED_RATE("osc_25_mhz", 25000000, 0),
@@ -210,9 +215,11 @@ static const struct clk_data clk_list[] = {
CLK_MUX("main_gtcclk_sel_out0", main_gtcclk_sel_out0_parents, 8, 0x43008030, 0, 3, 0),
CLK_MUX("main_ospi_ref_clk_sel_out0", main_ospi_ref_clk_sel_out0_parents, 2, 0x108500, 0, 1, 0),
CLK_DIV_DEFFREQ("usart_programmable_clock_divider_out0", "hsdiv4_16fft_main_1_hsdivout0_clk", 0x108240, 0, 2, 0, 0, 48000000),
+ CLK_DIV_DEFFREQ("usart_programmable_clock_divider_out6", "hsdiv4_16fft_main_1_hsdivout0_clk", 0x108258, 0, 2, 0, 0, 48000000),
CLK_MUX("wkup_clkout_sel_out0", wkup_clkout_sel_out0_parents, 8, 0x43008020, 0, 3, 0),
CLK_MUX("wkup_clksel_out0", wkup_clksel_out0_parents, 2, 0x43008010, 0, 1, 0),
CLK_MUX("main_usart0_fclk_sel_out0", main_usart0_fclk_sel_out0_parents, 2, 0x108280, 0, 1, 0),
+ CLK_MUX("main_usart6_fclk_sel_out0", main_usart6_fclk_sel_out0_parents, 2, 0x108298, 0, 1, 0),
CLK_DIV("hsdiv4_16fft_mcu_0_hsdivout1_clk", "pllfracf_ssmod_16fft_mcu_0_foutvcop_clk", 0x4040084, 0, 7, 0, 0),
CLK_FIXED_RATE("mshsi2c_wkup_0_porscl", 0, 0),
CLK_DIV("sam62_pll_ctrl_wrap_main_0_chip_div24_clk_clk", "sam62_pll_ctrl_wrap_main_0_sysclkout_clk", 0x41011c, 0, 5, 0, 0),
@@ -336,6 +343,10 @@ static const struct dev_clk soc_dev_clk_data[] = {
DEV_CLK(157, 164, "clk_32k_rc_sel_out0"),
DEV_CLK(157, 165, "gluelogic_rcosc_clkout"),
DEV_CLK(157, 166, "gluelogic_hfosc0_clkout"),
+ DEV_CLK(158, 0, "main_usart6_fclk_sel_out0"),
+ DEV_CLK(158, 1, "usart_programmable_clock_divider_out6"),
+ DEV_CLK(158, 2, "hsdiv4_16fft_main_1_hsdivout1_clk"),
+ DEV_CLK(158, 5, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
DEV_CLK(161, 0, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
DEV_CLK(161, 1, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
DEV_CLK(161, 2, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
@@ -361,7 +372,7 @@ static const struct dev_clk soc_dev_clk_data[] = {
const struct ti_k3_clk_platdata am62x_clk_platdata = {
.clk_list = clk_list,
- .clk_list_cnt = 90,
+ .clk_list_cnt = 92,
.soc_dev_clk_data = soc_dev_clk_data,
- .soc_dev_clk_data_cnt = 137,
+ .soc_dev_clk_data_cnt = 140,
};
diff --git a/arch/arm/mach-k3/r5/am62x/dev-data.c b/arch/arm/mach-k3/r5/am62x/dev-data.c
index 59c95df2a88..ea1e76a8a75 100644
--- a/arch/arm/mach-k3/r5/am62x/dev-data.c
+++ b/arch/arm/mach-k3/r5/am62x/dev-data.c
@@ -3,9 +3,9 @@
* AM62X specific device platform data
*
* This file is auto generated. Please do not hand edit and report any issues
- * to Dave Gerlach <d-gerlach@ti.com>.
+ * to Bryan Brattlof <bb@ti.com>.
*
- * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2020-2025 Texas Instruments Incorporated - https://www.ti.com/
*/
#include "k3-dev.h"
@@ -61,6 +61,7 @@ static struct ti_dev soc_dev_list[] = {
PSC_DEV(36, &soc_lpsc_list[11]),
PSC_DEV(102, &soc_lpsc_list[11]),
PSC_DEV(146, &soc_lpsc_list[11]),
+ PSC_DEV(158, &soc_lpsc_list[11]),
PSC_DEV(13, &soc_lpsc_list[12]),
PSC_DEV(166, &soc_lpsc_list[13]),
PSC_DEV(135, &soc_lpsc_list[14]),
--
2.53.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-17 22:37 [PATCH 0/3] k3-am62-pocketbeagle2: add board and variant support rs
2026-03-17 22:37 ` [PATCH 1/3] arm: mach-k3: am62: add &main_uart6 to clock and pwr tree rs
@ 2026-03-17 22:37 ` rs
2026-03-20 9:29 ` Anshul Dalal
2026-03-17 22:38 ` [PATCH 3/3] k3-am62-pocketbeagle2: add support for 1GB variant rs
2 siblings, 1 reply; 23+ messages in thread
From: rs @ 2026-03-17 22:37 UTC (permalink / raw)
To: robertcnelson, bb, nm, trini, afd; +Cc: u-boot
From: Randolph Sapp <rs@ti.com>
Add initial board support for the PocketBeagle 2, based on Robert Nelson
and Bryan Brattlof's work. Unify all debug consoles to main_uart6. Use
DDR config v10.32 from our sysconfig tool [1] for Kingston's memory [2],
(4Gb Desnity with a CL of 11 and CWL of 9). Add support for the
SPL_TEXT_BASE config parameter. Ensure all files have a summary and SPDX
identifier.
[1] https://dev.ti.com/sysconfig
[2] https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/6465/D2516AN9EXGXN-TU.pdf
Signed-off-by: Randolph Sapp <rs@ti.com>
---
...> k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi} | 92 +++---
...dtsi => k3-am62-pocketbeagle2-u-boot.dtsi} | 154 ++++++----
arch/arm/dts/k3-am62-r5-pocketbeagle2.dts | 35 +++
arch/arm/mach-k3/am62x/Kconfig | 1 +
board/beagle/pocketbeagle2/Kconfig | 60 ++++
board/beagle/pocketbeagle2/MAINTAINERS | 10 +
board/beagle/pocketbeagle2/Makefile | 9 +
.../board-cfg.yaml | 0
.../{beagleplay => pocketbeagle2}/pm-cfg.yaml | 0
board/beagle/pocketbeagle2/pocketbeagle2.c | 39 +++
.../pocketbeagle2/pocketbeagle2.env} | 21 +-
.../pocketbeagle2}/rm-cfg.yaml | 0
.../sec-cfg.yaml | 0
...onfig => am62_pocketbeagle2_a53_defconfig} | 16 +-
...config => am62_pocketbeagle2_r5_defconfig} | 7 +-
doc/board/beagle/am62_pocketbeagle2.rst | 277 ++++++++++++++++++
doc/board/beagle/index.rst | 1 +
.../src/arm64/ti/k3-am62-pocketbeagle2.dts | 43 +++
.../configs/{beagley_ai.h => pocketbeagle2.h} | 8 +-
19 files changed, 646 insertions(+), 127 deletions(-)
copy arch/arm/dts/{k3-am62x-sk-ddr4-1600MTs.dtsi => k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi} (97%)
copy arch/arm/dts/{k3-am67a-beagley-ai-u-boot.dtsi => k3-am62-pocketbeagle2-u-boot.dtsi} (53%)
create mode 100644 arch/arm/dts/k3-am62-r5-pocketbeagle2.dts
create mode 100644 board/beagle/pocketbeagle2/Kconfig
create mode 100644 board/beagle/pocketbeagle2/MAINTAINERS
create mode 100644 board/beagle/pocketbeagle2/Makefile
copy board/beagle/{beagleplay => pocketbeagle2}/board-cfg.yaml (100%)
copy board/beagle/{beagleplay => pocketbeagle2}/pm-cfg.yaml (100%)
create mode 100644 board/beagle/pocketbeagle2/pocketbeagle2.c
copy board/{ti/am62x/am62x.env => beagle/pocketbeagle2/pocketbeagle2.env} (59%)
copy board/{phytec/phycore_am62x => beagle/pocketbeagle2}/rm-cfg.yaml (100%)
copy board/beagle/{beagleplay => pocketbeagle2}/sec-cfg.yaml (100%)
copy configs/{am62x_beagleplay_a53_defconfig => am62_pocketbeagle2_a53_defconfig} (91%)
copy configs/{am62x_beagleplay_r5_defconfig => am62_pocketbeagle2_r5_defconfig} (93%)
create mode 100644 doc/board/beagle/am62_pocketbeagle2.rst
copy include/configs/{beagley_ai.h => pocketbeagle2.h} (57%)
diff --git a/arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi b/arch/arm/dts/k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi
similarity index 97%
copy from arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi
copy to arch/arm/dts/k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi
index 4afa68a6739..455a55f2c0d 100644
--- a/arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi
+++ b/arch/arm/dts/k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi
@@ -2,20 +2,22 @@
/*
* This file was generated with the
* AM623/AM625 SysConfig DDR Configuration Tool for AM64x, AM625, AM623, AM62Ax, AM62Px, AM62Dx, AM62Lx v0.10.32
- * Fri Jan 30 2026 13:45:31 GMT+0530 (India Standard Time)
+ * Mon Jan 26 2026 10:31:36 GMT-0600 (Central Standard Time)
* DDR Type: DDR4
* Frequency = 800MHz (1600MTs)
- * Density: 16Gb
+ * Density: 4Gb
* Number of Ranks: 1
*/
+
#define DDRSS_PLL_FHS_CNT 6
#define DDRSS_PLL_FREQUENCY_1 400000000
#define DDRSS_PLL_FREQUENCY_2 400000000
-#define DDRSS_SDRAM_IDX 15
+#define DDRSS_SDRAM_IDX 13
#define DDRSS_REGION_IDX 16
#define DDRSS_TOOL_VERSION "0.10.32"
+
#define DDRSS_CTL_0_DATA 0x00000A00
#define DDRSS_CTL_1_DATA 0x00000000
#define DDRSS_CTL_2_DATA 0x00000000
@@ -54,11 +56,11 @@
#define DDRSS_CTL_35_DATA 0x00000000
#define DDRSS_CTL_36_DATA 0x00000000
#define DDRSS_CTL_37_DATA 0x00000000
-#define DDRSS_CTL_38_DATA 0x0000091C
+#define DDRSS_CTL_38_DATA 0x00000916
#define DDRSS_CTL_39_DATA 0x18181818
-#define DDRSS_CTL_40_DATA 0x0000091C
+#define DDRSS_CTL_40_DATA 0x00000916
#define DDRSS_CTL_41_DATA 0x18181818
-#define DDRSS_CTL_42_DATA 0x0000091C
+#define DDRSS_CTL_42_DATA 0x00000916
#define DDRSS_CTL_43_DATA 0x18181818
#define DDRSS_CTL_44_DATA 0x05050404
#define DDRSS_CTL_45_DATA 0x00002706
@@ -220,22 +222,22 @@
#define DDRSS_CTL_201_DATA 0x00000000
#define DDRSS_CTL_202_DATA 0x00000000
#define DDRSS_CTL_203_DATA 0x00000000
-#define DDRSS_CTL_204_DATA 0x00042400
+#define DDRSS_CTL_204_DATA 0x00041000
#define DDRSS_CTL_205_DATA 0x00000301
#define DDRSS_CTL_206_DATA 0x00000000
-#define DDRSS_CTL_207_DATA 0x00000424
+#define DDRSS_CTL_207_DATA 0x00000410
#define DDRSS_CTL_208_DATA 0x00000301
#define DDRSS_CTL_209_DATA 0x00000000
-#define DDRSS_CTL_210_DATA 0x00000424
+#define DDRSS_CTL_210_DATA 0x00000410
#define DDRSS_CTL_211_DATA 0x00000301
#define DDRSS_CTL_212_DATA 0x00000000
-#define DDRSS_CTL_213_DATA 0x00000424
+#define DDRSS_CTL_213_DATA 0x00000410
#define DDRSS_CTL_214_DATA 0x00000301
#define DDRSS_CTL_215_DATA 0x00000000
-#define DDRSS_CTL_216_DATA 0x00000424
+#define DDRSS_CTL_216_DATA 0x00000410
#define DDRSS_CTL_217_DATA 0x00000301
#define DDRSS_CTL_218_DATA 0x00000000
-#define DDRSS_CTL_219_DATA 0x00000424
+#define DDRSS_CTL_219_DATA 0x00000410
#define DDRSS_CTL_220_DATA 0x00000301
#define DDRSS_CTL_221_DATA 0x00000000
#define DDRSS_CTL_222_DATA 0x00000000
@@ -333,8 +335,8 @@
#define DDRSS_CTL_314_DATA 0x00000000
#define DDRSS_CTL_315_DATA 0x00000100
#define DDRSS_CTL_316_DATA 0x01010000
-#define DDRSS_CTL_317_DATA 0x00000000
-#define DDRSS_CTL_318_DATA 0x3FFF0000
+#define DDRSS_CTL_317_DATA 0x00000202
+#define DDRSS_CTL_318_DATA 0x0FFF0000
#define DDRSS_CTL_319_DATA 0x000FFF00
#define DDRSS_CTL_320_DATA 0xFFFFFFFF
#define DDRSS_CTL_321_DATA 0x00FFFF00
@@ -391,8 +393,8 @@
#define DDRSS_CTL_372_DATA 0x06060806
#define DDRSS_CTL_373_DATA 0x00010101
#define DDRSS_CTL_374_DATA 0x02000000
-#define DDRSS_CTL_375_DATA 0x05020101
-#define DDRSS_CTL_376_DATA 0x00000505
+#define DDRSS_CTL_375_DATA 0x02020101
+#define DDRSS_CTL_376_DATA 0x00000202
#define DDRSS_CTL_377_DATA 0x02020200
#define DDRSS_CTL_378_DATA 0x02020202
#define DDRSS_CTL_379_DATA 0x02020202
@@ -408,7 +410,7 @@
#define DDRSS_CTL_389_DATA 0x00000200
#define DDRSS_CTL_390_DATA 0x0000DB60
#define DDRSS_CTL_391_DATA 0x0001E780
-#define DDRSS_CTL_392_DATA 0x080D0302
+#define DDRSS_CTL_392_DATA 0x050A0302
#define DDRSS_CTL_393_DATA 0x001E0506
#define DDRSS_CTL_394_DATA 0x000030C0
#define DDRSS_CTL_395_DATA 0x00000200
@@ -417,7 +419,7 @@
#define DDRSS_CTL_398_DATA 0x00000200
#define DDRSS_CTL_399_DATA 0x0000DB60
#define DDRSS_CTL_400_DATA 0x0001E780
-#define DDRSS_CTL_401_DATA 0x080D0302
+#define DDRSS_CTL_401_DATA 0x050A0302
#define DDRSS_CTL_402_DATA 0x001E0506
#define DDRSS_CTL_403_DATA 0x000030C0
#define DDRSS_CTL_404_DATA 0x00000200
@@ -426,7 +428,7 @@
#define DDRSS_CTL_407_DATA 0x00000200
#define DDRSS_CTL_408_DATA 0x0000DB60
#define DDRSS_CTL_409_DATA 0x0001E780
-#define DDRSS_CTL_410_DATA 0x080D0302
+#define DDRSS_CTL_410_DATA 0x050A0302
#define DDRSS_CTL_411_DATA 0x00000506
#define DDRSS_CTL_412_DATA 0x00000000
#define DDRSS_CTL_413_DATA 0x0302000A
@@ -516,7 +518,7 @@
#define DDRSS_PI_74_DATA 0x00000000
#define DDRSS_PI_75_DATA 0x00000005
#define DDRSS_PI_76_DATA 0x01000000
-#define DDRSS_PI_77_DATA 0x04000100
+#define DDRSS_PI_77_DATA 0x04020100
#define DDRSS_PI_78_DATA 0x00020000
#define DDRSS_PI_79_DATA 0x00010002
#define DDRSS_PI_80_DATA 0x00000001
@@ -606,14 +608,14 @@
#define DDRSS_PI_164_DATA 0x00007800
#define DDRSS_PI_165_DATA 0x00780078
#define DDRSS_PI_166_DATA 0x00141414
-#define DDRSS_PI_167_DATA 0x00000036
-#define DDRSS_PI_168_DATA 0x00000036
-#define DDRSS_PI_169_DATA 0x00040036
+#define DDRSS_PI_167_DATA 0x00000033
+#define DDRSS_PI_168_DATA 0x00000033
+#define DDRSS_PI_169_DATA 0x00040033
#define DDRSS_PI_170_DATA 0x04000400
#define DDRSS_PI_171_DATA 0xC8000009
-#define DDRSS_PI_172_DATA 0x0000091C
-#define DDRSS_PI_173_DATA 0x00091CC8
-#define DDRSS_PI_174_DATA 0x001CC800
+#define DDRSS_PI_172_DATA 0x00000916
+#define DDRSS_PI_173_DATA 0x000916C8
+#define DDRSS_PI_174_DATA 0x0016C800
#define DDRSS_PI_175_DATA 0x00000118
#define DDRSS_PI_176_DATA 0x00001860
#define DDRSS_PI_177_DATA 0x00000118
@@ -626,14 +628,14 @@
#define DDRSS_PI_184_DATA 0x01080108
#define DDRSS_PI_185_DATA 0x00000108
#define DDRSS_PI_186_DATA 0x00000000
-#define DDRSS_PI_187_DATA 0x05000000
-#define DDRSS_PI_188_DATA 0x01010505
+#define DDRSS_PI_187_DATA 0x02000000
+#define DDRSS_PI_188_DATA 0x01010202
#define DDRSS_PI_189_DATA 0x01010101
#define DDRSS_PI_190_DATA 0x00181818
#define DDRSS_PI_191_DATA 0x00000000
#define DDRSS_PI_192_DATA 0x00000000
-#define DDRSS_PI_193_DATA 0x09000000
-#define DDRSS_PI_194_DATA 0x06060909
+#define DDRSS_PI_193_DATA 0x06000000
+#define DDRSS_PI_194_DATA 0x06060606
#define DDRSS_PI_195_DATA 0x03030306
#define DDRSS_PI_196_DATA 0x00000000
#define DDRSS_PI_197_DATA 0x00000000
@@ -661,15 +663,15 @@
#define DDRSS_PI_219_DATA 0x001600C8
#define DDRSS_PI_220_DATA 0x010100C8
#define DDRSS_PI_221_DATA 0x00001701
-#define DDRSS_PI_222_DATA 0x1F0F0053
-#define DDRSS_PI_223_DATA 0x05000001
-#define DDRSS_PI_224_DATA 0x00170A09
-#define DDRSS_PI_225_DATA 0x1F0F0053
-#define DDRSS_PI_226_DATA 0x05000001
-#define DDRSS_PI_227_DATA 0x00170A09
-#define DDRSS_PI_228_DATA 0x1F0F0053
-#define DDRSS_PI_229_DATA 0x05000001
-#define DDRSS_PI_230_DATA 0x00010A09
+#define DDRSS_PI_222_DATA 0x1F0F0050
+#define DDRSS_PI_223_DATA 0x02000001
+#define DDRSS_PI_224_DATA 0x00170A06
+#define DDRSS_PI_225_DATA 0x1F0F0050
+#define DDRSS_PI_226_DATA 0x02000001
+#define DDRSS_PI_227_DATA 0x00170A06
+#define DDRSS_PI_228_DATA 0x1F0F0050
+#define DDRSS_PI_229_DATA 0x02000001
+#define DDRSS_PI_230_DATA 0x00010A06
#define DDRSS_PI_231_DATA 0x0C0B0700
#define DDRSS_PI_232_DATA 0x000D0605
#define DDRSS_PI_233_DATA 0x0000C570
@@ -736,7 +738,7 @@
#define DDRSS_PI_294_DATA 0x01000000
#define DDRSS_PI_295_DATA 0x00020201
#define DDRSS_PI_296_DATA 0x00000000
-#define DDRSS_PI_297_DATA 0x00000424
+#define DDRSS_PI_297_DATA 0x00000410
#define DDRSS_PI_298_DATA 0x00000301
#define DDRSS_PI_299_DATA 0x00000000
#define DDRSS_PI_300_DATA 0x00000000
@@ -744,7 +746,7 @@
#define DDRSS_PI_302_DATA 0x00001400
#define DDRSS_PI_303_DATA 0x00000493
#define DDRSS_PI_304_DATA 0x00000000
-#define DDRSS_PI_305_DATA 0x00000424
+#define DDRSS_PI_305_DATA 0x00000410
#define DDRSS_PI_306_DATA 0x00000301
#define DDRSS_PI_307_DATA 0x00000000
#define DDRSS_PI_308_DATA 0x00000000
@@ -752,7 +754,7 @@
#define DDRSS_PI_310_DATA 0x00001400
#define DDRSS_PI_311_DATA 0x00000493
#define DDRSS_PI_312_DATA 0x00000000
-#define DDRSS_PI_313_DATA 0x00000424
+#define DDRSS_PI_313_DATA 0x00000410
#define DDRSS_PI_314_DATA 0x00000301
#define DDRSS_PI_315_DATA 0x00000000
#define DDRSS_PI_316_DATA 0x00000000
@@ -760,7 +762,7 @@
#define DDRSS_PI_318_DATA 0x00001400
#define DDRSS_PI_319_DATA 0x00000493
#define DDRSS_PI_320_DATA 0x00000000
-#define DDRSS_PI_321_DATA 0x00000424
+#define DDRSS_PI_321_DATA 0x00000410
#define DDRSS_PI_322_DATA 0x00000301
#define DDRSS_PI_323_DATA 0x00000000
#define DDRSS_PI_324_DATA 0x00000000
@@ -768,7 +770,7 @@
#define DDRSS_PI_326_DATA 0x00001400
#define DDRSS_PI_327_DATA 0x00000493
#define DDRSS_PI_328_DATA 0x00000000
-#define DDRSS_PI_329_DATA 0x00000424
+#define DDRSS_PI_329_DATA 0x00000410
#define DDRSS_PI_330_DATA 0x00000301
#define DDRSS_PI_331_DATA 0x00000000
#define DDRSS_PI_332_DATA 0x00000000
@@ -776,7 +778,7 @@
#define DDRSS_PI_334_DATA 0x00001400
#define DDRSS_PI_335_DATA 0x00000493
#define DDRSS_PI_336_DATA 0x00000000
-#define DDRSS_PI_337_DATA 0x00000424
+#define DDRSS_PI_337_DATA 0x00000410
#define DDRSS_PI_338_DATA 0x00000301
#define DDRSS_PI_339_DATA 0x00000000
#define DDRSS_PI_340_DATA 0x00000000
diff --git a/arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi b/arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
similarity index 53%
copy from arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi
copy to arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
index 0e810e7f492..9f97e0b34c2 100644
--- a/arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi
+++ b/arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
@@ -1,20 +1,75 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Common AM67A BeagleY-AI dts file for SPLs
+ * AM625 PocketBeagle 2 dts file for SPLs
+ * https://www.beagleboard.org/boards/pocketbeagle-2
*
- * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
- * Copyright (C) 2024 Robert Nelson, BeagleBoard.org Foundation
+ * Copyright (C) 2024-2025 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2024-2025 Robert Nelson, BeagleBoard.org Foundation
*/
#include "k3-binman.dtsi"
/ {
- chosen {
- stdout-path = "serial2:115200n8";
- tick-timer = &main_timer0;
+ /* Keep the LEDs on by default to indicate life */
+ leds {
+ led-1 {
+ label = "led-1";
+ default-state = "on";
+ };
+
+ led-2 {
+ label = "led-2";
+ default-state = "on";
+ };
+
+ led-3 {
+ label = "led-3";
+ default-state = "on";
+ };
+
+ led-4 {
+ label = "led-4";
+ default-state = "on";
+ };
};
};
+&main_mmc1_pins_default {
+ /* Force to use SDCD card detect pin */
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x023c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
+ AM62X_IOPAD(0x0234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */
+ AM62X_IOPAD(0x0230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */
+ AM62X_IOPAD(0x022c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */
+ AM62X_IOPAD(0x0228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */
+ AM62X_IOPAD(0x0224, PIN_INPUT, 0) /* (D22/C19) MMC1_DAT3 */
+ AM62X_IOPAD(0x0240, PIN_INPUT, 0) /* (D17/C15) MMC1_SDCD */
+ >;
+};
+
+&usbss0 {
+ bootph-all;
+};
+
+&usb0 {
+ dr_mode = "peripheral";
+ bootph-all;
+};
+
+&main_bcdma {
+ reg = <0x00 0x485c0100 0x00 0x100>,
+ <0x00 0x4c000000 0x00 0x20000>,
+ <0x00 0x4a820000 0x00 0x20000>,
+ <0x00 0x4aa40000 0x00 0x20000>,
+ <0x00 0x4bc00000 0x00 0x100000>,
+ <0x00 0x48600000 0x00 0x8000>,
+ <0x00 0x484a4000 0x00 0x2000>,
+ <0x00 0x484c2000 0x00 0x2000>;
+ reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt",
+ "cfg", "tchan", "rchan";
+ bootph-all;
+};
+
&main_pktdma {
reg = <0x00 0x485c0000 0x00 0x100>,
<0x00 0x4a800000 0x00 0x20000>,
@@ -24,44 +79,32 @@
<0x00 0x484a0000 0x00 0x4000>,
<0x00 0x484c0000 0x00 0x2000>,
<0x00 0x48430000 0x00 0x4000>;
- reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
- "cfg", "tchan", "rchan", "rflow";
-};
-
-&dmsc {
- bootph-pre-ram;
- k3_sysreset: sysreset-controller {
- compatible = "ti,sci-sysreset";
- bootph-pre-ram;
- };
-};
-
-&usbss0 {
- bootph-pre-ram;
+ reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", "cfg",
+ "tchan", "rchan", "rflow";
+ bootph-all;
};
-&usb0 {
- dr_mode = "peripheral";
- bootph-pre-ram;
+&cpsw3g {
+ status = "disabled";
};
-&usbss1 {
+&cpsw_port1 {
status = "disabled";
};
-&usb1 {
+&cpsw_port2 {
status = "disabled";
};
-&main_gpio1 {
+&main_uart6_pins_default {
bootph-all;
};
-#if IS_ENABLED(CONFIG_TARGET_J722S_R5_BEAGLEY_AI)
+#if IS_ENABLED(CONFIG_TARGET_AM62X_R5_POCKETBEAGLE2)
&binman {
- tiboot3-j722s-hs-evm.bin {
- filename = "tiboot3-j722s-hs-evm.bin";
+ tiboot3-am62x-hs-evm.bin {
+ filename = "tiboot3-am62x-hs-evm.bin";
ti-secure-rom {
content = <&u_boot_spl>, <&ti_fs_enc>, <&combined_tifs_cfg>,
<&combined_dm_cfg>, <&sysfw_inner_cert>;
@@ -78,7 +121,7 @@
load = <CONFIG_SPL_TEXT_BASE>;
load-sysfw = <0x40000>;
load-sysfw-data = <0x67000>;
- load-dm-data = <0x43c7a800>;
+ load-dm-data = <0x43c3a800>;
};
u_boot_spl: u-boot-spl {
@@ -86,8 +129,9 @@
};
ti_fs_enc: ti-fs-enc.bin {
- filename = "ti-sysfw/ti-fs-firmware-j722s-hs-enc.bin";
+ filename = "ti-sysfw/ti-fs-firmware-am62x-hs-enc.bin";
type = "blob-ext";
+ optional;
};
combined_tifs_cfg: combined-tifs-cfg.bin {
@@ -96,8 +140,9 @@
};
sysfw_inner_cert: sysfw-inner-cert {
- filename = "ti-sysfw/ti-fs-firmware-j722s-hs-cert.bin";
+ filename = "ti-sysfw/ti-fs-firmware-am62x-hs-cert.bin";
type = "blob-ext";
+ optional;
};
combined_dm_cfg: combined-dm-cfg.bin {
@@ -108,8 +153,8 @@
};
&binman {
- tiboot3-j722s-hs-fs-evm.bin {
- filename = "tiboot3-j722s-hs-fs-evm.bin";
+ tiboot3-am62x-hs-fs-evm.bin {
+ filename = "tiboot3-am62x-hs-fs-evm.bin";
symlink = "tiboot3.bin";
ti-secure-rom {
@@ -128,7 +173,7 @@
load = <CONFIG_SPL_TEXT_BASE>;
load-sysfw = <0x40000>;
load-sysfw-data = <0x67000>;
- load-dm-data = <0x43c7a800>;
+ load-dm-data = <0x43c3a800>;
};
u_boot_spl_fs: u-boot-spl {
@@ -136,8 +181,9 @@
};
ti_fs_enc_fs: ti-fs-enc.bin {
- filename = "ti-sysfw/ti-fs-firmware-j722s-hs-fs-enc.bin";
+ filename = "ti-sysfw/ti-fs-firmware-am62x-hs-fs-enc.bin";
type = "blob-ext";
+ optional;
};
combined_tifs_cfg_fs: combined-tifs-cfg.bin {
@@ -146,8 +192,9 @@
};
sysfw_inner_cert_fs: sysfw-inner-cert {
- filename = "ti-sysfw/ti-fs-firmware-j722s-hs-fs-cert.bin";
+ filename = "ti-sysfw/ti-fs-firmware-am62x-hs-fs-cert.bin";
type = "blob-ext";
+ optional;
};
combined_dm_cfg_fs: combined-dm-cfg.bin {
@@ -156,12 +203,12 @@
};
};
};
-#endif /* CONFIG_TARGET_J722S_R5_BEAGLEY_AI */
+#endif /* CONFIG_TARGET_AM62X_R5_POCKETBEAGLE2 */
-#if IS_ENABLED(CONFIG_TARGET_J722S_A53_BEAGLEY_AI)
+#if IS_ENABLED(CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2)
-#define SPL_BEAGLEY_AI_DTB "spl/dts/ti/k3-am67a-beagley-ai.dtb"
-#define BEAGLEY_AI_DTB "u-boot.dtb"
+#define SPL_AM62X_POCKETBEAGLE2_DTB "spl/dts/ti/k3-am62-pocketbeagle2.dtb"
+#define AM62X_POCKETBEAGLE2_DTB "u-boot.dtb"
&binman {
ti-spl {
@@ -176,23 +223,24 @@
};
dm: ti-dm {
- filename = "ti-dm/j722s/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+ filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
+ optional;
};
};
fdt-0 {
- description = "k3-am67a-beagley-ai";
+ description = "k3-am62-pocketbeagle2";
type = "flat_dt";
arch = "arm";
compression = "none";
ti-secure {
- content = <&spl_beagley_ai_dtb>;
+ content = <&spl_pocketbeagle2_dtb>;
keyfile = "custMpk.pem";
};
- spl_beagley_ai_dtb: blob-ext {
- filename = "spl/dts/ti/k3-am67a-beagley-ai.dtb";
+ spl_pocketbeagle2_dtb: blob-ext {
+ filename = "spl/dts/ti/k3-am62-pocketbeagle2.dtb";
};
};
@@ -203,7 +251,7 @@
default = "conf-0";
conf-0 {
- description = "k3-am67a-beagley-ai";
+ description = "k3-am62-pocketbeagle2";
firmware = "atf";
loadables = "tee", "dm", "spl";
fdt = "fdt-0";
@@ -220,21 +268,21 @@
fit {
images {
uboot {
- description = "U-Boot for BeagleY-AI";
+ description = "U-Boot for PocketBeagle 2";
};
fdt-0 {
- description = "k3-am67a-beagley-ai";
+ description = "k3-am62-pocketbeagle2";
type = "flat_dt";
arch = "arm";
compression = "none";
ti-secure {
- content = <&beagley_ai_dtb>;
+ content = <&pocketbeagle2_dtb>;
keyfile = "custMpk.pem";
};
- beagley_ai_dtb: blob-ext {
+ pocketbeagle2_dtb: blob-ext {
filename = "u-boot.dtb";
};
@@ -248,7 +296,7 @@
default = "conf-0";
conf-0 {
- description = "k3-k3-am67a-beagley-ai";
+ description = "k3-am62-pocketbeagle2";
firmware = "uboot";
loadables = "uboot";
fdt = "fdt-0";
@@ -258,4 +306,4 @@
};
};
};
-#endif /* CONFIG_TARGET_J722S_A53_BEAGLEY_AI */
+#endif /* CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2 */
diff --git a/arch/arm/dts/k3-am62-r5-pocketbeagle2.dts b/arch/arm/dts/k3-am62-r5-pocketbeagle2.dts
new file mode 100644
index 00000000000..4489a559287
--- /dev/null
+++ b/arch/arm/dts/k3-am62-r5-pocketbeagle2.dts
@@ -0,0 +1,35 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/*
+ * AM625 PocketBeagle 2 dts file for R5 SPL
+ * https://www.beagleboard.org/boards/pocketbeagle-2
+ *
+ * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation
+ */
+
+#include "k3-am62-pocketbeagle2.dts"
+#include "k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi"
+#include "k3-am62-ddr.dtsi"
+
+#include "k3-am62-pocketbeagle2-u-boot.dtsi"
+#include "k3-am625-r5.dtsi"
+
+/ {
+ aliases {
+ serial1 = &main_uart1;
+ serial2 = &main_uart6;
+ serial3 = &main_uart3;
+ serial4 = &main_uart4;
+ serial5 = &main_uart5;
+ serial6 = &main_uart2;
+ serial7 = &main_uart0;
+ };
+};
+
+&main_pktdma {
+ ti,sci = <&dm_tifs>;
+};
+
+&main_bcdma {
+ ti,sci = <&dm_tifs>;
+};
diff --git a/arch/arm/mach-k3/am62x/Kconfig b/arch/arm/mach-k3/am62x/Kconfig
index f7ad52db7d8..87470248aa1 100644
--- a/arch/arm/mach-k3/am62x/Kconfig
+++ b/arch/arm/mach-k3/am62x/Kconfig
@@ -69,6 +69,7 @@ config TARGET_VERDIN_AM62_R5
endchoice
source "board/beagle/beagleplay/Kconfig"
+source "board/beagle/pocketbeagle2/Kconfig"
source "board/phytec/phycore_am62x/Kconfig"
source "board/ti/am62x/Kconfig"
source "board/toradex/verdin-am62/Kconfig"
diff --git a/board/beagle/pocketbeagle2/Kconfig b/board/beagle/pocketbeagle2/Kconfig
new file mode 100644
index 00000000000..e957b8e8377
--- /dev/null
+++ b/board/beagle/pocketbeagle2/Kconfig
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
+#
+
+choice
+ prompt "BeagleBoard.org AM62X based PocketBeagle 2 board"
+ optional
+
+config TARGET_AM62X_A53_POCKETBEAGLE2
+ bool "BeagleBoard.org AM62X PocketBeagle 2 running on A53"
+ select ARM64
+ select BINMAN
+ select OF_SYSTEM_SETUP
+
+config TARGET_AM62X_R5_POCKETBEAGLE2
+ bool "BeagleBoard.org AM62X PocketBeagle 2 running on R5"
+ select CPU_V7R
+ select SYS_THUMB_BUILD
+ select K3_LOAD_SYSFW
+ select RAM
+ select SPL_RAM
+ select K3_DDRSS
+ select BINMAN
+ imply SYS_K3_SPL_ATF
+
+endchoice
+
+if TARGET_AM62X_A53_POCKETBEAGLE2
+
+config SYS_BOARD
+ default "pocketbeagle2"
+
+config SYS_VENDOR
+ default "beagle"
+
+config SYS_CONFIG_NAME
+ default "pocketbeagle2"
+
+source "board/ti/common/Kconfig"
+
+endif
+
+if TARGET_AM62X_R5_POCKETBEAGLE2
+
+config SYS_BOARD
+ default "pocketbeagle2"
+
+config SYS_VENDOR
+ default "beagle"
+
+config SYS_CONFIG_NAME
+ default "pocketbeagle2"
+
+config SPL_LDSCRIPT
+ default "arch/arm/mach-omap2/u-boot-spl.lds"
+
+source "board/ti/common/Kconfig"
+
+endif
diff --git a/board/beagle/pocketbeagle2/MAINTAINERS b/board/beagle/pocketbeagle2/MAINTAINERS
new file mode 100644
index 00000000000..79bdd59af7e
--- /dev/null
+++ b/board/beagle/pocketbeagle2/MAINTAINERS
@@ -0,0 +1,10 @@
+POCKETBEAGLE2 BOARD
+M: Nishanth Menon <nm@ti.com>
+M: Robert Nelson <robertcnelson@gmail.com>
+M: Tom Rini <trini@konsulko.com>
+S: Maintained
+N: pocketbeagle2
+F: board/beagle/pocketbeagle2/
+F: include/configs/pocketbeagle2.h
+F: configs/am62_pocketbeagle2_a53_defconfig
+F: configs/am62_pocketbeagle2_r5_defconfig
diff --git a/board/beagle/pocketbeagle2/Makefile b/board/beagle/pocketbeagle2/Makefile
new file mode 100644
index 00000000000..3d42c160716
--- /dev/null
+++ b/board/beagle/pocketbeagle2/Makefile
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Makefile for AM625 PocketBeagle 2
+# https://www.beagleboard.org/boards/pocketbeagle-2
+#
+# Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
+#
+
+obj-y += pocketbeagle2.o
diff --git a/board/beagle/beagleplay/board-cfg.yaml b/board/beagle/pocketbeagle2/board-cfg.yaml
similarity index 100%
copy from board/beagle/beagleplay/board-cfg.yaml
copy to board/beagle/pocketbeagle2/board-cfg.yaml
diff --git a/board/beagle/beagleplay/pm-cfg.yaml b/board/beagle/pocketbeagle2/pm-cfg.yaml
similarity index 100%
copy from board/beagle/beagleplay/pm-cfg.yaml
copy to board/beagle/pocketbeagle2/pm-cfg.yaml
diff --git a/board/beagle/pocketbeagle2/pocketbeagle2.c b/board/beagle/pocketbeagle2/pocketbeagle2.c
new file mode 100644
index 00000000000..b6768caa34b
--- /dev/null
+++ b/board/beagle/pocketbeagle2/pocketbeagle2.c
@@ -0,0 +1,39 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Board specific initialization for AM625 PocketBeagle 2
+ * https://www.beagleboard.org/boards/pocketbeagle-2
+ *
+ * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2025 Robert Nelson, BeagleBoard.org Foundation
+ */
+
+#include <asm/arch/hardware.h>
+#include <asm/io.h>
+#include <dm/uclass.h>
+#include <env.h>
+#include <fdt_support.h>
+#include <spl.h>
+#include <asm/arch/k3-ddr.h>
+
+int dram_init(void)
+{
+ return fdtdec_setup_mem_size_base();
+}
+
+int dram_init_banksize(void)
+{
+ return fdtdec_setup_memory_banksize();
+}
+
+#if IS_ENABLED(CONFIG_BOARD_LATE_INIT)
+int board_late_init(void)
+{
+ char fdtfile[50];
+
+ snprintf(fdtfile, sizeof(fdtfile), "%s.dtb", CONFIG_DEFAULT_DEVICE_TREE);
+
+ env_set("fdtfile", fdtfile);
+
+ return 0;
+}
+#endif /* CONFIG_BOARD_LATE_INIT */
diff --git a/board/ti/am62x/am62x.env b/board/beagle/pocketbeagle2/pocketbeagle2.env
similarity index 59%
copy from board/ti/am62x/am62x.env
copy to board/beagle/pocketbeagle2/pocketbeagle2.env
index 60b5fd5e6ca..a9341c592d1 100644
--- a/board/ti/am62x/am62x.env
+++ b/board/beagle/pocketbeagle2/pocketbeagle2.env
@@ -10,23 +10,20 @@ rproc_fw_binaries= 0 /lib/firmware/am62-mcu-m4f0_0-fw
name_kern=Image
console=ttyS2,115200n8
-args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
- ${mtdparts}
+args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02860000
run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
+set_led_state_fail_load= led led-1 off; led led-2 on;
+ led led-3 off; led led-4 on
+set_led_state_start_load=led led-1 on; led led-2 off;
+ led led-3 on; led led-4 off
-boot_targets=mmc1 mmc0 usb pxe dhcp
+boot_targets=mmc1 mmc0
boot=mmc
mmcdev=1
bootpart=1:2
bootdir=/boot
+bootmeths=script extlinux efi pxe
rd_spec=-
-splashfile=ti_logo_414x97_32bpp.bmp.gz
-splashimage=0x80200000
-splashpos=m,m
-splashsource=sf
-
-#if CONFIG_BOOTMETH_ANDROID
-#include <env/ti/android.env>
-adtb_idx=0
-#endif
\ No newline at end of file
+kernel_comp_addr_r=0x85000000
+kernel_comp_size=0x20000000
diff --git a/board/phytec/phycore_am62x/rm-cfg.yaml b/board/beagle/pocketbeagle2/rm-cfg.yaml
similarity index 100%
copy from board/phytec/phycore_am62x/rm-cfg.yaml
copy to board/beagle/pocketbeagle2/rm-cfg.yaml
diff --git a/board/beagle/beagleplay/sec-cfg.yaml b/board/beagle/pocketbeagle2/sec-cfg.yaml
similarity index 100%
copy from board/beagle/beagleplay/sec-cfg.yaml
copy to board/beagle/pocketbeagle2/sec-cfg.yaml
diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62_pocketbeagle2_a53_defconfig
similarity index 91%
copy from configs/am62x_beagleplay_a53_defconfig
copy to configs/am62_pocketbeagle2_a53_defconfig
index c9bc7cd8d39..0f84a7c252d 100644
--- a/configs/am62x_beagleplay_a53_defconfig
+++ b/configs/am62_pocketbeagle2_a53_defconfig
@@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_SOC_K3_AM625=y
-CONFIG_TARGET_AM625_A53_BEAGLEPLAY=y
+CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2=y
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000
CONFIG_DM_GPIO=y
-CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am625-beagleplay"
+CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am62-pocketbeagle2"
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_DM_RESET=y
CONFIG_SPL_MMC=y
@@ -44,8 +44,6 @@ CONFIG_SPL_I2C=y
CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_POWER_DOMAIN=y
CONFIG_SPL_YMODEM_SUPPORT=y
-CONFIG_CMD_BOOTEFI_SELFTEST=y
-CONFIG_CMD_NVEDIT_EFI=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPIO_READ=y
CONFIG_CMD_I2C=y
@@ -53,6 +51,7 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_CACHE=y
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_UPSTREAM=y
@@ -90,10 +89,6 @@ CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ADMA=y
CONFIG_SPL_MMC_SDHCI_ADMA=y
CONFIG_MMC_SDHCI_AM654=y
-CONFIG_PHY_REALTEK=y
-CONFIG_PHY_TI=y
-CONFIG_DM_ETH_PHY=y
-CONFIG_TI_AM65_CPSW_NUSS=y
CONFIG_PHY=y
CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y
@@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
CONFIG_EXT4_WRITE=y
CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
CONFIG_LZO=y
-CONFIG_EFI_SET_TIME=y
+CONFIG_SYS_MEM_TOP_HIDE=0x4000000
+
+CONFIG_BOOTDELAY=0
-#include <configs/k3_efi_capsule.config>
#include <configs/am62x_a53_usbdfu.config>
diff --git a/configs/am62x_beagleplay_r5_defconfig b/configs/am62_pocketbeagle2_r5_defconfig
similarity index 93%
copy from configs/am62x_beagleplay_r5_defconfig
copy to configs/am62_pocketbeagle2_r5_defconfig
index aca8a7fc65c..e863204cfef 100644
--- a/configs/am62x_beagleplay_r5_defconfig
+++ b/configs/am62_pocketbeagle2_r5_defconfig
@@ -6,13 +6,13 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_SOC_K3_AM625=y
-CONFIG_TARGET_AM625_R5_BEAGLEPLAY=y
+CONFIG_TARGET_AM62X_R5_POCKETBEAGLE2=y
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x43c3a7f0
CONFIG_ENV_SIZE=0x20000
CONFIG_DM_GPIO=y
CONFIG_SPL_DM_SPI=y
-CONFIG_DEFAULT_DEVICE_TREE="k3-am625-r5-beagleplay"
+CONFIG_DEFAULT_DEVICE_TREE="k3-am62-r5-pocketbeagle2"
CONFIG_DM_RESET=y
CONFIG_SPL_SYS_MALLOC_F_LEN=0x7000
CONFIG_SPL_MMC=y
@@ -20,6 +20,7 @@ CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+CONFIG_SPL_TEXT_BASE=0x43c00000
CONFIG_SPL_BSS_START_ADDR=0x43c3b000
CONFIG_SPL_BSS_MAX_SIZE=0x3000
CONFIG_SPL_STACK_R=y
@@ -35,7 +36,6 @@ CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC=y
CONFIG_SPL_MAX_SIZE=0x3B000
CONFIG_SPL_PAD_TO=0x0
CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y
-CONFIG_SPL_BOARD_INIT=y
CONFIG_SPL_SYS_MALLOC_SIMPLE=y
CONFIG_SPL_SEPARATE_BSS=y
CONFIG_SPL_SYS_MALLOC=y
@@ -100,3 +100,4 @@ CONFIG_SPL_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_LIB_RATIONAL=y
CONFIG_SPL_LIB_RATIONAL=y
+CONFIG_SYS_MEM_TOP_HIDE=0x4000000
diff --git a/doc/board/beagle/am62_pocketbeagle2.rst b/doc/board/beagle/am62_pocketbeagle2.rst
new file mode 100644
index 00000000000..2f2aa621451
--- /dev/null
+++ b/doc/board/beagle/am62_pocketbeagle2.rst
@@ -0,0 +1,277 @@
+.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
+.. sectionauthor:: Randolph Sapp <rs@ti.com>
+
+AM62 Beagleboard.org PocketBeagle 2
+===================================
+
+Introduction:
+-------------
+
+BeagleBoard.org PocketBeagle 2 is an easy to use, affordable open source
+hardware single board computer based on the Texas Instruments AM625
+SoC.
+
+Further information can be found at:
+
+* Product Page: https://www.beagleboard.org/boards/pocketbeagle-2
+* Hardware documentation: https://openbeagle.org/pocketbeagle/pocketbeagle-2
+
+Boot Flow:
+----------
+Below is the pictorial representation of boot flow:
+
+.. image:: ../ti/img/boot_diagram_am62.svg
+ :alt: Boot flow diagram
+
+On this platform, 'TI Foundational Security' (TIFS) functions as the security
+enclave master while 'Device Manager' (DM), also known as the 'TISCI server' in
+"TI terminology", offers all the essential services. The A53 or M4F (Aux core)
+sends requests to TIFS/DM to accomplish these services, as illustrated in the
+diagram above.
+
+Sources:
+--------
+.. include:: ../ti/k3.rst
+ :start-after: .. k3_rst_include_start_boot_sources
+ :end-before: .. k3_rst_include_end_boot_sources
+
+.. include:: ../ti/k3.rst
+ :start-after: .. k3_rst_include_start_boot_firmwares
+ :end-before: .. k3_rst_include_end_tifsstub
+
+Build procedure:
+----------------
+
+#. Setup the environment variables:
+
+ .. include:: ../ti/k3.rst
+ :start-after: .. k3_rst_include_start_common_env_vars_desc
+ :end-before: .. k3_rst_include_end_common_env_vars_desc
+
+ .. include:: ../ti/k3.rst
+ :start-after: .. k3_rst_include_start_board_env_vars_desc
+ :end-before: .. k3_rst_include_end_board_env_vars_desc
+
+#. Set the variables corresponding to this platform:
+
+ .. include:: ../ti/k3.rst
+ :start-after: .. k3_rst_include_start_common_env_vars_defn
+ :end-before: .. k3_rst_include_end_common_env_vars_defn
+
+ .. prompt:: bash $
+
+ export UBOOT_CFG_CORTEXR=am62_pocketbeagle2_r5_defconfig
+ export UBOOT_CFG_CORTEXA=am62_pocketbeagle2_a53_defconfig
+ export TFA_BOARD=lite
+ export OPTEE_PLATFORM=k3-am62x
+
+ .. include:: ../ti/am62x_sk.rst
+ :start-after: .. am62x_evm_rst_include_start_build_steps
+ :end-before: .. am62x_evm_rst_include_end_build_steps
+
+Target Images
+-------------
+Copy these images to an SD card and boot:
+
+ * :file:`tiboot3.bin` from Cortex-R5 build.
+ * :file:`tispl.bin` and :file:`u-boot.img` from Cortex-A build
+
+Image formats
+-------------
+
+- :file:`tiboot3.bin`
+
+ .. image:: ../ti/img/multi_cert_tiboot3.bin.svg
+ :alt: tiboot3.bin image format
+
+- :file:`tispl.bin`
+
+ .. image:: ../ti/img/tifsstub_dm_tispl.bin.svg
+ :alt: tispl.bin image format
+
+Additional hardware for U-Boot development
+------------------------------------------
+
+* A Serial Console is critical for U-Boot development on the PocketBeagle 2. See
+ `PocketBeagle 2 serial console documentation`__.
+* uSD is the default, and a SD/MMC reader will be needed.
+* (optionally) JTAG is useful when working with very early stages of boot.
+
+.. __: https://docs.beagleboard.org/boards/pocketbeagle-2/03-design-and-specifications.html#serial-debug-port
+
+Default storage options
+-----------------------
+
+There is only one storage media option for the PocketBeagle 2, by default:
+
+* SD/MMC card interface
+
+Flash to uSD card
+-----------------
+
+If you choose to hand format your own bootable uSD card, be
+aware that it can be difficult. The following information
+may be helpful, but remember that it is only sometimes
+reliable, and partition options can cause issues. These
+can potentially help:
+
+* https://git.ti.com/cgit/arago-project/tisdk-setup-scripts/tree/create-sdcard.sh
+* https://elinux.org/Beagleboard:Expanding_File_System_Partition_On_A_microSD
+
+The simplest option is to start with a standard distribution
+image like those in `BeagleBoard.org Distros Page
+<https://www.beagleboard.org/distros>`_ and download a disk image for
+PocketBeagle 2. Pick a 16GB+ uSD card to be on the safer side.
+
+With an SD/MMC Card reader and `Balena Etcher
+<https://etcher.balena.io/>`_, having a functional setup in minutes is
+a trivial matter, and it works on almost all host operating systems.
+
+Updating U-Boot is a matter of copying the :file:`tiboot3.bin`,
+:file:`tispl.bin` and :file:`u-boot.img` to the "BOOT" partition of the uSD
+card. Remember to sync and unmount (or Eject - depending on the Operating
+System) the uSD card prior to physically removing from SD card reader.
+
+Also see following section on switch setting used for booting using
+uSD card.
+
+.. note::
+
+ If you are frequently working with uSD cards, you might find the
+ following useful:
+
+ * `USB-SD-Mux <https://www.linux-automation.com/en/products/usb-sd-mux.html>`_
+ * `SD-Wire <https://wiki.tizen.org/SDWire>`_
+
+LED patterns during boot
+------------------------
+
+.. list-table:: USR LED status indication
+ :widths: 16 16
+ :header-rows: 1
+
+ * - USR LEDs (1234)
+ - Indicates
+
+ * - 0000
+ - Boot failure or R5 image not started up
+
+ * - 1111
+ - A53 SPL/U-boot has started up
+
+ * - 1010
+ - OS boot process has been initiated
+
+ * - 0101
+ - OS boot process failed and drops to U-Boot shell
+
+.. note::
+
+ In the table above, 0 indicates LED switched off and 1 indicates LED
+ switched ON.
+
+.. warning::
+
+ If the "red" power LED is not glowing, the system power supply is not
+ functional. Please refer to the `PocketBeagle 2 documentation
+ <https://docs.beagleboard.org/boards/pocketbeagle-2/>`_ for further
+ information.
+
+A53 SPL DDR Memory Layout
+-------------------------
+
+.. include:: ../ti/am62x_sk.rst
+ :start-after: .. am62x_evm_rst_include_start_ddr_mem_layout
+ :end-before: .. am62x_evm_rst_include_end_ddr_mem_layout
+
+Switch Setting for Boot Mode
+----------------------------
+
+The boot time option is configured via "USR" button on the board. See the
+`PocketBeagle 2 Schematics
+<https://git.beagleboard.org/pocketbeagle/pocketbeagle-2/-/blob/main/pocketbeagle2_sch.pdf>`_
+and the `PocketBeagle 2 documentation on Boot Modes
+<https://docs.beagleboard.org/boards/pocketbeagle-2/03-design-and-specifications.html#boot-modes>`_
+for details.
+
+.. list-table:: Boot Modes
+ :widths: 16 16 16
+ :header-rows: 1
+
+ * - USR Button Status
+ - Primary Boot
+ - Secondary Boot
+
+ * - Not Pressed
+ - uSD
+ - USB Device Firmware Upgrade (DFU) mode
+
+ * - Pressed
+ - uSD
+ - UART
+
+To switch boot modes, hold the "USR" button while powering on the device with a
+USB type C power supply. Release the button when the red power LED lights up.
+
+DFU based boot
+--------------
+
+To boot the board over DFU, ensure there is no SD card inserted with a
+bootloader. After power-on the build artifacts needs to be uploaded one by one
+with a tool like dfu-util.
+
+.. include:: ../ti/am62x_sk.rst
+ :start-after: .. am62x_evm_rst_include_start_dfu_boot
+ :end-before: .. am62x_evm_rst_include_end_dfu_boot
+
+Debugging U-Boot
+----------------
+
+See :ref:`Common Debugging environment - OpenOCD <k3_rst_refer_openocd>`: for
+detailed setup and debugging information.
+
+.. warning::
+
+ **OpenOCD support since**: v0.12.0
+
+ If the default package version of OpenOCD in your development
+ environment's distribution needs to be updated, it might be necessary to
+ build OpenOCD from the source.
+
+.. include:: ../ti/k3.rst
+ :start-after: .. k3_rst_include_start_openocd_connect_tag_connect
+ :end-before: .. k3_rst_include_end_openocd_connect_tag_connect
+
+.. include:: ../ti/k3.rst
+ :start-after: .. k3_rst_include_start_openocd_cfg_external_intro
+ :end-before: .. k3_rst_include_end_openocd_cfg_external_intro
+
+For example, with the PocketBeagle 2 (AM62X platform), the
+:file:`openocd_connect.cfg` would look like:
+
+.. code-block:: tcl
+
+ # TUMPA example:
+ # http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User's_Manual
+ source [find interface/ftdi/tumpa.cfg]
+
+ transport select jtag
+
+ # default JTAG configuration has only SRST and no TRST
+ reset_config srst_only srst_push_pull
+
+ # delay after SRST goes inactive
+ adapter srst delay 20
+
+ if { ![info exists SOC] } {
+ # Set the SoC of interest
+ set SOC am625
+ }
+
+ source [find target/ti_k3.cfg]
+
+ ftdi tdo_sample_edge falling
+
+ # Speeds for FT2232H are in multiples of 2, and 32MHz is tops
+ # max speed we seem to achieve is ~20MHz.. so we pick 16MHz
+ adapter speed 16000
diff --git a/doc/board/beagle/index.rst b/doc/board/beagle/index.rst
index e33d39fc677..8bf099ae7be 100644
--- a/doc/board/beagle/index.rst
+++ b/doc/board/beagle/index.rst
@@ -10,6 +10,7 @@ ARM based boards
.. toctree::
:maxdepth: 2
+ am62_pocketbeagle2
am62x_beagleplay
am67a_beagley_ai.rst
j721e_beagleboneai64
diff --git a/dts/upstream/src/arm64/ti/k3-am62-pocketbeagle2.dts b/dts/upstream/src/arm64/ti/k3-am62-pocketbeagle2.dts
index 7a4cffc27bd..12d33619379 100644
--- a/dts/upstream/src/arm64/ti/k3-am62-pocketbeagle2.dts
+++ b/dts/upstream/src/arm64/ti/k3-am62-pocketbeagle2.dts
@@ -22,6 +22,7 @@
serial1 = &main_uart1;
serial2 = &main_uart6;
serial3 = &main_uart0;
+ mmc0 = &sdhci0;
mmc1 = &sdhci1;
usb0 = &usb0;
usb1 = &usb1;
@@ -232,6 +233,22 @@
>;
};
+ main_mmc0_pins_default: main-mmc0-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3/V3) MMC0_CMD */
+ AM62X_IOPAD(0x218, PIN_INPUT, 0) /* (AB1/Y1) MMC0_CLK */
+ AM62X_IOPAD(0x214, PIN_INPUT, 0) /* (AA2/V2) MMC0_DAT0 */
+ AM62X_IOPAD(0x210, PIN_INPUT, 0) /* (AA1/V1) MMC0_DAT1 */
+ AM62X_IOPAD(0x20c, PIN_INPUT, 0) /* (AA3/W2) MMC0_DAT2 */
+ AM62X_IOPAD(0x208, PIN_INPUT, 0) /* (Y4/W1) MMC0_DAT3 */
+ AM62X_IOPAD(0x204, PIN_INPUT, 0) /* (AB2/Y2) MMC0_DAT4 */
+ AM62X_IOPAD(0x200, PIN_INPUT, 0) /* (AC1/W3) MMC0_DAT5 */
+ AM62X_IOPAD(0x1fc, PIN_INPUT, 0) /* (AD2/W4) MMC0_DAT6 */
+ AM62X_IOPAD(0x1f8, PIN_INPUT, 0) /* (AC2/V4) MMC0_DAT7 */
+ >;
+ bootph-all;
+ };
+
main_mmc1_pins_default: main-mmc1-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
@@ -280,6 +297,18 @@
};
};
+&cpsw3g {
+ status = "disabled";
+};
+
+&cpsw_port1 {
+ status = "disabled";
+};
+
+&cpsw_port2 {
+ status = "disabled";
+};
+
&epwm2 {
status = "okay";
pinctrl-names = "default";
@@ -328,6 +357,12 @@
};
};
+&main_i2c1 {
+ clock-frequency = <400000>;
+ bootph-all;
+ status = "okay";
+};
+
&main_i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&main_i2c2_pins_default>;
@@ -356,6 +391,14 @@
};
};
+&sdhci0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_mmc0_pins_default>;
+ disable-wp;
+ bootph-all;
+ status = "okay";
+};
+
&sdhci1 {
/* SD/MMC */
vmmc-supply = <&vdd_mmc1>;
diff --git a/include/configs/beagley_ai.h b/include/configs/pocketbeagle2.h
similarity index 57%
copy from include/configs/beagley_ai.h
copy to include/configs/pocketbeagle2.h
index a7072a094c5..dd6956aa8b9 100644
--- a/include/configs/beagley_ai.h
+++ b/include/configs/pocketbeagle2.h
@@ -1,14 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
- * Configuration header file for BeagleY-AI
+ * Configuration header file for PocketBeagle 2
*
* Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
*/
-#ifndef __CONFIG_BEAGLEY_AI_H
-#define __CONFIG_BEAGLEY_AI_H
+#ifndef __CONFIG_POCKETBEAGLE2_H
+#define __CONFIG_POCKETBEAGLE2_H
/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>
-#endif /* __CONFIG_BEAGLEY_AI_H */
+#endif /* __CONFIG_POCKETBEAGLE2_H */
--
2.53.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 3/3] k3-am62-pocketbeagle2: add support for 1GB variant
2026-03-17 22:37 [PATCH 0/3] k3-am62-pocketbeagle2: add board and variant support rs
2026-03-17 22:37 ` [PATCH 1/3] arm: mach-k3: am62: add &main_uart6 to clock and pwr tree rs
2026-03-17 22:37 ` [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support rs
@ 2026-03-17 22:38 ` rs
2026-03-20 10:10 ` Anshul Dalal
2 siblings, 1 reply; 23+ messages in thread
From: rs @ 2026-03-17 22:38 UTC (permalink / raw)
To: robertcnelson, bb, nm, trini, afd; +Cc: u-boot
From: Randolph Sapp <rs@ti.com>
Take Phytec's current DDR fixup functions and utilize them to
dynamically adjust for variants in the pocketbeagle2. There are
currently 3 skews, two of which are both 512MB with the same memory
configuration, and one which is 1GB using the same CWL and CL settings
but a modified density [1].
Based off of Bryan Brattlof's patch [2].
[1] https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/5411/8G%20Bits%20DDR4%20SDRAM.pdf
[2] https://github.com/bryanbrattlof/beagleboot/commit/fb2f022e27427e990d7a33fd001ffb571e13cfc3
Signed-off-by: Randolph Sapp <rs@ti.com>
---
board/beagle/pocketbeagle2/Kconfig | 26 ++++
board/beagle/pocketbeagle2/Makefile | 2 +
board/beagle/pocketbeagle2/pocketbeagle2.c | 112 +++++++++++++++++-
.../beagle/pocketbeagle2/pocketbeagle2_ddr.h | 50 ++++++++
configs/am62_pocketbeagle2_r5_defconfig | 5 +-
5 files changed, 192 insertions(+), 3 deletions(-)
create mode 100644 board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
diff --git a/board/beagle/pocketbeagle2/Kconfig b/board/beagle/pocketbeagle2/Kconfig
index e957b8e8377..a361fcebfc1 100644
--- a/board/beagle/pocketbeagle2/Kconfig
+++ b/board/beagle/pocketbeagle2/Kconfig
@@ -12,6 +12,7 @@ config TARGET_AM62X_A53_POCKETBEAGLE2
select ARM64
select BINMAN
select OF_SYSTEM_SETUP
+ imply TI_I2C_BOARD_DETECT
config TARGET_AM62X_R5_POCKETBEAGLE2
bool "BeagleBoard.org AM62X PocketBeagle 2 running on R5"
@@ -23,6 +24,7 @@ config TARGET_AM62X_R5_POCKETBEAGLE2
select K3_DDRSS
select BINMAN
imply SYS_K3_SPL_ATF
+ imply TI_I2C_BOARD_DETECT
endchoice
@@ -58,3 +60,27 @@ config SPL_LDSCRIPT
source "board/ti/common/Kconfig"
endif
+
+config POCKETBEAGLE2_AM62X_RAM_SIZE_FIX
+ bool "Set the PocketBeagle 2 RAM size instead of detecting it"
+ default false
+ help
+ RAM size is automatically detected through the device revision stored
+ in EEPROM. This overrides the detection logic with a fixed value.
+
+choice
+ prompt "PocketBeagle 2 RAM size"
+ depends on POCKETBEAGLE2_AM62X_RAM_SIZE_FIX
+ default POCKETBEAGLE2_AM62X_RAM_SIZE_512MB
+
+config POCKETBEAGLE2_AM62X_RAM_SIZE_512MB
+ bool "512MB RAM"
+ help
+ Set RAM size fix to 512MB for the PocketBeagle 2.
+
+config POCKETBEAGLE2_AM62X_RAM_SIZE_1GB
+ bool "1GB RAM"
+ help
+ Set RAM size fix to 1GB for the PocketBeagle 2.
+
+endchoice
diff --git a/board/beagle/pocketbeagle2/Makefile b/board/beagle/pocketbeagle2/Makefile
index 3d42c160716..dd529fe6d75 100644
--- a/board/beagle/pocketbeagle2/Makefile
+++ b/board/beagle/pocketbeagle2/Makefile
@@ -7,3 +7,5 @@
#
obj-y += pocketbeagle2.o
+obj-${CONFIG_K3_DDRSS} += ../../phytec/common/k3/k3_ddrss_patch.o
+obj-${CONFIG_TI_I2C_BOARD_DETECT} += ../../ti/common/board_detect.o
diff --git a/board/beagle/pocketbeagle2/pocketbeagle2.c b/board/beagle/pocketbeagle2/pocketbeagle2.c
index b6768caa34b..1bfc79350b6 100644
--- a/board/beagle/pocketbeagle2/pocketbeagle2.c
+++ b/board/beagle/pocketbeagle2/pocketbeagle2.c
@@ -15,15 +15,123 @@
#include <spl.h>
#include <asm/arch/k3-ddr.h>
+#include "../../ti/common/board_detect.h"
+#include "pocketbeagle2_ddr.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static int pocketbeagle2_get_ddr_size(void)
+{
+ // check config overrides first
+ if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_FIX)) {
+ if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_512MB))
+ return EEPROM_RAM_SIZE_512MB;
+ if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_1GB))
+ return EEPROM_RAM_SIZE_1GB;
+ }
+
+#if IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)
+ // dynamically detect the config if we can
+ if (!do_board_detect_am6()) {
+ struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
+
+ if (strlen(ep->name) > 11 && ep->name[0] == 'P') {
+ /*
+ * POCKETBEAGL2A00 (am6232 512MB)
+ * POCKETBEAGL2A10 (am625 512MB)
+ * POCKETBEAGL2A1I (am625 1GB)
+ */
+ if (!strncmp(&ep->name[11], "2A1I", 4))
+ return EEPROM_RAM_SIZE_1GB;
+ }
+ }
+#endif
+
+ return EEPROM_RAM_SIZE_512MB;
+}
+
int dram_init(void)
{
- return fdtdec_setup_mem_size_base();
+ if (!IS_ENABLED(CONFIG_CPU_V7R))
+ return fdtdec_setup_mem_size_base();
+
+ return 0;
}
+// logic after this block assumes that there is only 1 DRAM bank currently
+#if CONFIG_NR_DRAM_BANKS != 1
+#error Unsupported number of DRAM banks!
+#endif
+
int dram_init_banksize(void)
{
- return fdtdec_setup_memory_banksize();
+ u8 ram_size;
+
+ if (!IS_ENABLED(CONFIG_CPU_V7R))
+ return fdtdec_setup_memory_banksize();
+
+ memset(gd->bd->bi_dram, 0, sizeof(gd->bd->bi_dram[0]));
+
+ ram_size = pocketbeagle2_get_ddr_size();
+ switch (ram_size) {
+ case EEPROM_RAM_SIZE_1GB:
+ gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = 0x40000000;
+ gd->ram_size = 0x40000000;
+ break;
+ case EEPROM_RAM_SIZE_512MB:
+ default:
+ gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = 0x20000000;
+ gd->ram_size = 0x20000000;
+ break;
+ }
+
+ return 0;
+}
+
+#if IS_ENABLED(CONFIG_K3_DDRSS)
+static int update_ddrss_timings(void)
+{
+ int ret = 0;
+ u8 ram_size = 0;
+ struct ddrss *ddr_patch = NULL;
+ void *fdt = (void *)gd->fdt_blob;
+
+ ram_size = pocketbeagle2_get_ddr_size();
+ ddr_patch = &pocketbeagle2_ddrss_data[ram_size];
+
+ if (!ddr_patch)
+ return ret;
+
+ ret = fdt_apply_ddrss_timings_patch(fdt, ddr_patch);
+ if (ret) {
+ printf("Failed to apply ddrs timings patch: %d\n", ret);
+ return ret;
+ }
+
+ return ret;
+}
+
+int do_board_detect(void)
+{
+ void *fdt = (void *)gd->fdt_blob;
+ u64 start[] = {gd->bd->bi_dram[0].start};
+ u64 size[] = {gd->bd->bi_dram[0].size};
+ int ret;
+
+ dram_init();
+ dram_init_banksize();
+
+ ret = fdt_fixup_memory_banks(fdt, start, size, 1);
+ if (ret) {
+ printf("Failed to fixup memory banks: %d\n", ret);
+ return ret;
+ }
+
+ return update_ddrss_timings();
}
+#endif /* CONFIG_K3_DDRSS */
#if IS_ENABLED(CONFIG_BOARD_LATE_INIT)
int board_late_init(void)
diff --git a/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h b/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
new file mode 100644
index 00000000000..6d248ce6dfa
--- /dev/null
+++ b/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
@@ -0,0 +1,50 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * DDR override logic for AM625 PocketBeagle 2
+ * https://www.beagleboard.org/boards/pocketbeagle-2
+ *
+ * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef __POCKETBEAGLE2_DDR_H
+#define __POCKETBEAGLE2_DDR_H
+
+#include "../../phytec/common/k3/k3_ddrss_patch.h"
+
+enum {
+ EEPROM_RAM_SIZE_512MB = 0,
+ EEPROM_RAM_SIZE_1GB = 1
+};
+
+struct ddr_reg ddr_1gb_ctl_regs[] = {
+ { 317, 0x00000101 },
+ { 318, 0x1FFF0000 },
+};
+
+struct ddr_reg ddr_1gb_pi_regs[] = {
+ { 77, 0x04010100 },
+};
+
+struct ddrss pocketbeagle2_ddrss_data[] = {
+ // default configuration
+ [EEPROM_RAM_SIZE_512MB] = {
+ .ctl_regs = NULL,
+ .ctl_regs_num = 0,
+ .pi_regs = NULL,
+ .pi_regs_num = 0,
+ .phy_regs = NULL,
+ .phy_regs_num = 0,
+ },
+
+ // industrial configuration
+ [EEPROM_RAM_SIZE_1GB] = {
+ .ctl_regs = &ddr_1gb_ctl_regs[0],
+ .ctl_regs_num = ARRAY_SIZE(ddr_1gb_ctl_regs),
+ .pi_regs = &ddr_1gb_pi_regs[0],
+ .pi_regs_num = ARRAY_SIZE(ddr_1gb_pi_regs),
+ .phy_regs = NULL,
+ .phy_regs_num = 0,
+ },
+};
+
+#endif /* __POCKETBEAGLE2_DDR_H */
diff --git a/configs/am62_pocketbeagle2_r5_defconfig b/configs/am62_pocketbeagle2_r5_defconfig
index e863204cfef..d72f78b932c 100644
--- a/configs/am62_pocketbeagle2_r5_defconfig
+++ b/configs/am62_pocketbeagle2_r5_defconfig
@@ -14,7 +14,7 @@ CONFIG_DM_GPIO=y
CONFIG_SPL_DM_SPI=y
CONFIG_DEFAULT_DEVICE_TREE="k3-am62-r5-pocketbeagle2"
CONFIG_DM_RESET=y
-CONFIG_SPL_SYS_MALLOC_F_LEN=0x7000
+CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000
CONFIG_SPL_MMC=y
CONFIG_SPL_SERIAL=y
CONFIG_SPL_DRIVERS_MISC=y
@@ -42,6 +42,7 @@ CONFIG_SPL_SYS_MALLOC=y
CONFIG_SPL_EARLY_BSS=y
CONFIG_SPL_SYS_MMCSD_RAW_MODE=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400
+CONFIG_SPL_I2C=y
CONFIG_SPL_DM_MAILBOX=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_POWER_DOMAIN=y
@@ -73,6 +74,8 @@ CONFIG_SPL_CLK_K3_PLL=y
CONFIG_SPL_CLK_K3=y
CONFIG_TI_SCI_PROTOCOL=y
CONFIG_DA8XX_GPIO=y
+CONFIG_DM_I2C=y
+CONFIG_SYS_I2C_OMAP24XX=y
CONFIG_DM_MAILBOX=y
CONFIG_K3_SEC_PROXY=y
CONFIG_SPL_MISC=y
--
2.53.0
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-17 22:37 ` [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support rs
@ 2026-03-20 9:29 ` Anshul Dalal
2026-03-20 15:32 ` Robert Nelson
0 siblings, 1 reply; 23+ messages in thread
From: Anshul Dalal @ 2026-03-20 9:29 UTC (permalink / raw)
To: rs, robertcnelson, bb, nm, trini, afd; +Cc: u-boot
On Wed Mar 18, 2026 at 4:07 AM IST, rs wrote:
> From: Randolph Sapp <rs@ti.com>
>
> Add initial board support for the PocketBeagle 2, based on Robert Nelson
> and Bryan Brattlof's work. Unify all debug consoles to main_uart6. Use
> DDR config v10.32 from our sysconfig tool [1] for Kingston's memory [2],
> (4Gb Desnity with a CL of 11 and CWL of 9). Add support for the
> SPL_TEXT_BASE config parameter. Ensure all files have a summary and SPDX
> identifier.
>
> [1] https://dev.ti.com/sysconfig
> [2] https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/6465/D2516AN9EXGXN-TU.pdf
>
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
> ...> k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi} | 92 +++---
> ...dtsi => k3-am62-pocketbeagle2-u-boot.dtsi} | 154 ++++++----
> arch/arm/dts/k3-am62-r5-pocketbeagle2.dts | 35 +++
> arch/arm/mach-k3/am62x/Kconfig | 1 +
> board/beagle/pocketbeagle2/Kconfig | 60 ++++
> board/beagle/pocketbeagle2/MAINTAINERS | 10 +
> board/beagle/pocketbeagle2/Makefile | 9 +
> .../board-cfg.yaml | 0
> .../{beagleplay => pocketbeagle2}/pm-cfg.yaml | 0
> board/beagle/pocketbeagle2/pocketbeagle2.c | 39 +++
> .../pocketbeagle2/pocketbeagle2.env} | 21 +-
> .../pocketbeagle2}/rm-cfg.yaml | 0
> .../sec-cfg.yaml | 0
> ...onfig => am62_pocketbeagle2_a53_defconfig} | 16 +-
> ...config => am62_pocketbeagle2_r5_defconfig} | 7 +-
> doc/board/beagle/am62_pocketbeagle2.rst | 277 ++++++++++++++++++
> doc/board/beagle/index.rst | 1 +
> .../src/arm64/ti/k3-am62-pocketbeagle2.dts | 43 +++
> .../configs/{beagley_ai.h => pocketbeagle2.h} | 8 +-
> 19 files changed, 646 insertions(+), 127 deletions(-)
> copy arch/arm/dts/{k3-am62x-sk-ddr4-1600MTs.dtsi => k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi} (97%)
> copy arch/arm/dts/{k3-am67a-beagley-ai-u-boot.dtsi => k3-am62-pocketbeagle2-u-boot.dtsi} (53%)
> create mode 100644 arch/arm/dts/k3-am62-r5-pocketbeagle2.dts
> create mode 100644 board/beagle/pocketbeagle2/Kconfig
> create mode 100644 board/beagle/pocketbeagle2/MAINTAINERS
> create mode 100644 board/beagle/pocketbeagle2/Makefile
> copy board/beagle/{beagleplay => pocketbeagle2}/board-cfg.yaml (100%)
> copy board/beagle/{beagleplay => pocketbeagle2}/pm-cfg.yaml (100%)
> create mode 100644 board/beagle/pocketbeagle2/pocketbeagle2.c
> copy board/{ti/am62x/am62x.env => beagle/pocketbeagle2/pocketbeagle2.env} (59%)
> copy board/{phytec/phycore_am62x => beagle/pocketbeagle2}/rm-cfg.yaml (100%)
> copy board/beagle/{beagleplay => pocketbeagle2}/sec-cfg.yaml (100%)
> copy configs/{am62x_beagleplay_a53_defconfig => am62_pocketbeagle2_a53_defconfig} (91%)
> copy configs/{am62x_beagleplay_r5_defconfig => am62_pocketbeagle2_r5_defconfig} (93%)
> create mode 100644 doc/board/beagle/am62_pocketbeagle2.rst
> copy include/configs/{beagley_ai.h => pocketbeagle2.h} (57%)
>
> diff --git a/arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi b/arch/arm/dts/k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi
> similarity index 97%
> copy from arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi
> copy to arch/arm/dts/k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi
> index 4afa68a6739..455a55f2c0d 100644
> --- a/arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi
> +++ b/arch/arm/dts/k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi
> @@ -2,20 +2,22 @@
> /*
> * This file was generated with the
> * AM623/AM625 SysConfig DDR Configuration Tool for AM64x, AM625, AM623, AM62Ax, AM62Px, AM62Dx, AM62Lx v0.10.32
> - * Fri Jan 30 2026 13:45:31 GMT+0530 (India Standard Time)
> + * Mon Jan 26 2026 10:31:36 GMT-0600 (Central Standard Time)
> * DDR Type: DDR4
> * Frequency = 800MHz (1600MTs)
> - * Density: 16Gb
> + * Density: 4Gb
> * Number of Ranks: 1
> */
>
> +
> #define DDRSS_PLL_FHS_CNT 6
> #define DDRSS_PLL_FREQUENCY_1 400000000
> #define DDRSS_PLL_FREQUENCY_2 400000000
> -#define DDRSS_SDRAM_IDX 15
> +#define DDRSS_SDRAM_IDX 13
> #define DDRSS_REGION_IDX 16
> #define DDRSS_TOOL_VERSION "0.10.32"
>
> +
> #define DDRSS_CTL_0_DATA 0x00000A00
> #define DDRSS_CTL_1_DATA 0x00000000
> #define DDRSS_CTL_2_DATA 0x00000000
> @@ -54,11 +56,11 @@
> #define DDRSS_CTL_35_DATA 0x00000000
> #define DDRSS_CTL_36_DATA 0x00000000
> #define DDRSS_CTL_37_DATA 0x00000000
> -#define DDRSS_CTL_38_DATA 0x0000091C
> +#define DDRSS_CTL_38_DATA 0x00000916
> #define DDRSS_CTL_39_DATA 0x18181818
> -#define DDRSS_CTL_40_DATA 0x0000091C
> +#define DDRSS_CTL_40_DATA 0x00000916
> #define DDRSS_CTL_41_DATA 0x18181818
> -#define DDRSS_CTL_42_DATA 0x0000091C
> +#define DDRSS_CTL_42_DATA 0x00000916
> #define DDRSS_CTL_43_DATA 0x18181818
> #define DDRSS_CTL_44_DATA 0x05050404
> #define DDRSS_CTL_45_DATA 0x00002706
> @@ -220,22 +222,22 @@
> #define DDRSS_CTL_201_DATA 0x00000000
> #define DDRSS_CTL_202_DATA 0x00000000
> #define DDRSS_CTL_203_DATA 0x00000000
> -#define DDRSS_CTL_204_DATA 0x00042400
> +#define DDRSS_CTL_204_DATA 0x00041000
> #define DDRSS_CTL_205_DATA 0x00000301
> #define DDRSS_CTL_206_DATA 0x00000000
> -#define DDRSS_CTL_207_DATA 0x00000424
> +#define DDRSS_CTL_207_DATA 0x00000410
> #define DDRSS_CTL_208_DATA 0x00000301
> #define DDRSS_CTL_209_DATA 0x00000000
> -#define DDRSS_CTL_210_DATA 0x00000424
> +#define DDRSS_CTL_210_DATA 0x00000410
> #define DDRSS_CTL_211_DATA 0x00000301
> #define DDRSS_CTL_212_DATA 0x00000000
> -#define DDRSS_CTL_213_DATA 0x00000424
> +#define DDRSS_CTL_213_DATA 0x00000410
> #define DDRSS_CTL_214_DATA 0x00000301
> #define DDRSS_CTL_215_DATA 0x00000000
> -#define DDRSS_CTL_216_DATA 0x00000424
> +#define DDRSS_CTL_216_DATA 0x00000410
> #define DDRSS_CTL_217_DATA 0x00000301
> #define DDRSS_CTL_218_DATA 0x00000000
> -#define DDRSS_CTL_219_DATA 0x00000424
> +#define DDRSS_CTL_219_DATA 0x00000410
> #define DDRSS_CTL_220_DATA 0x00000301
> #define DDRSS_CTL_221_DATA 0x00000000
> #define DDRSS_CTL_222_DATA 0x00000000
> @@ -333,8 +335,8 @@
> #define DDRSS_CTL_314_DATA 0x00000000
> #define DDRSS_CTL_315_DATA 0x00000100
> #define DDRSS_CTL_316_DATA 0x01010000
> -#define DDRSS_CTL_317_DATA 0x00000000
> -#define DDRSS_CTL_318_DATA 0x3FFF0000
> +#define DDRSS_CTL_317_DATA 0x00000202
> +#define DDRSS_CTL_318_DATA 0x0FFF0000
> #define DDRSS_CTL_319_DATA 0x000FFF00
> #define DDRSS_CTL_320_DATA 0xFFFFFFFF
> #define DDRSS_CTL_321_DATA 0x00FFFF00
> @@ -391,8 +393,8 @@
> #define DDRSS_CTL_372_DATA 0x06060806
> #define DDRSS_CTL_373_DATA 0x00010101
> #define DDRSS_CTL_374_DATA 0x02000000
> -#define DDRSS_CTL_375_DATA 0x05020101
> -#define DDRSS_CTL_376_DATA 0x00000505
> +#define DDRSS_CTL_375_DATA 0x02020101
> +#define DDRSS_CTL_376_DATA 0x00000202
> #define DDRSS_CTL_377_DATA 0x02020200
> #define DDRSS_CTL_378_DATA 0x02020202
> #define DDRSS_CTL_379_DATA 0x02020202
> @@ -408,7 +410,7 @@
> #define DDRSS_CTL_389_DATA 0x00000200
> #define DDRSS_CTL_390_DATA 0x0000DB60
> #define DDRSS_CTL_391_DATA 0x0001E780
> -#define DDRSS_CTL_392_DATA 0x080D0302
> +#define DDRSS_CTL_392_DATA 0x050A0302
> #define DDRSS_CTL_393_DATA 0x001E0506
> #define DDRSS_CTL_394_DATA 0x000030C0
> #define DDRSS_CTL_395_DATA 0x00000200
> @@ -417,7 +419,7 @@
> #define DDRSS_CTL_398_DATA 0x00000200
> #define DDRSS_CTL_399_DATA 0x0000DB60
> #define DDRSS_CTL_400_DATA 0x0001E780
> -#define DDRSS_CTL_401_DATA 0x080D0302
> +#define DDRSS_CTL_401_DATA 0x050A0302
> #define DDRSS_CTL_402_DATA 0x001E0506
> #define DDRSS_CTL_403_DATA 0x000030C0
> #define DDRSS_CTL_404_DATA 0x00000200
> @@ -426,7 +428,7 @@
> #define DDRSS_CTL_407_DATA 0x00000200
> #define DDRSS_CTL_408_DATA 0x0000DB60
> #define DDRSS_CTL_409_DATA 0x0001E780
> -#define DDRSS_CTL_410_DATA 0x080D0302
> +#define DDRSS_CTL_410_DATA 0x050A0302
> #define DDRSS_CTL_411_DATA 0x00000506
> #define DDRSS_CTL_412_DATA 0x00000000
> #define DDRSS_CTL_413_DATA 0x0302000A
> @@ -516,7 +518,7 @@
> #define DDRSS_PI_74_DATA 0x00000000
> #define DDRSS_PI_75_DATA 0x00000005
> #define DDRSS_PI_76_DATA 0x01000000
> -#define DDRSS_PI_77_DATA 0x04000100
> +#define DDRSS_PI_77_DATA 0x04020100
> #define DDRSS_PI_78_DATA 0x00020000
> #define DDRSS_PI_79_DATA 0x00010002
> #define DDRSS_PI_80_DATA 0x00000001
> @@ -606,14 +608,14 @@
> #define DDRSS_PI_164_DATA 0x00007800
> #define DDRSS_PI_165_DATA 0x00780078
> #define DDRSS_PI_166_DATA 0x00141414
> -#define DDRSS_PI_167_DATA 0x00000036
> -#define DDRSS_PI_168_DATA 0x00000036
> -#define DDRSS_PI_169_DATA 0x00040036
> +#define DDRSS_PI_167_DATA 0x00000033
> +#define DDRSS_PI_168_DATA 0x00000033
> +#define DDRSS_PI_169_DATA 0x00040033
> #define DDRSS_PI_170_DATA 0x04000400
> #define DDRSS_PI_171_DATA 0xC8000009
> -#define DDRSS_PI_172_DATA 0x0000091C
> -#define DDRSS_PI_173_DATA 0x00091CC8
> -#define DDRSS_PI_174_DATA 0x001CC800
> +#define DDRSS_PI_172_DATA 0x00000916
> +#define DDRSS_PI_173_DATA 0x000916C8
> +#define DDRSS_PI_174_DATA 0x0016C800
> #define DDRSS_PI_175_DATA 0x00000118
> #define DDRSS_PI_176_DATA 0x00001860
> #define DDRSS_PI_177_DATA 0x00000118
> @@ -626,14 +628,14 @@
> #define DDRSS_PI_184_DATA 0x01080108
> #define DDRSS_PI_185_DATA 0x00000108
> #define DDRSS_PI_186_DATA 0x00000000
> -#define DDRSS_PI_187_DATA 0x05000000
> -#define DDRSS_PI_188_DATA 0x01010505
> +#define DDRSS_PI_187_DATA 0x02000000
> +#define DDRSS_PI_188_DATA 0x01010202
> #define DDRSS_PI_189_DATA 0x01010101
> #define DDRSS_PI_190_DATA 0x00181818
> #define DDRSS_PI_191_DATA 0x00000000
> #define DDRSS_PI_192_DATA 0x00000000
> -#define DDRSS_PI_193_DATA 0x09000000
> -#define DDRSS_PI_194_DATA 0x06060909
> +#define DDRSS_PI_193_DATA 0x06000000
> +#define DDRSS_PI_194_DATA 0x06060606
> #define DDRSS_PI_195_DATA 0x03030306
> #define DDRSS_PI_196_DATA 0x00000000
> #define DDRSS_PI_197_DATA 0x00000000
> @@ -661,15 +663,15 @@
> #define DDRSS_PI_219_DATA 0x001600C8
> #define DDRSS_PI_220_DATA 0x010100C8
> #define DDRSS_PI_221_DATA 0x00001701
> -#define DDRSS_PI_222_DATA 0x1F0F0053
> -#define DDRSS_PI_223_DATA 0x05000001
> -#define DDRSS_PI_224_DATA 0x00170A09
> -#define DDRSS_PI_225_DATA 0x1F0F0053
> -#define DDRSS_PI_226_DATA 0x05000001
> -#define DDRSS_PI_227_DATA 0x00170A09
> -#define DDRSS_PI_228_DATA 0x1F0F0053
> -#define DDRSS_PI_229_DATA 0x05000001
> -#define DDRSS_PI_230_DATA 0x00010A09
> +#define DDRSS_PI_222_DATA 0x1F0F0050
> +#define DDRSS_PI_223_DATA 0x02000001
> +#define DDRSS_PI_224_DATA 0x00170A06
> +#define DDRSS_PI_225_DATA 0x1F0F0050
> +#define DDRSS_PI_226_DATA 0x02000001
> +#define DDRSS_PI_227_DATA 0x00170A06
> +#define DDRSS_PI_228_DATA 0x1F0F0050
> +#define DDRSS_PI_229_DATA 0x02000001
> +#define DDRSS_PI_230_DATA 0x00010A06
> #define DDRSS_PI_231_DATA 0x0C0B0700
> #define DDRSS_PI_232_DATA 0x000D0605
> #define DDRSS_PI_233_DATA 0x0000C570
> @@ -736,7 +738,7 @@
> #define DDRSS_PI_294_DATA 0x01000000
> #define DDRSS_PI_295_DATA 0x00020201
> #define DDRSS_PI_296_DATA 0x00000000
> -#define DDRSS_PI_297_DATA 0x00000424
> +#define DDRSS_PI_297_DATA 0x00000410
> #define DDRSS_PI_298_DATA 0x00000301
> #define DDRSS_PI_299_DATA 0x00000000
> #define DDRSS_PI_300_DATA 0x00000000
> @@ -744,7 +746,7 @@
> #define DDRSS_PI_302_DATA 0x00001400
> #define DDRSS_PI_303_DATA 0x00000493
> #define DDRSS_PI_304_DATA 0x00000000
> -#define DDRSS_PI_305_DATA 0x00000424
> +#define DDRSS_PI_305_DATA 0x00000410
> #define DDRSS_PI_306_DATA 0x00000301
> #define DDRSS_PI_307_DATA 0x00000000
> #define DDRSS_PI_308_DATA 0x00000000
> @@ -752,7 +754,7 @@
> #define DDRSS_PI_310_DATA 0x00001400
> #define DDRSS_PI_311_DATA 0x00000493
> #define DDRSS_PI_312_DATA 0x00000000
> -#define DDRSS_PI_313_DATA 0x00000424
> +#define DDRSS_PI_313_DATA 0x00000410
> #define DDRSS_PI_314_DATA 0x00000301
> #define DDRSS_PI_315_DATA 0x00000000
> #define DDRSS_PI_316_DATA 0x00000000
> @@ -760,7 +762,7 @@
> #define DDRSS_PI_318_DATA 0x00001400
> #define DDRSS_PI_319_DATA 0x00000493
> #define DDRSS_PI_320_DATA 0x00000000
> -#define DDRSS_PI_321_DATA 0x00000424
> +#define DDRSS_PI_321_DATA 0x00000410
> #define DDRSS_PI_322_DATA 0x00000301
> #define DDRSS_PI_323_DATA 0x00000000
> #define DDRSS_PI_324_DATA 0x00000000
> @@ -768,7 +770,7 @@
> #define DDRSS_PI_326_DATA 0x00001400
> #define DDRSS_PI_327_DATA 0x00000493
> #define DDRSS_PI_328_DATA 0x00000000
> -#define DDRSS_PI_329_DATA 0x00000424
> +#define DDRSS_PI_329_DATA 0x00000410
> #define DDRSS_PI_330_DATA 0x00000301
> #define DDRSS_PI_331_DATA 0x00000000
> #define DDRSS_PI_332_DATA 0x00000000
> @@ -776,7 +778,7 @@
> #define DDRSS_PI_334_DATA 0x00001400
> #define DDRSS_PI_335_DATA 0x00000493
> #define DDRSS_PI_336_DATA 0x00000000
> -#define DDRSS_PI_337_DATA 0x00000424
> +#define DDRSS_PI_337_DATA 0x00000410
> #define DDRSS_PI_338_DATA 0x00000301
> #define DDRSS_PI_339_DATA 0x00000000
> #define DDRSS_PI_340_DATA 0x00000000
> diff --git a/arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi b/arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
> similarity index 53%
> copy from arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi
> copy to arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
> index 0e810e7f492..9f97e0b34c2 100644
> --- a/arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi
> +++ b/arch/arm/dts/k3-am62-pocketbeagle2-u-boot.dtsi
> @@ -1,20 +1,75 @@
> // SPDX-License-Identifier: GPL-2.0
> /*
> - * Common AM67A BeagleY-AI dts file for SPLs
> + * AM625 PocketBeagle 2 dts file for SPLs
> + * https://www.beagleboard.org/boards/pocketbeagle-2
> *
> - * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
> - * Copyright (C) 2024 Robert Nelson, BeagleBoard.org Foundation
> + * Copyright (C) 2024-2025 Texas Instruments Incorporated - https://www.ti.com/
> + * Copyright (C) 2024-2025 Robert Nelson, BeagleBoard.org Foundation
> */
>
> #include "k3-binman.dtsi"
>
> / {
> - chosen {
> - stdout-path = "serial2:115200n8";
> - tick-timer = &main_timer0;
> + /* Keep the LEDs on by default to indicate life */
> + leds {
> + led-1 {
> + label = "led-1";
> + default-state = "on";
> + };
> +
> + led-2 {
> + label = "led-2";
> + default-state = "on";
> + };
> +
> + led-3 {
> + label = "led-3";
> + default-state = "on";
> + };
> +
> + led-4 {
> + label = "led-4";
> + default-state = "on";
> + };
> };
> };
>
> +&main_mmc1_pins_default {
> + /* Force to use SDCD card detect pin */
> + pinctrl-single,pins = <
> + AM62X_IOPAD(0x023c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
> + AM62X_IOPAD(0x0234, PIN_INPUT, 0) /* (B22/A20) MMC1_CLK */
> + AM62X_IOPAD(0x0230, PIN_INPUT, 0) /* (A22/A19) MMC1_DAT0 */
> + AM62X_IOPAD(0x022c, PIN_INPUT, 0) /* (B21/B19) MMC1_DAT1 */
> + AM62X_IOPAD(0x0228, PIN_INPUT, 0) /* (C21/B20) MMC1_DAT2 */
> + AM62X_IOPAD(0x0224, PIN_INPUT, 0) /* (D22/C19) MMC1_DAT3 */
> + AM62X_IOPAD(0x0240, PIN_INPUT, 0) /* (D17/C15) MMC1_SDCD */
> + >;
> +};
> +
> +&usbss0 {
> + bootph-all;
> +};
> +
> +&usb0 {
> + dr_mode = "peripheral";
> + bootph-all;
> +};
> +
> +&main_bcdma {
> + reg = <0x00 0x485c0100 0x00 0x100>,
> + <0x00 0x4c000000 0x00 0x20000>,
> + <0x00 0x4a820000 0x00 0x20000>,
> + <0x00 0x4aa40000 0x00 0x20000>,
> + <0x00 0x4bc00000 0x00 0x100000>,
> + <0x00 0x48600000 0x00 0x8000>,
> + <0x00 0x484a4000 0x00 0x2000>,
> + <0x00 0x484c2000 0x00 0x2000>;
> + reg-names = "gcfg", "bchanrt", "rchanrt", "tchanrt", "ringrt",
> + "cfg", "tchan", "rchan";
> + bootph-all;
> +};
> +
> &main_pktdma {
> reg = <0x00 0x485c0000 0x00 0x100>,
> <0x00 0x4a800000 0x00 0x20000>,
> @@ -24,44 +79,32 @@
> <0x00 0x484a0000 0x00 0x4000>,
> <0x00 0x484c0000 0x00 0x2000>,
> <0x00 0x48430000 0x00 0x4000>;
> - reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt",
> - "cfg", "tchan", "rchan", "rflow";
> -};
> -
> -&dmsc {
> - bootph-pre-ram;
> - k3_sysreset: sysreset-controller {
> - compatible = "ti,sci-sysreset";
> - bootph-pre-ram;
> - };
> -};
> -
> -&usbss0 {
> - bootph-pre-ram;
> + reg-names = "gcfg", "rchanrt", "tchanrt", "ringrt", "cfg",
> + "tchan", "rchan", "rflow";
> + bootph-all;
> };
>
> -&usb0 {
> - dr_mode = "peripheral";
> - bootph-pre-ram;
> +&cpsw3g {
> + status = "disabled";
> };
>
> -&usbss1 {
> +&cpsw_port1 {
> status = "disabled";
> };
>
> -&usb1 {
> +&cpsw_port2 {
> status = "disabled";
> };
>
> -&main_gpio1 {
> +&main_uart6_pins_default {
> bootph-all;
> };
>
> -#if IS_ENABLED(CONFIG_TARGET_J722S_R5_BEAGLEY_AI)
> +#if IS_ENABLED(CONFIG_TARGET_AM62X_R5_POCKETBEAGLE2)
>
> &binman {
> - tiboot3-j722s-hs-evm.bin {
> - filename = "tiboot3-j722s-hs-evm.bin";
> + tiboot3-am62x-hs-evm.bin {
> + filename = "tiboot3-am62x-hs-evm.bin";
> ti-secure-rom {
> content = <&u_boot_spl>, <&ti_fs_enc>, <&combined_tifs_cfg>,
> <&combined_dm_cfg>, <&sysfw_inner_cert>;
> @@ -78,7 +121,7 @@
> load = <CONFIG_SPL_TEXT_BASE>;
> load-sysfw = <0x40000>;
> load-sysfw-data = <0x67000>;
> - load-dm-data = <0x43c7a800>;
> + load-dm-data = <0x43c3a800>;
> };
>
> u_boot_spl: u-boot-spl {
> @@ -86,8 +129,9 @@
> };
>
> ti_fs_enc: ti-fs-enc.bin {
> - filename = "ti-sysfw/ti-fs-firmware-j722s-hs-enc.bin";
> + filename = "ti-sysfw/ti-fs-firmware-am62x-hs-enc.bin";
> type = "blob-ext";
> + optional;
> };
>
> combined_tifs_cfg: combined-tifs-cfg.bin {
> @@ -96,8 +140,9 @@
> };
>
> sysfw_inner_cert: sysfw-inner-cert {
> - filename = "ti-sysfw/ti-fs-firmware-j722s-hs-cert.bin";
> + filename = "ti-sysfw/ti-fs-firmware-am62x-hs-cert.bin";
> type = "blob-ext";
> + optional;
> };
>
> combined_dm_cfg: combined-dm-cfg.bin {
> @@ -108,8 +153,8 @@
> };
>
> &binman {
> - tiboot3-j722s-hs-fs-evm.bin {
> - filename = "tiboot3-j722s-hs-fs-evm.bin";
> + tiboot3-am62x-hs-fs-evm.bin {
> + filename = "tiboot3-am62x-hs-fs-evm.bin";
> symlink = "tiboot3.bin";
>
> ti-secure-rom {
> @@ -128,7 +173,7 @@
> load = <CONFIG_SPL_TEXT_BASE>;
> load-sysfw = <0x40000>;
> load-sysfw-data = <0x67000>;
> - load-dm-data = <0x43c7a800>;
> + load-dm-data = <0x43c3a800>;
> };
>
> u_boot_spl_fs: u-boot-spl {
> @@ -136,8 +181,9 @@
> };
>
> ti_fs_enc_fs: ti-fs-enc.bin {
> - filename = "ti-sysfw/ti-fs-firmware-j722s-hs-fs-enc.bin";
> + filename = "ti-sysfw/ti-fs-firmware-am62x-hs-fs-enc.bin";
> type = "blob-ext";
> + optional;
> };
>
> combined_tifs_cfg_fs: combined-tifs-cfg.bin {
> @@ -146,8 +192,9 @@
> };
>
> sysfw_inner_cert_fs: sysfw-inner-cert {
> - filename = "ti-sysfw/ti-fs-firmware-j722s-hs-fs-cert.bin";
> + filename = "ti-sysfw/ti-fs-firmware-am62x-hs-fs-cert.bin";
> type = "blob-ext";
> + optional;
> };
>
> combined_dm_cfg_fs: combined-dm-cfg.bin {
> @@ -156,12 +203,12 @@
> };
> };
> };
> -#endif /* CONFIG_TARGET_J722S_R5_BEAGLEY_AI */
> +#endif /* CONFIG_TARGET_AM62X_R5_POCKETBEAGLE2 */
>
> -#if IS_ENABLED(CONFIG_TARGET_J722S_A53_BEAGLEY_AI)
> +#if IS_ENABLED(CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2)
>
> -#define SPL_BEAGLEY_AI_DTB "spl/dts/ti/k3-am67a-beagley-ai.dtb"
> -#define BEAGLEY_AI_DTB "u-boot.dtb"
> +#define SPL_AM62X_POCKETBEAGLE2_DTB "spl/dts/ti/k3-am62-pocketbeagle2.dtb"
> +#define AM62X_POCKETBEAGLE2_DTB "u-boot.dtb"
>
> &binman {
> ti-spl {
> @@ -176,23 +223,24 @@
> };
>
> dm: ti-dm {
> - filename = "ti-dm/j722s/ipc_echo_testb_mcu1_0_release_strip.xer5f";
> + filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
> + optional;
> };
> };
>
> fdt-0 {
> - description = "k3-am67a-beagley-ai";
> + description = "k3-am62-pocketbeagle2";
> type = "flat_dt";
> arch = "arm";
> compression = "none";
>
> ti-secure {
> - content = <&spl_beagley_ai_dtb>;
> + content = <&spl_pocketbeagle2_dtb>;
> keyfile = "custMpk.pem";
> };
>
> - spl_beagley_ai_dtb: blob-ext {
> - filename = "spl/dts/ti/k3-am67a-beagley-ai.dtb";
> + spl_pocketbeagle2_dtb: blob-ext {
> + filename = "spl/dts/ti/k3-am62-pocketbeagle2.dtb";
> };
>
> };
> @@ -203,7 +251,7 @@
> default = "conf-0";
>
> conf-0 {
> - description = "k3-am67a-beagley-ai";
> + description = "k3-am62-pocketbeagle2";
> firmware = "atf";
> loadables = "tee", "dm", "spl";
> fdt = "fdt-0";
> @@ -220,21 +268,21 @@
> fit {
> images {
> uboot {
> - description = "U-Boot for BeagleY-AI";
> + description = "U-Boot for PocketBeagle 2";
> };
>
> fdt-0 {
> - description = "k3-am67a-beagley-ai";
> + description = "k3-am62-pocketbeagle2";
> type = "flat_dt";
> arch = "arm";
> compression = "none";
>
> ti-secure {
> - content = <&beagley_ai_dtb>;
> + content = <&pocketbeagle2_dtb>;
> keyfile = "custMpk.pem";
> };
>
> - beagley_ai_dtb: blob-ext {
> + pocketbeagle2_dtb: blob-ext {
> filename = "u-boot.dtb";
> };
>
> @@ -248,7 +296,7 @@
> default = "conf-0";
>
> conf-0 {
> - description = "k3-k3-am67a-beagley-ai";
> + description = "k3-am62-pocketbeagle2";
> firmware = "uboot";
> loadables = "uboot";
> fdt = "fdt-0";
> @@ -258,4 +306,4 @@
> };
> };
> };
> -#endif /* CONFIG_TARGET_J722S_A53_BEAGLEY_AI */
> +#endif /* CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2 */
> diff --git a/arch/arm/dts/k3-am62-r5-pocketbeagle2.dts b/arch/arm/dts/k3-am62-r5-pocketbeagle2.dts
> new file mode 100644
> index 00000000000..4489a559287
> --- /dev/null
> +++ b/arch/arm/dts/k3-am62-r5-pocketbeagle2.dts
> @@ -0,0 +1,35 @@
> +// SPDX-License-Identifier: GPL-2.0-only OR MIT
> +/*
> + * AM625 PocketBeagle 2 dts file for R5 SPL
> + * https://www.beagleboard.org/boards/pocketbeagle-2
> + *
> + * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
> + * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation
Nit: 2022-2026 and same for the pocketbeagle2.c file below.
> + */
> +
> +#include "k3-am62-pocketbeagle2.dts"
> +#include "k3-am62-pocketbeagle2-ddr4-1600MTs.dtsi"
> +#include "k3-am62-ddr.dtsi"
> +
> +#include "k3-am62-pocketbeagle2-u-boot.dtsi"
> +#include "k3-am625-r5.dtsi"
> +
> +/ {
> + aliases {
> + serial1 = &main_uart1;
> + serial2 = &main_uart6;
> + serial3 = &main_uart3;
> + serial4 = &main_uart4;
> + serial5 = &main_uart5;
> + serial6 = &main_uart2;
> + serial7 = &main_uart0;
> + };
> +};
> +
> +&main_pktdma {
> + ti,sci = <&dm_tifs>;
> +};
> +
> +&main_bcdma {
> + ti,sci = <&dm_tifs>;
> +};
> diff --git a/arch/arm/mach-k3/am62x/Kconfig b/arch/arm/mach-k3/am62x/Kconfig
> index f7ad52db7d8..87470248aa1 100644
> --- a/arch/arm/mach-k3/am62x/Kconfig
> +++ b/arch/arm/mach-k3/am62x/Kconfig
> @@ -69,6 +69,7 @@ config TARGET_VERDIN_AM62_R5
> endchoice
>
> source "board/beagle/beagleplay/Kconfig"
> +source "board/beagle/pocketbeagle2/Kconfig"
> source "board/phytec/phycore_am62x/Kconfig"
> source "board/ti/am62x/Kconfig"
> source "board/toradex/verdin-am62/Kconfig"
> diff --git a/board/beagle/pocketbeagle2/Kconfig b/board/beagle/pocketbeagle2/Kconfig
> new file mode 100644
> index 00000000000..e957b8e8377
> --- /dev/null
> +++ b/board/beagle/pocketbeagle2/Kconfig
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
> +#
> +
> +choice
> + prompt "BeagleBoard.org AM62X based PocketBeagle 2 board"
> + optional
> +
> +config TARGET_AM62X_A53_POCKETBEAGLE2
> + bool "BeagleBoard.org AM62X PocketBeagle 2 running on A53"
> + select ARM64
> + select BINMAN
> + select OF_SYSTEM_SETUP
> +
> +config TARGET_AM62X_R5_POCKETBEAGLE2
> + bool "BeagleBoard.org AM62X PocketBeagle 2 running on R5"
> + select CPU_V7R
> + select SYS_THUMB_BUILD
> + select K3_LOAD_SYSFW
> + select RAM
> + select SPL_RAM
> + select K3_DDRSS
> + select BINMAN
> + imply SYS_K3_SPL_ATF
> +
> +endchoice
> +
> +if TARGET_AM62X_A53_POCKETBEAGLE2
> +
> +config SYS_BOARD
> + default "pocketbeagle2"
> +
> +config SYS_VENDOR
> + default "beagle"
> +
> +config SYS_CONFIG_NAME
> + default "pocketbeagle2"
> +
> +source "board/ti/common/Kconfig"
> +
> +endif
> +
> +if TARGET_AM62X_R5_POCKETBEAGLE2
> +
> +config SYS_BOARD
> + default "pocketbeagle2"
> +
> +config SYS_VENDOR
> + default "beagle"
> +
> +config SYS_CONFIG_NAME
> + default "pocketbeagle2"
> +
> +config SPL_LDSCRIPT
> + default "arch/arm/mach-omap2/u-boot-spl.lds"
> +
> +source "board/ti/common/Kconfig"
> +
> +endif
> diff --git a/board/beagle/pocketbeagle2/MAINTAINERS b/board/beagle/pocketbeagle2/MAINTAINERS
> new file mode 100644
> index 00000000000..79bdd59af7e
> --- /dev/null
> +++ b/board/beagle/pocketbeagle2/MAINTAINERS
> @@ -0,0 +1,10 @@
> +POCKETBEAGLE2 BOARD
> +M: Nishanth Menon <nm@ti.com>
> +M: Robert Nelson <robertcnelson@gmail.com>
> +M: Tom Rini <trini@konsulko.com>
> +S: Maintained
> +N: pocketbeagle2
> +F: board/beagle/pocketbeagle2/
> +F: include/configs/pocketbeagle2.h
> +F: configs/am62_pocketbeagle2_a53_defconfig
> +F: configs/am62_pocketbeagle2_r5_defconfig
> diff --git a/board/beagle/pocketbeagle2/Makefile b/board/beagle/pocketbeagle2/Makefile
> new file mode 100644
> index 00000000000..3d42c160716
> --- /dev/null
> +++ b/board/beagle/pocketbeagle2/Makefile
> @@ -0,0 +1,9 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# Makefile for AM625 PocketBeagle 2
> +# https://www.beagleboard.org/boards/pocketbeagle-2
> +#
> +# Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
> +#
> +
> +obj-y += pocketbeagle2.o
> diff --git a/board/beagle/beagleplay/board-cfg.yaml b/board/beagle/pocketbeagle2/board-cfg.yaml
> similarity index 100%
> copy from board/beagle/beagleplay/board-cfg.yaml
> copy to board/beagle/pocketbeagle2/board-cfg.yaml
> diff --git a/board/beagle/beagleplay/pm-cfg.yaml b/board/beagle/pocketbeagle2/pm-cfg.yaml
> similarity index 100%
> copy from board/beagle/beagleplay/pm-cfg.yaml
> copy to board/beagle/pocketbeagle2/pm-cfg.yaml
> diff --git a/board/beagle/pocketbeagle2/pocketbeagle2.c b/board/beagle/pocketbeagle2/pocketbeagle2.c
> new file mode 100644
> index 00000000000..b6768caa34b
> --- /dev/null
> +++ b/board/beagle/pocketbeagle2/pocketbeagle2.c
> @@ -0,0 +1,39 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Board specific initialization for AM625 PocketBeagle 2
> + * https://www.beagleboard.org/boards/pocketbeagle-2
> + *
> + * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
> + * Copyright (C) 2025 Robert Nelson, BeagleBoard.org Foundation
> + */
> +
> +#include <asm/arch/hardware.h>
> +#include <asm/io.h>
> +#include <dm/uclass.h>
> +#include <env.h>
> +#include <fdt_support.h>
> +#include <spl.h>
> +#include <asm/arch/k3-ddr.h>
> +
> +int dram_init(void)
> +{
> + return fdtdec_setup_mem_size_base();
> +}
> +
> +int dram_init_banksize(void)
> +{
> + return fdtdec_setup_memory_banksize();
> +}
> +
> +#if IS_ENABLED(CONFIG_BOARD_LATE_INIT)
> +int board_late_init(void)
> +{
> + char fdtfile[50];
> +
> + snprintf(fdtfile, sizeof(fdtfile), "%s.dtb", CONFIG_DEFAULT_DEVICE_TREE);
> +
> + env_set("fdtfile", fdtfile);
> +
> + return 0;
> +}
> +#endif /* CONFIG_BOARD_LATE_INIT */
> diff --git a/board/ti/am62x/am62x.env b/board/beagle/pocketbeagle2/pocketbeagle2.env
> similarity index 59%
> copy from board/ti/am62x/am62x.env
> copy to board/beagle/pocketbeagle2/pocketbeagle2.env
> index 60b5fd5e6ca..a9341c592d1 100644
> --- a/board/ti/am62x/am62x.env
> +++ b/board/beagle/pocketbeagle2/pocketbeagle2.env
> @@ -10,23 +10,20 @@ rproc_fw_binaries= 0 /lib/firmware/am62-mcu-m4f0_0-fw
>
> name_kern=Image
> console=ttyS2,115200n8
> -args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
> - ${mtdparts}
> +args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02860000
> run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
> +set_led_state_fail_load= led led-1 off; led led-2 on;
> + led led-3 off; led led-4 on
> +set_led_state_start_load=led led-1 on; led led-2 off;
> + led led-3 on; led led-4 off
>
> -boot_targets=mmc1 mmc0 usb pxe dhcp
> +boot_targets=mmc1 mmc0
> boot=mmc
> mmcdev=1
> bootpart=1:2
> bootdir=/boot
> +bootmeths=script extlinux efi pxe
> rd_spec=-
>
> -splashfile=ti_logo_414x97_32bpp.bmp.gz
> -splashimage=0x80200000
> -splashpos=m,m
> -splashsource=sf
> -
> -#if CONFIG_BOOTMETH_ANDROID
> -#include <env/ti/android.env>
> -adtb_idx=0
> -#endif
> \ No newline at end of file
> +kernel_comp_addr_r=0x85000000
> +kernel_comp_size=0x20000000
> diff --git a/board/phytec/phycore_am62x/rm-cfg.yaml b/board/beagle/pocketbeagle2/rm-cfg.yaml
> similarity index 100%
> copy from board/phytec/phycore_am62x/rm-cfg.yaml
> copy to board/beagle/pocketbeagle2/rm-cfg.yaml
> diff --git a/board/beagle/beagleplay/sec-cfg.yaml b/board/beagle/pocketbeagle2/sec-cfg.yaml
> similarity index 100%
> copy from board/beagle/beagleplay/sec-cfg.yaml
> copy to board/beagle/pocketbeagle2/sec-cfg.yaml
> diff --git a/configs/am62x_beagleplay_a53_defconfig b/configs/am62_pocketbeagle2_a53_defconfig
> similarity index 91%
> copy from configs/am62x_beagleplay_a53_defconfig
> copy to configs/am62_pocketbeagle2_a53_defconfig
> index c9bc7cd8d39..0f84a7c252d 100644
> --- a/configs/am62x_beagleplay_a53_defconfig
> +++ b/configs/am62_pocketbeagle2_a53_defconfig
> @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
> CONFIG_SPL_LIBGENERIC_SUPPORT=y
> CONFIG_NR_DRAM_BANKS=1
> CONFIG_SOC_K3_AM625=y
> -CONFIG_TARGET_AM625_A53_BEAGLEPLAY=y
> +CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2=y
> CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000
> CONFIG_DM_GPIO=y
> -CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am625-beagleplay"
> +CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am62-pocketbeagle2"
> CONFIG_OF_LIBFDT_OVERLAY=y
> CONFIG_DM_RESET=y
> CONFIG_SPL_MMC=y
> @@ -44,8 +44,6 @@ CONFIG_SPL_I2C=y
> CONFIG_SPL_DM_MAILBOX=y
> CONFIG_SPL_POWER_DOMAIN=y
> CONFIG_SPL_YMODEM_SUPPORT=y
> -CONFIG_CMD_BOOTEFI_SELFTEST=y
> -CONFIG_CMD_NVEDIT_EFI=y
> CONFIG_CMD_GPIO=y
> CONFIG_CMD_GPIO_READ=y
> CONFIG_CMD_I2C=y
> @@ -53,6 +51,7 @@ CONFIG_CMD_MMC=y
> CONFIG_CMD_EFIDEBUG=y
> CONFIG_CMD_PMIC=y
> CONFIG_CMD_REGULATOR=y
> +CONFIG_CMD_CACHE=y
> CONFIG_OF_CONTROL=y
> CONFIG_SPL_OF_CONTROL=y
> CONFIG_OF_UPSTREAM=y
> @@ -90,10 +89,6 @@ CONFIG_MMC_SDHCI=y
> CONFIG_MMC_SDHCI_ADMA=y
> CONFIG_SPL_MMC_SDHCI_ADMA=y
> CONFIG_MMC_SDHCI_AM654=y
> -CONFIG_PHY_REALTEK=y
> -CONFIG_PHY_TI=y
> -CONFIG_DM_ETH_PHY=y
> -CONFIG_TI_AM65_CPSW_NUSS=y
> CONFIG_PHY=y
> CONFIG_PINCTRL=y
> CONFIG_SPL_PINCTRL=y
> @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
> CONFIG_EXT4_WRITE=y
> CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> CONFIG_LZO=y
> -CONFIG_EFI_SET_TIME=y
> +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
Any reason why we are using TOP_HIDE here instead of just moving OPTEE
lower in DDR like we do on the 512MiB AM6254atl EVM?
> +
> +CONFIG_BOOTDELAY=0
>
> -#include <configs/k3_efi_capsule.config>
> #include <configs/am62x_a53_usbdfu.config>
> diff --git a/configs/am62x_beagleplay_r5_defconfig b/configs/am62_pocketbeagle2_r5_defconfig
> similarity index 93%
> copy from configs/am62x_beagleplay_r5_defconfig
> copy to configs/am62_pocketbeagle2_r5_defconfig
> index aca8a7fc65c..e863204cfef 100644
> --- a/configs/am62x_beagleplay_r5_defconfig
> +++ b/configs/am62_pocketbeagle2_r5_defconfig
> @@ -6,13 +6,13 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
> CONFIG_SPL_LIBGENERIC_SUPPORT=y
> CONFIG_NR_DRAM_BANKS=1
> CONFIG_SOC_K3_AM625=y
> -CONFIG_TARGET_AM625_R5_BEAGLEPLAY=y
> +CONFIG_TARGET_AM62X_R5_POCKETBEAGLE2=y
> CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x43c3a7f0
> CONFIG_ENV_SIZE=0x20000
> CONFIG_DM_GPIO=y
> CONFIG_SPL_DM_SPI=y
> -CONFIG_DEFAULT_DEVICE_TREE="k3-am625-r5-beagleplay"
> +CONFIG_DEFAULT_DEVICE_TREE="k3-am62-r5-pocketbeagle2"
> CONFIG_DM_RESET=y
> CONFIG_SPL_SYS_MALLOC_F_LEN=0x7000
> CONFIG_SPL_MMC=y
> @@ -20,6 +20,7 @@ CONFIG_SPL_SERIAL=y
> CONFIG_SPL_DRIVERS_MISC=y
> CONFIG_SPL_STACK_R_ADDR=0x82000000
> CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
> +CONFIG_SPL_TEXT_BASE=0x43c00000
Nit: 0x43c00000 should be the default for any R5 ARCH_K3 build anyways
> CONFIG_SPL_BSS_START_ADDR=0x43c3b000
> CONFIG_SPL_BSS_MAX_SIZE=0x3000
> CONFIG_SPL_STACK_R=y
> @@ -35,7 +36,6 @@ CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC=y
> CONFIG_SPL_MAX_SIZE=0x3B000
> CONFIG_SPL_PAD_TO=0x0
> CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y
> -CONFIG_SPL_BOARD_INIT=y
> CONFIG_SPL_SYS_MALLOC_SIMPLE=y
> CONFIG_SPL_SEPARATE_BSS=y
> CONFIG_SPL_SYS_MALLOC=y
> @@ -100,3 +100,4 @@ CONFIG_SPL_TIMER=y
> CONFIG_OMAP_TIMER=y
> CONFIG_LIB_RATIONAL=y
> CONFIG_SPL_LIB_RATIONAL=y
> +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
Ditto
> diff --git a/doc/board/beagle/am62_pocketbeagle2.rst b/doc/board/beagle/am62_pocketbeagle2.rst
> new file mode 100644
> index 00000000000..2f2aa621451
> --- /dev/null
> +++ b/doc/board/beagle/am62_pocketbeagle2.rst
> @@ -0,0 +1,277 @@
> +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
> +.. sectionauthor:: Randolph Sapp <rs@ti.com>
> +
> +AM62 Beagleboard.org PocketBeagle 2
> +===================================
> +
> +Introduction:
> +-------------
> +
> +BeagleBoard.org PocketBeagle 2 is an easy to use, affordable open source
> +hardware single board computer based on the Texas Instruments AM625
> +SoC.
> +
> +Further information can be found at:
> +
> +* Product Page: https://www.beagleboard.org/boards/pocketbeagle-2
> +* Hardware documentation: https://openbeagle.org/pocketbeagle/pocketbeagle-2
> +
> +Boot Flow:
> +----------
> +Below is the pictorial representation of boot flow:
> +
> +.. image:: ../ti/img/boot_diagram_am62.svg
> + :alt: Boot flow diagram
> +
> +On this platform, 'TI Foundational Security' (TIFS) functions as the security
> +enclave master while 'Device Manager' (DM), also known as the 'TISCI server' in
> +"TI terminology", offers all the essential services. The A53 or M4F (Aux core)
> +sends requests to TIFS/DM to accomplish these services, as illustrated in the
> +diagram above.
> +
> +Sources:
> +--------
> +.. include:: ../ti/k3.rst
> + :start-after: .. k3_rst_include_start_boot_sources
> + :end-before: .. k3_rst_include_end_boot_sources
> +
> +.. include:: ../ti/k3.rst
> + :start-after: .. k3_rst_include_start_boot_firmwares
> + :end-before: .. k3_rst_include_end_tifsstub
> +
> +Build procedure:
> +----------------
> +
> +#. Setup the environment variables:
> +
> + .. include:: ../ti/k3.rst
> + :start-after: .. k3_rst_include_start_common_env_vars_desc
> + :end-before: .. k3_rst_include_end_common_env_vars_desc
> +
> + .. include:: ../ti/k3.rst
> + :start-after: .. k3_rst_include_start_board_env_vars_desc
> + :end-before: .. k3_rst_include_end_board_env_vars_desc
> +
> +#. Set the variables corresponding to this platform:
> +
> + .. include:: ../ti/k3.rst
> + :start-after: .. k3_rst_include_start_common_env_vars_defn
> + :end-before: .. k3_rst_include_end_common_env_vars_defn
> +
> + .. prompt:: bash $
> +
> + export UBOOT_CFG_CORTEXR=am62_pocketbeagle2_r5_defconfig
> + export UBOOT_CFG_CORTEXA=am62_pocketbeagle2_a53_defconfig
> + export TFA_BOARD=lite
> + export OPTEE_PLATFORM=k3-am62x
> +
> + .. include:: ../ti/am62x_sk.rst
> + :start-after: .. am62x_evm_rst_include_start_build_steps
> + :end-before: .. am62x_evm_rst_include_end_build_steps
> +
> +Target Images
> +-------------
> +Copy these images to an SD card and boot:
> +
> + * :file:`tiboot3.bin` from Cortex-R5 build.
> + * :file:`tispl.bin` and :file:`u-boot.img` from Cortex-A build
> +
> +Image formats
> +-------------
> +
> +- :file:`tiboot3.bin`
> +
> + .. image:: ../ti/img/multi_cert_tiboot3.bin.svg
> + :alt: tiboot3.bin image format
> +
> +- :file:`tispl.bin`
> +
> + .. image:: ../ti/img/tifsstub_dm_tispl.bin.svg
> + :alt: tispl.bin image format
> +
> +Additional hardware for U-Boot development
> +------------------------------------------
> +
> +* A Serial Console is critical for U-Boot development on the PocketBeagle 2. See
> + `PocketBeagle 2 serial console documentation`__.
> +* uSD is the default, and a SD/MMC reader will be needed.
> +* (optionally) JTAG is useful when working with very early stages of boot.
> +
> +.. __: https://docs.beagleboard.org/boards/pocketbeagle-2/03-design-and-specifications.html#serial-debug-port
> +
> +Default storage options
> +-----------------------
> +
> +There is only one storage media option for the PocketBeagle 2, by default:
> +
> +* SD/MMC card interface
> +
> +Flash to uSD card
> +-----------------
> +
> +If you choose to hand format your own bootable uSD card, be
> +aware that it can be difficult. The following information
> +may be helpful, but remember that it is only sometimes
> +reliable, and partition options can cause issues. These
> +can potentially help:
> +
> +* https://git.ti.com/cgit/arago-project/tisdk-setup-scripts/tree/create-sdcard.sh
> +* https://elinux.org/Beagleboard:Expanding_File_System_Partition_On_A_microSD
> +
> +The simplest option is to start with a standard distribution
> +image like those in `BeagleBoard.org Distros Page
> +<https://www.beagleboard.org/distros>`_ and download a disk image for
> +PocketBeagle 2. Pick a 16GB+ uSD card to be on the safer side.
> +
> +With an SD/MMC Card reader and `Balena Etcher
> +<https://etcher.balena.io/>`_, having a functional setup in minutes is
> +a trivial matter, and it works on almost all host operating systems.
> +
> +Updating U-Boot is a matter of copying the :file:`tiboot3.bin`,
> +:file:`tispl.bin` and :file:`u-boot.img` to the "BOOT" partition of the uSD
> +card. Remember to sync and unmount (or Eject - depending on the Operating
> +System) the uSD card prior to physically removing from SD card reader.
> +
> +Also see following section on switch setting used for booting using
> +uSD card.
> +
> +.. note::
> +
> + If you are frequently working with uSD cards, you might find the
> + following useful:
> +
> + * `USB-SD-Mux <https://www.linux-automation.com/en/products/usb-sd-mux.html>`_
> + * `SD-Wire <https://wiki.tizen.org/SDWire>`_
> +
> +LED patterns during boot
> +------------------------
> +
> +.. list-table:: USR LED status indication
> + :widths: 16 16
> + :header-rows: 1
> +
> + * - USR LEDs (1234)
> + - Indicates
> +
> + * - 0000
> + - Boot failure or R5 image not started up
> +
> + * - 1111
> + - A53 SPL/U-boot has started up
> +
> + * - 1010
> + - OS boot process has been initiated
> +
> + * - 0101
> + - OS boot process failed and drops to U-Boot shell
> +
> +.. note::
> +
> + In the table above, 0 indicates LED switched off and 1 indicates LED
> + switched ON.
> +
> +.. warning::
> +
> + If the "red" power LED is not glowing, the system power supply is not
> + functional. Please refer to the `PocketBeagle 2 documentation
> + <https://docs.beagleboard.org/boards/pocketbeagle-2/>`_ for further
> + information.
> +
> +A53 SPL DDR Memory Layout
> +-------------------------
> +
> +.. include:: ../ti/am62x_sk.rst
> + :start-after: .. am62x_evm_rst_include_start_ddr_mem_layout
> + :end-before: .. am62x_evm_rst_include_end_ddr_mem_layout
> +
> +Switch Setting for Boot Mode
> +----------------------------
> +
> +The boot time option is configured via "USR" button on the board. See the
> +`PocketBeagle 2 Schematics
> +<https://git.beagleboard.org/pocketbeagle/pocketbeagle-2/-/blob/main/pocketbeagle2_sch.pdf>`_
> +and the `PocketBeagle 2 documentation on Boot Modes
> +<https://docs.beagleboard.org/boards/pocketbeagle-2/03-design-and-specifications.html#boot-modes>`_
> +for details.
> +
> +.. list-table:: Boot Modes
> + :widths: 16 16 16
> + :header-rows: 1
> +
> + * - USR Button Status
> + - Primary Boot
> + - Secondary Boot
> +
> + * - Not Pressed
> + - uSD
> + - USB Device Firmware Upgrade (DFU) mode
> +
> + * - Pressed
> + - uSD
> + - UART
> +
> +To switch boot modes, hold the "USR" button while powering on the device with a
> +USB type C power supply. Release the button when the red power LED lights up.
> +
> +DFU based boot
> +--------------
> +
> +To boot the board over DFU, ensure there is no SD card inserted with a
> +bootloader. After power-on the build artifacts needs to be uploaded one by one
> +with a tool like dfu-util.
> +
> +.. include:: ../ti/am62x_sk.rst
> + :start-after: .. am62x_evm_rst_include_start_dfu_boot
> + :end-before: .. am62x_evm_rst_include_end_dfu_boot
> +
> +Debugging U-Boot
> +----------------
> +
> +See :ref:`Common Debugging environment - OpenOCD <k3_rst_refer_openocd>`: for
> +detailed setup and debugging information.
> +
> +.. warning::
> +
> + **OpenOCD support since**: v0.12.0
> +
> + If the default package version of OpenOCD in your development
> + environment's distribution needs to be updated, it might be necessary to
> + build OpenOCD from the source.
> +
> +.. include:: ../ti/k3.rst
> + :start-after: .. k3_rst_include_start_openocd_connect_tag_connect
> + :end-before: .. k3_rst_include_end_openocd_connect_tag_connect
> +
> +.. include:: ../ti/k3.rst
> + :start-after: .. k3_rst_include_start_openocd_cfg_external_intro
> + :end-before: .. k3_rst_include_end_openocd_cfg_external_intro
> +
> +For example, with the PocketBeagle 2 (AM62X platform), the
> +:file:`openocd_connect.cfg` would look like:
> +
> +.. code-block:: tcl
> +
> + # TUMPA example:
> + # http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User's_Manual
> + source [find interface/ftdi/tumpa.cfg]
> +
> + transport select jtag
> +
> + # default JTAG configuration has only SRST and no TRST
> + reset_config srst_only srst_push_pull
> +
> + # delay after SRST goes inactive
> + adapter srst delay 20
> +
> + if { ![info exists SOC] } {
> + # Set the SoC of interest
> + set SOC am625
> + }
> +
> + source [find target/ti_k3.cfg]
> +
> + ftdi tdo_sample_edge falling
> +
> + # Speeds for FT2232H are in multiples of 2, and 32MHz is tops
> + # max speed we seem to achieve is ~20MHz.. so we pick 16MHz
> + adapter speed 16000
> diff --git a/doc/board/beagle/index.rst b/doc/board/beagle/index.rst
> index e33d39fc677..8bf099ae7be 100644
> --- a/doc/board/beagle/index.rst
> +++ b/doc/board/beagle/index.rst
> @@ -10,6 +10,7 @@ ARM based boards
> .. toctree::
> :maxdepth: 2
>
> + am62_pocketbeagle2
> am62x_beagleplay
> am67a_beagley_ai.rst
> j721e_beagleboneai64
> diff --git a/dts/upstream/src/arm64/ti/k3-am62-pocketbeagle2.dts b/dts/upstream/src/arm64/ti/k3-am62-pocketbeagle2.dts
> index 7a4cffc27bd..12d33619379 100644
> --- a/dts/upstream/src/arm64/ti/k3-am62-pocketbeagle2.dts
> +++ b/dts/upstream/src/arm64/ti/k3-am62-pocketbeagle2.dts
> @@ -22,6 +22,7 @@
> serial1 = &main_uart1;
> serial2 = &main_uart6;
> serial3 = &main_uart0;
> + mmc0 = &sdhci0;
> mmc1 = &sdhci1;
> usb0 = &usb0;
> usb1 = &usb1;
> @@ -232,6 +233,22 @@
> >;
> };
>
> + main_mmc0_pins_default: main-mmc0-default-pins {
> + pinctrl-single,pins = <
> + AM62X_IOPAD(0x220, PIN_INPUT, 0) /* (Y3/V3) MMC0_CMD */
> + AM62X_IOPAD(0x218, PIN_INPUT, 0) /* (AB1/Y1) MMC0_CLK */
> + AM62X_IOPAD(0x214, PIN_INPUT, 0) /* (AA2/V2) MMC0_DAT0 */
> + AM62X_IOPAD(0x210, PIN_INPUT, 0) /* (AA1/V1) MMC0_DAT1 */
> + AM62X_IOPAD(0x20c, PIN_INPUT, 0) /* (AA3/W2) MMC0_DAT2 */
> + AM62X_IOPAD(0x208, PIN_INPUT, 0) /* (Y4/W1) MMC0_DAT3 */
> + AM62X_IOPAD(0x204, PIN_INPUT, 0) /* (AB2/Y2) MMC0_DAT4 */
> + AM62X_IOPAD(0x200, PIN_INPUT, 0) /* (AC1/W3) MMC0_DAT5 */
> + AM62X_IOPAD(0x1fc, PIN_INPUT, 0) /* (AD2/W4) MMC0_DAT6 */
> + AM62X_IOPAD(0x1f8, PIN_INPUT, 0) /* (AC2/V4) MMC0_DAT7 */
> + >;
> + bootph-all;
> + };
> +
> main_mmc1_pins_default: main-mmc1-default-pins {
> pinctrl-single,pins = <
> AM62X_IOPAD(0x23c, PIN_INPUT, 0) /* (A21/C18) MMC1_CMD */
> @@ -280,6 +297,18 @@
> };
> };
>
> +&cpsw3g {
> + status = "disabled";
> +};
> +
> +&cpsw_port1 {
> + status = "disabled";
> +};
> +
> +&cpsw_port2 {
> + status = "disabled";
> +};
> +
> &epwm2 {
> status = "okay";
> pinctrl-names = "default";
> @@ -328,6 +357,12 @@
> };
> };
>
> +&main_i2c1 {
> + clock-frequency = <400000>;
> + bootph-all;
> + status = "okay";
> +};
> +
> &main_i2c2 {
> pinctrl-names = "default";
> pinctrl-0 = <&main_i2c2_pins_default>;
> @@ -356,6 +391,14 @@
> };
> };
>
> +&sdhci0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&main_mmc0_pins_default>;
> + disable-wp;
> + bootph-all;
> + status = "okay";
> +};
> +
> &sdhci1 {
> /* SD/MMC */
> vmmc-supply = <&vdd_mmc1>;
> diff --git a/include/configs/beagley_ai.h b/include/configs/pocketbeagle2.h
> similarity index 57%
> copy from include/configs/beagley_ai.h
> copy to include/configs/pocketbeagle2.h
> index a7072a094c5..dd6956aa8b9 100644
> --- a/include/configs/beagley_ai.h
> +++ b/include/configs/pocketbeagle2.h
> @@ -1,14 +1,14 @@
> /* SPDX-License-Identifier: GPL-2.0+ */
> /*
> - * Configuration header file for BeagleY-AI
> + * Configuration header file for PocketBeagle 2
> *
> * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
> */
>
> -#ifndef __CONFIG_BEAGLEY_AI_H
> -#define __CONFIG_BEAGLEY_AI_H
> +#ifndef __CONFIG_POCKETBEAGLE2_H
> +#define __CONFIG_POCKETBEAGLE2_H
>
> /* Now for the remaining common defines */
> #include <configs/ti_armv7_common.h>
>
> -#endif /* __CONFIG_BEAGLEY_AI_H */
> +#endif /* __CONFIG_POCKETBEAGLE2_H */
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/3] k3-am62-pocketbeagle2: add support for 1GB variant
2026-03-17 22:38 ` [PATCH 3/3] k3-am62-pocketbeagle2: add support for 1GB variant rs
@ 2026-03-20 10:10 ` Anshul Dalal
2026-03-20 15:26 ` Robert Nelson
0 siblings, 1 reply; 23+ messages in thread
From: Anshul Dalal @ 2026-03-20 10:10 UTC (permalink / raw)
To: rs, robertcnelson, bb, nm, trini, afd; +Cc: u-boot
On Wed Mar 18, 2026 at 4:08 AM IST, rs wrote:
> From: Randolph Sapp <rs@ti.com>
>
> Take Phytec's current DDR fixup functions and utilize them to
> dynamically adjust for variants in the pocketbeagle2. There are
> currently 3 skews, two of which are both 512MB with the same memory
> configuration, and one which is 1GB using the same CWL and CL settings
> but a modified density [1].
>
> Based off of Bryan Brattlof's patch [2].
>
> [1] https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus/5411/8G%20Bits%20DDR4%20SDRAM.pdf
> [2] https://github.com/bryanbrattlof/beagleboot/commit/fb2f022e27427e990d7a33fd001ffb571e13cfc3
>
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
> board/beagle/pocketbeagle2/Kconfig | 26 ++++
> board/beagle/pocketbeagle2/Makefile | 2 +
> board/beagle/pocketbeagle2/pocketbeagle2.c | 112 +++++++++++++++++-
> .../beagle/pocketbeagle2/pocketbeagle2_ddr.h | 50 ++++++++
> configs/am62_pocketbeagle2_r5_defconfig | 5 +-
> 5 files changed, 192 insertions(+), 3 deletions(-)
> create mode 100644 board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
>
> diff --git a/board/beagle/pocketbeagle2/Kconfig b/board/beagle/pocketbeagle2/Kconfig
> index e957b8e8377..a361fcebfc1 100644
> --- a/board/beagle/pocketbeagle2/Kconfig
> +++ b/board/beagle/pocketbeagle2/Kconfig
> @@ -12,6 +12,7 @@ config TARGET_AM62X_A53_POCKETBEAGLE2
> select ARM64
> select BINMAN
> select OF_SYSTEM_SETUP
> + imply TI_I2C_BOARD_DETECT
>
> config TARGET_AM62X_R5_POCKETBEAGLE2
> bool "BeagleBoard.org AM62X PocketBeagle 2 running on R5"
> @@ -23,6 +24,7 @@ config TARGET_AM62X_R5_POCKETBEAGLE2
> select K3_DDRSS
> select BINMAN
> imply SYS_K3_SPL_ATF
> + imply TI_I2C_BOARD_DETECT
>
> endchoice
>
> @@ -58,3 +60,27 @@ config SPL_LDSCRIPT
> source "board/ti/common/Kconfig"
>
> endif
> +
> +config POCKETBEAGLE2_AM62X_RAM_SIZE_FIX
> + bool "Set the PocketBeagle 2 RAM size instead of detecting it"
> + default false
> + help
> + RAM size is automatically detected through the device revision stored
> + in EEPROM. This overrides the detection logic with a fixed value.
With the ability to detect the board type via the EEPROM, is there any
use to having this option?
IMO we should just let the board boot with runtime detection for DDR
size everytime. This config option just makes the execution harder to
understand while providing minimal value.
> +
> +choice
> + prompt "PocketBeagle 2 RAM size"
> + depends on POCKETBEAGLE2_AM62X_RAM_SIZE_FIX
> + default POCKETBEAGLE2_AM62X_RAM_SIZE_512MB
> +
> +config POCKETBEAGLE2_AM62X_RAM_SIZE_512MB
> + bool "512MB RAM"
> + help
> + Set RAM size fix to 512MB for the PocketBeagle 2.
> +
> +config POCKETBEAGLE2_AM62X_RAM_SIZE_1GB
> + bool "1GB RAM"
> + help
> + Set RAM size fix to 1GB for the PocketBeagle 2.
> +
> +endchoice
> diff --git a/board/beagle/pocketbeagle2/Makefile b/board/beagle/pocketbeagle2/Makefile
> index 3d42c160716..dd529fe6d75 100644
> --- a/board/beagle/pocketbeagle2/Makefile
> +++ b/board/beagle/pocketbeagle2/Makefile
> @@ -7,3 +7,5 @@
> #
>
> obj-y += pocketbeagle2.o
> +obj-${CONFIG_K3_DDRSS} += ../../phytec/common/k3/k3_ddrss_patch.o
> +obj-${CONFIG_TI_I2C_BOARD_DETECT} += ../../ti/common/board_detect.o
> diff --git a/board/beagle/pocketbeagle2/pocketbeagle2.c b/board/beagle/pocketbeagle2/pocketbeagle2.c
> index b6768caa34b..1bfc79350b6 100644
> --- a/board/beagle/pocketbeagle2/pocketbeagle2.c
> +++ b/board/beagle/pocketbeagle2/pocketbeagle2.c
> @@ -15,15 +15,123 @@
> #include <spl.h>
> #include <asm/arch/k3-ddr.h>
>
> +#include "../../ti/common/board_detect.h"
> +#include "pocketbeagle2_ddr.h"
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +static int pocketbeagle2_get_ddr_size(void)
> +{
> + // check config overrides first
> + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_FIX)) {
> + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_512MB))
> + return EEPROM_RAM_SIZE_512MB;
> + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_1GB))
> + return EEPROM_RAM_SIZE_1GB;
> + }
> +
> +#if IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)
> + // dynamically detect the config if we can
> + if (!do_board_detect_am6()) {
> + struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
> +
> + if (strlen(ep->name) > 11 && ep->name[0] == 'P') {
> + /*
> + * POCKETBEAGL2A00 (am6232 512MB)
> + * POCKETBEAGL2A10 (am625 512MB)
> + * POCKETBEAGL2A1I (am625 1GB)
> + */
> + if (!strncmp(&ep->name[11], "2A1I", 4))
> + return EEPROM_RAM_SIZE_1GB;
> + }
> + }
> +#endif
> +
> + return EEPROM_RAM_SIZE_512MB;
> +}
> +
> int dram_init(void)
> {
> - return fdtdec_setup_mem_size_base();
> + if (!IS_ENABLED(CONFIG_CPU_V7R))
I don't have a 1GiB pb2 to test with but I'm assuming the fixed up
memory nodes get passed from the R5 SPL to A53 SPL and then finally to
U-Boot as part of fixup_memory_node from k3-ddr.c.
Could somebody confirm if this is indeed the correct flow? I wanted to
see if both A53 SPL and U-Boot receive the correct memory size as part
of their DT.
> + return fdtdec_setup_mem_size_base();
> +
> + return 0;
> }
>
> +// logic after this block assumes that there is only 1 DRAM bank currently
> +#if CONFIG_NR_DRAM_BANKS != 1
> +#error Unsupported number of DRAM banks!
> +#endif
> +
> int dram_init_banksize(void)
> {
> - return fdtdec_setup_memory_banksize();
> + u8 ram_size;
> +
> + if (!IS_ENABLED(CONFIG_CPU_V7R))
> + return fdtdec_setup_memory_banksize();
> +
> + memset(gd->bd->bi_dram, 0, sizeof(gd->bd->bi_dram[0]));
> +
> + ram_size = pocketbeagle2_get_ddr_size();
> + switch (ram_size) {
> + case EEPROM_RAM_SIZE_1GB:
> + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
> + gd->bd->bi_dram[0].size = 0x40000000;
> + gd->ram_size = 0x40000000;
> + break;
> + case EEPROM_RAM_SIZE_512MB:
> + default:
> + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
> + gd->bd->bi_dram[0].size = 0x20000000;
> + gd->ram_size = 0x20000000;
We can make use of SZ_512M and SZ_1G macros here.
> + break;
> + }
> +
> + return 0;
> +}
> +
> +#if IS_ENABLED(CONFIG_K3_DDRSS)
> +static int update_ddrss_timings(void)
> +{
> + int ret = 0;
> + u8 ram_size = 0;
Having a u8 of "ram_size" is confusing, we should make it explict that
it's an index into pocketbeagle2_ddrss_data.
> + struct ddrss *ddr_patch = NULL;
> + void *fdt = (void *)gd->fdt_blob;
> +
> + ram_size = pocketbeagle2_get_ddr_size();
> + ddr_patch = &pocketbeagle2_ddrss_data[ram_size];
> +
> + if (!ddr_patch)
> + return ret;
> +
> + ret = fdt_apply_ddrss_timings_patch(fdt, ddr_patch);
> + if (ret) {
> + printf("Failed to apply ddrs timings patch: %d\n", ret);
> + return ret;
> + }
> +
> + return ret;
> +}
> +
> +int do_board_detect(void)
> +{
> + void *fdt = (void *)gd->fdt_blob;
> + u64 start[] = {gd->bd->bi_dram[0].start};
> + u64 size[] = {gd->bd->bi_dram[0].size};
> + int ret;
> +
Nit: formatting (done with clang-format)
- u64 start[] = {gd->bd->bi_dram[0].start};
- u64 size[] = {gd->bd->bi_dram[0].size};
+ u64 start[] = { gd->bd->bi_dram[0].start };
+ u64 size[] = { gd->bd->bi_dram[0].size };
...
- snprintf(fdtfile, sizeof(fdtfile), "%s.dtb", CONFIG_DEFAULT_DEVICE_TREE);
+ snprintf(fdtfile, sizeof(fdtfile), "%s.dtb",
+ CONFIG_DEFAULT_DEVICE_TREE);
> + dram_init();
> + dram_init_banksize();
> +
> + ret = fdt_fixup_memory_banks(fdt, start, size, 1);
> + if (ret) {
> + printf("Failed to fixup memory banks: %d\n", ret);
> + return ret;
> + }
> +
> + return update_ddrss_timings();
> }
> +#endif /* CONFIG_K3_DDRSS */
>
> #if IS_ENABLED(CONFIG_BOARD_LATE_INIT)
> int board_late_init(void)
> diff --git a/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h b/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
> new file mode 100644
> index 00000000000..6d248ce6dfa
> --- /dev/null
> +++ b/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
> @@ -0,0 +1,50 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * DDR override logic for AM625 PocketBeagle 2
> + * https://www.beagleboard.org/boards/pocketbeagle-2
> + *
> + * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
> + */
> +
> +#ifndef __POCKETBEAGLE2_DDR_H
> +#define __POCKETBEAGLE2_DDR_H
> +
> +#include "../../phytec/common/k3/k3_ddrss_patch.h"
> +
> +enum {
> + EEPROM_RAM_SIZE_512MB = 0,
> + EEPROM_RAM_SIZE_1GB = 1
> +};
> +
> +struct ddr_reg ddr_1gb_ctl_regs[] = {
> + { 317, 0x00000101 },
> + { 318, 0x1FFF0000 },
> +};
> +
> +struct ddr_reg ddr_1gb_pi_regs[] = {
> + { 77, 0x04010100 },
> +};
> +
> +struct ddrss pocketbeagle2_ddrss_data[] = {
> + // default configuration
> + [EEPROM_RAM_SIZE_512MB] = {
> + .ctl_regs = NULL,
> + .ctl_regs_num = 0,
> + .pi_regs = NULL,
> + .pi_regs_num = 0,
> + .phy_regs = NULL,
> + .phy_regs_num = 0,
> + },
> +
> + // industrial configuration
> + [EEPROM_RAM_SIZE_1GB] = {
> + .ctl_regs = &ddr_1gb_ctl_regs[0],
> + .ctl_regs_num = ARRAY_SIZE(ddr_1gb_ctl_regs),
> + .pi_regs = &ddr_1gb_pi_regs[0],
> + .pi_regs_num = ARRAY_SIZE(ddr_1gb_pi_regs),
> + .phy_regs = NULL,
> + .phy_regs_num = 0,
> + },
> +};
> +
> +#endif /* __POCKETBEAGLE2_DDR_H */
> diff --git a/configs/am62_pocketbeagle2_r5_defconfig b/configs/am62_pocketbeagle2_r5_defconfig
> index e863204cfef..d72f78b932c 100644
> --- a/configs/am62_pocketbeagle2_r5_defconfig
> +++ b/configs/am62_pocketbeagle2_r5_defconfig
> @@ -14,7 +14,7 @@ CONFIG_DM_GPIO=y
> CONFIG_SPL_DM_SPI=y
> CONFIG_DEFAULT_DEVICE_TREE="k3-am62-r5-pocketbeagle2"
> CONFIG_DM_RESET=y
> -CONFIG_SPL_SYS_MALLOC_F_LEN=0x7000
> +CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000
> CONFIG_SPL_MMC=y
> CONFIG_SPL_SERIAL=y
> CONFIG_SPL_DRIVERS_MISC=y
> @@ -42,6 +42,7 @@ CONFIG_SPL_SYS_MALLOC=y
> CONFIG_SPL_EARLY_BSS=y
> CONFIG_SPL_SYS_MMCSD_RAW_MODE=y
> CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400
> +CONFIG_SPL_I2C=y
> CONFIG_SPL_DM_MAILBOX=y
> CONFIG_SPL_DM_RESET=y
> CONFIG_SPL_POWER_DOMAIN=y
> @@ -73,6 +74,8 @@ CONFIG_SPL_CLK_K3_PLL=y
> CONFIG_SPL_CLK_K3=y
> CONFIG_TI_SCI_PROTOCOL=y
> CONFIG_DA8XX_GPIO=y
> +CONFIG_DM_I2C=y
> +CONFIG_SYS_I2C_OMAP24XX=y
> CONFIG_DM_MAILBOX=y
> CONFIG_K3_SEC_PROXY=y
> CONFIG_SPL_MISC=y
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/3] k3-am62-pocketbeagle2: add support for 1GB variant
2026-03-20 10:10 ` Anshul Dalal
@ 2026-03-20 15:26 ` Robert Nelson
2026-03-23 18:38 ` Randolph Sapp
0 siblings, 1 reply; 23+ messages in thread
From: Robert Nelson @ 2026-03-20 15:26 UTC (permalink / raw)
To: Anshul Dalal, Andrei Aldea; +Cc: rs, bb, nm, trini, afd, u-boot
> > +
> > +config POCKETBEAGLE2_AM62X_RAM_SIZE_FIX
> > + bool "Set the PocketBeagle 2 RAM size instead of detecting it"
> > + default false
> > + help
> > + RAM size is automatically detected through the device revision stored
> > + in EEPROM. This overrides the detection logic with a fixed value.
>
> With the ability to detect the board type via the EEPROM, is there any
> use to having this option?
>
> IMO we should just let the board boot with runtime detection for DDR
> size everytime. This config option just makes the execution harder to
> understand while providing minimal value.
Phytec also does that with their boards that detect memory sizes, i
think Randolph was trying to mirror that kconfig section..
>
> > +
> > +choice
> > + prompt "PocketBeagle 2 RAM size"
> > + depends on POCKETBEAGLE2_AM62X_RAM_SIZE_FIX
> > + default POCKETBEAGLE2_AM62X_RAM_SIZE_512MB
> > +
> > +config POCKETBEAGLE2_AM62X_RAM_SIZE_512MB
> > + bool "512MB RAM"
> > + help
> > + Set RAM size fix to 512MB for the PocketBeagle 2.
> > +
> > +config POCKETBEAGLE2_AM62X_RAM_SIZE_1GB
> > + bool "1GB RAM"
> > + help
> > + Set RAM size fix to 1GB for the PocketBeagle 2.
> > +
> > +endchoice
> > diff --git a/board/beagle/pocketbeagle2/Makefile b/board/beagle/pocketbeagle2/Makefile
> > index 3d42c160716..dd529fe6d75 100644
> > --- a/board/beagle/pocketbeagle2/Makefile
> > +++ b/board/beagle/pocketbeagle2/Makefile
> > @@ -7,3 +7,5 @@
> > #
> >
> > obj-y += pocketbeagle2.o
> > +obj-${CONFIG_K3_DDRSS} += ../../phytec/common/k3/k3_ddrss_patch.o
> > +obj-${CONFIG_TI_I2C_BOARD_DETECT} += ../../ti/common/board_detect.o
> > diff --git a/board/beagle/pocketbeagle2/pocketbeagle2.c b/board/beagle/pocketbeagle2/pocketbeagle2.c
> > index b6768caa34b..1bfc79350b6 100644
> > --- a/board/beagle/pocketbeagle2/pocketbeagle2.c
> > +++ b/board/beagle/pocketbeagle2/pocketbeagle2.c
> > @@ -15,15 +15,123 @@
> > #include <spl.h>
> > #include <asm/arch/k3-ddr.h>
> >
> > +#include "../../ti/common/board_detect.h"
> > +#include "pocketbeagle2_ddr.h"
> > +
> > +DECLARE_GLOBAL_DATA_PTR;
> > +
> > +static int pocketbeagle2_get_ddr_size(void)
> > +{
> > + // check config overrides first
> > + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_FIX)) {
> > + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_512MB))
> > + return EEPROM_RAM_SIZE_512MB;
> > + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_1GB))
> > + return EEPROM_RAM_SIZE_1GB;
> > + }
> > +
> > +#if IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)
> > + // dynamically detect the config if we can
> > + if (!do_board_detect_am6()) {
> > + struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
> > +
> > + if (strlen(ep->name) > 11 && ep->name[0] == 'P') {
> > + /*
> > + * POCKETBEAGL2A00 (am6232 512MB)
> > + * POCKETBEAGL2A10 (am625 512MB)
> > + * POCKETBEAGL2A1I (am625 1GB)
> > + */
> > + if (!strncmp(&ep->name[11], "2A1I", 4))
> > + return EEPROM_RAM_SIZE_1GB;
> > + }
> > + }
> > +#endif
> > +
> > + return EEPROM_RAM_SIZE_512MB;
> > +}
> > +
> > int dram_init(void)
> > {
> > - return fdtdec_setup_mem_size_base();
> > + if (!IS_ENABLED(CONFIG_CPU_V7R))
>
> I don't have a 1GiB pb2 to test with but I'm assuming the fixed up
> memory nodes get passed from the R5 SPL to A53 SPL and then finally to
> U-Boot as part of fixup_memory_node from k3-ddr.c.
@Andrei Aldea ^ can you help ;)
> Could somebody confirm if this is indeed the correct flow? I wanted to
> see if both A53 SPL and U-Boot receive the correct memory size as part
> of their DT.
Sadly while developing this, the DT memory values were not passed
between the R5 SPL and the A53 SPL ( and thus A53 main )..
After thinking about this routine since I came up with it last month,
it might be better to do 2 device-tree's... So with 512MB default
path, for 1GB, patch ddr timing in R5/SPL and force 1GB device tree.
Then A53/SPL (and main) would have the correct memory size..
Currently, we read the eeprom 3 times, R5 SPL, A53 SPL and A53 main..
(but we only need it really twice, R5 SPL (ddr patch) and the A53 main
(device-tree values patching..)
>
> > + return fdtdec_setup_mem_size_base();
> > +
> > + return 0;
> > }
> >
> > +// logic after this block assumes that there is only 1 DRAM bank currently
> > +#if CONFIG_NR_DRAM_BANKS != 1
> > +#error Unsupported number of DRAM banks!
> > +#endif
> > +
> > int dram_init_banksize(void)
> > {
> > - return fdtdec_setup_memory_banksize();
> > + u8 ram_size;
> > +
> > + if (!IS_ENABLED(CONFIG_CPU_V7R))
> > + return fdtdec_setup_memory_banksize();
> > +
> > + memset(gd->bd->bi_dram, 0, sizeof(gd->bd->bi_dram[0]));
> > +
> > + ram_size = pocketbeagle2_get_ddr_size();
> > + switch (ram_size) {
> > + case EEPROM_RAM_SIZE_1GB:
> > + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
> > + gd->bd->bi_dram[0].size = 0x40000000;
> > + gd->ram_size = 0x40000000;
> > + break;
> > + case EEPROM_RAM_SIZE_512MB:
> > + default:
> > + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
> > + gd->bd->bi_dram[0].size = 0x20000000;
> > + gd->ram_size = 0x20000000;
>
> We can make use of SZ_512M and SZ_1G macros here.
>
> > + break;
> > + }
> > +
> > + return 0;
> > +}
> > +
> > +#if IS_ENABLED(CONFIG_K3_DDRSS)
> > +static int update_ddrss_timings(void)
> > +{
> > + int ret = 0;
> > + u8 ram_size = 0;
>
> Having a u8 of "ram_size" is confusing, we should make it explict that
> it's an index into pocketbeagle2_ddrss_data.
>
> > + struct ddrss *ddr_patch = NULL;
> > + void *fdt = (void *)gd->fdt_blob;
> > +
> > + ram_size = pocketbeagle2_get_ddr_size();
> > + ddr_patch = &pocketbeagle2_ddrss_data[ram_size];
> > +
> > + if (!ddr_patch)
> > + return ret;
> > +
> > + ret = fdt_apply_ddrss_timings_patch(fdt, ddr_patch);
> > + if (ret) {
> > + printf("Failed to apply ddrs timings patch: %d\n", ret);
> > + return ret;
> > + }
> > +
> > + return ret;
> > +}
> > +
> > +int do_board_detect(void)
> > +{
> > + void *fdt = (void *)gd->fdt_blob;
> > + u64 start[] = {gd->bd->bi_dram[0].start};
> > + u64 size[] = {gd->bd->bi_dram[0].size};
> > + int ret;
> > +
>
> Nit: formatting (done with clang-format)
>
> - u64 start[] = {gd->bd->bi_dram[0].start};
> - u64 size[] = {gd->bd->bi_dram[0].size};
> + u64 start[] = { gd->bd->bi_dram[0].start };
> + u64 size[] = { gd->bd->bi_dram[0].size };
> ...
> - snprintf(fdtfile, sizeof(fdtfile), "%s.dtb", CONFIG_DEFAULT_DEVICE_TREE);
> + snprintf(fdtfile, sizeof(fdtfile), "%s.dtb",
> + CONFIG_DEFAULT_DEVICE_TREE);
>
>
> > + dram_init();
> > + dram_init_banksize();
> > +
> > + ret = fdt_fixup_memory_banks(fdt, start, size, 1);
> > + if (ret) {
> > + printf("Failed to fixup memory banks: %d\n", ret);
> > + return ret;
> > + }
> > +
> > + return update_ddrss_timings();
> > }
> > +#endif /* CONFIG_K3_DDRSS */
> >
> > #if IS_ENABLED(CONFIG_BOARD_LATE_INIT)
> > int board_late_init(void)
> > diff --git a/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h b/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
> > new file mode 100644
> > index 00000000000..6d248ce6dfa
> > --- /dev/null
> > +++ b/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
> > @@ -0,0 +1,50 @@
> > +/* SPDX-License-Identifier: GPL-2.0+ */
> > +/*
> > + * DDR override logic for AM625 PocketBeagle 2
> > + * https://www.beagleboard.org/boards/pocketbeagle-2
> > + *
> > + * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
> > + */
> > +
> > +#ifndef __POCKETBEAGLE2_DDR_H
> > +#define __POCKETBEAGLE2_DDR_H
> > +
> > +#include "../../phytec/common/k3/k3_ddrss_patch.h"
> > +
> > +enum {
> > + EEPROM_RAM_SIZE_512MB = 0,
> > + EEPROM_RAM_SIZE_1GB = 1
> > +};
> > +
> > +struct ddr_reg ddr_1gb_ctl_regs[] = {
> > + { 317, 0x00000101 },
> > + { 318, 0x1FFF0000 },
> > +};
> > +
> > +struct ddr_reg ddr_1gb_pi_regs[] = {
> > + { 77, 0x04010100 },
> > +};
> > +
> > +struct ddrss pocketbeagle2_ddrss_data[] = {
> > + // default configuration
> > + [EEPROM_RAM_SIZE_512MB] = {
> > + .ctl_regs = NULL,
> > + .ctl_regs_num = 0,
> > + .pi_regs = NULL,
> > + .pi_regs_num = 0,
> > + .phy_regs = NULL,
> > + .phy_regs_num = 0,
> > + },
> > +
> > + // industrial configuration
> > + [EEPROM_RAM_SIZE_1GB] = {
> > + .ctl_regs = &ddr_1gb_ctl_regs[0],
> > + .ctl_regs_num = ARRAY_SIZE(ddr_1gb_ctl_regs),
> > + .pi_regs = &ddr_1gb_pi_regs[0],
> > + .pi_regs_num = ARRAY_SIZE(ddr_1gb_pi_regs),
> > + .phy_regs = NULL,
> > + .phy_regs_num = 0,
> > + },
> > +};
> > +
> > +#endif /* __POCKETBEAGLE2_DDR_H */
> > diff --git a/configs/am62_pocketbeagle2_r5_defconfig b/configs/am62_pocketbeagle2_r5_defconfig
> > index e863204cfef..d72f78b932c 100644
> > --- a/configs/am62_pocketbeagle2_r5_defconfig
> > +++ b/configs/am62_pocketbeagle2_r5_defconfig
> > @@ -14,7 +14,7 @@ CONFIG_DM_GPIO=y
> > CONFIG_SPL_DM_SPI=y
> > CONFIG_DEFAULT_DEVICE_TREE="k3-am62-r5-pocketbeagle2"
> > CONFIG_DM_RESET=y
> > -CONFIG_SPL_SYS_MALLOC_F_LEN=0x7000
> > +CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000
> > CONFIG_SPL_MMC=y
> > CONFIG_SPL_SERIAL=y
> > CONFIG_SPL_DRIVERS_MISC=y
> > @@ -42,6 +42,7 @@ CONFIG_SPL_SYS_MALLOC=y
> > CONFIG_SPL_EARLY_BSS=y
> > CONFIG_SPL_SYS_MMCSD_RAW_MODE=y
> > CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400
> > +CONFIG_SPL_I2C=y
> > CONFIG_SPL_DM_MAILBOX=y
> > CONFIG_SPL_DM_RESET=y
> > CONFIG_SPL_POWER_DOMAIN=y
> > @@ -73,6 +74,8 @@ CONFIG_SPL_CLK_K3_PLL=y
> > CONFIG_SPL_CLK_K3=y
> > CONFIG_TI_SCI_PROTOCOL=y
> > CONFIG_DA8XX_GPIO=y
> > +CONFIG_DM_I2C=y
> > +CONFIG_SYS_I2C_OMAP24XX=y
> > CONFIG_DM_MAILBOX=y
> > CONFIG_K3_SEC_PROXY=y
> > CONFIG_SPL_MISC=y
>
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-20 9:29 ` Anshul Dalal
@ 2026-03-20 15:32 ` Robert Nelson
2026-03-23 19:37 ` Randolph Sapp
0 siblings, 1 reply; 23+ messages in thread
From: Robert Nelson @ 2026-03-20 15:32 UTC (permalink / raw)
To: Anshul Dalal; +Cc: rs, bb, nm, trini, afd, u-boot
> > +++ b/configs/am62_pocketbeagle2_a53_defconfig
> > @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
> > CONFIG_NR_DRAM_BANKS=1
> > CONFIG_SOC_K3_AM625=y
> > -CONFIG_TARGET_AM625_A53_BEAGLEPLAY=y
> > +CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2=y
> > CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> > CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000
> > CONFIG_DM_GPIO=y
> > -CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am625-beagleplay"
> > +CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am62-pocketbeagle2"
> > CONFIG_OF_LIBFDT_OVERLAY=y
> > CONFIG_DM_RESET=y
> > CONFIG_SPL_MMC=y
> > @@ -44,8 +44,6 @@ CONFIG_SPL_I2C=y
> > CONFIG_SPL_DM_MAILBOX=y
> > CONFIG_SPL_POWER_DOMAIN=y
> > CONFIG_SPL_YMODEM_SUPPORT=y
> > -CONFIG_CMD_BOOTEFI_SELFTEST=y
> > -CONFIG_CMD_NVEDIT_EFI=y
> > CONFIG_CMD_GPIO=y
> > CONFIG_CMD_GPIO_READ=y
> > CONFIG_CMD_I2C=y
> > @@ -53,6 +51,7 @@ CONFIG_CMD_MMC=y
> > CONFIG_CMD_EFIDEBUG=y
> > CONFIG_CMD_PMIC=y
> > CONFIG_CMD_REGULATOR=y
> > +CONFIG_CMD_CACHE=y
> > CONFIG_OF_CONTROL=y
> > CONFIG_SPL_OF_CONTROL=y
> > CONFIG_OF_UPSTREAM=y
> > @@ -90,10 +89,6 @@ CONFIG_MMC_SDHCI=y
> > CONFIG_MMC_SDHCI_ADMA=y
> > CONFIG_SPL_MMC_SDHCI_ADMA=y
> > CONFIG_MMC_SDHCI_AM654=y
> > -CONFIG_PHY_REALTEK=y
> > -CONFIG_PHY_TI=y
> > -CONFIG_DM_ETH_PHY=y
> > -CONFIG_TI_AM65_CPSW_NUSS=y
> > CONFIG_PHY=y
> > CONFIG_PINCTRL=y
> > CONFIG_SPL_PINCTRL=y
> > @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
> > CONFIG_EXT4_WRITE=y
> > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> > CONFIG_LZO=y
> > -CONFIG_EFI_SET_TIME=y
> > +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
>
> Any reason why we are using TOP_HIDE here instead of just moving OPTEE
> lower in DDR like we do on the 512MiB AM6254atl EVM?
Sorry, that is now a legacy setting before OPTEE finally got moved in
v2026.01, as this had been developed thru v2025 u-boot releases..
Regards,
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 3/3] k3-am62-pocketbeagle2: add support for 1GB variant
2026-03-20 15:26 ` Robert Nelson
@ 2026-03-23 18:38 ` Randolph Sapp
0 siblings, 0 replies; 23+ messages in thread
From: Randolph Sapp @ 2026-03-23 18:38 UTC (permalink / raw)
To: Robert Nelson, Anshul Dalal, Andrei Aldea; +Cc: rs, bb, nm, trini, afd, u-boot
On Fri Mar 20, 2026 at 10:26 AM CDT, Robert Nelson wrote:
>> > +
>> > +config POCKETBEAGLE2_AM62X_RAM_SIZE_FIX
>> > + bool "Set the PocketBeagle 2 RAM size instead of detecting it"
>> > + default false
>> > + help
>> > + RAM size is automatically detected through the device revision stored
>> > + in EEPROM. This overrides the detection logic with a fixed value.
>>
>> With the ability to detect the board type via the EEPROM, is there any
>> use to having this option?
>>
>> IMO we should just let the board boot with runtime detection for DDR
>> size everytime. This config option just makes the execution harder to
>> understand while providing minimal value.
>
> Phytec also does that with their boards that detect memory sizes, i
> think Randolph was trying to mirror that kconfig section..
Yeah, I specifically like the option to override the detection logic if users
have unusual hardware configs or boards that do not follow the loose
identification scheme defined in the automatic fixup path.
>>
>> > +
>> > +choice
>> > + prompt "PocketBeagle 2 RAM size"
>> > + depends on POCKETBEAGLE2_AM62X_RAM_SIZE_FIX
>> > + default POCKETBEAGLE2_AM62X_RAM_SIZE_512MB
>> > +
>> > +config POCKETBEAGLE2_AM62X_RAM_SIZE_512MB
>> > + bool "512MB RAM"
>> > + help
>> > + Set RAM size fix to 512MB for the PocketBeagle 2.
>> > +
>> > +config POCKETBEAGLE2_AM62X_RAM_SIZE_1GB
>> > + bool "1GB RAM"
>> > + help
>> > + Set RAM size fix to 1GB for the PocketBeagle 2.
>> > +
>> > +endchoice
>> > diff --git a/board/beagle/pocketbeagle2/Makefile b/board/beagle/pocketbeagle2/Makefile
>> > index 3d42c160716..dd529fe6d75 100644
>> > --- a/board/beagle/pocketbeagle2/Makefile
>> > +++ b/board/beagle/pocketbeagle2/Makefile
>> > @@ -7,3 +7,5 @@
>> > #
>> >
>> > obj-y += pocketbeagle2.o
>> > +obj-${CONFIG_K3_DDRSS} += ../../phytec/common/k3/k3_ddrss_patch.o
>> > +obj-${CONFIG_TI_I2C_BOARD_DETECT} += ../../ti/common/board_detect.o
>> > diff --git a/board/beagle/pocketbeagle2/pocketbeagle2.c b/board/beagle/pocketbeagle2/pocketbeagle2.c
>> > index b6768caa34b..1bfc79350b6 100644
>> > --- a/board/beagle/pocketbeagle2/pocketbeagle2.c
>> > +++ b/board/beagle/pocketbeagle2/pocketbeagle2.c
>> > @@ -15,15 +15,123 @@
>> > #include <spl.h>
>> > #include <asm/arch/k3-ddr.h>
>> >
>> > +#include "../../ti/common/board_detect.h"
>> > +#include "pocketbeagle2_ddr.h"
>> > +
>> > +DECLARE_GLOBAL_DATA_PTR;
>> > +
>> > +static int pocketbeagle2_get_ddr_size(void)
>> > +{
>> > + // check config overrides first
>> > + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_FIX)) {
>> > + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_512MB))
>> > + return EEPROM_RAM_SIZE_512MB;
>> > + if (IS_ENABLED(CONFIG_POCKETBEAGLE2_AM62X_RAM_SIZE_1GB))
>> > + return EEPROM_RAM_SIZE_1GB;
>> > + }
>> > +
>> > +#if IS_ENABLED(CONFIG_TI_I2C_BOARD_DETECT)
>> > + // dynamically detect the config if we can
>> > + if (!do_board_detect_am6()) {
>> > + struct ti_am6_eeprom *ep = TI_AM6_EEPROM_DATA;
>> > +
>> > + if (strlen(ep->name) > 11 && ep->name[0] == 'P') {
>> > + /*
>> > + * POCKETBEAGL2A00 (am6232 512MB)
>> > + * POCKETBEAGL2A10 (am625 512MB)
>> > + * POCKETBEAGL2A1I (am625 1GB)
>> > + */
>> > + if (!strncmp(&ep->name[11], "2A1I", 4))
>> > + return EEPROM_RAM_SIZE_1GB;
>> > + }
>> > + }
>> > +#endif
>> > +
>> > + return EEPROM_RAM_SIZE_512MB;
>> > +}
>> > +
>> > int dram_init(void)
>> > {
>> > - return fdtdec_setup_mem_size_base();
>> > + if (!IS_ENABLED(CONFIG_CPU_V7R))
>>
>> I don't have a 1GiB pb2 to test with but I'm assuming the fixed up
>> memory nodes get passed from the R5 SPL to A53 SPL and then finally to
>> U-Boot as part of fixup_memory_node from k3-ddr.c.
>
> @Andrei Aldea ^ can you help ;)
>
Andrei has agreed to give me a board tomorrow so I don't have to test this all
through a proxy.
>> Could somebody confirm if this is indeed the correct flow? I wanted to
>> see if both A53 SPL and U-Boot receive the correct memory size as part
>> of their DT.
>
> Sadly while developing this, the DT memory values were not passed
> between the R5 SPL and the A53 SPL ( and thus A53 main )..
>
> After thinking about this routine since I came up with it last month,
> it might be better to do 2 device-tree's... So with 512MB default
> path, for 1GB, patch ddr timing in R5/SPL and force 1GB device tree.
> Then A53/SPL (and main) would have the correct memory size..
>
> Currently, we read the eeprom 3 times, R5 SPL, A53 SPL and A53 main..
> (but we only need it really twice, R5 SPL (ddr patch) and the A53 main
> (device-tree values patching..)
>
>
>>
>> > + return fdtdec_setup_mem_size_base();
>> > +
>> > + return 0;
>> > }
>> >
>> > +// logic after this block assumes that there is only 1 DRAM bank currently
>> > +#if CONFIG_NR_DRAM_BANKS != 1
>> > +#error Unsupported number of DRAM banks!
>> > +#endif
>> > +
>> > int dram_init_banksize(void)
>> > {
>> > - return fdtdec_setup_memory_banksize();
>> > + u8 ram_size;
>> > +
>> > + if (!IS_ENABLED(CONFIG_CPU_V7R))
>> > + return fdtdec_setup_memory_banksize();
>> > +
>> > + memset(gd->bd->bi_dram, 0, sizeof(gd->bd->bi_dram[0]));
>> > +
>> > + ram_size = pocketbeagle2_get_ddr_size();
>> > + switch (ram_size) {
>> > + case EEPROM_RAM_SIZE_1GB:
>> > + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
>> > + gd->bd->bi_dram[0].size = 0x40000000;
>> > + gd->ram_size = 0x40000000;
>> > + break;
>> > + case EEPROM_RAM_SIZE_512MB:
>> > + default:
>> > + gd->bd->bi_dram[0].start = CFG_SYS_SDRAM_BASE;
>> > + gd->bd->bi_dram[0].size = 0x20000000;
>> > + gd->ram_size = 0x20000000;
>>
>> We can make use of SZ_512M and SZ_1G macros here.
>>
>> > + break;
>> > + }
>> > +
>> > + return 0;
>> > +}
>> > +
>> > +#if IS_ENABLED(CONFIG_K3_DDRSS)
>> > +static int update_ddrss_timings(void)
>> > +{
>> > + int ret = 0;
>> > + u8 ram_size = 0;
>>
>> Having a u8 of "ram_size" is confusing, we should make it explict that
>> it's an index into pocketbeagle2_ddrss_data.
I assume you just want some explicit typedef for this then? Or was your comment
more about the naming?
>> > + struct ddrss *ddr_patch = NULL;
>> > + void *fdt = (void *)gd->fdt_blob;
>> > +
>> > + ram_size = pocketbeagle2_get_ddr_size();
>> > + ddr_patch = &pocketbeagle2_ddrss_data[ram_size];
>> > +
>> > + if (!ddr_patch)
>> > + return ret;
>> > +
>> > + ret = fdt_apply_ddrss_timings_patch(fdt, ddr_patch);
>> > + if (ret) {
>> > + printf("Failed to apply ddrs timings patch: %d\n", ret);
>> > + return ret;
>> > + }
>> > +
>> > + return ret;
>> > +}
>> > +
>> > +int do_board_detect(void)
>> > +{
>> > + void *fdt = (void *)gd->fdt_blob;
>> > + u64 start[] = {gd->bd->bi_dram[0].start};
>> > + u64 size[] = {gd->bd->bi_dram[0].size};
>> > + int ret;
>> > +
>>
>> Nit: formatting (done with clang-format)
>>
>> - u64 start[] = {gd->bd->bi_dram[0].start};
>> - u64 size[] = {gd->bd->bi_dram[0].size};
>> + u64 start[] = { gd->bd->bi_dram[0].start };
>> + u64 size[] = { gd->bd->bi_dram[0].size };
>> ...
>> - snprintf(fdtfile, sizeof(fdtfile), "%s.dtb", CONFIG_DEFAULT_DEVICE_TREE);
>> + snprintf(fdtfile, sizeof(fdtfile), "%s.dtb",
>> + CONFIG_DEFAULT_DEVICE_TREE);
>>
>>
>> > + dram_init();
>> > + dram_init_banksize();
>> > +
>> > + ret = fdt_fixup_memory_banks(fdt, start, size, 1);
>> > + if (ret) {
>> > + printf("Failed to fixup memory banks: %d\n", ret);
>> > + return ret;
>> > + }
>> > +
>> > + return update_ddrss_timings();
>> > }
>> > +#endif /* CONFIG_K3_DDRSS */
>> >
>> > #if IS_ENABLED(CONFIG_BOARD_LATE_INIT)
>> > int board_late_init(void)
>> > diff --git a/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h b/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
>> > new file mode 100644
>> > index 00000000000..6d248ce6dfa
>> > --- /dev/null
>> > +++ b/board/beagle/pocketbeagle2/pocketbeagle2_ddr.h
>> > @@ -0,0 +1,50 @@
>> > +/* SPDX-License-Identifier: GPL-2.0+ */
>> > +/*
>> > + * DDR override logic for AM625 PocketBeagle 2
>> > + * https://www.beagleboard.org/boards/pocketbeagle-2
>> > + *
>> > + * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
>> > + */
>> > +
>> > +#ifndef __POCKETBEAGLE2_DDR_H
>> > +#define __POCKETBEAGLE2_DDR_H
>> > +
>> > +#include "../../phytec/common/k3/k3_ddrss_patch.h"
>> > +
>> > +enum {
>> > + EEPROM_RAM_SIZE_512MB = 0,
>> > + EEPROM_RAM_SIZE_1GB = 1
>> > +};
>> > +
>> > +struct ddr_reg ddr_1gb_ctl_regs[] = {
>> > + { 317, 0x00000101 },
>> > + { 318, 0x1FFF0000 },
>> > +};
>> > +
>> > +struct ddr_reg ddr_1gb_pi_regs[] = {
>> > + { 77, 0x04010100 },
>> > +};
>> > +
>> > +struct ddrss pocketbeagle2_ddrss_data[] = {
>> > + // default configuration
>> > + [EEPROM_RAM_SIZE_512MB] = {
>> > + .ctl_regs = NULL,
>> > + .ctl_regs_num = 0,
>> > + .pi_regs = NULL,
>> > + .pi_regs_num = 0,
>> > + .phy_regs = NULL,
>> > + .phy_regs_num = 0,
>> > + },
>> > +
>> > + // industrial configuration
>> > + [EEPROM_RAM_SIZE_1GB] = {
>> > + .ctl_regs = &ddr_1gb_ctl_regs[0],
>> > + .ctl_regs_num = ARRAY_SIZE(ddr_1gb_ctl_regs),
>> > + .pi_regs = &ddr_1gb_pi_regs[0],
>> > + .pi_regs_num = ARRAY_SIZE(ddr_1gb_pi_regs),
>> > + .phy_regs = NULL,
>> > + .phy_regs_num = 0,
>> > + },
>> > +};
>> > +
>> > +#endif /* __POCKETBEAGLE2_DDR_H */
>> > diff --git a/configs/am62_pocketbeagle2_r5_defconfig b/configs/am62_pocketbeagle2_r5_defconfig
>> > index e863204cfef..d72f78b932c 100644
>> > --- a/configs/am62_pocketbeagle2_r5_defconfig
>> > +++ b/configs/am62_pocketbeagle2_r5_defconfig
>> > @@ -14,7 +14,7 @@ CONFIG_DM_GPIO=y
>> > CONFIG_SPL_DM_SPI=y
>> > CONFIG_DEFAULT_DEVICE_TREE="k3-am62-r5-pocketbeagle2"
>> > CONFIG_DM_RESET=y
>> > -CONFIG_SPL_SYS_MALLOC_F_LEN=0x7000
>> > +CONFIG_SPL_SYS_MALLOC_F_LEN=0x8000
>> > CONFIG_SPL_MMC=y
>> > CONFIG_SPL_SERIAL=y
>> > CONFIG_SPL_DRIVERS_MISC=y
>> > @@ -42,6 +42,7 @@ CONFIG_SPL_SYS_MALLOC=y
>> > CONFIG_SPL_EARLY_BSS=y
>> > CONFIG_SPL_SYS_MMCSD_RAW_MODE=y
>> > CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400
>> > +CONFIG_SPL_I2C=y
>> > CONFIG_SPL_DM_MAILBOX=y
>> > CONFIG_SPL_DM_RESET=y
>> > CONFIG_SPL_POWER_DOMAIN=y
>> > @@ -73,6 +74,8 @@ CONFIG_SPL_CLK_K3_PLL=y
>> > CONFIG_SPL_CLK_K3=y
>> > CONFIG_TI_SCI_PROTOCOL=y
>> > CONFIG_DA8XX_GPIO=y
>> > +CONFIG_DM_I2C=y
>> > +CONFIG_SYS_I2C_OMAP24XX=y
>> > CONFIG_DM_MAILBOX=y
>> > CONFIG_K3_SEC_PROXY=y
>> > CONFIG_SPL_MISC=y
>>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-20 15:32 ` Robert Nelson
@ 2026-03-23 19:37 ` Randolph Sapp
2026-03-23 19:46 ` Robert Nelson
0 siblings, 1 reply; 23+ messages in thread
From: Randolph Sapp @ 2026-03-23 19:37 UTC (permalink / raw)
To: Robert Nelson, Anshul Dalal; +Cc: rs, bb, nm, trini, afd, u-boot
On Fri Mar 20, 2026 at 10:32 AM CDT, Robert Nelson wrote:
>> > +++ b/configs/am62_pocketbeagle2_a53_defconfig
>> > @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
>> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
>> > CONFIG_NR_DRAM_BANKS=1
>> > CONFIG_SOC_K3_AM625=y
>> > -CONFIG_TARGET_AM625_A53_BEAGLEPLAY=y
>> > +CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2=y
>> > CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
>> > CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000
>> > CONFIG_DM_GPIO=y
>> > -CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am625-beagleplay"
>> > +CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am62-pocketbeagle2"
>> > CONFIG_OF_LIBFDT_OVERLAY=y
>> > CONFIG_DM_RESET=y
>> > CONFIG_SPL_MMC=y
>> > @@ -44,8 +44,6 @@ CONFIG_SPL_I2C=y
>> > CONFIG_SPL_DM_MAILBOX=y
>> > CONFIG_SPL_POWER_DOMAIN=y
>> > CONFIG_SPL_YMODEM_SUPPORT=y
>> > -CONFIG_CMD_BOOTEFI_SELFTEST=y
>> > -CONFIG_CMD_NVEDIT_EFI=y
>> > CONFIG_CMD_GPIO=y
>> > CONFIG_CMD_GPIO_READ=y
>> > CONFIG_CMD_I2C=y
>> > @@ -53,6 +51,7 @@ CONFIG_CMD_MMC=y
>> > CONFIG_CMD_EFIDEBUG=y
>> > CONFIG_CMD_PMIC=y
>> > CONFIG_CMD_REGULATOR=y
>> > +CONFIG_CMD_CACHE=y
>> > CONFIG_OF_CONTROL=y
>> > CONFIG_SPL_OF_CONTROL=y
>> > CONFIG_OF_UPSTREAM=y
>> > @@ -90,10 +89,6 @@ CONFIG_MMC_SDHCI=y
>> > CONFIG_MMC_SDHCI_ADMA=y
>> > CONFIG_SPL_MMC_SDHCI_ADMA=y
>> > CONFIG_MMC_SDHCI_AM654=y
>> > -CONFIG_PHY_REALTEK=y
>> > -CONFIG_PHY_TI=y
>> > -CONFIG_DM_ETH_PHY=y
>> > -CONFIG_TI_AM65_CPSW_NUSS=y
>> > CONFIG_PHY=y
>> > CONFIG_PINCTRL=y
>> > CONFIG_SPL_PINCTRL=y
>> > @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
>> > CONFIG_EXT4_WRITE=y
>> > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>> > CONFIG_LZO=y
>> > -CONFIG_EFI_SET_TIME=y
>> > +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
>>
>> Any reason why we are using TOP_HIDE here instead of just moving OPTEE
>> lower in DDR like we do on the 512MiB AM6254atl EVM?
>
> Sorry, that is now a legacy setting before OPTEE finally got moved in
> v2026.01, as this had been developed thru v2025 u-boot releases..
>
Well, it's worth noting that this change was not done in the usual way, and
involves user interaction during the build beyond selecting a defconfig.
https://texasinstruments.github.io/processor-sdk-doc/processor-sdk-linux-AM62X/esd/docs/master/linux/Foundational_Components_ATF.html
https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-bsp/conf/machine/am62xxsip-evm.conf
Robert, are you alright with me making the requested changes?
Randolph
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-23 19:37 ` Randolph Sapp
@ 2026-03-23 19:46 ` Robert Nelson
2026-03-26 0:34 ` Randolph Sapp
0 siblings, 1 reply; 23+ messages in thread
From: Robert Nelson @ 2026-03-23 19:46 UTC (permalink / raw)
To: Randolph Sapp, Erik Welsh; +Cc: Anshul Dalal, bb, nm, trini, afd, u-boot
On Mon, Mar 23, 2026 at 2:37 PM Randolph Sapp <rs@ti.com> wrote:
>
> On Fri Mar 20, 2026 at 10:32 AM CDT, Robert Nelson wrote:
> >> > +++ b/configs/am62_pocketbeagle2_a53_defconfig
> >> > @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
> >> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
> >> > CONFIG_NR_DRAM_BANKS=1
> >> > CONFIG_SOC_K3_AM625=y
> >> > -CONFIG_TARGET_AM625_A53_BEAGLEPLAY=y
> >> > +CONFIG_TARGET_AM62X_A53_POCKETBEAGLE2=y
> >> > CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> >> > CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000
> >> > CONFIG_DM_GPIO=y
> >> > -CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am625-beagleplay"
> >> > +CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am62-pocketbeagle2"
> >> > CONFIG_OF_LIBFDT_OVERLAY=y
> >> > CONFIG_DM_RESET=y
> >> > CONFIG_SPL_MMC=y
> >> > @@ -44,8 +44,6 @@ CONFIG_SPL_I2C=y
> >> > CONFIG_SPL_DM_MAILBOX=y
> >> > CONFIG_SPL_POWER_DOMAIN=y
> >> > CONFIG_SPL_YMODEM_SUPPORT=y
> >> > -CONFIG_CMD_BOOTEFI_SELFTEST=y
> >> > -CONFIG_CMD_NVEDIT_EFI=y
> >> > CONFIG_CMD_GPIO=y
> >> > CONFIG_CMD_GPIO_READ=y
> >> > CONFIG_CMD_I2C=y
> >> > @@ -53,6 +51,7 @@ CONFIG_CMD_MMC=y
> >> > CONFIG_CMD_EFIDEBUG=y
> >> > CONFIG_CMD_PMIC=y
> >> > CONFIG_CMD_REGULATOR=y
> >> > +CONFIG_CMD_CACHE=y
> >> > CONFIG_OF_CONTROL=y
> >> > CONFIG_SPL_OF_CONTROL=y
> >> > CONFIG_OF_UPSTREAM=y
> >> > @@ -90,10 +89,6 @@ CONFIG_MMC_SDHCI=y
> >> > CONFIG_MMC_SDHCI_ADMA=y
> >> > CONFIG_SPL_MMC_SDHCI_ADMA=y
> >> > CONFIG_MMC_SDHCI_AM654=y
> >> > -CONFIG_PHY_REALTEK=y
> >> > -CONFIG_PHY_TI=y
> >> > -CONFIG_DM_ETH_PHY=y
> >> > -CONFIG_TI_AM65_CPSW_NUSS=y
> >> > CONFIG_PHY=y
> >> > CONFIG_PINCTRL=y
> >> > CONFIG_SPL_PINCTRL=y
> >> > @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
> >> > CONFIG_EXT4_WRITE=y
> >> > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> >> > CONFIG_LZO=y
> >> > -CONFIG_EFI_SET_TIME=y
> >> > +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
> >>
> >> Any reason why we are using TOP_HIDE here instead of just moving OPTEE
> >> lower in DDR like we do on the 512MiB AM6254atl EVM?
> >
> > Sorry, that is now a legacy setting before OPTEE finally got moved in
> > v2026.01, as this had been developed thru v2025 u-boot releases..
> >
>
> Well, it's worth noting that this change was not done in the usual way, and
> involves user interaction during the build beyond selecting a defconfig.
>
> https://texasinstruments.github.io/processor-sdk-doc/processor-sdk-linux-AM62X/esd/docs/master/linux/Foundational_Components_ATF.html
> https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-bsp/conf/machine/am62xxsip-evm.conf
>
> Robert, are you alright with me making the requested changes?
I guess as long as we document it. I know the Octavo OSD62-sip @Erik
Welsh will also be building on both am62xxsip and pocketbeagle2 based
on the 512MB and then larger memory sizes (1G, 2G, etc.).
Regards,
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-23 19:46 ` Robert Nelson
@ 2026-03-26 0:34 ` Randolph Sapp
2026-03-26 23:23 ` Randolph Sapp
0 siblings, 1 reply; 23+ messages in thread
From: Randolph Sapp @ 2026-03-26 0:34 UTC (permalink / raw)
To: Robert Nelson, Randolph Sapp, Erik Welsh
Cc: Anshul Dalal, bb, nm, trini, afd, u-boot
On Mon Mar 23, 2026 at 2:46 PM CDT, Robert Nelson wrote:
> On Mon, Mar 23, 2026 at 2:37 PM Randolph Sapp <rs@ti.com> wrote:
>> On Fri Mar 20, 2026 at 10:32 AM CDT, Robert Nelson wrote:
>> >> > +++ b/configs/am62_pocketbeagle2_a53_defconfig
>> >> > @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
>> >> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
>> >> > CONFIG_NR_DRAM_BANKS=1
>> >> > CONFIG_SOC_K3_AM625=y
[snip]
>> >> > @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
>> >> > CONFIG_EXT4_WRITE=y
>> >> > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>> >> > CONFIG_LZO=y
>> >> > -CONFIG_EFI_SET_TIME=y
>> >> > +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
>> >>
>> >> Any reason why we are using TOP_HIDE here instead of just moving OPTEE
>> >> lower in DDR like we do on the 512MiB AM6254atl EVM?
>> >
>> > Sorry, that is now a legacy setting before OPTEE finally got moved in
>> > v2026.01, as this had been developed thru v2025 u-boot releases..
>> >
>>
>> Well, it's worth noting that this change was not done in the usual way, and
>> involves user interaction during the build beyond selecting a defconfig.
>>
>> https://texasinstruments.github.io/processor-sdk-doc/processor-sdk-linux-AM62X/esd/docs/master/linux/Foundational_Components_ATF.html
>> https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-bsp/conf/machine/am62xxsip-evm.conf
>>
>> Robert, are you alright with me making the requested changes?
>
> I guess as long as we document it. I know the Octavo OSD62-sip @Erik
> Welsh will also be building on both am62xxsip and pocketbeagle2 based
> on the 512MB and then larger memory sizes (1G, 2G, etc.).
>
> Regards,
Oh boy, adjusting the memory maps kept getting me out of memory errors in the
EFI flow that I knew should not be true. Found something fun: LMB reserved
memory regions do not match EFI reserved memory regions. EFI's
efi_carve_out_dt_rsv is setting regions to be more strict that LMB's base
requirements. When this occurs and an allocation runs into this discrepancy,
that allocation and all future allocation requests in the EFI flow will begin to
fail as they are repeatedly given the same LMB start address in the unapproved
region.
Randolph
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-26 0:34 ` Randolph Sapp
@ 2026-03-26 23:23 ` Randolph Sapp
2026-03-27 14:25 ` Marko Mäkelä
2026-03-30 23:57 ` Randolph Sapp
0 siblings, 2 replies; 23+ messages in thread
From: Randolph Sapp @ 2026-03-26 23:23 UTC (permalink / raw)
To: Randolph Sapp, Robert Nelson, Erik Welsh
Cc: Anshul Dalal, bb, nm, trini, afd, u-boot
On Wed Mar 25, 2026 at 7:34 PM CDT, Randolph Sapp wrote:
> On Mon Mar 23, 2026 at 2:46 PM CDT, Robert Nelson wrote:
>> On Mon, Mar 23, 2026 at 2:37 PM Randolph Sapp <rs@ti.com> wrote:
>>> On Fri Mar 20, 2026 at 10:32 AM CDT, Robert Nelson wrote:
>>> >> > +++ b/configs/am62_pocketbeagle2_a53_defconfig
>>> >> > @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
>>> >> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
>>> >> > CONFIG_NR_DRAM_BANKS=1
>>> >> > CONFIG_SOC_K3_AM625=y
> [snip]
>>> >> > @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
>>> >> > CONFIG_EXT4_WRITE=y
>>> >> > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>>> >> > CONFIG_LZO=y
>>> >> > -CONFIG_EFI_SET_TIME=y
>>> >> > +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
>>> >>
>>> >> Any reason why we are using TOP_HIDE here instead of just moving OPTEE
>>> >> lower in DDR like we do on the 512MiB AM6254atl EVM?
>>> >
>>> > Sorry, that is now a legacy setting before OPTEE finally got moved in
>>> > v2026.01, as this had been developed thru v2025 u-boot releases..
>>> >
>>>
>>> Well, it's worth noting that this change was not done in the usual way, and
>>> involves user interaction during the build beyond selecting a defconfig.
>>>
>>> https://texasinstruments.github.io/processor-sdk-doc/processor-sdk-linux-AM62X/esd/docs/master/linux/Foundational_Components_ATF.html
>>> https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-bsp/conf/machine/am62xxsip-evm.conf
>>>
>>> Robert, are you alright with me making the requested changes?
>>
>> I guess as long as we document it. I know the Octavo OSD62-sip @Erik
>> Welsh will also be building on both am62xxsip and pocketbeagle2 based
>> on the 512MB and then larger memory sizes (1G, 2G, etc.).
>>
>> Regards,
>
> Oh boy, adjusting the memory maps kept getting me out of memory errors in the
> EFI flow that I knew should not be true. Found something fun: LMB reserved
> memory regions do not match EFI reserved memory regions. EFI's
> efi_carve_out_dt_rsv is setting regions to be more strict that LMB's base
> requirements. When this occurs and an allocation runs into this discrepancy,
> that allocation and all future allocation requests in the EFI flow will begin to
> fail as they are repeatedly given the same LMB start address in the unapproved
> region.
>
> Randolph
Alright, looking into the allocation helpers it seems that
EFI_CONVENTIONAL_MEMORY can be remapped in efi_allocate_pages so long as LMB
agrees that it's free. This aligns with my understanding of the UEFI spec as
well. I dumped the EFI memory map and noticed there were 2 fragmented sections
of EFI_CONVENTIONAL_MEMORY that it could still use.
Wired up efi_allocate_pages to go to those regions and attempt to allocate from
there in the even an LMB_MEM_ALLOC_MAX or LMB_MEM_ALLOC_ANY start failing. Seems
to have worked, but now I'm seeing the following reported in the kernel:
[ 0.048167] [Firmware Bug]: Unable to handle paging request in EFI runtime service
[ 0.048246] ------------[ cut here ]------------
[ 0.048249] WARNING: CPU: 0 PID: 1 at /usr/src/kernel/drivers/firmware/efi/runtime-wrappers.c:341 __efi_queue_work+0xd4/0x108
[ 0.048270] Modules linked in:
[ 0.048285] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G I 6.18.13-ti-00636-g30182cf3ac7d-dirty #1 PREEMPT
[ 0.048296] Tainted: [I]=FIRMWARE_WORKAROUND
[ 0.048299] Hardware name: beagle BeagleBoard.org PocketBeagle2/BeagleBoard.org PocketBeagle2, BIOS 2026.04-rc5-00003-gf1dace477fb8-dirty 04/01/2026
[ 0.048305] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 0.048312] pc : __efi_queue_work+0xd4/0x108
[ 0.048318] lr : __efi_queue_work+0xc0/0x108
[ 0.048323] sp : ffff80008003bc80
[ 0.048326] x29: ffff80008003bc80 x28: ffffad05b176bad4 x27: ffffad05b16b00ac
[ 0.048336] x26: ffffad05b1622e60 x25: ffffad05b1953000 x24: ffffad05b1749050
[ 0.048345] x23: 0000000000000004 x22: ffff80008003bd1e x21: ffff80008003bd20
[ 0.048353] x20: ffff80008003bd28 x19: ffffad05b19cd5d8 x18: fffffffffffe2f20
[ 0.048362] x17: 0000000000007000 x16: ffff000001c065a0 x15: 0000000000000000
[ 0.048370] x14: 000000000000008a x13: ffff000001cf8090 x12: 0000000000000001
[ 0.048379] x11: 00000000000000c0 x10: 00000000000009f0 x9 : ffff80008003bad0
[ 0.048387] x8 : ffff000001cf8a50 x7 : 0000000000000001 x6 : 0000000000000001
[ 0.048395] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000001
[ 0.048403] x2 : 0000000000000000 x1 : 8000000000000015 x0 : 8000000000000015
[ 0.048413] Call trace:
[ 0.048417] __efi_queue_work+0xd4/0x108 (P)
[ 0.048426] virt_efi_get_next_variable+0x5c/0xac
[ 0.048434] efisubsys_init+0x148/0x390
[ 0.048444] do_one_initcall+0x60/0x1d4
[ 0.048457] kernel_init_freeable+0x248/0x2c4
[ 0.048468] kernel_init+0x20/0x140
[ 0.048478] ret_from_fork+0x10/0x20
[ 0.048489] ---[ end trace 0000000000000000 ]---
U-boot itself doesn't report any errors, so I want to assume this is probably a
configuration issue regarding something else I've forgotten to add.
Anyone got any quick/obvious comments before I start digging through more of
that? Was my assumption about EFI_CONVENTIONAL_MEMORY incorrect? Is this, as
unlikely as I think it is, actually just a known issue right now?
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-26 23:23 ` Randolph Sapp
@ 2026-03-27 14:25 ` Marko Mäkelä
2026-03-27 14:53 ` Robert Nelson
2026-03-30 23:57 ` Randolph Sapp
1 sibling, 1 reply; 23+ messages in thread
From: Marko Mäkelä @ 2026-03-27 14:25 UTC (permalink / raw)
To: Randolph Sapp
Cc: Robert Nelson, Erik Welsh, Anshul Dalal, bb, nm, trini, afd,
u-boot
Thu, Mar 26, 2026 at 06:23:20PM -0500, Randolph Sapp wrote:
[snip]
>Alright, looking into the allocation helpers it seems that
>EFI_CONVENTIONAL_MEMORY can be remapped in efi_allocate_pages so long as LMB
>agrees that it's free. This aligns with my understanding of the UEFI spec as
>well. I dumped the EFI memory map and noticed there were 2 fragmented sections
>of EFI_CONVENTIONAL_MEMORY that it could still use.
>
>Wired up efi_allocate_pages to go to those regions and attempt to allocate from
>there in the even an LMB_MEM_ALLOC_MAX or LMB_MEM_ALLOC_ANY start failing. Seems
>to have worked, but now I'm seeing the following reported in the kernel:
[snip]
I can't help with that, but I hope that someone can. Because I intend to
work on improvements related to secure boot and FIT verification, having
this board working in the current u-boot would be really great. I'm
looking forward to test a revised patch set.
Coincidentally, I just got a PocketBeagle 2 yesterday. It took a while
for me to find some useful u-boot source code. I came across
https://github.com/beagleboard/u-boot/commit/64be5e474943dc5c6e6e01edc124ff6f53f616a4
which is a few changes ahead of u-boot:
64be5e47494 arm: dts: k3-am62-r5-pocketbeagle2: remove chosen uart override
e1207aad9b0 arm: dts: k3-am62-pocketbeagle2: add boot phase flag to uart6
23f9fc5d6da arm: mach-k3: am62: add &main_uart6 to clock and pwr tree
156a9bb1410 add: k3-am62-pocketbeagle2
On a merge to the current u-boot master, I discarded a change to
k3_get_a53_max_frequency(void) by 156a9bb1410 because that function has
been replaced with am62p_map[]. In that array, the clock rates for the
speed grades S,T,U,V would conflict with patch. I don't expect this to
be essential, but I thought that I would mention it because there were
no adjustments to the speed grade in this patch set.
With best regards,
Marko
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-27 14:25 ` Marko Mäkelä
@ 2026-03-27 14:53 ` Robert Nelson
2026-03-27 19:15 ` Marko Mäkelä
0 siblings, 1 reply; 23+ messages in thread
From: Robert Nelson @ 2026-03-27 14:53 UTC (permalink / raw)
To: Marko Mäkelä
Cc: Randolph Sapp, Erik Welsh, Anshul Dalal, bb, nm, trini, afd,
u-boot
On Fri, Mar 27, 2026 at 9:25 AM Marko Mäkelä <marko.makela@iki.fi> wrote:
>
> Thu, Mar 26, 2026 at 06:23:20PM -0500, Randolph Sapp wrote:
> [snip]
> >Alright, looking into the allocation helpers it seems that
> >EFI_CONVENTIONAL_MEMORY can be remapped in efi_allocate_pages so long as LMB
> >agrees that it's free. This aligns with my understanding of the UEFI spec as
> >well. I dumped the EFI memory map and noticed there were 2 fragmented sections
> >of EFI_CONVENTIONAL_MEMORY that it could still use.
> >
> >Wired up efi_allocate_pages to go to those regions and attempt to allocate from
> >there in the even an LMB_MEM_ALLOC_MAX or LMB_MEM_ALLOC_ANY start failing. Seems
> >to have worked, but now I'm seeing the following reported in the kernel:
> [snip]
>
> I can't help with that, but I hope that someone can. Because I intend to
> work on improvements related to secure boot and FIT verification, having
> this board working in the current u-boot would be really great. I'm
> looking forward to test a revised patch set.
>
> Coincidentally, I just got a PocketBeagle 2 yesterday. It took a while
> for me to find some useful u-boot source code. I came across
> https://github.com/beagleboard/u-boot/commit/64be5e474943dc5c6e6e01edc124ff6f53f616a4
> which is a few changes ahead of u-boot:
>
> 64be5e47494 arm: dts: k3-am62-r5-pocketbeagle2: remove chosen uart override
> e1207aad9b0 arm: dts: k3-am62-pocketbeagle2: add boot phase flag to uart6
> 23f9fc5d6da arm: mach-k3: am62: add &main_uart6 to clock and pwr tree
> 156a9bb1410 add: k3-am62-pocketbeagle2
>
> On a merge to the current u-boot master, I discarded a change to
> k3_get_a53_max_frequency(void) by 156a9bb1410 because that function has
> been replaced with am62p_map[]. In that array, the clock rates for the
> speed grades S,T,U,V would conflict with patch. I don't expect this to
> be essential, but I thought that I would mention it because there were
> no adjustments to the speed grade in this patch set.
Marko, here's my last wip, before Randolph submitted:
https://github.com/beagleboard/u-boot/tree/v2026.01-am62-pocketbeagle2
v2026.04-rc* has had more TI changes for low-memory (512MB) devices
hitting mainline so things have changed again to work around k3
stuff..
Regards,
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-27 14:53 ` Robert Nelson
@ 2026-03-27 19:15 ` Marko Mäkelä
2026-03-28 8:18 ` Marko Mäkelä
0 siblings, 1 reply; 23+ messages in thread
From: Marko Mäkelä @ 2026-03-27 19:15 UTC (permalink / raw)
To: Robert Nelson
Cc: Randolph Sapp, Erik Welsh, Anshul Dalal, bb, nm, trini, afd,
u-boot
Fri, Mar 27, 2026 at 09:53:03AM -0500, Robert Nelson wrote:
>On Fri, Mar 27, 2026 at 9:25 AM Marko Mäkelä <marko.makela@iki.fi> wrote:
>Marko, here's my last wip, before Randolph submitted:
>https://github.com/beagleboard/u-boot/tree/v2026.01-am62-pocketbeagle2
Thank you. I was able to merge it to the current master and build it,
but that of course does not guarantee that it would actually work. I
guess that it wouldn't, and I should for now try out your branch as is.
But I did not get that far yet.
To get a somewhat predictable starting point, I downloaded
pocketbeagle2-debian-13.3-base-v6.12-arm64-2026-02-12-8gb.img.xz on a
MicroSD card. It booted straight to Debian; I could access it via the
USB Ethernet and /dev/ttyACM0 endpoints as noted in
https://docs.beagle.cc/boards/pocketbeagle-2/02-quick-start.html.
Can you help me enable the USB serial console, first for u-boot and
subsequently for the Linux console? Would I have to hold a button while
starting it up, or would I need some special u-boot configuration
option, or remove one of the files so that the autoboot would fail? Some
months ago I used a phyBOARD Lyra (phycore_am62x_*_defconfig), and it
was a rather well documented procedure with that one.
Best regards,
Marko
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-27 19:15 ` Marko Mäkelä
@ 2026-03-28 8:18 ` Marko Mäkelä
2026-03-28 16:39 ` Robert Nelson
0 siblings, 1 reply; 23+ messages in thread
From: Marko Mäkelä @ 2026-03-28 8:18 UTC (permalink / raw)
To: Robert Nelson
Cc: Randolph Sapp, Erik Welsh, Anshul Dalal, bb, nm, trini, afd,
u-boot
Hi Robert,
Fri, Mar 27, 2026 at 09:15:35PM +0200, Marko Mäkelä wrote:
[snip]
>Can you help me enable the USB serial console, first for u-boot and
>subsequently for the Linux console?
I just found your reply on this topic:
https://forum.beagleboard.org/t/pocketbeagle2-with-techlab-cape-usb-to-serial/42940
So, I must wire a 3.3V UART to a JST SH 1.0 mm 3 Pin connector and plug
it in on the opposite side of the USB-C connector.
Marko
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-28 8:18 ` Marko Mäkelä
@ 2026-03-28 16:39 ` Robert Nelson
2026-03-29 17:13 ` Marko Mäkelä
0 siblings, 1 reply; 23+ messages in thread
From: Robert Nelson @ 2026-03-28 16:39 UTC (permalink / raw)
To: Marko Mäkelä
Cc: Randolph Sapp, Erik Welsh, Anshul Dalal, bb, nm, trini, afd,
u-boot
On Sat, Mar 28, 2026 at 3:18 AM Marko Mäkelä <marko.makela@iki.fi> wrote:
>
> Hi Robert,
>
> Fri, Mar 27, 2026 at 09:15:35PM +0200, Marko Mäkelä wrote:
> [snip]
> >Can you help me enable the USB serial console, first for u-boot and
> >subsequently for the Linux console?
>
> I just found your reply on this topic:
> https://forum.beagleboard.org/t/pocketbeagle2-with-techlab-cape-usb-to-serial/42940
>
> So, I must wire a 3.3V UART to a JST SH 1.0 mm 3 Pin connector and plug
> it in on the opposite side of the USB-C connector.
Side note, here's my ci builder for u-boot.. :
https://github.com/beagleboard/u-boot-pocketbeagle2
For debug, if you have access to them, grab the Raspberry PI debug
cable: https://www.digikey.com/en/products/detail/raspberry-pi/SC0889/17877576
and they are available globally..
The JST will plug right in..
Regards,
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-28 16:39 ` Robert Nelson
@ 2026-03-29 17:13 ` Marko Mäkelä
2026-03-30 14:41 ` Robert Nelson
0 siblings, 1 reply; 23+ messages in thread
From: Marko Mäkelä @ 2026-03-29 17:13 UTC (permalink / raw)
To: Robert Nelson
Cc: Randolph Sapp, Erik Welsh, Anshul Dalal, bb, nm, trini, afd,
u-boot
Hi Robert,
Sat, Mar 28, 2026 at 11:39:00AM -0500, Robert Nelson wrote:
>Side note, here's my ci builder for u-boot.. :
>https://github.com/beagleboard/u-boot-pocketbeagle2
Thank you. I see that the build_u-boot.sh is fetching trusted-firmware-a
from a different source than I am (see below).
>For debug, if you have access to them, grab the Raspberry PI debug
>cable:
>https://www.digikey.com/en/products/detail/raspberry-pi/SC0889/17877576
>and they are available globally..
Yesterday, a friend gave me an adapter cable that allows me to use an
existing 3.3V compatible USB UART adapter.
When using the pristine PocketBeagle 2 MicroSD card image, I will get
some messages from U-boot, followed by the console output from the Linux
kernel and finally from the Debian user space.
With any of my self-built images, the SPL is unable to start the 64-bit
U-boot:
U-Boot SPL 2026.01 (Mar 29 2026 - 15:56:33 +0000)
SYSFW ABI: 4.0 (firmware rev 0x000c '12.0.2--v12.00.02 (Clever Cat)')
Changed A53 CPU frequency to 1400000000Hz (T grade) in DT
SPL initial stack usage: 13416 bytes
Trying to boot from MMC2
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Authentication passed
Starting ATF on ARM64 core...
I had a working build script for the phyBOARD Lyra, which I have
slightly modified for this experiment. I have a build container that was
set up some months ago, as follows:
FROM debian:latest
RUN apt update&&apt install -y build-essential bc flex bison libssl-dev kmod \
binutils-multiarch gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf \
python3 python3-setuptools python3-dev python3-cryptography \
python3-pyelftools python3-yaml yamllint python3-jsonschema swig gnutls-dev
I set up source directories like this:
[ -d u-boot ] ||
git clone --depth=1 -b master https://source.denx.de/u-boot/u-boot.git \
u-boot
[ -d trusted-firmware-a ] ||
git clone --depth=1 -b master \
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ \
trusted-firmware-a
[ -d optee_os ] ||
git clone --depth=1 -b master https://github.com/OP-TEE/optee_os.git \
optee_os
[ -d ti-linux-firmware ] ||
git clone --depth=1 -b ti-linux-firmware \
https://git.ti.com/git/processor-firmware/ti-linux-firmware.git \
ti-linux-firmware
Initially, I used some older checkouts of the other components.
Updating them to the latest did not make any difference: the SPL was
able to start up also with the older snapshots.
Here are the git revisions that I used of the above directories:
u-boot: your ef03e35488377a32cdd4f76d1a03ef7f60c798ef
trusted-firmware-a: 8dae0862c502e08568a61a1050091fa9357f1240 (Mar 23)
optee_os: 1c0c7c06563e9be0ebc55b47cdb71422b02906a6 (Mar 23)
ti-linux-firmware: 12.00.00.07 (Mar 20)
For podman run, I am bind-mounting the source directory tree using the
:O (overlay) option. So, even though I appear to run "in-source" build,
the original source directories outside the container will remain
unchanged. The files tiboot3.bin, tispl.bin, and u-boot.img are
generated by running the following commands inside the container:
make -j$(nproc) -C trusted-firmware-a CROSS_COMPILE=aarch64-linux-gnu- \
ARCH=aarch64 PLAT=k3 SPD=opteed TARGET_BOARD=lite
make -j$(nproc) -C optee_os CROSS_COMPILE=arm-linux-gnueabihf- \
CROSS_COMPILE64=aarch64-linux-gnu- CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y \
PLATFORM=k3-am62x
cd u-boot
make am62_pocketbeagle2_r5_defconfig &&
make -j$(nproc) CROSS_COMPILE=arm-linux-gnueabihf- \
BINMAN_INDIRS=$(pwd)/../ti-linux-firmware &&
make am62_pocketbeagle2_a53_defconfig &&
make -j$(nproc) CROSS_COMPILE=aarch64-linux-gnu- \
BINMAN_INDIRS=$(pwd)/../ti-linux-firmware \
BL31=$(pwd)/../trusted-firmware-a/build/k3/lite/release/bl31.bin \
TEE=$(pwd)/../optee_os/out/arm-plat-k3/core/tee-raw.bin
Based on reviewing your build script, I revised the above by adding
TFA_EXTRA_ARGS=K3_USART_0x6 to trusted-firmware-a and
CFG_CONSOLE_UART=0x6 to optee_os, but they made no difference.
Furthermore, I replaced tee-raw.bin with tee-pager_v2.bin: no change.
What am I doing wrong here?
With best regards,
Marko
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-29 17:13 ` Marko Mäkelä
@ 2026-03-30 14:41 ` Robert Nelson
0 siblings, 0 replies; 23+ messages in thread
From: Robert Nelson @ 2026-03-30 14:41 UTC (permalink / raw)
To: Marko Mäkelä
Cc: Randolph Sapp, Erik Welsh, Anshul Dalal, bb, nm, trini, afd,
u-boot
Add the magic numbers i got from Bryan at ti..
> Here are the git revisions that I used of the above directories:
>
> u-boot: your ef03e35488377a32cdd4f76d1a03ef7f60c798ef
> trusted-firmware-a: 8dae0862c502e08568a61a1050091fa9357f1240 (Mar 23)
> optee_os: 1c0c7c06563e9be0ebc55b47cdb71422b02906a6 (Mar 23)
> ti-linux-firmware: 12.00.00.07 (Mar 20)
I'm just on tagged releases, will bump later..
>
> For podman run, I am bind-mounting the source directory tree using the
> :O (overlay) option. So, even though I appear to run "in-source" build,
> the original source directories outside the container will remain
> unchanged. The files tiboot3.bin, tispl.bin, and u-boot.img are
> generated by running the following commands inside the container:
>
> make -j$(nproc) -C trusted-firmware-a CROSS_COMPILE=aarch64-linux-gnu- \
> ARCH=aarch64 PLAT=k3 SPD=opteed TARGET_BOARD=lite
TFA: add: `K3_USART=0x6 BL32_BASE=0x80080000 PRELOADED_BL33_BASE=0x82000000`
>
> make -j$(nproc) -C optee_os CROSS_COMPILE=arm-linux-gnueabihf- \
> CROSS_COMPILE64=aarch64-linux-gnu- CFG_ARM64_core=y CFG_WITH_SOFTWARE_PRNG=y \
> PLATFORM=k3-am62x
optee add: `CFG_CONSOLE_UART=0x6 CFG_TZDRAM_START=0x80080000 `
CFG_WITH_SOFTWARE_PRNG can be removed
>
> cd u-boot
> make am62_pocketbeagle2_r5_defconfig &&
> make -j$(nproc) CROSS_COMPILE=arm-linux-gnueabihf- \
> BINMAN_INDIRS=$(pwd)/../ti-linux-firmware &&
>
> make am62_pocketbeagle2_a53_defconfig &&
> make -j$(nproc) CROSS_COMPILE=aarch64-linux-gnu- \
> BINMAN_INDIRS=$(pwd)/../ti-linux-firmware \
> BL31=$(pwd)/../trusted-firmware-a/build/k3/lite/release/bl31.bin \
> TEE=$(pwd)/../optee_os/out/arm-plat-k3/core/tee-raw.bin
>
> Based on reviewing your build script, I revised the above by adding
> TFA_EXTRA_ARGS=K3_USART_0x6 to trusted-firmware-a and
> CFG_CONSOLE_UART=0x6 to optee_os, but they made no difference.
> Furthermore, I replaced tee-raw.bin with tee-pager_v2.bin: no change.
>
> What am I doing wrong here?
>
> With best regards,
>
> Marko
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-26 23:23 ` Randolph Sapp
2026-03-27 14:25 ` Marko Mäkelä
@ 2026-03-30 23:57 ` Randolph Sapp
2026-03-31 16:13 ` Robert Nelson
1 sibling, 1 reply; 23+ messages in thread
From: Randolph Sapp @ 2026-03-30 23:57 UTC (permalink / raw)
To: Randolph Sapp, Robert Nelson, Erik Welsh
Cc: Anshul Dalal, bb, nm, trini, afd, u-boot
On Thu Mar 26, 2026 at 6:23 PM CDT, Randolph Sapp wrote:
> On Wed Mar 25, 2026 at 7:34 PM CDT, Randolph Sapp wrote:
>> On Mon Mar 23, 2026 at 2:46 PM CDT, Robert Nelson wrote:
>>> On Mon, Mar 23, 2026 at 2:37 PM Randolph Sapp <rs@ti.com> wrote:
>>>> On Fri Mar 20, 2026 at 10:32 AM CDT, Robert Nelson wrote:
>>>> >> > +++ b/configs/am62_pocketbeagle2_a53_defconfig
>>>> >> > @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
>>>> >> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
>>>> >> > CONFIG_NR_DRAM_BANKS=1
>>>> >> > CONFIG_SOC_K3_AM625=y
>> [snip]
>>>> >> > @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
>>>> >> > CONFIG_EXT4_WRITE=y
>>>> >> > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>>>> >> > CONFIG_LZO=y
>>>> >> > -CONFIG_EFI_SET_TIME=y
>>>> >> > +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
>>>> >>
>>>> >> Any reason why we are using TOP_HIDE here instead of just moving OPTEE
>>>> >> lower in DDR like we do on the 512MiB AM6254atl EVM?
>>>> >
>>>> > Sorry, that is now a legacy setting before OPTEE finally got moved in
>>>> > v2026.01, as this had been developed thru v2025 u-boot releases..
>>>> >
>>>>
>>>> Well, it's worth noting that this change was not done in the usual way, and
>>>> involves user interaction during the build beyond selecting a defconfig.
>>>>
>>>> https://texasinstruments.github.io/processor-sdk-doc/processor-sdk-linux-AM62X/esd/docs/master/linux/Foundational_Components_ATF.html
>>>> https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-bsp/conf/machine/am62xxsip-evm.conf
>>>>
>>>> Robert, are you alright with me making the requested changes?
>>>
>>> I guess as long as we document it. I know the Octavo OSD62-sip @Erik
>>> Welsh will also be building on both am62xxsip and pocketbeagle2 based
>>> on the 512MB and then larger memory sizes (1G, 2G, etc.).
>>>
>>> Regards,
>>
>> Oh boy, adjusting the memory maps kept getting me out of memory errors in the
>> EFI flow that I knew should not be true. Found something fun: LMB reserved
>> memory regions do not match EFI reserved memory regions. EFI's
>> efi_carve_out_dt_rsv is setting regions to be more strict that LMB's base
>> requirements. When this occurs and an allocation runs into this discrepancy,
>> that allocation and all future allocation requests in the EFI flow will begin to
>> fail as they are repeatedly given the same LMB start address in the unapproved
>> region.
>>
>> Randolph
>
> Alright, looking into the allocation helpers it seems that
> EFI_CONVENTIONAL_MEMORY can be remapped in efi_allocate_pages so long as LMB
> agrees that it's free. This aligns with my understanding of the UEFI spec as
> well. I dumped the EFI memory map and noticed there were 2 fragmented sections
> of EFI_CONVENTIONAL_MEMORY that it could still use.
>
> Wired up efi_allocate_pages to go to those regions and attempt to allocate from
> there in the even an LMB_MEM_ALLOC_MAX or LMB_MEM_ALLOC_ANY start failing. Seems
> to have worked, but now I'm seeing the following reported in the kernel:
>
> [ 0.048167] [Firmware Bug]: Unable to handle paging request in EFI runtime service
> [ 0.048246] ------------[ cut here ]------------
> [ 0.048249] WARNING: CPU: 0 PID: 1 at /usr/src/kernel/drivers/firmware/efi/runtime-wrappers.c:341 __efi_queue_work+0xd4/0x108
> [ 0.048270] Modules linked in:
> [ 0.048285] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G I 6.18.13-ti-00636-g30182cf3ac7d-dirty #1 PREEMPT
> [ 0.048296] Tainted: [I]=FIRMWARE_WORKAROUND
> [ 0.048299] Hardware name: beagle BeagleBoard.org PocketBeagle2/BeagleBoard.org PocketBeagle2, BIOS 2026.04-rc5-00003-gf1dace477fb8-dirty 04/01/2026
> [ 0.048305] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [ 0.048312] pc : __efi_queue_work+0xd4/0x108
> [ 0.048318] lr : __efi_queue_work+0xc0/0x108
> [ 0.048323] sp : ffff80008003bc80
> [ 0.048326] x29: ffff80008003bc80 x28: ffffad05b176bad4 x27: ffffad05b16b00ac
> [ 0.048336] x26: ffffad05b1622e60 x25: ffffad05b1953000 x24: ffffad05b1749050
> [ 0.048345] x23: 0000000000000004 x22: ffff80008003bd1e x21: ffff80008003bd20
> [ 0.048353] x20: ffff80008003bd28 x19: ffffad05b19cd5d8 x18: fffffffffffe2f20
> [ 0.048362] x17: 0000000000007000 x16: ffff000001c065a0 x15: 0000000000000000
> [ 0.048370] x14: 000000000000008a x13: ffff000001cf8090 x12: 0000000000000001
> [ 0.048379] x11: 00000000000000c0 x10: 00000000000009f0 x9 : ffff80008003bad0
> [ 0.048387] x8 : ffff000001cf8a50 x7 : 0000000000000001 x6 : 0000000000000001
> [ 0.048395] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000001
> [ 0.048403] x2 : 0000000000000000 x1 : 8000000000000015 x0 : 8000000000000015
> [ 0.048413] Call trace:
> [ 0.048417] __efi_queue_work+0xd4/0x108 (P)
> [ 0.048426] virt_efi_get_next_variable+0x5c/0xac
> [ 0.048434] efisubsys_init+0x148/0x390
> [ 0.048444] do_one_initcall+0x60/0x1d4
> [ 0.048457] kernel_init_freeable+0x248/0x2c4
> [ 0.048468] kernel_init+0x20/0x140
> [ 0.048478] ret_from_fork+0x10/0x20
> [ 0.048489] ---[ end trace 0000000000000000 ]---
>
> U-boot itself doesn't report any errors, so I want to assume this is probably a
> configuration issue regarding something else I've forgotten to add.
>
> Anyone got any quick/obvious comments before I start digging through more of
> that? Was my assumption about EFI_CONVENTIONAL_MEMORY incorrect? Is this, as
> unlikely as I think it is, actually just a known issue right now?
Ugh, that took longer than it should have. Alright, what I did would have been
correct if there weren't a few issues with other things. Primarily, this memory
map for the am6254atl. The U-Boot stack overlaps 2 regions we carve out in
device tree. LMB doesn't actually inform the user of this, and just keeps
trucking, thinking that the general u-boot reservation will be good enough.
Eventually, when some of the stack can be reclaimed, we will put some useful
things in these regions that were never properly reserved.
What was driving me crazy was that the efiboot selftest reported that everything
was okay except for the device tree region. Fun, what could have changed that?
Well, that's just efi_carve_out_dt_rsv going back and trying to enforce things
LMB never did.
Somehow we got it perfectly where copy_fdt would place the device tree squarely
in a region that was reserved by the device tree itself. Anything else wouldn't
have been exposed to the user.
So, I assume that kernel warning is actually a result of some EFI regions being
reclaimed by efi_carve_out_dt_rsv and the runtime blowing up because what it
thought was a valid address is now in some reserved region.
I've checked and am6254atl is also not able to reserve the
wkup_r5fss0_core0_memory_region (0x9db00000) at startup due to the u-boot stack
size. A ram top value of 0xa0000000 doesn't work with these reservations.
Adjusting the CONFIG_STACK_SIZE won't help here, as it u-boot naturally extends
into the wkup_r5fss0_core0_memory_region on it's own. I was seeing a stack size
of 0x22184c0 locally at the time reservations were being setup.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-30 23:57 ` Randolph Sapp
@ 2026-03-31 16:13 ` Robert Nelson
2026-03-31 22:54 ` Randolph Sapp
0 siblings, 1 reply; 23+ messages in thread
From: Robert Nelson @ 2026-03-31 16:13 UTC (permalink / raw)
To: Randolph Sapp, Ayush Singh
Cc: Erik Welsh, Anshul Dalal, bb, nm, trini, afd, u-boot
adding @Ayush Singh too...
On Mon, Mar 30, 2026 at 6:57 PM Randolph Sapp <rs@ti.com> wrote:
>
> On Thu Mar 26, 2026 at 6:23 PM CDT, Randolph Sapp wrote:
> > On Wed Mar 25, 2026 at 7:34 PM CDT, Randolph Sapp wrote:
> >> On Mon Mar 23, 2026 at 2:46 PM CDT, Robert Nelson wrote:
> >>> On Mon, Mar 23, 2026 at 2:37 PM Randolph Sapp <rs@ti.com> wrote:
> >>>> On Fri Mar 20, 2026 at 10:32 AM CDT, Robert Nelson wrote:
> >>>> >> > +++ b/configs/am62_pocketbeagle2_a53_defconfig
> >>>> >> > @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
> >>>> >> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
> >>>> >> > CONFIG_NR_DRAM_BANKS=1
> >>>> >> > CONFIG_SOC_K3_AM625=y
> >> [snip]
> >>>> >> > @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
> >>>> >> > CONFIG_EXT4_WRITE=y
> >>>> >> > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> >>>> >> > CONFIG_LZO=y
> >>>> >> > -CONFIG_EFI_SET_TIME=y
> >>>> >> > +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
> >>>> >>
> >>>> >> Any reason why we are using TOP_HIDE here instead of just moving OPTEE
> >>>> >> lower in DDR like we do on the 512MiB AM6254atl EVM?
> >>>> >
> >>>> > Sorry, that is now a legacy setting before OPTEE finally got moved in
> >>>> > v2026.01, as this had been developed thru v2025 u-boot releases..
> >>>> >
> >>>>
> >>>> Well, it's worth noting that this change was not done in the usual way, and
> >>>> involves user interaction during the build beyond selecting a defconfig.
> >>>>
> >>>> https://texasinstruments.github.io/processor-sdk-doc/processor-sdk-linux-AM62X/esd/docs/master/linux/Foundational_Components_ATF.html
> >>>> https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-bsp/conf/machine/am62xxsip-evm.conf
> >>>>
> >>>> Robert, are you alright with me making the requested changes?
> >>>
> >>> I guess as long as we document it. I know the Octavo OSD62-sip @Erik
> >>> Welsh will also be building on both am62xxsip and pocketbeagle2 based
> >>> on the 512MB and then larger memory sizes (1G, 2G, etc.).
> >>>
> >>> Regards,
> >>
> >> Oh boy, adjusting the memory maps kept getting me out of memory errors in the
> >> EFI flow that I knew should not be true. Found something fun: LMB reserved
> >> memory regions do not match EFI reserved memory regions. EFI's
> >> efi_carve_out_dt_rsv is setting regions to be more strict that LMB's base
> >> requirements. When this occurs and an allocation runs into this discrepancy,
> >> that allocation and all future allocation requests in the EFI flow will begin to
> >> fail as they are repeatedly given the same LMB start address in the unapproved
> >> region.
> >>
> >> Randolph
> >
> > Alright, looking into the allocation helpers it seems that
> > EFI_CONVENTIONAL_MEMORY can be remapped in efi_allocate_pages so long as LMB
> > agrees that it's free. This aligns with my understanding of the UEFI spec as
> > well. I dumped the EFI memory map and noticed there were 2 fragmented sections
> > of EFI_CONVENTIONAL_MEMORY that it could still use.
> >
> > Wired up efi_allocate_pages to go to those regions and attempt to allocate from
> > there in the even an LMB_MEM_ALLOC_MAX or LMB_MEM_ALLOC_ANY start failing. Seems
> > to have worked, but now I'm seeing the following reported in the kernel:
> >
> > [ 0.048167] [Firmware Bug]: Unable to handle paging request in EFI runtime service
> > [ 0.048246] ------------[ cut here ]------------
> > [ 0.048249] WARNING: CPU: 0 PID: 1 at /usr/src/kernel/drivers/firmware/efi/runtime-wrappers.c:341 __efi_queue_work+0xd4/0x108
> > [ 0.048270] Modules linked in:
> > [ 0.048285] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G I 6.18.13-ti-00636-g30182cf3ac7d-dirty #1 PREEMPT
> > [ 0.048296] Tainted: [I]=FIRMWARE_WORKAROUND
> > [ 0.048299] Hardware name: beagle BeagleBoard.org PocketBeagle2/BeagleBoard.org PocketBeagle2, BIOS 2026.04-rc5-00003-gf1dace477fb8-dirty 04/01/2026
> > [ 0.048305] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> > [ 0.048312] pc : __efi_queue_work+0xd4/0x108
> > [ 0.048318] lr : __efi_queue_work+0xc0/0x108
> > [ 0.048323] sp : ffff80008003bc80
> > [ 0.048326] x29: ffff80008003bc80 x28: ffffad05b176bad4 x27: ffffad05b16b00ac
> > [ 0.048336] x26: ffffad05b1622e60 x25: ffffad05b1953000 x24: ffffad05b1749050
> > [ 0.048345] x23: 0000000000000004 x22: ffff80008003bd1e x21: ffff80008003bd20
> > [ 0.048353] x20: ffff80008003bd28 x19: ffffad05b19cd5d8 x18: fffffffffffe2f20
> > [ 0.048362] x17: 0000000000007000 x16: ffff000001c065a0 x15: 0000000000000000
> > [ 0.048370] x14: 000000000000008a x13: ffff000001cf8090 x12: 0000000000000001
> > [ 0.048379] x11: 00000000000000c0 x10: 00000000000009f0 x9 : ffff80008003bad0
> > [ 0.048387] x8 : ffff000001cf8a50 x7 : 0000000000000001 x6 : 0000000000000001
> > [ 0.048395] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000001
> > [ 0.048403] x2 : 0000000000000000 x1 : 8000000000000015 x0 : 8000000000000015
> > [ 0.048413] Call trace:
> > [ 0.048417] __efi_queue_work+0xd4/0x108 (P)
> > [ 0.048426] virt_efi_get_next_variable+0x5c/0xac
> > [ 0.048434] efisubsys_init+0x148/0x390
> > [ 0.048444] do_one_initcall+0x60/0x1d4
> > [ 0.048457] kernel_init_freeable+0x248/0x2c4
> > [ 0.048468] kernel_init+0x20/0x140
> > [ 0.048478] ret_from_fork+0x10/0x20
> > [ 0.048489] ---[ end trace 0000000000000000 ]---
> >
> > U-boot itself doesn't report any errors, so I want to assume this is probably a
> > configuration issue regarding something else I've forgotten to add.
> >
> > Anyone got any quick/obvious comments before I start digging through more of
> > that? Was my assumption about EFI_CONVENTIONAL_MEMORY incorrect? Is this, as
> > unlikely as I think it is, actually just a known issue right now?
>
> Ugh, that took longer than it should have. Alright, what I did would have been
> correct if there weren't a few issues with other things. Primarily, this memory
> map for the am6254atl. The U-Boot stack overlaps 2 regions we carve out in
> device tree. LMB doesn't actually inform the user of this, and just keeps
> trucking, thinking that the general u-boot reservation will be good enough.
>
> Eventually, when some of the stack can be reclaimed, we will put some useful
> things in these regions that were never properly reserved.
>
> What was driving me crazy was that the efiboot selftest reported that everything
> was okay except for the device tree region. Fun, what could have changed that?
> Well, that's just efi_carve_out_dt_rsv going back and trying to enforce things
> LMB never did.
>
> Somehow we got it perfectly where copy_fdt would place the device tree squarely
> in a region that was reserved by the device tree itself. Anything else wouldn't
> have been exposed to the user.
>
> So, I assume that kernel warning is actually a result of some EFI regions being
> reclaimed by efi_carve_out_dt_rsv and the runtime blowing up because what it
> thought was a valid address is now in some reserved region.
>
> I've checked and am6254atl is also not able to reserve the
> wkup_r5fss0_core0_memory_region (0x9db00000) at startup due to the u-boot stack
> size. A ram top value of 0xa0000000 doesn't work with these reservations.
>
> Adjusting the CONFIG_STACK_SIZE won't help here, as it u-boot naturally extends
> into the wkup_r5fss0_core0_memory_region on it's own. I was seeing a stack size
> of 0x22184c0 locally at the time reservations were being setup.
Ayush is dealing with Zephyr fallout too. I'm wondering if we are
doing too many dynamic memory moves. Do we need to start hard-coding
some of these memory regions in device-tree and then load the 512MB or
1GB memory settings starting in A53 SPL?
Regards,
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support
2026-03-31 16:13 ` Robert Nelson
@ 2026-03-31 22:54 ` Randolph Sapp
0 siblings, 0 replies; 23+ messages in thread
From: Randolph Sapp @ 2026-03-31 22:54 UTC (permalink / raw)
To: Robert Nelson, Randolph Sapp, Ayush Singh
Cc: Erik Welsh, Anshul Dalal, bb, nm, trini, afd, u-boot
On Tue Mar 31, 2026 at 11:13 AM CDT, Robert Nelson wrote:
> adding @Ayush Singh too...
>
> On Mon, Mar 30, 2026 at 6:57 PM Randolph Sapp <rs@ti.com> wrote:
>>
>> On Thu Mar 26, 2026 at 6:23 PM CDT, Randolph Sapp wrote:
>> > On Wed Mar 25, 2026 at 7:34 PM CDT, Randolph Sapp wrote:
>> >> On Mon Mar 23, 2026 at 2:46 PM CDT, Robert Nelson wrote:
>> >>> On Mon, Mar 23, 2026 at 2:37 PM Randolph Sapp <rs@ti.com> wrote:
>> >>>> On Fri Mar 20, 2026 at 10:32 AM CDT, Robert Nelson wrote:
>> >>>> >> > +++ b/configs/am62_pocketbeagle2_a53_defconfig
>> >>>> >> > @@ -6,11 +6,11 @@ CONFIG_SPL_LIBCOMMON_SUPPORT=y
>> >>>> >> > CONFIG_SPL_LIBGENERIC_SUPPORT=y
>> >>>> >> > CONFIG_NR_DRAM_BANKS=1
>> >>>> >> > CONFIG_SOC_K3_AM625=y
>> >> [snip]
>> >>>> >> > @@ -120,7 +115,8 @@ CONFIG_SYSRESET_TI_SCI=y
>> >>>> >> > CONFIG_EXT4_WRITE=y
>> >>>> >> > CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
>> >>>> >> > CONFIG_LZO=y
>> >>>> >> > -CONFIG_EFI_SET_TIME=y
>> >>>> >> > +CONFIG_SYS_MEM_TOP_HIDE=0x4000000
>> >>>> >>
>> >>>> >> Any reason why we are using TOP_HIDE here instead of just moving OPTEE
>> >>>> >> lower in DDR like we do on the 512MiB AM6254atl EVM?
>> >>>> >
>> >>>> > Sorry, that is now a legacy setting before OPTEE finally got moved in
>> >>>> > v2026.01, as this had been developed thru v2025 u-boot releases..
>> >>>> >
>> >>>>
>> >>>> Well, it's worth noting that this change was not done in the usual way, and
>> >>>> involves user interaction during the build beyond selecting a defconfig.
>> >>>>
>> >>>> https://texasinstruments.github.io/processor-sdk-doc/processor-sdk-linux-AM62X/esd/docs/master/linux/Foundational_Components_ATF.html
>> >>>> https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-bsp/conf/machine/am62xxsip-evm.conf
>> >>>>
>> >>>> Robert, are you alright with me making the requested changes?
>> >>>
>> >>> I guess as long as we document it. I know the Octavo OSD62-sip @Erik
>> >>> Welsh will also be building on both am62xxsip and pocketbeagle2 based
>> >>> on the 512MB and then larger memory sizes (1G, 2G, etc.).
>> >>>
>> >>> Regards,
>> >>
>> >> Oh boy, adjusting the memory maps kept getting me out of memory errors in the
>> >> EFI flow that I knew should not be true. Found something fun: LMB reserved
>> >> memory regions do not match EFI reserved memory regions. EFI's
>> >> efi_carve_out_dt_rsv is setting regions to be more strict that LMB's base
>> >> requirements. When this occurs and an allocation runs into this discrepancy,
>> >> that allocation and all future allocation requests in the EFI flow will begin to
>> >> fail as they are repeatedly given the same LMB start address in the unapproved
>> >> region.
>> >>
>> >> Randolph
>> >
>> > Alright, looking into the allocation helpers it seems that
>> > EFI_CONVENTIONAL_MEMORY can be remapped in efi_allocate_pages so long as LMB
>> > agrees that it's free. This aligns with my understanding of the UEFI spec as
>> > well. I dumped the EFI memory map and noticed there were 2 fragmented sections
>> > of EFI_CONVENTIONAL_MEMORY that it could still use.
>> >
>> > Wired up efi_allocate_pages to go to those regions and attempt to allocate from
>> > there in the even an LMB_MEM_ALLOC_MAX or LMB_MEM_ALLOC_ANY start failing. Seems
>> > to have worked, but now I'm seeing the following reported in the kernel:
>> >
>> > [ 0.048167] [Firmware Bug]: Unable to handle paging request in EFI runtime service
>> > [ 0.048246] ------------[ cut here ]------------
>> > [ 0.048249] WARNING: CPU: 0 PID: 1 at /usr/src/kernel/drivers/firmware/efi/runtime-wrappers.c:341 __efi_queue_work+0xd4/0x108
>> > [ 0.048270] Modules linked in:
>> > [ 0.048285] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Tainted: G I 6.18.13-ti-00636-g30182cf3ac7d-dirty #1 PREEMPT
>> > [ 0.048296] Tainted: [I]=FIRMWARE_WORKAROUND
>> > [ 0.048299] Hardware name: beagle BeagleBoard.org PocketBeagle2/BeagleBoard.org PocketBeagle2, BIOS 2026.04-rc5-00003-gf1dace477fb8-dirty 04/01/2026
>> > [ 0.048305] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
>> > [ 0.048312] pc : __efi_queue_work+0xd4/0x108
>> > [ 0.048318] lr : __efi_queue_work+0xc0/0x108
>> > [ 0.048323] sp : ffff80008003bc80
>> > [ 0.048326] x29: ffff80008003bc80 x28: ffffad05b176bad4 x27: ffffad05b16b00ac
>> > [ 0.048336] x26: ffffad05b1622e60 x25: ffffad05b1953000 x24: ffffad05b1749050
>> > [ 0.048345] x23: 0000000000000004 x22: ffff80008003bd1e x21: ffff80008003bd20
>> > [ 0.048353] x20: ffff80008003bd28 x19: ffffad05b19cd5d8 x18: fffffffffffe2f20
>> > [ 0.048362] x17: 0000000000007000 x16: ffff000001c065a0 x15: 0000000000000000
>> > [ 0.048370] x14: 000000000000008a x13: ffff000001cf8090 x12: 0000000000000001
>> > [ 0.048379] x11: 00000000000000c0 x10: 00000000000009f0 x9 : ffff80008003bad0
>> > [ 0.048387] x8 : ffff000001cf8a50 x7 : 0000000000000001 x6 : 0000000000000001
>> > [ 0.048395] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000001
>> > [ 0.048403] x2 : 0000000000000000 x1 : 8000000000000015 x0 : 8000000000000015
>> > [ 0.048413] Call trace:
>> > [ 0.048417] __efi_queue_work+0xd4/0x108 (P)
>> > [ 0.048426] virt_efi_get_next_variable+0x5c/0xac
>> > [ 0.048434] efisubsys_init+0x148/0x390
>> > [ 0.048444] do_one_initcall+0x60/0x1d4
>> > [ 0.048457] kernel_init_freeable+0x248/0x2c4
>> > [ 0.048468] kernel_init+0x20/0x140
>> > [ 0.048478] ret_from_fork+0x10/0x20
>> > [ 0.048489] ---[ end trace 0000000000000000 ]---
>> >
>> > U-boot itself doesn't report any errors, so I want to assume this is probably a
>> > configuration issue regarding something else I've forgotten to add.
>> >
>> > Anyone got any quick/obvious comments before I start digging through more of
>> > that? Was my assumption about EFI_CONVENTIONAL_MEMORY incorrect? Is this, as
>> > unlikely as I think it is, actually just a known issue right now?
>>
>> Ugh, that took longer than it should have. Alright, what I did would have been
>> correct if there weren't a few issues with other things. Primarily, this memory
>> map for the am6254atl. The U-Boot stack overlaps 2 regions we carve out in
>> device tree. LMB doesn't actually inform the user of this, and just keeps
>> trucking, thinking that the general u-boot reservation will be good enough.
>>
>> Eventually, when some of the stack can be reclaimed, we will put some useful
>> things in these regions that were never properly reserved.
>>
>> What was driving me crazy was that the efiboot selftest reported that everything
>> was okay except for the device tree region. Fun, what could have changed that?
>> Well, that's just efi_carve_out_dt_rsv going back and trying to enforce things
>> LMB never did.
>>
>> Somehow we got it perfectly where copy_fdt would place the device tree squarely
>> in a region that was reserved by the device tree itself. Anything else wouldn't
>> have been exposed to the user.
>>
>> So, I assume that kernel warning is actually a result of some EFI regions being
>> reclaimed by efi_carve_out_dt_rsv and the runtime blowing up because what it
>> thought was a valid address is now in some reserved region.
>>
>> I've checked and am6254atl is also not able to reserve the
>> wkup_r5fss0_core0_memory_region (0x9db00000) at startup due to the u-boot stack
>> size. A ram top value of 0xa0000000 doesn't work with these reservations.
>>
>> Adjusting the CONFIG_STACK_SIZE won't help here, as it u-boot naturally extends
>> into the wkup_r5fss0_core0_memory_region on it's own. I was seeing a stack size
>> of 0x22184c0 locally at the time reservations were being setup.
>
> Ayush is dealing with Zephyr fallout too. I'm wondering if we are
> doing too many dynamic memory moves. Do we need to start hard-coding
> some of these memory regions in device-tree and then load the 512MB or
> 1GB memory settings starting in A53 SPL?
>
Actually it was the opposite here. Chicken and the egg issue. We don't know
about the memory reservations until after we load a device tree, but we can't
load a device tree until we've at least carved out some memory for U-Boot and
it's runtime allocations. U-Boot relocates itself to ram_top, which is too close
to our reserved regions.
I just went in and forced it to relocate to a known region between our
reservations and other blob addresses and it worked. Passed all the unit tests
and my own runtime tests with efibootmgr. I did also have to adjust
add_u_boot_and_runtime and lmb_reserve_uboot_region to handle that arbitrary
address and use mon_len instead of just assuming ram_top would be the end.
This does bring an interesting question though. If we aren't going to change our
r5 and m4 reserved regions then we'll have to make arbitrary gd->relocaddr
values more properly supported for both this device and am6254atl.
I assume since it's part of the global data it should just be part of the board
config instead of a static Kconfig parameter. Anyone from the community got any
comments on this? I'm just a lowly graphics developer.
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2026-03-31 22:55 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 22:37 [PATCH 0/3] k3-am62-pocketbeagle2: add board and variant support rs
2026-03-17 22:37 ` [PATCH 1/3] arm: mach-k3: am62: add &main_uart6 to clock and pwr tree rs
2026-03-17 22:37 ` [PATCH 2/3] k3-am62-pocketbeagle2: add initial board support rs
2026-03-20 9:29 ` Anshul Dalal
2026-03-20 15:32 ` Robert Nelson
2026-03-23 19:37 ` Randolph Sapp
2026-03-23 19:46 ` Robert Nelson
2026-03-26 0:34 ` Randolph Sapp
2026-03-26 23:23 ` Randolph Sapp
2026-03-27 14:25 ` Marko Mäkelä
2026-03-27 14:53 ` Robert Nelson
2026-03-27 19:15 ` Marko Mäkelä
2026-03-28 8:18 ` Marko Mäkelä
2026-03-28 16:39 ` Robert Nelson
2026-03-29 17:13 ` Marko Mäkelä
2026-03-30 14:41 ` Robert Nelson
2026-03-30 23:57 ` Randolph Sapp
2026-03-31 16:13 ` Robert Nelson
2026-03-31 22:54 ` Randolph Sapp
2026-03-17 22:38 ` [PATCH 3/3] k3-am62-pocketbeagle2: add support for 1GB variant rs
2026-03-20 10:10 ` Anshul Dalal
2026-03-20 15:26 ` Robert Nelson
2026-03-23 18:38 ` Randolph Sapp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox