platform/kernel/u-boot.git
2 years agospi: zynq_qspi: Fix programming qspi speed
Ashok Reddy Soma [Fri, 15 Jul 2022 14:01:19 +0000 (19:31 +0530)]
spi: zynq_qspi: Fix programming qspi speed

When programming qspi flash speed we need to check the requested flash
speed not to exceed the spi max frequency. In the current implementation
we are checking qspi ref clk instead. This commit fixes the issue by
checking the requested speed and programs the specified max frequency.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/1657893679-20039-5-git-send-email-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agospi: zynq_qspi: Add support for zynq_qspi_mem_exec_op
Ashok Reddy Soma [Fri, 15 Jul 2022 14:01:18 +0000 (19:31 +0530)]
spi: zynq_qspi: Add support for zynq_qspi_mem_exec_op

Add support_ops function zynq_qspi_mem_exec_op to check controller
supported operations by spi-mem framework. Current default support ops
function does not allow dummy buswidth no more than 1, unless we are
using buswidth is 4 for TX.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/1657893679-20039-4-git-send-email-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agospi: zynq_qspi: Use dummy buswidth in dummy byte calculation
T Karthik Reddy [Fri, 15 Jul 2022 14:01:17 +0000 (19:31 +0530)]
spi: zynq_qspi: Use dummy buswidth in dummy byte calculation

Fix dummy bytes calculation incase of valid dummy bytes when dummy
buswidth is > 1. Current dummy bytes calculation does not provide
correct dummy values for dummy buswidth > 1.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/1657893679-20039-3-git-send-email-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agospi: zynq_qspi: Add child pre probe function
Siva Durga Prasad Paladugu [Fri, 15 Jul 2022 14:01:16 +0000 (19:31 +0530)]
spi: zynq_qspi: Add child pre probe function

Add child pre probe function in the driver. Update max_hz of priv from
spi_slave structure.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/1657893679-20039-2-git-send-email-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agospi: xilinx_spi: Add support ops to axi qspi driver
T Karthik Reddy [Sat, 16 Jul 2022 06:58:47 +0000 (12:28 +0530)]
spi: xilinx_spi: Add support ops to axi qspi driver

Add support_ops function to check controller supported operations by
spi-mem framework. Current default support ops function does not allow
dummy buswidth no more than 1, unless we are using buswidth is 4 for TX.
In order to support dummy buswidth > 1 by spi-nor framework we are adding
explicit support_ops to check controller supported operations.

Fix dummy bytes calculation incase of valid dummy bytes when dummy
buswidth is > 1. Current dummy bytes calculation does not provide
correct dummy values for dummy buswidth > 1.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/1657954727-31972-3-git-send-email-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agospi: xilinx_spi: Add support for spi memory operations
T Karthik Reddy [Sat, 16 Jul 2022 06:58:46 +0000 (12:28 +0530)]
spi: xilinx_spi: Add support for spi memory operations

Add support for spi memory operations for xilinx AXI qspi driver.
This provides an high-level interface to execute SPI memory
operations by the controller.

Remove existing spi transfer based implementation and use
spi memory based exec_op() implementation for qspi IO operations.

Simplified existing startup_block implementation.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/1657954727-31972-2-git-send-email-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: zynqmp: support loading encrypted bitfiles
Adrian Fiergolski [Fri, 22 Jul 2022 14:16:14 +0000 (17:16 +0300)]
fpga: zynqmp: support loading encrypted bitfiles

Add supporting new compatible string "u-boot,zynqmp-fpga-enc" to
handle loading encrypted bitfiles.

This feature requires encrypted FSBL, as according to UG1085:
"The CSU automatically locks out the AES key, stored in either BBRAM
 or eFUSEs, as a key source to the AES engine if the FSBL is not
 encrypted. This prevents using the BBRAM or eFUSE as the key source
 to the AES engine during run-time applications."

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-14-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: zynqmp: support loading authenticated images
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:13 +0000 (17:16 +0300)]
fpga: zynqmp: support loading authenticated images

Add supporting new compatible string "u-boot,zynqmp-fpga-ddrauth" to
handle loading authenticated images (DDR).

Based on solution by Jorge Ramirez-Ortiz <jorge@foundries.io>

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Link: https://lore.kernel.org/r/20220722141614.297383-13-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: zynqmp: add bitstream compatible checking
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:12 +0000 (17:16 +0300)]
fpga: zynqmp: add bitstream compatible checking

Check whether the FPGA ZynqMP driver supports the given bitstream
image type.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-12-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: zynqmp: reduce zynqmppl_load() code
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:11 +0000 (17:16 +0300)]
fpga: zynqmp: reduce zynqmppl_load() code

Reduce the function code by calling xilinx_pm_request() once only.
Use the same variable bsize_req to store either bstream size in bytes
or an address of bstream size according to a type required by the
firmware version. Remove obsolete debug().

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-11-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: xilinx: pass compatible flags to load() callback
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:10 +0000 (17:16 +0300)]
fpga: xilinx: pass compatible flags to load() callback

These flags may be used to check whether an FPGA driver is able to
load a particular FPGA bitstream image.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-10-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agospl: fit: pass real compatible flags to fpga_load()
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:09 +0000 (17:16 +0300)]
spl: fit: pass real compatible flags to fpga_load()

Convert taken FPGA image "compatible" string to a binary compatible
flag and pass it to an FPGA driver.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-9-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: add fpga_compatible2flag
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:08 +0000 (17:16 +0300)]
fpga: add fpga_compatible2flag

Add a "compatible" string to binary flag converter, which uses
a callback str2flag() of given FPGA driver if available.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-8-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: pass compatible flags to fpga_load()
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:07 +0000 (17:16 +0300)]
fpga: pass compatible flags to fpga_load()

These flags may be used to check whether an FPGA driver is able to
load a particular FPGA bitstream image.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-7-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: xilinx: pass compatible flags to xilinx_load()
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:06 +0000 (17:16 +0300)]
fpga: xilinx: pass compatible flags to xilinx_load()

