Commit Graph

70450 Commits

Author SHA1 Message Date
Roger Quadros 40a7990781 arm: am33xx/omap3/omap4/omap5: Get rid of GPMC_MAX_CS
GPMC_NUM_CS is doing the same thing and there are no users
of GPMC_MAX_CS any more. Get rid of it.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros a12fe3ed51 mtd: rawnand: omap_gpmc: Get rid of GPMC_MAX_CS
GPMC_CS_NUM is the same thing so use that instead. This will
allow us to get rid of GPMC_MAX_CS from mem.h

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros 80db321c47 memory: Add TI GPMC driver
GPMC is a General Purpose Memory Controller module which is
present on many Texas Instruments SoCs.

Use a simple bus class so we can probe its children.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros 483bfb88aa scripts: Makefile.spl: Enable memory drivers to be built for SPL
We will need ti-gpmc driver for SPL. Allow memory drivers
do be built for SPL.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros d86b3b82b4 arm: dts: k3-am64-main: Add GPMC and ELM nodes
The GPMC is a unified memory controller dedicated for interfacing
with external memory devices like
- Asynchronous SRAM-like memories and ASICs
- Asynchronous, synchronous, and page mode burst NOR flash
- NAND flash
- Pseudo-SRAM devices

The ELM module is used for GPMC NAND accesses for detecting
and correcting errors during reads due to NAND bitflips errors.

4-, 8-, and 16-bit error-correction levels are supported using
the BCH (Bose-ChaudhurI-Hocquenghem) algorithm.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros 77be322324 mtd: rawnand: omap_gpmc: Fix build warning on 64-bit platforms
Pointer size cannot be assumed to be 32-bit, so use
use uintptr_t instead of uint32_t.

Fixes the below build warning on 64-bit builds.

drivers/mtd/nand/raw/omap_gpmc.c:439:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  head = ((uint32_t) buf) % 4;

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros afb06c74c1 arm: mach-k3: am642: Define NAND boot device
AM642 SoC supports booting from GPMC NAND device.
Define boot device for it.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros c462814289 mtd: rawnand: omap_gpmc: Enable build for K2/K3 platforms
The GPMC module is present on some K2 and K3 SoCs.
Enable building GPMC NAND driver for K2/K3 platforms.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Roger Quadros 015cf62d07 configs: am64x_[hs_]evm_a53_defconfig: Drop NAND partitions from mtdparts
Feedback from u-boot maintainer was to pass NAND partitions
via device tree. Get rid of them from mtdparts cmdline argument.

Signed-off-by: Roger Quadros <rogerq@kernel.org>
2022-02-02 16:22:01 -06:00
Hari Nagalla ba2e5bd756 configs: am64x_hs_evm_r5_defconfig: Add support for ESM driver
Enable ESM driver for AM64x R5 SPL/u-boot builds.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-02 15:46:33 -06:00
Hari Nagalla c8f46f918b configs: am64x_evm_r5_defconfig: Add support for ESM driver
Enable ESM driver for AM64x R5 SPL/u-boot builds.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-02 15:46:33 -06:00
Hari Nagalla 7f67536f37 arch: arm: mach-k3: am642_init: Probe ESM nodes
On AM64x devices, it is possible to route Main ESM0 error events to MCU
ESM. MCU ESM high error output can trigger the reset logic to reset the
device. So, for these devices we expect two ESM device nodes in the
device tree, one for Main ESM and the another MCU ESM in the device tree.
 When these ESM device nodes are properly configired it is possible to
route the Main RTI0 WWDT output to the MCU ESM high ouput through Main
ESM and trigger a device reset when
CTRLMMR_MCU_RST_CTRL:MCU_ESM_ERROR_RESET_EN_Z is set to '0'.

