platform/kernel/u-boot.git
2 years agoMerge tag 'u-boot-stm32-20220620' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Mon, 20 Jun 2022 12:09:24 +0000 (08:09 -0400)]
Merge tag 'u-boot-stm32-20220620' of https://source.denx.de/u-boot/custodians/u-boot-stm into next

- Add STM32MP13 SoCs support with associated board STM32M135F-DK
- Correct livetree support in stm32mp1 boards
- Activate livetree for stm32mp15 DHSOM boards

2 years agoMerge tag 'fsl-qoriq-2022-6-20-v2' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 20 Jun 2022 12:08:29 +0000 (08:08 -0400)]
Merge tag 'fsl-qoriq-2022-6-20-v2' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next

Layerscape:
 add sfp driver
 Kconfig cleanup
 sl28 board update
 support hdp firmware loading
powerpc:
 dts update for p2020
 p1_p2_rdb_pc board update
 fsl_esdhc fallback to 1-bit mode support

2 years agoboard: sl28: rename include guard macro
Michael Walle [Mon, 30 May 2022 21:02:10 +0000 (23:02 +0200)]
board: sl28: rename include guard macro

Avoid name clashes with an include file on board level.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agoboard: sl28: support 8 GiB memory
Michael Walle [Mon, 30 May 2022 21:02:09 +0000 (23:02 +0200)]
board: sl28: support 8 GiB memory

The board supports up to 8 GiB memory. The memory is soldered on the
board but the configuration is equivalent to a dual chip select, dual
rank DIMM module.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agoboard: sl28: remove unneeded ddr config parameter
Michael Walle [Mon, 30 May 2022 21:02:08 +0000 (23:02 +0200)]
board: sl28: remove unneeded ddr config parameter

config_2 doesn't need to be set to zero because that is already the
default value.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agoboard: sl28: set CPO value
Michael Walle [Mon, 30 May 2022 21:02:07 +0000 (23:02 +0200)]
board: sl28: set CPO value

With a 8GiB memory board, it seems that the "very unlikely event" of a
DDR initialization with non-optimal values are not really that unlikely.
It happens in about every other reboot. As described in erratum
A-009942, preset the DEBUG_28 register with an optimal value. The value
iself depends on the memory configuration of the board, but the used
value seems to work well for all variants.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agoarmv8: layerscape: add missing RCW source defines
Michael Walle [Mon, 30 May 2022 21:02:05 +0000 (23:02 +0200)]
armv8: layerscape: add missing RCW source defines

A board might need to get the source of the RCW word, which is also the
boot source in most cases.

These defines are taken from the LS1028A and I expect they are the same
across the SoCs with the same chassis, after all, there was already a
reset source for NOR flash.

Signed-off-by: Michael Walle <michael@walle.cc>
2 years agopowerpc: bootm: Fix sizes in memory adjusting warning
Pali Rohár [Thu, 26 May 2022 12:36:03 +0000 (14:36 +0200)]
powerpc: bootm: Fix sizes in memory adjusting warning

Old size is stored in size variable and new size is in bootm_size variable.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoboard: freescale: p1_p2_rdb_pc: Move boot reset macros to p1_p2_bootsrc.h
Pali Rohár [Thu, 26 May 2022 08:52:27 +0000 (10:52 +0200)]
board: freescale: p1_p2_rdb_pc: Move boot reset macros to p1_p2_bootsrc.h

Code for changing boot source is platform generic and can be used by any
P1* and P2* compatible RDB board. Not only by boards which use config
header file p1_p2_rdb_pc.h.

So move this code from p1_p2_rdb_pc.h to p1_p2_bootsrc.h and cleanup macros
for generating boot source env variables in CONFIG_EXTRA_ENV_SETTINGS.

This allows to use code for resetting board and rebooting to other boot
source also by other boards in future.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define PMC node
Pali Rohár [Tue, 24 May 2022 11:24:59 +0000 (13:24 +0200)]
powerpc: dts: p2020: Define PMC node

Copy definition of PMC node from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agommc: fsl_esdhc: Add new config option for default fallback mode
Pali Rohár [Wed, 11 May 2022 18:27:13 +0000 (20:27 +0200)]
mmc: fsl_esdhc: Add new config option for default fallback mode

Currently default fallback SDHC mode is 1-bit. Add new config option
CONFIG_SYS_FSL_ESDHC_DEFAULT_BUS_WIDTH to allow specifying default fallback
mode. This is useful e.g. for SPL builds which loads other parts from SD
card during boot process.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agommc: fsl_esdhc: Set fallback mode to 1-bit
Pali Rohár [Wed, 11 May 2022 18:27:12 +0000 (20:27 +0200)]
mmc: fsl_esdhc: Set fallback mode to 1-bit

8-bit mode is not supported by SD cards and on P2020 are four SDHC pins
shared with SPI (so if P2020 board have also SPI then only 4-bit SDHC mode
is provided). So 8-bit SDHC mode is really bad default.

When max bus width is not provided then set mode to 1-bit. This mode is
supported by all cards, so it is the best option for fallback mode.

Also P2020 bootrom sets mode to 1-bit when booting from SD/MMC card.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agols1028a: hdp: Add config support for HDP firmware loading
Alison Wang [Tue, 10 May 2022 10:29:10 +0000 (18:29 +0800)]
ls1028a: hdp: Add config support for HDP firmware loading