This flag is used to check whether a Xilinx FPGA driver is able to
load a particular FPGA bitstream image.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-6-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: zynqmp: add str2flags call
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:05 +0000 (17:16 +0300)]
fpga: zynqmp: add str2flags call

Add a call to convert FPGA "compatible" string to a binary flag.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-5-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: xilinx: add bitstream flags to driver desc
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:04 +0000 (17:16 +0300)]
fpga: xilinx: add bitstream flags to driver desc

Store a set of supported bitstream types in xilinx_desc structure.
It will be used to determine whether an FPGA image is able to be
loaded with a given driver.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-4-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: xilinx: add missed identifier names
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:03 +0000 (17:16 +0300)]
fpga: xilinx: add missed identifier names

Function definition arguments should also have identifier names.
Add missed ones to struct xilinx_fpga_op callbacks, unifying code.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-3-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoconfigs: imx8mm-cl-iot-gate: enable extension command
Ying-Chun Liu (PaulLiu) [Wed, 25 May 2022 09:30:08 +0000 (17:30 +0800)]
configs: imx8mm-cl-iot-gate: enable extension command

For imx8mm-cl-iot-gate we can use extension command to scan
extension boards attached on the mainboard. We enable the
extension command by default for users to detect the extension
boards.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com>
2 years agoconfigs: imx8mp_venice: remove unnecessary FEC_QUIRK_ENET_MAC
Tim Harvey [Fri, 20 May 2022 15:17:29 +0000 (08:17 -0700)]
configs: imx8mp_venice: remove unnecessary FEC_QUIRK_ENET_MAC

FEC_QUIRK_ENET_MAC is defined in the imx-regs.h include file and thus
does not need to be defined in the various board config includes.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2 years agofpga: add option for loading FPGA secure bitstreams
Oleksandr Suvorov [Fri, 22 Jul 2022 14:16:02 +0000 (17:16 +0300)]
fpga: add option for loading FPGA secure bitstreams

It allows using this feature without enabling the "fpga loads"
command.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Co-developed-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Tested-by: Ricardo Salveti <ricardo@foundries.io>
Tested-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/20220722141614.297383-2-oleksandr.suvorov@foundries.io
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: Convert SYS_FPGA_PROG_FEEDBACK to Kconfig
Alexander Dahl [Thu, 21 Jul 2022 13:31:22 +0000 (15:31 +0200)]
fpga: Convert SYS_FPGA_PROG_FEEDBACK to Kconfig

This converts the following to Kconfig: SYS_FPGA_PROG_FEEDBACK

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Link: https://lore.kernel.org/r/20220721133122.32428-3-ada@thorsis.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: Convert SYS_FPGA_CHECK_CTRLC to Kconfig
Alexander Dahl [Thu, 21 Jul 2022 13:31:21 +0000 (15:31 +0200)]
fpga: Convert SYS_FPGA_CHECK_CTRLC to Kconfig