On K3 AM64x devices, the R5 SPL u-boot handles the ESM device node
configurations.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-02 15:46:33 -06:00
Hari Nagalla 6fd935c81e arm: dts: k3-am64: Add support for ESM device nodes
Enable acces to ESM0 configuration space and add Main ESM0 and MCU ESM
nodes to the AM64 device tree.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-02 15:46:33 -06:00
Hari Nagalla 7cb0ea5b22 misc: k3_esm: Add functionality to set and route error events within K3SoC
Add functionality to enable, set priority to the input events and to
route to MCU ESM. On AM64x/AM62x devices, it is possible to route Main
ESM0 error events to MCU ESM. When these error events are routed to MCU
ESM high output, it can trigger the reset logic to reset the device,
when CTRLMMR_MCU_RST_CTRL:MCU_ESM_ERROR_RESET_EN_Z is set to '0'.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
2022-02-02 15:46:33 -06:00
Bryan Brattlof e0f967f836 soc: soc_ti_k3: update j721e revision numbering
There is a 4 bit VARIANT number inside the JTAGID register that TI
increments any time a new variant for a chip is produced. Each
family of TI's SoCs uses a different versioning scheme based off
that VARIANT number.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2022-02-01 20:39:48 -06:00
Aswath Govindraju 10b387cfae include: configs: j721e_evm: Add support to boot ethfw core in j721e
Add configs to enable booting ethfw core in j721e

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Aswath Govindraju 3a86277c75 arm: dts: k3-j721e: Add support for multilink PCIe + QSGMII
Add support for QSGMII multilink configuration.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Aswath Govindraju f843955e58 phy: cadence: Sierra: Add support for skipping configuration
In some cases, a single SerDes instance can be shared between two different
processors, each using a separate link. In these cases, the SerDes
configuration is done in an earlier boot stage. Therefore, add support to
skip reconfiguring, if it is was already configured beforehand.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade 9ce8270a60 phy: cadence: Sierra: Add PCIe + QSGMII PHY multilink configuration
Add register sequences for PCIe + QSGMII PHY multilink configuration.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade 1f7c427879 phy: cadence: Sierra: Add support for PHY multilink configurations
Add support for multilink configuration of Sierra PHY. Currently,
maximum two links are supported.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade d9a0b4865e phy: cadence: Sierra: Update single link PCIe register configuration
Add single link PCIe register configurations for no SSC and internal
SSC. Also, add missing PMA lane registers for external SSC.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade b45f362157 phy: cadence: Sierra: Check PIPE mode PHY status to be ready for operation
PIPE phy status is used to communicate the completion of several PHY
functions. Check if PHY is ready for operation while configured for
PIPE mode during startup.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade 91f1c0dbc9 phy: cadence: Sierra: Check cmn_ready assertion during PHY power on
Check if PMA cmn_ready is set indicating the startup process is complete.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade 41cd5f1c56 phy: cadence: Sierra: Add PHY PCS common register configurations
Add PHY PCS common register configuration sequences for single link.
Update single link PCIe register sequence accordingly.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade b3428838f4 phy: cadence: Sierra: Rename some regmap variables to be in sync with Sierra documentation
No functional change. Rename some regmap variables as mentioned in Sierra
register description documentation.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade 7d66c453bb phy: cadence: Sierra: Add support to get SSC type from device tree.
Add support to get SSC type from DT.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade 443c59615b dt-bindings: phy: cadence-sierra: Add binding to specify SSC mode
Add binding to specify Spread Spectrum Clocking mode used

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Swapnil Jakhade f54b80a4df phy: cadence: Sierra: Prepare driver to add support for multilink configurations
Sierra driver currently supports single link configurations only. Prepare
driver to support multilink multiprotocol configurations along with
different SSC modes.

Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Aswath Govindraju 629a689abe arm: dts: k3-j721e: Add support for PLL_CMNLC clocks in SerDes0
The PLL_CMNLC clocks are modelled as a child clock device of seirra. In the
function device_probe, the corresponding clocks are probed before calling
the device's probe. The PLL_CMNLC mux clock can only be created after the
device's probe. Therefore, move assigned-clocks and assigned-clock-parents
to the link nodes in U-Boot device tree file.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Aswath Govindraju 07ab0668f7 baord: ti: j721e: evm.c: Add support for probing SerDes0
Add support for probing, initializing and powering, SerDes0 instance.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Aswath Govindraju 96ca5748e4 phy: ti: phy-j721e-wiz.c: Fix the condition for setting P_ENABLE_FORCE
Fix the condition for setting P_ENABLE_FORCE bit, by syncing with the
driver in kernel.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Aswath Govindraju 83439eef02 phy: cadence: Sierra: Model PLL_CMNLC and PLL_CMNLC1 as a clock
Sierra has two PLLs, PLL_CMNLC and PLL_CMNLC1 and each of these PLLs has
two inputs, plllc_refclk (input from pll0_refclk) and refrcv (input from
pll1_refclk). Model PLL_CMNLC and PLL_CMNLC1 as a clock so that it's
possible to select one of these two inputs from device tree.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:23 -06:00
Aswath Govindraju 54539583fb phy: cadence: Sierra: Add a UCLASS_PHY device for links
Add a driver of type UCLASS_PHY for each of the link nodes in the serdes
instance.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:22 -06:00
Kishon Vijay Abraham I 17244b4efe phy: cadence: Sierra: Add missing clk_disable_unprepare() in .remove callback
Add missing clk_disable_unprepare() in cdns_sierra_phy_remove().

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:22 -06:00
Kishon Vijay Abraham I f1a99182f3 phy: cadence: Sierra: Add array of input clocks in "struct cdns_sierra_phy"
Instead of having separate structure members for each input clock, add
an array for the input clocks within "struct cdns_sierra_phy". This is
in preparation for adding more input clocks required for supporting
additional clock combination.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:22 -06:00
Kishon Vijay Abraham I 8cb00128f4 phy: cadence: Sierra: Move all reset_control_get*() to a separate function
No functional change. Group devm_reset_control_get() and
devm_reset_control_get_optional() to a separate function.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:22 -06:00
Kishon Vijay Abraham I 4897b43a8d phy: cadence: Sierra: Move all clk_get_*() to a separate function
No functional change. Group all devm_clk_get_optional() to a
separate function.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:22 -06:00
Kishon Vijay Abraham I fbbce068f5 phy: cadence: Sierra: Create PHY only for "phy" or "link" sub-nodes
Cadence Sierra PHY driver registers PHY using devm_phy_create()
for all sub-nodes of Sierra device tree node. However Sierra device
tree node can have sub-nodes for the various clocks in addtion to the
PHY. Use devm_phy_create() only for nodes with name "phy" (or "link"
for old device tree) which represent the actual PHY.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:22 -06:00
Kishon Vijay Abraham I bb4492309f phy: cadence: Sierra: Fix PHY power_on sequence
Commit 44d30d622821d ("phy: cadence: Add driver for Sierra PHY")
de-asserts PHY_RESET even before the configurations are loaded in
phy_init(). However PHY_RESET should be de-asserted only after
all the configurations has been initialized, instead of de-asserting
in probe. Fix it here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:22 -06:00
Sanket Parmar 734033e47c phy: cadence: sierra: Fix for USB3 U1/U2 state
Updated values of USB3 related Sierra PHY registers.
This change fixes USB3 device disconnect issue observed
while enternig U1/U2 state.

