Commit Graph

70368 Commits

Author SHA1 Message Date
Sinthu Raja 4a59cef506 arch:arm:dts:k3-am64-sk Add lp4ddr config for 667MHz
AM64x SK lp4ddr with 800MHz frequency config which was initial data
facing random failures. Alternatively, lp4ddr configuration with
667MHz frequency is functioning stable. Lets Add AM64x SK lp4ddr
configuration data for 667MHz frequency. Also, Update
k3-am642-r5-sk.dts file to use the 667MHz dtsi file.

Validated memtester test on 900MB of lp4 ddr memory with multiple
iterations.

Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Reviewed-by: James Doublesin <doublesin@ti.com>
2021-06-03 08:03:42 -05:00
Vignesh Raghavendra 40a8290254 arm: dts: k3-j7200: Add wkup gpio node
Add wkup_gpio0 node required for detecting whether board mux is set to
HyperFlash.

Fixes: b4916daf24 ("arm: dts: k3-j7200: Sync Linux v5.11-rc6 dts into U-Boot")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-06-01 00:29:51 -05:00
Suman Anna 3b52287157 arm: dts: k3-j721e: Fix up MAIN R5FSS cluster mode back to Split-mode
The default U-Boot environment variables and design are all set up for
both the MAIN R5FSS clusters to be in Split-mode. This is the setting
in v2021.01 U-Boot and the dt nodes are synched with the newer kernel
binding property names in commit c118d25546 ("remoteproc: k3_r5:
Sync to upstreamed kernel DT property names").

The modes for both the clusters got switched back to LockStep mode by
mistake in commit 16c0c84460 ("arm: dts: k3-j721e: Sync Linux v5.11-rc6
dts into U-Boot"). This throws the following warning messages when
early-booting the cores using default env variables,

k3_r5f_rproc r5f@5d00000: Invalid op: Trying to start secondary core 7 in lockstep mode
Load Remote Processor 3 with data@addr=0x82000000 98484 bytes: Failed!
k3_r5f_rproc r5f@5f00000: Invalid op: Trying to start secondary core 9 in lockstep mode
Load Remote Processor 5 with data@addr=0x82000000 98484 bytes: Failed!

Fix this by switching back both the clusters to the expected Split-mode.
Make this mode change in the u-boot specific dtsi file to avoid such
sync overrides in the future until the kernel dts is also switched to
Split-mode by default.

Fixes: 16c0c84460 ("arm: dts: k3-j721e: Sync Linux v5.11-rc6 dts into U-Boot")
Reported-by: Minas Hambardzumyan <minas@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
2021-05-31 23:23:02 -05:00
Vignesh Raghavendra 287aa5895c ARM: dts: k3-am642/am654/j72xx: Fix ethernet alias for U-Boot
While Kernel expects ethernetX alias to point to individual ethernet
ports in case of multi MAC ethernet controller, U-Boot DM core expects
ethernetX alias to point to the node that ethernet (am65-cpsw-nuss)
driver binds to. Hence aliases copied from kernel DT will
leads to 3 issues:

- ethernet interfaces on K3 SoCs get a different seq number than that of
  intended alias (eg.: CPSW port0 on AM65x get eth1 instead of eth0).
- "ethaddr" env variable is no longer set to eFuse MAC address.
- U-Boot FDT fixup code won't update MAC address in Kernel's DT
  due to missing "ethaddr" variable.

Fix this by updating alias to point to CPSW node in -u-boot.dtsi file
for all K3 SoCs to match U-Boot's expectation.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2021-05-31 23:18:55 -05:00
Lokesh Vutla a6e7892957 configs: am64x_sk: Drop un used defconfigs
Now that sk and evm can be used in single defconfig, remove sk related
defconfigs.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla ae96398a41 configs: am64x_evm: Enable sk related defconfigs in evm defconfig
Enable all the relevant defconfigs for SK in EVM defconfigs.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla ae51349506 configs: am64x_evm_a53: Enable support for building multiple dtbs
Enable all relevant configs for building multiple dtbs into a single fit
image and load the right dtb for next stage.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla f6994fde80 configs: am64x_evm_a53: Sync defconfig with savedefconfig
Sync defconfig with savedefconfig.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla 957ec97a0b configs: am64x_evm_r5: Enable support for building multiple device trees
Enable defconfigs for building multiple device trees into a single FIT
image.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla 3e5cf62db7 configs: am64x_evm_r5: Enable checks for spl and stack sizes
Enable relevant configs that checks for the size of image and stack:
BSS: 4KB
Initial MALLOC: 512KB
Initial Stack: 8K
SPL Image size can be: ~960KB

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla 792ec7cc57 configs: am64x_evm_r5: Sync defconfigs with savedefconfig
Sync defconfig with savedefconfig

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla 373ef34241 include: configs: Update env for selecting right dtb
Now that single defconfig can be used for booting AM64 EVM and SK,
default device tree will not work for selecting dtb for kernel.
Update the env to select right dtb based on eeprom.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla f1e25a8a0f include: configs: am64x_evm: Optimize size of SPL BSS
Current BSS allocation of SPL is as below:
size spl/u-boot-spl
   text	   data	    bss	    dec	    hex	filename
 144572	   5484	   1752	 151808	  25100	spl/u-boot-spl

But 20KB is allocated currently for BSS. Reduce it to 4KB and
save some space for stack.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla 398cc66954 arm: dts: k3-am642-r5-evm: Do not use power-domains for I2C
I2C EEPROM will be probed before SYSFW is available.
So drop the power-domains property for I2C.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla f9506fc885 arm: am64x: Add support for selecting DT based on EEPROM
Enable support for selecting DTB within SPL based on EEPROM.
This will help to use single defconfig for both EVM and SK

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla 8cf23ced16 board: ti: am64x: Add support for detecting multiple device trees
Update the board_fit_config_name_match() to choose the right dtb.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla 86af205fc3 board: ti: am64x: Enable support for reading EEPROM in R5 SPL
Include the relevant configs to enable support for reading EEPROM in
R5SPL.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla d3ffde02c3 board: ti: am64x: Enable support for reading EEPROM at next alternate address
AM64 EVM has EEPROM populated at 0x50. Am64 SK has EEPROM populated at
next address 0x51 in order to be compatible with RBPi.
So start looking for TI specific EEPROM at 0x50, if not found look for
EEPROM at 0x51.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Lokesh Vutla c09f66901a board: ti: am64x: Guard functions with right #ifdef to avoid build warnings
setup_board_eeprom_env() and setup_serial() is called only under
CONFIG_BOARD_LATE_INIT, so guard these functions with the same.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2021-05-14 00:06:14 -05:00
Suman Anna fbbc964a35 arm: dts: k3-am642-sk: Add sysreset controller node
The AM64x SoC uses a central Device Management and Security Controller
(DMSC) processor that manages all the low-level device controls
including the system-wide SoC reset. The system-wide reset is managed
through the system reset driver.

Add a sysreset controller node as a child of the dmsc node to enable
the "reset" command from U-Boot prompt for the K3 AM642 SK.

Signed-off-by: Suman Anna <s-anna@ti.com>
2021-05-06 21:27:46 -05:00
Suman Anna 1e7e08c4fa arm: dts: k3-am642-evm: Add sysreset controller node
The AM64x SoC uses a central Device Management and Security Controller
(DMSC) processor that manages all the low-level device controls
including the system-wide SoC reset. The system-wide reset is managed
through the system reset driver.

Add a sysreset controller node as a child of the dmsc node to enable
the "reset" command from U-Boot prompt for the K3 AM642 EVM.

Signed-off-by: Suman Anna <s-anna@ti.com>
2021-05-06 21:27:46 -05:00
Dave Gerlach c4e18f0096 ram: k3-ddrss: Configure initial DDR PLL frequency in common location
Move all initial DDR PLL configuration to a common function so that it
happens in one place for DDR4 and LPDDR4 as needed.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
2021-05-06 13:50:49 -05:00
Martin Fuzzey 2c54957d5c env: Fix warning when forcing environment without ENV_ACCESS_IGNORE_FORCE
commit 9636bf8b2e upstream.

Since commit 0f036bf4b8 ("env: Warn on force access if ENV_ACCESS_IGNORE_FORCE set")
a warning message is displayed when setenv -f is used WITHOUT
CONFIG_ENV_ACCESS_IGNORE_FORCE, but the variable is set anyway, resulting
in lots of log pollution.

env_flags_validate() returns 0 if the access is accepted, or non zero
if it is refused.

So the original code
	#ifndef CONFIG_ENV_ACCESS_IGNORE_FORCE
		if (flag & H_FORCE)
			return 0;
	#endif

was correct, it returns 0 (accepts the modification) if forced UNLESS
IGNORE_FORCE is set (in which case access checks in the following code
are applied). The broken patch just added a printf to the force accepted
case.

To obtain the intent of the patch we need this:
	if (flag & H_FORCE) {
	#ifdef CONFIG_ENV_ACCESS_IGNORE_FORCE
		printf("## Error: Can't force access to \"%s\"\n", name);
	#else
		return 0;
	#endif
	}

Fixes: 0f036bf4b8 ("env: Warn on force access if ENV_ACCESS_IGNORE_FORCE set")

Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
[s-anna@ti.com: cherry-pick commit '9636bf8b2e31' from v2021.07-rc1]
Signed-off-by: Suman Anna <s-anna@ti.com>
2021-05-04 22:51:31 -05:00
Suman Anna 51a19c4274 arm: dts: k3-am654: Add a specific IDK overlay for SR1.0
The AM654 IDK daughter card supports few additional peripherals
like MCAN and 4 ICSSG Ethernet ports. The ICSSG IP is different
between the two AM65x Silicon Revisions SR1.0 and SR2.0, and so
warrants a separate overlay file when using on top of a AM654
base board populated with a SR1.0 silicon.

Add a new k3-am654-idk-sr1.dts overlay file, which includes the
k3-am654-idk.dts overlay file. The built overlays are identical
for now, but will diverge after ICSSG Ethernet support is added.

This fixes the following warning currently seen in A53 SPL on
AM65x EVMs with SR1.0 after the board logic is fixed up to pick
the separate overlay for kernel in commit ba961d78ac16 ("board:
ti: am65x: Use different overlay for IDK with SR1.0 EVM")
  "cannot find image node 'k3-am654-idk-sr1': -1"

Signed-off-by: Suman Anna <s-anna@ti.com>
2021-04-29 21:46:19 -05:00
Suman Anna 94a99712b5 board: ti: am65x: Use different overlay for IDK with SR1.0 EVM
The ICSSG IP is different between the two AM65x Silicon Revisions SR1.0
and SR2.0, and the ICSSG Ethernet nodes will look different between the
two versions. The Linux kernel uses a separate overlay file for the IDK
board between the two variants. Introduce a runtime check to use a
different overlay for IDK daughter card specifically for SR1.0 silicon.

Code is based on logic from an older patch from Roger Quadros.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
2021-04-29 21:46:19 -05:00
Suman Anna 50d1fed083 board: ti: am65x: Apply an overlay for boards using SR1.0 silicon
The AM65x EVM board can use either the newer SR2.0 or an older SR1.0
SoC. The default board dts file is used for SR2.0 silicons, and the
differences between the two silicon revision variants are handled
through a board-specific overlay file, k3-am654-base-board-sr1.dtbo.

Add logic to detect the silicon revision and apply this overlay while
booting Linux.

NOTE:
The ICSSG nodes are not yet added to U-Boot, and so there are no separate
overlay files to apply for U-Boot from A53 SPL.

Signed-off-by: Suman Anna <s-anna@ti.com>
2021-04-29 21:46:19 -05:00
Suman Anna e3317b194d arm: dts: k3-am654: Add initial overlay for IDK daughter card
The AM654 IDK daughter card supports few additional peripherals
like MCAN and 4 ICSSG Ethernet ports. Add a new initial overlay
file, k3-am654-idk.dts, for this daughter card. This overlay file
will be be used with the standard AM654 EVM board. The overlay file
is currently empty and differs from the equivalent Linux kernel dts
overlay file as there is no required MCAN support in U-Boot, and
the ICSSG Ethernet support is not yet available.

This fixes the following warning currently seen in A53 SPL,
  "cannot find image node 'k3-am654-idk': -1"

Signed-off-by: Suman Anna <s-anna@ti.com>
2021-04-29 21:46:19 -05:00
Pratyush Yadav 129bdbd0bb configs: am64x_sk_*_defconfig: Enable OSPI related configs
Enable config options required to support OSPI along with OSPI boot.

Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
2021-04-29 11:05:31 -05:00
Vignesh Raghavendra f0e67c1d70 ARM: dts: k3-am642-sk: Add OSPI support
Add DT nodes to enable S28HS512T OSPI flash on the SK board.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
2021-04-29 11:05:31 -05:00
Vignesh Raghavendra 8766d44c6e configs: am64x_evm.h: Set up MTDPARTS for OSPI
Setup mtdids and mtdparts to be used at U-Boot prompt and also to be
passed as cmdline arguments to kernel. This enables kernel to create MTD
partition for each of the component required for boot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
2021-04-29 11:05:31 -05:00
Vignesh Raghavendra 4458763237 configs: am64x_evm_*_defconfig: Enable OSPI related configs
Enable config options required to support OSPI along with OSPI boot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
2021-04-29 11:05:31 -05:00
Vignesh Raghavendra efa12c9e6a ARM: dts: k3-am642-*-evm: Add OSPI flash node
AM64 EVM has a S28HS512T flash. Add DT nodes for the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
2021-04-29 10:36:32 -05:00
Vignesh Raghavendra 7f68caedcb ARM: dts: k3-am64-main: Add FSS and OSPI DT nodes
AM64 SoC has a Flash SubSystem with an OSPI controller within. Add DT
entries for the same.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
2021-04-29 10:36:32 -05:00
Vignesh Raghavendra 0f98303f3f configs: am64x_*_a53_defconfig: Enable DP83867 driver
Both AM64x GP and SK EVMs have DP83867 PHYs connected to CPSW ports.
Enable the driver for the same.

PHY_TI is selected by PHY_TI_DP83867, so no need to select explicitly

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Tested-by: Pratyush Yadav <p.yadav@ti.com>
2021-04-29 10:31:28 -05:00
Vignesh Raghavendra 91571a161b ARM: dts: k3-j7200-common-proc-board-u-boot: Fix broken ethernet
commit 1d4e8a15d2fa21548250ad9acc3d13706e140e4b upstream.

Since commit 6239cc8c4e ("arm: dts: k3-j7200: Sync Linux v5.11-rc6 dts
into U-Boot") ranges have been added to CPSW node which results in
U-Boot CPSW driver failing to acquire phy_gmii_sel register range and
thus failing to configure GMII mode correctly.

Fix this by deleting ranges in -u-boot-dtsi just like its done for other
K3 platforms.

Fixes: 6239cc8c4e ("arm: dts: k3-j7200: Sync Linux v5.11-rc6 dts into U-Boot")
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2021-04-27 22:53:47 -05:00
Kishon Vijay Abraham I 1e70024c7e configs: am64x_sk_a53: Enable configs for USB SuperSpeed Host Port
Enable configs for USB SuperSpeed Host Port.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Kishon Vijay Abraham I cc4af4e7b3 arm: dts: am642-sk: Add and Enable USB SuperSpeed Host Port
Add and Enable USB SuperSpeed Host Port.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Aswath Govindraju 5de9f7f3ba arm: dts: k3-am64-main: Fix clock names in USB DT nodes
Fix the clock names in USB device tree node.

Fixes: 3092efc090 ("arm: dts: k3-am64-main: Add USB DT nodes")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Kishon Vijay Abraham I d316ed73c8 phy: cadence: Enable "refclk" clk input
Enable "refclk" clk input.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Kishon Vijay Abraham I 715119ba66 phy: ti: j721e-wiz: Model the internal clocks without device tree input
Modeled the internal clocks without subnodes being populated in device
tree. This is based on recent discussions in the mailing list [1] suggested
to just add #clock cells in the parent DT node and model the clocks within
the driver.

Model the mux clocks without device tree input for AM64x SoC. Don't
remove the earlier design since DT nodes for J7200 and J721e are already
upstreamed.

[1] -> http://lore.kernel.org/r/20210108025943.GA1790601@robh.at.kernel.org
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Kishon Vijay Abraham I e091a68cc2 phy: ti: j721e-wiz: Configure full rate divider for AM64
The frequency of the txmclk between PCIe and SERDES has
changed to 250MHz from 500MHz. Configure full rate divider
for AM64 accordingly.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Kishon Vijay Abraham I 6a1ae63500 dt-bindings: ti-serdes-mux: Add defines for AM64 SoC
AM64 has a single lane SERDES which can be configured to be used
with either PCIe or USB. Define the possilbe values for the SERDES
function in AM64 SoC here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Kishon Vijay Abraham I ba63b9f998 dt-bindings: phy: cadence-torrent: Add binding for refclk driver
Add binding for refclk driver used to route the refclk out of torrent
SERDES.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Kishon Vijay Abraham I 408814402e dt-bindings: phy: Add bindings for AM64 SERDES Wrapper
Add bindings for AM64 SERDES Wrapper.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:49:24 -05:00
Faiz Abbas c5aaa5b284 ARM: ti: Increase the allocated size for MLO.raw
MLO has increased to a size greater than the allocated
128 kB in dfu_alt_info_emmc and _mmc.

Therefore, double the allocated size for MLO.raw in
the default environment.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-23 11:47:17 -05:00
Aswath Govindraju ae3a9e682e configs: am64x_*_*_defconfig: Enable config to support gpt and FDT library overlay
Enable config to support gpt command on AM642 evm/sk and enable config for
FDT library overlay support

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-16 00:22:20 -05:00
Aswath Govindraju a83ed31e21 configs: am64x_*_r5: Enable config for spl_board_init()
Enable config for spl_board_init().

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-16 00:22:18 -05:00
Aswath Govindraju 0b88605aa9 board: ti: am64x: Set the core voltage of USB PHY to 0.85V
Set the core voltage of USB PHY in AM64x to 0.85V in spl_board_init().

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-16 00:22:16 -05:00
Roger Quadros 138742d276 ti: am65x: Add k3-am654-pcie-usb3.dtbo
This fixes the following warning at boot.

"cannot find image node 'k3-am654-pcie-usb3': -1"

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-16 00:12:52 -05:00
Keerthy 638d35d517 arm: dts: k3-am654-evm: Add support for PCIe x2 + USB 2.0 card
Add support for PCIe 2 lane with USB 2.0 daughter card.

Only PCIe support is added at this time. Patch is based on
work by Kishon Vijay Abraham I <kishon@ti.com> in Linux kernel.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2021-04-16 00:12:46 -05:00