After commit 8cca60a2cbf2 ("Kconfig: Remove some symbols from the
whitelist") downstream builds failed for boards setting this in
include/configs/…

Signed-off-by: Alexander Dahl <ada@thorsis.com>
Link: https://lore.kernel.org/r/20220721133122.32428-2-ada@thorsis.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoarm64: versal: Enable power domain driver and its dependencies
Ashok Reddy Soma [Fri, 22 Jul 2022 08:46:58 +0000 (02:46 -0600)]
arm64: versal: Enable power domain driver and its dependencies

Enable power domain driver to configure pmufw config object and request
node for all the IP's that are enabled in DT.

This driver depends on mailbox and IPI driver, hence enable them as well.
Add ARCH_VERSAL in the depends on of mailbox Kconfig to compile for
Versal platforms.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20220722084658.30995-6-ashok.reddy.soma@xilinx.com
2 years agomailbox: zynqmp: Move struct zynqmp_ipi_msg from sys_proto.h
Ashok Reddy Soma [Fri, 22 Jul 2022 08:46:57 +0000 (02:46 -0600)]
mailbox: zynqmp: Move struct zynqmp_ipi_msg from sys_proto.h

Mailbox driver might be need for Versal and other future platforms.
To remove the dependency, move struct zynqmp_ipi_msg to
zynqmp_firmware.h so that mailbox driver compiles for other platforms
easily.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20220722084658.30995-5-ashok.reddy.soma@xilinx.com
2 years agoarm64: zynqmp: Enable power domain driver
Ashok Reddy Soma [Fri, 22 Jul 2022 08:46:56 +0000 (02:46 -0600)]
arm64: zynqmp: Enable power domain driver

Enable power domain driver to configure pmufw config object and request
node for all the IP's that are enabled in DT.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20220722084658.30995-4-ashok.reddy.soma@xilinx.com
2 years agofirmware: zynqmp: Load config overlay for core0 to pmufw
Ashok Reddy Soma [Fri, 22 Jul 2022 08:46:55 +0000 (02:46 -0600)]
firmware: zynqmp: Load config overlay for core0 to pmufw

Try loading pmufw config overlay for core0, if it doesn't return any
error it means pmufw is accepting nodes for other IP's. Otherwise dont
try to load config object for any other IP, just return from
zynqmp_pmufw_node function.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20220722084658.30995-3-ashok.reddy.soma@xilinx.com
2 years agofirmware: zynqmp: Change prototype of zynqmp_pmufw_load_config_object()
Ashok Reddy Soma [Fri, 22 Jul 2022 08:46:54 +0000 (02:46 -0600)]
firmware: zynqmp: Change prototype of zynqmp_pmufw_load_config_object()

zynqmp_pmufw_load_config_object() has some error cases and it is better
to return those errors. Change prototype of this function to return
errors.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20220722084658.30995-2-ashok.reddy.soma@xilinx.com
2 years agoarm64: zynqmp: Enable reset driver
Ashok Reddy Soma [Wed, 20 Jul 2022 09:59:59 +0000 (03:59 -0600)]
arm64: zynqmp: Enable reset driver

Enable reset driver for ZynqMP platforms. This will enable us to reset
the IP's using generic reset_assert and reset_deassert calls.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@amd.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/20220720095959.29610-4-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoarm64: versal: Enable reset driver for versal
Michal Simek [Wed, 20 Jul 2022 09:59:58 +0000 (03:59 -0600)]
arm64: versal: Enable reset driver for versal

Add CONFIG_DM_RESET and CONFIG_RESET_ZYNQMP configs in versal default
configuration to enable support for reset driver for versal
platform.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: T Karthik Reddy <t.karthik.reddy@amd.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/20220720095959.29610-3-ashok.reddy.soma@xilinx.com
2 years agoreset: zynqmp: Add reset driver support for versal
T Karthik Reddy [Wed, 20 Jul 2022 09:59:57 +0000 (03:59 -0600)]
reset: zynqmp: Add reset driver support for versal

Add support for versal platform by adding "xlnx,versal-reset"
compatible string in zynqmp-reset driver. Reset numbering schema
for versal is not same as zynqmp, so nr_reset and reset_id are
set to zero. In case of assert/dessert, required device reset id
is sent from respective driver through struct reset_ctl.

Signed-off-by: T Karthik Reddy <t.karthik.reddy@amd.com>
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/20220720095959.29610-2-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoxilinx: common: Use strlcpy instead of strncpy
Michal Simek [Thu, 21 Jul 2022 14:19:18 +0000 (16:19 +0200)]
xilinx: common: Use strlcpy instead of strncpy

It is recommendation done by checkpatch to all the time have \0 terminated
strings.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c7bfab50c40f6213f1b347b5e4674e382e83cb94.1658413156.git.michal.simek@amd.com
2 years agoxilinx: Wire uuid reading from FRU
Michal Simek [Thu, 21 Jul 2022 14:19:17 +0000 (16:19 +0200)]
xilinx: Wire uuid reading from FRU

UUID is already recorded when FRU is parsed but it is not copied to local
structures and exported to variable that's why simply add it.
Data is saved in binary format but there must be conversion to string for
exporting it to variable and string should be in uuid format too.

One way how to use it directly is to setup pxeuuid based on it. For
example via preboot with "setenv pxeuuid ${board_uuid}"

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/1dfa4b4220a508abc05351da2119880811b77612.1658413156.git.michal.simek@amd.com
2 years agoserial: zynq: Use DIV_ROUND_CLOSEST() to calcurate divider value
Kunihiko Hayashi [Wed, 13 Jul 2022 01:38:59 +0000 (10:38 +0900)]
serial: zynq: Use DIV_ROUND_CLOSEST() to calcurate divider value

Since the calulation of "bgen" is rounded down, using a higher
baudrate will result in a larger difference from the actual
baudrate. Should use DIV_ROUND_CLOSEST() like the Linux driver.

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Link: https://lore.kernel.org/r/1657676339-6055-1-git-send-email-hayashi.kunihiko@socionext.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agotools: relocate-rela: Define all macros for e_machine and reloc types
Michal Simek [Fri, 8 Jul 2022 06:15:06 +0000 (08:15 +0200)]
tools: relocate-rela: Define all macros for e_machine and reloc types

With some old toolchain not all values should be available that's why
better to define all of them to avoid compilation issues.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/e2a66854c5506100eb82b5b33cec7f0b5fca1008.1657260903.git.michal.simek@amd.com
2 years agotools: relocate-rela: Remove guard around R_AARCH64_RELATIVE
Michal Simek [Fri, 8 Jul 2022 06:15:05 +0000 (08:15 +0200)]
tools: relocate-rela: Remove guard around R_AARCH64_RELATIVE

In code you can find out this fragment:
 19 #ifndef R_AARCH64_RELATIVE
 20 #define R_AARCH64_RELATIVE      1027
 21 #endif

which means that R_AARCH64_RELATIVE is defined all the time that's why
ifdef is not needed.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/0d40a09ab6edcd88ba3059f7a0b63a819b71256a.1657260903.git.michal.simek@amd.com
2 years agodt-bindings: versal: Add versal reset IDs
Michal Simek [Thu, 7 Jul 2022 11:10:53 +0000 (13:10 +0200)]
dt-bindings: versal: Add versal reset IDs

The same file is already the part of Linux kernel that's why add it also to
u-boot to be able to use it in source code and DT files.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/1c3bc464536a9bf64a2e8bfe18a938c9cb490620.1657192249.git.michal.simek@amd.com
2 years agoxilinx: Remove duplicate PMIO_NODE_ID_BASE macro
Michal Simek [Thu, 7 Jul 2022 11:06:16 +0000 (13:06 +0200)]
xilinx: Remove duplicate PMIO_NODE_ID_BASE macro

PMIO_NODE_ID_BASE is defined twice that's why remove one instance.

Fixes: 248fe9f302df ("spi: cadence_qspi: Enable apb linear mode for apb read & write operations")
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/ce9a601bb99418aa20272d046c74678829d942cc.1657191974.git.michal.simek@amd.com
2 years agotest/py: Run simple dm commands without checking
Michal Simek [Thu, 7 Jul 2022 10:59:42 +0000 (12:59 +0200)]
test/py: Run simple dm commands without checking

Just to make sure that dm commands can operate.
This was the problem on Microblaze in past without fixing manual
relocation.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/e6c4b8b44445c16cee84436627642ccc9886f507.1657191580.git.michal.simek@amd.com
2 years agopy: tests: Bind should run only on sandbox
Michal Simek [Thu, 7 Jul 2022 10:52:26 +0000 (12:52 +0200)]
py: tests: Bind should run only on sandbox

Disable test to run on any other platform than sandbox.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/786bfdfda7dee4494e39c3fff699970ecd623116.1657191142.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Disable LMB for mini configurations
Michal Simek [Thu, 7 Jul 2022 08:45:38 +0000 (10:45 +0200)]
arm64: zynqmp: Disable LMB for mini configurations

There is no need to have LMB enabled that's why save some space by
disabling it.

   aarch64: (for 8/8 boards) all -1168.5 rodata -105.5 text -1063.0
            xilinx_zynqmp_mini: all -2013 rodata -185 text -1828
            xilinx_zynqmp_mini_qspi: all -2013 rodata -185 text -1828
            xilinx_zynqmp_mini_emmc0: all -2661 rodata -237 text -2424
            xilinx_zynqmp_mini_emmc1: all -2661 rodata -237 text -2424

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/f735d7691f4e7a7958d985b22c40aeb26e37a404.1657183534.git.michal.simek@amd.com
2 years agozynqmp: Run board_get_usable_ram_top() only on main U-Boot
Ashok Reddy Soma [Thu, 7 Jul 2022 08:45:37 +0000 (10:45 +0200)]
zynqmp: Run board_get_usable_ram_top() only on main U-Boot

With commit ce39ee28ec31 ("zynqmp: Do not place u-boot to reserved memory
location"), the function board_get_usable_ram_top() is allocating
MMU_SECTION_SIZE of about 2MB using lmb_alloc(). But we dont have this
much memory in case of mini U-Boot.

Keep these functions which use lmb under CONFIG_LMB so that they are
compiled and used only when LMB is enabled.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/75e52def75f573e554a6b177a78504c128cb0c4a.1657183534.git.michal.simek@amd.com
2 years agolmb: Fix lmb property's defination under struct lmb
Ashok Reddy Soma [Thu, 7 Jul 2022 08:45:36 +0000 (10:45 +0200)]
lmb: Fix lmb property's defination under struct lmb

Under struct lmb {} the lmb property's should be defined only if
CONFIG_LMB_MEMORY_REGIONS is defined.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c24a2b1d6f5db4eb65393f6a77fae129b30b6233.1657183534.git.michal.simek@amd.com
2 years agoarm: riscv: Remove additional ifdef from code guarded by CONFIG_IS_ENABLED
Michal Simek [Thu, 7 Jul 2022 08:47:16 +0000 (10:47 +0200)]
arm: riscv: Remove additional ifdef from code guarded by CONFIG_IS_ENABLED

CONFIG_OF_LIBFDT is used twice for guarding the same code. It is enough to
do it once that's why remove additional ifdefs from arm and risc-v code.

Fixes: 0c303f9a6628 ("image: Drop IMAGE_ENABLE_OF_LIBFDT")
Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Link: https://lore.kernel.org/r/f8e3ff9124195cbd957874de9a65ef79760ef5e7.1657183634.git.michal.simek@amd.com
2 years agoarm64: zynqmp: Enable SLG gpo driver by default
Michal Simek [Mon, 4 Jul 2022 14:09:00 +0000 (16:09 +0200)]
arm64: zynqmp: Enable SLG gpo driver by default

This device is used on SOM CCs that's why enable it by default.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/ebbfc0c883ca7d4f70c75d8d3655aaa6a81d77be.1656943737.git.michal.simek@amd.com
2 years agoxilinx: zynqmp: Do not use 0 as spl bss start address
Stefan Herbrechtsmeier [Thu, 14 Jul 2022 13:47:33 +0000 (15:47 +0200)]
xilinx: zynqmp: Do not use 0 as spl bss start address

Do not use 0 as address for memory because of the special meaning for
pointers (null pointer). Change the spl bss start address to the second
page.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Link: https://lore.kernel.org/r/20220714134733.7487-1-stefan.herbrechtsmeier-oss@weidmueller.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agotools: relocate-rela: Fix ELF decoding on big-endian hosts
Samuel Holland [Fri, 15 Jul 2022 06:40:25 +0000 (01:40 -0500)]
tools: relocate-rela: Fix ELF decoding on big-endian hosts

The new ELF decoding logic assumed that the target binary has the same
endianness as the host, which broke building ARM64 firmware binaries on
big-endian machines.

This commit fixes the ELF64 decoding to be host-endianness-neutral, and
applies the same changes to the ELF32 decoding. It does not fix the
microblaze-specific dynamic symbol decoding.

It also corrects the functions used for byte swapping in rela_elf64()
and rela_elf32(). The result is the same, but semantically the code is
converting bytes read from a foreign-endianness file to host byte order.

Fixes: 4c9e2d643460 ("tools: relocate-rela: Read rela start/end directly from ELF")
Fixes: a1405d9cfedb ("tools: relocate-rela: Check that relocation works only for EM_AARCH64")
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220715064026.54551-1-samuel@sholland.org
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agommc: zynq_sdhci: Fix timing macros for MMC High speed
Ashok Reddy Soma [Mon, 27 Jun 2022 08:52:45 +0000 (14:22 +0530)]
mmc: zynq_sdhci: Fix timing macros for MMC High speed

Timing macro's are wrong for MMC_HS_52 and MMC_DDR_52. Fix it with
correct values of MMC_TIMING_MMC_HS and MMC_TIMING_MMC_DDR52 respectively.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/1656319965-12124-1-git-send-email-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoarm64: zynqmp: Used fixed-partitions for QSPI in k26
Michal Simek [Wed, 29 Jun 2022 09:13:14 +0000 (11:13 +0200)]
arm64: zynqmp: Used fixed-partitions for QSPI in k26

Using fixed partitions is recommended way how to describe QSPI. Also add
label for qspi flash memory to be able to reference it in future.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a84f7ce8d6472fce66539ba29d31fbaae511d94b.1655732762.git.michal.simek@amd.com
2 years agoxilinx: Remove the legacy property "#stream-id-cells"
Ayan Kumar Halder [Wed, 22 Jun 2022 08:26:57 +0000 (10:26 +0200)]
xilinx: Remove the legacy property "#stream-id-cells"

"#stream-id-cells" was being used with "mmu-masters" for Xen specific
device trees.
With Xen commit 2278d2cbb0b7c1b48b298c6c4c6a7de2271ac928 (Link below)
Xen is able to support smmu bindings in both formats ie :
1. Using iommus (linux format)
2. Using mmu-masters (legacy format).

Thus, "#stream-id-cells" which was used for the legacy format, can be
removed as Xen can use smmu bindings in linux format.

Link: https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg101649.html
Signed-off-by: Ayan Kumar Halder <ayankuma@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/1e062acb233dee47cd7dd2429cb482132617cbc8.1655886415.git.michal.simek@amd.com
2 years agoPrepare v2022.10-rc1
Tom Rini [Tue, 26 Jul 2022 00:31:12 +0000 (20:31 -0400)]
Prepare v2022.10-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 25 Jul 2022 21:19:18 +0000 (17:19 -0400)]
configs: Resync with savedefconfig

Resync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-07-25-assorted-platform-updates'
Tom Rini [Mon, 25 Jul 2022 20:40:43 +0000 (16:40 -0400)]
Merge branch '2022-07-25-assorted-platform-updates'

- Assorted TI, Apple, Snapdragon and Xen updates.

2 years agodrivers: xen: unmap Enlighten page before jumping to Linux
Dmytro Firsov [Tue, 19 Jul 2022 14:55:28 +0000 (14:55 +0000)]
drivers: xen: unmap Enlighten page before jumping to Linux

This commit fixes issue with usage of Xen hypervisor shared info page.
Previously U-boot did not unmap it at the end of OS boot process. Xen
did not prevent guest from this. So, it worked, but caused wierd
issues - one memory page, that was returned by memalign in U-boot
for Enlighten mapping was not unmaped by Xen (shared_info values was
not removed from there) and returned to allocator. During the Linux
boot, it uses shared_info page as regular RAM page, which leads to
hypervisor shared info corruption.

So, to fix this issue, as discussed on the xen-devel mailing list, the
code should:
   1) Unmap the page
   2) Populate the area with memory using XENMEM_populate_physmap

