Commit Graph

70368 Commits

Author SHA1 Message Date
Suman Anna 725ab52bb1 soc: ti: k3-socinfo: Add entry for AM62X SoC family
Add support for AM62x SoC identification.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-03-04 11:08:50 -06:00
Suman Anna cb26be5c2b dt-bindings: pinctrl: k3: Introduce pinmux definitions for AM62
Add pinctrl macros for AM62x SoCs. These macro definitions are similar
to that of previous platforms, but adding new definitions to avoid any
naming confusions in the SoC dts files.

checkpatch insists the following error exists:
ERROR: Macros with complex values should be enclosed in parentheses

However, we do not need parentheses enclosing the values for this
macro as we do intend it to generate two separate values as has been
 done for other similar platforms.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-03-04 11:08:50 -06:00
Vignesh Raghavendra ed2c9e5ac6 dt-bindings: pinctrl: k3: Sync with kernel header
Sync defintions with kernel headers so we can keep DT in sync

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-03-04 11:08:50 -06:00
Aswath Govindraju 342836795d drivers: mmc: am654_sdhci: Add new compatible for AM62 SoC
The phy used in the 8 bit instance has been changed to the phy used in 4
bit instance on AM62 SoC. This implies the phy configuration required for
both the instances of mmc are similar. Therefore, add a new compatible
for AM62 SoC using the driver data of am64 4 bit instance.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-03-04 11:08:50 -06:00
Vignesh Raghavendra f5c0f9ab24 clk: clk-k3: Fix compile warnings
Fix below compile warnings