This patch adds config support for HDP firmware loading on LS1028A.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2 years agopowerpc: mpc85xx: Set default SYS_IMMR value for P1/P2 CPUs
Pali Rohár [Mon, 2 May 2022 16:29:25 +0000 (18:29 +0200)]
powerpc: mpc85xx: Set default SYS_IMMR value for P1/P2 CPUs

This reduce usage of per-board custom settings.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agomtd: rawnand: fsl_elbc: Fix DM support in DTS code path
Pali Rohár [Mon, 2 May 2022 16:28:08 +0000 (18:28 +0200)]
mtd: rawnand: fsl_elbc: Fix DM support in DTS code path

For proper DM support it is required to fill also mtd->dev member.
Otherwise DM would not see nand device at all.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: mmu: Fix FSL_BOOKE_MAS2() macro
Pali Rohár [Sun, 1 May 2022 17:17:35 +0000 (19:17 +0200)]
powerpc: mmu: Fix FSL_BOOKE_MAS2() macro

Effective page number mask for MAS2 register is stored in macro MAS2_EPN.

Fixes: 2146cf56821c ("Reworked FSL Book-E TLB macros to be more readable")
Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: fsl_law: Add definition for first PCIe target interface
Pali Rohár [Sun, 1 May 2022 15:45:58 +0000 (17:45 +0200)]
powerpc: fsl_law: Add definition for first PCIe target interface

Header file asm/fsl_law.h already provides correct definition for second
and third PCIe controller (LAW_TRGT_IF_PCIE_2 and LAW_TRGT_IF_PCIE_3). But
is missing definition for the first PCIe controller (LAW_TRGT_IF_PCIE_1).

Note that existing definition for LAW_TRGT_IF_PCIE_2 and LAW_TRGT_IF_PCIE_3
are slightly complicated, but are really correct for P2020 platform.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoboard: freescale: p1_p2_rdb_pc: Implement board_reset()
Pali Rohár [Sun, 1 May 2022 12:23:14 +0000 (14:23 +0200)]
board: freescale: p1_p2_rdb_pc: Implement board_reset()

Do board reset via CPLD's system reset register.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoboard: freescale: p1_p2_rdb_pc: Enable TDM function only for P1010
Pali Rohár [Sun, 1 May 2022 12:20:48 +0000 (14:20 +0200)]
board: freescale: p1_p2_rdb_pc: Enable TDM function only for P1010

TDM function is supported only on P1010. P2020 does not have PMUXCR_TDM_ENA
register, so do not enable it.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: mpc85xx: Fix compilation with CONFIG_WDT
Pali Rohár [Thu, 28 Apr 2022 11:31:43 +0000 (13:31 +0200)]
powerpc: mpc85xx: Fix compilation with CONFIG_WDT

When CONFIG_WDT is enabled then non-DM watchdog code cannot be used due to
conflicting functions like watchdog_reset(). So disable compilation of
mpc85xx watchdog_reset() function when CONFIG_WDT is enabled.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define ecm, memory and guts nodes
Pali Rohár [Wed, 27 Apr 2022 14:05:01 +0000 (16:05 +0200)]
powerpc: dts: p2020: Define ecm, memory and guts nodes

Copy definition of these nodes from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define DMA nodes
Pali Rohár [Wed, 27 Apr 2022 14:05:00 +0000 (16:05 +0200)]
powerpc: dts: p2020: Define DMA nodes

Copy definition of DMA nodes from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define crypto node
Pali Rohár [Wed, 27 Apr 2022 14:04:59 +0000 (16:04 +0200)]
powerpc: dts: p2020: Define crypto node

Copy definition of crypto node from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agopowerpc: dts: p2020: Define MPIC nodes
Pali Rohár [Wed, 27 Apr 2022 14:04:58 +0000 (16:04 +0200)]
powerpc: dts: p2020: Define MPIC nodes

Copy definition of MPIC nodes from upstream Linux kernel P2020 dts files.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoARM: layerscape: Use ARCH_LS104?A insead of TARGET_LS104?ARDB
Sean Anderson [Tue, 26 Apr 2022 18:31:49 +0000 (14:31 -0400)]
ARM: layerscape: Use ARCH_LS104?A insead of TARGET_LS104?ARDB

These frequency calculations depend on the RCW format, which is not
dependent on any particular board. Switch to using ARCH symbols instead
of TARGET.

This whole function could probably use less ifdefs, but for now just do
a minimal conversion.

Fixes: 24cb6f2295 ("fsl-layerscape: Add fsl_esdhc peripheral clock support")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoarch: layerscape: Add SFP binding
Sean Anderson [Fri, 22 Apr 2022 18:34:20 +0000 (14:34 -0400)]
arch: layerscape: Add SFP binding

This adds an SFP binding for the processors it is present on. I have
only tested this for the LS1046A.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoARM: dts: ls1021a: update the clockgen node
Sean Anderson [Fri, 22 Apr 2022 18:34:19 +0000 (14:34 -0400)]
ARM: dts: ls1021a: update the clockgen node

QorIQ platforms now use different clock bindings. Although we don't use
the device tree for clocks on this platform, it is helpful to sync it
because then the bindings will more closely match Linux. Additionally,
it allows for using more clock fractions (such as platform/4).