This patch adds page unmapping via XENMEM_remove_from_physmap, fills
hole in address space where page was mapped via XENMEM_populate_physmap
and return this address to memory allocator for freeing.

Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
Reviewed-by: Anastasiia Lukianenko <vicooodin@gmail.com>
2 years agoarm: Remove unused references to CONFIG_SOC_DM*
Tom Rini [Mon, 18 Jul 2022 15:33:39 +0000 (11:33 -0400)]
arm: Remove unused references to CONFIG_SOC_DM*

There are no references to CONFIG_SOC_DM355 / CONFIG_SOC_DM365 /
CONFIG_SOC_DM644X / CONFIG_SOC_DM646X and the files these Makefile lines
reference have already been dropped.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agospl: Use SPL_TEXT_BASE instead of ISW_ENTRY_ADDR
Andrew Davis [Fri, 15 Jul 2022 17:31:48 +0000 (12:31 -0500)]
spl: Use SPL_TEXT_BASE instead of ISW_ENTRY_ADDR

The ISW_ENTRY_ADDR symbol was used for OMAP devices in place of
SPL_TEXT_BASE. Keystone2 HS devices were not using it right either.
Remove ISW_ENTRY_ADDR and use SPL_TEXT_BASE directly.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarm: k3: config.mk: Read software revision information from file on HS
Andrew Davis [Fri, 15 Jul 2022 16:38:54 +0000 (11:38 -0500)]
arm: k3: config.mk: Read software revision information from file on HS

