AM62x SK EVM DT Sync + OSPI Support
cover AM62x SK EVM DT Sync + OSPI Support
* Sync the AM62x DTS files with the linux kernel.
* Also add configs necessary to enable ospi in uboot
* Add support for booting from OSPI Flash.
All changes have been tested on the AM62x SK EVM and the board successfully reached u-boot prompt using OSPI Flash:
``` U-Boot SPL 2022.10-00677-g160b1b2cd007-dirty (Oct 27 2022 - 14:24:55 +0530) SYSFW ABI: 3.1 (firmware rev 0x0008 '8.4.7--v08.04.07 (Jolly Jellyfi') Trying to boot from SPI Starting ATF on ARM64 core... NOTICE: BL31: v2.7(release):v2.7.0-dirty NOTICE: BL31: Built : 00:19:16, Sep 24 2022 U-Boot SPL 2022.10-00677-g160b1b2cd007-dirty (Oct 27 2022 - 14:25:21 +0530) SYSFW ABI: 3.1 (firmware rev 0x0008 '8.4.7--v08.04.07 (Jolly Jellyfi') Trying to boot from SPI U-Boot 2022.10-00677-g160b1b2cd007-dirty (Oct 27 2022 - 14:25:21 +0530) SoC: AM62X SR1.0 GP Model: Texas Instruments AM625 SK DRAM: 2 GiB Core: 47 devices, 18 uclasses, devicetree: separate MMC: mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2 Loading Environment from nowhere... OK In: serial@2800000 Out: serial@2800000 Err: serial@2800000 Net: No ethernet found. Hit any key to stop autoboot: 0 ```
Also the board was tested to boot till linux kernel after the DT sync changes. Hence verifying that the changes are valid.
Dhruva Gole (3):
arm: dts: k3-am62x: sync dt with linux kernel
arm: dts: Add OSPI support for AM62-SK
configs: enable OSPI related configs in AM62x
arch/arm/dts/k3-am62-main.dtsi | 54 ++++ arch/arm/dts/k3-am62-mcu.dtsi | 28 +++ arch/arm/dts/k3-am62.dtsi | 1 + arch/arm/dts/k3-am625-r5-sk.dts | 5 + arch/arm/dts/k3-am625-sk-u-boot.dtsi | 24 ++ arch/arm/dts/k3-am625-sk.dts | 354 +++++++++++++++++++++++++++ configs/am62x_evm_a53_defconfig | 19 ++ configs/am62x_evm_r5_defconfig | 22 ++ 8 files changed, 507 insertions(+)
Signature · 1 line
2.25.1
PATCH 1/3 arm: dts: k3-am62x: sync dt with linux kernel
Sync the DT Files with linux kernel (tag v6.0.3)
--- arch/arm/dts/k3-am62-main.dtsi | 54 +++++ arch/arm/dts/k3-am62-mcu.dtsi | 28 +++ arch/arm/dts/k3-am62.dtsi | 1 + arch/arm/dts/k3-am625-sk.dts | 354 +++++++++++++++++++++++++++++++++ 4 files changed, 437 insertions(+)
arch/arm/dts/k3-am62-main.dtsi +54 -0
@@ -165,6 +165,19 @@ }; }; + crypto: crypto@40900000 { + compatible = "ti,am62-sa3ul"; + reg = <0x00 0x40900000 0x00 0x1200>; + power-domains = <&k3_pds 70 TI_SCI_PD_SHARED>; + #address-cells = <2>; + #size-cells = <2>; + ranges = <0x00 0x40900000 0x00 0x40900000 0x00 0x30000>; + + dmas = <&main_pktdma 0xf501 0>, <&main_pktdma 0x7506 0>, + <&main_pktdma 0x7507 0>; + dma-names = "tx", "rx1", "rx2"; + }; + main_pmx0: pinctrl@f4000 { compatible = "pinctrl-single"; reg = <0x00 0xf4000 0x00 0x2ac>;
@@ -530,4 +543,45 @@ ti,mbox-num-users = <4>; ti,mbox-num-fifos = <16>; }; + + ecap0: pwm@23100000 { + compatible = "ti,am3352-ecap"; + #pwm-cells = <3>; + reg = <0x00 0x23100000 0x00 0x100>; + power-domains = <&k3_pds 51 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 51 0>; + clock-names = "fck"; + }; + + ecap1: pwm@23110000 { + compatible = "ti,am3352-ecap"; + #pwm-cells = <3>; + reg = <0x00 0x23110000 0x00 0x100>; + power-domains = <&k3_pds 52 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 52 0>; + clock-names = "fck"; + }; + + ecap2: pwm@23120000 { + compatible = "ti,am3352-ecap"; + #pwm-cells = <3>; + reg = <0x00 0x23120000 0x00 0x100>; + power-domains = <&k3_pds 53 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 53 0>; + clock-names = "fck"; + }; + + main_mcan0: can@20701000 { + compatible = "bosch,m_can"; + reg = <0x00 0x20701000 0x00 0x200>, + <0x00 0x20708000 0x00 0x8000>; + reg-names = "m_can", "message_ram"; + power-domains = <&k3_pds 98 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 98 6>, <&k3_clks 98 1>; + clock-names = "hclk", "cclk"; + interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "int0", "int1"; + bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>; + }; };
arch/arm/dts/k3-am62-mcu.dtsi +28 -0
@@ -53,4 +53,32 @@ power-domains = <&k3_pds 148 TI_SCI_PD_EXCLUSIVE>; clocks = <&k3_clks 148 0>; }; + + mcu_gpio_intr: interrupt-controller@4210000 { + compatible = "ti,sci-intr"; + reg = <0x00 0x04210000 0x00 0x200>; + ti,intr-trigger-type = <1>; + interrupt-controller; + interrupt-parent = <&gic500>; + #interrupt-cells = <1>; + ti,sci = <&dmsc>; + ti,sci-dev-id = <5>; + ti,interrupt-ranges = <0 104 4>; + }; + + mcu_gpio0: gpio@4201000 { + compatible = "ti,am64-gpio", "ti,keystone-gpio"; + reg = <0x00 0x4201000 0x00 0x100>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&mcu_gpio_intr>; + interrupts = <30>, <31>; + interrupt-controller; + #interrupt-cells = <2>; + ti,ngpio = <24>; + ti,davinci-gpio-unbanked = <0>; + power-domains = <&k3_pds 79 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 79 0>; + clock-names = "gpio"; + }; };
arch/arm/dts/k3-am62.dtsi +1 -0
@@ -66,6 +66,7 @@ <0x00 0x30200000 0x00 0x30200000 0x00 0x00010000>, /* DSS */ <0x00 0x31000000 0x00 0x31000000 0x00 0x00050000>, /* USB0 DWC3 Core window */ <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */ + <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */ <0x00 0x43600000 0x00 0x43600000 0x00 0x00010000>, /* SA3 sproxy data */ <0x00 0x44043000 0x00 0x44043000 0x00 0x00000fe0>, /* TI SCI DEBUG */ <0x00 0x44860000 0x00 0x44860000 0x00 0x00040000>, /* SA3 sproxy config */
arch/arm/dts/k3-am625-sk.dts +354 -0
404 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH 1/3] arm: dts: k3-am62x: sync dt with linux kernel
Quoted 1 line · Dhruva Gole
Sync the DT Files with linux kernel (tag v6.0.3)
I dont see why we are'nt syncing all k3 dts files?
That should be a separate series of it's own. And please use linus's tag like v6.0 instead of a stable tag.
Please ensure to send verification logs over gist.github.com or someplace similar to indicate success of boot of k3 platforms.
[...]
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 1/3] arm: dts: k3-am62x: sync dt with linux kernel
Hi Nishanth,
Quoted 6 lines · Nishanth Menon
Quoted 1 line · Dhruva Gole
Sync the DT Files with linux kernel (tag v6.0.3)
I dont see why we are'nt syncing all k3 dts files?
That should be a separate series of it's own. And please use linus's tag like v6.0 instead of a stable tag.
Okay, will keep this in mind henceforth. However I do believe that the DT sync in this particular case is the same as for the v6.0 tag as well.
Quoted 2 lines
Please ensure to send verification logs over gist.github.com or
I have already included boot logs for k3-am625-sk evm in the cover letter of this series:
https://lore.kernel.org/u-boot/[email protected]/
Quoted 4 lines
someplace similar to indicate success of boot of k3 platforms.
[...]
Signature · 3 lines
Best regards, Dhruva Gole Texas Instruments Incorporated
Re: [PATCH 1/3] arm: dts: k3-am62x: sync dt with linux kernel
Am Do., 3. Nov. 2022 um 07:13 Uhr schrieb Dhruva Gole <[email protected]>:
Quoted 8 lines
Hi Nishanth,
Quoted 4 lines · Nishanth Menon
Quoted 1 line · Dhruva Gole
Sync the DT Files with linux kernel (tag v6.0.3)
I dont see why we are'nt syncing all k3 dts files?
I would also like to see a sync of all k3 dts files!
Can you come up with such a patch the next days as it a duplicate of my patch here:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
greets
--
Christian Gmeiner, MSc
Re: Re: [PATCH 1/3] arm: dts: k3-am62x: sync dt with linux kernel
Hey,
Quoted 3 lines · Christian Gmeiner
[...]
I would also like to see a sync of all k3 dts files!
Please don't get me wrong, I am all in for a sync of all the K3 dts files.
Quoted 3 lines
Can you come up with such a patch the next days as it a duplicate of my patch here:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
This looks nice! I can't commit the time but in the process of syncing up all K3 devices' DTs in Uboot, I'm sure that in the near future
we can address this as well.
[...]
However, I would once again like to humbly request to let this patch series pass through. This AM62 DT Sync was just done as per Tom's request on my earlier patch series to enable OSPI support in SPL/ Uboot on the AM62 SK EVM, and that was the only real objective here. The DTS Sync is definitely a must and should be done soon for all other K3 platforms as well. But that need not block a useful feature addition for one particular board, is what I feel.
Signature · 2 lines
Regards, Dhruva Gole <[email protected]>
Re: [PATCH 1/3] arm: dts: k3-am62x: sync dt with linux kernel
In reply to Dhruva GoleQuoted 3 lines · Dhruva Gole
Sync the DT Files with linux kernel (tag v6.0.3)
Signed-off-by Dhruva Gole <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH 2/3 arm: dts: Add OSPI support for AM62-SK
In reply to Dhruva GoleAdd OSPI Support such that this device can boot up using OSPI Flash. Also can use the flash for other purposes if required from uboot.
--- arch/arm/dts/k3-am625-r5-sk.dts | 5 +++++ arch/arm/dts/k3-am625-sk-u-boot.dtsi | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+)
arch/arm/dts/k3-am625-r5-sk.dts +5 -0
@@ -155,3 +155,8 @@ status = "okay"; u-boot,dm-spl; }; + +&ospi0 { + reg = <0x00 0x0fc40000 0x00 0x100>, + <0x00 0x60000000 0x00 0x08000000>; +};
arch/arm/dts/k3-am625-sk-u-boot.dtsi +24 -0
@@ -102,3 +102,27 @@ &main_mmc1_pins_default { u-boot,dm-spl; }; + +&fss { + u-boot,dm-spl; +}; + +&ospi0_pins_default { + u-boot,dm-spl; +}; + +&ospi0 { + u-boot,dm-spl; + + flash@0 { + u-boot,dm-spl; + + partitions { + u-boot,dm-spl; + + partition@3fc0000 { + u-boot,dm-spl; + }; + }; + }; +};
Signature · 1 line
2.25.1
Re: [PATCH 2/3] arm: dts: Add OSPI support for AM62-SK
Quoted 4 lines · Dhruva Gole
Add OSPI Support such that this device can boot up using OSPI Flash. Also can use the flash for other purposes if required from uboot.
Signed-off-by Dhruva Gole <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
PATCH 3/3 configs: enable OSPI related configs in AM62x
In reply to Dhruva GoleAdd am62x_evm_r5_defconfig for OSPI Flash support in R5 SPL and am62x_evm_a53_defconfig for A53 SPL and U-Boot
support.
These configs enable OSPI Flash boot functionality in the board as well as the usage of OSPI Flash from U-Boot.
--- configs/am62x_evm_a53_defconfig | 19 +++++++++++++++++++ configs/am62x_evm_r5_defconfig | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+)
configs/am62x_evm_a53_defconfig +19 -0
@@ -14,6 +14,7 @@ CONFIG_SPL_SERIAL=y CONFIG_SPL_STACK_R_ADDR=0x82000000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y +CONFIG_SPL_SPI=y CONFIG_DISTRO_DEFAULTS=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000
@@ -31,7 +32,14 @@ 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_DM_SPI=y +CONFIG_SPL_DM_SPI_FLASH=y CONFIG_SPL_POWER_DOMAIN=y +# CONFIG_SPL_SPI_FLASH_TINY is not set +CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_LOAD=y +CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_SYS_BOOTM_LEN=0x800000 CONFIG_CMD_MMC=y
@@ -56,6 +64,14 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ADMA=y CONFIG_SPL_MMC_SDHCI_ADMA=y CONFIG_MMC_SDHCI_AM654=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SF_DEFAULT_MODE=0x3 +CONFIG_SF_DEFAULT_SPEED=25000000 +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_SOFT_RESET=y +CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_S28HS512T=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_SINGLE=y
@@ -69,6 +85,9 @@ CONFIG_DM_SERIAL=y CONFIG_SOC_DEVICE=y CONFIG_SOC_DEVICE_TI_K3=y CONFIG_SOC_TI=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_CADENCE_QSPI=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_TI_SCI=y
configs/am62x_evm_r5_defconfig +22 -0
@@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_K3=y +CONFIG_SYS_MALLOC_LEN=0x08000000 CONFIG_SYS_MALLOC_F_LEN=0x9000 CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y
@@ -17,6 +18,10 @@ CONFIG_SPL_STACK_R_ADDR=0x82000000 CONFIG_SPL_SIZE_LIMIT=0x40000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y +CONFIG_SPL_SPI=y +CONFIG_SPL_SPI_FLASH_SUPPORT=y +CONFIG_SPL_SPI_SUPPORT=y +CONFIG_SF_DEFAULT_SPEED=25000000 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x7000ffff CONFIG_SPL_LOAD_FIT=y
@@ -37,12 +42,17 @@ CONFIG_SYS_SPL_MALLOC_SIZE=0x1000000 CONFIG_SPL_EARLY_BSS=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x400 +CONFIG_SYS_SPI_U_BOOT_OFFS=0x80000 CONFIG_SPL_DM_MAILBOX=y CONFIG_SPL_DM_RESET=y +CONFIG_SPL_DM_SPI_FLASH=y CONFIG_SPL_POWER_DOMAIN=y CONFIG_SPL_RAM_SUPPORT=y CONFIG_SPL_RAM_DEVICE=y CONFIG_SPL_REMOTEPROC=y +# CONFIG_SPL_SPI_FLASH_TINY is not set +CONFIG_SPL_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPL_SPI_LOAD=y CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_HUSH_PARSER=y CONFIG_CMD_ASKENV=y
@@ -91,6 +101,16 @@ CONFIG_DM_RESET=y CONFIG_RESET_TI_SCI=y CONFIG_SPECIFY_CONSOLE_INDEX=y CONFIG_DM_SERIAL=y +CONFIG_DM_SPI=y +CONFIG_CADENCE_QSPI=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SF_DEFAULT_MODE=0 +CONFIG_SPI=y +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_SOFT_RESET=y +CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_S28HS512T=y CONFIG_SOC_DEVICE=y CONFIG_SOC_DEVICE_TI_K3=y CONFIG_SOC_TI=y
@@ -99,3 +119,5 @@ CONFIG_SPL_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_LIB_RATIONAL=y CONFIG_SPL_LIB_RATIONAL=y +CONFIG_ENV_SIZE=0x20000 +CONFIG_ENV_OFFSET=0x680000
Signature · 1 line
2.25.1
Re: [PATCH 3/3] configs: enable OSPI related configs in AM62x
Quoted 7 lines · Dhruva Gole
Add
am62x_evm_r5_defconfigfor OSPI Flash support in R5 SPL andam62x_evm_a53_defconfigfor A53 SPL and U-Boot
support.
These configs enable OSPI Flash boot functionality in the board as well as the usage of OSPI Flash from U-Boot.Signed-off-by Dhruva Gole <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
Quoted 38 lines · Dhruva Gole
* Sync the AM62x DTS files with the linux kernel.
* Also add configs necessary to enable ospi in uboot
* Add support for booting from OSPI Flash.All changes have been tested on the AM62x SK EVM and the board successfully reached u-boot prompt using OSPI Flash:
``` U-Boot SPL 2022.10-00677-g160b1b2cd007-dirty (Oct 27 2022 - 14:24:55 +0530) SYSFW ABI: 3.1 (firmware rev 0x0008 '8.4.7--v08.04.07 (Jolly Jellyfi') Trying to boot from SPI Starting ATF on ARM64 core... NOTICE: BL31: v2.7(release):v2.7.0-dirty NOTICE: BL31: Built : 00:19:16, Sep 24 2022 U-Boot SPL 2022.10-00677-g160b1b2cd007-dirty (Oct 27 2022 - 14:25:21 +0530) SYSFW ABI: 3.1 (firmware rev 0x0008 '8.4.7--v08.04.07 (Jolly Jellyfi') Trying to boot from SPI U-Boot 2022.10-00677-g160b1b2cd007-dirty (Oct 27 2022 - 14:25:21 +0530) SoC: AM62X SR1.0 GP Model: Texas Instruments AM625 SK DRAM: 2 GiB Core: 47 devices, 18 uclasses, devicetree: separate MMC: mmc@fa10000: 0, mmc@fa00000: 1, mmc@fa20000: 2 Loading Environment from nowhere... OK In: serial@2800000 Out: serial@2800000 Err: serial@2800000 Net: No ethernet found. Hit any key to stop autoboot: 0 ```
Quoted 2 lines
Also the board was tested to boot till linux kernel after the DT sync changes. Hence verifying that the changes are valid.
Additionally, it is also worth noting that this effort of syncing the DT with upstream linux kernel seems to have also gotten the am62x-sk evm's on-board emmc to work (which is mmc dev 0).
I have tested the same after booting to uboot prompt from the SD Card and then selecting mmc dev 0.
I tested erase, write and read operations and then compared the data written to and from the mmc dev 0 and the data remained intact.
Quoted 16 lines
Dhruva Gole (3):
arm: dts: k3-am62x: sync dt with linux kernel
arm: dts: Add OSPI support for AM62-SK
configs: enable OSPI related configs in AM62xarch/arm/dts/k3-am62-main.dtsi | 54 ++++ arch/arm/dts/k3-am62-mcu.dtsi | 28 +++ arch/arm/dts/k3-am62.dtsi | 1 + arch/arm/dts/k3-am625-r5-sk.dts | 5 + arch/arm/dts/k3-am625-sk-u-boot.dtsi | 24 ++ arch/arm/dts/k3-am625-sk.dts | 354 +++++++++++++++++++++++++++ configs/am62x_evm_a53_defconfig | 19 ++ configs/am62x_evm_r5_defconfig | 22 ++ 8 files changed, 507 insertions(+)
Signature · 3 lines
Best regards, Dhruva Gole Texas Instruments Incorporated