Tom Rini [Thu, 13 May 2021 17:09:14 +0000 (13:09 -0400)]
Merge branch '2021-05-13-extension-board-detection-and-DT-overlay-application'
- Improve support for various forms of extension boards and add DT
overlay application support.
Kory Maincent [Tue, 4 May 2021 17:31:30 +0000 (19:31 +0200)]
am335x: add support for cape detect functionality
Update the Kconfig and the board file to make the am335x board compatible
with cape detection.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Kory Maincent [Tue, 4 May 2021 17:31:29 +0000 (19:31 +0200)]
arm: am335x: add support for i2c2 bus
The am335x from BeagleBone use i2c EEPROM to detect capes.
The memory is wired to i2c bus 2 therefore it need to be enabled.
Add i2c2 clock, pinmux description and pinmux enable function.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Kory Maincent [Tue, 4 May 2021 17:31:28 +0000 (19:31 +0200)]
configs: CHIP: add support for DIP detect functionality
This commit enables using the extension board detection mechanism on
CHIP boards
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Acked-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Kory Maincent [Tue, 4 May 2021 17:31:27 +0000 (19:31 +0200)]
arm: sunxi: add support for DIP detection to CHIP board
Add the extension_board_scan specific function to scan the information
of the EEPROM on one-wire and fill the extension struct.
Add the Kconfig symbol to enable the needs to detect DIPs.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Andre Przywara <andre.przywara@arm.com>
Kory Maincent [Tue, 4 May 2021 17:31:26 +0000 (19:31 +0200)]
w1: replace dt detection by automatic detection
This patch changes the functioning of the detection of w1 devices.
The old way was a comparison between detected w1 and the ones described in
the device tree. Now it will just look for the driver matching the family
id of the w1 detected.
The patch is inspired from Maxime Ripard code.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Kory Maincent [Tue, 4 May 2021 17:31:25 +0000 (19:31 +0200)]
am57xx: add support for cape detect functionality
This commit enables using the extension board detection mechanism on
AM57xx based platforms.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Kory Maincent [Tue, 4 May 2021 17:31:24 +0000 (19:31 +0200)]
ti/common: add support for extension_scan_board function
The BeagleBone platforms all use a common mechanism to discover and
identify extension boards (called "capes"): each extension board has an
I2C-connected EEPROM describing itself.
This patch implements a generic extension_scan_board() feature that can
be used by all BeagleBone platforms to read those I2C EEPROMs and fill
in the list of "extension" structures.
Following commits will enable this common logic on two BeagleBone
platforms.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Kory Maincent [Tue, 4 May 2021 17:31:23 +0000 (19:31 +0200)]
pytest: add sandbox test for "extension" command
This commit extends the sandbox to implement a dummy
extension_board_scan() function and enables the extension command in
the sandbox configuration. It then adds a test that checks the proper
functionality of the extension command by applying two Device Tree
overlays to the sandbox Device Tree.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
[trini: Limit to running on sandbox]
Signed-off-by: Tom Rini <trini@konsulko.com>
Kory Maincent [Tue, 4 May 2021 17:31:22 +0000 (19:31 +0200)]
cmd: add support for a new "extension" command
This patch adds a new "extension" command, which aims at detecting
extension boards connected to the hardware platform, and apply the
Device Tree overlays that describe the hardware present on those
extension boards.
In order to enable this mechanism, board-specific code must implement
the extension_board_scan() function that fills in a linked list of
"struct extension", each describing one extension board. In addition,
the board-specific code must select the SUPPORT_EXTENSION_SCAN Kconfig
boolean.
Based on this:
- "extension scan" makes the generic code call the board-specific
extension_board_scan() function to retrieve the list of detected
extension boards.
- "extension list" allows to list the detected extension boards.
- "extension apply <number>|all" allows to apply the Device Tree
overlay(s) corresponding to one, or all, extension boards
The latter requires two environment variables to exist and set one variable
to run:
- extension_overlay_addr: the RAM address where to load the Device
Tree overlays
- extension_overlay_cmd: the U-Boot command to load one overlay.
Indeed, the location and mechanism to load DT overlays is very setup
specific.
- extension_overlay_name: set by the command: the name of the DT which
will be load during the execution.
When calling the command described in the extension_overlay_cmd
variable, the variable extension_overlay_name will be defined. So a
typical extension_overlay_cmd will look like this:
extension_overlay_cmd=load mmc 0:1 $extension_overlay_addr /boot/$extension_overlay_name
Here is an example on how to use it:
=> run loadfdt
=> fdt addr $fdtaddr
=> setenv extension_overlay_addr 0x1000
=> setenv extension_overlay_cmd 'load mmc 0:1 ${extension_overlay_addr} /boot/${extension_overlay_name}'
=> extension scan
Found 1 extension board(s).
=> extension apply 0
519 bytes read in 3 ms (168.9 KiB/s)
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Kory Maincent [Tue, 4 May 2021 17:31:21 +0000 (19:31 +0200)]
fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.c
Move the fdt_valid function to fdt_support.
This changes allow to be able to test the validity of a devicetree in
other c files.
Update code syntax.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Tom Rini [Wed, 12 May 2021 14:07:21 +0000 (10:07 -0400)]
Merge tag 'ti-v2021.07-rc3' of https://source.denx.de/u-boot/custodians/u-boot-ti
- Initial support for AM64 EVM and SK
- K3 DDR driver unification for J7 and AM64 platforms.
- Minor fixes for TI clock driver
Vignesh Raghavendra [Mon, 10 May 2021 14:36:13 +0000 (20:06 +0530)]
ARM: dts: k3-am642-sk: Add ethernet related DT nodes
Add CPSW related nodes for AM642 SK. There are two CPSW ports on the
board but U-Boot supports only the first port.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:12 +0000 (20:06 +0530)]
ARM: dts: k3-am64-main: Add CPSW DT nodes
AM64 as CPSW3G IP with 2 external ports. Add DT entries for the same
(based on kernel DT).
Disable second port as its by default set to ICSS usage on EVM.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:11 +0000 (20:06 +0530)]
net: ti: am65-cpsw-nuss: Add a new compatible for AM64
Add a new compatible to support AM64 SoC
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:10 +0000 (20:06 +0530)]
net: ti: am65-cpsw-nuss: Don't cache disabled port ID
Currently driver may end up caching disabled port ID as active
interface. Fix this by bailing out earlier in case port is marked
disabled in the DT.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:09 +0000 (20:06 +0530)]
net: ti: am65-cpsw-nuss: Prepare to support non primary ext port
CPSW NUSS IP on K3 SoCs can have more than one external port (upto 8)
Therefore increase AM65_CPSW_CPSWNU_MAX_PORTS to 9 (8 ext + 1 Root port)
as preparation to allow any one of the 8 ports to be used as ethernet
interface in U-Boot.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:08 +0000 (20:06 +0530)]
dma: ti: k3-udma: Add BCDMA and PKTDMA support
Sync BCDMA and PKTDMA support from Kernel for AM64 SoC
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:07 +0000 (20:06 +0530)]
dma: ti: k3-psil-am64: Add AM64 PSIL endpoint data
Add AM64 SoC specific channel mapping and endpoint data.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:06 +0000 (20:06 +0530)]
dma: ti: k3-psil: Extend PSIL EP data extension for AM64
Extend PSIL EP data to include AM64 DMA specific information
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:05 +0000 (20:06 +0530)]
dma: ti: k3-psil-am654: Drop unused PSIL EP static data
ICSSG Ethernet driver uses two src threads per port (one per slice).
Similarly CPSW uses one src thread.
Drop PSIL EP static data for other src threads in order to reduce
R5 SPL footprint. This makes AM65x board bootable again.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:04 +0000 (20:06 +0530)]
soc: ti: k3-navss-ringacc: Remove unused ring modes
With AM64x supporting only K3_NAV_RINGACC_RING_MODE_RING or the exposed
ring mode, all other K3 SoCs have also been moved to this common
baseline. Therefore drop other modes such as
K3_NAV_RINGACC_RING_MODE_MESSAGE (and proxy) to save on SPL footprint.
There is a saving of ~800 bytes with this change for am65x_evm_r5_defconfig.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:03 +0000 (20:06 +0530)]
soc: ti: k3-navss-ringacc: Add AM64 ringacc support
AM64 dual mode rings are modeled as pair of Rings objects which has common
configuration and memory buffer, but separate real-time control register
sets for each direction mem2dev (forward) and dev2mem (reverse).
AM64 rings must be requested only using k3_ringacc_request_rings_pair(),
and forward ring must always be initialized/configured. After this any
other Ringacc APIs can be used without any callers changes.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 14:36:02 +0000 (20:06 +0530)]
firmware: ti_sci: Update ti_sci_cmd_rm_udmap_tx_ch_cfg() API to the latest
Update struct ti_sci_msg_rm_udmap_tx_ch_cfg_req to latest ABI to support
AM64x BCDMA Block copy channels.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Vignesh Raghavendra [Mon, 10 May 2021 18:14:22 +0000 (23:44 +0530)]
board: ti: am64x: Parse MAC address from board EEPROM
Parse MAC addresses from EEPROM and set them in the env. This is needed
to get MAC address for additional ethernet ports on the EVM.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:15:05 +0000 (16:45 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:15:04 +0000 (16:45 +0530)]
configs: am64x_evm_a53: Enable support for reading eeprom
Enable relevant configs for reading eeprom data and updating env
variables.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:15:03 +0000 (16:45 +0530)]
configs: am64x_evm_a53: Enable configs for printing cpuinfo
Enable all relevant configs for printing CPU info.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:15:02 +0000 (16:45 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:15:01 +0000 (16:45 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:15:00 +0000 (16:45 +0530)]
arm: dts: am642-r5-sk: Add r5 specific dts
Add R5 specific dts for AM64 SK
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sinthu Raja <sinthu.raja@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:14:59 +0000 (16:44 +0530)]
arm: dts: am642-sk: Add initial sk dts
AM642 StarterKit (SK) board is a low cost, small form factor board
designed for TI’s AM642 SoC. It supports the following interfaces:
* 2 GB LPDDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in switch and MAC mode
* x1 USB 3.0 Type-A port
* x1 UHS-1 capable µSD card slot
* 2.4/5 GHz WLAN + Bluetooth 4.2 through WL1837
* 512 Mbit OSPI flash
* x2 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin Raspberry Pi compatible GPIO header
* 24-pin header for peripherals in MCU island (I2C, UART, SPI, IO)
* 54-pin header for Programmable Realtime Unit (PRU) IO pins
* Interface for remote automation. Includes:
* power measurement and reset control
* boot mode change
Add basic support for AM642 SK.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:14:58 +0000 (16:44 +0530)]
arm: dts: am642-evm: Add I2C nodes
Add I2C nodes for AM64 and enable pinmux for i2c0 for reading eeprom data.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:14:57 +0000 (16:44 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:14:56 +0000 (16:44 +0530)]
arm: dts: k3-am64-evm: Make chip id available before pre-reloc
Chipid will be needed for SoC detection for all stages of U-Boot.
So make it u-boot,dm-spl
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:14:55 +0000 (16:44 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:14:54 +0000 (16:44 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:14:53 +0000 (16:44 +0530)]
include: configs: am64x: Avoid overlap of BSS and stack area
Avoid R5 SPL stack writing into ROM index table. Re-use the same space
for storing EEPROM data.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:14:52 +0000 (16:44 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:14:51 +0000 (16:44 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:14:50 +0000 (16:44 +0530)]
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>
Lokesh Vutla [Thu, 6 May 2021 11:14:49 +0000 (16:44 +0530)]
board: ti: am64x: Add support for reading eeprom data
I2C EEPROM data contains the board name and its revision.
Add support for:
- Reading EEPROM data and store a copy at end of SRAM
- Updating env variable with relevant board info
- Printing board info during boot.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Lokesh Vutla [Thu, 6 May 2021 11:14:48 +0000 (16:44 +0530)]
soc: ti: k3-socinfo: Add entry for AM64X SoC family
Add support for AM64 SoC identification.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Nishanth Menon [Tue, 4 May 2021 23:00:56 +0000 (18:00 -0500)]
configs: am64x_evm_r5: Enable GPIO regulator
Enable GPIO regulator.
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Nishanth Menon [Tue, 4 May 2021 23:00:55 +0000 (18:00 -0500)]
arm: dts: k3-am642-r5-evm: Add GPIO DDR VTT regulator
Add DDR VTT regulator.
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Nishanth Menon [Tue, 4 May 2021 23:00:54 +0000 (18:00 -0500)]
arm: dts: k3-am64-main: Add GPIO nodes
Add main domain GPIO nodes.
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 4 May 2021 23:00:53 +0000 (18:00 -0500)]
arm: mach-k3: am642: Add support for triggering ddr init from SPL
In SPL, DDR should be made available by the end of board_init_f()
so that apis in board_init_r() can use ddr. Adding support for
triggering DDR initialization from board_init_f().
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 4 May 2021 23:00:52 +0000 (18:00 -0500)]
arm: dts: k3-am642: Add ddr node
Introduce ddr node for am642 needed for all ddr configurations.
Also, introduce the 1600MTs DDR4 configuration that is supported on the
am642-evm.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Lokesh Vutla [Tue, 11 May 2021 15:22:13 +0000 (10:22 -0500)]
ram: k3-ddrss: Enable vtt regulator if present
Attempt to get and enable a vtt regulator if one is provided from the
dts. If we do not find one, continue as not all platforms have this.
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:12 +0000 (10:22 -0500)]
ram: k3-ddrss: Introduce support for AM642 SoCs
Introduce support for the AM64 DDRSS controller which uses the 16bit
variation of the controller. This controller shares much functionality
with the existing J721e support, so this patch introduces only the new
code needed for am64 specific support from "_16bit_" files with headers
under "16bit/" include path/.
Also add a CONFIG_K3_AM64_DDRSS option to the choice required for use
with CONFIG_K3_DDRSS to allow selecting AM64 support.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:11 +0000 (10:22 -0500)]
ram: k3-ddrss: Introduce common driver with J7 SoC support
Introduce a new version of the ddr driver which has the ability to
support different variations of the controller. Also introduce support
for the 32bit variation of the controller which is what was already
supported by the previous version used for J721e and J7200.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:10 +0000 (10:22 -0500)]
ram: k3-ddrss: Introduce top-level CONFIG_K3_DDRSS
Create a new CONFIG_K3_DDRSS option to select the common parts of the
k3-ddrss driver. Also introduce a choice that depends on the top level
option to select CONFIG_K3_J721E_DDRSS for j721e support, and update
corresponding Kconfig as required.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:09 +0000 (10:22 -0500)]
ram: k3-j721e: Rename to k3-ddrss
Rename the k3-j721e folder under drivers/ram to k3-ddrss in preparation
of introducing additional support for other platforms to the same
driver.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:08 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_ctl_regs: Fix checkpatch issue for types
Use Linux style u32 instead of uint32_t.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:07 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_pi_macros: Fix indentation issues
Fix the indentation for certain macros to be consistent with the other
macros in the file, as the existing indentation does not make sense in
many places.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:06 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_phy_core_macros: Fix indentation issues
Fix the indentation for certain macros to be consistent with the other
macros in the file, as the existing indentation does not make sense in
many places.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:05 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_ddr_controller_macros: Fix indentation issues
Fix the indentation for certain macros to be consistent with the other
macros in the file, as the existing indentation does not make sense in
many places.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:04 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_data_slice_3_macros: Fix indentation issues
Fix the indentation for certain macros to be consistent with the other
macros in the file, as the existing indentation does not make sense in
many places.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:03 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_data_slice_2_macros: Fix indentation issues
Fix the indentation for certain macros to be consistent with the other
macros in the file, as the existing indentation does not make sense in
many places.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:02 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_data_slice_1_macros: Fix indentation issues
Fix the indentation for certain macros to be consistent with the other
macros in the file, as the existing indentation does not make sense in
many places.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:01 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_data_slice_0_macros: Fix indentation issues
Fix the indentation for certain macros to be consistent with the other
macros in the file, as the existing indentation does not make sense in
many places.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:22:00 +0000 (10:22 -0500)]
ram: k3-j721e: lpddr4_address_slice_0_macros: Fix indentation issues
Fix the indentation for certain macros to be consistent with the other
macros in the file, as the existing indentation does not make sense in
many places.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Tue, 11 May 2021 15:21:59 +0000 (10:21 -0500)]
dt-bindings: memory-controller: Add K3 AM64 DDRSS compatible
Update the k3-ddrss DT binding document to include compatible
for k3,am64-ddrss.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:48 +0000 (11:27 -0500)]
configs: am64x_evm_a53: Add Initial support
Add initial A53 defconfig support for AM64x SoCs.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:47 +0000 (11:27 -0500)]
configs: am64x_evm_r5: Add Initial support
Add initial R5 defconfig support for AM64x SoCs.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:46 +0000 (11:27 -0500)]
arm: dts: k3-am642: Add r5 specific dt support
Add initial support for dt that runs on r5.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:45 +0000 (11:27 -0500)]
arm: dts: k3-am642: Add initial support for EVM
The AM642 EValuation Module (EVM) is a board that provides access to
various peripherals available on the AM642 SoC, such as PCIe, USB 2.0,
CPSW Ethernet, ADC, and more.
Add basic support.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:44 +0000 (11:27 -0500)]
arm: dts: ti: Add Support for AM642 SoC
The AM642 SoC belongs to the K3 Multicore SoC architecture platform,
providing advanced system integration to enable applications such as
Motor Drives, PLC, Remote IO and IoT Gateways.
Some highlights of this SoC are:
* Dual Cortex-A53s in a single cluster, two clusters of dual Cortex-R5F
MCUs, and a single Cortex-M4F.
* Two Gigabit Industrial Communication Subsystems (ICSSG).
* Integrated Ethernet switch supporting up to a total of two external
ports.
* PCIe-GEN2x1L, USB3/USB2, 2xCAN-FD, eMMC and SD, UFS, OSPI memory
controller, QSPI, I2C, eCAP/eQEP, ePWM, ADC, among other
peripherals.
* Centralized System Controller for Security, Power, and Resource
Management (DMSC).
See AM64X Technical Reference Manual (SPRUIM2, Nov 2020)
for further details: https://www.ti.com/lit/pdf/spruim2
Introduce basic support for the AM642 SoC to enable SD/MMC boot.
Introduce a limited set of MAIN domain peripherals under cbass_main and
a set of MCU domain peripherals under cbass_mcu.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:43 +0000 (11:27 -0500)]
dt-bindings: pinctrl: k3: Introduce pinmux definitions for AM64
Add pinctrl macros for AM64 SoC. These macro definitions are similar to
that of previous platforms, but adding new definitions to avoid any
naming confusions in the soc dts files.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:42 +0000 (11:27 -0500)]
board: ti: am64x: Add board support for am64x evm
Add board specific initialization for am64x based boards.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:41 +0000 (11:27 -0500)]
mailbox: k3-sec-proxy: Extend valid thread IDs
AM64x uses a different thread mapping that existing K3 SoCs, so update
the valid thread ID list to include those used for AM64x.
Also remove the comment identifying the purpose of each thread ID. The
purpose of the thread ID is specified when describing the threads in the
device tree and the same ID can mean different things on different SoCs,
so the comment is not useful.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:40 +0000 (11:27 -0500)]
mmc: sdhci_am654: Add Support for TI's AM642 SoC
Add support for the controller present on the AM642 SoC.
There are instances:
sdhci0: 8bit bus width, max 400 MBps
sdhci1: 4bit bus width, max 100 MBps
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Keerthy [Fri, 23 Apr 2021 16:27:39 +0000 (11:27 -0500)]
armv8: mach-k3: am642: Add custom MMU support
Change the memory attributes for the DDR regions used by the remote
processors on AM65x so that the cores can see and execute the proper code.
A separate table based on the previous K3 SoCs is introduced since the
number of remote processors and their DDR usage is different between the
SoC families.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Suman Anna [Fri, 23 Apr 2021 16:27:38 +0000 (11:27 -0500)]
arm: mach-k3: am642: Shut down R5 core after ATF startup on A53
The AM642 SoCs use the Main R5FSS0 as a boot processor, and runs
the R5 SPL that performs the initialization of the System Controller
processor and starting the Arm Trusted Firmware (ATF) on the Arm
Cortex A53 cluster. The Core0 serves as this boot processor and is
parked in WFE after all the initialization. Core1 does not directly
participate in the boot flow, and is simply parked in a WFI.
Power down these R5 cores (and the associated RTI timer resources
that were indirectly powered up) after starting up ATF on A53 by
using the appropriate SYSFW API in release_resources_for_core_shutdown().
This allows these Main R5F cores to be further controlled from the
A53 to run regular applications.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:37 +0000 (11:27 -0500)]
arm: mach-k3: am642: Use mmc start and stop callbacks
To avoid any glitches on MMC clock line, make use of pm per and post
callbacks when loading sysfw.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:36 +0000 (11:27 -0500)]
arm: mach-k3: am642: Load SYSFW binary and config from boot media
Use the System Firmware (SYSFW) loader framework to load and start
the SYSFW as part of the AM642 early initialization sequence. Also
make use of existing logic to detect if ROM has already loaded sysfw
and avoided attempting to reload and instead just prepare to use already
running firmware.
While at it also initialize the MAIN_UART1 pinmux as it is used by SYSFW
to print diagnostic messages.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:35 +0000 (11:27 -0500)]
arm: mach-k3: am642: Store boot info from ROM
For AM642, ROM supports loading system firmware directly
from boot image. ROM passes information about the number of
images that are loaded to bootloader at a specific address
that is temporary. Add support for storing this information
somewhere permanent before it gets corrupted.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:34 +0000 (11:27 -0500)]
arm: mach-k3: am642: Unlock all applicable control MMR registers
To access various control MMR functionality the registers need to
be unlocked. Do that for all control MMR regions in the MAIN domain.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Keerthy [Fri, 23 Apr 2021 16:27:33 +0000 (11:27 -0500)]
arm: mach-k3: am642: Add support for boot device detection
AM642 allows for booting from primary or backup boot media.
Both media can be chosen individually based on switch settings.
ROM looks for a valid image in primary boot media, if not found
then looks in backup boot media. In order to pass this boot media
information to boot loader, ROM stores a value at a particular
address. Add support for reading this information and determining
the boot media correctly.
Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dave Gerlach [Fri, 23 Apr 2021 16:27:32 +0000 (11:27 -0500)]
arm: mach-k3: Add basic support for AM642 SoC definition
The AM642 SoC belongs to the K3 Multicore SoC architecture platform,
providing advanced system integration to enable applications such as
Motor Drives, PLC, Remote IO and IoT Gateways.
Some highlights of this SoC are:
* Dual Cortex-A53s in a single cluster, two clusters of dual Cortex-R5F
MCUs, and a single Cortex-M4F.
* Two Gigabit Industrial Communication Subsystems (ICSSG).
* Integrated Ethernet switch supporting up to a total of two external
ports.
* PCIe-GEN2x1L, USB3/USB2, 2xCAN-FD, eMMC and SD, UFS, OSPI memory
controller, QSPI, I2C, eCAP/eQEP, ePWM, ADC, among other
peripherals.
* Centralized System Controller for Security, Power, and Resource
Management (DMSC).
See AM64X Technical Reference Manual (SPRUIM2, Nov 2020)
for further details: https://www.ti.com/lit/pdf/spruim2
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Dario Binacchi [Sat, 1 May 2021 15:05:26 +0000 (17:05 +0200)]
Revert "fdt: translate address if #size-cells = <0>"
This reverts commit
d64b9cdcd475eb7f07b49741ded87e24dae4a5fc.
As pointed by [1] and [2], the reverted patch made every DT 'reg'
property translatable. What the patch was trying to fix was fixed in a
different way from previously submitted patches which instead of
correcting the generic address translation function fixed the issue with
appropriate platform code.
[1] https://patchwork.ozlabs.org/project/uboot/patch/
1614324949-61314-1-git-send-email-bmeng.cn@gmail.com/
[2] https://lore.kernel.org/linux-clk/
20210402192054.7934-1-dariobin@libero.it/T/
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Dario Binacchi [Sat, 1 May 2021 15:05:25 +0000 (17:05 +0200)]
clk: ti: am3-dpll: use custom API for memory access
Using the custom TI functions required not only replacing common memory
access functions but also rewriting the routines used to set bypass and
lock states. As for readl() and writel(), they also required the address
of the register to be accessed, a parameter that is hidden by the TI clk
module.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 1 May 2021 15:05:24 +0000 (17:05 +0200)]
clk: ti: gate: use custom API for memory access
Replaces the common memory access functions used by the driver with the
ones exported from the TI clk module.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 1 May 2021 15:05:23 +0000 (17:05 +0200)]
clk: ti: change clk_ti_latch() signature
The clock access functions exported by the clk header use the
struct clk_ti_reg parameter to get the address of the register. This
must also apply to clk_ti_latch(). Changes to TI's clk-mux and
clk-divider drivers prevented the patch from generating compile errors.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 1 May 2021 15:05:22 +0000 (17:05 +0200)]
clk: ti: add custom API for memory access
As pointed by [1] and [2], commit
d64b9cdcd4 ("fdt: translate address if #size-cells = <0>") is wrong:
- It makes every 'reg' DT property translatable. It changes the address
translation so that for an I2C 'reg' address you'll get back as reg
the I2C controller address + reg value.
- The quirk must be fixed with platform code.
The clk_ti_get_reg_addr() is the platform code able to make the correct
address translation for the AM33xx clocks registers. Its implementation
was inspired by the Linux Kernel code.
[1] https://patchwork.ozlabs.org/project/uboot/patch/
1614324949-61314-1-git-send-email-bmeng.cn@gmail.com/
[2] https://lore.kernel.org/linux-clk/
20210402192054.7934-1-dariobin@libero.it/T/
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Tom Rini [Tue, 11 May 2021 16:23:11 +0000 (12:23 -0400)]
Merge tag 'u-boot-imx-
20210502' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
u-boot-imx-
20210502
-------------------
- mx6: fixes for Ventana
- local fixes from maintainer
- imx7d: Ronetix's iMX7-CM
- imx8: Ronetix iMX8MQ-CM
Engicam i.Core MX8M
Compulab iot-gate-imx8
- Fixes i.MX8 documentation
- Fixes phy usage with fec
Tom Rini [Tue, 11 May 2021 16:19:09 +0000 (12:19 -0400)]
configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 11 May 2021 14:05:03 +0000 (10:05 -0400)]
Merge branch 'finish-DM_MMC-migration'
- Complete the migration to LIBATA requiring BLK to be enabled.
- Complete the migration to DM_MMC being required for non-SPL/TPL
U-Boot.
Tom Rini [Wed, 21 Apr 2021 19:32:27 +0000 (15:32 -0400)]
DM: DM_MMC migration is now mandatory for non-SPL
As it has been now two years past the migration deadline, it is required
to have migrated. Remove the check from the Makefile and rework some of
the Kconfig logic slightly to get the functional dependencies of DM_MMC
/ BLK right in both the SPL and non-SPL case.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 21 Apr 2021 19:32:26 +0000 (15:32 -0400)]
ata: Make LIBATA means AHCI is enabled mandatory.
The migration deadline for having LIBATA mean that AHCI is also enabled
was v2019.07. As that has long since passed, adjust the Kconfig
dependencies.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 21 Apr 2021 19:32:25 +0000 (15:32 -0400)]
boards: Disable CMD_SATA on platforms that no longer have a SATA driver enabled
There are a number of platforms that depend on a SATA driver that has
been converted to require AHCI but the platforms themselves are behind
on other migrations that would make it trivial to enable AHCI. Disable
SATA in these cases.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 21 Apr 2021 16:32:46 +0000 (12:32 -0400)]
ppc: Remove some SECURE_BOOT defconfigs
These specific configs are missing a number of migrations. In addition,
they are blocking completion of the now-expired DM_MMC migration as it
requires enabling BLK.
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Ruchika Gupta <ruchika.gupta@nxp.com>
Cc: Sumit Garg <sumit.garg@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 10 May 2021 21:03:22 +0000 (17:03 -0400)]
Prepare v2021.07-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 10 May 2021 12:02:00 +0000 (08:02 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-x86
- x86: correct regwidth prompt in cbsysinfo
- virtio: convert README.virtio to reST
Bin Meng [Thu, 29 Apr 2021 09:40:08 +0000 (17:40 +0800)]
MAINTAINERS: Add an entry for VirtIO
This was missed when VirtIO support was initially brought to U-Boot
back in 2018. Add an entry for it and list myself as the maintainer.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng [Thu, 29 Apr 2021 09:40:07 +0000 (17:40 +0800)]
doc: develop: Convert README.virtio to reST
This converts the existing README.virtio to reST, and puts it under
the develop/driver-model/ directory.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Simon Glass [Fri, 23 Apr 2021 22:04:57 +0000 (10:04 +1200)]
x86: Correct regwidth prompt in cbsysinfo
This should be 'regwidth', not 'baud'. Fix it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tom Rini [Fri, 7 May 2021 12:57:32 +0000 (08:57 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 6 May 2021 15:00:07 +0000 (11:00 -0400)]
Merge branch '2021-05-06-misc-updates'
- Allow for boards to update bootargs before booting the OS (helpful in
some forms of secure boot).
- Enhance GPT write support.
- gpio-sysinfo updates
- Allow env to be appended from dtb
Heinrich Schuchardt [Fri, 9 Apr 2021 10:48:14 +0000 (10:48 +0000)]
cmd/exception: support ebreak exception on RISC-V
The ebreak instruction should generate a breakpoint exception.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>