Read the swrv.txt file from the TI Security Development Tools when
TI_SECURE_DEVICE is enabled. This allows us to set our software
revision in one place and have it used by all the tools that create
TI x509 boot certificates.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agok3_gen_x509_cert: Make SWRV configurable for anti-rollback protection
Yogesh Siraswar [Fri, 15 Jul 2022 16:38:53 +0000 (11:38 -0500)]
k3_gen_x509_cert: Make SWRV configurable for anti-rollback protection

The x509 certificate SWRV is currently hard-coded to 0. This need to be
updated to 1 for j721e 1.1, j7200 and am64x. It is don't care for other
k3 devices.

Added new config K3_X509_SWRV to k3. Default is set to 1.

Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
Reviewed-by: Dave Gerlach <d-gerlach@ti.com>
2 years agoarm: mach-k3: Remove ROM firewalls on GP devices
Andrew Davis [Fri, 15 Jul 2022 16:21:27 +0000 (11:21 -0500)]
arm: mach-k3: Remove ROM firewalls on GP devices

This isn't strictly needed as these firewalls should all be disabled on
GP, but it also doesn't hurt, so do this unconditionally to remove this
use of CONFIG_TI_SECURE_DEVICE.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agodefconfigs: j721e_hs_evm: Sync HS and non-HS defconfigs
Andrew Davis [Fri, 15 Jul 2022 16:19:41 +0000 (11:19 -0500)]
defconfigs: j721e_hs_evm: Sync HS and non-HS defconfigs

Additions have been made to the non-HS defconfig without the same
being made to the HS defconfig, sync them.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agodefconfigs: am57xx_hs_evm: Sync HS and non-HS defconfigs
Andrew Davis [Fri, 15 Jul 2022 16:19:39 +0000 (11:19 -0500)]
defconfigs: am57xx_hs_evm: Sync HS and non-HS defconfigs

Sync new additions to non-HS defconfig with HS defconfig.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agodefconfigs: Add a config for AM43xx HS EVM with QSPI Boot support
Andrew Davis [Fri, 15 Jul 2022 15:58:49 +0000 (10:58 -0500)]
defconfigs: Add a config for AM43xx HS EVM with QSPI Boot support

On AM43xx HS devices, QSPI boot is XIP and we use a single stage
bootloader. Add a defconfig for this.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agoarm: mach-k3: Rename SOC_K3_AM6 to SOC_K3_AM654
Andrew Davis [Fri, 15 Jul 2022 15:25:27 +0000 (10:25 -0500)]
arm: mach-k3: Rename SOC_K3_AM6 to SOC_K3_AM654

