board: ti: Add support for BeaglePlay
cover board: ti: Add support for BeaglePlay
Add support for BeaglePlay
Boot log: https://gist.github.com/nmenon/e82fa95cff98942bdfc5c692a610c824
Full series can be found in: https://github.com/nmenon/fix-k3-dt-u-boot/commits/beagleplay-v1
Depends on: https://lore.kernel.org/all/[email protected]/
Caveats:
* I have kept networking out of picture for now as it is still evolving.
Nishanth Menon (5):
doc: board: ti: k3: Sort the boards in alphabetical order
arm: dts: k3-am625-sk-binman: Add labels for unsigned binary
board: ti: am62x: Add basic initialization for usb voltage, 32k
crystal, debounce
configs: Add am62x_beagleplay_* defconfigs
doc: board: ti: Add beagleplay documentation
Robert Nelson (1):
arm: dts: Add k3-am625-beagleplay
arch/arm/dts/Makefile | 4 +- .../dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi | 2195 +++++++++++++++++ arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 172 ++ arch/arm/dts/k3-am625-beagleplay.dts | 758 ++++++ arch/arm/dts/k3-am625-r5-beagleplay.dts | 87 + arch/arm/dts/k3-am625-sk-binman.dtsi | 4 +- board/ti/am62x/evm.c | 46 + configs/am62x_beagleplay_a53_defconfig | 90 + configs/am62x_beagleplay_r5_defconfig | 110 + doc/board/ti/am62x_beagleplay.rst | 169 ++ doc/board/ti/k3.rst | 5 +- 11 files changed, 3635 insertions(+), 5 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 configs/am62x_beagleplay_a53_defconfig create mode 100644 configs/am62x_beagleplay_r5_defconfig create mode 100644 doc/board/ti/am62x_beagleplay.rst
Signature · 1 line
2.40.0
PATCH 1/6 doc: board: ti: k3: Sort the boards in alphabetical order
Keep the boards sorted in alphabetical order.
--- doc/board/ti/k3.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
doc/board/ti/k3.rst +2 -2
@@ -30,10 +30,10 @@ K3 Based SoCs .. toctree:: :maxdepth: 1 - j721e_evm - j7200_evm am62x_sk am65x_evm + j7200_evm + j721e_evm Boot Flow Overview ------------------
Signature · 1 line
2.40.0
Re: [PATCH 1/6] doc: board: ti: k3: Sort the boards in alphabetical order
Quoted 3 lines · Nishanth Menon
Keep the boards sorted in alphabetical order.
Signed-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH 2/6 arm: dts: k3-am625-sk-binman: Add labels for unsigned binary
In reply to Nishanth MenonAdd labels for unsigned binary to permit over-ride.
--- 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
Re: [PATCH 2/6] arm: dts: k3-am625-sk-binman: Add labels for unsigned binary
Quoted 21 lines · Nishanth Menon
Add labels for unsigned binary to permit over-ride.
Signed-off-by Nishanth Menon <[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 +1
-1@@ -389,7 +389,7 @@ type = "flat_dt"; arch = "arm"; compression = "none"; - blob { + spl_am625_sk_dtb_unsigned: blob { filename = SPL_AM625_SK_DTB; }; };
arch/arm/dts/k3-am625-sk-binman.dtsi line 444
Quoted 8 lines
arch/arm/dts/k3-am625-sk-binman.dtsi +1
-1@@ -438,7 +438,7 @@ type = "flat_dt"; arch = "arm"; compression = "none"; - blob { + am625_sk_dtb_unsigned: blob { filename = AM625_SK_DTB; }; hash {
Simon, does this make sense?
Signature · 1 line
Tom
PATCH 3/6 board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
In reply to Nishanth MenonDo the basic configuration required for setting up the USB core voltage configuration, setup to configure the 32k clock coming from 32k crystal and the debounce configurations for the various pins.
--- board/ti/am62x/evm.c | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)
board/ti/am62x/evm.c +46 -0
@@ -78,8 +78,54 @@ static int video_setup(void)return 0 ; } +#define CTRLMMR_USB0_PHY_CTRL 0x43004008 +#define CTRLMMR_USB1_PHY_CTRL 0x43004018 +#define CORE_VOLTAGE 0x80000000 + +#define WKUP_CTRLMMR_DBOUNCE_CFG1 0x04504084 +#define WKUP_CTRLMMR_DBOUNCE_CFG2 0x04504088 +#define WKUP_CTRLMMR_DBOUNCE_CFG3 0x0450408c +#define WKUP_CTRLMMR_DBOUNCE_CFG4 0x04504090 +#define WKUP_CTRLMMR_DBOUNCE_CFG5 0x04504094 +#define WKUP_CTRLMMR_DBOUNCE_CFG6 0x04504098 +void spl_board_init (void ) { +u32 val; + +/* Set USB0 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB0_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB0_PHY_CTRL ); + +/* Set USB1 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB1_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB1_PHY_CTRL ); + +/* We have 32k crystal, so lets enable it */ + val =readl (MCU_CTRL_LFXOSC_CTRL ); + val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL ); +writel (val,MCU_CTRL_LFXOSC_CTRL ); +/* Add any TRIM needed for the crystal here.. */ +/* Make sure to mux up to take the SoC 32k from the crystal */ +writel (MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL , +MCU_CTRL_DEVICE_CLKOUT_32K_CTRL ); + +/* Setup debounce conf registers - arbitrary values. Times are approx */ +/* 1.9ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG1 ,0x1 ); +/* 5ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG2 ,0x5 ); +/* 20ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG3 ,0x14 ); +/* 46ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG4 ,0x18 ); +/* 100ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG5 ,0x1c ); +/* 156ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG6 ,0x1f ); +video_setup ();enable_caches ();if (IS_ENABLED (CONFIG_SPL_SPLASH_SCREEN ) &&IS_ENABLED (CONFIG_SPL_BMP ))
Signature · 1 line
2.40.0
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
Quoted 58 lines · Nishanth Menon
Do the basic configuration required for setting up the USB core voltage configuration, setup to configure the 32k clock coming from 32k crystal and the debounce configurations for the various pins.
Signed-off-by Nishanth Menon <[email protected]>--- board/ti/am62x/evm.c | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+)board/ti/am62x/evm.c +39
-0@@ -78,8 +78,54 @@ static int video_setup(void)return 0 ; } +#define CTRLMMR_USB0_PHY_CTRL 0x43004008 +#define CTRLMMR_USB1_PHY_CTRL 0x43004018 +#define CORE_VOLTAGE 0x80000000 + +#define WKUP_CTRLMMR_DBOUNCE_CFG1 0x04504084 +#define WKUP_CTRLMMR_DBOUNCE_CFG2 0x04504088 +#define WKUP_CTRLMMR_DBOUNCE_CFG3 0x0450408c +#define WKUP_CTRLMMR_DBOUNCE_CFG4 0x04504090 +#define WKUP_CTRLMMR_DBOUNCE_CFG5 0x04504094 +#define WKUP_CTRLMMR_DBOUNCE_CFG6 0x04504098 +void spl_board_init (void ) { +u32 val; + +/* Set USB0 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB0_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB0_PHY_CTRL ); + +/* Set USB1 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB1_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB1_PHY_CTRL ); + +/* We have 32k crystal, so lets enable it */ + val =readl (MCU_CTRL_LFXOSC_CTRL ); + val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL ); +writel (val,MCU_CTRL_LFXOSC_CTRL ); +/* Add any TRIM needed for the crystal here.. */ +/* Make sure to mux up to take the SoC 32k from the crystal */ +writel (MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL , +MCU_CTRL_DEVICE_CLKOUT_32K_CTRL ); + +/* Setup debounce conf registers - arbitrary values. Times are approx */ +/* 1.9ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG1 ,0x1 ); +/* 5ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG2 ,0x5 ); +/* 20ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG3 ,0x14 );
board/ti/am62x/evm.c static int video_setup(void) · line 131
Quoted 10 lines
board/ti/am62x/evm.c +7
-0+/* 46ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG4 ,0x18 ); +/* 100ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG5 ,0x1c ); +/* 156ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG6 ,0x1f ); +video_setup ();enable_caches ();if (IS_ENABLED (CONFIG_SPL_SPLASH_SCREEN ) &&IS_ENABLED (CONFIG_SPL_BMP ))
Here's a whole lot of seemingly board specific code in a function and file that's supposed to support any am62 platform. Is this really what we need, where we need it?
Signature · 1 line
Tom
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
Quoted 1 line · Tom Rini
On Tue, Jul 25, 2023 at 01:52:50PM -0500, Nishanth Menon wrote:
[..]
Quoted 32 lines
Quoted 32 lines
board/ti/am62x/evm.c +32
-0+/* Set USB0 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB0_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB0_PHY_CTRL ); + +/* Set USB1 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB1_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB1_PHY_CTRL ); + +/* We have 32k crystal, so lets enable it */ + val =readl (MCU_CTRL_LFXOSC_CTRL ); + val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL ); +writel (val,MCU_CTRL_LFXOSC_CTRL ); +/* Add any TRIM needed for the crystal here.. */ +/* Make sure to mux up to take the SoC 32k from the crystal */ +writel (MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL , +MCU_CTRL_DEVICE_CLKOUT_32K_CTRL ); + +/* Setup debounce conf registers - arbitrary values. Times are approx */ +/* 1.9ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG1 ,0x1 ); +/* 5ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG2 ,0x5 ); +/* 20ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG3 ,0x14 ); +/* 46ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG4 ,0x18 ); +/* 100ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG5 ,0x1c ); +/* 156ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG6 ,0x1f );
Quoted 8 lines
board/ti/am62x/evm.c static int video_setup(void) · line 131
Quoted 4 lines
board/ti/am62x/evm.c +1
-0+video_setup ();enable_caches ();if (IS_ENABLED (CONFIG_SPL_SPLASH_SCREEN ) &&IS_ENABLED (CONFIG_SPL_BMP ))Here's a whole lot of seemingly board specific code in a function and file that's supposed to support any am62 platform. Is this really what we need, where we need it?
* without using the correct voltage for USB, we risk damaging the IOs - board specific, sure.
* 32k - without using the external 32k, 32k rc-osc comes into play, which is accurate +-20% - board specific, sure
* Debounce configuration - I'd argue this is'nt board specific as it sets up different timing configurations that can be customized, but should be sufficient for the varied common usecases.
That said, i can drop this patch from the series, but I am curious how we'd handle this kind of stuff cleanly..
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
Quoted 45 lines · Nishanth Menon
Quoted 1 line · Tom Rini
On Tue, Jul 25, 2023 at 01:52:50PM -0500, Nishanth Menon wrote:
[..]
Quoted 32 lines
Quoted 32 lines
board/ti/am62x/evm.c +32
-0+/* Set USB0 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB0_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB0_PHY_CTRL ); + +/* Set USB1 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB1_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB1_PHY_CTRL ); + +/* We have 32k crystal, so lets enable it */ + val =readl (MCU_CTRL_LFXOSC_CTRL ); + val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL ); +writel (val,MCU_CTRL_LFXOSC_CTRL ); +/* Add any TRIM needed for the crystal here.. */ +/* Make sure to mux up to take the SoC 32k from the crystal */ +writel (MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL , +MCU_CTRL_DEVICE_CLKOUT_32K_CTRL ); + +/* Setup debounce conf registers - arbitrary values. Times are approx */ +/* 1.9ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG1 ,0x1 ); +/* 5ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG2 ,0x5 ); +/* 20ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG3 ,0x14 ); +/* 46ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG4 ,0x18 ); +/* 100ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG5 ,0x1c ); +/* 156ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG6 ,0x1f );Quoted 8 lines
board/ti/am62x/evm.c static int video_setup(void) · line 131
Quoted 4 lines
board/ti/am62x/evm.c +1
-0+video_setup ();enable_caches ();if (IS_ENABLED (CONFIG_SPL_SPLASH_SCREEN ) &&IS_ENABLED (CONFIG_SPL_BMP ))Here's a whole lot of seemingly board specific code in a function and file that's supposed to support any am62 platform. Is this really what we need, where we need it?
Quoted 2 lines
* without using the correct voltage for USB, we risk damaging the IOs - board specific, sure.
So what happens when we do this on the other EVM, does it have the same values? Is there some must-always-be-safe values? Or is the answer "we must do this board specific to be safe" and so need to re-think what can and can't be shared between board builds.
Quoted 2 lines
* 32k - without using the external 32k, 32k rc-osc comes into play, which is accurate +-20% - board specific, sure
OK..
Quoted 3 lines
* Debounce configuration - I'd argue this is'nt board specific as it sets up different timing configurations that can be customized, but should be sufficient for the varied common usecases.
So this is, or this can be re-worked to be always correct (or, correct enough for the circumstances and limitations) values?
Quoted 2 lines
That said, i can drop this patch from the series, but I am curious how we'd handle this kind of stuff cleanly..
Well, we need to figure out how to handle this cleanly.
Signature · 1 line
Tom
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
Quoted 46 lines · Tom Rini
Quoted 45 lines · Nishanth Menon
Quoted 1 line · Tom Rini
On Tue, Jul 25, 2023 at 01:52:50PM -0500, Nishanth Menon wrote:
[..]
Quoted 40 lines
Quoted 26 lines
board/ti/am62x/evm.c +26
-0+/* Set USB0 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB0_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB0_PHY_CTRL ); + +/* Set USB1 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB1_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB1_PHY_CTRL ); + +/* We have 32k crystal, so lets enable it */ + val =readl (MCU_CTRL_LFXOSC_CTRL ); + val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL ); +writel (val,MCU_CTRL_LFXOSC_CTRL ); +/* Add any TRIM needed for the crystal here.. */ +/* Make sure to mux up to take the SoC 32k from the crystal */ +writel (MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL , +MCU_CTRL_DEVICE_CLKOUT_32K_CTRL ); + +/* Setup debounce conf registers - arbitrary values. Times are approx */ +/* 1.9ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG1 ,0x1 ); +/* 5ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG2 ,0x5 ); +/* 20ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG3 ,0x14 );board/ti/am62x/evm.c static int video_setup(void) · line 131
Quoted 10 lines
board/ti/am62x/evm.c +7
-0+/* 46ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG4 ,0x18 ); +/* 100ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG5 ,0x1c ); +/* 156ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG6 ,0x1f ); +video_setup ();enable_caches ();if (IS_ENABLED (CONFIG_SPL_SPLASH_SCREEN ) &&IS_ENABLED (CONFIG_SPL_BMP ))Here's a whole lot of seemingly board specific code in a function and file that's supposed to support any am62 platform. Is this really what we need, where we need it?
Quoted 7 lines
Quoted 2 lines
* without using the correct voltage for USB, we risk damaging the IOs - board specific, sure.
So what happens when we do this on the other EVM, does it have the same values? Is there some must-always-be-safe values? Or is the answer "we must do this board specific to be safe" and so need to re-think what can and can't be shared between board builds.
At least the ones we have currently (I am not sure about toradex, phytech etc), seem to operate the vdd_core at 0.85V .. (which is what USB is dependent upon).
Quoted 4 lines
Quoted 3 lines
* 32k - without using the external 32k, 32k rc-osc comes into play, which is accurate +-20% - board specific, sure
Quoted 8 lines
OK..
Quoted 3 lines
* Debounce configuration - I'd argue this is'nt board specific as it sets up different timing configurations that can be customized, but should be sufficient for the varied common usecases.
So this is, or this can be re-worked to be always correct (or, correct enough for the circumstances and limitations) values?
correct enough for the known usage models (keys, card detects, hdmi hpd kind of stuff)
Quoted 5 lines
Quoted 3 lines
That said, i can drop this patch from the series, but I am curious how we'd handle this kind of stuff cleanly..
Well, we need to figure out how to handle this cleanly.
Bit out of ideas at the moment, I should drop it from the next rev of the series?
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
Quoted 50 lines · Nishanth Menon
Quoted 49 lines · Tom Rini
Quoted 47 lines · Nishanth Menon
Quoted 1 line · Tom Rini
On Tue, Jul 25, 2023 at 01:52:50PM -0500, Nishanth Menon wrote:
[..]
Quoted 32 lines
Quoted 32 lines
board/ti/am62x/evm.c +32
-0+/* Set USB0 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB0_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB0_PHY_CTRL ); + +/* Set USB1 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB1_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB1_PHY_CTRL ); + +/* We have 32k crystal, so lets enable it */ + val =readl (MCU_CTRL_LFXOSC_CTRL ); + val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL ); +writel (val,MCU_CTRL_LFXOSC_CTRL ); +/* Add any TRIM needed for the crystal here.. */ +/* Make sure to mux up to take the SoC 32k from the crystal */ +writel (MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL , +MCU_CTRL_DEVICE_CLKOUT_32K_CTRL ); + +/* Setup debounce conf registers - arbitrary values. Times are approx */ +/* 1.9ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG1 ,0x1 ); +/* 5ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG2 ,0x5 ); +/* 20ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG3 ,0x14 ); +/* 46ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG4 ,0x18 ); +/* 100ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG5 ,0x1c ); +/* 156ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG6 ,0x1f );Quoted 8 lines
board/ti/am62x/evm.c static int video_setup(void) · line 131
Quoted 4 lines
board/ti/am62x/evm.c +1
-0+video_setup ();enable_caches ();if (IS_ENABLED (CONFIG_SPL_SPLASH_SCREEN ) &&IS_ENABLED (CONFIG_SPL_BMP ))Here's a whole lot of seemingly board specific code in a function and file that's supposed to support any am62 platform. Is this really what we need, where we need it?
* without using the correct voltage for USB, we risk damaging the IOs - board specific, sure.
Quoted 8 lines
Quoted 4 lines
So what happens when we do this on the other EVM, does it have the same values? Is there some must-always-be-safe values? Or is the answer "we must do this board specific to be safe" and so need to re-think what can and can't be shared between board builds.
At least the ones we have currently (I am not sure about toradex, phytech etc), seem to operate the
vdd_coreat 0.85V .. (which is what USB is dependent upon).
For Toradex, we do have the equivalent code in our board file, see
https://git.toradex.com/cgit/u-boot-toradex.git/tree/board/toradex/verdin-am62/verdin-am62.c?h=toradex_ti-u-boot-2023.04#n92
The 32kHz configuration is just different for us, we do not re-use the same you have here.
The debounce conf registers I have no idea what they are about, something we should have also on our board? Any additional details?
Francesco
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
Quoted 60 lines · Francesco Dolcini
Quoted 50 lines · Nishanth Menon
Quoted 49 lines · Tom Rini
Quoted 47 lines · Nishanth Menon
Quoted 1 line · Tom Rini
On Tue, Jul 25, 2023 at 01:52:50PM -0500, Nishanth Menon wrote:
[..]
Quoted 32 lines
Quoted 32 lines
board/ti/am62x/evm.c +32
-0+/* Set USB0 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB0_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB0_PHY_CTRL ); + +/* Set USB1 PHY core voltage to 0.85V */ + val =readl (CTRLMMR_USB1_PHY_CTRL ); + val &= ~(CORE_VOLTAGE ); +writel (val,CTRLMMR_USB1_PHY_CTRL ); + +/* We have 32k crystal, so lets enable it */ + val =readl (MCU_CTRL_LFXOSC_CTRL ); + val &= ~(MCU_CTRL_LFXOSC_32K_DISABLE_VAL ); +writel (val,MCU_CTRL_LFXOSC_CTRL ); +/* Add any TRIM needed for the crystal here.. */ +/* Make sure to mux up to take the SoC 32k from the crystal */ +writel (MCU_CTRL_DEVICE_CLKOUT_LFOSC_SELECT_VAL , +MCU_CTRL_DEVICE_CLKOUT_32K_CTRL ); + +/* Setup debounce conf registers - arbitrary values. Times are approx */ +/* 1.9ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG1 ,0x1 ); +/* 5ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG2 ,0x5 ); +/* 20ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG3 ,0x14 ); +/* 46ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG4 ,0x18 ); +/* 100ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG5 ,0x1c ); +/* 156ms debounce @ 32k */ +writel (WKUP_CTRLMMR_DBOUNCE_CFG6 ,0x1f );Quoted 8 lines
board/ti/am62x/evm.c static int video_setup(void) · line 131
Quoted 4 lines
board/ti/am62x/evm.c +1
-0+video_setup ();enable_caches ();if (IS_ENABLED (CONFIG_SPL_SPLASH_SCREEN ) &&IS_ENABLED (CONFIG_SPL_BMP ))Here's a whole lot of seemingly board specific code in a function and file that's supposed to support any am62 platform. Is this really what we need, where we need it?
* without using the correct voltage for USB, we risk damaging the IOs - board specific, sure.
Quoted 8 lines
Quoted 4 lines
So what happens when we do this on the other EVM, does it have the same values? Is there some must-always-be-safe values? Or is the answer "we must do this board specific to be safe" and so need to re-think what can and can't be shared between board builds.
At least the ones we have currently (I am not sure about toradex, phytech etc), seem to operate the
vdd_coreat 0.85V .. (which is what USB is dependent upon).
Quoted 8 lines
For Toradex, we do have the equivalent code in our board file, see
https://git.toradex.com/cgit/u-boot-toradex.git/tree/board/toradex/verdin-am62/verdin-am62.c?h=toradex_ti-u-boot-2023.04#n92The 32kHz configuration is just different for us, we do not re-use the same you have here.
The debounce conf registers I have no idea what they are about, something we should have also on our board? Any additional details?
So, I got curious and checked on the datasheet/TRM on this debounce. If I understood correctly this is to have debounce on GPIO and/or EQEP.
However to my understanding this would need to have the corresponding DEBOUNCE_SEL register written on the pad configuration, and by default it's 0.
What's the use case for this debounce configuration you have here?
Francesco
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
On 00:35-20230726, Francesco Dolcini wrote:
[...]
Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
At least the ones we have currently (I am not sure about toradex, phytech etc), seem to operate the
vdd_coreat 0.85V .. (which is what USB is dependent upon).For Toradex, we do have the equivalent code in our board file, see
https://git.toradex.com/cgit/u-boot-toradex.git/tree/board/toradex/verdin-am62/verdin-am62.c?h=toradex_ti-u-boot-2023.04#n92The 32kHz configuration is just different for us, we do not re-use the same you have here.
True, you are hitting the bypass control and not powering on the oscillator control since the 32k is incoming from RTC, in my case, since I have an actual 32k crystal, I am clearing the powerdown.
Quoted 6 lines
Quoted 3 lines
The debounce conf registers I have no idea what they are about, something we should have also on our board? Any additional details?
So, I got curious and checked on the datasheet/TRM on this debounce. If I understood correctly this is to have debounce on GPIO and/or EQEP.
Typically, yes - input signals more useful for eQEP or GPIO. but the implementation is at pin level which, technically could be used for other purposes (but I have'nt seen any).
Quoted 5 lines
However to my understanding this would need to have the corresponding
DEBOUNCE_SELregister written on the pad configuration, and by default it's 0.What's the use case for this debounce configuration you have here?
TRM was a bit of a crap (internal ticket was filed to improve), but long story short:
* bootloader configures delays per index
* in the pinmux configuration, we pick which index to use for the pin
On Beagleplay, for example, the HDMI hot plug detect GPIO benefited from this[1]. Corresponding pinctrl.h macros were posted in [2].
Why do it in the bootloader? since gpio inputs could also used in u-boot (e.g. MMC/CD)
All said, Tom's question is very valid - we'd rather not modify evm.c for these specific configurations (popcorn as they might be), and we need to figure out a better option to introduce this kind of variation cleanly. For now, I will try dropping this patch.
[1] https://git.beagleboard.org/beagleboard/linux/-/blob/v6.1.33-ti-rt-arm64-r6/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts#L311
[2] https://lore.kernel.org/all/[email protected]/
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
Quoted 10 lines · Nishanth Menon
Quoted 4 lines · Francesco Dolcini
However to my understanding this would need to have the corresponding
DEBOUNCE_SELregister written on the pad configuration, and by default it's 0.What's the use case for this debounce configuration you have here?
TRM was a bit of a crap (internal ticket was filed to improve), but long story short:
* bootloader configures delays per index
* in the pinmux configuration, we pick which index to use for the pin
Thanks, this clarify it.
Francesco
Re: [PATCH 3/6] board: ti: am62x: Add basic initialization for usb voltage, 32k crystal, debounce
In reply to Nishanth MenonQuoted 47 lines · Nishanth Menon
On 00:35-20230726, Francesco Dolcini wrote:
[...]Quoted 10 lines
Quoted 10 lines
Quoted 4 lines
At least the ones we have currently (I am not sure about toradex, phytech etc), seem to operate the
vdd_coreat 0.85V .. (which is what USB is dependent upon).For Toradex, we do have the equivalent code in our board file, see
https://git.toradex.com/cgit/u-boot-toradex.git/tree/board/toradex/verdin-am62/verdin-am62.c?h=toradex_ti-u-boot-2023.04#n92The 32kHz configuration is just different for us, we do not re-use the same you have here.
True, you are hitting the bypass control and not powering on the oscillator control since the 32k is incoming from RTC, in my case, since I have an actual 32k crystal, I am clearing the powerdown.
Quoted 6 lines
Quoted 3 lines
The debounce conf registers I have no idea what they are about, something we should have also on our board? Any additional details?
So, I got curious and checked on the datasheet/TRM on this debounce. If I understood correctly this is to have debounce on GPIO and/or EQEP.
Typically, yes - input signals more useful for eQEP or GPIO. but the implementation is at pin level which, technically could be used for other purposes (but I have'nt seen any).
Quoted 5 lines
However to my understanding this would need to have the corresponding
DEBOUNCE_SELregister written on the pad configuration, and by default it's 0.What's the use case for this debounce configuration you have here?
TRM was a bit of a crap (internal ticket was filed to improve), but long story short:
* bootloader configures delays per index
* in the pinmux configuration, we pick which index to use for the pinOn Beagleplay, for example, the HDMI hot plug detect GPIO benefited from this[1]. Corresponding
pinctrl.hmacros were posted in [2].Why do it in the bootloader? since gpio inputs could also used in u-boot (e.g. MMC/CD)
Quoted 9 lines
All said, Tom's question is very valid - we'd rather not modify
evm.cfor these specific configurations (popcorn as they might be), and we need to figure out a better option to introduce this kind of variation cleanly. For now, I will try dropping this patch.[1] https://git.beagleboard.org/beagleboard/linux/-/blob/v6.1.33-ti-rt-arm64-r6/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts#L311
[2] https://lore.kernel.org/all/[email protected]/
What happened to this? I still need something like this patch (a version that has the CFG register writes correctly ordered) on top of current master in order to get WIFI on the Beagleplay.
Jan
PATCH 4/6 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.
--- arch/arm/dts/Makefile | 4 +- .../dts/k3-am625-beagleplay-ddr4-1600MTs.dtsi | 2195 +++++++++++++++++ arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 172 ++ arch/arm/dts/k3-am625-beagleplay.dts | 758 ++++++ arch/arm/dts/k3-am625-r5-beagleplay.dts | 87 + 5 files changed, 3215 insertions(+), 1 deletion(-) 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 +3 -1
@@ -1304,7 +1304,9 @@ dtb-$(CONFIG_SOC_K3_AM642) += k3-am642-evm.dtb \ k3-am642-r5-sk.dtb dtb-$(CONFIG_SOC_K3_AM625) += k3-am625-sk.dtb \ - k3-am625-r5-sk.dtb + k3-am625-r5-sk.dtb \ + k3-am625-beagleplay.dtb \ + k3-am625-r5-beagleplay.dtb dtb-$(CONFIG_SOC_K3_AM62A7) += k3-am62a7-sk.dtb \ k3-am62a7-r5-sk.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 +172 -0
172 lines not on this page · raw message
arch/arm/dts/k3-am625-beagleplay.dts new file +758 -0
623 lines not on this page · raw message
arch/arm/dts/k3-am625-r5-beagleplay.dts new file +87 -0
87 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.
Re: [PATCH 4/6] arm: dts: Add k3-am625-beagleplay
Quoted 14 lines · Nishanth Menon
From: 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|]
Quoted 8 lines
https://beagleplay.org/
https://git.beagleboard.org/beagleplay/beagleplaybaseline of base device tree is v6.5-rc1.
Signed-off-by Robert Nelson <[email protected]>Co-developed-by Nishanth Menon <[email protected]>Signed-off-by Nishanth Menon <[email protected]>
Signature · 1 line
Tom
PATCH 5/6 configs: Add am62x_beagleplay_* defconfigs
In reply to Nishanth MenonAdd defconfigs for am625 based beagleplay
--- configs/am62x_beagleplay_a53_defconfig | 90 ++++++++++++++++++++ configs/am62x_beagleplay_r5_defconfig | 110 +++++++++++++++++++++++++ 2 files changed, 200 insertions(+) create mode 100644 configs/am62x_beagleplay_a53_defconfig create mode 100644 configs/am62x_beagleplay_r5_defconfig
configs/am62x_beagleplay_a53_defconfig new file +90 -0
@@ -0,0 +1,90 @@ +CONFIG_ARM=y +CONFIG_ARCH_K3=y +CONFIG_TI_SECURE_DEVICE=y +CONFIG_SYS_MALLOC_F_LEN=0x8000 +CONFIG_SPL_LIBCOMMON_SUPPORT=y +CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_NR_DRAM_BANKS=2 +CONFIG_SOC_K3_AM625=y +CONFIG_K3_ATF_LOAD_ADDR=0x9e780000 +CONFIG_TARGET_AM625_A53_EVM=y +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80b80000 +CONFIG_SPL_DM_SPI=y +CONFIG_DEFAULT_DEVICE_TREE="k3-am625-beagleplay" +CONFIG_SPL_TEXT_BASE=0x80080000 +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_DM_RESET=y +CONFIG_SPL_MMC=y +CONFIG_SPL_SERIAL=y +CONFIG_SPL_STACK_R_ADDR=0x82000000 +CONFIG_SPL_SIZE_LIMIT=0x40000 +CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x800 +CONFIG_SPL_FS_FAT=y +CONFIG_SPL_LIBDISK_SUPPORT=y +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_AUTOBOOT_KEYED=y +CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" +CONFIG_AUTOBOOT_DELAY_STR="d" +CONFIG_AUTOBOOT_STOP_STR=" " +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run distro_bootcmd" +CONFIG_SPL_HAS_BSS_LINKER_SECTION=y +CONFIG_SPL_BSS_START_ADDR=0x80c80000 +CONFIG_SPL_BSS_MAX_SIZE=0x80000 +CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y +CONFIG_SPL_SYS_MALLOC_SIMPLE=y +CONFIG_SPL_STACK_R=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x1400 +CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img" +CONFIG_SPL_DM_MAILBOX=y +CONFIG_SPL_POWER_DOMAIN=y +CONFIG_SPL_YMODEM_SUPPORT=y +CONFIG_SYS_BOOTM_LEN=0x800000 +CONFIG_CMD_MMC=y +CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_MULTI_DTB_FIT=y +CONFIG_SPL_MULTI_DTB_FIT=y +CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_SPL_DM=y +CONFIG_SPL_DM_SEQ_ALIAS=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SPL_OF_TRANSLATE=y +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_CLK_TI_SCI=y +CONFIG_DMA_CHANNELS=y +CONFIG_TI_K3_NAVSS_UDMA=y +CONFIG_TI_SCI_PROTOCOL=y +CONFIG_DM_MAILBOX=y +CONFIG_K3_SEC_PROXY=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_ADMA=y +CONFIG_SPL_MMC_SDHCI_ADMA=y +CONFIG_MMC_SDHCI_AM654=y +CONFIG_PHY=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y +CONFIG_PINCTRL_SINGLE=y +CONFIG_POWER_DOMAIN=y +CONFIG_TI_SCI_POWER_DOMAIN=y +CONFIG_K3_SYSTEM_CONTROLLER=y +CONFIG_REMOTEPROC_TI_K3_ARM64=y +CONFIG_RESET_TI_SCI=y +CONFIG_DM_SERIAL=y +CONFIG_SOC_DEVICE=y +CONFIG_SOC_DEVICE_TI_K3=y +CONFIG_SOC_TI=y +CONFIG_SYSRESET=y +CONFIG_SPL_SYSRESET=y +CONFIG_SYSRESET_TI_SCI=y +CONFIG_EXT4_WRITE=y +CONFIG_FS_FAT_MAX_CLUSTSIZE=16384 +CONFIG_LZO=y
configs/am62x_beagleplay_r5_defconfig new file +110 -0
110 lines not on this page · raw message
Signature · 1 line
2.40.0
PATCH 6/6 doc: board: ti: Add beagleplay documentation
In reply to Nishanth MenonAdd base documentation for beagleplay
--- doc/board/ti/am62x_beagleplay.rst | 169 ++++++++++++++++++++++++++++++ doc/board/ti/k3.rst | 1 + 2 files changed, 170 insertions(+) create mode 100644 doc/board/ti/am62x_beagleplay.rst
doc/board/ti/am62x_beagleplay.rst new file +169 -0
@@ -0,0 +1,169 @@ +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +.. sectionauthor:: Nishanth Menon <[email protected]> + +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: +https://beagleplay.org/ +https://git.beagleboard.org/beagleplay/beagleplay + +The boot flow follows the standard AM62X bootflow [1]_. + +Sources: +-------- +1. Trusted Firmware-A: + Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ + Branch: master + +2. OP-TEE: + Tree: https://github.com/OP-TEE/optee_os.git + Branch: master + +3. U-Boot: + Tree: https://source.denx.de/u-boot/u-boot + Branch: master + +4. TI Linux Firmware: + Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git + Branch: ti-linux-firmware + +Build procedure: +---------------- +1. Trusted Firmware-A: + +.. code-block:: bash + + $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ + TARGET_BOARD=lite SPD=opteed + +2. OP-TEE: + +.. code-block:: bash + + $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \ + CROSS_COMPILE64=aarch64-none-linux-gnu- + +3. U-Boot: + +* 3.1 R5: + +.. code-block:: bash + + $ make ARCH=arm am62x_beagleplay_r5_defconfig + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- \ + BINMAN_INDIRS=<path/to/ti-linux-firmware> + +* 3.2 A53: + +.. code-block:: bash + + $ make ARCH=arm am62x_beagleplay_a53_defconfig + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- \ + BL31=<path/to/trusted-firmware-a/dir>/build/k3/lite/release/bl31.bin \ + TEE=<path/to/optee_os/dir>/out/arm-plat-k3/core/tee-raw.bin \ + BINMAN_INDIRS=<path/to/ti-linux-firmware> + +Target Images +-------------- +Copy the below images to an SD card and boot: + +* tiboot3-am62x-gp-evm.bin from step 3.1 as tiboot3.bin +* tispl.bin_unsigned from step 3.2 as tispl.bin +* u-boot.img_unsigned from step 3.2 as uboot.img + +Image formats: +-------------- + +The Image format follows the standard AM62X image format [1]_. + +A53 SPL DDR Memory Layout +------------------------- + +This provides an overview memory usage in A53 SPL stage. + +.. list-table:: + :widths: 16 16 16 + :header-rows: 1 + + * - Region + - Start Address + - End Address + + * - EMPTY + - 0x80000000 + - 0x80080000 + + * - TEXT BASE + - 0x80080000 + - 0x800d8000 + + * - EMPTY + - 0x800d8000 + - 0x80200000 + + * - BMP IMAGE + - 0x80200000 + - 0x80b77660 + + * - STACK + - 0x80b77660 + - 0x80b77e60 + + * - GD + - 0x80b77e60 + - 0x80b78000 + + * - MALLOC + - 0x80b78000 + - 0x80b80000 + + * - EMPTY + - 0x80b80000 + - 0x80c80000 + + * - BSS + - 0x80c80000 + - 0x80d00000 + + * - BLOBS + - 0x80d00000 + - 0x80d00400 + + * - EMPTY + - 0x80d00400 + - 0x81000000 + +Switch Setting for Boot Mode +---------------------------- + +The Boot time switch option is configured via "USR" button on the board. +See https://git.beagleboard.org/beagleplay/beagleplay/-/blob/main/BeaglePlay_sch.pdf +for details. + +*Boot Modes* + +=========== ============ ============== +Switch Posn Primary Boot Secondary Boot +=========== ============ ============== +Not Pressed eMMC UART +Pressed SD FS mode USB DFU +=========== ============ ============== + +The procedure for using the USR button for switching to SD card boot mode +is to keep the USR button pressed while providing power over the Type-C power +supply and releasing the USR button once the power LED glows. + +References +---------- + +.. [1] :doc:`am62x_sk`
doc/board/ti/k3.rst +1 -0
@@ -30,6 +30,7 @@ K3 Based SoCs .. toctree:: :maxdepth: 1 + am62x_beagleplay am62x_sk am65x_evm j7200_evm
Signature · 1 line
2.40.0
Re: [PATCH 6/6] doc: board: ti: Add beagleplay documentation
Quoted 8 lines · Nishanth Menon
Add base documentation for beagleplay
Signed-off-by Nishanth Menon <[email protected]>--- doc/board/ti/am62x_beagleplay.rst | 169 ++++++++++++++++++++++++++++++ doc/board/ti/k3.rst | 1 + 2 files changed, 170 insertions(+) create mode 100644 doc/board/ti/am62x_beagleplay.rst
I think we have some room to improve things here, some right now and some as follow-up work.
[snip]
Quoted 23 lines
doc/board/ti/am62x_beagleplay.rst new file +23
-0+Sources: +-------- +1. Trusted Firmware-A: + Tree: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/ + Branch: master + +2. OP-TEE: + Tree: https://github.com/OP-TEE/optee_os.git + Branch: master + +3. U-Boot: + Tree: https://source.denx.de/u-boot/u-boot + Branch: master + +4. TI Linux Firmware: + Tree: git://git.ti.com/processor-firmware/ti-linux-firmware.git + Branch: ti-linux-firmware + +Build procedure: +---------------- +1. Trusted Firmware-A: + +.. code-block:: bash
doc/board/ti/am62x_beagleplay.rst line 54
Quoted 10 lines
doc/board/ti/am62x_beagleplay.rst new file +10
-0+ + $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ + TARGET_BOARD=lite SPD=opteed + +2. OP-TEE: + +.. code-block:: bash + + $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \ + CROSS_COMPILE64=aarch64-none-linux-gnu-
So, we have some generic wording on how to build TF-A and OP-TEE up in doc/board/ti/k3.rst. It should be made clearer if needed that unless otherwise indicated, top of tree is expected to be used for TF-A/OP-TEE and ti-linux-firmware for the ti-linux-firmware repo. Then just state that TF-A should be which of {lite|generic|j784s4} as it is a $family device. And we then drop much of the duplication here.
Quoted 9 lines
+3. U-Boot:
doc/board/ti/am62x_beagleplay.rst new file +8
-0+ +* 3.1 R5: + +.. code-block:: bash + + $ make ARCH=arm am62x_beagleplay_r5_defconfig + $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- \ + BINMAN_INDIRS=<path/to/ti-linux-firmware>
doc/board/ti/am62x_beagleplay.rst line 74
Quoted 10 lines
doc/board/ti/am62x_beagleplay.rst new file +10
-0+ +* 3.2 A53: + +.. code-block:: bash + + $ make ARCH=arm am62x_beagleplay_a53_defconfig + $ make ARCH=arm CROSS_COMPILE=aarch64-none-linux-gnu- \ + BL31=<path/to/trusted-firmware-a/dir>/build/k3/lite/release/bl31.bin \ + TEE=<path/to/optee_os/dir>/out/arm-plat-k3/core/tee-raw.bin \ + BINMAN_INDIRS=<path/to/ti-linux-firmware>
And can drop this.
doc/board/ti/am62x_beagleplay.rst line 82
Quoted 7 lines
doc/board/ti/am62x_beagleplay.rst new file +7
-0+Target Images +-------------- +Copy the below images to an SD card and boot: + +* tiboot3-am62x-gp-evm.bin from step 3.1 as tiboot3.bin +* tispl.bin_unsigned from step 3.2 as tispl.bin +* u-boot.img_unsigned from step 3.2 as uboot.img
Then reword this to be "from R5" or "from Axx" build.
doc/board/ti/am62x_beagleplay.rst line 90
Quoted 7 lines
doc/board/ti/am62x_beagleplay.rst new file +7
-0+Image formats: +-------------- + +The Image format follows the standard AM62X image format [1]_. + +A53 SPL DDR Memory Layout +-------------------------
This is unchanged for all AM62 platforms, yes? That should be in a generic am62 doc.
Signature · 1 line
Tom
Re: [PATCH 6/6] doc: board: ti: Add beagleplay documentation
Quoted 2 lines · Tom Rini
On Tue, Jul 25, 2023 at 01:52:53PM -0500, Nishanth Menon wrote:
[...]
Quoted 15 lines
Quoted 15 lines
doc/board/ti/am62x_beagleplay.rst new file +15
-0+ +Build procedure: +---------------- +1. Trusted Firmware-A: + +.. code-block:: bash + + $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ + TARGET_BOARD=lite SPD=opteed + +2. OP-TEE: + +.. code-block:: bash + + $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \
Quoted 8 lines
Quoted 1 line
+ CROSS_COMPILE64=aarch64-none-linux-gnu-
So, we have some generic wording on how to build TF-A and OP-TEE up in
doc/board/ti/k3.rst. It should be made clearer if needed that unless otherwise indicated, top of tree is expected to be used for TF-A/OP-TEE and ti-linux-firmware for the ti-linux-firmware repo. Then just state that TF-A should be which of {lite|generic|j784s4} as it is a $family device. And we then drop much of the duplication here.
Also, Robert pointed out I missed K3_PM_SYSTEM_SUSPEND=1 :(
I am wondering how to let people read a single page and know all the steps to build the components needed instead of referring to other docs.
Are you thinking something like:
https://gist.github.com/nmenon/8c883ebf37a5d6021400cce9d76bfc35
I am not a sphinx expert, is this something you'd not like?
I have had feedback from multiple folks saying one single doc showing all the build commands for the platform is what they are trying to get.. so this might be a good trade-off, perhaps?
[..]
Quoted 10 lines
doc/board/ti/am62x_beagleplay.rst line 90
Quoted 7 lines
doc/board/ti/am62x_beagleplay.rst new file +7
-0+Image formats: +-------------- + +The Image format follows the standard AM62X image format [1]_. + +A53 SPL DDR Memory Layout +-------------------------This is unchanged for all AM62 platforms, yes? That should be in a generic am62 doc.
I really did think of it, but then, if we did have config fragments, I could have reused things, but at the moment, it is a different defconfig.. hence, though it is same at the moment, I cant guarantee it.
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 6/6] doc: board: ti: Add beagleplay documentation
Quoted 29 lines · Nishanth Menon
Quoted 2 lines · Tom Rini
On Tue, Jul 25, 2023 at 01:52:53PM -0500, Nishanth Menon wrote:
[...]
Quoted 15 lines
Quoted 15 lines
doc/board/ti/am62x_beagleplay.rst new file +15
-0+ +Build procedure: +---------------- +1. Trusted Firmware-A: + +.. code-block:: bash + + $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ + TARGET_BOARD=lite SPD=opteed + +2. OP-TEE: + +.. code-block:: bash + + $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \Quoted 8 lines
Quoted 1 line
+ CROSS_COMPILE64=aarch64-none-linux-gnu-
So, we have some generic wording on how to build TF-A and OP-TEE up in
doc/board/ti/k3.rst. It should be made clearer if needed that unless otherwise indicated, top of tree is expected to be used for TF-A/OP-TEE and ti-linux-firmware for the ti-linux-firmware repo. Then just state that TF-A should be which of {lite|generic|j784s4} as it is a $family device. And we then drop much of the duplication here.
Quoted 1 line
Also, Robert pointed out I missed K3_PM_SYSTEM_SUSPEND=1 :(
Ugh, how many platforms is that variable valid for?
Quoted 7 lines
I am wondering how to let people read a single page and know all the steps to build the components needed instead of referring to other docs.
Are you thinking something like:
https://gist.github.com/nmenon/8c883ebf37a5d6021400cce9d76bfc35I am not a sphinx expert, is this something you'd not like?
I was thinking something more literal and just not have specific copy/paste instructions as you have to fill in a real path to the other files. Just a link back to the K3 doc portion about building the other things.
Quoted 3 lines
I have had feedback from multiple folks saying one single doc showing all the build commands for the platform is what they are trying to get.. so this might be a good trade-off, perhaps?
Bah! Then we really need to figure out how to do something that is not literal copy/paste/minor edit, for every platform. But I've not played with doing something like that before.
Quoted 12 lines
[..]
Quoted 10 lines
doc/board/ti/am62x_beagleplay.rst line 90
Quoted 7 lines
doc/board/ti/am62x_beagleplay.rst new file +7
-0+Image formats: +-------------- + +The Image format follows the standard AM62X image format [1]_. + +A53 SPL DDR Memory Layout +-------------------------This is unchanged for all AM62 platforms, yes? That should be in a generic am62 doc.
Quoted 3 lines
I really did think of it, but then, if we did have config fragments, I could have reused things, but at the moment, it is a different defconfig.. hence, though it is same at the moment, I cant guarantee it.
Hunh? This isn't even a we have different SRAMs thing. Pick some values, use them every time, and note that they could be modified if needed, but it's not suggested as there's many implications to doing so. Especially since this is the SPL map.
Signature · 1 line
Tom
Re: [PATCH 6/6] doc: board: ti: Add beagleplay documentation
Quoted 30 lines · Tom Rini
Quoted 29 lines · Nishanth Menon
Quoted 2 lines · Tom Rini
On Tue, Jul 25, 2023 at 01:52:53PM -0500, Nishanth Menon wrote:
[...]
Quoted 23 lines
Quoted 6 lines
doc/board/ti/am62x_beagleplay.rst new file +6
-0+ +Build procedure: +---------------- +1. Trusted Firmware-A: + +.. code-block:: bashdoc/board/ti/am62x_beagleplay.rst line 54
Quoted 10 lines
doc/board/ti/am62x_beagleplay.rst new file +10
-0+ + $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ + TARGET_BOARD=lite SPD=opteed + +2. OP-TEE: + +.. code-block:: bash + + $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \ + CROSS_COMPILE64=aarch64-none-linux-gnu-So, we have some generic wording on how to build TF-A and OP-TEE up in
doc/board/ti/k3.rst. It should be made clearer if needed that unless otherwise indicated, top of tree is expected to be used for TF-A/OP-TEE and ti-linux-firmware for the ti-linux-firmware repo. Then just state that TF-A should be which of {lite|generic|j784s4} as it is a $family device. And we then drop much of the duplication here.
Quoted 4 lines
Quoted 1 line
Also, Robert pointed out I missed K3_PM_SYSTEM_SUSPEND=1 :(
Ugh, how many platforms is that variable valid for?
None soon :)
I'm getting rid of that flag in TF-A. There is a bug blocking me right now, but after that it will be automatic. Not sure if it is worth documenting a flag that is going away..
Andrew
Re: [PATCH 6/6] doc: board: ti: Add beagleplay documentation
Quoted 33 lines · Andrew Davis
Quoted 32 lines · Tom Rini
Quoted 30 lines · Nishanth Menon
Quoted 2 lines · Tom Rini
On Tue, Jul 25, 2023 at 01:52:53PM -0500, Nishanth Menon wrote:
[...]
Quoted 15 lines
Quoted 15 lines
doc/board/ti/am62x_beagleplay.rst new file +15
-0+ +Build procedure: +---------------- +1. Trusted Firmware-A: + +.. code-block:: bash + + $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ + TARGET_BOARD=lite SPD=opteed + +2. OP-TEE: + +.. code-block:: bash + + $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \Quoted 8 lines
Quoted 1 line
+ CROSS_COMPILE64=aarch64-none-linux-gnu-
So, we have some generic wording on how to build TF-A and OP-TEE up in
doc/board/ti/k3.rst. It should be made clearer if needed that unless otherwise indicated, top of tree is expected to be used for TF-A/OP-TEE and ti-linux-firmware for the ti-linux-firmware repo. Then just state that TF-A should be which of {lite|generic|j784s4} as it is a $family device. And we then drop much of the duplication here.Also, Robert pointed out I missed K3_PM_SYSTEM_SUSPEND=1 :(
Quoted 7 lines
Quoted 2 lines
Ugh, how many platforms is that variable valid for?
None soon :)
I'm getting rid of that flag in TF-A. There is a bug blocking me right now, but after that it will be automatic. Not sure if it is worth documenting a flag that is going away..
OK. But, automatic how? What I'm getting at, from both a documentation standpoint and also how I run my labs standpoint, is that it seems like instead of having a set of TF-A and OP-TEE binaries for each TI K3 platform I have, I really need just 3 different TF-A builds (well, in reality I don't have the J784s4 stuff so just 2) and a single OP-TEE build.
Signature · 1 line
Tom
Re: [PATCH 6/6] doc: board: ti: Add beagleplay documentation
Quoted 42 lines · Tom Rini
Quoted 33 lines · Andrew Davis
Quoted 32 lines · Tom Rini
Quoted 30 lines · Nishanth Menon
Quoted 2 lines · Tom Rini
On Tue, Jul 25, 2023 at 01:52:53PM -0500, Nishanth Menon wrote:
[...]
Quoted 15 lines
Quoted 15 lines
doc/board/ti/am62x_beagleplay.rst new file +15
-0+ +Build procedure: +---------------- +1. Trusted Firmware-A: + +.. code-block:: bash + + $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ + TARGET_BOARD=lite SPD=opteed + +2. OP-TEE: + +.. code-block:: bash + + $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \Quoted 8 lines
Quoted 1 line
+ CROSS_COMPILE64=aarch64-none-linux-gnu-
So, we have some generic wording on how to build TF-A and OP-TEE up in
doc/board/ti/k3.rst. It should be made clearer if needed that unless otherwise indicated, top of tree is expected to be used for TF-A/OP-TEE and ti-linux-firmware for the ti-linux-firmware repo. Then just state that TF-A should be which of {lite|generic|j784s4} as it is a $family device. And we then drop much of the duplication here.Also, Robert pointed out I missed K3_PM_SYSTEM_SUSPEND=1 :(
Quoted 7 lines
Quoted 2 lines
Ugh, how many platforms is that variable valid for?
None soon :)
I'm getting rid of that flag in TF-A. There is a bug blocking me right now, but after that it will be automatic. Not sure if it is worth documenting a flag that is going away..
Quoted 7 lines
OK. But, automatic how? What I'm getting at, from both a documentation standpoint and also how I run my labs standpoint, is that it seems like instead of having a set of TF-A and OP-TEE binaries for each TI K3 platform I have, I really need just 3 different TF-A builds (well, in reality I don't have the J784s4 stuff so just 2) and a single OP-TEE build.
If you don't have the flag K3_PM_SYSTEM_SUSPEND=1 today then some LPM modes in Linux will be unavailable, that would be the only problem, not sure if that matters to your testing.
You will need one OP-TEE per platform, for TF-A we combine some platforms into groups (generic: AM65,J7* ; lite: AM64*,AM62*). Depending on features we add in the future, even this grouping may also go away at some point, so it will match OP-TEE (one TF-A build per platform).
Andrew
Re: [PATCH 6/6] doc: board: ti: Add beagleplay documentation
Quoted 55 lines · Andrew Davis
Quoted 42 lines · Tom Rini
Quoted 33 lines · Andrew Davis
Quoted 32 lines · Tom Rini
Quoted 30 lines · Nishanth Menon
Quoted 2 lines · Tom Rini
On Tue, Jul 25, 2023 at 01:52:53PM -0500, Nishanth Menon wrote:
[...]
Quoted 15 lines
Quoted 15 lines
(quoted diff) +15
-0+ +Build procedure: +---------------- +1. Trusted Firmware-A: + +.. code-block:: bash + + $ make CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=aarch64 PLAT=k3 \ + TARGET_BOARD=lite SPD=opteed + +2. OP-TEE: + +.. code-block:: bash + + $ make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-none-linux-gnueabihf- \Quoted 8 lines
Quoted 1 line
+ CROSS_COMPILE64=aarch64-none-linux-gnu-
So, we have some generic wording on how to build TF-A and OP-TEE up in
doc/board/ti/k3.rst. It should be made clearer if needed that unless otherwise indicated, top of tree is expected to be used for TF-A/OP-TEE and ti-linux-firmware for the ti-linux-firmware repo. Then just state that TF-A should be which of {lite|generic|j784s4} as it is a $family device. And we then drop much of the duplication here.Also, Robert pointed out I missed K3_PM_SYSTEM_SUSPEND=1 :(
Quoted 7 lines
Quoted 2 lines
Ugh, how many platforms is that variable valid for?
None soon :)
I'm getting rid of that flag in TF-A. There is a bug blocking me right now, but after that it will be automatic. Not sure if it is worth documenting a flag that is going away..
Quoted 7 lines
OK. But, automatic how? What I'm getting at, from both a documentation standpoint and also how I run my labs standpoint, is that it seems like instead of having a set of TF-A and OP-TEE binaries for each TI K3 platform I have, I really need just 3 different TF-A builds (well, in reality I don't have the J784s4 stuff so just 2) and a single OP-TEE build.
If you don't have the flag K3_PM_SYSTEM_SUSPEND=1 today then some LPM modes in Linux will be unavailable, that would be the only problem, not sure if that matters to your testing.
Quoted 5 lines
You will need one OP-TEE per platform, for TF-A we combine some platforms into groups (generic: AM65,J7* ; lite: AM64*,AM62*). Depending on features we add in the future, even this grouping may also go away at some point, so it will match OP-TEE (one TF-A build per platform).
Ah right, there was more than one PLATFORM for OP-TEE, OK, so I do need to have a few groups of binaries, thanks. But then this also goes with what I'm talking a bit about on IRC with Nishanth about copy/pasteable build docs. Since there is a lot of re-use I really want to avoid every board having a literal copy/paste from another board as that makes it easier to gloss over minor important differences. Something about re-using via inserting blocks and setting environment variables first should help here. And I'll go so far as to say it should reside outside of doc/board/ti/ too as while I'm not going to ask TI to re-write every elses board docs, we have a lot of "build TF-A and OP-TEE" instructions today, with slight variations to them. We should improve that as much as we can.
Signature · 1 line
Tom