drivers/clk/clk-k3.c:329:10: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘ulong’ {aka ‘long unsigned int’} [-Wformat=]
  329 |    debug("%s: Using better rate %u that gives diff %d\n",

drivers/clk/clk-k3.c:329:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘ulong’ {aka ‘long unsigned int’} [-Wformat=]
  329 |    debug("%s: Using better rate %u that gives diff %d\n",
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-03-04 11:08:50 -06:00
Vignesh Raghavendra 03c6c015a4 net: am65-cpsw-nuss: Add compatible sync with upstream
Keep compatible list in sync with upstream.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
2022-03-04 11:08:50 -06:00
Dario Binacchi b04dd11936 omap: timer: fix the rate setting
commit 11326f3793 upstream.

The prescaler (PTV) setting must be taken into account even when the
timer input clock frequency has been set.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-03-04 11:08:50 -06:00
Aswath Govindraju a9ccf40d65 board: ti: j721e: evm.c: Fix the probing of in Sierra SerDes0
Initialization and power on operations of links have been moved under the
link device in the Sierra SerDes driver. Also, the UCLASS of
sierra_phy_provider has been changed to UCLASS_MISC.

Therefore, fix the probing of SerDes0 instance accordingly.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-03-04 10:35:35 -06:00
Aswath Govindraju 8cc5d1e93c phy: cadence: Sierra: Move the link operations from serdes phy to link device
In commit 54539583fb ("phy: cadence: Sierra: Add a UCLASS_PHY device for
links"), a separate udevice of type UCLASS_PHY was created for each link.
Therefore, move the corresponding link operations under the link device.

Also, change the uclass of sierra phy to UCLASS_MISC as it is no longer the
phy device.

Fixes: 54539583fb ("phy: cadence: Sierra: Add a UCLASS_PHY device for links")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Tested-by: Georgi Vlaev <g-vlaev@ti.com>
Reviewed-by: Georgi Vlaev <g-vlaev@ti.com>
2022-03-04 10:35:15 -06:00
Aswath Govindraju 0fc56d453e configs: j721e_*_evm_a72_defconfig: Fix the bootcmd
Add the command "boot_rprocs" that is required for booting remote
processors in U-Boot.

Fixes: 10b387cfae ("include: configs: j721e_evm: Add support to boot ethfw core in j721e")
Fixes: d08dd5f879 ("configs: j721e_hs_evm_a72_defconfig: Sync up the bootcmd with GP configs")
Reported-by: Jesse Villarreal <jesse.villarreal@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-22 21:08:32 -06:00
Aswath Govindraju 9360a5aa4a include: configs: j721e_evm.h: Fix the env variable corresponding to QSGMII PHY init
QSGMII PHY initialization should only be done for J721E EVMs and not for
J721E-SK boards. Therefore, fix the environment variables accordingly.

Also, by default remote processors should not be booted in U-Boot but
rather be left to the users to enable this by setting dorprocboot.
Therefore, remove dorprocboot that is being set by default.

Fixes: 10b387cfae ("include: configs: j721e_evm: Add support to boot ethfw core in j721e")
Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-22 21:08:32 -06:00
Roger Quadros 5ff05d19b1 arm: mach-k3: Either use binman or tools/k3_fit_atf.sh
If CONFIG_BINMAN is set then don't generate tispl.bin and u-boot.img
files using tools/k3_fit_atf.sh

Fixes: 7650825383 ("k3-am642-evm-u-boot: Use binman to generate u-boot.img and tispl.bin")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Roger Quadros dab227aeb8 k3-am642-evm-binman.dtsi: use ti-secure entry if HS build
For HS devices we need to secure each binary before packing
it into the FIT image. The resulting image names need to have
a "_HS" appended to it.

Also ensure that we use SPL DT blobs for tispl.bin

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Roger Quadros 275c40e0fa k3-am642-evm-u-boot: Enable gpmc, elm and main_gpio0 for SPL
We need to add u-boot,dm-spl to these nodes so they are available
in the SPL DTB. This is required for NAND to work at SPL.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Roger Quadros 7471fdf830 tools/fdtgrep: Include __symbols__ table
This is required for overlays to work at SPL.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Roger Quadros 4c234bdc0c tools: binman: add ti-secure entry type
This entry type is used to create a secured binary
for use with K3 High Security (HS) devices.

This allows us to no longer depend on k3_fit_atf.sh for
A53 SPL and u-boot image generation even for HS devices.

We still depend on the availability of an external
tool provided by the TI_SECURE_DEV_PKG environment
variable to secure the binaries.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Roger Quadros a04d820c97 k3-am642-evm-binman.dts: adapt to name change from atf-bl32 to tee-os
The binman entry name was changed so adapt to it.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Roger Quadros 91377bdb68 tools: binman: Rename atf-bl32 to tee-os
tee-os is a more appropriate name for OP-TEE binary.

Fixes: dd0bb6313c ("binman: Add support for TEE BL32")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Roger Quadros 0ce2a44cfc k3-am642-evm-binman: use CONFIG_K3_ATF_LOAD_ADDR for ATF load/entry
Instead of hard coding, use CONFIG_K3_ATF_LOAD_ADDR for ATF load
and entry address.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Roger Quadros f5d242ed15 arm: mach-k3: Don't select BINMAN if we're building for R5
R5 image building is not yet implemented using Binman. Don't select
CONFIG_BINMAN for R5 build. This should fix boot on AM64 HS.

Fixes: 7650825383 ("k3-am642-evm-u-boot: Use binman to generate u-boot.img and tispl.bin")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-18 17:59:11 -06:00
Aswath Govindraju bd58b61277 arm: dts: k3-j721s2-common-proc-board-u-boot: Add cdns,phy-mode tag
Add cdns,phy-mode tag in the OSPI NOR flash device tree node to disable
initial read delay calibration and use the read delay value from the device
tree node, during initialization.

Fixes: f8c841752104 ("arm64: dts: k3-j721s2: Add support for OSPI Flashes")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-17 12:57:42 -06:00
Aswath Govindraju 864bd028f2 configs: am64x_evm.h: Fix the dfu environment variables for eMMC and OSPI
As the size of tiboot3.bin has increased, the memory layout of the
bootloaders in eMMC and OSPI have been changed to accommodate this.

Therefore, use the dfu environment variables of combined images instead.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-17 12:55:45 -06:00
Aswath Govindraju ec4493bcbe configs: am64x_*_evm_*_defconfig: Increase memory area allocated for tiboot3.bin in OSPI flash
The current size of tiboot3.bin with GP configs is 548KB and the memory
reserved for it in the OSPI flash is 512KB. This leads to overlap of
tiboot3.bin on tispl.bin region and break in OSPI boot mode.

Therefore, fix this by increasing the memory allocated for tiboot3.bin to
1MB.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-17 12:55:45 -06:00
Aswath Govindraju 9d75b1407a configs: am64x_*_evm_*_defconfig: Increase memory area allocated for tiboot3.bin in eMMC
The current size of tiboot3.bin with GP configs is 548KB and the memory
reserved for it in eMMC boot partition is 512KB. This leads to overlap of
tiboot3.bin over tispl.bin region and break in eMMC boot mode.

Therefore, fix this by increasing the memory allocated for tiboot3.bin
to 1MB.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-17 12:55:45 -06:00
Aswath Govindraju 0d27ffdff8 configs: j721e_*_evm_a72_defconfig: Enable config for setting mmc speed mode
Enable config for setting mmc speed mode from U-Boot command line.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-15 19:38:25 -06:00
Aswath Govindraju 38c21f778e mmc: Add support for enumerating MMC card in a given mode using mmc command
commit 19f7a34a46 upstream.

Add support for enumerating MMC card in a given mode using mmc rescan and
mmc dev commands. The speed mode is provided as the last argument in these
commands and is indicated using the index from enum bus_mode in
include/mmc.h. A speed mode can be set only if it has already been enabled
in the device tree.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-02-15 19:38:19 -06:00
Hari Nagalla c036ec351c Revert "Revert "configs: am64x_hs_evm_r5_defconfig: Add support for ESM driver""
Re-enable the ESM driver and this goes along with the patch to enabling
the MCU ESM error reset in MCU control MMR register, after clearing the
main and mcu ESM events on bootup.

This reverts commit ebc8dca63d.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-15 19:38:13 -06:00
Hari Nagalla 6cec2c6356 arch: arm: mach-k3: am642_init: enable MCU ESM Reset
Enable MCUESM error output in MCU reset control register
CTRLMMR_MCU_RST_CTRL, after the Main and MCU ESM events
are cleared on bootup and configured to route the Main ESM
error output to the MCUESM error output.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-15 19:38:07 -06:00
Yogesh Siraswar ebc8dca63d Revert "configs: am64x_hs_evm_r5_defconfig: Add support for ESM driver"
The ESM for AM64x HS is currently broken. Revert this patch till the ESM
support is fixed for HS.

This reverts commit ba2e5bd756.

Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
2022-02-10 18:51:17 -06:00
Hari Nagalla 5eabe81f76 arch: arm: mach-k3: am642_init: Probe ESM nodes
Configure CTRLMMR_MCU_RST_CTRL register only, when the R5 SPL is built
with CONFIG_ESM_K3 flag is set in the board configuration.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:38:52 -06:00
Kishon Vijay Abraham I 2469f242fc board: ti: j721s2: Add support to detect daughtercards
Add support to detect daughtercards (GESI Ethernet card) in-order
to set the MAC address of the main CPSW2G interface.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2022-02-10 17:33:54 -06:00
Keerthy 5778b494da arm: dts: k3-j721e-r5-common-proc-board: tps659413: Correct the min/max voltages of VDD_CPU
Correct the min/max voltages of VDD_CPU. As per data sheet the VDD_CPU
minimum voltage is .6V & maximum voltage is .9V.

Correct the same. While at it fix the comment to reflect VDD_CPU
instead of VDD_MPU.

Data Sheet Link: https://www.ti.com/lit/gpn/dra829v

Signed-off-by: Keerthy <j-keerthy@ti.com>
2022-02-10 17:33:16 -06:00
Hari Nagalla 5012065f9a armv8: K3: j721s2: Update ddr address regions for j721s2 remote procs
The A72 U-Boot code loads and boots a number of remote processors
including the C71x DSPs, and the various Main R5FSS Cores. In order
to view the code loaded by the U-Boot by remote cores, U-Boot should
configure the memory region with right memory attributes. Right now
U-Boot carves out a memory region which is not sufficient for all
the images to be loaded. So, increase this carve out region.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Hari Nagalla 7e9a9a3251 arm: dts: k3-j721s2: Add support for early boot of remote procs
Add aliases for remote procs and support for early boot of remote
processors from A72 u-boot. The remote proc device nodes and shared
memory allocations for IPC and external memory also match with the
kernel device node definitions.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Hari Nagalla 83755d5f9d include: configs: Set Remote proc FW names
Set default FW names for Remote procs.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Hari Nagalla 261cbf8163 arm: dts: k3-j721s2-mcu: Add MAIN domain R5F cluster node
The J721S2 SoCs have 3 dual-core Arm Cortex-R5F processor (R5FSS)
subsystems/clusters. One R5F cluster is present within the MCU
domain (MCU_R5FSS0), and the other one is present within the MAIN
domain (MAIN_R5FSS0/1). Each of these can be configured at boot time
to be either run in a LockStep mode or in an Asymmetric Multi
Processing (AMP) fashion in Split-mode. These subsystems have 64 KB
each Tightly-Coupled Memory (TCM) internal memories for each core
split between two banks - ATCM and BTCM (further interleaved into
two banks). The TCMs of both Cores are combined in LockStep-mode
to provide a larger 128 KB of memory.

Add the DT node for the MAIN domain R5F cluster/subsystems, the two
R5F cores are added as child nodes to a main cluster/subsystem node.
The clusters are configured to run in Split-mode by default, with the
ATCMs enabled to allow the R5 cores to execute code from DDR with
boot-strapping code from ATCM. The inter-processor communication
between the main A72 cores and these processors is achieved through
shared memory and Mailboxes.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Hari Nagalla 2e779c3111 arm: dts: k3-j721s2-main: Add MAIN domain R5F cluster and C71x DSP nodes
The J721S2 SoCs have 3 dual-core Arm Cortex-R5F processor (R5FSS)
subsystems/clusters. One R5F cluster is present within the MCU
domain (MCU_R5FSS0), and the other one is present within the MAIN
domain (MAIN_R5FSS0/1). Each of these can be configured at boot time
to be either run in a LockStep mode or in an Asymmetric Multi
Processing (AMP) fashion in Split-mode. These subsystems have 64 KB
each Tightly-Coupled Memory (TCM) internal memories for each core
split between two banks - ATCM and BTCM (further interleaved into
two banks). The TCMs of both Cores are combined in LockStep-mode
to provide a larger 128 KB of memory.

Add the DT node for the MAIN domain R5F cluster/subsystems, the two
R5F cores are added as child nodes to a main cluster/subsystem node.
The clusters are configured to run in Split-mode by default, with the
ATCMs enabled to allow the R5 cores to execute code from DDR with
boot-strapping code from ATCM. The inter-processor communication
between the main A72 cores and these processors is achieved through
shared memory and Mailboxes.

The J721S2 SoCs have two TMS320C71x DSP Subsystems in the MAIN
voltage domain containing the next-generation C711 CPU core.
This subsystem has a CMMU but is not used currently. The inter-
processor communication between the main A72 cores and the C711
processor is achieved through shared memory and a Mailbox. Add the
DT node for these DSP processor sub-systems in the common
k3-j721s2-main.dtsi file.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Hari Nagalla 71bdd3ffd4 remoteproc: k2-dsp: Extend support for C71x DSPs on J721S2 SoCs
The K3 J721S2 SoCs have two C71x DSP subsystems in MAIN voltage domain,
and there are no C66x DSP subsystems on these SoCs. The C71x DSP subsystem
is a slighly updated version of the C71x DSP subsystem on J721e. The
C71x DSPs are 64 bit machine with fixed and floating point DSP
operations.

Extend support to the C71x DSPs with J721S2 compatible strings.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Hari Nagalla d1693daefc remoteproc: k3-r5: Extend support for R5F clusters on J721S2 SoCs
The K3 J721S2 SoCs have three dual-core R5F subsystems, one in MCU
voltage domain and the other two in MAIN voltage domain. These R5F
clusters are similar to the R5F clusters in J7200 SoCs.

Compatible Info is updated to support J721S2 SoCs.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Hari Nagalla 1c479ff5d2 dt-bindings: remoteproc: k3-dsp: Update bindings for J721S2 SoCs
The TI K3 J721S2 SoCs have two TM320C71x DSP susbsystems, and does not
have any TMS320C66x DSP subsystems. The C71x DSP subsystems in J721S2
SoCs are similar to the C71x DSP on J721E with some minor core IP
updates.

Compatible info is updated for intuitively matching to the new J721S2
SoCs.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Hari Nagalla 1aa1d56a5e dt-bindings: remoteproc: k3-r5f: Update bindings for J721S2 SoCs
The TI K3 J721S2 SoCs have three dual-core Arm R5F clusters/subsystems.
One in MCU voltage domain and the other two in MAIN voltage domain.

These clusters are similar to J7200 R5F clusters. Compatible info is
updated for intuitively matching to the new J721S2 SoCs.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-10 17:32:05 -06:00
Aswath Govindraju ffc6a479ed configs: j721s2_evm_a72_defconfig: Fix the Product ID used by USB
Fix the Product ID used by the USB driver.

Fixes: 33008be54b8d ("configs: j721s2_evm_a72_defconfig: Add A72 specific defconfig")
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-10 17:31:31 -06:00
Roger Quadros 7518f52a88 Revert "arm: dts: k3-am642-sk: Fix chip id at SPL"
This reverts commit 6b1382e303.
This is not required.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-10 17:30:38 -06:00
Roger Quadros 76c79c7c4e Revert "arm: dts: k3-am642-evm: Fix chip id at SPL"
This reverts commit 0a83358acb.
This is not required.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-10 17:30:38 -06:00
Roger Quadros 88b0b81aab board: ti: am64: Get rid of GPIO lookup failure message
am64-sk EVM doesn't support daughtercards so let's restrict
daughtercard probing to am64-gp EVM only.

Gets rid of below message at boot on am64-sk EVM

"Failed to lookup gpio gpio@38_0: -22"

Reported-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-10 17:30:38 -06:00
Roger Quadros 7f61424b1b arm: dts: k3-am642-sk: Fix boot
After moving to binman image builds we need to include
the appropriate binman file in the k3-am642-sk-u-boot.dtsi

Fixes: 7650825383 ("k3-am642-evm-u-boot: Use binman to generate u-boot.img and tispl.bin")
Suggested-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-10 17:30:38 -06:00
Roger Quadros eadf5af36c HACK: Makefile: Use $ATF and $TEE arguments to override $BL31 and $BL32
Upstream uses $BL31 for ATF blob and will use $BL32 for OP-TEE OS blob.
Since our Yocto build scripts and most of the developer build scripts
pass $ATF and $TEE, we continue to support those if provided.

Their usage should be deprecated. We can then drop this patch once
migration to $BL31 and $BL32 is done.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:02 -06:00
Roger Quadros 7650825383 k3-am642-evm-u-boot: Use binman to generate u-boot.img and tispl.bin
Introduce k3-am642-evm-binman.dtsi to provide binman configuration.

Provide a third configuration for AM64 EVM with NAND card.

R5 build is still not converted to use binman so restrict binman.dtsi
to A53 build.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:02 -06:00
Roger Quadros dd0bb6313c binman: Add support for TEE BL32
Add an entry for OP-TEE Trusted OS 'BL32' payload.
This is required by platforms using Cortex-A cores with TrustZone
technology.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros 1e96643859 configs: am64x_[hs_]evm_a53_defconfig: Enable NAND
Enables configuration required for NAND in SPL and u-boot.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00