The first AM6x device was the AM654x, but being the first we named it
just AM6, since more devices have come out with this same prefix we
should switch it to the normal convention of using the full name of the
first compatibility device the series. This makes what device we are
talking about more clear and matches all the K3 devices added since.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarm: mach-k3: Only build init files for SPL
Andrew Davis [Fri, 15 Jul 2022 15:25:26 +0000 (10:25 -0500)]
arm: mach-k3: Only build init files for SPL

The content of these files are only used in SPL builds. The contents are
already ifdef for the same, remove that and only include the whole file
in the build when building for SPL.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarm: dts: db410c/db820c: Fix SPMI addresses
Stephan Gerhold [Wed, 13 Jul 2022 19:17:11 +0000 (21:17 +0200)]
arm: dts: db410c/db820c: Fix SPMI addresses

The Qualcomm device trees in U-Boot are currently not consistent with
the upstream DTs used in the Linux kernel. While some bindings are
similar to the official specification in the Linux kernel, several
nodes have subtle differences, e.g. the "compatible"s or the exact
specification of memory registers.

This means that some of the Qualcomm-related U-Boot drivers are not
compatible with the Linux DT (and vice versa).

The SPMI node is one such example: the "core" region starts at
0x0200f000 in the upstream Linux MSM8916 DT, but in U-Boot it starts at
0x0200f800. The end result is normally the same, since the Linux SPMI
driver simply adds the 0x800 internally.