This corresponds to Linux commit b6f5e7019391 ("ARM: dts: ls1021a:
update the clockgen node").

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agoarm: layerscape: Add sfp driver
Sean Anderson [Fri, 22 Apr 2022 18:34:18 +0000 (14:34 -0400)]
arm: layerscape: Add sfp driver

This adds a driver for the Security Fuse Processor (SFP) present on
LS1012A, LS1021A, LS1043A, and LS1046A processors. It holds the
Super-Root Key (SRK), One-Time-Programmable Master Key (OTPMK), and
other "security" related fuses. Similar devices (sharing the same name)
are present on other processors, but for the moment this just supports
the LS2 variants.

The mirror registers are loaded during power-on reset. All mirror
registers must be programmed or read at once. Because of this, `fuse
prog` will program all fuses, even though only one might be specified.
To prevent accidentally burning through all your fuse programming cycles
with something like `fuse prog 0 0 A B C D`, we limit ourselves to one
programming cycle per reset. Fuses are numbered based on their address.
The fuse at 0x1e80200 is 0, the fuse at 0x1e80204 is 1, etc.

The TA_PROG_SFP supply must be enabled when programming fuses, but must
be disabled when reading them. Typically this supply is enabled by
inserting a jumper or by setting a register in the board's FPGA. I've
also added support for using a regulator. This could be helpful for
automatically issuing the FPGA write, or for toggling a GPIO controlling
the supply.

I suggest using the following procedure for programming:

1. Override the fuses you wish to program
   => fuse override 0 2 A B C D
2. Inspect the values and ensure that they are what you expect
   => fuse sense 0 2 4
3. Enable TA_PROG_SFP
4. Issue a program command using OSPR0 as a dummy. Since it contains the
   write-protect bit you will usually want to write it last anyway.
   => fuse prog 0 0 0
5. Disable TA_PROG_SFP
6. Read back the fuses and ensure they are correct
   => fuse read 0 2 4

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2 years agostm32mp1: fix reference for STMicroelectronics
Patrick Delaunay [Fri, 20 May 2022 16:38:10 +0000 (18:38 +0200)]
stm32mp1: fix reference for STMicroelectronics

Replace reference to the correct name STMicroelectronics

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32mp: cleanup the stm32mp15 file
Patrick Delaunay [Wed, 15 Jun 2022 17:41:48 +0000 (19:41 +0200)]
configs: stm32mp: cleanup the stm32mp15 file

Remove STM32_SYSRAM_END and clean the comments in stm32mp15_common.h file
after moving some CONFIG to Kconfig: CONFIG_SYS_CBSIZE,
CONFIG_SPL_MAX_FOOTPRINT, CONFIG_SYS_SPL_MALLOC_START and
CONFIG_SYS_SPL_MALLOC_SIZE.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agostm32mp: stpmic1: remove the debug unit request by debugger
Patrick Delaunay [Wed, 1 Jun 2022 16:33:40 +0000 (18:33 +0200)]
stm32mp: stpmic1: remove the debug unit request by debugger

Depending on backup register value, U-Boot SPL maintains the debug unit
powered-on for debugging purpose; only BUCK1 is required for powering
the debug unit, so revert the setting for all the other power lanes,
except BUCK3 that has to be always on.

To be functional this patch requires a modification in the debugger
,openocd for example, to update the STM32MP15 backup register when it is
required to debug SPL after reset. After deeper analysis this behavior
will be never supported in tools so the associated code, will be never
used and the associated code can be removed.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoARM: stm32: activate OF_LIVE for DHSOM
Patrick Delaunay [Mon, 6 Jun 2022 14:04:16 +0000 (16:04 +0200)]
ARM: stm32: activate OF_LIVE for DHSOM

Activate the live DT with CONFIG_OF_LIVE to reduce the DT parsing
time.

Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoboard: dhelectronics: stm32mp1: convert to livetree
Patrick Delaunay [Mon, 6 Jun 2022 14:04:15 +0000 (16:04 +0200)]
board: dhelectronics: stm32mp1: convert to livetree

Replace call to fdt_*() functions and access to gd->fdt_blob
with call to ofnode_*() functions to support a live tree.

Tested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoboard: engicam: stm32mp1: convert to livetree
Patrick Delaunay [Thu, 19 May 2022 07:07:30 +0000 (09:07 +0200)]
board: engicam: stm32mp1: convert to livetree

Replace gd->fdt_blob access with fdt_getprop() function to the
function ofnode_get_property() to support a live tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoboard: stm32mp1: convert to livetree
Patrick Delaunay [Thu, 19 May 2022 07:07:29 +0000 (09:07 +0200)]
board: stm32mp1: convert to livetree

Replace gd->fdt_blob access with fdt_getprop() function to the
function ofnode_get_property() to support a live tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agomisc: stm32mp13: introduce STM32MP13 RCC driver
Patrick Delaunay [Thu, 19 May 2022 15:56:46 +0000 (17:56 +0200)]
misc: stm32mp13: introduce STM32MP13 RCC driver

Add the MISC RCC driver for STM32MP13, and bind it to the RCC reset
driver, required for initial support.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Acked-by: Sean Anderson <seanga2@gmail.com>
Change-Id: Ida11c15462caf140f87b1e3239efa2b8a689acb9

2 years agoclk: Add directory for STM32 clock drivers
Patrick Delaunay [Thu, 19 May 2022 15:56:45 +0000 (17:56 +0200)]
clk: Add directory for STM32 clock drivers

Add a directory in drivers/clk to regroup the clock drivers for all
STM32 Soc with CONFIG_ARCH_STM32 (MCUs with cortex M) or
CONFIG_ARCH_STM32MP (MPUs with cortex A).

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Grzegorz Szymaszek <gszymaszek@short.pl>
Acked-by: Sean Anderson <seanga2@gmail.com>
Change-Id: I955af307963f732167396f0157a30cf2fc91f150

2 years agostm32mp: fdt: update etzpc for STM32MP13x
Patrick Delaunay [Mon, 9 May 2022 15:13:22 +0000 (17:13 +0200)]
stm32mp: fdt: update etzpc for STM32MP13x

Add support of STM32MP13x the ETZPC part of fdt.c

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: If2777fbf66b8525a2a447056780aaa04e6b0a9a0

2 years agostm32mp: fdt: update etzpc for STM32MP15x
Patrick Delaunay [Mon, 9 May 2022 15:13:21 +0000 (17:13 +0200)]
stm32mp: fdt: update etzpc for STM32MP15x

Introduce STM32MP15 function and defines to prepare the
STM32MP13 introduction.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Change-Id: I909b205e73dcf207e0216aae5905c3c52472020e

2 years agodoc: st: stm32mp1: add STM32MP13x support
Patrick Delaunay [Fri, 20 May 2022 16:24:54 +0000 (18:24 +0200)]
doc: st: stm32mp1: add STM32MP13x support

Add in U-Boot documentation the quick instruction to
setup the STMicroelectronics STM32MP13x boards.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: add stm32mp13 defconfig
Patrick Delaunay [Fri, 20 May 2022 16:24:53 +0000 (18:24 +0200)]
configs: add stm32mp13 defconfig

Add a initial config for STM32M13x SOC family, using the stm32mp135f-dk
device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: dts: stm32mp: add stm32mp13 device tree for U-Boot
Patrick Delaunay [Fri, 20 May 2022 16:24:52 +0000 (18:24 +0200)]
arm: dts: stm32mp: add stm32mp13 device tree for U-Boot

Compile the device tree of STM32MP13x boards and add the needed
U-Boot add-on.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agommc: stm32_sdmmc2: make reset property optional
Patrick Delaunay [Fri, 20 May 2022 16:24:51 +0000 (18:24 +0200)]
mmc: stm32_sdmmc2: make reset property optional

Although not recommended, the reset property could be made optional.
This way the driver will probe even if no reset property is provided
in an sdmmc node in DT. This reset is already optional in Linux.

Signed-off-by: Yann Gautier <yann.gautier@foss.st.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agoram: stm32mp1: add support of STM32MP13x
Patrick Delaunay [Fri, 20 May 2022 16:24:50 +0000 (18:24 +0200)]
ram: stm32mp1: add support of STM32MP13x

Add support for new compatible "st,stm32mp13-ddr" to manage the
DDR sub system (Controller and PHY) in STM32MP13x SOC:
- only one AXI port
- support of 16 port output (MEMC_DRAM_DATA_WIDTH = 2)

The STM32MP15x SOC have 2 AXI ports and 32 bits support.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoboard: stm32pm1: add stm32mp13 board support
Patrick Delaunay [Fri, 20 May 2022 16:24:49 +0000 (18:24 +0200)]
board: stm32pm1: add stm32mp13 board support

Add stm32mp15x prefix to all STM32MP15x board specific functions,
this patch is a preliminary step for STM32MP13x support.

This patch also adds the RCC probe to avoid circular access with
usbphyc probe as clk provider.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agopinctrl: stm32: add support of STM32MP135
Patrick Delaunay [Fri, 20 May 2022 16:24:48 +0000 (18:24 +0200)]
pinctrl: stm32: add support of STM32MP135

Add support for "st,stm32mp135-pinctrl" for STM32MP13x

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32mp: support 2 MAC address for STM32MP13
Patrick Delaunay [Fri, 20 May 2022 16:24:47 +0000 (18:24 +0200)]
arm: stm32mp: support 2 MAC address for STM32MP13

Add support of several MAC address in OTP (3 32bits OTP word for
2 MAC address) for SOCs in  STM32MP13x family: STM32MP133 and STM32MP135.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32mp: add support of STM32MP13x
Patrick Delaunay [Fri, 20 May 2022 16:24:46 +0000 (18:24 +0200)]
arm: stm32mp: add support of STM32MP13x

Introduce the code in mach-stm32mp and the configuration file
stm32mp13_defconfig for the new STM32MP family.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32mp: add CONFIG_STM32MP15_PWR
Patrick Delaunay [Fri, 20 May 2022 16:24:45 +0000 (18:24 +0200)]
arm: stm32mp: add CONFIG_STM32MP15_PWR

Add config CONFIG_STM32MP15_PWR to handle the
access to regulators managed by the PWR driver defined in
pwr_regulator.c

This driver is only used in U-Boot by STM32MP15x family.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32mp: add sub config Kconfig.15x
Patrick Delaunay [Fri, 20 May 2022 16:24:44 +0000 (18:24 +0200)]
arm: stm32mp: add sub config Kconfig.15x

Add sub Kconfig for each SOC in the STM32 CPU family.

It is a preliminary step to introduce a new SOC in the STM32MP family.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32mp: add choice for STM32MP SOC family
Patrick Delaunay [Fri, 20 May 2022 16:24:43 +0000 (18:24 +0200)]
arm: stm32mp: add choice for STM32MP SOC family

Add mandatory choice for SOC support in ARCH_STM32MP.

This patch is a preliminary step for new SOC introduction
in STM32MP family.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32mp: move code for STM32MP15x
Patrick Delaunay [Fri, 20 May 2022 16:24:42 +0000 (18:24 +0200)]
arm: stm32mp: move code for STM32MP15x

Move code and defines only needed for CONFIG_STM32MP15x in stm32mp15x.c
when low level init without TFABOOT is supported.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoarm: stm32mp: move the get_otp helper function in bsec
Patrick Delaunay [Fri, 20 May 2022 16:24:41 +0000 (18:24 +0200)]
arm: stm32mp: move the get_otp helper function in bsec

As the get_otp() helper function in bsec are common for all STM32MP family,
move this function in bsec driver

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoconfigs: stm32mp1: move SUPPORT_SPL in STM32MP15x
Patrick Delaunay [Fri, 20 May 2022 16:24:40 +0000 (18:24 +0200)]
configs: stm32mp1: move SUPPORT_SPL in STM32MP15x

The SPL is only supported by STM32MP15x not by all the
SOC with STM32MP arch.
Only TFABOOT is supported in next products.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2 years agoARM: dts: stm32: add STM32MP13 SoCs support
Patrick Delaunay [Fri, 20 May 2022 16:24:39 +0000 (18:24 +0200)]
ARM: dts: stm32: add STM32MP13 SoCs support

Add initial support of STM32MP13 family based on v5.18-rc2

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 years agoMerge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next
Tom Rini [Thu, 16 Jun 2022 13:27:43 +0000 (09:27 -0400)]
Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

2 years agoimx: phycore_imx8mm/p: clean up board watchdog code
Peng Fan [Sat, 11 Jun 2022 12:21:10 +0000 (20:21 +0800)]
imx: phycore_imx8mm/p: clean up board watchdog code

pinctrl_wdog already marked u-boot,dm-spl, so clean up board code.

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Teresa Remmet <t.remmet@phytec.de>
2 years agoimx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL
Peng Fan [Sat, 11 Jun 2022 12:21:09 +0000 (20:21 +0800)]
imx: imx8mn-kontron-n801x: enable pinctrl_wdog in SPL

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoimx: imx8mp_rsb7320a1: enable wdog driver model in SPL
Peng Fan [Sat, 11 Jun 2022 12:21:08 +0000 (20:21 +0800)]
imx: imx8mp_rsb7320a1: enable wdog driver model in SPL

Mark wdog1/pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mn_var_som: clean up board watchdog code
Peng Fan [Sat, 11 Jun 2022 12:21:07 +0000 (20:21 +0800)]
imx: imx8mn_var_som: clean up board watchdog code

pinctrl_wdog already marked u-boot,dm-spl, so clean up board code.

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
2 years agoimx: imx8mn-beacon: enable pinctrl_wdog in SPL
Peng Fan [Sat, 11 Jun 2022 12:21:06 +0000 (20:21 +0800)]
imx: imx8mn-beacon: enable pinctrl_wdog in SPL

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL
Peng Fan [Sat, 11 Jun 2022 12:21:05 +0000 (20:21 +0800)]
imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: engicam-imx8mm: drop unused macro
Peng Fan [Sat, 11 Jun 2022 12:21:04 +0000 (20:21 +0800)]
imx: engicam-imx8mm: drop unused macro

Drop unused WDOG macro

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
2 years agoimx: imx8mm-cl-iot-gate: enable pinctrl_wdog in SPL
Peng Fan [Sat, 11 Jun 2022 12:21:03 +0000 (20:21 +0800)]
imx: imx8mm-cl-iot-gate: enable pinctrl_wdog in SPL

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: imx8mm_beacon: enable pinctrl_wdog in SPL
Peng Fan [Sat, 11 Jun 2022 12:21:02 +0000 (20:21 +0800)]
imx: imx8mm_beacon: enable pinctrl_wdog in SPL

Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,

The set_wdog_reset() function is not necessary as this is handled by
the imx_watchdog.c driver due to the 'fsl,ext-reset-output' property
being set.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoconfigs: drop CONFIG_SPL_ABORT_ON_RAW_IMAGE
Peng Fan [Sat, 11 Jun 2022 12:21:01 +0000 (20:21 +0800)]
configs: drop CONFIG_SPL_ABORT_ON_RAW_IMAGE

CONFIG_SPL_RAW_IMAGE_SUPPORT default y has been used to replace
CONFIG_SPL_ABORT_ON_RAW_IMAGE for quite some time, so drop
CONFIG_SPL_ABORT_ON_RAW_IMAGE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 years agoimx: kontron-sl-mx8mm: enable DM_SERIAL
Peng Fan [Sat, 11 Jun 2022 12:21:00 +0000 (20:21 +0800)]
imx: kontron-sl-mx8mm: enable DM_SERIAL

Enable CONFIG_DM_SERIAL. uart and its pinmux was already
marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver
model work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2 years agoimx: imx8mn_var_som: enable DM_SERIAL
Peng Fan [Sat, 11 Jun 2022 12:20:59 +0000 (20:20 +0800)]
imx: imx8mn_var_som: enable DM_SERIAL

Enable CONFIG_DM_SERIAL. uart and its pinmux was already
marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver
model work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: imx8m[m/p]_phycore: Enable DM_SERIAL
Peng Fan [Sat, 11 Jun 2022 12:20:58 +0000 (20:20 +0800)]
imx: imx8m[m/p]_phycore: Enable DM_SERIAL

Enable CONFIG_DM_SERIAL. uart and its pinmux was already
marked with u-boot,dm-spl.
Move preloader_console_init after spl_early_init to make sure driver
model work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: imx8mm_icore: Enable SPL_DM_SERIAL
Peng Fan [Sat, 11 Jun 2022 12:20:57 +0000 (20:20 +0800)]
imx: imx8mm_icore: Enable SPL_DM_SERIAL

Enable CONFIG_SPL_DM_SERIAL. uart2 and its pinmux was already
marked with u-boot,dm-spl.
Move preloader_console_init after spl_early_init to make sure driver
model work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: imx8mm-cl-iot-gate: Enable DM_SERIAL
Peng Fan [Sat, 11 Jun 2022 12:20:56 +0000 (20:20 +0800)]
imx: imx8mm-cl-iot-gate: Enable DM_SERIAL

Enable CONFIG_DM_SERIAL. uart3 and its pinmux was already
marked with u-boot,dm-spl.
Move preloader_console_init after spl_early_init to make sure driver
model work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2 years agoimx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL
Peng Fan [Sat, 11 Jun 2022 12:20:55 +0000 (20:20 +0800)]
imx: imx8m[m/n]_beacon: Enable SPL_DM_SERIAL

Enable CONFIG_SPL_DM_SERIAL. uart2 and its pinmux was already
marked with u-boot,dm-spl.
Move preloader_console_init after spl_init to make sure driver
model work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Adam Ford <aford173@gmail.com> #imx8mm_beacon
Reviewed-by: Fabio Estevam <festevam@denx.de>
Tested-by: Adam Ford <aford173@gmail.com> #imx8mn_beacon
2 years agoimx: drop CONFIG_MXC_UART_BASE
Peng Fan [Sat, 11 Jun 2022 12:20:54 +0000 (20:20 +0800)]
imx: drop CONFIG_MXC_UART_BASE

Since these boards has CONFIG_DM_SERIAL and/or CONFIG_SPL_DM_SERIAL,
the legacy macro no need to be defined.

Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Soeren Moch <smoch@web.de>
Acked-by: Tim Harvey <tharvey@gateworks.com>
2 years agoMerge branch '2022-06-10-assorted-platform-updates' into next
Tom Rini [Fri, 10 Jun 2022 20:02:42 +0000 (16:02 -0400)]
Merge branch '2022-06-10-assorted-platform-updates' into next

- TI J721E hyperflash support, TI OMAP3 updates, TI AM654 updates,
  TI AM62 initial support, Broadcom bcmbca 47622 SoC support, NPCM7xx
  pinctrl and rng drivers, Synquacer updates

2 years agodoc: ti: Add readme for AM62x SK
Vignesh Raghavendra [Wed, 25 May 2022 08:08:50 +0000 (13:38 +0530)]
doc: ti: Add readme for AM62x SK

Add info of boot flow and build steps for AM62x SK.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
2 years agoconfigs: Add configs for AM62x SK
Vignesh Raghavendra [Wed, 25 May 2022 08:08:49 +0000 (13:38 +0530)]
configs: Add configs for AM62x SK

Add am62x_evm_r5_defconfig for R5 SPL and am62x_evm_a53_defconfig for
A53 SPL and U-Boot support.

To keep the changes to minimum. Only UART And SD boot related configs
are included. This should serve as good starting point for new board
bringup with AM62x.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
[trini: Migrate a number of CONFIG symbols, have re-tested]
Tested-by: Georgi Vlaev <g-vlaev@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoarm: dts: Add support for AM62-SK
Nishanth Menon [Wed, 25 May 2022 08:08:48 +0000 (13:38 +0530)]
arm: dts: Add support for AM62-SK

AM62 StarterKit (SK) board is a low cost, small form factor board
designed for TI’s AM625 SoC. It supports the following interfaces:
* 2 GB DDR4 RAM
* x2 Gigabit Ethernet interfaces capable of working in Switch and MAC mode
* x1 HDMI Port with audio + x1 OLDI/LVDS Display interface for Dual Display
* x1 Headphone Jack
* x1 USB2.0 Hub with two Type A host and x1 USB Type-C DRP Port
* x1 UHS-1 capable µSD card slot
* 2.4/5 GHz WLAN + Bluetooth 4.2 through WL1837
* 512 Mbit OSPI flash
* x4 UART through UART-USB bridge
* XDS110 for onboard JTAG debug using USB
* Temperature sensors, user push buttons and LEDs
* 40-pin User Expansion Connector
* 24-pin header for peripherals in MCU island (I2C, UART, SPI, IO)
* 20-pin header for Programmable Realtime Unit (PRU) IO pins
* 15-pin CSI header

Add basic support for AM62-SK.

To keep the changes to minimum. Only UART And SD are supported at the
moment. This should serve as good example for adding new board support
based on AM62x SoC

Schematics: https://www.ti.com/lit/zip/sprr448

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2 years agoboard: ti: Introduce the basic files to support AM62 SK board
Suman Anna [Wed, 25 May 2022 08:08:47 +0000 (13:38 +0530)]
board: ti: Introduce the basic files to support AM62 SK board

Add basic support for AM62 SK. This has 2GB DDR.
Note that stack for R5 SPL is in OCRAM @ 0x7000ffff so that is away from
BSS and does not step on BSS section

Add only the bare minimum required to support UART and SD.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarm: dts: Introduce base AM62 SoC dtsi files
Suman Anna [Wed, 25 May 2022 08:08:46 +0000 (13:38 +0530)]
arm: dts: Introduce base AM62 SoC dtsi files

Introduce the basic AM62 SoC description dtsi files describing most
peripherals as per kernel dts.

Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2 years agofirmware: ti_sci_static_data: add static DMA chan data
Vignesh Raghavendra [Wed, 25 May 2022 08:08:45 +0000 (13:38 +0530)]
firmware: ti_sci_static_data: add static DMA chan data

Add range of DMA channels available for R5 SPL usage before DM firmware
is loaded.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2 years agodma: ti: Add PSIL data for AM62x DMASS
Vignesh Raghavendra [Wed, 25 May 2022 08:08:44 +0000 (13:38 +0530)]
dma: ti: Add PSIL data for AM62x DMASS

Add PSIL data for AM62x SoC.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2 years agoarm: mach-k3: am62: Introduce autogenerated SoC data
Suman Anna [Wed, 25 May 2022 08:08:43 +0000 (13:38 +0530)]
arm: mach-k3: am62: Introduce autogenerated SoC data

Introduce autogenerated SoC data support clk and device data for the
AM62. Hook it upto to power-domain and clk frameworks of U-Boot.

Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2 years agoarm: mach-k3: Introduce the basic files to support AM62
Suman Anna [Wed, 25 May 2022 08:08:42 +0000 (13:38 +0530)]
arm: mach-k3: Introduce the basic files to support AM62

The AM62 SoC family is the follow on AM335x built on K3 Multicore SoC
architecture platform, providing ultra-low-power modes, dual display,
multi-sensor edge compute, security and other BOM-saving integration.
The AM62 SoC targets broad market to enable applications such as
Industrial HMI, PLC/CNC/Robot control, Medical Equipment, Building
Automation, Appliances and more.

Some highlights of this SoC are:

* Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster.
  Pin-to-pin compatible options for single and quad core are available.
* Cortex-M4F for general-purpose or safety usage.
* Dual display support, providing 24-bit RBG parallel interface and
  OLDI/LVDS-4 Lane x2, up to 200MHz pixel clock support for 2K display
  resolution.
* Selectable GPUsupport, up to 8GFLOPS, providing better user experience
  in 3D graphic display case and Android.
* PRU(Programmable Realtime Unit) support for customized programmable
  interfaces/IOs.
* Integrated Giga-bit Ethernet switch supporting up to a total of two
  external ports (TSN capable).
* 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3x eMMC and SD, GPMC for
  NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio,
  1x CSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals.
* Dedicated Centralized System Controller for Security, Power, and
  Resource Management.
* Multiple low power modes support, ex: Deep sleep,Standby, MCU-only,
  enabling battery powered system design.

AM625 is the first device of the family. Add DT bindings for the same.

More details can be found in the Technical Reference Manual:
https://www.ti.com/lit/pdf/spruiv7

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agosoc: ti: k3-socinfo: Add entry for AM62X SoC family
Suman Anna [Wed, 25 May 2022 08:08:41 +0000 (13:38 +0530)]
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>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agodt-bindings: pinctrl: k3: Introduce pinmux definitions for AM62
Suman Anna [Wed, 25 May 2022 08:08:40 +0000 (13:38 +0530)]
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>
2 years agodrivers: mmc: am654_sdhci: Add new compatible for AM62 SoC
Aswath Govindraju [Wed, 25 May 2022 08:08:39 +0000 (13:38 +0530)]
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>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2 years agorng: nuvoton: Add NPCM7xx rng driver
Jim Liu [Tue, 24 May 2022 08:56:57 +0000 (16:56 +0800)]
rng: nuvoton: Add NPCM7xx rng driver

Add Nuvoton BMC NPCM750 rng driver.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2 years agoconfigs: am65_evm_r5_usb*_defconfig: Sync the checks for size of image and stack...
Aswath Govindraju [Wed, 18 May 2022 11:19:14 +0000 (16:49 +0530)]
configs: am65_evm_r5_usb*_defconfig: Sync the checks for size of image and stack from generic r5 defconfig

Sync the configs required for enabling checks for size of image and stack
from generic r5 defconfig file.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2 years agoarm: mach-k3: am6_init: Fix the path and value's length in the fixup performed for...
Aswath Govindraju [Wed, 18 May 2022 11:19:13 +0000 (16:49 +0530)]
arm: mach-k3: am6_init: Fix the path and value's length in the fixup performed for usb boot

The node name of the bus in the device tree has changed. Also, the length
argument to be passed should be the length of new value. Therefore, fix the
path to usb device tree node as well as the length argument passed.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2 years agoarm: dts: k3-am654-r5-base-board: Fix the dt properties in usb0 instance
Aswath Govindraju [Wed, 18 May 2022 11:19:12 +0000 (16:49 +0530)]
arm: dts: k3-am654-r5-base-board: Fix the dt properties in usb0 instance

For dfu boot mode, the clocks property needs to be deleted and dr_mode
needs to be set to peripheral. Therefore, add the required fixes for the
same.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2 years agospi: synquacer: simplify tx completion checking
Masahisa Kojima [Tue, 17 May 2022 08:41:39 +0000 (17:41 +0900)]
spi: synquacer: simplify tx completion checking

There is a TX-FIFO and Shift Register empty(TFES) status
bit in spi controller. This commit checks the TFES bit
to wait the TX transfer completes.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Satoru Okamoto <okamoto.satoru@socionext.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
2 years agospi: synquacer: DMSTART bit must not be set while transferring
Masahisa Kojima [Tue, 17 May 2022 08:41:38 +0000 (17:41 +0900)]
spi: synquacer: DMSTART bit must not be set while transferring

DMSTART bit must not be set while there is active transfer.
This commit sets the DMSTART bit only when the transfer begins.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Satoru Okamoto <okamoto.satoru@socionext.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
2 years agospi: synquacer: wait until slave is deselected
Masahisa Kojima [Tue, 17 May 2022 08:41:37 +0000 (17:41 +0900)]
spi: synquacer: wait until slave is deselected

synquacer_cs_set() function does not wait the chip select
is deasserted when the driver sets the DMSTOP to deselect
the slave.
This commit checks the Slave Select Released(SRS) bit to wait
until the slave is deselected.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Satoru Okamoto <okamoto.satoru@socionext.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
2 years agospi: synquacer: busy variable must be initialized before use
Masahisa Kojima [Tue, 17 May 2022 08:41:36 +0000 (17:41 +0900)]
spi: synquacer: busy variable must be initialized before use

"busy" variable is ORed without being initialized,
must be zeroed before use.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: Satoru Okamoto <okamoto.satoru@socionext.com>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
2 years agopinctrl: nuvoton: Add NPCM7xx pinctrl driver
Jim Liu [Tue, 17 May 2022 08:30:32 +0000 (16:30 +0800)]
pinctrl: nuvoton: Add NPCM7xx pinctrl driver

Add Nuvoton BMC NPCM750 Pinmux and Pinconf support.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2 years agoARM: omap3: evm: Fix 'fitImage' booting
Derald D. Woods [Mon, 16 May 2022 03:25:05 +0000 (22:25 -0500)]
ARM: omap3: evm: Fix 'fitImage' booting

This commit sets two additional variables in the default BOOTCOMMAND.
Adding 'boot=mmc' and 'addr_fit=0x8b000000' removes the need for a
special 'uEnv.txt' to be created. The 'addr_fit' variable is the key
piece here. It is normally defined as 0x90000000, in the macro
DEFAULT_FIT_TI_ARGS. For this OMAP34XX board, 0x8b000000 works without
touching other varibles. This was tested with a 'fitImage' created
using the following FIT source:

----------------------------------------------------------------------
/dts-v1/;

/ {
description = "Simple image with single Linux kernel and FDT blob";
#address-cells = <1>;

images {
kernel {
description = "Linux kernel: omap2plus";
data = /incbin/("./zImage");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x80008000>;
entry = <0x80008000>;
hash-1 {
algo = "sha256";
};
};
fdt-omap3-evm.dtb {
description = "FDT: omap3-evm.dtb";
data = /incbin/("./omap3-evm.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
load = <0x8ff00000>;
hash-1 {
algo = "sha256";
};
};
};

configurations {
default = "conf-omap3-evm.dtb";
conf-omap3-evm.dtb {
description = "Boot Linux kernel with FDT blob";
kernel = "kernel";
fdt = "fdt-omap3-evm.dtb";
};
};
};
----------------------------------------------------------------------

Additionally, the default environment is now stored in "uboot.env" on
the FAT partition of MMC '0'.

Fixes: 11e2ab3f0b ("ARM: omap3: evm: Enable booting 'fitImage' with DEFAULT_FIT_TI_ARGS")
Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2 years agoARM: omap3: evm: Complete DM_I2C migration
Derald D. Woods [Mon, 16 May 2022 03:25:04 +0000 (22:25 -0500)]
ARM: omap3: evm: Complete DM_I2C migration

This commits enables DM_I2C and sets the default bus to 0.

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2 years agoARM: omap3: evm: Power on MMC when setting up PMIC
Derald D. Woods [Mon, 16 May 2022 03:25:03 +0000 (22:25 -0500)]
ARM: omap3: evm: Power on MMC when setting up PMIC

This commit copies the related code changes from the BeagleBoard.

Reference:
- https://source.denx.de/u-boot/u-boot/-/commit/848cfe098f59c47a2542385513fb554430b874d6

Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2 years agoarm: bcmbca: introduce the bcmbca architecture and 47622 SOC
William Zhang [Mon, 9 May 2022 16:28:02 +0000 (09:28 -0700)]
arm: bcmbca: introduce the bcmbca architecture and 47622 SOC

This is the initial support for Broadcom's ARM-based 47622 SOC.

In this change, our first SOC is an armv7 platform called 47622. The
initial support includes a bare-bone implementation and dts with ARM
PL011 uart.

The SOC-specific code resides in arch/arm/mach-bcmbca/<soc> and board
related code is in board/broadcom/bcmba.

The u-boot image can be loaded from flash or network to the entry
point address in the memory and boot from there.

Signed-off-by: William Zhang <william.zhang@broadcom.com>
Signed-off-by: Kursad Oney <kursad.oney@broadcom.com>
Signed-off-by: Anand Gore <anand.gore@broadcom.com>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
2 years agoconfigs: j721e_evm_defconfig: Add HBMC related configs
Vaishnav Achath [Mon, 9 May 2022 06:20:17 +0000 (11:50 +0530)]
configs: j721e_evm_defconfig: Add HBMC related configs

Enable HBMC and HyperFlash in R5SPL, A72 SPL and A72 U-Boot

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
[trini: Update j721e_hs_evm_a72 as well]
Signed-off-by: Tom Rini <trini@konsulko.com>