Signed-off-by: Sanket Parmar <sparmar@cadence.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:57:22 -06:00
Aswath Govindraju d08dd5f879 configs: j721e_hs_evm_a72_defconfig: Sync up the bootcmd with GP configs
Sync up the bootcmd with GP configs, to initialize the QSGMII phy required
for ethfw.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-02-01 19:55:51 -06:00
Yogesh Siraswar 4e5d856b75 defconfig: j721e_hs_evm_a72: Sync with GP defconfig
Sync HS defconfig with GP. Fixes HS OSPI boot issue.

Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
2022-02-01 19:52:23 -06:00
Aswath Govindraju cbcfff4299 board: ti: j721s2: Add README Documentation
Add documentation for j721s2 SoC in the README.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-01-28 11:51:01 -06:00
Vignesh Raghavendra cf8a2e09c5 configs: am64x_evm_r5/a53_defconfig: Enable configs required for Ethboot
Enable config options needed to support Ethernet boot on AM64x SK.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28 11:48:05 -06:00
Vignesh Raghavendra 93f94da543 configs: am64xx_evm: Increase BSS max size to 16K
With Ethboot support in SPL, network stack requires more BSS area, so
increase BSS max size to 16K

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28 11:48:05 -06:00
Vignesh Raghavendra 2d8118acb1 ARM: dts: K3-am642-r5-sk: Enable Second CPSW port in R5/A53 SPL
commit ef7be5a07b upstream.

Enable Second Ethernet port on which ROM support Ethboot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28 11:48:05 -06:00
Vignesh Raghavendra 32ea5b3be7 mach-k3: am64_spl: Alias Ethernet RGMII boot to CPGMAC
commit 07252f5c71 upstream.

This is required to enables spl_net boot on AM64x

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28 11:48:05 -06:00
Vignesh Raghavendra 06ca22eda3 mach-k3: am642_init: Probe AM65 CPSW NUSS for R5/A53 SPL
commit 93c43a8365 upstream.

In order to support Ethernet boot on AM64x, probe AM65 CPSW NUSS.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28 11:48:05 -06:00
Vignesh Raghavendra a8ae64c6c4 board: ti: am64x: Init DRAM size in R5/A53 SPL
commit 70bcd249f4 upstream.

Call dram_init_banksize() from spl_board_init() otherwise TFTP download
fails due to lmb_get_free_size() not able to find unreserved region due
to lack of DRAM size info. Required to support Ethernet boot on AM64x.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28 11:48:04 -06:00
Vignesh Raghavendra d93502e07d Revert "ARM: dts: k3-am642/am654/j72xx: Fix ethernet alias for U-Boot"
This reverts commit 287aa5895c.
Now that UCLASS_ETH binds correctly to the CPSW port, allow ethX aliases
to point to individual ports like in kernel.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-28 11:48:04 -06:00