However, commit f5a2d6b4b03a ("spmi: msm: add arbiter version 5
support") imported this behavior into the U-Boot driver, without
adjusting the DB410c/DB820c device trees. This means that the 0x800
offset is now added twice, breaking all SPMI read/write operations:

  Failed to find PMIC pon node. Check device tree
  Failed to find pm8916_gpios@c000 node.
  USB init failed: -6
  starting USB...
  Bus ehci@78d9000: Failed to find pm8916_gpios@c000 node.
  probe failed, error -6
  No working controllers found

While the mistake is strictly speaking in the spmi-msm driver, fix the
issue by making the SPMI nodes in the DB410c/DB820c consistent with the
upstream Linux DT instead.

Ideally we should even go a step further by fixing the remaining uses
of custom bindings in the U-Boot drivers and moving to using the Linux
DTs as-is. This would likely avoid such mistakes in the future and
would also make the porting process much easier.

Cc: Dzmitry Sankouski <dsankouski@gmail.com>
Fixes: f5a2d6b4b03a ("spmi: msm: add arbiter version 5 support")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoboard: ti: am65x: Do not disable SA2UL in DT
Andrew Davis [Wed, 13 Jul 2022 16:12:48 +0000 (11:12 -0500)]
board: ti: am65x: Do not disable SA2UL in DT

This is no longer needed as the SA2UL can now be shared with Linux.
Leave the SA2UL DT node enabled.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarmv8: mach-k3: correct define checking for AM625/AM642 memory maps
Matt Ranostay [Wed, 13 Jul 2022 11:49:36 +0000 (04:49 -0700)]
armv8: mach-k3: correct define checking for AM625/AM642 memory maps

Using CONFIG_IS_ENABLED breaks accessing memory map structure when
doing a A53 SPL build for AM625 and AM642 platforms. This is due to
'abc if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y''
in which there is no CONFIG_SPL_SOC_K3_AM625/CONFIG_SPL_SOC_K3_AM642
defined in the configuration.

For the A53 SPL builds on these platform to access the memory mapping
which it will need for enabling the mmu/cache it must use #if defined(X)
checks and not CONFIG_IS_ENABLED.

Cc: Suman Anna <s-anna@ti.com>
Cc: Neha Francis <n-francis@ti.com>
Signed-off-by: Matt Ranostay <mranostay@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoarm: dts: mt7622: remove default pinctrl of uart0
Weijie Gao [Wed, 13 Jul 2022 03:16:39 +0000 (11:16 +0800)]
arm: dts: mt7622: remove default pinctrl of uart0

Currently u-boot running on mt7622 will print an warning log at beginning:
> serial_mtk serial@11002000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19

It turns out that the pinctrl uclass can't work properly in board_f stage.

Since the uart0 is the default UART device used by bootrom, and will be
initialized in both bootrom and tf-a bl2. It's ok not to setup pinctrl for
uart0 in u-boot.

This patch removes the default pinctrl of uart0 to suppress the unwanted
warning.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2 years agoarm: dts: k3-am64-ddr fix typo causing DDR4 register corruption
Anand Gadiyar [Wed, 13 Jul 2022 00:59:04 +0000 (19:59 -0500)]
arm: dts: k3-am64-ddr fix typo causing DDR4 register corruption

The entry for DDRSS_PI_321_DATA was accidentally repeated leading to the
last few PI registers being incorrectly programmed.

Fix this.

Reported-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoboard: qualcomm: Add support for QCS404 EVB
Sumit Garg [Tue, 12 Jul 2022 07:12:12 +0000 (12:42 +0530)]
board: qualcomm: Add support for QCS404 EVB

Add support for Qualcomm QCS404 SoC based evaluation board.

Features:
- Qualcomm Snapdragon QCS404 SoC
- 1GiB RAM
- 8GiB eMMC, uSD slot

U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
For detailed build and boot instructions, refer to
doc/board/qualcomm/qcs404.rst.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoclocks: qcom: Add clock driver for QCS404 SoC
Sumit Garg [Tue, 12 Jul 2022 07:12:11 +0000 (12:42 +0530)]
clocks: qcom: Add clock driver for QCS404 SoC

Currently this clock driver initializes clocks for UART and eMMC. Along
with this import "qcom,gcc-qcs404.h" header from Linux mainline to
support DT bindings.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agopinctrl: qcom: Add pinctrl driver for QCS404 SoC
Sumit Garg [Tue, 12 Jul 2022 07:12:10 +0000 (12:42 +0530)]
pinctrl: qcom: Add pinctrl driver for QCS404 SoC

Currently this pinctrl driver only supports BLSP UART2 specific pin
configuration.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agommc: msm_sdhci: Add SDCC version 5.0.0 support
Sumit Garg [Tue, 12 Jul 2022 07:12:09 +0000 (12:42 +0530)]
mmc: msm_sdhci: Add SDCC version 5.0.0 support

For SDCC version 5.0.0, MCI registers are removed from SDCC interface
and some registers are moved to HC. So add support to use the new
compatible string "qcom,sdhci-msm-v5". Based on this new msm variant,
pick the relevant variant data and use it to detect MCI presence thereby
configuring register read/write to msm specific registers.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoboard: qualcomm: Add support for dragonboard845c
Sumit Garg [Tue, 12 Jul 2022 07:12:08 +0000 (12:42 +0530)]
board: qualcomm: Add support for dragonboard845c

Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
platform. This board complies with 96Boards Open Platform Specifications.

Features:
- Qualcomm Snapdragon SDA845 SoC
- 4GiB RAM
- 64GiB UFS drive

U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
For detailed build and boot instructions, refer to
doc/board/qualcomm/sdm845.rst, board: dragonboard845c.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agouart: sdm845: Fix debug UART pinmux
Sumit Garg [Tue, 12 Jul 2022 07:12:07 +0000 (12:42 +0530)]
uart: sdm845: Fix debug UART pinmux

Configure debug UART pins as function: "qup9" rather than being regular
gpios. It fixes a hang seen during pinmux setting.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoclocks: sdm845: Import qcom,gcc-sdm845.h
Sumit Garg [Tue, 12 Jul 2022 07:12:06 +0000 (12:42 +0530)]
clocks: sdm845: Import qcom,gcc-sdm845.h

Rather than using magic numbers as clock ids for peripherals import
qcom,gcc-sdm845.h from Linux to be used standard macros for clock ids.
So start using corresponding clk-id macro for debug UART.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoarm64: dts: sdm845: Remove redundant u-boot DT properties
Sumit Garg [Tue, 12 Jul 2022 07:12:05 +0000 (12:42 +0530)]
arm64: dts: sdm845: Remove redundant u-boot DT properties

According to u-boot DT recomendation, u-boot specific DT properties belong
to *-uboot.dtsi. Also for starqltechn board (which is the only current
consumer of sdm845.dtsi), the properties are already included in
starqltechn-uboot.dtsi, so remove corresponding redundant properties.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoboard: starqltechn: Align DT node overrides with sdm845.dtsi
Sumit Garg [Tue, 12 Jul 2022 07:12:04 +0000 (12:42 +0530)]
board: starqltechn: Align DT node overrides with sdm845.dtsi

Currently there is a mismatch among DT node overrides in starqltechn
board DTS file and the actual DT nodes in the sdm845.dtsi. So fix that
to align with DT nodes in sdm845.dtsi.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoNokia RX-51: Remove CONFIG_PREBOOT from defconfig
Pali Rohár [Sun, 10 Jul 2022 11:42:56 +0000 (13:42 +0200)]
Nokia RX-51: Remove CONFIG_PREBOOT from defconfig

CONFIG_PREBOOT just cause putting "preboot=CONFIG_PREBOOT" into env list.
Value CONFIG_PREBOOT="run preboot" in defconfig is just nonsense and does
not do anything useful (it is infinite recursion). Config file for this
board already contains default preboot= env variable with correct value,
which has higher priority than CONFIG_PREBOOT and this is reason why
nonsense CONFIG_PREBOOT is ignored.

Remove nonsense and unused CONFIG_PREBOOT from nokia_rx51_defconfig file.

Signed-off-by: Pali Rohár <pali@kernel.org>
2 years agoboard: ti: am335x: Use correct dtbs for SanCloud boards
Paul Barker [Fri, 8 Jul 2022 09:25:46 +0000 (10:25 +0100)]
board: ti: am335x: Use correct dtbs for SanCloud boards

We have different dtbs for the Lite and Extended WiFi variants of the
SanCloud BBE.

Signed-off-by: Paul Barker <paul.barker@sancloud.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoboard: ti: am335x: Enable spi0 bus on SanCloud BBE Lite
Paul Barker [Fri, 8 Jul 2022 09:25:45 +0000 (10:25 +0100)]
board: ti: am335x: Enable spi0 bus on SanCloud BBE Lite

The SanCloud BBE Lite has a Micron Authenta flash device connected to
the spi0 bus.

Signed-off-by: Paul Barker <paul.barker@sancloud.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agocmd: ti: ddr3: correct minor spelling mistake in Ti DDR3
Ramin Zaghi [Fri, 8 Jul 2022 08:02:56 +0000 (09:02 +0100)]
cmd: ti: ddr3: correct minor spelling mistake in Ti DDR3

Just a spelling mistake.

Signed-off-by: Ramin Zaghi <rzaghi@visualSilicon.com>
2 years agoimx8mm: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:40 +0000 (15:27 +0200)]
imx8mm: synchronise device tree with linux

Synchronise device tree with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoboard: toradex: apalis-imx8: fix file names in maintainers
Marcel Ziswiler [Thu, 21 Jul 2022 13:48:22 +0000 (15:48 +0200)]
board: toradex: apalis-imx8: fix file names in maintainers

Fix device tree file names in MAINTAINERS file.

Fixes: 3d6036650059 ("board: toradex: add apalis imx8qm 4gb wb it v1.0b module support")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx8mq: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:47:59 +0000 (15:47 +0200)]
imx8mq: synchronise device tree with linux

Synchronise device tree with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoverdin-imx8mp: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:46:44 +0000 (15:46 +0200)]
verdin-imx8mp: synchronise device tree with linux

Synchronise device tree with linux v5.19-rc5.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device tree we are now using the
regular one for the Verdin Development (carrier) board (e.g.
imx8mp-verdin-wifi-dev.dtb rather than the previous imx8mp-verdin.dtb).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx8mp-rsb3720-a1: fix pwms property warnings
Marcel Ziswiler [Thu, 21 Jul 2022 13:45:26 +0000 (15:45 +0200)]
imx8mp-rsb3720-a1: fix pwms property warnings

