board: ti: Add support for BeaglePlay
Subsystems (2)
v5 cover board: ti: Add support for BeaglePlay
Add support for BeaglePlay - rev 5
Full series: https://github.com/nmenon/fix-k3-dt-u-boot/commits/beagleplay-v4.2
Caveats:
* networking: pending https://lore.kernel.org/all/[email protected]/
* 32kclk and usb: pending:
https://lore.kernel.org/u-boot/[email protected]/
OR https://github.com/nmenon/fix-k3-dt-u-boot/commit/853b29d63c1ca642be316f1afb0fb778610dec46
being properly resolved (NOTE: without this patch, wlan is broken in
Linux as the 32kclk from SoC is incorrectly supplied to wlan as 25MHz)
* There seems to be a bug in Linux kernel with sdhci that seems to
depend on u-boot initialization of sdhci for functionality.
CI loop check: https://github.com/u-boot/u-boot/pull/425 (whenever that gets done I guess).
Bootlogs:
SD Boot: https://gist.github.com/nmenon/c74acb3a895053e05623e886df77c8fe
eMMC, no SD boot: https://gist.github.com/nmenon/16df3b8fc0e9102f29ebb7836b950a08
eMMC with SD card: https://gist.github.com/nmenon/042dbe7c08589e7bfe1919da1fedc545
Complete code (with the tmp patch) can be found at:
https://github.com/nmenon/fix-k3-dt-u-boot/tree/beagleplay-v5
Baseline: 97841de68043 (origin/next) Merge branch '2023-08-22-assorted-code-cleanups' into next
Changes since V4:
* Switched boot from distro_boot to bootstd - AM62 as a start will rely on txt env file.
* Cleanups around am625_init.c (new patches)
* Review comment fixups for documentation
* I have'nt picked up Mattijs's tested by since this is a different approach (bootstd Vs distro_bootcmd)
* Dropped the sdhci patches AND CFG_EXTRA_ENV_SETTINGS (Instead, we switch entirely to bootstd and move am62x-sk to bootstd along with it).
V4: https://lore.kernel.org/all/[email protected]/
V3: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/u-boot/[email protected]/
V1: https://lore.kernel.org/all/[email protected]/
Nishanth Menon (16):
include: configs: ti_armv7_common: Add documentation for protected
section
include: configs: am62x_evm: Drop unused SDRAM address
include: configs: am62x_evm: Wrap distroboot with
CONFIG_DISTRO_DEFAULTS
board: ti: am62x: am62x.env: Add explicit boot_targets
configs: am62x_evm_a53_defconfig: Switch to bootstd
include: configs: am62x_evm: Drop distro_bootcmd usage
include: env: ti: ti_armv7_common.env: Rename to ti_common.env
include: env: ti: ti_common: Add a generic findfdt
board: ti: am62x: am62x.env: Use default findfdt
arm: mach-k3: am625_init: Use IS_ENABLED()
arm: mach-k3: am625_init: Convert rtc_erratumi2327_init to static
configs: am62x_evm*: Enable EMMC_BOOT configuration
arm: mach-k3: am625: Add support for UDA FS
arm: dts: k3-am625-sk-binman: Add labels for unsigned binary
board: ti: am62x: Add am62x_beagleplay_* defconfigs and env file
doc: board: ti: Add BeaglePlay documentation
Robert Nelson (1):
arm: dts: Add k3-am625-beagleplay
arch/arm/dts/Makefile | 2 +
.../dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi | 2195 +++++++++++++++++
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 195 ++
arch/arm/dts/k3-am625-beagleplay.dts | 758 ++++++
arch/arm/dts/k3-am625-r5-beagleplay.dts | 86 +
arch/arm/dts/k3-am625-sk-binman.dtsi | 4 +-
arch/arm/mach-k3/am625_init.c | 49 +-
board/siemens/iot2050/iot2050.env | 2 +-
board/ti/am62ax/am62ax.env | 2 +-
board/ti/am62x/MAINTAINERS | 7 +
board/ti/am62x/am62x.env | 7 +-
board/ti/am62x/beagleplay.env | 18 +
board/ti/am62x/beagleplay_a53.config | 55 +
board/ti/am62x/beagleplay_r5.config | 15 +
board/ti/am64x/am64x.env | 2 +-
board/ti/am65x/am65x.env | 2 +-
board/ti/j721e/j721e.env | 2 +-
board/ti/j721s2/j721s2.env | 2 +-
board/ti/ks2_evm/k2e_evm.env | 2 +-
board/ti/ks2_evm/k2g_evm.env | 2 +-
board/ti/ks2_evm/k2hk_evm.env | 2 +-
board/ti/ks2_evm/k2l_evm.env | 2 +-
configs/am62x_evm_a53_defconfig | 6 +-
configs/am62x_evm_r5_defconfig | 1 +
doc/board/ti/am62x_beagleplay.rst | 256 ++
doc/board/ti/img/beagleplay_emmc.svg | 697 ++++++
doc/board/ti/k3.rst | 1 +
include/configs/am62x_evm.h | 6 -
include/configs/ti_armv7_common.h | 2 +-
.../ti/{ti_armv7_common.env => ti_common.env} | 12 +
30 files changed, 4342 insertions(+), 50 deletions(-)
create mode 100644 arch/arm/dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi
create mode 100644 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
create mode 100644 arch/arm/dts/k3-am625-beagleplay.dts
create mode 100644 arch/arm/dts/k3-am625-r5-beagleplay.dts
create mode 100644 board/ti/am62x/beagleplay.env
create mode 100644 board/ti/am62x/beagleplay_a53.config
create mode 100644 board/ti/am62x/beagleplay_r5.config
create mode 100644 doc/board/ti/am62x_beagleplay.rst
create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
rename include/env/ti/{ti_armv7_common.env => ti_common.env} (71%)Signature · 1 line
2.40.0
PATCH v5 1/17 include: configs: ti_armv7_common: Add documentation for protected section
Make the section protected by CONFIG_DISTRO_DEFAULTS macro clear.
---
New patch (part of bootstd transition)
include/configs/ti_armv7_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/ti_armv7_common.h +1 -1
@@ -200,7 +200,7 @@#define CFG_EXTRA_ENV_SETTINGS \ BOOTENV -#endif +#endif /* CONFIG_DISTRO_DEFAULTS */ #endif /* CONFIG_ARM64 */
Signature · 1 line
2.40.0
Re: [PATCH V5 01/17] include: configs: ti_armv7_common: Add documentation for protected section
Quoted 3 lines · Nishanth Menon
Make the section protected by
CONFIG_DISTRO_DEFAULTSmacro clear.Signed-off-by Nishanth Menon <[email protected]>
Quoted 22 lines
---
New patch (part of bootstd transition)
include/configs/ti_armv7_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/configs/ti_armv7_common.h +1
-1@@ -200,7 +200,7 @@#define CFG_EXTRA_ENV_SETTINGS \ BOOTENV -#endif +#endif /* CONFIG_DISTRO_DEFAULTS */ #endif /* CONFIG_ARM64 */ Signature · 1 line
2.40.0
PATCH v5 2/17 include: configs: am62x_evm: Drop unused SDRAM address
In reply to Nishanth MenonDrop unused macro. This was meant for a second region of DDR which we do not need for AM62x evm configurations.
---
New patch (part of bootstd transition)
include/configs/am62x_evm.h | 3 --- 1 file changed, 3 deletions(-)
include/configs/am62x_evm.h +0 -3
@@ -12,9 +12,6 @@#include <config_distro_bootcmd.h> #include <env/ti/mmc.h> -/* DDR Configuration */ -#define CFG_SYS_SDRAM_BASE1 0x880000000 -/* Now for the remaining common defines */ #include <configs/ti_armv7_common.h>
Signature · 1 line
2.40.0
Re: [PATCH V5 02/17] include: configs: am62x_evm: Drop unused SDRAM address
Hi Nishanth,
Quoted 9 lines · Nishanth Menon
Drop unused macro. This was meant for a second region of DDR which we do not need for AM62x evm configurations.
Signed-off-by Nishanth Menon <[email protected]>---
New patch (part of bootstd transition)include/configs/am62x_evm.h | 3 --- 1 file changed, 3 deletions(-)
What about include/configs/verdin-am62.h ?
It seems that that board, which is am62x based, also has the un-needed include.
Since i'm not 100% sure, I have added Marcel (who posted the verdin am62 support) here.
Quoted 17 lines
include/configs/am62x_evm.h +0
-3@@ -12,9 +12,6 @@#include <config_distro_bootcmd.h> #include <env/ti/mmc.h> -/* DDR Configuration */ -#define CFG_SYS_SDRAM_BASE1 0x880000000 -/* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> Signature · 1 line
2.40.0
Re: [PATCH V5 02/17] include: configs: am62x_evm: Drop unused SDRAM address
Quoted 14 lines · Mattijs Korpershoek
Hi Nishanth,
Quoted 9 lines · Nishanth Menon
Drop unused macro. This was meant for a second region of DDR which we do not need for AM62x evm configurations.
Signed-off-by Nishanth Menon <[email protected]>---
New patch (part of bootstd transition)include/configs/am62x_evm.h | 3 --- 1 file changed, 3 deletions(-)
Quoted 7 lines
What about
include/configs/verdin-am62.h?It seems that that board, which is am62x based, also has the un-needed include.
Since i'm not 100% sure, I have added Marcel (who posted the verdin am62 support) here.
Toradex team, Can you handle that cleanup? I stayed focussed on am62x_evm side of things.
Quoted 18 lines
Quoted 18 lines
include/configs/am62x_evm.h +0
-3@@ -12,9 +12,6 @@#include <config_distro_bootcmd.h> #include <env/ti/mmc.h> -/* DDR Configuration */ -#define CFG_SYS_SDRAM_BASE1 0x880000000 -/* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> Signature · 1 line
2.40.0
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH V5 02/17] include: configs: am62x_evm: Drop unused SDRAM address
Quoted 17 lines · Nishanth Menon
Quoted 16 lines · Mattijs Korpershoek
Hi Nishanth,
Quoted 9 lines · Nishanth Menon
Drop unused macro. This was meant for a second region of DDR which we do not need for AM62x evm configurations.
Signed-off-by Nishanth Menon <[email protected]>---
New patch (part of bootstd transition)include/configs/am62x_evm.h | 3 ---
1 file changed, 3 deletions(-)What about
include/configs/verdin-am62.h?
Quoted 8 lines
Quoted 5 lines
It seems that that board, which is am62x based, also has the un-needed include.
Since i'm not 100% sure, I have added Marcel (who posted the verdin am62 support) here.
Toradex team, Can you handle that cleanup? I stayed focussed on
am62x_evmside of things.
Yes, of course.
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
include/configs/am62x_evm.h +0
-0@@ -12,9 +12,6 @@ #include <config_distro_bootcmd.h> #include <env/ti/mmc.h>include/configs/am62x_evm.h +0
-3-/* DDR Configuration */ -#define CFG_SYS_SDRAM_BASE1 0x880000000 -/* Now for the remaining common defines */
#include <configs/ti_armv7_common.h>Signature · 1 line
2.40.0
Re: [PATCH V5 02/17] include: configs: am62x_evm: Drop unused SDRAM address
Quoted 21 lines · Marcel Ziswiler
Quoted 20 lines · Nishanth Menon
Quoted 19 lines · Mattijs Korpershoek
Hi Nishanth,
Quoted 9 lines · Nishanth Menon
Drop unused macro. This was meant for a second region of DDR which we do not need for AM62x evm configurations.
Signed-off-by Nishanth Menon <[email protected]>---
New patch (part of bootstd transition)include/configs/am62x_evm.h | 3 ---
1 file changed, 3 deletions(-)What about
include/configs/verdin-am62.h?It seems that that board, which is am62x based, also has the un-needed include.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Since i'm not 100% sure, I have added Marcel (who posted the verdin am62 support) here.
Toradex team, Can you handle that cleanup? I stayed focussed on
am62x_evmside of things.Yes, of course.
I believe that this is used on verdin-am62, please double check marcel.
Re: [PATCH V5 02/17] include: configs: am62x_evm: Drop unused SDRAM address
Quoted 25 lines · Francesco Dolcini
Quoted 24 lines · Marcel Ziswiler
Quoted 23 lines · Nishanth Menon
Quoted 21 lines · Mattijs Korpershoek
Hi Nishanth,
Quoted 9 lines · Nishanth Menon
Drop unused macro. This was meant for a second region of DDR which we do not need for AM62x evm configurations.
Signed-off-by Nishanth Menon <[email protected]>---
New patch (part of bootstd transition)include/configs/am62x_evm.h | 3 ---
1 file changed, 3 deletions(-)What about
include/configs/verdin-am62.h?It seems that that board, which is am62x based, also has the un-needed include.
Since i'm not 100% sure, I have added Marcel (who posted the verdin am62 support) here.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Toradex team, Can you handle that cleanup? I stayed focussed on
am62x_evmside of things.Yes, of course.
I believe that this is used on verdin-am62, please double check marcel.
No, likely I need to go home and not spread incomplete information here ...
Re: [PATCH V5 02/17] include: configs: am62x_evm: Drop unused SDRAM address
On Thu, 2023-08-24 at 18:15 +0200, Francesco Dolcini wrote:
[snip]
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
What about
include/configs/verdin-am62.h?It seems that that board, which is am62x based, also has the un-needed include.
Since i'm not 100% sure, I have added Marcel (who posted the verdin am62 support) here.
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Toradex team, Can you handle that cleanup? I stayed focussed on
am62x_evmside of things.Yes, of course.
I believe that this is used on verdin-am62, please double check marcel.
No, likely I need to go home and not spread incomplete information here ...
(;-p)
We took care of it.
https://lore.kernel.org/all/[email protected]
Thanks!
Cheers
Marcel
PATCH v5 3/17 include: configs: am62x_evm: Wrap distroboot with CONFIG_DISTRO_DEFAULTS
In reply to Nishanth MenonWrap the distro_boot options with CONFIG_DISTRO_DEFAULTS.
This is an intermediate step for us to switch over to CONFIG_BOOTSTD_DEFAULTS and drop this section in follow on patches.
---
New patch (part of bootstd transition)
include/configs/am62x_evm.h | 2 ++ 1 file changed, 2 insertions(+)
include/configs/am62x_evm.h +2 -0
@@ -9,8 +9,10 @@#ifndef __CONFIG_AM625_EVM_H#define __CONFIG_AM625_EVM_H +#ifdef CONFIG_DISTRO_DEFAULTS #include <config_distro_bootcmd.h> #include <env/ti/mmc.h> +#endif /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h>
Signature · 1 line
2.40.0
Re: [PATCH V5 03/17] include: configs: am62x_evm: Wrap distroboot with CONFIG_DISTRO_DEFAULTS
Quoted 6 lines · Nishanth Menon
Wrap the
distro_bootoptions withCONFIG_DISTRO_DEFAULTS.This is an intermediate step for us to switch over to
CONFIG_BOOTSTD_DEFAULTSand drop this section in follow on patches.Signed-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH v5 4/17 board: ti: am62x: am62x.env: Add explicit boot_targets
In reply to Nishanth MenonAdd explicit boot_targets to indicate the specific boot sequence to follow.
NOTE: The non-standard ti_mmc emulates what is done for distro_boot. With bootstd, this will eventually need to be replaced by equivalent class.
---
New patch (part of bootstd transition) - we can argue that ti_mmc should'nt belong here - but I wanted to maintain the boot_ti_mmc target that is provided in ti_common.env
board/ti/am62x/am62x.env | 1 + 1 file changed, 1 insertion(+)
board/ti/am62x/am62x.env +1 -0
@@ -11,6 +11,7 @@ args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 ${mtdparts} run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} +boot_targets=ti_mmc mmc0 mmc1 usb pxe dhcp boot=mmc mmcdev=1 bootpart=1:2
Signature · 1 line
2.40.0
PATCH v5 5/17 configs: am62x_evm_a53_defconfig: Switch to bootstd
In reply to Nishanth MenonSwitch to using bootstd. Note with this change, we will stop using distro_bootcmd and instead depend entirely on bootflow method of starting the system up.
---
New patch (part of bootstd transition)
configs/am62x_evm_a53_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
configs/am62x_evm_a53_defconfig +3 -2
@@ -28,8 +28,9 @@ CONFIG_SPL_SPI=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 -CONFIG_DISTRO_DEFAULTS=y -CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" +CONFIG_BOOTSTD_FULL=y +CONFIG_BOOTSTD_DEFAULTS=y +CONFIG_BOOTCOMMAND="run envboot; bootflow scan -lb" CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x80c80000
Signature · 1 line
2.40.0
Re: [PATCH V5 05/17] configs: am62x_evm_a53_defconfig: Switch to bootstd
Quoted 7 lines · Nishanth Menon
Switch to using bootstd. Note with this change, we will stop using
distro_bootcmdand instead depend entirely on bootflow method of starting the system up.Suggested-by Tom Rini <[email protected]>Suggested-by Simon Glass <[email protected]>Signed-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH v5 6/17 include: configs: am62x_evm: Drop distro_bootcmd usage
In reply to Nishanth MenonNow that BOOTSTD is used by default, drop un-used header file inclusion.
---
New patch (part of bootstd transition)
include/configs/am62x_evm.h | 5 ----- 1 file changed, 5 deletions(-)
include/configs/am62x_evm.h +0 -5
@@ -9,11 +9,6 @@#ifndef __CONFIG_AM625_EVM_H#define __CONFIG_AM625_EVM_H -#ifdef CONFIG_DISTRO_DEFAULTS -#include <config_distro_bootcmd.h> -#include <env/ti/mmc.h> -#endif -/* Now for the remaining common defines */ #include <configs/ti_armv7_common.h>
Signature · 1 line
2.40.0
Re: [PATCH V5 06/17] include: configs: am62x_evm: Drop distro_bootcmd usage
Quoted 4 lines · Nishanth Menon
Now that BOOTSTD is used by default, drop un-used header file inclusion.
Signed-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH v5 7/17 include: env: ti: ti_armv7_common.env: Rename to ti_common.env
In reply to Nishanth Menonti_armv7_common does not make any more sense as it is used by armv7 and armv8 TI based platforms.
---
New patch review comment from:
https://lore.kernel.org/all/20230823144257.GG3953269@bill-the-cat/
ti_common.h does'nt need any header file support if we switch to bootstd.
board/siemens/iot2050/iot2050.env | 2 +-
board/ti/am62ax/am62ax.env | 2 +-
board/ti/am62x/am62x.env | 2 +-
board/ti/am64x/am64x.env | 2 +-
board/ti/am65x/am65x.env | 2 +-
board/ti/j721e/j721e.env | 2 +-
board/ti/j721s2/j721s2.env | 2 +-
board/ti/ks2_evm/k2e_evm.env | 2 +-
board/ti/ks2_evm/k2g_evm.env | 2 +-
board/ti/ks2_evm/k2hk_evm.env | 2 +-
board/ti/ks2_evm/k2l_evm.env | 2 +-
include/env/ti/{ti_armv7_common.env => ti_common.env} | 0
12 files changed, 11 insertions(+), 11 deletions(-)
rename include/env/ti/{ti_armv7_common.env => ti_common.env} (100%)board/siemens/iot2050/iot2050.env +1 -1
@@ -6,7 +6,7 @@ * Jan Kiszka <[email protected]> */ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> usb_pgood_delay=900
board/ti/am62ax/am62ax.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> default_device_tree=ti/k3-am62a7-sk.dtb
board/ti/am62x/am62x.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> default_device_tree=ti/k3-am625-sk.dtb
board/ti/am64x/am64x.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> #include <env/ti/k3_dfu.env>
board/ti/am65x/am65x.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> #include <env/ti/k3_dfu.env> #if CONFIG_CMD_REMOTEPROC
board/ti/j721e/j721e.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> #include <env/ti/ufs.env> #include <env/ti/k3_dfu.env>
board/ti/j721s2/j721s2.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> #include <env/ti/ufs.env> #include <env/ti/k3_dfu.env>
board/ti/ks2_evm/k2e_evm.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/ti_armv7_keystone2.env> findfdt=setenv fdtfile ${name_fdt}
board/ti/ks2_evm/k2g_evm.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/ti_armv7_keystone2.env> #include <env/ti/mmc.env>
board/ti/ks2_evm/k2hk_evm.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/ti_armv7_keystone2.env> findfdt=setenv fdtfile ${name_fdt}
board/ti/ks2_evm/k2l_evm.env +1 -1
@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/ti_armv7_keystone2.env> findfdt=setenv fdtfile ${name_fdt}
include/env/ti/ti_common.env renamed from include/env/ti/ti_armv7_common.env +0 -0
Signature · 1 line
2.40.0
Re: [PATCH V5 07/17] include: env: ti: ti_armv7_common.env: Rename to ti_common.env
Quoted 5 lines · Nishanth Menon
ti_armv7_commondoes not make any more sense as it is used by armv7 and armv8 TI based platforms.Reported-by Tom Rini <[email protected]>Signed-off-by Nishanth Menon <[email protected]>
Quoted 141 lines
---
New patch review comment from:
https://lore.kernel.org/all/20230823144257.GG3953269@bill-the-cat/
ti_common.hdoes'nt need any header file support if we switch to bootstd.board/siemens/iot2050/iot2050.env | 2 +- board/ti/am62ax/am62ax.env | 2 +- board/ti/am62x/am62x.env | 2 +- board/ti/am64x/am64x.env | 2 +- board/ti/am65x/am65x.env | 2 +- board/ti/j721e/j721e.env | 2 +- board/ti/j721s2/j721s2.env | 2 +- board/ti/ks2_evm/k2e_evm.env | 2 +- board/ti/ks2_evm/k2g_evm.env | 2 +- board/ti/ks2_evm/k2hk_evm.env | 2 +- board/ti/ks2_evm/k2l_evm.env | 2 +- include/env/ti/{ti_armv7_common.env => ti_common.env} | 0 12 files changed, 11 insertions(+), 11 deletions(-) rename include/env/ti/{ti_armv7_common.env => ti_common.env} (100%)board/siemens/iot2050/iot2050.env +1
-1@@ -6,7 +6,7 @@ * Jan Kiszka <[email protected]> */ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> usb_pgood_delay=900board/ti/am62ax/am62ax.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> default_device_tree=ti/k3-am62a7-sk.dtbboard/ti/am62x/am62x.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> default_device_tree=ti/k3-am625-sk.dtbboard/ti/am64x/am64x.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> #include <env/ti/k3_dfu.env>board/ti/am65x/am65x.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> #include <env/ti/k3_dfu.env> #if CONFIG_CMD_REMOTEPROCboard/ti/j721e/j721e.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> #include <env/ti/ufs.env> #include <env/ti/k3_dfu.env>board/ti/j721s2/j721s2.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/mmc.env> #include <env/ti/ufs.env> #include <env/ti/k3_dfu.env>board/ti/ks2_evm/k2e_evm.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/ti_armv7_keystone2.env> findfdt=setenv fdtfile ${name_fdt}board/ti/ks2_evm/k2g_evm.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/ti_armv7_keystone2.env> #include <env/ti/mmc.env>board/ti/ks2_evm/k2hk_evm.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/ti_armv7_keystone2.env> findfdt=setenv fdtfile ${name_fdt}board/ti/ks2_evm/k2l_evm.env +1
-1@@ -1,4 +1,4 @@ -#include <env/ti/ti_armv7_common.env> +#include <env/ti/ti_common.env> #include <env/ti/ti_armv7_keystone2.env> findfdt=setenv fdtfile ${name_fdt}include/env/ti/ti_common.env renamed from include/env/ti/ti_armv7_common.env +0
-0Signature · 1 line
2.40.0
Re: [PATCH V5 07/17] include: env: ti: ti_armv7_common.env: Rename to ti_common.env
In reply to Nishanth MenonQuoted 5 lines · Nishanth Menon
ti_armv7_commondoes not make any more sense as it is used by armv7 and armv8 TI based platforms.Reported-by Tom Rini <[email protected]>Signed-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH v5 8/17 include: env: ti: ti_common: Add a generic findfdt
In reply to Nishanth Menonti_mmc bootmethod uses a findfdt routine that is expected to be implemented by all platforms.
Define a default findfdt based on configured DEFAULT_DEVICE_TREE option for u-boot. This saves duplication across multiple boards and handles architecture folder location changes centrally.
TI ARMV7 platforms will need to override default_device_tree_subarch in the env file to point to the appropriate platform. Note: default "omap" is used to cater to "most common" default.
---
New patch (part of bootstd transition)
include/env/ti/ti_common.env | 12 ++++++++++++ 1 file changed, 12 insertions(+)
include/env/ti/ti_common.env +12 -0
@@ -32,3 +32,15 @@ bootcmd_ti_mmc= else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; +default_device_tree=CONFIG_DEFAULT_DEVICE_TREE +default_device_tree_arch=ti +#ifdef CONFIG_ARM64 +findfdt= + setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb; + setenv fdtfile ${name_fdt} +#else +default_device_tree_subarch=omap +findfdt= + setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb; + setenv fdtfile ${name_fdt} +#endif
Signature · 1 line
2.40.0
Re: [PATCH V5 08/17] include: env: ti: ti_common: Add a generic findfdt
Quoted 28 lines · Nishanth Menon
ti_mmcbootmethod uses a findfdt routine that is expected to be implemented by all platforms.Define a default findfdt based on configured
DEFAULT_DEVICE_TREEoption for u-boot. This saves duplication across multiple boards and handles architecture folder location changes centrally.TI ARMV7 platforms will need to override
default_device_tree_subarchin the env file to point to the appropriate platform. Note: default "omap" is used to cater to "most common" default.Signed-off-by Nishanth Menon <[email protected]>---
New patch (part of bootstd transition)include/env/ti/ti_common.env | 12 ++++++++++++ 1 file changed, 12 insertions(+)include/env/ti/ti_common.env +2
-0@@ -32,3 +32,15 @@ bootcmd_ti_mmc= else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; +default_device_tree=CONFIG_DEFAULT_DEVICE_TREE +default_device_tree_arch=ti
include/env/ti/ti_common.env bootcmd_ti_mmc= · line 46
Quoted 10 lines
include/env/ti/ti_common.env +10
-0+#ifdef CONFIG_ARM64 +findfdt= + setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb; + setenv fdtfile ${name_fdt} +#else +default_device_tree_subarch=omap +findfdt= + setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb; + setenv fdtfile ${name_fdt} +#endif
How does this override work in practice? I fear that it's relying on the (not exactly documented) mechanic of "last one set generally work". So perhaps we don't want this in ti_common.env but instead include/env/ti/default_findfdt.env and then #include that, and then platforms that need different just don't #include this.
Signature · 1 line
Tom
Re: [PATCH V5 08/17] include: env: ti: ti_common: Add a generic findfdt
Quoted 34 lines · Tom Rini
Quoted 33 lines · Nishanth Menon
ti_mmcbootmethod uses a findfdt routine that is expected to be implemented by all platforms.Define a default findfdt based on configured
DEFAULT_DEVICE_TREEoption for u-boot. This saves duplication across multiple boards and handles architecture folder location changes centrally.TI ARMV7 platforms will need to override
default_device_tree_subarchin the env file to point to the appropriate platform. Note: default "omap" is used to cater to "most common" default.Signed-off-by Nishanth Menon <[email protected]>---
New patch (part of bootstd transition)include/env/ti/ti_common.env | 12 ++++++++++++ 1 file changed, 12 insertions(+)include/env/ti/ti_common.env +7
-0@@ -32,3 +32,15 @@ bootcmd_ti_mmc= else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; +default_device_tree=CONFIG_DEFAULT_DEVICE_TREE +default_device_tree_arch=ti +#ifdef CONFIG_ARM64 +findfdt= + setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb; + setenv fdtfile ${name_fdt} +#else
Quoted 8 lines
include/env/ti/ti_common.env bootcmd_ti_mmc= · line 46
Quoted 5 lines
include/env/ti/ti_common.env +5
-0+default_device_tree_subarch=omap +findfdt= + setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb; + setenv fdtfile ${name_fdt} +#endifHow does this override work in practice? I fear that it's relying on the (not exactly documented) mechanic of "last one set generally work".
I was depending on that -> since we work with #includes anyways - I had assumed it implicitly.
Quoted 3 lines
So perhaps we don't want this in ti_common.env but instead
include/env/ti/default_findfdt.envand then #include that, and then platforms that need different just don't #include this.
Sure, I can do that in the next spin. Will wait a couple of days for any further feedback to fixup (without broadening scope unless mandatory).
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH V5 08/17] include: env: ti: ti_common: Add a generic findfdt
Quoted 44 lines · Nishanth Menon
Quoted 34 lines · Tom Rini
Quoted 33 lines · Nishanth Menon
ti_mmcbootmethod uses a findfdt routine that is expected to be implemented by all platforms.Define a default findfdt based on configured
DEFAULT_DEVICE_TREEoption for u-boot. This saves duplication across multiple boards and handles architecture folder location changes centrally.TI ARMV7 platforms will need to override
default_device_tree_subarchin the env file to point to the appropriate platform. Note: default "omap" is used to cater to "most common" default.Signed-off-by Nishanth Menon <[email protected]>---
New patch (part of bootstd transition)include/env/ti/ti_common.env | 12 ++++++++++++ 1 file changed, 12 insertions(+)include/env/ti/ti_common.env +7
-0@@ -32,3 +32,15 @@ bootcmd_ti_mmc= else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; +default_device_tree=CONFIG_DEFAULT_DEVICE_TREE +default_device_tree_arch=ti +#ifdef CONFIG_ARM64 +findfdt= + setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb; + setenv fdtfile ${name_fdt} +#elseQuoted 8 lines
include/env/ti/ti_common.env bootcmd_ti_mmc= · line 46
Quoted 5 lines
include/env/ti/ti_common.env +5
-0+default_device_tree_subarch=omap +findfdt= + setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb; + setenv fdtfile ${name_fdt} +#endifHow does this override work in practice? I fear that it's relying on the (not exactly documented) mechanic of "last one set generally work".
Quoted 2 lines
I was depending on that -> since we work with #includes anyways - I had assumed it implicitly.
It "works" in that the generated environment will be something like:
foo=a
foo=b
But when we import the at run time we set "foo" to "a" and then override "foo" to be "b". Which works, but isn't super clear at the outset, so it's best to not do that.
Quoted 6 lines
Quoted 3 lines
So perhaps we don't want this in ti_common.env but instead
include/env/ti/default_findfdt.envand then #include that, and then platforms that need different just don't #include this.Sure, I can do that in the next spin. Will wait a couple of days for any further feedback to fixup (without broadening scope unless mandatory).
OK, thanks.
Signature · 1 line
Tom
PATCH v5 9/17 board: ti: am62x: am62x.env: Use default findfdt
In reply to Nishanth MenonUse the default findfdt using CONFIG_DEFAULT_DEVICE_TREE
---
New patch (part of bootstd transition)
board/ti/am62x/am62x.env | 4 ---- 1 file changed, 4 deletions(-)
board/ti/am62x/am62x.env +0 -4
@@ -1,10 +1,6 @@ #include <env/ti/ti_common.env> #include <env/ti/mmc.env> -default_device_tree=ti/k3-am625-sk.dtb -findfdt= - setenv name_fdt ${default_device_tree}; - setenv fdtfile ${name_fdt} name_kern=Image console=ttyS2,115200n8 args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000
Signature · 1 line
2.40.0
Re: [PATCH V5 09/17] board: ti: am62x: am62x.env: Use default findfdt
Quoted 3 lines · Nishanth Menon
Use the default findfdt using
CONFIG_DEFAULT_DEVICE_TREESigned-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH v5 10/17 arm: mach-k3: am625_init: Use IS_ENABLED()
In reply to Nishanth MenonDrop the #ifdeffery and use IS_ENABLED() inline check and let the compiler do it's thing.
---
new patch (cleanup before modifying for adding UDA-FS)
arch/arm/mach-k3/am625_init.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-)
arch/arm/mach-k3/am625_init.c +17 -18
@@ -121,10 +121,10 @@ void board_init_f(ulong dummy)struct udevice *dev;int ret; -#if defined(CONFIG_CPU_V7R ) -setup_k3_mpu_regions (); -rtc_erratumi2327_init (); -#endif +if (IS_ENABLED (CONFIG_CPU_V7R )) { +setup_k3_mpu_regions (); +rtc_erratumi2327_init (); + }/* * Cannot delay this further as there is a chance that
@@ -156,29 +156,28 @@ void board_init_f(ulong dummy)preloader_console_init (); -#ifdef CONFIG_K3_EARLY_CONS /* * Allow establishing an early console as required for example when * doing a UART-based boot. Note that this console may not "survive" * through a SYSFW PM-init step and will need a re-init in some way * due to changing module clock frequencies. */ -early_console_init (); -#endif +if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) +early_console_init (); -#if defined(CONFIG_K3_LOAD_SYSFW )/* * Configure and start up system controller firmware. Provide * the U-Boot console init function to the SYSFW post-PM configuration * callback hook, effectively switching on (or over) the console * output. */ - ret =is_rom_loaded_sysfw (&bootdata); -if (!ret) -panic ("ROM has not loaded TIFS firmware\n" ); +if (IS_ENABLED (CONFIG_K3_LOAD_SYSFW )) { + ret =is_rom_loaded_sysfw (&bootdata); +if (!ret) +panic ("ROM has not loaded TIFS firmware\n" ); -k3_sysfw_loader (true,NULL ,NULL ); -#endif +k3_sysfw_loader (true,NULL ,NULL ); + }/* * Force probe of clk_k3 driver here to ensure basic default clock
@@ -209,11 +208,11 @@ void board_init_f(ulong dummy)enable_mcu_esm_reset (); } -#if defined(CONFIG_K3_AM64_DDRSS ) - ret =uclass_get_device (UCLASS_RAM ,0 , &dev); -if (ret) -panic ("DRAM init failed: %d\n" , ret); -#endif +if (IS_ENABLED (CONFIG_K3_AM64_DDRSS )) { + ret =uclass_get_device (UCLASS_RAM ,0 , &dev); +if (ret) +panic ("DRAM init failed: %d\n" , ret); + }spl_enable_dcache (); }
Signature · 1 line
2.40.0
Re: [PATCH V5 10/17] arm: mach-k3: am625_init: Use IS_ENABLED()
Quoted 4 lines · Nishanth Menon
Drop the #ifdeffery and use
IS_ENABLED()inline check and let the compiler do it's thing.Signed-off-by Nishanth Menon <[email protected]>
Quoted 82 lines
---
new patch (cleanup before modifying for adding UDA-FS)arch/arm/mach-k3/am625_init.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-)arch/arm/mach-k3/am625_init.c +17
-18@@ -121,10 +121,10 @@ void board_init_f(ulong dummy)struct udevice *dev;int ret; -#if defined(CONFIG_CPU_V7R ) -setup_k3_mpu_regions (); -rtc_erratumi2327_init (); -#endif +if (IS_ENABLED (CONFIG_CPU_V7R )) { +setup_k3_mpu_regions (); +rtc_erratumi2327_init (); + }/* * Cannot delay this further as there is a chance that @@ -156,29 +156,28 @@ void board_init_f(ulong dummy)preloader_console_init (); -#ifdef CONFIG_K3_EARLY_CONS /* * Allow establishing an early console as required for example when * doing a UART-based boot. Note that this console may not "survive" * through a SYSFW PM-init step and will need a re-init in some way * due to changing module clock frequencies. */ -early_console_init (); -#endif +if (IS_ENABLED (CONFIG_K3_EARLY_CONS )) +early_console_init (); -#if defined(CONFIG_K3_LOAD_SYSFW )/* * Configure and start up system controller firmware. Provide * the U-Boot console init function to the SYSFW post-PM configuration * callback hook, effectively switching on (or over) the console * output. */ - ret =is_rom_loaded_sysfw (&bootdata); -if (!ret) -panic ("ROM has not loaded TIFS firmware\n" ); +if (IS_ENABLED (CONFIG_K3_LOAD_SYSFW )) { + ret =is_rom_loaded_sysfw (&bootdata); +if (!ret) +panic ("ROM has not loaded TIFS firmware\n" ); -k3_sysfw_loader (true,NULL ,NULL ); -#endif +k3_sysfw_loader (true,NULL ,NULL ); + }/* * Force probe of clk_k3 driver here to ensure basic default clock @@ -209,11 +208,11 @@ void board_init_f(ulong dummy)enable_mcu_esm_reset (); } -#if defined(CONFIG_K3_AM64_DDRSS ) - ret =uclass_get_device (UCLASS_RAM ,0 , &dev); -if (ret) -panic ("DRAM init failed: %d\n" , ret); -#endif +if (IS_ENABLED (CONFIG_K3_AM64_DDRSS )) { + ret =uclass_get_device (UCLASS_RAM ,0 , &dev); +if (ret) +panic ("DRAM init failed: %d\n" , ret); + }spl_enable_dcache (); }Signature · 1 line
2.40.0
Re: [PATCH V5 10/17] arm: mach-k3: am625_init: Use IS_ENABLED()
In reply to Nishanth MenonQuoted 4 lines · Nishanth Menon
Drop the #ifdeffery and use
IS_ENABLED()inline check and let the compiler do it's thing.Signed-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH v5 11/17 arm: mach-k3: am625_init: Convert rtc_erratumi2327_init to static
In reply to Nishanth MenonThe erratum is called locally, make it static, drop the #ifdeffery since it will only be called in R5 build and mark it potentially unused to stop compiler screaming at us.
While at this, drop the redundant return for a void function.
---
new patch (cleanup before modifying for adding UDA-FS)
arch/arm/mach-k3/am625_init.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
arch/arm/mach-k3/am625_init.c +1 -5
@@ -80,8 +80,6 @@ static __maybe_unused void enable_mcu_esm_reset(void)writel (stat,CTRLMMR_MCU_RST_CTRL ); } -#if defined(CONFIG_CPU_V7R ) -/* * RTC Erratum i2327 Workaround for Silicon Revision 1 *
@@ -94,7 +92,7 @@ static __maybe_unused void enable_mcu_esm_reset(void)* * https://www.ti.com/lit/er/sprz487c/sprz487c.pdf */ -void rtc_erratumi2327_init (void ) +static __maybe_unused void rtc_erratumi2327_init (void ) {u32 counter;
@@ -112,9 +110,7 @@ void rtc_erratumi2327_init(void)*/ writel (K3RTC_KICK0_UNLOCK_VALUE ,REG_K3RTC_KICK0 );writel (K3RTC_KICK1_UNLOCK_VALUE ,REG_K3RTC_KICK1 ); - return; } -#endif void board_init_f (ulong dummy) {
Signature · 1 line
2.40.0
Re: [PATCH V5 11/17] arm: mach-k3: am625_init: Convert rtc_erratumi2327_init to static
Quoted 7 lines · Nishanth Menon
The erratum is called locally, make it static, drop the #ifdeffery since it will only be called in R5 build and mark it potentially unused to stop compiler screaming at us.
While at this, drop the redundant return for a void function.
Signed-off-by Nishanth Menon <[email protected]>
Quoted 40 lines
---
new patch (cleanup before modifying for adding UDA-FS)arch/arm/mach-k3/am625_init.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)arch/arm/mach-k3/am625_init.c +1
-5@@ -80,8 +80,6 @@ static __maybe_unused void enable_mcu_esm_reset(void)writel (stat,CTRLMMR_MCU_RST_CTRL ); } -#if defined(CONFIG_CPU_V7R ) -/* * RTC Erratum i2327 Workaround for Silicon Revision 1 * @@ -94,7 +92,7 @@ static __maybe_unused void enable_mcu_esm_reset(void)* * https://www.ti.com/lit/er/sprz487c/sprz487c.pdf */ -void rtc_erratumi2327_init (void ) +static __maybe_unused void rtc_erratumi2327_init (void ) {u32 counter;@@ -112,9 +110,7 @@ void rtc_erratumi2327_init(void)*/ writel (K3RTC_KICK0_UNLOCK_VALUE ,REG_K3RTC_KICK0 );writel (K3RTC_KICK1_UNLOCK_VALUE ,REG_K3RTC_KICK1 ); - return; } -#endif void board_init_f (ulong dummy) {Signature · 1 line
2.40.0
Re: [PATCH V5 11/17] arm: mach-k3: am625_init: Convert rtc_erratumi2327_init to static
In reply to Nishanth MenonQuoted 7 lines · Nishanth Menon
The erratum is called locally, make it static, drop the #ifdeffery since it will only be called in R5 build and mark it potentially unused to stop compiler screaming at us.
While at this, drop the redundant return for a void function.
Signed-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH v5 12/17 configs: am62x_evm*: Enable EMMC_BOOT configuration
In reply to Nishanth MenonEnable EMMC boot support for AM62x evm base configuration.
---
Changes since V4:
- Picked up Mattijs' reviewed-by
V4: https://lore.kernel.org/r/[email protected]
configs/am62x_evm_a53_defconfig | 1 + configs/am62x_evm_r5_defconfig | 1 + 2 files changed, 2 insertions(+)
configs/am62x_evm_a53_defconfig +1 -0
@@ -70,6 +70,7 @@ CONFIG_TI_K3_NAVSS_UDMA=y CONFIG_TI_SCI_PROTOCOL=y CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y +CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ADMA=y CONFIG_SPL_MMC_SDHCI_ADMA=y
configs/am62x_evm_r5_defconfig +1 -0
@@ -92,6 +92,7 @@ CONFIG_DM_MAILBOX=y CONFIG_K3_SEC_PROXY=y CONFIG_SPL_MISC=y CONFIG_ESM_K3=y +CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ADMA=y CONFIG_SPL_MMC_SDHCI_ADMA=y
Signature · 1 line
2.40.0
PATCH v5 13/17 arm: mach-k3: am625: Add support for UDA FS
In reply to Nishanth MenonWhile boot partition support with EMMC boot is useful, it is constrained by the size of boot hardware partition itself.
In the case of K3 devices, tispl images can contain OP-TEE images that can substantially vary in size and the u-boot image itself can vary over time as we enable various features.
So use the CSD information in the case of EMMC_BOOT configuration being enabled to pick boot partition or UDA FS mode operation to pick.
If EMMC_BOOT is disabled, then depend on filesystem configuration to pick data from UDA.
While at this, drop the extraneous whitespace.
---
Changes since V4:
- Did'nt pickup Mattijs' reviewed-by - no more iffdeffery - so might be good to relook.
V4: https://lore.kernel.org/r/[email protected]
arch/arm/mach-k3/am625_init.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-k3/am625_init.c +7 -1
@@ -220,9 +220,15 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)u32 bootmode_cfg = (devstat &MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_MASK ) >>MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_SHIFT ; -switch (bootmode) {case BOOT_DEVICE_EMMC : +if (IS_ENABLED (CONFIG_SUPPORT_EMMC_BOOT )) { +if (spl_mmc_emmc_boot_partition (mmc)) +return MMCSD_MODE_EMMCBOOT ; +return MMCSD_MODE_FS ; + } +if (IS_ENABLED (CONFIG_SPL_FS_FAT ) ||IS_ENABLED (CONFIG_SPL_FS_EXT4 )) +return MMCSD_MODE_FS ;return MMCSD_MODE_EMMCBOOT ;case BOOT_DEVICE_MMC :if (bootmode_cfg &MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK )
Signature · 1 line
2.40.0
Re: [PATCH V5 13/17] arm: mach-k3: am625: Add support for UDA FS
Quoted 10 lines · Nishanth Menon
While boot partition support with EMMC boot is useful, it is constrained by the size of boot hardware partition itself.
In the case of K3 devices, tispl images can contain OP-TEE images that can substantially vary in size and the u-boot image itself can vary over time as we enable various features.
So use the CSD information in the case of
EMMC_BOOTconfiguration being enabled to pick boot partition or UDA FS mode operation to pick.
Quoted 6 lines
If
EMMC_BOOTis disabled, then depend on filesystem configuration to pick data from UDA.While at this, drop the extraneous whitespace.
Signed-off-by Nishanth Menon <[email protected]>
Quoted 33 lines
---
Changes since V4:
- Did'nt pickup Mattijs' reviewed-by - no more iffdeffery - so might be good to relook.V4: https://lore.kernel.org/r/[email protected]
arch/arm/mach-k3/am625_init.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)arch/arm/mach-k3/am625_init.c +7
-1@@ -220,9 +220,15 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)u32 bootmode_cfg = (devstat &MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_MASK ) >>MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_SHIFT ; -switch (bootmode) {case BOOT_DEVICE_EMMC : +if (IS_ENABLED (CONFIG_SUPPORT_EMMC_BOOT )) { +if (spl_mmc_emmc_boot_partition (mmc)) +return MMCSD_MODE_EMMCBOOT ; +return MMCSD_MODE_FS ; + } +if (IS_ENABLED (CONFIG_SPL_FS_FAT ) ||IS_ENABLED (CONFIG_SPL_FS_EXT4 )) +return MMCSD_MODE_FS ;return MMCSD_MODE_EMMCBOOT ;case BOOT_DEVICE_MMC :if (bootmode_cfg &MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK )Signature · 1 line
2.40.0
PATCH v5 14/17 arm: dts: k3-am625-sk-binman: Add labels for unsigned binary
In reply to Nishanth MenonAdd labels for unsigned binary to permit over-ride.
---
Cc: Simon Glass <[email protected]>
Changes since v4:
* Picked up Mattijs' Review
V4: https://lore.kernel.org/r/[email protected]
V3: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/u-boot/[email protected]/
V1: https://lore.kernel.org/all/[email protected]/
arch/arm/dts/k3-am625-sk-binman.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/k3-am625-sk-binman.dtsi +2 -2
@@ -389,7 +389,7 @@ type = "flat_dt"; arch = "arm"; compression = "none"; - blob { + spl_am625_sk_dtb_unsigned: blob { filename = SPL_AM625_SK_DTB; }; };
@@ -438,7 +438,7 @@ type = "flat_dt"; arch = "arm"; compression = "none"; - blob { + am625_sk_dtb_unsigned: blob { filename = AM625_SK_DTB; }; hash {
Signature · 1 line
2.40.0
PATCH v5 15/17 arm: dts: Add k3-am625-beagleplay
In reply to Nishanth MenonFrom: Robert Nelson <[email protected]>
BeagleBoard.org BeaglePlay is an easy to use, affordable open source hardware single board computer based on the Texas Instruments AM625 SoC that allows you to create connected devices that work even at long distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L. Expansion is provided over open standards based mikroBUS, Grove and QWIIC headers among other interfaces.
This board family can be identified by the 24c32 eeprom:
[aa 55 33 ee 01 37 00 10 2e 00 42 45 41 47 4c 45 |.U3..7....BEAGLE|] [50 4c 41 59 2d 41 30 2d 00 00 30 32 30 30 37 38 |PLAY-A0-..020078|]
https://beagleplay.org/
https://git.beagleboard.org/beagleplay/beagleplay
baseline of base device tree is v6.5-rc1.
---
Changes Since V4:
No Functional change - Picked up Mattij's reviewed by
V4: https://lore.kernel.org/r/[email protected]
V3: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/u-boot/[email protected]/
V1: https://lore.kernel.org/all/[email protected]/
arch/arm/dts/Makefile | 2 + .../dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi | 2195 +++++++++++++++++ arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 195 ++ arch/arm/dts/k3-am625-beagleplay.dts | 758 ++++++ arch/arm/dts/k3-am625-r5-beagleplay.dts | 86 + board/ti/am62x/MAINTAINERS | 7 + 6 files changed, 3243 insertions(+) create mode 100644 arch/arm/dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi create mode 100644 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am625-beagleplay.dts create mode 100644 arch/arm/dts/k3-am625-r5-beagleplay.dts
arch/arm/dts/Makefile +2 -0
@@ -1334,6 +1334,8 @@ dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \ dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \ k3-am625-r5-sk.dtb \ + k3-am625-beagleplay.dtb \ + k3-am625-r5-beagleplay.dtb \ k3-am625-verdin-wifi-dev.dtb \ k3-am625-verdin-r5.dtb
arch/arm/dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi new file +2195 -0
2,195 lines not on this page · raw message
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi new file +195 -0
195 lines not on this page · raw message
arch/arm/dts/k3-am625-beagleplay.dts new file +758 -0
602 lines not on this page · raw message
arch/arm/dts/k3-am625-r5-beagleplay.dts new file +86 -0
86 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.40.0
Part of the diff is not shown here. View the raw message.
PATCH v5 16/17 board: ti: am62x: Add am62x_beagleplay_* defconfigs and env file
In reply to Nishanth MenonAdd defconfig fragments for am625 based beagleplay and corresponding customized environment file for beagleplay.
---
Changes Since V4:
* New bootstd baseline
* have'nt picked up Mattijs's review as a result
V4: https://lore.kernel.org/r/[email protected]
V3: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/u-boot/[email protected]/
V1: https://lore.kernel.org/all/[email protected]/
board/ti/am62x/beagleplay.env | 18 +++++++++ board/ti/am62x/beagleplay_a53.config | 55 ++++++++++++++++++++++++++++ board/ti/am62x/beagleplay_r5.config | 15 ++++++++ 3 files changed, 88 insertions(+) create mode 100644 board/ti/am62x/beagleplay.env create mode 100644 board/ti/am62x/beagleplay_a53.config create mode 100644 board/ti/am62x/beagleplay_r5.config
board/ti/am62x/beagleplay.env new file +18 -0
@@ -0,0 +1,18 @@ +#include <env/ti/ti_common.env> +#include <env/ti/mmc.env> + +name_kern=Image +console=ttyS2,115200n8 +args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 +run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} +set_led_state_fail_load= led led-0 off; led led-1 on; + led led-2 off; led led-3 on; led led-4 off +set_led_state_start_load=led led-0 on; led led-1 off; + led led-2 on; led led-3 off; led led-4 on +boot=mmc +mmcdev=1 +bootpart=1:1 +bootdir=/boot +boot_targets=mmc1 mmc0 usb pxe +bootmeths=extlinux efi +rd_spec=-
board/ti/am62x/beagleplay_a53.config new file +55 -0
55 lines not on this page · raw message
board/ti/am62x/beagleplay_r5.config new file +15 -0
@@ -0,0 +1,15 @@ +# Defconfig fragment to apply on top of: +# am62x_evm_r5_defconfig +# +CONFIG_DEFAULT_DEVICE_TREE="k3-am625-r5-beagleplay" +CONFIG_OF_LIST="k3-am625-r5-beagleplay" +CONFIG_SPL_OF_LIST="k3-am625-r5-beagleplay" +# Do spl board init +CONFIG_SPL_BOARD_INIT=y +# Do not use emmc boot - we will use FS only +CONFIG_SUPPORT_EMMC_BOOT=n +# No SPI flash on Beagleplay +CONFIG_SPI=n +CONFIG_SPI_FLASH=n +CONFIG_SPL_DM_SPI_FLASH=n +CONFIG_SPL_SPI_FLASH_SUPPORT=n
Signature · 1 line
2.40.0
Re: [PATCH V5 16/17] board: ti: am62x: Add am62x_beagleplay_* defconfigs and env file
Quoted 4 lines · Nishanth Menon
Add defconfig fragments for am625 based beagleplay and corresponding customized environment file for beagleplay.
Signed-off-by Nishanth Menon <[email protected]>
Quoted 125 lines
---
Changes Since V4:
* New bootstd baseline
* have'nt picked up Mattijs's review as a resultV4: https://lore.kernel.org/r/[email protected]
V3: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/u-boot/[email protected]/
V1: https://lore.kernel.org/all/[email protected]/board/ti/am62x/beagleplay.env | 18 +++++++++ board/ti/am62x/beagleplay_a53.config | 55 ++++++++++++++++++++++++++++ board/ti/am62x/beagleplay_r5.config | 15 ++++++++ 3 files changed, 88 insertions(+) create mode 100644 board/ti/am62x/beagleplay.env create mode 100644 board/ti/am62x/beagleplay_a53.config create mode 100644 board/ti/am62x/beagleplay_r5.configboard/ti/am62x/beagleplay.env new file +18
-0@@ -0,0 +1,18 @@ +#include <env/ti/ti_common.env> +#include <env/ti/mmc.env> + +name_kern=Image +console=ttyS2,115200n8 +args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 +run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} +set_led_state_fail_load= led led-0 off; led led-1 on; + led led-2 off; led led-3 on; led led-4 off +set_led_state_start_load=led led-0 on; led led-1 off; + led led-2 on; led led-3 off; led led-4 on +boot=mmc +mmcdev=1 +bootpart=1:1 +bootdir=/boot +boot_targets=mmc1 mmc0 usb pxe +bootmeths=extlinux efi +rd_spec=-board/ti/am62x/beagleplay_a53.config new file +55
-0@@ -0,0 +1,55 @@ +# Defconfig fragment to apply on top of am62x_evm_a53_defconfig + +CONFIG_DEFAULT_DEVICE_TREE="k3-am625-beagleplay" +CONFIG_OF_LIST="k3-am625-beagleplay" +CONFIG_SPL_OF_LIST="k3-am625-beagleplay" +CONFIG_BOOTCOMMAND="run set_led_state_start_load;run findfdt; run envboot; bootflow scan -lb;run set_led_state_fail_load" +CONFIG_EXT4_WRITE=y +CONFIG_LZO=y +CONFIG_AUTOBOOT_KEYED=y +CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" +CONFIG_AUTOBOOT_DELAY_STR="d" +CONFIG_AUTOBOOT_STOP_STR=" " +# Use the Beagleplay env file +CONFIG_ENV_SOURCE_FILE="beagleplay" +# Do not use emmc boot - we will use FS only +CONFIG_SUPPORT_EMMC_BOOT=n +CONFIG_MMC_IO_VOLTAGE=y +# CONFIG_SPL_MMC_IO_VOLTAGE is not set +CONFIG_MMC_UHS_SUPPORT=y +# CONFIG_SPL_MMC_UHS_SUPPORT is not set +CONFIG_MMC_HS200_SUPPORT=y +# CONFIG_SPL_MMC_HS200_SUPPORT is not set +# Enable GPIO control +CONFIG_DM_GPIO=y +CONFIG_SPL_GPIO=y +CONFIG_DA8XX_GPIO=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPIO_READ=y +# Enable LEDs +CONFIG_LED=y +CONFIG_LED_GPIO=y +CONFIG_SPL_LED=y +CONFIG_SPL_LED_GPIO=y +# Enable I2C bus +CONFIG_SPL_I2C=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_OMAP24XX=y +CONFIG_CMD_I2C=y +# Regulator +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_DM_REGULATOR_GPIO=y +CONFIG_CMD_REGULATOR=y +CONFIG_DM_REGULATOR_TPS65219=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_TPS65219=y +CONFIG_CMD_PMIC=y +# Uses Realtek phy rather than TI phy +CONFIG_PHY_TI_DP83867=n +CONFIG_PHY_REALTEK=y +# No SPI flash on Beagleplay +CONFIG_SPI=n +CONFIG_SPI_FLASH=n +CONFIG_SPL_DM_SPI_FLASH=n +CONFIG_SPL_SPI_FLASH_SUPPORT=nboard/ti/am62x/beagleplay_r5.config new file +15
-0@@ -0,0 +1,15 @@ +# Defconfig fragment to apply on top of: +# am62x_evm_r5_defconfig +# +CONFIG_DEFAULT_DEVICE_TREE="k3-am625-r5-beagleplay" +CONFIG_OF_LIST="k3-am625-r5-beagleplay" +CONFIG_SPL_OF_LIST="k3-am625-r5-beagleplay" +# Do spl board init +CONFIG_SPL_BOARD_INIT=y +# Do not use emmc boot - we will use FS only +CONFIG_SUPPORT_EMMC_BOOT=n +# No SPI flash on Beagleplay +CONFIG_SPI=n +CONFIG_SPI_FLASH=n +CONFIG_SPL_DM_SPI_FLASH=n +CONFIG_SPL_SPI_FLASH_SUPPORT=nSignature · 1 line
2.40.0
PATCH 1/1 board: ti: am62x: beagleplay: Disable semi-functional PSCI reset support
In reply to Nishanth MenonFrom: Jan Kiszka <[email protected]>
At this point, system shutdown is not supported by the DM firmware that TF-A calls. As we can't de-select only this feature, declare complete PSCI reset support as non-functional so that we don't signal incomplete support to the OS via EFI runtime services. This makes power-off under Linux work again when booting via EFI.
--- board/ti/am62x/beagleplay_a53.config | 2 ++ 1 file changed, 2 insertions(+)
board/ti/am62x/beagleplay_a53.config +2 -0
@@ -53,3 +53,5 @@ CONFIG_SPI=n CONFIG_SPI_FLASH=n CONFIG_SPL_DM_SPI_FLASH=n CONFIG_SPL_SPI_FLASH_SUPPORT=n +# DM firmware lacks support for shutdown +# CONFIG_PSCI_RESET is not set
--
2.35.3
Re: [PATCH] board: ti: am62x: beagleplay: Disable semi-functional PSCI reset support
Quoted 18 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
At this point, system shutdown is not supported by the DM firmware that TF-A calls. As we can't de-select only this feature, declare complete PSCI reset support as non-functional so that we don't signal incomplete support to the OS via EFI runtime services. This makes power-off under Linux work again when booting via EFI.
Signed-off-by Jan Kiszka <[email protected]>--- board/ti/am62x/beagleplay_a53.config | 2 ++ 1 file changed, 2 insertions(+)board/ti/am62x/beagleplay_a53.config +0
-0
board/ti/am62x/beagleplay_a53.config CONFIG_SPI=n · line 57
Quoted 5 lines
board/ti/am62x/beagleplay_a53.config +2
-0@@ -53,3 +53,5 @@ CONFIG_SPI=n CONFIG_SPI_FLASH=n CONFIG_SPL_DM_SPI_FLASH=n CONFIG_SPL_SPI_FLASH_SUPPORT=n +# DM firmware lacks support for shutdown +# CONFIG_PSCI_RESET is not set
Is this lack of feature for just the beagleplay part of the firmware stack or more generically to the TI am62x platforms?
Signature · 1 line
Tom
Re: [PATCH] board: ti: am62x: beagleplay: Disable semi-functional PSCI reset support
Quoted 14 lines · Tom Rini
Quoted 13 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
At this point, system shutdown is not supported by the DM firmware that TF-A calls. As we can't de-select only this feature, declare complete PSCI reset support as non-functional so that we don't signal incomplete support to the OS via EFI runtime services. This makes power-off under Linux work again when booting via EFI.
Signed-off-by Jan Kiszka <[email protected]>--- board/ti/am62x/beagleplay_a53.config | 2 ++ 1 file changed, 2 insertions(+)
Quoted 13 lines
board/ti/am62x/beagleplay_a53.config CONFIG_SPI=n · line 57
Quoted 10 lines
board/ti/am62x/beagleplay_a53.config +2
-0@@ -53,3 +53,5 @@ CONFIG_SPI=n CONFIG_SPI_FLASH=n CONFIG_SPL_DM_SPI_FLASH=n CONFIG_SPL_SPI_FLASH_SUPPORT=n +# DM firmware lacks support for shutdown +# CONFIG_PSCI_RESET is not setIs this lack of feature for just the beagleplay part of the firmware stack or more generically to the TI am62x platforms?
Thanks a ton Jan for digging deep into this and finding this. So much appreciated.
This is all K3 platforms with the exception of j7200-evm.
PSCI SYSTEM_OFF function is routed by TFA to DM, there is no implementation on DM side since involved PMIC and team is trying to lock in a manner in which it is easier for people to describe things.
PSCI SYSTEM_RESET on the other hand is handled correctly by DM.
Even though CONFIG_POWEROFF is disabled, apparently enabling PSCI_RESET results in EFI runtime services gets to think that poweroff is also supported. Looking at drivers/firmware/psci.c[1] efi request for poweroff is via EFI_RESET_SHUTDOWN[2] - so the specification itself mandates that both reset AND poweroff should be implemented.
Luckily for us we have a broken u-boot reset implementation, which last I looked was not following the h/w specifications and the intent was to move to PSCI -> DM for reset so that system can properly reset and not get randomly hung during reset under certain circumstances.
But, given the circumstances, I can pick this up and do it at am62_evm level rather than at just beagle level. I will pick this patch up and roll it up into v6 of the beagleplay series - but will modify am62x_evm config instead.
[1] https://github.com/u-boot/u-boot/blob/master/drivers/firmware/psci.c#L246
[2] https://uefi.org/specs/UEFI/2.9_A/08_Services_Runtime_Services.html?highlight=efiresetshutdown#resetsystem
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 1 line · Nishanth Menon
Add support for BeaglePlay - rev 5
Oopsie..
Quoted 2 lines
Full series: https://github.com/nmenon/fix-k3-dt-u-boot/commits/beagleplay-v4.2
^^ Wrong link! That line wasn't supposed to be in this email :(
Quoted 1 line
Instead the following should have been:
[...]
Quoted 2 lines
Complete code (with the tmp patch) can be found at:
https://github.com/nmenon/fix-k3-dt-u-boot/tree/beagleplay-v5
[...] Sorry for the spam..
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 63 lines · Nishanth Menon
Add support for BeaglePlay - rev 5
Full series: https://github.com/nmenon/fix-k3-dt-u-boot/commits/beagleplay-v4.2
Caveats:
* networking: pending https://lore.kernel.org/all/[email protected]/
* 32kclk and usb: pending:
https://lore.kernel.org/u-boot/[email protected]/
OR https://github.com/nmenon/fix-k3-dt-u-boot/commit/853b29d63c1ca642be316f1afb0fb778610dec46
being properly resolved (NOTE: without this patch, wlan is broken in
Linux as the 32kclk from SoC is incorrectly supplied to wlan as 25MHz)
* There seems to be a bug in Linux kernel with sdhci that seems to
depend on u-boot initialization of sdhci for functionality.CI loop check: https://github.com/u-boot/u-boot/pull/425 (whenever that gets done I guess).
Bootlogs:
SD Boot: https://gist.github.com/nmenon/c74acb3a895053e05623e886df77c8fe
eMMC, no SD boot: https://gist.github.com/nmenon/16df3b8fc0e9102f29ebb7836b950a08
eMMC with SD card: https://gist.github.com/nmenon/042dbe7c08589e7bfe1919da1fedc545Complete code (with the tmp patch) can be found at:
https://github.com/nmenon/fix-k3-dt-u-boot/tree/beagleplay-v5Baseline:
97841de68043(origin/next) Merge branch '2023-08-22-assorted-code-cleanups' into nextChanges since V4:
* Switched boot fromdistro_bootto bootstd - AM62 as a start will rely on txt env file.
* Cleanups aroundam625_init.c(new patches)
* Review comment fixups for documentation
* I have'nt picked up Mattijs's tested by since this is a different approach (bootstd Vsdistro_bootcmd)
* Dropped the sdhci patches ANDCFG_EXTRA_ENV_SETTINGS(Instead, we switch entirely to bootstd and move am62x-sk to bootstd along with it).V4: https://lore.kernel.org/all/[email protected]/
V3: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/u-boot/[email protected]/
V1: https://lore.kernel.org/all/[email protected]/Nishanth Menon (16):
include: configs:ti_armv7_common: Add documentation for protected
section
include: configs:am62x_evm: Drop unused SDRAM address
include: configs:am62x_evm: Wrap distroboot with
CONFIG_DISTRO_DEFAULTS
board: ti: am62x: am62x.env: Add explicitboot_targets
configs:am62x_evm_a53_defconfig: Switch to bootstd
include: configs:am62x_evm: Dropdistro_bootcmdusage
include: env: ti: ti_armv7_common.env: Rename to ti_common.env
include: env: ti:ti_common: Add a generic findfdt
board: ti: am62x: am62x.env: Use default findfdt
arm: mach-k3:am625_init: UseIS_ENABLED()
arm: mach-k3:am625_init: Convertrtc_erratumi2327_initto static
configs: am62x_evm*: EnableEMMC_BOOTconfiguration
arm: mach-k3: am625: Add support for UDA FS
arm: dts: k3-am625-sk-binman: Add labels for unsigned binary
board: ti: am62x: Add am62x_beagleplay_* defconfigs and env file
doc: board: ti: Add BeaglePlay documentation
Quoted 2 lines
Robert Nelson (1):
arm: dts: Add k3-am625-beagleplay
I re-tested v5.
Using baseline 97841de68043 ("Merge branch '2023-08-22-assorted-code-cleanups' into next") I could boot all the way to U-boot proper shell.
And the LEDs work for me as well with:
=> led led-0 toggle
So for the whole series:
Note that I did not tried any boot related commands since I mostly work on Android booting and I have not rebased my wip-branch yet.
Quoted 45 lines
arch/arm/dts/Makefile | 2 + .../dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi | 2195 +++++++++++++++++ arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 195 ++ arch/arm/dts/k3-am625-beagleplay.dts | 758 ++++++ arch/arm/dts/k3-am625-r5-beagleplay.dts | 86 + arch/arm/dts/k3-am625-sk-binman.dtsi | 4 +- arch/arm/mach-k3/am625_init.c | 49 +- board/siemens/iot2050/iot2050.env | 2 +- board/ti/am62ax/am62ax.env | 2 +- board/ti/am62x/MAINTAINERS | 7 + board/ti/am62x/am62x.env | 7 +- board/ti/am62x/beagleplay.env | 18 + board/ti/am62x/beagleplay_a53.config | 55 + board/ti/am62x/beagleplay_r5.config | 15 + board/ti/am64x/am64x.env | 2 +- board/ti/am65x/am65x.env | 2 +- board/ti/j721e/j721e.env | 2 +- board/ti/j721s2/j721s2.env | 2 +- board/ti/ks2_evm/k2e_evm.env | 2 +- board/ti/ks2_evm/k2g_evm.env | 2 +- board/ti/ks2_evm/k2hk_evm.env | 2 +- board/ti/ks2_evm/k2l_evm.env | 2 +- configs/am62x_evm_a53_defconfig | 6 +- configs/am62x_evm_r5_defconfig | 1 + doc/board/ti/am62x_beagleplay.rst | 256 ++ doc/board/ti/img/beagleplay_emmc.svg | 697 ++++++ doc/board/ti/k3.rst | 1 + include/configs/am62x_evm.h | 6 - include/configs/ti_armv7_common.h | 2 +- .../ti/{ti_armv7_common.env => ti_common.env} | 12 + 30 files changed, 4342 insertions(+), 50 deletions(-) create mode 100644 arch/arm/dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi create mode 100644 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi create mode 100644 arch/arm/dts/k3-am625-beagleplay.dts create mode 100644 arch/arm/dts/k3-am625-r5-beagleplay.dts create mode 100644 board/ti/am62x/beagleplay.env create mode 100644 board/ti/am62x/beagleplay_a53.config create mode 100644 board/ti/am62x/beagleplay_r5.config create mode 100644 doc/board/ti/am62x_beagleplay.rst create mode 100644 doc/board/ti/img/beagleplay_emmc.svg rename include/env/ti/{ti_armv7_common.env => ti_common.env} (71%)Signature · 1 line
2.40.0
PATCH v5 17/17 doc: board: ti: Add BeaglePlay documentation
In reply to Nishanth MenonAdd base documentation for BeaglePlay
---
Cc: Heinrich Schuchardt <[email protected]>
Changes Since V4:
- Just the verbage comment from Simon
V4: https://lore.kernel.org/r/[email protected]
V3: https://lore.kernel.org/all/[email protected]/
V2: https://lore.kernel.org/u-boot/[email protected]/
V1: https://lore.kernel.org/all/[email protected]/
doc/board/ti/am62x_beagleplay.rst | 256 ++++++++++ doc/board/ti/img/beagleplay_emmc.svg | 697 +++++++++++++++++++++++++++ doc/board/ti/k3.rst | 1 + 3 files changed, 954 insertions(+) create mode 100644 doc/board/ti/am62x_beagleplay.rst create mode 100644 doc/board/ti/img/beagleplay_emmc.svg
doc/board/ti/am62x_beagleplay.rst new file +256 -0
@@ -0,0 +1,256 @@ +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +.. sectionauthor:: Nishanth Menon <[email protected]> + +AM62x Beagleboard.org Beagleplay +================================ + +Introduction: +------------- + +BeagleBoard.org BeaglePlay is an easy to use, affordable open source +hardware single board computer based on the Texas Instruments AM625 +SoC that allows you to create connected devices that work even at long +distances using IEEE 802.15.4g LR-WPAN and IEEE 802.3cg 10Base-T1L. +Expansion is provided over open standards based mikroBUS, Grove and +QWIIC headers among other interfaces. + +Further information can be found at: + +* Product Page: https://beagleplay.org/ +* Hardware documentation: https://git.beagleboard.org/beagleplay/beagleplay + +Boot Flow: +---------- +Below is the pictorial representation of boot flow: + +.. image:: img/boot_diagram_k3_current.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:: k3.rst + :start-after: .. k3_rst_include_start_boot_sources + :end-before: .. k3_rst_include_end_boot_sources + +Build procedure: +---------------- +0. Setup the environment variables: + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_desc + :end-before: .. k3_rst_include_end_common_env_vars_desc + +.. include:: 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:: k3.rst + :start-after: .. k3_rst_include_start_common_env_vars_defn + :end-before: .. k3_rst_include_end_common_env_vars_defn +.. code-block:: bash + + $ export UBOOT_CFG_CORTEXR="am62x_evm_r5_defconfig beagleplay_r5.config" + $ export UBOOT_CFG_CORTEXA="am62x_evm_a53_defconfig beagleplay_a53.config" + $ export TFA_BOARD=lite + $ # we dont use any extra TFA parameters + $ unset TFA_EXTRA_ARGS + $ export OPTEE_PLATFORM=k3-am62x + $ export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y" + +.. include:: am62x_sk.rst + :start-after: .. am62x_evm_rst_include_start_build_steps + :end-before: .. am62x_evm_rst_include_end_build_steps + +Target Images +-------------- +Copy the below images to an SD card and boot: + +* tiboot3-am62x-gp-evm.bin from R5 build as tiboot3.bin +* tispl.bin_unsigned from Cortex-A build as tispl.bin +* u-boot.img_unsigned from Cortex-A build as uboot.img + +Image formats: +-------------- + +- tiboot3.bin + +.. image:: img/multi_cert_tiboot3.bin.svg + :alt: tiboot3.bin image format + +- tispl.bin + +.. image:: img/dm_tispl.bin.svg + :alt: tispl.bin image format + +Flash to eMMC +------------- + +The eMMC layout selected is user-friendly for developers. The +boot hardware partition of the eMMC only contains the fixed-size +tiboot3.bin image. This is because the contents of the boot partitions +need to run from the SoC's internal SRAM, which remains a fixed size +constant. The other components of the boot sequence, such as tispl.bin +and u-boot.img, are located in the /BOOT partition in the User Defined +Area (UDA) hardware partition of the eMMC. These components can vary +significantly in size. The choice of keeping tiboot3.bin in boot0 or +boot1 partition depends on A/B update requirements. + +.. image:: img/beagleplay_emmc.svg + :alt: eMMC partitions and boot file organization for BeaglePlay + +The following are the steps from Linux shell to program eMMC: + +.. code-block:: bash + + # # Enable Boot0 boot + # mmc bootpart enable 1 2 /dev/mmcblk0 + # mmc bootbus set single_backward x1 x8 /dev/mmcblk0 + # mmc hwreset enable /dev/mmcblk0 + + # # Clear eMMC boot0 + # echo '0' >> /sys/class/block/mmcblk0boot0/force_ro + # dd if=/dev/zero of=/dev/mmcblk0boot0 count=32 bs=128k + # # Write tiboot3.bin + # dd if=tiboot3.bin of=/dev/mmcblk0boot0 bs=128k + + # # Copy the rest of the boot binaries + # mount /dev/mmcblk0p1 /boot/firmware + # cp tispl.bin /boot/firmware + # cp u-boot.img /boot/firmware + # sync + +.. warning :: + + U-Boot is configured to prioritize booting from an SD card if it + detects a valid boot partition and boot files on it, even if the + system initially booted from eMMC. The boot order is set as follows: + + * SD/MMC + * eMMC + * USB + * PXE + +LED patterns during boot +------------------------ + +.. list-table:: USR LED status indication + :widths: 16 16 + :header-rows: 1 + + * - USR LEDs (012345) + - Indicates + + * - 00000 + - Boot failure or R5 image not started up + + * - 11111 + - A53 SPL/U-boot has started up + + * - 10101 + - OS boot process has been initiated + + * - 01010 + - 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 `BeaglePlay documentation + <https://beagleplay.org/>`_ for further information. + +A53 SPL DDR Memory Layout +------------------------- + +.. include:: 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 `Beagleplay Schematics <https://git.beagleboard.org/beagleplay/beagleplay/-/blob/main/BeaglePlay_sch.pdf>`_ +for details. + +.. list-table:: Boot Modes + :widths: 16 16 16 + :header-rows: 1 + + * - USR Switch Position + - Primary Boot + - Secondary Boot + + * - Not Pressed + - eMMC + - UART + + * - Pressed + - SD/MMC File System (FS) mode + - USB Device Firmware Upgrade (DFU) mode + +To switch to SD card boot mode, hold the USR button while powering on +with Type-C power supply, then release when power LED lights up. + +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:: k3.rst + :start-after: .. k3_rst_include_start_openocd_connect_tag_connect + :end-before: .. k3_rst_include_end_openocd_connect_tag_connect + +.. include:: 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 BeaglePlay (AM62X platform), the openocd_connect.cfg: + +.. 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
doc/board/ti/img/beagleplay_emmc.svg new file +697 -0
697 lines not on this page · raw message
doc/board/ti/k3.rst +1 -0
@@ -30,6 +30,7 @@ K3 Based SoCs .. toctree:: :maxdepth: 1 + am62x_beagleplay am62x_sk ../toradex/verdin-am62 am64x_evm
Signature · 1 line
2.40.0