Fix the following build-time pwms property warnings:

w+arch/arm/dts/imx8mp-rsb3720-a1.dtb: Warning (pwms_property):
 /lvds_backlight@0:pwms: property size (12) too small for cell size 3
w+arch/arm/dts/imx8mp-rsb3720-a1.dtb: Warning (pwms_property):
 /lvds_backlight@1:pwms: property size (12) too small for cell size 3

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx8mp: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:44:32 +0000 (15:44 +0200)]
imx8mp: synchronise device tree with linux

Synchronise device tree with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx8mn: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:43:37 +0000 (15:43 +0200)]
imx8mn: synchronise device tree with linux

Synchronise device tree with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx8mm-mx8menlo/verdin-imx8mm: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:41:23 +0000 (15:41 +0200)]
imx8mm-mx8menlo/verdin-imx8mm: synchronise device tree with linux

Synchronise device tree with linux v5.19-rc5.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device tree we are now using the
regular one for the Verdin Development (carrier) board (e.g.
imx8mm-verdin-wifi-dev.dtb rather than the previous imx8mm-verdin.dtb).

Please further note that the PMIC node name got changed from a pmic
label to pmic@25 which required adjustment in resp. board SPL file
board/toradex/verdin-imx8mm/spl.c.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx8mm-kontron-n801x-s-lvds: fix pwms property warnings
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:41 +0000 (15:27 +0200)]
imx8mm-kontron-n801x-s-lvds: fix pwms property warnings

Fix the following build-time pwms property warnings:

w+arch/arm/dts/imx8mm-kontron-n801x-s-lvds.dtb: Warning (pwms_property):
 /backlight:pwms: property size (12) too small for cell size 3

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx8mm-venice-gw700x: prepare to synchronise device trees with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:39 +0000 (15:27 +0200)]
imx8mm-venice-gw700x: prepare to synchronise device trees with linux

As a preparatory step remove the pinctrl_pmic reference which does not
exist in the Linux upistream device tree.

This avoids the following error once synchronised:

+Error: arch/arm/dts/imx8mm-venice-gw700x-u-boot.dtsi:26.1-14 Label or
 path pinctrl_pmic not found

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agocolibri_vf: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:38 +0000 (15:27 +0200)]
colibri_vf: synchronise device tree with linux

Synchronise device tree with linux v5.19-rc5.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device tree we are now using the
regular one for the Colibri Evaluation (carrier) board V3 (e.g.
vf610-colibri-eval-v3.dtb rather than the previous vf610-colibri.dtb).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agovf500/vf610: synchronise device trees with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:37 +0000 (15:27 +0200)]
vf500/vf610: synchronise device trees with linux

Synchronise device trees with linux v5.19-rc5.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoARM: DTS: bk4r1/pcm052: prepare to synchronise device trees with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:36 +0000 (15:27 +0200)]
ARM: DTS: bk4r1/pcm052: prepare to synchronise device trees with linux

As a preparatory step rename the included SoC dtsi from vf.dtsi to
vf610.dtsi as this is how it is named in Linux upstream.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agocolibri-imx7d/-emmc: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:35 +0000 (15:27 +0200)]
colibri-imx7d/-emmc: synchronise device tree with linux

Synchronise device tree with linux-next next-20220708.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device trees we are now using the
regular ones for the Colibri Evaluation (carrier) board V3 (e.g.
imx7d-colibri-eval-v3.dtb rather than the previous
imx7-colibri-rawnand.dtb and imx7d-colibri-emmc-eval-v3.dtb rather than
the previous imx7-colibri-emmc.dtb).

Please further note that the PMIC node name got changed from rn5t567@33
to pmic@33 which required adjustment in resp. board file
board/toradex/colibri_imx7/colibri_imx7.c.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx7s/d: synchronise device trees with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:34 +0000 (15:27 +0200)]
imx7s/d: synchronise device trees with linux

Synchronise device tree with linux-next next-20220708.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx: imx7d-sdb: prepare to synchronise device trees with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:33 +0000 (15:27 +0200)]
imx: imx7d-sdb: prepare to synchronise device trees with linux

As a preparatory step remove the epdc reference which does not exist in
the Linux upstream device tree and rename the qspi1 reference to qspi as
this is how it is named in the Linux upstream device tree.

This avoids the following error once synchronised:

+Error: arch/arm/dts/.imx7d-sdb-qspi.dtb.pre.tmp:10.1-6 Label or path
 epdc not found
+Error: arch/arm/dts/.imx7d-sdb-qspi.dtb.pre.tmp:29.1-7 Label or path
 qspi1 not found
+Error: arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi:6.1-7 Label or path
 qspi1 not found

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agoimx: imx7-cm: prepare to synchronise device trees with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:32 +0000 (15:27 +0200)]
imx: imx7-cm: prepare to synchronise device trees with linux

As a preparatory step rename the qspi1 reference to qspi as this is how
it is named in the Linux upstream device tree.

This avoids the following error once synchronised:

+Error: arch/arm/dts/.imx7-cm.dtb.pre.tmp:96.1-7 Label or path qspi1 not
 found

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2 years agocolibri-imx6ull/-emmc: synchronise device tree with linux
Marcel Ziswiler [Thu, 21 Jul 2022 13:27:31 +0000 (15:27 +0200)]
colibri-imx6ull/-emmc: synchronise device tree with linux

Synchronise device tree with linux v5.19-rc5.

Please note that this also means that instead of the previous "generic"
U-Boot specific carrier board agnostic device trees we are now using the
regular ones for the Colibri Evaluation (carrier) board V3 (e.g.
imx6ull-colibri-eval-v3.dtb rather than the previous imx6ull-colibri.dtb
and imx6ull-colibri-emmc-eval-v3.dtb rather than the previous
imx6ull-colibri-emmc.dtb).

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>