Compare commits

...
145 Commits
Author SHA1 Message Date
d4n1 578eea8ba2 exynos9820(dtsi): minimal dtsi 2021-12-22 22:34:55 +05:00
d4n1 60a4dccb0e fix: various build time errors 2021-12-22 18:03:19 +05:00
d4n1 78d989b26f beyond: skip lowlevel init 2021-12-22 18:03:19 +05:00
kreatoo 4355cb40ca beyond: add Kreato to MAINTAINERS 2021-12-18 19:01:17 +00:00
d4n1 a3b713d261 board: samsung: add initial Beyond board support 2021-12-18 15:57:44 +05:00
d4n1 9c37b88499 pinctrl: exynos: add pinctrl support for Exynos 9820 2021-12-18 15:11:21 +05:00
d4n1 274f9dd974 arm: exynos: add basic support for Exynos9 SoC Family and Exynos9820 2021-12-18 14:50:41 +05:00
d4n1 595cea2883 dts: use minimal dts 2021-12-16 16:29:20 +05:00
d4n1 8c59a55833 wip: board: samsung: add initial Exynos9820 board support 2021-12-16 15:26:26 +05:00
Tom Rini 5b20efeafe Merge tag 'clk-2022.01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-clk
Clock patches for v2022.01-rc3

This adds better logging support for many CCF drivers, and clarifies some
documentation regarding clk_get_rate.
2021-12-15 14:51:44 -05:00
Patrick Delaunay 560e1e0050 clk: define LOG_CATEGORY for generic and ccf clocks
Define LOG_CATEGORY to allow filtering with log command
for generic clock and CCF clocks.

This patch also change existing printf, debug and pr_ macro
to log_ or dev_ macro.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2021-12-15 12:16:16 -05:00
Patrick Delaunay 572c446e98 clk: cosmetic: reorder include files
Reorder include files in the U-Boot expected order:

the common.h header should always be first,
followed by other headers in order,
then headers with directories,
then local files.

It is a preliminary step for next patch.

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2021-12-15 12:16:16 -05:00
Giulio Benetti 9e578f6340 clk: fix clk_get_rate() documentation
Improve clk_get_rate() @return documentation that otherwise is a bit
ambiguous. At the moment I expect to return 0 as error since the return
type is 'ulong', instead the function really returns negative value in
case the corresponding function pointer is null and returns 0 if the clock
is invalid.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2021-12-15 12:16:15 -05:00
Tom Rini e09ca91cfa Merge tag 'rpi-next-2022.01' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi
- enable RPi Zero 2 W
- fix MMC numbering issue
- Update link to documentation
2021-12-15 11:49:30 -05:00
Tom Rini 5a59f634e9 Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- Marvell/PCI: Fix size of the configuration cache and disallow ROM BAR
  setting in pci_mvebu.c & pci-aardvark.c (Pali & Marek)
2021-12-15 07:14:20 -05:00
Pali Rohár fed5beca18 arm: a37xx: pci: Do not allow setting ROM BAR on PCI Bridge
PCI Bridge which represents aardvark PCIe Root Port has Expansion ROM Base
Address register at offset 0x30 but its meaning is different than PCI's
Expansion ROM BAR register. Only address format of register is same.

In reality, this device does not have any configurable PCI BARs. So ensure
that write operation into BARs (including Expansion ROM BAR) is noop and
registers always contain zero address which indicates that bars are
unsupported.

Fixes: cb056005dc ("arm: a37xx: pci: Add support for accessing PCI Bridge on root bus")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-15 08:57:36 +01:00
Pali Rohár a48e4287d6 pci: pci_mvebu: Do not allow setting ROM BAR on PCI Bridge
The PCI Bridge which represents mvebu PCIe Root Port has Expansion ROM
Base Address register at offset 0x30 but its meaning is different that
of PCI's Expansion ROM BAR register, although the address format of
the register is the same.

In reality, this device does not have any configurable PCI BARs. So
ensure that write operation into BARs (including Expansion ROM BAR) is a
noop and registers always contain zero address which indicates that BARs
are unsupported.

Fixes: a7b61ab58d ("pci: pci_mvebu: Properly configure and use PCI Bridge (PCIe Root Port)")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-15 08:57:36 +01:00
Marek Behún e967c84a6d pci: pci_mvebu, pci_aardvark: Fix size of configuration cache
Since u32 takes up 4 bytes, we need to divide the number of u32s by 4
for cfgcache.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-12-15 08:57:36 +01:00
Tom Rini cfbd2bc695 Merge tag 'u-boot-stm32-20211213' of https://source.denx.de/u-boot/custodians/u-boot-stm
- enable KSZ90x1 PHY driver on DHCOR
- DHSOM boards:
  - increase USB power-good delay
  - add update_sf script to install U-Boot into SF
  - increase PHY auto-negotiation timeout to 20 seconds
  - fix SoM and board coding strap GPIO handling

# gpg verification failed.
2021-12-13 10:20:25 -05:00
Marek Vasut 5c592b636a ARM: stm32: Enable KSZ90x1 PHY driver on DHCOR
Enable KSZ9x01 PHY driver in DHCOR common configuration, since the
AV96 board has this PHY populated on the PCB.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-12-13 14:34:22 +01:00
Marek Vasut 98fe251a24 ARM: dts: stm32: Add custom PHY reset bindings on AV96
The ethernet PHY must be reset on AV96, however DWMAC currently does
not support the MDIO-bus PHY GPIO reset bindings and the ethernet MAC
PHY reset property is going away on next DT sync. Add PHY specific
reset bindings to trigger the PHY reset and fix sporadic ethernet
malfunctions, until the next DT sync.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-12-13 14:34:11 +01:00
Marek Vasut 7c870f8d70 ARM: stm32: Fix SoM and board coding strap GPIO handling on DHSOM
The variables retaining the strap values have to be initialized, always,
make it so. Moreover, free the requested GPIO list at the end to avoid
wasting memory.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-12-13 14:34:04 +01:00
Marek Vasut e1d7b0b9c5 ARM: stm32: Increase PHY auto-negotiation timeout to 20s on DHSOM
The Micrel PHYs on known DHSOM based boards take a while to come out
of reset, increase the auto-negotiation timeout to prevent it from
timing out in case the ethernet is used right after the board was
reset.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-12-13 14:33:59 +01:00
Marek Vasut 44beea2845 ARM: stm32: Add update_sf script to install U-Boot into SF on DHSOM
Add script to read U-Boot from SD card and write it to matching
locations in the SPI NOR, thus making the SPI NOR bootable. The
script erases the entire SPI NOR, including U-Boot environment,
to make sure the installation is clean. To retain environment
from current running U-Boot, run 'saveenv' after running the
'update_sf' script.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2021-12-13 14:33:53 +01:00
Marek Vasut e8e66801bd ARM: stm32: Increase USB power-good delay on DHSOM
The USB hub on STM32MP1 DHCOM boards needs to wait a bit longer until
the USB Vbus is stable. Increase the USB power-good delay to 1 s.

This adds default-undefined STM32MP_BOARD_EXTRA_ENV variable into
stm32mp15_common.h to reduce duplication in board-specific config
files adding custom environment.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2021-12-13 14:33:47 +01:00
Tom Rini 026c010c4a Merge https://source.denx.de/u-boot/custodians/u-boot-sh
- A few clean ups for the RZG2
2021-12-13 07:11:09 -05:00
Adam Ford d5f1beb058 configs: beacon-rzg2m: Config to address new aliases
The resync of the device trees from Linux 5.16-rc3 caused aliases
to appear on the MMC devices which changed the numbering.
This changed the default boot device and caused boot failure.
Update the mmcdev variable to reflect the new aliases.

Signed-off-by: Adam Ford <aford173@gmail.com>
2021-12-13 00:37:28 +01:00
Adam Ford dcbf1145e2 ARM: rmobile: Fix rzg2_beacon_defconfig to address new aliases
The resync of the device trees from Linux 5.16-rc3 caused aliases
to appear on the MMC devices which changed the numbering.
This broke the reading/writing of the environmental variables,
so update the defconfig accordingly.

Signed-off-by: Adam Ford <aford173@gmail.com>
2021-12-13 00:37:28 +01:00
Adam Ford 61b3a0101a arm: dts: Create common rz-g2-beacon-u-boot file
The rzg2_beacon_defconfig creates an image for RZ/G2[MNH] and
as such creates three different device trees and each of them
have a corresponding -u-boot.dtsi file which are basically
copies of each other.  Create a common include file to be
referenced by each of the respective board-u-boot.dtsi files
to reduce duplicate code and simplify support going forward.
This also restores some lost functionality from the device
tree re-sync and updates the MAINTAINER file to include all
beacon-renesom device tree files.

Signed-off-by: Adam Ford <aford173@gmail.com>
2021-12-13 00:37:28 +01:00
Adam Ford 1eaf61c84d arm: dts: beacon-rzg2: Resync device trees with Linux 5.16-rc3
The device trees for the Beacon RZ/G2[MNH] boards have undergone
some changes over time, so resync them now.

Signed-off-by: Adam Ford <aford173@gmail.com>
2021-12-13 00:37:28 +01:00
Adam Ford 182754f43a net: ravb: Support multiple clocks
The RZ/G2 series uses an external clock as a reference to the AVB.
If this clock is controlled by an external programmable clock,
it must be requested by the consumer or it will not turn on.
In order to do this, update the driver to use bulk enable and
disable functions to enable clocks for boards with multiple clocks.

Signed-off-by: Adam Ford <aford173@gmail.com>
2021-12-13 00:37:28 +01:00
Tom Rini a1c01b17c5 Merge tag 'efi-2022-01-rc4-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2022-01-rc4-2

UEFI:

* correctly handle missing TPM device
* prepare for block devices for U-Boot as EFI app

# gpg: Signature made Fri 10 Dec 2021 04:29:20 AM EST
# gpg:                using RSA key 6DC4F9C71F29A6FA06B76D33C481DBBC2C051AC4
# gpg: Good signature from "Heinrich Schuchardt <xypron.glpk@gmx.de>" [unknown]
# gpg:                 aka "[jpeg image of size 1389]" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7  6D33 C481 DBBC 2C05 1AC4
2021-12-10 07:58:43 -05:00
Simon Glass d8063dc373 efi: Add a media/block driver for EFI block devices
Add a block driver which handles read/write for EFI block devices. This
driver actually already exists ('efi_block') but is not really suitable
for use as a real U-Boot driver:

- The operations do not provide a udevice
- The code is designed for running as part of EFI loader, so uses
    EFI_PRINT() and EFI_CALL().
- The bind method probes the device, which is not permitted
- It uses 'EFI' as its parent device

The new driver is more 'normal', just requiring its platform data be set
up in advance.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-09 11:43:25 -08:00
Simon Glass 42b7f4212a efi: Add uclass for devices provided by UEFI firmware
UCLASS_EFI_LOADER is used for devices created by applications and
drivers loaded by U-Boots UEFI implementation.

This patch provides a new uclass (UCLASS_EFI_MEDIA) to be used for devices
that provided by a UEFI firmware calling U-Boot as an EFI application.

If the two uclasses can be unified, is left to future redesign.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-09 11:43:25 -08:00
Simon Glass 2abd8d1c99 efi: Rename UCLASS_EFI and IF_TYPE_EFI
These names are better used for access to devices provided by an EFI
layer. Use EFI_LOADER instead here, since these are only available in
U-Boot's EFI_LOADER layer.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-12-09 11:43:25 -08:00
Masahisa Kojima f9b51dcf29 efi_loader: correctly handle no tpm device error
When the TCG2 protocol is installed in efi_tcg2_register(),
TPM2 device must be present.
tcg2_measure_pe_image() expects that TCP2 protocol is installed
and TPM device is available. If TCG2 Protocol is installed but
TPM device is not found, tcg2_measure_pe_image() returns
EFI_SECURITY_VIOLATION and efi_load_image() ends with failure.

The same error handling is applied to
efi_tcg2_measure_efi_app_invocation().

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-12-09 11:43:25 -08:00
Masahisa Kojima 9e32bf9362 efi_loader: check tcg2 protocol installation outside the TCG protocol
There are functions that calls tcg2_agile_log_append() outside
of the TCG protocol invocation (e.g tcg2_measure_pe_image).
These functions must to check that TCG2 protocol is installed.
If not, measurement shall be skipped.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-12-09 11:43:25 -08:00
Masahisa Kojima 54bec17f6b efi_loader: efi_tcg2_register returns appropriate error
This commit modify efi_tcg2_register() to return the
appropriate error.
With this fix, sandbox will not boot because efi_tcg2_register()
fails due to some missing feature in GetCapabilities.
So disable sandbox if EFI_TCG2_PROTOCOL is enabled.

UEFI secure boot variable measurement is not directly related
to TCG2 protocol installation, tcg2_measure_secure_boot_variable()
is moved to the separate function.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-12-09 11:43:25 -08:00
Alexander Dahl 446266b024 doc: usage: Fix command in fdt overlay apply sequence
Literally adhering to the docs gave this wrong output:

    U-Boot> setenv fdtaddr 0x87f00000
    U-Boot> fdtaddr $fdtaddr
    Unknown command 'fdtaddr' - try 'help'

Fixes: d80162cfc5 ("doc: Document how to apply fdt overlays")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-12-09 11:43:25 -08:00
Tom Rini 1530ad5bec Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
This fixes two regressions: eMMC operation on boards with WiFi (so using
three MMC devices), and a repeated wrong error message in USB gadget
mode (fastboot, ums).
2021-12-09 08:43:30 -05:00
Andre Przywara fbd9207e7f sunxi: Remove misleading USB-OTG charger message
The sunxi MUSB glue driver has some code to check for external VBUS
presence when it's going to use the MUSB host mode, and it warns if
there is VBUS provided through the cable (in sunxi_musb_enable()).

This code was apparently copied to the USB gadget detection code
(g_dnl_board_usb_cable_connected()), but here we actually *expect*
external VBUS power, so a warning is wrong and confusing.
So far this message rarely triggered, but a recent patch (6fa41cdd19)
changed this:
===========================
=> ums 0 mmc 2
UMS: LUN 0, dev mmc 2, hwpart 0, sector 0x0, count 0xe90000
A charger is plugged into the OTG
/A charger is plugged into the OTG
\A charger is plugged into the OTG
|A charger is plugged into the OTG
-A charger is plugged into the OTG
....
===========================

Remove the message for the gadget cable detection call, and just return
the status of the VBUS detection, as this is what the callers are after.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-12-08 23:07:15 +00:00
Andre Przywara e32dad292a sunxi: dts: Fix typoed eMMC check
Commit 03510bf621 ("sunxi: only include alias for eMMC when mmc2
used") protected the eMMC alias in U-Boot's DT stub the with the
associated Kconfig symbol, but was actually using the wrong name.

Fix the name of the symbol to match what's defined in Kconfig and what
the defconfig files actually use.

Fixes: 03510bf621 ("sunxi: only include alias for eMMC when mmc2 used")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reported-by: 5kft@5kft.org
Reviewed-by: Icenowy Zheng <icenowy@aosc.io>
2021-12-08 23:06:56 +00:00
Tom Rini 558002a0f2 Merge https://source.denx.de/u-boot/custodians/u-boot-riscv 2021-12-03 09:02:49 -05:00
Tom Rini 5b9ee01685 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-net
- Two fixes from Marek for designware and mdio.
2021-12-02 09:58:20 -05:00
Thomas Skibo c0ffc12a70 riscv: Enable SPI flash env for SiFive Unmatched.
Enable saving environment to SPI flash memory on SiFive
Unmatched.

Signed-off-by: Thomas Skibo <thomas-git@skibo.net>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-12-02 16:43:56 +08:00
Thomas Skibo 6a863894ad riscv: Support booting SiFive Unmatched from SPI.
Configure SPI flash devices into SPL.  Add SPI boot option to spl.c.
Document how to format flash for booting.

Signed-off-by: Thomas Skibo <thomas-git@skibo.net>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-12-02 16:43:56 +08:00
Padmarao Begari ffb78a7c71 doc: board: Update Microchip MPFS Icicle Kit doc
UART1 use for U-Boot and Linux console instead of UART0 and
UART0 is reserved for Hart Software Services(HSS).

Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2021-12-02 16:43:52 +08:00
Padmarao Begari 5c007d24b9 riscv: Update Microchip MPFS Icicle Kit support
This patch updates Microchip MPFS Icicle Kit support. For now,
add Microchip I2C driver, set environment variables for
mac addresses and default build for SBI_V02.

Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-12-02 16:43:52 +08:00
Padmarao Begari 06142d6874 riscv: dts: Split Microchip device tree
The device tree split into .dtsi and .dts files, common
device node for eMMC/SD, enable I2C1, UART1 for console
instead of UART0, enable the DDR 2GB memory and in
that 288MB memory is reserved for fabric buffer.

Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-12-02 16:43:51 +08:00
Padmarao Begari 0dc0d1e094 i2c: Add Microchip PolarFire SoC I2C driver
Add I2C driver code for the Microchip PolarFire SoC.
This driver supports I2C data transfer and probe for I2C
slave addresses.

Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-12-02 16:43:51 +08:00
Padmarao Begari 0d914ad10d net: macb: Remove Microchip compatible string
Remove the microchip compatible string and default compatible "cdns,macb"
support both 32-bit and 64-bit DMA access.

Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-12-02 16:43:51 +08:00
Leo Yu-Chi Liang 666da85dc9 board: ae350: Support autoboot from RAM
Add boot command "bootcmd_ram" to support autoboot from RAM.

This feature could be useful at the very initial state of chip design
when there is only a minimal set of peripheral. (e.g. without mmc and mac ..etc)

The kernel image is default to be loaded at 0x2000000 via debug port,
and the following script serves as an example:

spl()
{
	cmd="riscv64-linux-gdb -q \
	-ex \"target remote $host:$port\" \
	-ex \"load\" \
	-ex \"thread apply all set \\\$pc=&_start\" \
	-ex \"thread apply all set \\\$a0=\\\$mhartid\" \
	-ex \"thread apply all set \\\$a1=<dtb address>\" \
	-ex \"restore u-boot.itb binary 0x200000\" \
	-ex \"restore Image binary 0x2000000\" \
	-ex \"c\" \
	spl/u-boot-spl
	"

	echo $cmd
	eval $cmd
}

The address where the kernel is loaded can be altered by
changing the value of KERNEL_IMAGE_ADDR.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Reviewed-by: Rick Chen <rick@andestech.com>
2021-12-02 16:43:45 +08:00
Marek Vasut 3fbd17aadf net: dwc_eth_qos: Enable clock in probe
Enable DWC IP clock in driver probe, so the MII access is possible even
outside of active network transfers. This is particularly useful when
using 'mii' or 'mdio' commands to explore PHY state, neither of which
works with DWMAC currently due to the disabled clock.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-12-02 08:35:44 +02:00
Marek Vasut 8777033722 net: eth-phy: Handle gpio_request_by_name() return value
The gpio_request_by_name() returns zero in case of success, however the
conditional return value check in gpio_request_by_name() checks only for
(ret != -ENOENT) and if the condition is true, returns ret outright.

This leads to a situation where successful gpio_request_by_name() return
leads to immediate successful eth_phy_of_to_plat() return as well, and
to skipped parsing of "reset-assert-us" and "reset-deassert-us", so the
PHY driver operates with valid reset GPIO, but with assert/deassert times
set to default, which is 0, instead of the values from DT. This breaks
PHY reset.

Fix this by checking if return value is non-zero and then for this one
single allowed non-zero return value, -ENOENT.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-12-02 08:35:37 +02:00
Mike Karels 874e544e89 Fix MMC numbering issue for Raspberry Pi 3
Using mmc.dtbo from rpi-firmware to switch the controller for the SD
card slot from sdhci to sdhost causes the numbering to change; the
SD card is then not recognized at boot.  Add to the range checked.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2021-11-30 16:07:40 +01:00
Peter Robinson 5e7e6619c8 rpi: Add identifier for the new RPi Zero 2 W
The Raspberry Pi Foundation released the new Zero 2 W which we
want to detect, so we can detect the correct device tree file name.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2021-11-30 16:01:23 +01:00
Peter Robinson 3ede1a62a6 rpi: Update the Raspberry Pi doucmentation URL
The Raspberry Pi Foundation has updated their documentation so update
the URL to the latest place to find the HW device revision codes.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2021-11-30 16:00:54 +01:00
Tom Rini 4a14bfffd4 Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- turris_omnia: enable A385 watchdog before disabling MCU watchdog
  (Pali)
- a37xx: Reset whole UART when changing parent clock from TBG to XTAL
  (Pali)
2021-11-30 08:59:22 -05:00
Tom Rini ca819284d3 Merge tag 'tpm-30112021' of https://source.denx.de/u-boot/custodians/u-boot-tpm
TPM2 API fixes

Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-30 08:04:28 -05:00
Tom Rini ce29c52891 Merge tag 'efi-2022-01-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-01-rc4

Documentation:

* describe how to enable Virtio RNG on QEMU ARM

UEFI:

* enable testing the TCG2 protocol
* support TPM event log passed from firmware
2021-11-30 08:03:21 -05:00
Heinrich Schuchardt c3de051c41 tis: fix tpm_tis_remove()
tpm_tis_remove() leads to calling tpm_tis_ready() with the IO region
unmapped and chip->locality == -1 (locality released). This leads to a
crash in mmio_write_bytes().

The patch implements these changes:

tpm_tis_remove(): Unmap the IO region after calling tpm_tis_cleanup().

tpm_tis_cleanup(): Request locality before IO output and releasing
locality.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-30 14:11:05 +02:00
Ruchika Gupta c0d9bb0b4a efi_loader: Extend PCR's for firmware measurements
Firmwares before U-Boot may be capable of doing tpm measurements
and passing them to U-Boot in the form of eventlog. However there
may be scenarios where the firmwares don't have TPM driver and
are not capable of extending the measurements in the PCRs.
Based on TCG spec, if previous firnware has extended PCR's, PCR0
would not be 0. So, read the PCR0 to determine if the PCR's need
to be extended as eventlog is parsed or not.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-30 09:23:49 +01:00
Ruchika Gupta 2957a1e224 tpm: use more algorithms than sha256 on pcr_read
The current tpm2_pcr_read is hardcoded using SHA256. Make the
actual command to TPM configurable to use wider range of algorithms.
The current command line is kept as is i.e limited to SHA-256 only.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-30 09:23:49 +01:00
Ruchika Gupta 34287efdaf efi_loader: Add check for event log passed from firmware
Platforms may have support to measure their initial firmware components
and pass the event log to u-boot. The event log address can be passed
in property tpm_event_log_addr and tpm_event_log_size of the tpm node.
Platforms may choose their own specific mechanism to do so. A weak
function is added to check if even log has been passed to u-boot
from earlier firmware components. If available, the eventlog is parsed
to check for its correctness and further event logs are appended to the
passed log.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-30 09:23:49 +01:00
Heinrich Schuchardt 3b7bf8a9e4 test: unit test for the EFI_TCG2_PROTOCOL
Encapsulate the UEFI EFI_TCG2_PROTOCOL unit test in an Python test.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-30 09:23:48 +01:00
Heinrich Schuchardt 617270b97b configs: enable CMD_TPM on QEMU ARM
With TPM emulation enabled in u-boot-test-hooks we should also provide the
tpm2 command used for the test/py/tests/test_tpm2.py test.

One of the Python TPMv2 tests expects sandbox specific values. So disable
it on other platforms.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-30 09:23:37 +01:00
Heinrich Schuchardt 9d2465347c doc: qemu-arm peripherials
* add description how to add RNG device
* for a disk specify format=raw to avoid a warning
* fix a typo

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-30 09:23:27 +01:00
Pali Rohár 5db5815e99 serial: a37xx: Reset whole UART when changing parent clock from TBG to XTAL
Sometimes UART stops transmitting characters after UART clock is changed
back to XTAL. In this state UART fifo is always full. Kernel during early
boot wants to print output on UART and is waiting for non-empty UART fifo.
Which leads to CPU hangup without any (debug) output on UART.

Marvell Armada 3700 Functional Specifications says that for programming
fractional divisor registers it is required to disable UART, enable
loopback mode, reset fifos, program registers, disable loopback mode,
release reset of fifos and enable UART.

But these steps do not fix above mentioned issue that UART hangup. Also
gating UART clock does not help. And even resetting UART state machines do
not help.

Experiments showed that UART fifo is unblocked after board is being reset
(during board reset UART HW transmit UART fifo even CPU is not executing
kernel/bootloader anymore).

And another experiments showed that same workaround can be achieved also
by external reset of UART HW (without need to reset board).

So do not implement any of "Marvell recommended" steps from Functional
Specifications as they do not work. And rather prior changing parent clock
back to XTAL, do external reset of UART HW. This operation also resets all
UART registers, so basically it also sets UART clock to default, which is
XTAL. It is unknown why UART hangups and enters such broken state.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2021-11-30 08:31:04 +01:00
Pali Rohár 10c3befc68 arm: mvebu: turris_omnia: enable A385 watchdog before disabling MCU watchdog
Commit aeb0ca64db ("arm: mvebu: turris_omnia: disable MCU watchdog in
SPL when booting over UART") disabled MCU watchdog when booting over
UART to ensure that watchdog does not reboot the board before UART
transfer finishes.

But if UART transfer fails for some reason, or if U-Boot binary crashes,
then board hangs forever as there is no watchdog running which could
reset it.

To fix this issue, enable A385 watchdog with very high timeout before
disabling MCU watchdog to ensure that even slow transfer can finish
successfully before watchdog timer expires and also to ensure that if
board hangs for some reason, watchdog will reset it.

Omnia's MCU watchdog has fixed 120 seconds timer and it cannot be
changed (without updating MCU firmware). A385 watchdog by default uses
25 MHz input clock and so the largest timeout value (2^32-1) can be
just 171 seconds. But A385 watchdog can be switched to use NBCLK (L2) as
input clock (on Turris Omnia it is 800 MHz clock) and in this case final
watchdog clock frequency is calculated as:

  freq = NBCLK / 2 / (2 ^ R)

So A385 watchdog on Turris Omnia can be configured to at most 1374
seconds (about 22 minutes). We set it to 10 minutes, which should be
enough even for bigger U-Boot binaries or slower UART transfers.

Both U-Boot and Linux kernel, when initializing A385 watchdog, switch
watchdog timer to 25 MHz input clock, so usage of NBCLK input clock in
U-Boot SPL does not cause any issues.

Fixes: aeb0ca64db ("arm: mvebu: turris_omnia: disable MCU watchdog in SPL when booting over UART")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
2021-11-30 08:31:04 +01:00
Tom Rini ade37460a9 Prepare v2022.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-11-29 11:16:03 -05:00
Ivan Mikhaylov 2f7c7aeb5c board: iot2050: update build documentation for OP-TEE
Set ta-target explicitly to correspond with OP-TEE recipe in
siemens/meta-iot2050.

Errors without explicit set of ta-target:
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mthumb’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-unaligned-access’
aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mfloat-abi=hard’
make: *** [mk/compile.mk:159: out/arm-plat-k3/ta_arm32-lib/libdl/dlfcn.o] Error 1

Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-11-29 11:15:37 -05:00
Vincent Stehlé 270eeb6871 qemu: common: Fix build with update capsule
The common emulation Makefile has a dependency on a non-existent
qemu_capsule.o when building with support for capsule update enabled
(CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y).
The code which was in qemu_capsule.c has been completely moved to
lib/efi_loader/efi_capsule.c by commit 7a6fb28c8e ("efi_loader: capsule:
add back efi_get_public_key_data()").
Remove the false dependency.

This fixes the following build error:

  make[1]: *** No rule to make target 'board/emulation/common/qemu_capsule.o', needed by 'board/emulation/common/built-in.o'.  Stop.

Fixes: commit 47a25e81d3 ("Revert "efi_capsule: Move signature from DTB to .rodata"")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Simon Glass <sjg@chromium.org>
2021-11-29 11:15:37 -05:00
Sean Anderson 7d3bebb206 fastboot: Add maintainers entry
Add an entry in maintainers for fastboot. It is starting off orphaned, but
hopefully someone can pick it up.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
2021-11-29 11:15:37 -05:00
Sean Anderson 4469d3b4db clk: Add myself as a maintainer for the clock subsystem
Lukasz has not been very responsive in reviewing clock patches. Add
myself as a maintainer.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
2021-11-29 11:15:37 -05:00
Tom Rini 693650b15d Merge tag 'efi-2022-01-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-01-rc3-2

Test:
* fix pylint warnings

UEFI:
* disable interrupts before removing devices in ExitBootServices()
* implement poweroff in efi_system_reset() on sandbox
* allow booting via EFI even if some block device fails
2021-11-26 17:10:53 -05:00
Heinrich Schuchardt 2b5e710859 test: fix pylint error in u_boot_console_exec_attach.py
* provide module docstring

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-26 22:02:37 +01:00
Heinrich Schuchardt 6e6d37f7f9 test: fix pylint error in u_boot_console_sandbox.py
* provide module docstring

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-26 22:02:37 +01:00
Heinrich Schuchardt 9aa1a14d13 test: fix pylint errors in u_boot_utils.py
* there is no os.path.unlink() method
* don't inherit from object
* add module docstring
* move imports to the top
* avoid unused variable

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-26 22:02:37 +01:00
Heinrich Schuchardt 67e9b64701 test: fix pylint errors in u_boot_spawn.py
* don't inherit from object
* imports should be on the top level
* avoid unused variable names
* avoid unnecessary else after raise

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-26 22:02:37 +01:00
Heinrich Schuchardt 09e409810a test: fix pylint errors in multiplexed_log.py
* don't inherit from object
* remove superfluous comprehension
* add module docstring

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-26 22:02:37 +01:00
Heinrich Schuchardt 9abd2ca96e efi_selftest: simplify endian conversion for FDT test
UEFI code is always little-endian. Remove a superfluous test.

Remove a superfluous type conversion.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-26 21:30:59 +01:00
Heinrich Schuchardt 9d1564dabc efi_loader: segfault in efi_clear_os_indications()
If we call efi_clear_os_indications() before initializing the memory store
for UEFI variables a NULL pointer dereference occurs.

The error was observed on the sandbox with:

    usb start
    host bind 0 sandbox.img
    load host 0:1 $kernel_addr_r helloworld.efi
    bootefi $kernel_addr_r

Here efi_resister_disk() failed due to an error in the BTRFS implementation.

Move the logic to clear EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED
to the rest of the capsule code.

If CONFIG_EFI_IGNORE_OSINDICATIONS=y, we should still clear the flag.
If OsIndications does not exist, we should not create it as it is owned by
the operating system.

Fixes: 149108a3eb ("efi_loader: clear OsIndications")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-26 21:30:59 +01:00
Heinrich Schuchardt 1ae35c72b8 test: address some pylint warnings
* remove unused variables
* module description must precede import statements
* fix inconsistent return values

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-26 21:30:59 +01:00
Heinrich Schuchardt 7a001e0f3d sandbox: poweroff in efi_system_reset()
efi_system_reset() should exit if called with EFI_RESET_SHUTDOWN.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-26 21:30:59 +01:00
Heinrich Schuchardt cd9a26bfe5 efi_loader: efi_disk_register() should not fail
Our algorithm for creating USB device paths may lead to duplicate device
paths which result in efi_disk_register() failing. Instead we should just
skip devices that cannot be registered as EFI block devices.

Fix a memory leak in efi_disk_add_dev() caused by the duplicate device
path.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-26 21:30:59 +01:00
Tom Rini 3f73e79de8 efi: Call bootm_disable_interrupts earlier in efi_exit_boot_services
If we look at the path that bootm/booti take when preparing to boot the
OS, we see that as part of (or prior to calling do_bootm_states,
explicitly) the process, bootm_disable_interrupts() is called prior to
announce_and_cleanup() which is where udc_disconnect() /
board_quiesce_devices() / dm_remove_devices_flags() are called from.  In
the EFI path, these are called afterwards.  In efi_exit_boot_services()
however we have been calling bootm_disable_interrupts() after the above
functions, as part of ensuring that we disable interrupts as required
by the spec.  However, bootm_disable_interrupts() is also where we go
and call usb_stop().  While this has been fine before, on the TI J721E
platform this leads us to an exception.  This exception seems likely to
be the case that we're trying to stop devices that we have already
disabled clocks for.  The most direct way to handle this particular
problem is to make EFI behave like the do_bootm_states() process and
ensure we call bootm_disable_interrupts() prior to ending up in
usb_stop().

Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>
Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-26 21:30:59 +01:00
Tom Rini 2ad8d0cb95 Merge branch 'efi-2022-01' of https://source.denx.de/u-boot/custodians/u-boot-efi
Scripts:
* Update spelling.txt

LMB:
* remove extern keyword in lmb.h
* drop unused lmb_size_bytes()

Test:
* test truncation in snprintf()

Documentation:
* add include/lmb.h to HTML documentation

UEFI:
* reduce non-debug logging output for measured boot
* fix use after free in measured boot
* startup the tpm device when installing the protocol
* implement EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES
* record capsule result only if capsule is read
2021-11-20 09:36:37 -05:00
Ilias Apalodimas d6b55a420c efi_loader: startup the tpm device when installing the protocol
Due to U-Boot's lazy binding mentality the TPM is probed but not properly
initialized.  The user can startup the device from the command line
e.g 'tpm2 startup TPM2_SU_CLEAR'.  However we can initialize the TPM during
the TCG protocol installation,  which is easier to use overall.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-20 10:53:01 +01:00
Ilias Apalodimas 5ba0397049 efi_loader: fix FinalEvents table if an EFI app invoked GetEventLog
As described in the TCG spec [1] in sections 7.1.1 and 7.1.2 the FinalEvent
table should include events after GetEventLog has been called.  This
currently works for us as long as the kernel is the only EFI application
calling that.  Specifically we only implement what's described in 7.1.1.

So refactor the code a bit and support EFI application(s) calling
GetEventLog.  Events will now be logged in both the EventLog and FinalEvent
table as long as ExitBootServices haven't been invoked.

[1] https://trustedcomputinggroup.org/wp-content/uploads/EFI-Protocol-Specification-rev13-160330final.pdf

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt dc52578d7b efi_loader: bump EFI_SPECIFICATION_VERSION to 2.9
We have implemented all what is new in UEFI specification 2.9 and relevant
for U-Boot.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt 22ad3f5f7b efi_selftest: unit test for EFI_GROUP_BEFORE_EXIT_BOOT_SERVICE
Add a test for the EFI_GROUP_BEFORE_EXIT_BOOT_SERVICE event group.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt 43eaf5b13f efi_loader: EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES
Implement the EFI_EVENT_GROUP_BEFORE_EXIT_BOOT_SERVICES event group
handling.

Add the definition of EFI_EVENT_GROUP_AFTER_READY_TO_BOOT.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-20 10:53:00 +01:00
Masami Hiramatsu 5d49b32f0a efi_loader: capsule: Record capsule result only if capsule is read
Record capsule update result only if the capsule file is
successfully read, because the capsule GUID is not sure when
the file can not be read or the file is not a capsule.
Without this fix, if user puts a dummy (non-capsule) file
under (ESP)EFI/UpdateCapsule, U-Boot causes a synchronous
abort.

This also fixes use-after-free bug of the 'capsule' variable.

Fixes: c74cd8bd08 ("efi_loader: capsule: add capsule_on_disk support")
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-20 10:53:00 +01:00
Masahisa Kojima 3961bd9b55 efi_loader: Reduce efi_tcg2 logging statement
log_info() is used for the debug level logging statement
which should use log_debug() instead. Convert it to reduce the
log output.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt e032cb2ac9 efi_loader: Sphinx comments in efi_api.h
Fix incorrect Sphinx comments in efi_api.h:

* add missing 'struct'
* correct indentation

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-11-20 10:53:00 +01:00
Masahisa Kojima 45c16fd0c2 efi: add comment for efi_system_table and efi_configuration_table
This commit adds the comment for efi_system_table and
efi_configuration_table structure.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt 3f80064fd5 doc: fix typos in trace.rst
Fix obvious typos. Use US spelling consistently.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt dfec0e9d9c scripts: update spelling.txt from upstream Linux
This list is used by checkpatch.pl. The Linux v5.15 version has several
words that where mispelled in U-Boot too.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt 0c9e8bf2bb test: test truncation in snprintf()
Test that the return value of snprintf() is correct in the case of
truncation.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt ac7606af7d lmb: fix typo 'commun'
%s/commun/common/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt 7db07aa24f lmb: drop unused lmb_size_bytes()
lmb_size_bytes() is unused.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt 951a8c4871 lmb: remove extern keyword in lmb.h
The extern keyword is not needed in include/lmb.h to declare functions.
Remove it.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt 4ad4c2daeb doc: add include/lmb.h to the HTML documentation
Correct Sphinx style comments in include/lmb.h

Add the logical memory block API to the HTML documentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-20 10:53:00 +01:00
Heinrich Schuchardt 5a515132d9 lmb: remove lmb_is_nomap() from include
Defining static functions in includes should be avoided.
Function lmb_is_nomap() is only used in the unit test.
So move it to the unit test.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-20 10:53:00 +01:00
Tom Rini 454a97485a Merge tag 'u-boot-amlogic-20211119' of https://source.denx.de/u-boot/custodians/u-boot-amlogic
- pinctrl: Correct the driver GPIO declaration
- meson64_android: handle errors on boot and run fastboot on boot failure
2021-11-19 16:33:33 -05:00
Tom Rini b5f2c68d5c Merge tag 'tpm-19112021' of https://source.denx.de/u-boot/custodians/u-boot-tpm
TPM1.2 and Atmel fixes

# gpg verification failed.
2021-11-19 16:33:23 -05:00
Neil Armstrong 28f70cfcfd configs: meson64_android: add PANIC stage for SYSTEM fails
If bootloader was updated without running oem format, reboot will cause
boot loop because the SYSTEM stage fails.

Add a final PANIC stage running fastboot to permit recovery.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2021-11-19 18:15:26 +01:00
Neil Armstrong bdc68df4dd configs: meson64_android: bypass other checks on run_fastboot=1
This can lead to GPT and BCB errors even if fastboot was selected early
by usb rom boot and the eMMC is blank/invalid.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2021-11-19 18:15:26 +01:00
Simon Glass 886d36efdb pinctrl: meson: Correct the driver GPIO declaration
This should use the provided U_BOOT_DRIVER() macro so that the driver gets
added to the appropriate linker list. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7c9dcfed50 ("pinctrl: meson: rework gx pmx function")
Reported-by: Tom Rini <trini@konsulko.com>
Tested-by: Tom Rini <trini@konsulko.com> on libretech-cc
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-11-19 18:15:26 +01:00
Tom Rini 8391a0f3d9 Merge branch '2021-11-18-regression-fixes'
- An assortment of fixes related to GD, GD_FLG_SKIP_RELOC, and the lmb
- Environment fix on synquacer developmentbox
- Fix for get_info is not valid in partition code
2021-11-18 18:25:19 -05:00
Marek Vasut b1f3f982fa arm64: Add missing GD_FLG_SKIP_RELOC handling
In case U-Boot enters relocation with GD_FLG_SKIP_RELOC, skip the
relocation. The code still has to set up new_gd pointer and new
stack pointer.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
2021-11-18 18:20:19 -05:00
Marek Vasut bd994c007a lmb: Reserve U-Boot separately if relocation is disabled
In case U-Boot starts with GD_FLG_SKIP_RELOC, the U-Boot code is
not relocated, however the stack and heap is at the end of DRAM
after relocation. Reserve a LMB area for the non-relocated U-Boot
code so it won't be overwritten.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
2021-11-18 18:20:19 -05:00
Marek Vasut 47d7d03622 board_f: Copy GD to new GD even if relocation disabled
Even if U-Boot has relocation disabled via GD_FLG_SKIP_RELOC , the
relocated stage of U-Boot still picks GD from new_gd location. The
U-Boot itself is not relocated, but GD might be, so copy the GD to
new GD location even if relocation is disabled.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Peng Fan <peng.fan@oss.nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
2021-11-18 18:20:19 -05:00
schspa 50f7b2effd part: return -ENOSYS when get_info not valid.
In some case, get_info() interface can be NULL, add this check to stop
from crash.

Signed-off-by: schspa <schspa@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-18 18:20:06 -05:00
Masami Hiramatsu 0171d056ec Revert "board: synquacer: developerbox: Don't set gd->env_addr to default_environment"
Without default setting of gd->env_addr, U-Boot will cause
a synchronous abort if the env-variables on the SPI flash is
broken or not saved corectly. Set gd->env_addr correctly.

This reverts commit 535870f3b0.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
2021-11-18 14:22:11 -05:00
Mathew McBride 4a08dba019 drivers: tpm: atmel_twi: fix printf specifier compile warning
%d was being used as the specifier for size_t, leading to a
compiler warning

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-17 13:47:36 +02:00
Mathew McBride fb30d99df8 drivers: tpm: atmel_twi: implement get_desc operation
Without get_desc, the tpm command will not provide a
description of the device in 'tpm device' or 'tpm info'.

Due to the characteristics of the Atmel TPM it isn't
possible to determine certain attributes (e.g open/close
status) without using the TPM stack (compare Infineon
and ST TPM drivers), so just print out the chip model
and udevice name as the identifier.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-17 13:47:33 +02:00
Mathew McBride fdb4a5fcd7 drivers: tpm: atmel_twi: do not use an offset byte
This driver was broken due to an empty offset byte being prepended
at the start of every transmission.

The hardware does not mimic an EEPROM device with registers so
an offset byte is not required.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-17 13:47:31 +02:00
Mathew McBride 02f50d8ebb drivers: tpm: atmel_twi: drop non-DM_I2C compatibility
There are no users of this driver without DM_I2C

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-17 13:47:29 +02:00
Mathew McBride e845dd7c8b cmd: tpm-v1: fix load_key_by_sha1 compile errors
This command is not compiled by default and has not been updated alongside
changes to the tpmv1 API, such as passing the TPM udevice to the relevant
functions.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-17 13:47:27 +02:00
Mathew McBride ebb6d74df3 cmd: tpm-v1: fix compile error in TPMv1 list resources command
This command is not compiled by default and was not
updated to pass the udevice to tpm_get_capability.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-17 13:47:21 +02:00
Tom Rini 3144ba23bf Merge branch '2021-11-15-assorted-fixes'
- Rename "tqc" to "tq" and related updates
- Assorted minor ARM updates, build updates and documentation updates
2021-11-16 14:23:30 -05:00
Tom Rini 2ffa0e87df Merge tag 'xilinx-for-v2022.01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx changes for v2022.01-rc3

sdhci:
- Fix emmc mini case with missing firmware interface

zynqmp:
- Restore JTAG interface if required
- Allow overriding board name
- Add support for DLC21
- Fix one fallthrought statement description
- Use config macro instead of name duplication
- Save multiboot to variable

firmware:
- Handle ipi_req errors better
- Use local buffer in case user doesn't need it instead of NULL/0 location

spi:
- gqsi: Fix write issue at low frequencies

net:
- gem: Disable broadcasts
2021-11-16 09:51:04 -05:00
Andy Shevchenko 4b32531be2 image: Explicitly declare do_bdinfo()
Compiler is not happy:

common/image-board.c: In function ‘boot_get_kbd’:
common/image-board.c:902:17: warning: implicit declaration of function ‘do_bdinfo’ [-Wimplicit-function-declaration]
  902 |                 do_bdinfo(NULL, 0, 0, NULL);
      |                 ^~~~~~~~~

Move the forward declaration to a header.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-11-15 14:33:33 -05:00
Andy Shevchenko b5f3850727 usb: doc: Fix spelling issues in README.usb
Fix spelling issues in README.usb.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2021-11-15 14:33:33 -05:00
Pierre-Clément Tosi 38de2bad64 arm: Fix bad memcpy.S str8w macro argument count
Remove the extra (empty) argument passed to str8w, causing the following
error:

   <instantiation>:40:47: error: too many positional arguments
     str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, , abort=19f
                                                 ^
   u-boot/arch/arm/lib/memcpy.S:240:5: note: while in macro instantiation
   17: forward_copy_shift pull=16 push=16
       ^

Note: no functional change intended.

Fixes: d8834a1323 ("arm: Use optimized memcpy and memset from linux")
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
2021-11-15 14:33:32 -05:00
Masami Hiramatsu 4d492b0c0f configs: synquacer: Fix dfu_alt_info to use nor1
Fix dfu_alt_info to use nor1 instead of the device name.
This reverts a part of commit 59bd18d4c4 ("configs: synquacer:
Remove mtdparts settings and update DFU setting") because the
commit a4f2d83414 ("mtd: spi: nor: force mtd name to "nor%d"")
changed the mtd device naming scheme to nor%d.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2021-11-15 14:33:32 -05:00
Angelo Dureghello 5130102fc4 makefile: add missing semicolons
On some distributions, as Debian GNU 11, this targets fails
with errors.

Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
2021-11-15 14:33:32 -05:00
Matthias Schiffer a5e305256b board: tq: fix spelling of "TQ-Systems"
"TQ-Systems" is written with a dash.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
2021-11-15 14:33:32 -05:00
Matthias Schiffer 679530c3c6 board: rename "tqc" vendor to "tq"
The subdivision name "TQ Components" hasn't been in use for a long time.
Rename the vendor directory to "tq", which also matches our Device Tree
vendor prefix.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
2021-11-15 14:33:32 -05:00
Alistair Delva 9d3d981661 arm64: relocate-rela: Add support for ld.lld
Cap end of relocations by the binary size.

Linkers like to insert some auxiliary sections between .rela.dyn and
.bss_start. These sections don't make their way to the final binary, but
reloc_rela still tries to relocate them, resulting in attempted read
past the end of file.

When linking U-Boot with ld.lld, the STATIC_RELA feature (enabled by
default on arm64) breaks the build. After this patch, U-Boot can be
linked successfully with and without CONFIG_STATIC_RELA.

Originally-from: Elena Petrova <lenaptr@google.com>
Signed-off-by: Alistair Delva <adelva@google.com>
Cc: David Brazdil <dbrazdil@google.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Tom Rini <trini@konsulko.com>
2021-11-15 14:33:32 -05:00
Ricardo Salveti 11c0255cd8 xilinx: zynqmp: fix ZYNQMP_RESTORE_JTAG check
Config check should be done without the SPL_ prefix.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Link: https://lore.kernel.org/r/20211104192802.3093811-1-ricardo@foundries.io
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2021-11-15 15:59:33 +01:00
Michal Simek 412ab13328 arm64: zynqmp: Replace comma by semicolon
Fix issue reported by checkpatch.pl

WARNING: Possible comma where semicolon could be used
 #499: FILE: board/xilinx/zynqmp/zynqmp.c:499:
 +	size = ALIGN(CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE),
 +	reg = lmb_alloc(&lmb, size, MMU_SECTION_SIZE);

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/ef264451ef9455ada9784bedbc91f74b94b8a237.1634799528.git.michal.simek@xilinx.com
2021-10-29 13:01:47 +02:00
Michal Simek e8b43c6409 xilinx: zynqmp: Save multiboot as variable
Save multiboot register as u-boot variable. And use it as primary source
for composing dfu_alt_info for capsule update. If variable is not defined

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Link: https://lore.kernel.org/r/96556221443489c952717bcb340b4707901c9bdd.1635149450.git.michal.simek@xilinx.com
2021-10-29 13:00:52 +02:00
Ashok Reddy Soma 4f9d25537c spi: zynqmp_gqspi: Fix write issue at low frequencies
With current implementation we are seeing write issues at low frequencies
below 15Mhz. Make below changes to fix the issue.

1. Remove dummy genfifo entry in zynqmp_qspi_chipselect() which was
   incorrectly added in the past

2. Enable and poll for TX_FIFO_Empty after Tx data is filled in FIFO in
   zynqmp_qspi_fill_tx_fifo().

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Link: https://lore.kernel.org/r/1634652780-21755-1-git-send-email-ashok.reddy.soma@xilinx.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2021-10-25 10:02:25 +02:00
Michal Simek 60705883d2 xilinx: zynqmp: Use CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
There is no need to use u-boot.itb as name when this is already recorded in
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME macro.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Link: https://lore.kernel.org/r/38a236ed317510c26b37525da0e7bc26b411222c.1634558534.git.michal.simek@xilinx.com
2021-10-21 08:56:41 +02:00
Michal Simek f510927d55 xilinx: zynqmp: Handle fallthrough statement properly
Now intentional fallthrough in switch-case should be labelled that's why
convert comment.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
Link: https://lore.kernel.org/r/b3e976bd3b9bbe7061fec5ba0a3b4e78fdd78394.1634556602.git.michal.simek@xilinx.com
2021-10-21 08:55:46 +02:00
Michal Simek 53f5d1688e firmware: zynqmp: fix write to an uninitialised pointer in ipi_req()
When a caller is not interested in the returned message, the ret_payload
pointer is set to NULL in the u-boot-sources. In this case, under EL3, the
memory from address 0x0 would be overwritten by ipi_req() with the returned
IPI message, damaging the original data under this address. The patch, in
case ret_payload is NULL, assigns the pointer to the array holding the IPI
message being sent.

Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Adrian Fiergolski <Adrian.Fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/3178ff7651948270b714daa4adad48b94eaca9ba.1634309856.git.michal.simek@xilinx.com
2021-10-21 08:54:50 +02:00
Michal Simek b05cc389ba firmware: zynqmp: Handle errors from ipi_req properly
There are multiple errors what can happen in ipi_req but they are not
propagated properly. That's why propage all error properly.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Adrian Fiergolski <Adrian.Fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/7ac4f3b2104f04c72d287c46d1ccbce20f138fd4.1634309856.git.michal.simek@xilinx.com
2021-10-21 08:54:49 +02:00
Michal Simek eafdcda4a8 net: gem: Disable broadcast setting
There is no need for GEM to accepts broadcast packets because they are not
handled by u-boot anyway. That's why use HW IP feature and don't waste time
on these packats which will be dropped anyway.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Link: https://lore.kernel.org/r/0e236c3a6514a2a633ef3a5b71a967c46f7fbae7.1634303007.git.michal.simek@xilinx.com
2021-10-21 08:53:55 +02:00
Michal Simek 599becb0ae arm64: zynqmp: Fix sgmii clock input freq for p-a2197
Input frequency for sgmii is 125MHz on all Xilinx designs.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/87153c59cc526f5955b3bff3db11027b5848c042.1634302099.git.michal.simek@xilinx.com
2021-10-21 08:52:30 +02:00
Michal Simek d2d14383ba arm64: zynqmp: Add support for DLC21 (Smartlynq+) board
DLC21 is used as fast jtag cable. The patch adds support for this board
from PS perspective. The most interesting part on the board is seps525 oled
display. Also i2c, gpio, ethernet, uart, SD and eMMC are tested.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/3d35cd6a11cffc7456e21a88b214cc965734e852.1634231268.git.michal.simek@xilinx.com
2021-10-21 08:51:33 +02:00
Liam Beguin 181419446a arm64: zynqmp: allow overriding board name
There is no need to use zynqmp name as SYS_BOARD for all boards.
The patch is adding an option to change it.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Link: https://lore.kernel.org/r/20211020152518.3511912-1-liambeguin@gmail.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2021-10-21 08:51:00 +02:00
Jorge Ramirez-Ortiz 398a74ae33 zynqmp: restore the jtag interface
When boot.bin is configured for secure boot the CSU will disable the
JTAG interface on all cases.

Some boards might rely on this interface for flashing to QSPI in which
case those systems might end up bricked during development.

This commit will restore the interface under CSU control

Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Link: https://lore.kernel.org/r/20211013134800.19452-1-jorge@foundries.io
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2021-10-21 08:51:00 +02:00
T Karthik Reddy a3e3d4698e mmc: zynq_sdhci: Add xilinx_pm_request weak function
Mini emmc does not use any pmufw and ZYNQMP_FIRMWARE is disabled.
xilinx_pm_request() will not be compiled and causes undefined reference to
`xilinx_pm_request' error. So add a weak function in zynq_sdhci.c file.

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/1633086518-32636-1-git-send-email-t.karthik.reddy@xilinx.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2021-10-21 08:50:59 +02:00
182 changed files with 5626 additions and 1186 deletions

No files matched your search

+16
View File
@@ -667,6 +667,7 @@ F: drivers/mtd/jedec_flash.c
CLOCK
M: Lukasz Majewski <lukma@denx.de>
M: Sean Anderson <seanga2@gmail.com>
S: Maintained
T: git https://source.denx.de/u-boot/custodians/u-boot-clk.git
F: drivers/clk/
@@ -712,8 +713,11 @@ W: https://u-boot.readthedocs.io/en/latest/develop/uefi/u-boot_on_efi.html
F: board/efi/efi-x86_app
F: configs/efi-x86_app*
F: doc/develop/uefi/u-boot_on_efi.rst
F: drivers/block/efi-media-uclass.c
F: drivers/block/sb_efi_media.c
F: lib/efi/efi_app.c
F: scripts/build-efi.sh
F: test/dm/efi_media.c
EFI PAYLOAD
M: Heinrich Schuchardt <xypron.glpk@gmx.de>
@@ -760,6 +764,18 @@ F: test/env/
F: tools/env*
F: tools/mkenvimage.c
FASTBOOT
S: Orphaned
F: cmd/fastboot.c
F: doc/android/fastboot*.rst
F: include/fastboot.h
F: include/fastboot-internal.h
F: include/net/fastboot.h
F: drivers/fastboot/
F: drivers/usb/gadget/f_fastboot.c
F: net/fastboot.c
F: test/dm/fastboot.c
FPGA
M: Michal Simek <michal.simek@xilinx.com>
S: Maintained
+2 -2
View File
@@ -3,7 +3,7 @@
VERSION = 2022
PATCHLEVEL = 01
SUBLEVEL =
EXTRAVERSION = -rc2
EXTRAVERSION = -rc3
NAME =
# *DOCUMENTATION*
@@ -1246,7 +1246,7 @@ binary_size_check: u-boot-nodtb.bin FORCE
echo "u-boot.map shows a binary size of $$map_size" >&2 ; \
echo " but u-boot-nodtb.bin shows $$file_size" >&2 ; \
exit 1; \
fi \
fi; \
fi
ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy)
+3
View File
@@ -36,6 +36,8 @@ dtb-$(CONFIG_ARCH_APPLE) += \
t8103-j274.dtb \
t8103-j293.dtb
dtb-$(CONFIG_EXYNOS9820) += exynos9820-beyond1lte.dtb
dtb-$(CONFIG_ARCH_DAVINCI) += \
da850-evm.dtb \
da850-lcdk.dtb \
@@ -319,6 +321,7 @@ dtb-$(CONFIG_ARCH_ZYNQMP) += \
avnet-ultra96-rev1.dtb \
avnet-ultrazedev-cc-v1.0-ultrazedev-som-v1.0.dtb \
zynqmp-a2197-revA.dtb \
zynqmp-dlc21-revA.dtb \
zynqmp-e-a2197-00-revA.dtb \
zynqmp-g-a2197-00-revA.dtb \
zynqmp-m-a2197-01-revA.dtb \
+12 -4
View File
@@ -197,6 +197,14 @@
compatible = "audio-graph-card";
label = "rcar-sound";
dais = <&rsnd_port0>, <&rsnd_port1>;
widgets = "Microphone", "Mic Jack",
"Line", "Line In Jack",
"Headphone", "Headphone Jack";
mic-det-gpio = <&gpio0 2 GPIO_ACTIVE_LOW>;
routing = "Headphone Jack", "HPOUTL",
"Headphone Jack", "HPOUTR",
"IN3R", "MICBIAS",
"Mic Jack", "IN3R";
};
vccq_sdhi0: regulator-vccq-sdhi0 {
@@ -271,12 +279,12 @@
&ehci0 {
dr_mode = "otg";
status = "okay";
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&versaclock5 3>;
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>;
};
&ehci1 {
status = "okay";
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>;
};
&hdmi0 {
@@ -615,7 +623,7 @@
};
&rcar_sound {
pinctrl-0 = <&sound_pins &sound_clk_pins>;
pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
pinctrl-names = "default";
/* Single DAI */
@@ -639,7 +647,7 @@
bitclock-master = <&rsnd_endpoint0>;
frame-master = <&rsnd_endpoint0>;
playback = <&ssi1 &dvc1 &src1>;
playback = <&ssi1>, <&dvc1>, <&src1>;
capture = <&ssi0>;
};
};
+11 -34
View File
@@ -7,19 +7,10 @@
#include <dt-bindings/clk/versaclock.h>
/ {
aliases {
spi0 = &rpc;
};
memory@48000000 {
device_type = "memory";
/* first 128MB is reserved for secure area. */
reg = <0x0 0x48000000 0x0 0xc000000>;
};
memory@57000000 {
device_type = "memory";
reg = <0x0 0x57000000 0x0 0x29000000>;
reg = <0x0 0x48000000 0x0 0x78000000>;
};
osc_32k: osc_32k {
@@ -59,12 +50,17 @@
&avb {
pinctrl-0 = <&avb_pins>;
pinctrl-names = "default";
phy-mode = "rgmii-rxid";
phy-handle = <&phy0>;
rx-internal-delay-ps = <1800>;
tx-internal-delay-ps = <2000>;
clocks = <&cpg CPG_MOD 812>, <&versaclock5 4>;
clock-names = "fck", "refclk";
status = "okay";
phy0: ethernet-phy@0 {
compatible = "ethernet-phy-id004d.d074",
"ethernet-phy-ieee802.3-c22";
reg = <0>;
interrupt-parent = <&gpio2>;
interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
@@ -153,7 +149,7 @@
};
eeprom@50 {
compatible = "microchip,at24c64", "atmel,24c64";
compatible = "microchip,24c64", "atmel,24c64";
pagesize = <32>;
read-only; /* Manufacturing EEPROM programmed at factory */
reg = <0x50>;
@@ -279,25 +275,6 @@
};
};
&rpc {
compatible = "renesas,rcar-gen3-rpc";
num-cs = <1>;
spi-max-frequency = <40000000>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
flash0: spi-flash@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "spi-flash", "jedec,spi-nor";
spi-max-frequency = <40000000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
};
};
&scif_clk {
clock-frequency = <14745600>;
};
@@ -340,17 +317,17 @@
vqmmc-supply = <&reg_1p8v>;
bus-width = <8>;
mmc-hs200-1_8v;
no-sd;
no-sdio;
non-removable;
fixed-emmc-driver-type = <1>;
status = "okay";
};
&usb2_clksel {
status = "okay";
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
<&versaclock5 3>, <&usb3s0_clk>;
clock-names = "ehci_ohci", "hs-usb-if",
"usb_extal", "usb_xtal";
<&versaclock5 3>, <&usb3s0_clk>;
status = "okay";
};
&usb3s0_clk {
+198 -63
View File
@@ -1,82 +1,217 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Samsung Exynos7420 SoC device tree source
* SAMSUNG EXYNOS9820 SoC device tree source
*
* Copyright (c) 2016 Samsung Electronics Co., Ltd.
* http://www.samsung.com
* Copyright (c) 2018 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* SAMSUNG EXYNOS9820 SoC device nodes are listed in this file.
* EXYNOS based board files can include this file and provide
* values for board specfic bindings.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
#include "skeleton.dtsi"
#include <dt-bindings/clock/exynos7420-clk.h>
/ {
compatible = "samsung,exynos7420";
#include <dt-bindings/interrupt-controller/arm-gic.h>
fin_pll: xxti {
#include "exynos9820-pinctrl.dtsi"
/ {
compatible = "samsung,armv8", "samsung,exynos9820";
dtb-hw_rev = <0>;
dtb-hw_rev_end = <255>;
interrupt-parent = <&gic>;
#address-cells = <2>;
#size-cells = <1>;
xxti: clock {
/* XXTI */
compatible = "fixed-clock";
clock-output-names = "fin_pll";
u-boot,dm-pre-reloc;
clock-output-names = "oscclk";
#clock-cells = <0>;
};
clock_topc: clock-controller@10570000 {
compatible = "samsung,exynos7-clock-topc";
reg = <0x10570000 0x10000>;
u-boot,dm-pre-reloc;
#clock-cells = <1>;
clocks = <&fin_pll>;
clock-names = "fin_pll";
};
cpus {
#address-cells = <2>;
#size-cells = <0>;
clock_top0: clock-controller@105d0000 {
compatible = "samsung,exynos7-clock-top0";
reg = <0x105d0000 0xb000>;
u-boot,dm-pre-reloc;
#clock-cells = <1>;
clocks = <&fin_pll>, <&clock_topc DOUT_SCLK_BUS0_PLL>,
<&clock_topc DOUT_SCLK_BUS1_PLL>,
<&clock_topc DOUT_SCLK_CC_PLL>,
<&clock_topc DOUT_SCLK_MFC_PLL>;
clock-names = "fin_pll", "dout_sclk_bus0_pll",
"dout_sclk_bus1_pll", "dout_sclk_cc_pll",
"dout_sclk_mfc_pll";
};
cpu-map {
cluster0 {
coregroup0 {
core0 {
cpu = <&cpu0>;
};
core1 {
cpu = <&cpu1>;
};
core2 {
cpu = <&cpu2>;
};
core3 {
cpu = <&cpu3>;
};
};
clock_peric1: clock-controller@14c80000 {
compatible = "samsung,exynos7-clock-peric1";
reg = <0x14c80000 0xd00>;
u-boot,dm-pre-reloc;
#clock-cells = <1>;
clocks = <&fin_pll>, <&clock_top0 DOUT_ACLK_PERIC1>,
<&clock_top0 CLK_SCLK_UART1>,
<&clock_top0 CLK_SCLK_UART2>,
<&clock_top0 CLK_SCLK_UART3>;
clock-names = "fin_pll", "dout_aclk_peric1_66",
"sclk_uart1", "sclk_uart2", "sclk_uart3";
};
coregroup1 {
core0 {
cpu = <&cpu4>;
};
core1 {
cpu = <&cpu5>;
};
};
};
pinctrl@13470000 {
compatible = "samsung,exynos7420-pinctrl";
reg = <0x13470000 0x1000>;
u-boot,dm-pre-reloc;
cluster1 {
coregroup0 {
core0 {
cpu = <&cpu6>;
};
core1 {
cpu = <&cpu7>;
};
};
};
serial2_bus: serial2-bus {
samsung,pins = "gpd1-4", "gpd1-5";
samsung,pin-function = <2>;
samsung,pin-pud = <3>;
samsung,pin-drv = <0>;
u-boot,dm-pre-reloc;
};
cpu0: cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a55", "arm,armv8";
reg = <0x0 0x0000>;
enable-method = "psci";
};
cpu1: cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a55", "arm,armv8";
reg = <0x0 0x0001>;
enable-method = "psci";
};
cpu2: cpu@2 {
device_type = "cpu";
compatible = "arm,cortex-a55", "arm,armv8";
reg = <0x0 0x0002>;
enable-method = "psci";
};
cpu3: cpu@3 {
device_type = "cpu";
compatible = "arm,cortex-a55", "arm,armv8";
reg = <0x0 0x0003>;
enable-method = "psci";
};
cpu4: cpu@4 {
device_type = "cpu";
compatible = "arm,cortex-a75", "arm,armv8";
reg = <0x0 0x0004>;
enable-method = "psci";
};
cpu5: cpu@5 {
device_type = "cpu";
compatible = "arm,cortex-a75", "arm,armv8";
reg = <0x0 0x0005>;
enable-method = "psci";
};
cpu6: cpu@100 {
device_type = "cpu";
compatible = "samsung,mongoose-m4", "arm,armv8";
reg = <0x0 0x0100>;
enable-method = "psci";
};
cpu7: cpu@101 {
device_type = "cpu";
compatible = "samsung,mongoose-m4", "arm,armv8";
reg = <0x0 0x0101>;
enable-method = "psci";
};
};
serial@14C30000 {
compatible = "samsung,exynos4210-uart";
reg = <0x14C30000 0x100>;
u-boot,dm-pre-reloc;
clocks = <&clock_peric1 PCLK_UART2>,
<&clock_peric1 SCLK_UART2>;
clock-names = "uart", "clk_uart_baud0";
pinctrl-names = "default";
pinctrl-0 = <&serial2_bus>;
psci {
compatible = "arm,psci";
method = "smc";
cpu_suspend = <0xC4000001>;
cpu_off = <0x84000002>;
cpu_on = <0xC4000003>;
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
ramoops@92000000 {
compatible = "ramoops";
reg = <0 0x92000000 0 0x8000>;
record-size = <0x4000>;
console-size = <0x4000>;
};
};
soc: soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0 0 0x18000000>;
gic: interrupt-controller@10200000 {
compatible = "arm,cortex-a15-gic";
#interrupt-cells = <3>;
interrupt-controller;
reg = <0x10201000 0x1000>,
<0x10202000 0x1000>,
<0x10204000 0x2000>,
<0x10206000 0x2000>;
interrupts = <GIC_PPI 9 0xf04>;
};
mct: mct@10040000 {
compatible = "samsung,exynos4210-mct";
reg = <0x10040000 0x800>;
interrupts = <GIC_SPI 455 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 456 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 457 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 458 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 459 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 460 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 461 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 462 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 463 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>;
// TODO clocks
//clocks = <&xxti>, <&cmu_peris CLK_PCLK_MCT>;
//clock-names = "fin_pll", "mct";
};
};
chipid@10000000 {
compatible = "samsung,exynos850-chipid";
reg = <0x0 0x10000000 0x100>;
};
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13
(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 14
(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 11
(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>,
<GIC_PPI 10
(GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_LOW)>;
clock-frequency = <26000000>;
use-clocksource-only;
use-physical-timer;
};
};
+25
View File
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Samsung Exynos9820 SoC device tree source
*
*/
/dts-v1/;
#include "exynos9820.dtsi"
/ {
compatible = "samsung,exynos9820";
aliases {
console = &uart0;
};
chosen {
stdout-path = &uart0;
};
};
&fin_pll {
clock-frequency = <26000000>;
};
+113
View File
@@ -0,0 +1,113 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Samsung Exynos 9820 SoC device tree source
*
* Copyright (C) 2020 Dzmitry Sankouski (dsankouski@gmail.com)
* Copyright (C) 2020 Ivaylo Ivanov <ivo.ivanov@null.net>
*/
/dts-v1/;
#include "skeleton.dtsi"
#include <dt-bindings/interrupt-controller/arm-gic.h>
/ {
compatible = "samsung,exynos9820";
aliases {
pinctrl6 = &pinctrl_6;
};
fin_pll: xxti {
compatible = "fixed-clock";
clock-output-names = "fin_pll";
u-boot,dm-pre-reloc;
#clock-cells = <0>;
};
gic: interrupt-controller@10100000 {
compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
#interrupt-cells = <3>;
interrupt-controller;
reg = <0x0 0x10101000 0x1000 0x0 0x10102000 0x1000 0x0 0x10104000 0x2000 0x0 0x10106000 0x2000>;
interrupts = <0x1 0x9 0xf04>;
#linux,phandle = <0x1>;
#phandle = <0x1>;
};
/* PERIC0 */
pinctrl_6: pinctrl@10830000 {
compatible = "samsung,exynos9820-pinctrl";
reg = <0x0 0x10830000 0x1000>;
interrupts = <0x0 0x197 0x0>;
gpp4: gpp4 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
gpp5: gpp5 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
gpp6: gpp6 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
gpc0: gpc0 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
gpc1: gpc1 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
gpd0: gpd0 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
gpg3: gpg3 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
gph0: gph0 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
gph1: gph1 {
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
};
/* UART_DEBUG */
uart0: serial@10430000 {
compatible = "samsung,exynos4210-uart";
reg = <0x10430000 0x100>;
u-boot,dm-pre-reloc;
};
};
@@ -1,34 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2020 Compass Electronics Group, LLC
* Copyright 2021 LogicPD dba Beacon EmbeddedWorks
*/
/ {
soc {
u-boot,dm-pre-reloc;
};
};
&cpg {
u-boot,dm-pre-reloc;
};
&extal_clk {
u-boot,dm-pre-reloc;
};
&prr {
u-boot,dm-pre-reloc;
};
&extalr_clk {
u-boot,dm-pre-reloc;
};
&sdhi0 {
/delete-property/ cd-gpios;
};
&sdhi2 {
status = "disabled";
};
#include "rz-g2-beacon-u-boot.dtsi"
@@ -21,6 +21,9 @@
serial4 = &hscif2;
serial5 = &scif5;
ethernet0 = &avb;
mmc0 = &sdhi3;
mmc1 = &sdhi0;
mmc2 = &sdhi2;
};
chosen {
@@ -1,34 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2020 Compass Electronics Group, LLC
* Copyright 2021 LogicPD dba Beacon EmbeddedWorks
*/
/ {
soc {
u-boot,dm-pre-reloc;
};
};
&cpg {
u-boot,dm-pre-reloc;
};
&extal_clk {
u-boot,dm-pre-reloc;
};
&prr {
u-boot,dm-pre-reloc;
};
&extalr_clk {
u-boot,dm-pre-reloc;
};
&sdhi0 {
/delete-property/ cd-gpios;
};
&sdhi2 {
status = "disabled";
};
#include "rz-g2-beacon-u-boot.dtsi"
@@ -22,6 +22,9 @@
serial5 = &scif5;
serial6 = &scif4;
ethernet0 = &avb;
mmc0 = &sdhi3;
mmc1 = &sdhi0;
mmc2 = &sdhi2;
};
chosen {
@@ -1,44 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2020 Compass Electronics Group, LLC
* Copyright 2021 LogicPD dba Beacon EmbeddedWorks
*/
/ {
soc {
u-boot,dm-pre-reloc;
};
};
&cpg {
u-boot,dm-pre-reloc;
};
&extal_clk {
u-boot,dm-pre-reloc;
};
&prr {
u-boot,dm-pre-reloc;
};
&extalr_clk {
u-boot,dm-pre-reloc;
};
&sdhi0 {
/delete-property/ cd-gpios;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr104;
max-frequency = <208000000>;
};
&sdhi2 {
status = "disabled";
};
&sdhi3 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
};
#include "rz-g2-beacon-u-boot.dtsi"
@@ -22,6 +22,9 @@
serial5 = &scif5;
serial6 = &scif4;
ethernet0 = &avb;
mmc0 = &sdhi3;
mmc1 = &sdhi0;
mmc2 = &sdhi2;
};
chosen {
+75
View File
@@ -0,0 +1,75 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright 2021 LogicPD dba Beacon EmbeddedWorks
*/
/ {
aliases {
spi0 = &rpc;
};
soc {
u-boot,dm-pre-reloc;
};
};
&cpg {
u-boot,dm-pre-reloc;
};
&ehci0 {
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&versaclock5 3>;
};
&ehci1 {
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&versaclock5 3>;
};
&extal_clk {
u-boot,dm-pre-reloc;
};
&extalr_clk {
u-boot,dm-pre-reloc;
};
&prr {
u-boot,dm-pre-reloc;
};
&rpc {
compatible = "renesas,rcar-gen3-rpc";
num-cs = <1>;
spi-max-frequency = <40000000>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
flash0: spi-flash@0 {
#address-cells = <1>;
#size-cells = <1>;
reg = <0>;
compatible = "spi-flash", "jedec,spi-nor";
spi-max-frequency = <40000000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
};
};
&sdhi0 {
/delete-property/ cd-gpios;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr104;
max-frequency = <208000000>;
};
&sdhi2 {
status = "disabled";
};
&sdhi3 {
mmc-ddr-1_8v;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
};
@@ -19,6 +19,17 @@
};
};
&ethernet0 {
mdio0 {
ethernet-phy@7 {
reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
reset-assert-us = <11000>;
reset-deassert-us = <1000>;
};
};
};
&sdmmc1 {
u-boot,dm-spl;
};
+1 -1
View File
@@ -13,7 +13,7 @@
/ {
aliases {
mmc0 = &mmc0;
#if CONFIG_MMC_SUNXI_EXTRA_SLOT == 2
#if CONFIG_MMC_SUNXI_SLOT_EXTRA == 2
mmc1 = &mmc2;
#endif
};
+221
View File
@@ -0,0 +1,221 @@
// SPDX-License-Identifier: GPL-2.0
/*
* dts file for Xilinx ZynqMP DLC21 revA
*
* (C) Copyright 2019 - 2021, Xilinx, Inc.
*
* Michal Simek <michal.simek@xilinx.com>
*/
/dts-v1/;
#include "zynqmp.dtsi"
#include "zynqmp-clk-ccf.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/phy/phy.h>
#include <include/dt-bindings/gpio/gpio.h>
/ {
model = "Smartlynq+ DLC21 RevA";
compatible = "xlnx,zynqmp-dlc21-revA", "xlnx,zynqmp-dlc21",
"xlnx,zynqmp";
aliases {
ethernet0 = &gem0;
gpio0 = &gpio;
i2c0 = &i2c0;
mmc0 = &sdhci0;
mmc1 = &sdhci1;
rtc0 = &rtc;
serial0 = &uart0;
serial2 = &dcc;
usb0 = &usb0;
usb1 = &usb1;
spi0 = &spi0;
nvmem0 = &eeprom;
};
chosen {
bootargs = "earlycon";
stdout-path = "serial0:115200n8";
};
memory@0 {
device_type = "memory";
reg = <0 0 0 0x80000000>, <0x8 0 0x3 0x80000000>;
};
si5332_1: si5332_1 { /* clk0_sgmii - u142 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <125000000>;
};
si5332_2: si5332_2 { /* clk1_usb - u142 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <26000000>;
};
};
&sdhci0 { /* emmc MIO 13-23 - with some settings 16GB */
status = "okay";
non-removable;
disable-wp;
bus-width = <8>;
xlnx,mio_bank = <0>;
};
&sdhci1 { /* sd1 MIO45-51 cd in place */
status = "okay";
no-1-8-v;
disable-wp;
xlnx,mio_bank = <1>;
};
&psgtr {
status = "okay";
/* sgmii, usb3 */
clocks = <&si5332_1>, <&si5332_2>;
clock-names = "ref0", "ref1";
};
&uart0 { /* uart0 MIO38-39 */
status = "okay";
u-boot,dm-pre-reloc;
};
&gem0 {
status = "okay";
phy-handle = <&phy0>;
phy-mode = "sgmii"; /* DTG generates this properly 1512 */
is-internal-pcspma;
/* phy-reset-gpios = <&gpio 142 GPIO_ACTIVE_LOW>; */
phy0: ethernet-phy@0 {
reg = <0>;
};
};
&gpio {
status = "okay";
gpio-line-names = "", "", "", "", "", /* 0 - 4 */
"", "", "", "", "", /* 5 - 9 */
"", "", "", "EMMC_DAT0", "EMMC_DAT1", /* 10 - 14 */
"EMMC_DAT2", "EMMC_DAT3", "EMMC_DAT4", "EMMC_DAT5", "EMMC_DAT6", /* 15 - 19 */
"EMMC_DAT7", "EMMC_CMD", "EMMC_CLK", "EMMC_RST_B", "", /* 20 - 24 */
"", "DISP_SCL", "DISP_DC_B", "DISP_RES_B", "DISP_CS_B", /* 25 - 29 */
"", "DISP_SDI", "SYSTEM_RST_R_B", "", "I2C0_SCL", /* 30 - 34 */
"I2C0_SDA", "", "", "UART0_RXD_IN", "UART0_TXD_OUT", /* 35 - 39 */
"", "", "ETH_RESET_B", "", "", /* 40 - 44 */
"SD1_CD_B", "SD1_DATA0", "SD1_DATA1", "SD1_DATA2", "SD1_DATA3", /* 45 - 49 */
"SD1_CMD", "SD1_CLK", "USB0_CLK", "USB0_DIR", "USB0_DATA2", /* 50 - 54 */
"USB0_NXT", "USB0_DATA0", "USB0_DATA1", "USB0_STP", "USB0_DATA3", /* 55 - 59 */
"USB0_DATA4", "USB0_DATA5", "USB0_DATA6", "USB0_DATA7", "USB1_CLK", /* 60 - 64 */
"USB1_DIR", "USB1_DATA2", "USB1_NXT", "USB1_DATA0", "USB1_DATA1", /* 65 - 69 */
"USB1_STP", "USB1_DATA3", "USB1_DATA4", "USB1_DATA5", "USB1_DATA6", /* 70 - 74 */
"USB1_DATA7", "ETH_MDC", "ETH_MDIO", /* 75 - 77, MIO end and EMIO start */
"", "", /* 78 - 79 */
"", "", "", "", "", /* 80 - 84 */
"", "", "", "", "", /* 85 -89 */
"", "", "", "", "", /* 90 - 94 */
"", "VCCO_500_RBIAS", "VCCO_501_RBIAS", "VCCO_502_RBIAS", "VCCO_500_RBIAS_LED", /* 95 - 99 */
"VCCO_501_RBIAS_LED", "VCCO_502_RBIAS_LED", "SYSCTLR_VCCINT_EN", "SYSCTLR_VCC_IO_SOC_EN", "SYSCTLR_VCC_PMC_EN", /* 100 - 104 */
"", "", "", "", "", /* 105 - 109 */
"SYSCTLR_VCCO_500_EN", "SYSCTLR_VCCO_501_EN", "SYSCTLR_VCCO_502_EN", "SYSCTLR_VCCO_503_EN", "SYSCTLR_VCC1V8_EN", /* 110 - 114 */
"SYSCTLR_VCC3V3_EN", "SYSCTLR_VCC1V2_DDR4_EN", "SYSCTLR_VCC1V1_LP4_EN", "SYSCTLR_VDD1_1V8_LP4_EN", "SYSCTLR_VADJ_FMC_EN", /* 115 - 119 */
"", "", "", "SYSCTLR_UTIL_1V13_EN", "SYSCTLR_UTIL_1V8_EN", /* 120 - 124 */
"SYSCTLR_UTIL_2V5_EN", "", "", "", "", /* 125 - 129 */
"", "", "SYSCTLR_USBC_SBU1", "SYSCTLR_USBC_SBU2", "", /* 130 - 134 */
"", "SYSCTLR_MIC2005_EN_B", "SYSCTLR_MIC2005_FAULT_B", "SYSCTLR_TUSB320_INT_B", "SYSCTLR_TUSB320_ID", /* 135 - 139 */
"", "", "SYSCTLR_ETH_RESET_B", "", "", /* 140 - 144 */
"", "", "", "", "", /* 145 - 149 */
"", "", "", "", "", /* 150 - 154 */
"", "", "", "", "", /* 155 - 159 */
"", "", "", "", "", /* 160 - 164 */
"", "", "", "", "", /* 165 - 169 */
"", "", "", ""; /* 170 - 174 */
};
&i2c0 { /* MIO34/35 */
status = "okay";
clock-frequency = <400000>;
jtag_vref: mcp4725@62 {
compatible = "microchip,mcp4725";
reg = <0x62>;
vref-millivolt = <3300>;
};
eeprom: eeprom@50 { /* u46 */
compatible = "atmel,24c32";
reg = <0x50>;
};
/* u138 - TUSB320IRWBR - for USB-C */
};
&usb0 {
status = "okay";
xlnx,usb-polarity = <0>;
xlnx,usb-reset-mode = <0>;
};
&dwc3_0 {
status = "okay";
dr_mode = "peripheral";
snps,dis_u2_susphy_quirk;
snps,dis_u3_susphy_quirk;
maximum-speed = "super-speed";
phy-names = "usb3-phy";
phys = <&psgtr 1 PHY_TYPE_USB3 0 1>;
};
&usb1 {
status = "disabled"; /* Any unknown issue with USB-C */
xlnx,usb-polarity = <0>;
xlnx,usb-reset-mode = <0>;
};
&dwc3_1 {
/delete-property/ phy-names ;
/delete-property/ phys ;
dr_mode = "host";
maximum-speed = "high-speed";
snps,dis_u2_susphy_quirk ;
snps,dis_u3_susphy_quirk ;
status = "okay";
};
&xilinx_ams {
status = "okay";
};
&ams_ps {
status = "okay";
};
&ams_pl {
status = "okay";
};
&spi0 {
status = "okay";
is-decoded-cs = <0>;
num-cs = <1>;
u-boot,dm-pre-reloc;
displayspi@0 {
compatible = "syncoam,seps525";
u-boot,dm-pre-reloc;
reg = <0>;
status = "okay";
spi-max-frequency = <10000000>;
spi-cpol;
spi-cpha;
rotate = <0>;
fps = <50>;
buswidth = <8>;
txbuflen = <64000>;
reset-gpios = <&gpio 0x1c GPIO_ACTIVE_LOW>;
dc-gpios = <&gpio 0x1b GPIO_ACTIVE_HIGH>;
debug = <0>;
};
};
+1 -1
View File
@@ -46,7 +46,7 @@
si5332_1: si5332_1 { /* clk0_sgmii - u142 */
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <33333333>; /* FIXME */
clock-frequency = <125000000>;
};
si5332_2: si5332_2 { /* clk1_usb - u142 */
+4
View File
@@ -104,6 +104,10 @@ ENTRY(_main)
bic sp, x0, #0xf /* 16-byte alignment for ABI compliance */
ldr x18, [x18, #GD_NEW_GD] /* x18 <- gd->new_gd */
/* Skip relocation in case gd->gd_flags & GD_FLG_SKIP_RELOC */
ldr x0, [x18, #GD_FLAGS] /* x0 <- gd->flags */
tbnz x0, 11, relocation_return /* GD_FLG_SKIP_RELOC is bit 11 */
adr lr, relocation_return
#if CONFIG_POSITION_INDEPENDENT
/* Add in link-vs-runtime offset */
+1 -1
View File
@@ -210,7 +210,7 @@ ENTRY(memcpy)
orr r9, r9, ip, lspush #\push
mov ip, ip, lspull #\pull
orr ip, ip, lr, lspush #\push
str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, , abort=19f
str8w r0, r3, r4, r5, r6, r7, r8, r9, ip, abort=19f
bge 12b
PLD( cmn r2, #96 )
PLD( bge 13b )
+29
View File
@@ -45,6 +45,16 @@ config ARCH_EXYNOS7
Cortex-A53 CPU (and some in a big.LITTLE configuration). There are
multiple SoCs in this family including Exynos7420.
config ARCH_EXYNOS9
bool "Exynos9 SoC family"
select ARM64
select BLK
select DM_MMC
help
Samsung Exynos9 SoC family are based on ARM Cortex-A77 CPU,
Cortex-A73 CPU, Cortex-A55 CPU, Cortex-A53 CPU or Custom Mongoose CPU.
There are multiple SoCs in this family including Exynos8995 and Exynos9820.
endchoice
if ARCH_EXYNOS4
@@ -181,6 +191,24 @@ config TARGET_A3Y17LTE
endchoice
endif
if ARCH_EXYNOS9
choice
prompt "EXYNOS9 board select"
config TARGET_BEYOND
bool "BEYOND board"
select ARM64
select ARMV8_MULTIENTRY
select CLK_EXYNOS
select OF_CONTROL
select PINCTRL
select PINCTRL_EXYNOS9
select SUPPORT_SPL
endchoice
endif
config SYS_SOC
default "exynos"
@@ -195,6 +223,7 @@ source "board/samsung/smdk5250/Kconfig"
source "board/samsung/smdk5420/Kconfig"
source "board/samsung/espresso7420/Kconfig"
source "board/samsung/axy17lte/Kconfig"
source "board/samsung/beyond/Kconfig"
config SPL_LDSCRIPT
default "board/samsung/common/exynos-uboot-spl.lds" if ARCH_EXYNOS5 || ARCH_EXYNOS4
+38
View File
@@ -95,4 +95,42 @@ static struct mm_region exynos7880_mem_map[] = {
};
struct mm_region *mem_map = exynos7880_mem_map;
#elif CONFIG_IS_ENABLED(EXYNOS9820)
static struct mm_region exynos9820_mem_map[] = {
{
.virt = 0x10000000UL,
.phys = 0x10000000UL,
.size = 0x10000000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
PTE_BLOCK_NON_SHARE |
PTE_BLOCK_PXN | PTE_BLOCK_UXN,
},
{
.virt = 0x80000000UL,
.phys = 0x80000000UL,
.size = 0x3C800000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE,
},
{
.virt = 0xC0000000UL,
.phys = 0xC0000000UL,
.size = 0x40000000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE,
},
{
.virt = 0x80000000UL,
.phys = 0x80000000UL,
.size = 0x80000000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE,
},
{
/* List terminator */
},
};
struct mm_region *mem_map = exynos9820_mem_map;
#endif
+1 -1
View File
@@ -10,7 +10,7 @@
#include <asm/io.h>
#include <asm/system.h>
#ifdef CONFIG_TARGET_ESPRESSO7420
#if defined(CONFIG_TARGET_ESPRESSO7420) || defined (CONFIG_EXYNOS9820)
/*
* Exynos7420 uses CPU0 of Cluster-1 as boot CPU. Due to this, branch_if_master
* fails to identify as the boot CPU as the master CPU. As temporary workaround,
+2 -2
View File
@@ -569,7 +569,7 @@ config TARGET_KP_IMX6Q_TPC
imply CMD_SPL
config TARGET_TQMA6
bool "TQ Systems TQMa6 board"
bool "TQ-Systems TQMa6 board"
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select MXC_SPI
@@ -688,7 +688,7 @@ source "board/somlabs/visionsom-6ull/Kconfig"
source "board/technexion/pico-imx6/Kconfig"
source "board/technexion/pico-imx6ul/Kconfig"
source "board/tbs/tbs2910/Kconfig"
source "board/tqc/tqma6/Kconfig"
source "board/tq/tqma6/Kconfig"
source "board/toradex/apalis_imx6/Kconfig"
source "board/toradex/colibri_imx6/Kconfig"
source "board/toradex/colibri-imx6ull/Kconfig"
+9
View File
@@ -25,6 +25,7 @@ config SPL_SPI
default y if ZYNQ_QSPI
config SYS_BOARD
string "Board name"
default "zynqmp"
config SYS_VENDOR
@@ -149,6 +150,14 @@ config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED
Overwrite bootmode selected via boot mode pins to tell SPL what should
be the next boot device.
config SPL_ZYNQMP_RESTORE_JTAG
bool "Restore JTAG"
depends on SPL
help
Booting SPL in secure mode causes the CSU to disable the JTAG interface
even if no eFuses were burnt. This option restores the interface if
possible.
config ZYNQ_SDHCI_MAX_FREQ
default 200000000
+24 -7
View File
@@ -39,20 +39,26 @@
#define RESET_REASON_INTERNAL BIT(1)
#define RESET_REASON_EXTERNAL BIT(0)
#define CRLAPB_DBG_LPD_CTRL_SETUP_CLK 0x01002002
#define CRLAPB_RST_LPD_DBG_RESET 0
struct crlapb_regs {
u32 reserved0[36];
u32 cpu_r5_ctrl; /* 0x90 */
u32 reserved1[37];
u32 reserved1[7];
u32 dbg_lpd_ctrl; /* 0xB0 */
u32 reserved2[29];
u32 timestamp_ref_ctrl; /* 0x128 */
u32 reserved2[53];
u32 reserved3[53];
u32 boot_mode; /* 0x200 */
u32 reserved3_0[7];
u32 reserved4_0[7];
u32 reset_reason; /* 0x220 */
u32 reserved3_1[6];
u32 reserved4_1[6];
u32 rst_lpd_top; /* 0x23C */
u32 reserved4[4];
u32 rst_lpd_dbg; /* 0x240 */
u32 reserved5[3];
u32 boot_pin_ctrl; /* 0x250 */
u32 reserved5[21];
u32 reserved6[21];
};
#define crlapb_base ((struct crlapb_regs *)ZYNQMP_CRL_APB_BASEADDR)
@@ -141,12 +147,23 @@ struct apu_regs {
#define ZYNQMP_SILICON_VER_MASK 0xF
#define ZYNQMP_SILICON_VER_SHIFT 0
#define CSU_JTAG_SEC_GATE_DISABLE GENMASK(7, 0)
#define CSU_JTAG_DAP_ENABLE_DEBUG GENMASK(7, 0)
#define CSU_JTAG_CHAIN_WR_SETUP GENMASK(1, 0)
#define CSU_PCAP_PROG_RELEASE_PL BIT(0)
struct csu_regs {
u32 reserved0[4];
u32 multi_boot;
u32 reserved1[11];
u32 reserved1[7];
u32 jtag_chain_status_wr;
u32 jtag_chain_status;
u32 jtag_sec;
u32 jtag_dap_cfg;
u32 idcode;
u32 version;
u32 reserved2[3055];
u32 pcap_prog;
};
#define csu_base ((struct csu_regs *)ZYNQMP_CSU_BASEADDR)
+13
View File
@@ -40,3 +40,16 @@ config SIFIVE_FU740
imply DM_I2C
imply SYS_I2C_OCORES
imply SPL_I2C
if ENV_IS_IN_SPI_FLASH
config ENV_OFFSET
default 0x505000
config ENV_SIZE
default 0x20000
config ENV_SECT_SIZE
default 0x10000
endif # ENV_IS_IN_SPI_FLASH
@@ -16,6 +16,10 @@
u-boot,dm-spl;
};
config {
u-boot,spl-payload-offset = <0x105000>; /* loader2 @1044KB */
};
hfclk {
u-boot,dm-spl;
};
@@ -30,6 +34,13 @@
clocks = <&rtcclk>;
};
&qspi0 {
u-boot,dm-spl;
flash@0 {
u-boot,dm-spl;
};
};
&spi0 {
mmc@0 {
u-boot,dm-spl;
+133 -393
View File
@@ -1,417 +1,157 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2020 Microchip Technology Inc */
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (C) 2021 Microchip Technology Inc.
* Padmarao Begari <padmarao.begari@microchip.com>
*/
/dts-v1/;
#include "dt-bindings/clock/microchip-mpfs-clock.h"
#include "microchip-mpfs.dtsi"
/* Clock frequency (in Hz) of the rtcclk */
#define RTCCLK_FREQ 1000000
/ {
#address-cells = <2>;
#size-cells = <2>;
model = "Microchip MPFS Icicle Kit";
compatible = "microchip,mpfs-icicle-kit";
model = "Microchip PolarFire-SoC Icicle Kit";
compatible = "microchip,mpfs-icicle-kit", "microchip,mpfs";
aliases {
serial0 = &uart0;
ethernet0 = &emac1;
serial1 = &uart1;
ethernet0 = &mac1;
};
chosen {
stdout-path = "serial0";
stdout-path = "serial1";
};
cpucomplex: cpus {
#address-cells = <1>;
#size-cells = <0>;
cpus {
timebase-frequency = <RTCCLK_FREQ>;
cpu0: cpu@0 {
clocks = <&clkcfg CLK_CPU>;
compatible = "sifive,e51", "sifive,rocket0", "riscv";
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <128>;
i-cache-size = <16384>;
reg = <0>;
riscv,isa = "rv64imac";
status = "disabled";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu0intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu1: cpu@1 {
clocks = <&clkcfg CLK_CPU>;
compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
d-tlb-sets = <1>;
d-tlb-size = <32>;
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <64>;
i-cache-size = <32768>;
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
reg = <1>;
riscv,isa = "rv64imafdc";
tlb-split;
status = "okay";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu1intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu2: cpu@2 {
clocks = <&clkcfg CLK_CPU>;
compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
d-tlb-sets = <1>;
d-tlb-size = <32>;
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <64>;
i-cache-size = <32768>;
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
reg = <2>;
riscv,isa = "rv64imafdc";
tlb-split;
status = "okay";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu2intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu3: cpu@3 {
clocks = <&clkcfg CLK_CPU>;
compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
d-tlb-sets = <1>;
d-tlb-size = <32>;
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <64>;
i-cache-size = <32768>;
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
reg = <3>;
riscv,isa = "rv64imafdc";
tlb-split;
status = "okay";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu3intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu4: cpu@4 {
clocks = <&clkcfg CLK_CPU>;
compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
d-tlb-sets = <1>;
d-tlb-size = <32>;
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <64>;
i-cache-size = <32768>;
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
reg = <4>;
riscv,isa = "rv64imafdc";
tlb-split;
status = "okay";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu4intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
};
refclk: refclk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <600000000>;
clock-output-names = "msspllclk";
};
ddr: memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x40000000>;
clocks = <&clkcfg CLK_DDRC>;
};
soc: soc {
#address-cells = <2>;
#size-cells = <2>;
compatible = "microchip,mpfs-icicle-kit", "simple-bus";
reserved-memory {
ranges;
clint0: clint@2000000 {
compatible = "riscv,clint0";
interrupts-extended = <&cpu0intc 3 &cpu0intc 7
&cpu1intc 3 &cpu1intc 7
&cpu2intc 3 &cpu2intc 7
&cpu3intc 3 &cpu3intc 7
&cpu4intc 3 &cpu4intc 7>;
reg = <0x0 0x2000000 0x0 0x10000>;
reg-names = "control";
clock-frequency = <RTCCLK_FREQ>;
};
cachecontroller: cache-controller@2010000 {
compatible = "sifive,fu540-c000-ccache", "cache";
cache-block-size = <64>;
cache-level = <2>;
cache-sets = <1024>;
cache-size = <2097152>;
cache-unified;
interrupt-parent = <&plic>;
interrupts = <1 2 3>;
reg = <0x0 0x2010000 0x0 0x1000>;
};
plic: interrupt-controller@c000000 {
#interrupt-cells = <1>;
compatible = "sifive,plic-1.0.0";
reg = <0x0 0xc000000 0x0 0x4000000>;
riscv,max-priority = <7>;
riscv,ndev = <186>;
interrupt-controller;
interrupts-extended = <
&cpu0intc 11
&cpu1intc 11 &cpu1intc 9
&cpu2intc 11 &cpu2intc 9
&cpu3intc 11 &cpu3intc 9
&cpu4intc 11 &cpu4intc 9>;
};
uart0: serial@20000000 {
compatible = "ns16550a";
reg = <0x0 0x20000000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <90>;
clocks = <&clkcfg CLK_MMUART0>;
status = "okay";
};
clkcfg: clkcfg@20002000 {
compatible = "microchip,mpfs-clkcfg";
reg = <0x0 0x20002000 0x0 0x1000>;
reg-names = "mss_sysreg";
clocks = <&refclk>;
#clock-cells = <1>;
clock-output-names = "cpu", "axi", "ahb", "envm",
"mac0", "mac1", "mmc", "timer",
"mmuart0", "mmuart1", "mmuart2",
"mmuart3", "mmuart4", "spi0", "spi1",
"i2c0", "i2c1", "can0", "can1", "usb",
"reserved", "rtc", "qspi", "gpio0",
"gpio1", "gpio2", "ddrc", "fic0",
"fic1", "fic2", "fic3", "athena",
"cfm";
};
emmc: mmc@20008000 {
compatible = "cdns,sd4hc";
reg = <0x0 0x20008000 0x0 0x1000>;
interrupt-parent = <&plic>;
interrupts = <88 89>;
pinctrl-names = "default";
clocks = <&clkcfg CLK_MMC>;
bus-width = <4>;
cap-mmc-highspeed;
mmc-ddr-3_3v;
max-frequency = <200000000>;
non-removable;
no-sd;
no-sdio;
voltage-ranges = <3300 3300>;
status = "okay";
};
sdcard: sd@20008000 {
compatible = "cdns,sd4hc";
reg = <0x0 0x20008000 0x0 0x1000>;
interrupt-parent = <&plic>;
interrupts = <88>;
pinctrl-names = "default";
clocks = <&clkcfg CLK_MMC>;
bus-width = <4>;
disable-wp;
cap-sd-highspeed;
card-detect-delay = <200>;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
max-frequency = <200000000>;
status = "disabled";
};
uart1: serial@20100000 {
compatible = "ns16550a";
reg = <0x0 0x20100000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <91>;
clocks = <&clkcfg CLK_MMUART1>;
status = "okay";
};
uart2: serial@20102000 {
compatible = "ns16550a";
reg = <0x0 0x20102000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <92>;
clocks = <&clkcfg CLK_MMUART2>;
status = "okay";
};
uart3: serial@20104000 {
compatible = "ns16550a";
reg = <0x0 0x20104000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <93>;
clocks = <&clkcfg CLK_MMUART3>;
status = "okay";
};
i2c0: i2c@2010a000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "microchip,mpfs-mss-i2c";
reg = <0x0 0x2010a000 0x0 0x1000>;
interrupt-parent = <&plic>;
interrupts = <58>;
clocks = <&clkcfg CLK_I2C0>;
status = "disabled";
};
i2c1: i2c@2010b000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "microchip,mpfs-mss-i2c";
reg = <0x0 0x2010b000 0x0 0x1000>;
interrupt-parent = <&plic>;
interrupts = <61>;
clocks = <&clkcfg CLK_I2C1>;
status = "disabled";
pac193x@10 {
compatible = "microchip,pac1934";
reg = <0x10>;
samp-rate = <64>;
status = "disabled";
ch1: channel0 {
uohms-shunt-res = <10000>;
rail-name = "VDD";
channel_enabled;
};
ch2: channel1 {
uohms-shunt-res = <10000>;
rail-name = "VDDA25";
channel_enabled;
};
ch3: channel2 {
uohms-shunt-res = <10000>;
rail-name = "VDD25";
channel_enabled;
};
ch4: channel3 {
uohms-shunt-res = <10000>;
rail-name = "VDDA";
channel_enabled;
};
};
};
emac0: ethernet@20110000 {
compatible = "microchip,mpfs-mss-gem";
reg = <0x0 0x20110000 0x0 0x2000>;
interrupt-parent = <&plic>;
interrupts = <64 65 66 67>;
local-mac-address = [56 34 00 FC 00 02];
phy-mode = "sgmii";
clocks = <&clkcfg CLK_MAC0>, <&clkcfg CLK_AXI>;
clock-names = "pclk", "hclk";
status = "disabled";
#size-cells = <2>;
#address-cells = <2>;
#address-cells = <1>;
#size-cells = <0>;
phy-handle = <&phy0>;
phy0: ethernet-phy@8 {
reg = <8>;
ti,fifo-depth = <0x01>;
};
fabricbuf0: fabricbuf@0 {
compatible = "shared-dma-pool";
reg = <0x0 0xae000000 0x0 0x2000000>;
label = "fabricbuf0-ddr-c";
};
emac1: ethernet@20112000 {
compatible = "microchip,mpfs-mss-gem";
reg = <0x0 0x20112000 0x0 0x2000>;
interrupt-parent = <&plic>;
interrupts = <70 71 72 73>;
local-mac-address = [00 00 00 00 00 00];
phy-mode = "sgmii";
clocks = <&clkcfg CLK_MAC1>, <&clkcfg CLK_AHB>;
clock-names = "pclk", "hclk";
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
phy-handle = <&phy1>;
phy1: ethernet-phy@9 {
reg = <9>;
ti,fifo-depth = <0x01>;
};
fabricbuf1: fabricbuf@1 {
compatible = "shared-dma-pool";
reg = <0x0 0xc0000000 0x0 0x8000000>;
label = "fabricbuf1-ddr-nc";
};
gpio: gpio@20122000 {
compatible = "microchip,mpfs-mss-gpio";
interrupt-parent = <&plic>;
interrupts = <13 14 15 16 17 18 19 20 21 22 23 24 25 26
27 28 29 30 31 32 33 34 35 36 37 38 39
40 41 42 43 44>;
gpio-controller;
clocks = <&clkcfg CLK_GPIO2>;
reg = <0x00 0x20122000 0x0 0x1000>;
reg-names = "control";
#gpio-cells = <2>;
status = "disabled";
fabricbuf2: fabricbuf@2 {
compatible = "shared-dma-pool";
reg = <0x0 0xd8000000 0x0 0x8000000>;
label = "fabricbuf2-ddr-nc-wcb";
};
};
udmabuf0 {
compatible = "ikwzm,u-dma-buf";
device-name = "udmabuf-ddr-c0";
minor-number = <0>;
size = <0x0 0x2000000>;
memory-region = <&fabricbuf0>;
sync-mode = <3>;
};
udmabuf1 {
compatible = "ikwzm,u-dma-buf";
device-name = "udmabuf-ddr-nc0";
minor-number = <1>;
size = <0x0 0x8000000>;
memory-region = <&fabricbuf1>;
sync-mode = <3>;
};
udmabuf2 {
compatible = "ikwzm,u-dma-buf";
device-name = "udmabuf-ddr-nc-wcb0";
minor-number = <2>;
size = <0x0 0x8000000>;
memory-region = <&fabricbuf2>;
sync-mode = <3>;
};
ddrc_cache_lo: memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x2e000000>;
clocks = <&clkcfg CLK_DDRC>;
status = "okay";
};
ddrc_cache_hi: memory@1000000000 {
device_type = "memory";
reg = <0x10 0x0 0x0 0x40000000>;
clocks = <&clkcfg CLK_DDRC>;
status = "okay";
};
};
&uart1 {
status = "okay";
};
&mmc {
status = "okay";
bus-width = <4>;
disable-wp;
cap-mmc-highspeed;
cap-sd-highspeed;
card-detect-delay = <200>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
sd-uhs-sdr12;
sd-uhs-sdr25;
sd-uhs-sdr50;
sd-uhs-sdr104;
};
&i2c1 {
status = "okay";
clock-frequency = <100000>;
pac193x: pac193x@10 {
compatible = "microchip,pac1934";
reg = <0x10>;
samp-rate = <64>;
status = "okay";
ch1: channel0 {
uohms-shunt-res = <10000>;
rail-name = "VDDREG";
channel_enabled;
};
ch2: channel1 {
uohms-shunt-res = <10000>;
rail-name = "VDDA25";
channel_enabled;
};
ch3: channel2 {
uohms-shunt-res = <10000>;
rail-name = "VDD25";
channel_enabled;
};
ch4: channel3 {
uohms-shunt-res = <10000>;
rail-name = "VDDA_REG";
channel_enabled;
};
};
};
&mac1 {
status = "okay";
phy-mode = "sgmii";
phy-handle = <&phy1>;
phy1: ethernet-phy@9 {
reg = <9>;
ti,fifo-depth = <0x1>;
};
};
+571
View File
@@ -0,0 +1,571 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/* Copyright (c) 2020-2021 Microchip Technology Inc */
#include "dt-bindings/clock/microchip-mpfs-clock.h"
#include "dt-bindings/interrupt-controller/microchip-mpfs-plic.h"
#include "dt-bindings/interrupt-controller/riscv-hart.h"
/ {
#address-cells = <2>;
#size-cells = <2>;
model = "Microchip PolarFire SoC";
compatible = "microchip,mpfs";
chosen {
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu0: cpu@0 {
compatible = "sifive,e51", "sifive,rocket0", "riscv";
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <128>;
i-cache-size = <16384>;
reg = <0>;
riscv,isa = "rv64imac";
clocks = <&clkcfg CLK_CPU>;
status = "disabled";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu0_intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu1: cpu@1 {
compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
d-tlb-sets = <1>;
d-tlb-size = <32>;
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <64>;
i-cache-size = <32768>;
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
reg = <1>;
riscv,isa = "rv64imafdc";
clocks = <&clkcfg CLK_CPU>;
tlb-split;
status = "okay";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu1_intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu2: cpu@2 {
compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
d-tlb-sets = <1>;
d-tlb-size = <32>;
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <64>;
i-cache-size = <32768>;
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
reg = <2>;
riscv,isa = "rv64imafdc";
clocks = <&clkcfg CLK_CPU>;
tlb-split;
status = "okay";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu2_intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu3: cpu@3 {
compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
d-tlb-sets = <1>;
d-tlb-size = <32>;
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <64>;
i-cache-size = <32768>;
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
reg = <3>;
riscv,isa = "rv64imafdc";
clocks = <&clkcfg CLK_CPU>;
tlb-split;
status = "okay";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu3_intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
cpu4: cpu@4 {
compatible = "sifive,u54-mc", "sifive,rocket0", "riscv";
d-cache-block-size = <64>;
d-cache-sets = <64>;
d-cache-size = <32768>;
d-tlb-sets = <1>;
d-tlb-size = <32>;
device_type = "cpu";
i-cache-block-size = <64>;
i-cache-sets = <64>;
i-cache-size = <32768>;
i-tlb-sets = <1>;
i-tlb-size = <32>;
mmu-type = "riscv,sv39";
reg = <4>;
riscv,isa = "rv64imafdc";
clocks = <&clkcfg CLK_CPU>;
tlb-split;
status = "okay";
operating-points = <
/* kHz uV */
600000 1100000
300000 950000
150000 750000
>;
cpu4_intc: interrupt-controller {
#interrupt-cells = <1>;
compatible = "riscv,cpu-intc";
interrupt-controller;
};
};
};
soc {
#address-cells = <2>;
#size-cells = <2>;
compatible = "microchip,mpfs-soc", "simple-bus";
ranges;
clint: clint@2000000 {
compatible = "sifive,clint0";
reg = <0x0 0x2000000 0x0 0xC000>;
interrupts-extended =
<&cpu0_intc HART_INT_M_SOFT &cpu0_intc HART_INT_M_TIMER
&cpu1_intc HART_INT_M_SOFT &cpu1_intc HART_INT_M_TIMER
&cpu2_intc HART_INT_M_SOFT &cpu2_intc HART_INT_M_TIMER
&cpu3_intc HART_INT_M_SOFT &cpu3_intc HART_INT_M_TIMER
&cpu4_intc HART_INT_M_SOFT &cpu4_intc HART_INT_M_TIMER>;
};
cachecontroller: cache-controller@2010000 {
compatible = "sifive,fu540-c000-ccache", "cache";
reg = <0x0 0x2010000 0x0 0x1000>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_L2_METADATA_CORR
PLIC_INT_L2_METADATA_UNCORR
PLIC_INT_L2_DATA_CORR>;
cache-block-size = <64>;
cache-level = <2>;
cache-sets = <1024>;
cache-size = <2097152>;
cache-unified;
};
pdma: pdma@3000000 {
compatible = "microchip,mpfs-pdma-uio","sifive,fu540-c000-pdma";
reg = <0x0 0x3000000 0x0 0x8000>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_DMA_CH0_DONE PLIC_INT_DMA_CH0_ERR
PLIC_INT_DMA_CH1_DONE PLIC_INT_DMA_CH1_ERR
PLIC_INT_DMA_CH2_DONE PLIC_INT_DMA_CH2_ERR
PLIC_INT_DMA_CH3_DONE PLIC_INT_DMA_CH3_ERR>;
#dma-cells = <1>;
};
plic: interrupt-controller@c000000 {
compatible = "sifive,plic-1.0.0";
reg = <0x0 0xc000000 0x0 0x4000000>;
#interrupt-cells = <1>;
riscv,ndev = <186>;
interrupt-controller;
interrupts-extended = <&cpu0_intc HART_INT_M_EXT
&cpu1_intc HART_INT_M_EXT &cpu1_intc HART_INT_S_EXT
&cpu2_intc HART_INT_M_EXT &cpu2_intc HART_INT_S_EXT
&cpu3_intc HART_INT_M_EXT &cpu3_intc HART_INT_S_EXT
&cpu4_intc HART_INT_M_EXT &cpu4_intc HART_INT_S_EXT>;
};
refclk: refclk {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <600000000>;
clock-output-names = "msspllclk";
};
clkcfg: clkcfg@20002000 {
compatible = "microchip,mpfs-clkcfg";
reg = <0x0 0x20002000 0x0 0x1000>;
reg-names = "mss_sysreg";
clocks = <&refclk>;
#clock-cells = <1>;
clock-output-names = "cpu", "axi", "ahb", "envm", /* 0-3 */
"mac0", "mac1", "mmc", "timer", /* 4-7 */
"mmuart0", "mmuart1", "mmuart2", "mmuart3", /* 8-11 */
"mmuart4", "spi0", "spi1", "i2c0", /* 12-15 */
"i2c1", "can0", "can1", "usb", /* 16-19 */
"rsvd", "rtc", "qspi", "gpio0", /* 20-23 */
"gpio1", "gpio2", "ddrc", "fic0", /* 24-27 */
"fic1", "fic2", "fic3", "athena", "cfm"; /* 28-32 */
};
/* Common node entry for eMMC/SD */
mmc: mmc@20008000 {
compatible = "microchip,mpfs-sd4hc","cdns,sd4hc";
reg = <0x0 0x20008000 0x0 0x1000>;
clocks = <&clkcfg CLK_MMC>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MMC_MAIN PLIC_INT_MMC_WAKEUP>;
max-frequency = <200000000>;
status = "disabled";
};
uart0: serial@20000000 {
compatible = "ns16550a";
reg = <0x0 0x20000000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MMUART0>;
clocks = <&clkcfg CLK_MMUART0>;
status = "disabled"; /* Reserved for the HSS */
};
uart1: serial@20100000 {
compatible = "ns16550a";
reg = <0x0 0x20100000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MMUART1>;
clocks = <&clkcfg CLK_MMUART1>;
status = "disabled";
};
uart2: serial@20102000 {
compatible = "ns16550a";
reg = <0x0 0x20102000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MMUART2>;
clocks = <&clkcfg CLK_MMUART2>;
status = "disabled";
};
uart3: serial@20104000 {
compatible = "ns16550a";
reg = <0x0 0x20104000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MMUART3>;
clocks = <&clkcfg CLK_MMUART3>;
status = "disabled";
};
uart4: serial@20106000 {
compatible = "ns16550a";
reg = <0x0 0x20106000 0x0 0x400>;
reg-io-width = <4>;
reg-shift = <2>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MMUART4>;
clocks = <&clkcfg CLK_MMUART4>;
status = "disabled";
};
spi0: spi@20108000 {
compatible = "microchip,mpfs-spi";
reg = <0x0 0x20108000 0x0 0x1000>;
clocks = <&clkcfg CLK_SPI0>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_SPI0>;
num-cs = <8>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
spi1: spi@20109000 {
compatible = "microchip,mpfs-spi";
reg = <0x0 0x20109000 0x0 0x1000>;
clocks = <&clkcfg CLK_SPI1>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_SPI1>;
num-cs = <8>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
i2c0: i2c@2010a000 {
compatible = "microchip,mpfs-i2c";
reg = <0x0 0x2010a000 0x0 0x1000>;
clocks = <&clkcfg CLK_I2C0>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_I2C0_MAIN>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
i2c1: i2c@2010b000 {
compatible = "microchip,mpfs-i2c";
reg = <0x0 0x2010b000 0x0 0x1000>;
clocks = <&clkcfg CLK_I2C1>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_I2C1_MAIN>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
can0: can@2010c000 {
compatible = "microchip,mpfs-can-uio";
reg = <0x0 0x2010c000 0x0 0x1000>;
clocks = <&clkcfg CLK_CAN0>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_CAN0>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
can1: can@2010d000 {
compatible = "microchip,mpfs-can-uio";
reg = <0x0 0x2010d000 0x0 0x1000>;
clocks = <&clkcfg CLK_CAN1>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_CAN1>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mac0: ethernet@20110000 {
compatible = "cdns,macb";
reg = <0x0 0x20110000 0x0 0x2000>;
clocks = <&clkcfg CLK_MAC0>, <&clkcfg CLK_AHB>;
clock-names = "pclk", "hclk";
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MAC0_INT
PLIC_INT_MAC0_QUEUE1
PLIC_INT_MAC0_QUEUE2
PLIC_INT_MAC0_QUEUE3
PLIC_INT_MAC0_EMAC
PLIC_INT_MAC0_MMSL>;
local-mac-address = [00 00 00 00 00 00];
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
mac1: ethernet@20112000 {
compatible = "cdns,macb";
reg = <0x0 0x20112000 0x0 0x2000>;
clocks = <&clkcfg CLK_MAC1>, <&clkcfg CLK_AHB>;
clock-names = "pclk", "hclk";
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MAC1_INT
PLIC_INT_MAC1_QUEUE1
PLIC_INT_MAC1_QUEUE2
PLIC_INT_MAC1_QUEUE3
PLIC_INT_MAC1_EMAC
PLIC_INT_MAC1_MMSL>;
local-mac-address = [00 00 00 00 00 00];
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
gpio0: gpio@20120000 {
compatible = "microchip,mpfs-gpio";
reg = <0x0 0x20120000 0x0 0x1000>;
reg-names = "control";
clocks = <&clkcfg CLK_GPIO0>;
interrupt-parent = <&plic>;
gpio-controller;
#gpio-cells = <2>;
status = "disabled";
};
gpio1: gpio@20121000 {
compatible = "microchip,mpfs-gpio";
reg = <000 0x20121000 0x0 0x1000>;
reg-names = "control";
clocks = <&clkcfg CLK_GPIO1>;
interrupt-parent = <&plic>;
gpio-controller;
#gpio-cells = <2>;
status = "disabled";
};
gpio2: gpio@20122000 {
compatible = "microchip,mpfs-gpio";
reg = <0x0 0x20122000 0x0 0x1000>;
reg-names = "control";
clocks = <&clkcfg CLK_GPIO2>;
interrupt-parent = <&plic>;
gpio-controller;
#gpio-cells = <2>;
status = "disabled";
};
rtc: rtc@20124000 {
compatible = "microchip,mpfs-rtc";
reg = <0x0 0x20124000 0x0 0x1000>;
clocks = <&clkcfg CLK_RTC>;
clock-names = "rtc";
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_RTC_WAKEUP PLIC_INT_RTC_MATCH>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
usb: usb@20201000 {
compatible = "microchip,mpfs-usb-host";
reg = <0x0 0x20201000 0x0 0x1000>;
reg-names = "mc","control";
clocks = <&clkcfg CLK_USB>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_USB_DMA PLIC_INT_USB_MC>;
interrupt-names = "dma","mc";
dr_mode = "host";
status = "disabled";
};
qspi: qspi@21000000 {
compatible = "microchip,mpfs-qspi";
reg = <0x0 0x21000000 0x0 0x1000>;
clocks = <&clkcfg CLK_QSPI>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_QSPI>;
num-cs = <8>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mbox: mailbox@37020000 {
compatible = "microchip,mpfs-mailbox";
reg = <0x0 0x37020000 0x0 0x1000>, <0x0 0x2000318C 0x0 0x40>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_G5C_MESSAGE>;
#mbox-cells = <1>;
status = "disabled";
};
pcie: pcie@2000000000 {
compatible = "microchip,pcie-host-1.0";
#address-cells = <0x3>;
#interrupt-cells = <0x1>;
#size-cells = <0x2>;
device_type = "pci";
reg = <0x20 0x0 0x0 0x8000000 0x0 0x43000000 0x0 0x10000>;
reg-names = "cfg", "apb";
clocks = <&clkcfg CLK_FIC0>, <&clkcfg CLK_FIC1>, <&clkcfg CLK_FIC3>;
clock-names = "fic0", "fic1", "fic3";
bus-range = <0x0 0x7f>;
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_FABRIC_F2H_2>;
interrupt-map = <0 0 0 1 &pcie_intc 0>,
<0 0 0 2 &pcie_intc 1>,
<0 0 0 3 &pcie_intc 2>,
<0 0 0 4 &pcie_intc 3>;
interrupt-map-mask = <0 0 0 7>;
ranges = <0x3000000 0x0 0x8000000 0x20 0x8000000 0x0 0x80000000>;
msi-parent = <&pcie>;
msi-controller;
mchp,axi-m-atr0 = <0x10 0x0>;
status = "disabled";
pcie_intc: legacy-interrupt-controller {
#address-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
};
};
syscontroller: syscontroller {
compatible = "microchip,mpfs-sys-controller";
#address-cells = <1>;
#size-cells = <1>;
mboxes = <&mbox 0>;
};
hwrandom: hwrandom {
compatible = "microchip,mpfs-rng";
#address-cells = <1>;
#size-cells = <1>;
syscontroller = <&syscontroller>;
};
serialnum: serialnum {
compatible = "microchip,mpfs-serial-number";
#address-cells = <1>;
#size-cells = <1>;
syscontroller = <&syscontroller>;
};
fpgadigest: fpgadigest {
compatible = "microchip,mpfs-digest";
#address-cells = <1>;
#size-cells = <1>;
syscontroller = <&syscontroller>;
};
devicecert: cert {
compatible = "microchip,mpfs-device-cert";
#address-cells = <1>;
#size-cells = <1>;
syscontroller = <&syscontroller>;
};
signature: signature {
compatible = "microchip,mpfs-signature";
#address-cells = <1>;
#size-cells = <1>;
syscontroller = <&syscontroller>;
};
};
};
+4 -2
View File
@@ -434,8 +434,10 @@ void __efi_runtime EFIAPI efi_reset_system(
efi_status_t reset_status,
unsigned long data_size, void *reset_data)
{
os_fd_restore();
os_relaunch(os_argv);
if (reset_type == EFI_RESET_SHUTDOWN)
sandbox_exit();
else
sandbox_reset();
}
void sandbox_reset(void)
+4
View File
@@ -498,6 +498,10 @@
compatible = "sandbox,clk-ccf";
};
efi-media {
compatible = "sandbox,efi-media";
};
eth@10002000 {
compatible = "sandbox,eth";
reg = <0x10002000 0x1000>;
+63 -2
View File
@@ -43,6 +43,23 @@ DECLARE_GLOBAL_DATA_PTR;
#define OMNIA_I2C_EEPROM_CHIP_LEN 2
#define OMNIA_I2C_EEPROM_MAGIC 0x0341a034
#define SYS_RSTOUT_MASK MVEBU_REGISTER(0x18260)
#define SYS_RSTOUT_MASK_WD BIT(10)
#define A385_WDT_GLOBAL_CTRL MVEBU_REGISTER(0x20300)
#define A385_WDT_GLOBAL_RATIO_MASK GENMASK(18, 16)
#define A385_WDT_GLOBAL_RATIO_SHIFT 16
#define A385_WDT_GLOBAL_25MHZ BIT(10)
#define A385_WDT_GLOBAL_ENABLE BIT(8)
#define A385_WDT_GLOBAL_STATUS MVEBU_REGISTER(0x20304)
#define A385_WDT_GLOBAL_EXPIRED BIT(31)
#define A385_WDT_DURATION MVEBU_REGISTER(0x20334)
#define A385_WD_RSTOUT_UNMASK MVEBU_REGISTER(0x20704)
#define A385_WD_RSTOUT_UNMASK_GLOBAL BIT(8)
enum mcu_commands {
CMD_GET_STATUS_WORD = 0x01,
CMD_GET_RESET = 0x09,
@@ -141,6 +158,47 @@ static int omnia_mcu_write(u8 cmd, const void *buf, int len)
return dm_i2c_write(chip, cmd, buf, len);
}
static void enable_a385_watchdog(unsigned int timeout_minutes)
{
struct sar_freq_modes sar_freq;
u32 watchdog_freq;
printf("Enabling A385 watchdog with %u minutes timeout...\n",
timeout_minutes);
/*
* Use NBCLK clock (a.k.a. L2 clock) as watchdog input clock with
* its maximal ratio 7 instead of default fixed 25 MHz clock.
* It allows to set watchdog duration up to the 22 minutes.
*/
clrsetbits_32(A385_WDT_GLOBAL_CTRL,
A385_WDT_GLOBAL_25MHZ | A385_WDT_GLOBAL_RATIO_MASK,
7 << A385_WDT_GLOBAL_RATIO_SHIFT);
/*
* Calculate watchdog clock frequency. It is defined by formula:
* freq = NBCLK / 2 / (2 ^ ratio)
* We set ratio to the maximal possible value 7.
*/
get_sar_freq(&sar_freq);
watchdog_freq = sar_freq.nb_clk * 1000000 / 2 / (1 << 7);
/* Set watchdog duration */
writel(timeout_minutes * 60 * watchdog_freq, A385_WDT_DURATION);
/* Clear the watchdog expiration bit */
clrbits_32(A385_WDT_GLOBAL_STATUS, A385_WDT_GLOBAL_EXPIRED);
/* Enable watchdog timer */
setbits_32(A385_WDT_GLOBAL_CTRL, A385_WDT_GLOBAL_ENABLE);
/* Enable reset on watchdog */
setbits_32(A385_WD_RSTOUT_UNMASK, A385_WD_RSTOUT_UNMASK_GLOBAL);
/* Unmask reset for watchdog */
clrbits_32(SYS_RSTOUT_MASK, SYS_RSTOUT_MASK_WD);
}
static bool disable_mcu_watchdog(void)
{
int ret;
@@ -423,10 +481,13 @@ void spl_board_init(void)
{
/*
* If booting from UART, disable MCU watchdog in SPL, since uploading
* U-Boot proper can take too much time and trigger it.
* U-Boot proper can take too much time and trigger it. Instead enable
* A385 watchdog with very high timeout (10 minutes) to prevent hangup.
*/
if (get_boot_device() == BOOT_DEVICE_UART)
if (get_boot_device() == BOOT_DEVICE_UART) {
enable_a385_watchdog(10);
disable_mcu_watchdog();
}
}
int board_init(void)
+10
View File
@@ -4,3 +4,13 @@ S: Maintained
F: board/beacon/beacon-rzg2m/
F: include/configs/beacon-rzg2m.h
F: configs/rzg2_beacon_defconfig
F: arch/arm/dts/beacon-renesom-baseboard.dtsi
F: arch/arm/dts/beacon-renesom-som.dtsi
F: arch/arm/dts/r8a774a1-beacon-rzg2m-kit.dts
F: arch/arm/dts/r8a774b1-beacon-rzg2n-kit.dts
F: arch/arm/dts/r8a774e1-beacon-rzg2h-kit.dts
F: arch/arm/dts/r8a774a1-beacon-rzg2m-kit-u-boot.dtsi
F: arch/arm/dts/r8a774b1-beacon-rzg2n-kit-u-boot.dtsi
F: arch/arm/dts/r8a774e1-beacon-rzg2h-kit-u-boot.dtsi
F: arch/arm/dts/rz-g2-beacon-u-boot.dtsi
+10 -4
View File
@@ -212,34 +212,40 @@ static void board_get_coding_straps(void)
ofnode node;
int i, ret;
brdcode = 0;
ddr3code = 0;
somcode = 0;
node = ofnode_path("/config");
if (!ofnode_valid(node)) {
printf("%s: no /config node?\n", __func__);
return;
}
brdcode = 0;
ddr3code = 0;
somcode = 0;
ret = gpio_request_list_by_name_nodev(node, "dh,som-coding-gpios",
gpio, ARRAY_SIZE(gpio),
GPIOD_IS_IN);
for (i = 0; i < ret; i++)
somcode |= !!dm_gpio_get_value(&(gpio[i])) << i;
gpio_free_list_nodev(gpio, ret);
ret = gpio_request_list_by_name_nodev(node, "dh,ddr3-coding-gpios",
gpio, ARRAY_SIZE(gpio),
GPIOD_IS_IN);
for (i = 0; i < ret; i++)
ddr3code |= !!dm_gpio_get_value(&(gpio[i])) << i;
gpio_free_list_nodev(gpio, ret);
ret = gpio_request_list_by_name_nodev(node, "dh,board-coding-gpios",
gpio, ARRAY_SIZE(gpio),
GPIOD_IS_IN);
for (i = 0; i < ret; i++)
brdcode |= !!dm_gpio_get_value(&(gpio[i])) << i;
gpio_free_list_nodev(gpio, ret);
printf("Code: SoM:rev=%d,ddr3=%d Board:rev=%d\n",
somcode, ddr3code, brdcode);
}
-1
View File
@@ -2,4 +2,3 @@
obj-$(CONFIG_SYS_MTDPARTS_RUNTIME) += qemu_mtdparts.o
obj-$(CONFIG_SET_DFU_ALT_INFO) += qemu_dfu.o
obj-$(CONFIG_EFI_CAPSULE_FIRMWARE_MANAGEMENT) += qemu_capsule.o
+5
View File
@@ -45,5 +45,10 @@ config BOARD_SPECIFIC_OPTIONS # dummy
imply MMC_WRITE
imply MMC_SDHCI
imply MMC_SDHCI_CADENCE
imply MMC_SDHCI_ADMA
imply MMC_HS200_SUPPORT
imply CMD_I2C
imply DM_I2C
imply SYS_I2C_MICROCHIP
endif
+16 -1
View File
@@ -119,7 +119,22 @@ int board_late_init(void)
if (icicle_mac_addr[idx] == ':')
icicle_mac_addr[idx] = ' ';
}
env_set("icicle_mac_addr", icicle_mac_addr);
env_set("icicle_mac_addr0", icicle_mac_addr);
mac_addr[5] = device_serial_number[0] + 1;
icicle_mac_addr[0] = '[';
sprintf(&icicle_mac_addr[1], "%pM", mac_addr);
icicle_mac_addr[18] = ']';
icicle_mac_addr[19] = '\0';
for (idx = 0; idx < 20; idx++) {
if (icicle_mac_addr[idx] == ':')
icicle_mac_addr[idx] = ' ';
}
env_set("icicle_mac_addr1", icicle_mac_addr);
return 0;
}
+6 -1
View File
@@ -72,7 +72,7 @@ struct msg_get_clock_rate {
#endif
/*
* https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
* https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#raspberry-pi-revision-codes
*/
struct rpi_model {
const char *name;
@@ -157,6 +157,11 @@ static const struct rpi_model rpi_models_new_scheme[] = {
DTB_DIR "bcm2711-rpi-4-b.dtb",
true,
},
[0x12] = {
"Zero 2 W",
DTB_DIR "bcm2837-rpi-zero-2.dtb",
false,
},
[0x13] = {
"400",
DTB_DIR "bcm2711-rpi-400.dtb",
+1 -1
View File
@@ -1,6 +1,6 @@
config SYS_CONFIG_NAME
string "Board configuration name"
default "exynos78x0-common.h"
default "exynos78x0-common"
help
This option contains information about board configuration name.
Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header
+18
View File
@@ -0,0 +1,18 @@
if TARGET_BEYOND
config SYS_BOARD
default "beyond"
help
BEYOND is a production board for Galaxy S10/S10e/S10+ phones on Exynos9820 SoC.
config SYS_VENDOR
default "samsung"
config SYS_CONFIG_NAME
default "BEYOND"
config EXYNOS9820
bool "Exynos 9820 SOC support"
default "y"
endif
+7
View File
@@ -0,0 +1,7 @@
Samsung S10/S10e/S10+ (beyond1lte)/(beyond2lte)/(beyond0lte) Board
M: Dani Shum <dani.shum@null.net>
M: Kreato <kreato@null.net>
S: Maintained
F: board/samsung/beyond/
F: include/configs/beyond.h
F: configs/beyond_defconfig.h
+8
View File
@@ -0,0 +1,8 @@
#
# Copyright (C) 2016 Samsung Electronics
# Thomas Abraham <thomas.ab@samsung.com>
#
# SPDX-License-Identifier: GPL-2.0+
#
obj-$(CONFIG_TARGET_BEYOND) += beyond.o
+11
View File
@@ -0,0 +1,11 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Samsung DREAM board based on Exynos 8895 board file
*/
#include <common.h>
int exynos_init(void)
{
return 0;
}
+1
View File
@@ -26,6 +26,7 @@ config SPL_OPENSBI_LOAD_ADDR
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select SIFIVE_FU740
select ENV_IS_IN_SPI_FLASH
select SUPPORT_SPL
select RESET_SIFIVE
select BINMAN
+3
View File
@@ -22,6 +22,7 @@
#define GEM_PHY_RESET SIFIVE_GENERIC_GPIO_NR(0, 12)
#define MODE_SELECT_REG 0x1000
#define MODE_SELECT_SPI 0x6
#define MODE_SELECT_SD 0xb
#define MODE_SELECT_MASK GENMASK(3, 0)
@@ -123,6 +124,8 @@ u32 spl_boot_device(void)
u32 boot_device = mode_select & MODE_SELECT_MASK;
switch (boot_device) {
case MODE_SELECT_SPI:
return BOOT_DEVICE_SPI;
case MODE_SELECT_SD:
return BOOT_DEVICE_MMC1;
default:
@@ -82,6 +82,8 @@ int board_init(void)
{
gd->bd->bi_boot_params = CONFIG_SYS_LOAD_ADDR + LOAD_OFFSET;
gd->env_addr = (ulong)&default_environment[0];
synquacer_setup_scbm_smmu();
return 0;
+1 -7
View File
@@ -698,13 +698,7 @@ int g_dnl_board_usb_cable_connected(void)
return ret;
}
ret = sun4i_usb_phy_vbus_detect(&phy);
if (ret == 1) {
pr_err("A charger is plugged into the OTG\n");
return -ENODEV;
}
return ret;
return sun4i_usb_phy_vbus_detect(&phy);
}
#endif
@@ -4,7 +4,7 @@ config SYS_BOARD
default "tqma6"
config SYS_VENDOR
default "tqc"
default "tq"
config SYS_CONFIG_NAME
default "tqma6"
@@ -89,8 +89,8 @@ config SYS_TEXT_BASE
default 0x4fc00000 if TQMA6Q || TQMA6DL
config IMX_CONFIG
default "board/tqc/tqma6/tqma6q.cfg" if TQMA6Q
default "board/tqc/tqma6/tqma6dl.cfg" if TQMA6DL
default "board/tqc/tqma6/tqma6s.cfg" if TQMA6S
default "board/tq/tqma6/tqma6q.cfg" if TQMA6Q
default "board/tq/tqma6/tqma6dl.cfg" if TQMA6DL
default "board/tq/tqma6/tqma6s.cfg" if TQMA6S
endif
@@ -1,6 +1,6 @@
TQ SYSTEMS TQMA6 BOARD
TQ-SYSTEMS TQMA6 BOARD
M: Markus Niebel <Markus.Niebel@tq-group.com>
S: Maintained
F: board/tqc/tqma6/
F: board/tq/tqma6/
F: include/configs/tqma6.h
F: configs/tqma6*_defconfig
File renamed without changes.
@@ -1,7 +1,7 @@
U-Boot for the TQ Systems TQMa6 modules
U-Boot for the TQ-Systems TQMa6 modules
This file contains information for the port of
U-Boot to the TQ Systems TQMa6 modules.
U-Boot to the TQ-Systems TQMa6 modules.
1. Boot source
--------------
@@ -14,7 +14,7 @@ The following boot source is supported:
2. Building
------------
To build U-Boot for the TQ Systems TQMa6 modules:
To build U-Boot for the TQ-Systems TQMa6 modules:
make tqma6<x>_<baseboard>_<boot>_config
make
File renamed without changes.
@@ -3,7 +3,7 @@
* Copyright (C) 2012 Freescale Semiconductor, Inc.
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*
* Copyright (C) 2013, 2014 TQ Systems (ported SabreSD to TQMa6x)
* Copyright (C) 2013, 2014 TQ-Systems (ported SabreSD to TQMa6x)
* Author: Markus Niebel <markus.niebel@tq-group.com>
*/
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2013, 2014 TQ Systems
* Copyright (C) 2013, 2014 TQ-Systems
* Author: Markus Niebel <markus.niebel@tq-group.com>
*/
@@ -3,7 +3,7 @@
* Copyright (C) 2012 Freescale Semiconductor, Inc.
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*
* Copyright (C) 2013, 2014 TQ Systems (ported SabreSD to TQMa6x)
* Copyright (C) 2013, 2014 TQ-Systems (ported SabreSD to TQMa6x)
* Author: Markus Niebel <markus.niebel@tq-group.com>
*/
@@ -3,7 +3,7 @@
* Copyright (C) 2012 Freescale Semiconductor, Inc.
* Author: Fabio Estevam <fabio.estevam@freescale.com>
*
* Copyright (C) 2013, 2014 TQ Systems (ported SabreSD to TQMa6x)
* Copyright (C) 2013, 2014 TQ-Systems (ported SabreSD to TQMa6x)
* Author: Markus Niebel <markus.niebel@tq-group.com>
*
* Copyright (C) 2015 Stefan Roese <sr@denx.de>
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,922 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* (c) Copyright 2015 Xilinx, Inc. All rights reserved.
*/
#include <asm/arch/psu_init_gpl.h>
#include <xil_io.h>
static unsigned long psu_pll_init_data(void)
{
psu_mask_write(0xFF5E0034, 0xFE7FEDEFU, 0x7E4B0C62U);
psu_mask_write(0xFF5E0030, 0x00717F00U, 0x00014000U);
psu_mask_write(0xFF5E0030, 0x00000008U, 0x00000008U);
psu_mask_write(0xFF5E0030, 0x00000001U, 0x00000001U);
psu_mask_write(0xFF5E0030, 0x00000001U, 0x00000000U);
mask_poll(0xFF5E0040, 0x00000002U);
psu_mask_write(0xFF5E0030, 0x00000008U, 0x00000000U);
psu_mask_write(0xFF5E0048, 0x00003F00U, 0x00000200U);
psu_mask_write(0xFF5E0038, 0x8000FFFFU, 0x00000000U);
psu_mask_write(0xFF5E0108, 0x013F3F07U, 0x01012300U);
psu_mask_write(0xFF5E0024, 0xFE7FEDEFU, 0x7E4B0C82U);
psu_mask_write(0xFF5E0020, 0x00717F00U, 0x00015A00U);
psu_mask_write(0xFF5E0020, 0x00000008U, 0x00000008U);
psu_mask_write(0xFF5E0020, 0x00000001U, 0x00000001U);
psu_mask_write(0xFF5E0020, 0x00000001U, 0x00000000U);
mask_poll(0xFF5E0040, 0x00000001U);
psu_mask_write(0xFF5E0020, 0x00000008U, 0x00000000U);
psu_mask_write(0xFF5E0044, 0x00003F00U, 0x00000300U);
psu_mask_write(0xFF5E0028, 0x8000FFFFU, 0x00000000U);
psu_mask_write(0xFD1A0024, 0xFE7FEDEFU, 0x7E4B0C62U);
psu_mask_write(0xFD1A0020, 0x00717F00U, 0x00014800U);
psu_mask_write(0xFD1A0020, 0x00000008U, 0x00000008U);
psu_mask_write(0xFD1A0020, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD1A0020, 0x00000001U, 0x00000000U);
mask_poll(0xFD1A0044, 0x00000001U);
psu_mask_write(0xFD1A0020, 0x00000008U, 0x00000000U);
psu_mask_write(0xFD1A0048, 0x00003F00U, 0x00000300U);
psu_mask_write(0xFD1A0028, 0x8000FFFFU, 0x00000000U);
psu_mask_write(0xFD1A0030, 0xFE7FEDEFU, 0x7E4B0C62U);
psu_mask_write(0xFD1A002C, 0x00717F00U, 0x00014000U);
psu_mask_write(0xFD1A002C, 0x00000008U, 0x00000008U);
psu_mask_write(0xFD1A002C, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD1A002C, 0x00000001U, 0x00000000U);
mask_poll(0xFD1A0044, 0x00000002U);
psu_mask_write(0xFD1A002C, 0x00000008U, 0x00000000U);
psu_mask_write(0xFD1A004C, 0x00003F00U, 0x00000200U);
psu_mask_write(0xFD1A0034, 0x8000FFFFU, 0x00000000U);
psu_mask_write(0xFD1A003C, 0xFE7FEDEFU, 0x7E4B0C62U);
psu_mask_write(0xFD1A0038, 0x00717F00U, 0x00014000U);
psu_mask_write(0xFD1A0038, 0x00000008U, 0x00000008U);
psu_mask_write(0xFD1A0038, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD1A0038, 0x00000001U, 0x00000000U);
mask_poll(0xFD1A0044, 0x00000004U);
psu_mask_write(0xFD1A0038, 0x00000008U, 0x00000000U);
psu_mask_write(0xFD1A0050, 0x00003F00U, 0x00000200U);
psu_mask_write(0xFD1A0040, 0x8000FFFFU, 0x00000000U);
return 1;
}
static unsigned long psu_clock_init_data(void)
{
psu_mask_write(0xFF5E0050, 0x063F3F07U, 0x06013C00U);
psu_mask_write(0xFF180360, 0x00000003U, 0x00000001U);
psu_mask_write(0xFF180308, 0x00000006U, 0x00000006U);
psu_mask_write(0xFF5E0100, 0x013F3F07U, 0x01010600U);
psu_mask_write(0xFF5E0060, 0x023F3F07U, 0x02010600U);
psu_mask_write(0xFF5E0064, 0x023F3F07U, 0x02010600U);
psu_mask_write(0xFF5E004C, 0x023F3F07U, 0x02031900U);
psu_mask_write(0xFF5E006C, 0x013F3F07U, 0x01010800U);
psu_mask_write(0xFF5E0070, 0x013F3F07U, 0x01010800U);
psu_mask_write(0xFF18030C, 0x00020003U, 0x00000000U);
psu_mask_write(0xFF5E0074, 0x013F3F07U, 0x01010F00U);
psu_mask_write(0xFF5E0120, 0x013F3F07U, 0x01010F00U);
psu_mask_write(0xFF5E007C, 0x013F3F07U, 0x01010702U);
psu_mask_write(0xFF5E0090, 0x01003F07U, 0x01000302U);
psu_mask_write(0xFF5E009C, 0x01003F07U, 0x01000400U);
psu_mask_write(0xFF5E00A4, 0x01003F07U, 0x01000800U);
psu_mask_write(0xFF5E00A8, 0x01003F07U, 0x01000200U);
psu_mask_write(0xFF5E00AC, 0x01003F07U, 0x01000F02U);
psu_mask_write(0xFF5E00B0, 0x01003F07U, 0x01000602U);
psu_mask_write(0xFF5E00B8, 0x01003F07U, 0x01000200U);
psu_mask_write(0xFF5E00C0, 0x013F3F07U, 0x01010502U);
psu_mask_write(0xFF5E00C4, 0x013F3F07U, 0x01010802U);
psu_mask_write(0xFF5E00C8, 0x013F3F07U, 0x01010402U);
psu_mask_write(0xFF5E00CC, 0x013F3F07U, 0x01030A00U);
psu_mask_write(0xFF5E0108, 0x013F3F07U, 0x01011E02U);
psu_mask_write(0xFF5E0104, 0x00000007U, 0x00000000U);
psu_mask_write(0xFF5E0128, 0x01003F07U, 0x01000104U);
psu_mask_write(0xFD1A0060, 0x03003F07U, 0x03000100U);
psu_mask_write(0xFD1A0068, 0x01003F07U, 0x01000200U);
psu_mask_write(0xFD1A0080, 0x00003F07U, 0x00000200U);
psu_mask_write(0xFD1A0084, 0x07003F07U, 0x07000100U);
psu_mask_write(0xFD1A00B8, 0x01003F07U, 0x01000203U);
psu_mask_write(0xFD1A00BC, 0x01003F07U, 0x01000203U);
psu_mask_write(0xFD1A00C0, 0x01003F07U, 0x01000202U);
psu_mask_write(0xFD1A00C4, 0x01003F07U, 0x01000502U);
psu_mask_write(0xFD1A00F8, 0x00003F07U, 0x00000200U);
psu_mask_write(0xFF180380, 0x000000FFU, 0x00000000U);
psu_mask_write(0xFD610100, 0x00000001U, 0x00000000U);
psu_mask_write(0xFF180300, 0x00000001U, 0x00000000U);
psu_mask_write(0xFF410050, 0x00000001U, 0x00000000U);
return 1;
}
static unsigned long psu_ddr_init_data(void)
{
psu_mask_write(0xFD1A0108, 0x00000008U, 0x00000008U);
psu_mask_write(0xFD070000, 0xE30FBE3DU, 0x43041010U);
psu_mask_write(0xFD070010, 0x8000F03FU, 0x00000030U);
psu_mask_write(0xFD070020, 0x000003F3U, 0x00000200U);
psu_mask_write(0xFD070024, 0xFFFFFFFFU, 0x00800000U);
psu_mask_write(0xFD070030, 0x0000007FU, 0x00000008U);
psu_mask_write(0xFD070034, 0x00FFFF1FU, 0x00408410U);
psu_mask_write(0xFD070050, 0x00F1F1F4U, 0x00210000U);
psu_mask_write(0xFD070054, 0x0FFF0FFFU, 0x00000000U);
psu_mask_write(0xFD070060, 0x00000073U, 0x00000001U);
psu_mask_write(0xFD070064, 0x0FFF83FFU, 0x00818126U);
psu_mask_write(0xFD070070, 0x00000017U, 0x00000010U);
psu_mask_write(0xFD070074, 0x00000003U, 0x00000000U);
psu_mask_write(0xFD0700C4, 0x3F000391U, 0x10000200U);
psu_mask_write(0xFD0700C8, 0x01FF1F3FU, 0x0040051FU);
psu_mask_write(0xFD0700D0, 0xC3FF0FFFU, 0x00020106U);
psu_mask_write(0xFD0700D4, 0x01FF7F0FU, 0x00020000U);
psu_mask_write(0xFD0700D8, 0x0000FF0FU, 0x00002305U);
psu_mask_write(0xFD0700DC, 0xFFFFFFFFU, 0x07300501U);
psu_mask_write(0xFD0700E0, 0xFFFFFFFFU, 0x00200200U);
psu_mask_write(0xFD0700E4, 0x00FF03FFU, 0x00210004U);
psu_mask_write(0xFD0700E8, 0xFFFFFFFFU, 0x00000700U);
psu_mask_write(0xFD0700EC, 0xFFFF0000U, 0x08190000U);
psu_mask_write(0xFD0700F0, 0x0000003FU, 0x00000010U);
psu_mask_write(0xFD0700F4, 0x00000FFFU, 0x0000066FU);
psu_mask_write(0xFD070100, 0x7F3F7F3FU, 0x110C2412U);
psu_mask_write(0xFD070104, 0x001F1F7FU, 0x0004041CU);
psu_mask_write(0xFD070108, 0x3F3F3F3FU, 0x0708060DU);
psu_mask_write(0xFD07010C, 0x3FF3F3FFU, 0x0050400CU);
psu_mask_write(0xFD070110, 0x1F0F0F1FU, 0x08030309U);
psu_mask_write(0xFD070114, 0x0F0F3F1FU, 0x06060403U);
psu_mask_write(0xFD070118, 0x0F0F000FU, 0x01010004U);
psu_mask_write(0xFD07011C, 0x00000F0FU, 0x00000606U);
psu_mask_write(0xFD070120, 0x7F7F7F7FU, 0x04040D0BU);
psu_mask_write(0xFD070124, 0x40070F3FU, 0x0002020BU);
psu_mask_write(0xFD07012C, 0x7F1F031FU, 0x1607010EU);
psu_mask_write(0xFD070130, 0x00030F1FU, 0x00020608U);
psu_mask_write(0xFD070180, 0xF7FF03FFU, 0x81000040U);
psu_mask_write(0xFD070184, 0x3FFFFFFFU, 0x020196E5U);
psu_mask_write(0xFD070190, 0x1FBFBF3FU, 0x048B820BU);
psu_mask_write(0xFD070194, 0xF31F0F0FU, 0x00030304U);
psu_mask_write(0xFD070198, 0x0FF1F1F1U, 0x07000101U);
psu_mask_write(0xFD07019C, 0x000000F1U, 0x00000021U);
psu_mask_write(0xFD0701A0, 0xC3FF03FFU, 0x00400003U);
psu_mask_write(0xFD0701A4, 0x00FF00FFU, 0x00C800FFU);
psu_mask_write(0xFD0701B0, 0x00000007U, 0x00000000U);
psu_mask_write(0xFD0701B4, 0x00003F3FU, 0x00000909U);
psu_mask_write(0xFD0701C0, 0x00000007U, 0x00000001U);
psu_mask_write(0xFD070200, 0x0000001FU, 0x00000018U);
psu_mask_write(0xFD070204, 0x001F1F1FU, 0x001F0909U);
psu_mask_write(0xFD070208, 0x0F0F0F0FU, 0x01010101U);
psu_mask_write(0xFD07020C, 0x0F0F0F0FU, 0x0F010101U);
psu_mask_write(0xFD070210, 0x00000F0FU, 0x00000F0FU);
psu_mask_write(0xFD070214, 0x0F0F0F0FU, 0x070F0707U);
psu_mask_write(0xFD070218, 0x8F0F0F0FU, 0x07070707U);
psu_mask_write(0xFD07021C, 0x00000F0FU, 0x00000F07U);
psu_mask_write(0xFD070220, 0x00001F1FU, 0x00000700U);
psu_mask_write(0xFD070224, 0x0F0F0F0FU, 0x07070707U);
psu_mask_write(0xFD070228, 0x0F0F0F0FU, 0x07070707U);
psu_mask_write(0xFD07022C, 0x0000000FU, 0x00000007U);
psu_mask_write(0xFD070240, 0x0F1F0F7CU, 0x06000600U);
psu_mask_write(0xFD070244, 0x00003333U, 0x00000201U);
psu_mask_write(0xFD070250, 0x7FFF3F07U, 0x01002001U);
psu_mask_write(0xFD070264, 0xFF00FFFFU, 0x08000040U);
psu_mask_write(0xFD07026C, 0xFF00FFFFU, 0x08000040U);
psu_mask_write(0xFD070280, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD070284, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD070288, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD07028C, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD070290, 0x0000FFFFU, 0x00000000U);
psu_mask_write(0xFD070294, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD070300, 0x00000011U, 0x00000001U);
psu_mask_write(0xFD07030C, 0x80000033U, 0x00000000U);
psu_mask_write(0xFD070320, 0x00000001U, 0x00000000U);
psu_mask_write(0xFD070400, 0x00000111U, 0x00000101U);
psu_mask_write(0xFD070404, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD070408, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD070490, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD070494, 0x0033000FU, 0x0020000BU);
psu_mask_write(0xFD070498, 0x07FF07FFU, 0x00000000U);
psu_mask_write(0xFD0704B4, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD0704B8, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD070540, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD070544, 0x03330F0FU, 0x02000B03U);
psu_mask_write(0xFD070548, 0x07FF07FFU, 0x00000000U);
psu_mask_write(0xFD070564, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD070568, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD0705F0, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD0705F4, 0x03330F0FU, 0x02000B03U);
psu_mask_write(0xFD0705F8, 0x07FF07FFU, 0x00000000U);
psu_mask_write(0xFD070614, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD070618, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD0706A0, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD0706A4, 0x0033000FU, 0x00100003U);
psu_mask_write(0xFD0706A8, 0x07FF07FFU, 0x0000004FU);
psu_mask_write(0xFD0706AC, 0x0033000FU, 0x00100003U);
psu_mask_write(0xFD0706B0, 0x000007FFU, 0x0000004FU);
psu_mask_write(0xFD0706C4, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD0706C8, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD070750, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD070754, 0x0033000FU, 0x00100003U);
psu_mask_write(0xFD070758, 0x07FF07FFU, 0x0000004FU);
psu_mask_write(0xFD07075C, 0x0033000FU, 0x00100003U);
psu_mask_write(0xFD070760, 0x000007FFU, 0x0000004FU);
psu_mask_write(0xFD070774, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD070778, 0x000073FFU, 0x0000200FU);
psu_mask_write(0xFD070800, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD070804, 0x0033000FU, 0x00100003U);
psu_mask_write(0xFD070808, 0x07FF07FFU, 0x0000004FU);
psu_mask_write(0xFD07080C, 0x0033000FU, 0x00100003U);
psu_mask_write(0xFD070810, 0x000007FFU, 0x0000004FU);
psu_mask_write(0xFD070F04, 0x000001FFU, 0x00000000U);
psu_mask_write(0xFD070F08, 0x000000FFU, 0x00000000U);
psu_mask_write(0xFD070F0C, 0x000001FFU, 0x00000010U);
psu_mask_write(0xFD070F10, 0x000000FFU, 0x0000000FU);
psu_mask_write(0xFD072190, 0x1FBFBF3FU, 0x07828002U);
psu_mask_write(0xFD1A0108, 0x0000000CU, 0x00000000U);
psu_mask_write(0xFD080010, 0xFFFFFFFFU, 0x07001E00U);
psu_mask_write(0xFD080018, 0xFFFFFFFFU, 0x00F10010U);
psu_mask_write(0xFD08001C, 0xFFFFFFFFU, 0x55AA5480U);
psu_mask_write(0xFD080024, 0xFFFFFFFFU, 0x010100F4U);
psu_mask_write(0xFD080040, 0xFFFFFFFFU, 0x42C21590U);
psu_mask_write(0xFD080044, 0xFFFFFFFFU, 0xD05512C0U);
psu_mask_write(0xFD080068, 0xFFFFFFFFU, 0x01100000U);
psu_mask_write(0xFD080090, 0xFFFFFFFFU, 0x02A04161U);
psu_mask_write(0xFD0800C0, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD0800C4, 0xFFFFFFFFU, 0x000000E0U);
psu_mask_write(0xFD080100, 0xFFFFFFFFU, 0x0800040CU);
psu_mask_write(0xFD080110, 0xFFFFFFFFU, 0x06240F08U);
psu_mask_write(0xFD080114, 0xFFFFFFFFU, 0x28170008U);
psu_mask_write(0xFD080118, 0xFFFFFFFFU, 0x000F0300U);
psu_mask_write(0xFD08011C, 0xFFFFFFFFU, 0x83000800U);
psu_mask_write(0xFD080120, 0xFFFFFFFFU, 0x024B2B07U);
psu_mask_write(0xFD080124, 0xFFFFFFFFU, 0x00370F08U);
psu_mask_write(0xFD080128, 0xFFFFFFFFU, 0x00000E0FU);
psu_mask_write(0xFD080140, 0xFFFFFFFFU, 0x08400020U);
psu_mask_write(0xFD080144, 0xFFFFFFFFU, 0x00000C80U);
psu_mask_write(0xFD080150, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080154, 0xFFFFFFFFU, 0x00000200U);
psu_mask_write(0xFD080180, 0xFFFFFFFFU, 0x00000630U);
psu_mask_write(0xFD080184, 0xFFFFFFFFU, 0x00000501U);
psu_mask_write(0xFD080188, 0xFFFFFFFFU, 0x00000020U);
psu_mask_write(0xFD08018C, 0xFFFFFFFFU, 0x00000200U);
psu_mask_write(0xFD080190, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080194, 0xFFFFFFFFU, 0x00000700U);
psu_mask_write(0xFD080198, 0xFFFFFFFFU, 0x00000819U);
psu_mask_write(0xFD0801AC, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD0801B0, 0xFFFFFFFFU, 0x0000004DU);
psu_mask_write(0xFD0801B4, 0xFFFFFFFFU, 0x00000008U);
psu_mask_write(0xFD0801B8, 0xFFFFFFFFU, 0x0000004DU);
psu_mask_write(0xFD0801D8, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080200, 0xFFFFFFFFU, 0x810091C7U);
psu_mask_write(0xFD080204, 0xFFFFFFFFU, 0x00030236U);
psu_mask_write(0xFD080240, 0xFFFFFFFFU, 0x00141054U);
psu_mask_write(0xFD080250, 0xFFFFFFFFU, 0x00088000U);
psu_mask_write(0xFD080414, 0xFFFFFFFFU, 0x12344000U);
psu_mask_write(0xFD0804F4, 0xFFFFFFFFU, 0x00000005U);
psu_mask_write(0xFD080500, 0xFFFFFFFFU, 0x30000028U);
psu_mask_write(0xFD080508, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD08050C, 0xFFFFFFFFU, 0x00000005U);
psu_mask_write(0xFD080510, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080520, 0xFFFFFFFFU, 0x0300B0CEU);
psu_mask_write(0xFD080528, 0xFFFFFFFFU, 0xF9032019U);
psu_mask_write(0xFD08052C, 0xFFFFFFFFU, 0x07F001E3U);
psu_mask_write(0xFD080544, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080548, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080558, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD08055C, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080560, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080564, 0xFFFFFFFFU, 0x00000000U);
psu_mask_write(0xFD080680, 0xFFFFFFFFU, 0x008AAA58U);
psu_mask_write(0xFD080684, 0xFFFFFFFFU, 0x000079DDU);
psu_mask_write(0xFD080694, 0xFFFFFFFFU, 0x01E10210U);
psu_mask_write(0xFD080698, 0xFFFFFFFFU, 0x01E10000U);
psu_mask_write(0xFD0806A4, 0xFFFFFFFFU, 0x000879DBU);
psu_mask_write(0xFD080700, 0xFFFFFFFFU, 0x40800604U);
psu_mask_write(0xFD080704, 0xFFFFFFFFU, 0x00007FFFU);
psu_mask_write(0xFD08070C, 0xFFFFFFFFU, 0x3F000008U);
psu_mask_write(0xFD080710, 0xFFFFFFFFU, 0x0E00B03CU);
psu_mask_write(0xFD080714, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080718, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD080800, 0xFFFFFFFFU, 0x40800604U);
psu_mask_write(0xFD080804, 0xFFFFFFFFU, 0x00007FFFU);
psu_mask_write(0xFD08080C, 0xFFFFFFFFU, 0x3F000008U);
psu_mask_write(0xFD080810, 0xFFFFFFFFU, 0x0E00B03CU);
psu_mask_write(0xFD080814, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080818, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD080900, 0xFFFFFFFFU, 0x40800604U);
psu_mask_write(0xFD080904, 0xFFFFFFFFU, 0x00007FFFU);
psu_mask_write(0xFD08090C, 0xFFFFFFFFU, 0x3F000008U);
psu_mask_write(0xFD080910, 0xFFFFFFFFU, 0x0E00B00CU);
psu_mask_write(0xFD080914, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080918, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD080A00, 0xFFFFFFFFU, 0x40800604U);
psu_mask_write(0xFD080A04, 0xFFFFFFFFU, 0x00007FFFU);
psu_mask_write(0xFD080A0C, 0xFFFFFFFFU, 0x3F000008U);
psu_mask_write(0xFD080A10, 0xFFFFFFFFU, 0x0E00B00CU);
psu_mask_write(0xFD080A14, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080A18, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD080B00, 0xFFFFFFFFU, 0x80803660U);
psu_mask_write(0xFD080B04, 0xFFFFFFFFU, 0x55556000U);
psu_mask_write(0xFD080B08, 0xFFFFFFFFU, 0xAAAAAAAAU);
psu_mask_write(0xFD080B0C, 0xFFFFFFFFU, 0x0029A4A4U);
psu_mask_write(0xFD080B10, 0xFFFFFFFFU, 0x0C00B000U);
psu_mask_write(0xFD080B14, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080B18, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD080C00, 0xFFFFFFFFU, 0x80803660U);
psu_mask_write(0xFD080C04, 0xFFFFFFFFU, 0x55556000U);
psu_mask_write(0xFD080C08, 0xFFFFFFFFU, 0xAAAAAAAAU);
psu_mask_write(0xFD080C0C, 0xFFFFFFFFU, 0x0029A4A4U);
psu_mask_write(0xFD080C10, 0xFFFFFFFFU, 0x0C00B000U);
psu_mask_write(0xFD080C14, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080C18, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD080D00, 0xFFFFFFFFU, 0x80803660U);
psu_mask_write(0xFD080D04, 0xFFFFFFFFU, 0x55556000U);
psu_mask_write(0xFD080D08, 0xFFFFFFFFU, 0xAAAAAAAAU);
psu_mask_write(0xFD080D0C, 0xFFFFFFFFU, 0x0029A4A4U);
psu_mask_write(0xFD080D10, 0xFFFFFFFFU, 0x0C00B000U);
psu_mask_write(0xFD080D14, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080D18, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD080E00, 0xFFFFFFFFU, 0x80803660U);
psu_mask_write(0xFD080E04, 0xFFFFFFFFU, 0x55556000U);
psu_mask_write(0xFD080E08, 0xFFFFFFFFU, 0xAAAAAAAAU);
psu_mask_write(0xFD080E0C, 0xFFFFFFFFU, 0x0029A4A4U);
psu_mask_write(0xFD080E10, 0xFFFFFFFFU, 0x0C00B000U);
psu_mask_write(0xFD080E14, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080E18, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD080F00, 0xFFFFFFFFU, 0x80803660U);
psu_mask_write(0xFD080F04, 0xFFFFFFFFU, 0x55556000U);
psu_mask_write(0xFD080F08, 0xFFFFFFFFU, 0xAAAAAAAAU);
psu_mask_write(0xFD080F0C, 0xFFFFFFFFU, 0x0029A4A4U);
psu_mask_write(0xFD080F10, 0xFFFFFFFFU, 0x0C00B000U);
psu_mask_write(0xFD080F14, 0xFFFFFFFFU, 0x09094F4FU);
psu_mask_write(0xFD080F18, 0xFFFFFFFFU, 0x09092B2BU);
psu_mask_write(0xFD081400, 0xFFFFFFFFU, 0x2A019FFEU);
psu_mask_write(0xFD081404, 0xFFFFFFFFU, 0x01100000U);
psu_mask_write(0xFD08141C, 0xFFFFFFFFU, 0x01264300U);
psu_mask_write(0xFD08142C, 0xFFFFFFFFU, 0x00041800U);
psu_mask_write(0xFD081430, 0xFFFFFFFFU, 0x70800000U);
psu_mask_write(0xFD081440, 0xFFFFFFFFU, 0x2A019FFEU);
psu_mask_write(0xFD081444, 0xFFFFFFFFU, 0x01100000U);
psu_mask_write(0xFD08145C, 0xFFFFFFFFU, 0x01264300U);
psu_mask_write(0xFD08146C, 0xFFFFFFFFU, 0x00041800U);
psu_mask_write(0xFD081470, 0xFFFFFFFFU, 0x70800000U);
psu_mask_write(0xFD081480, 0xFFFFFFFFU, 0x15019FFEU);
psu_mask_write(0xFD081484, 0xFFFFFFFFU, 0x21100000U);
psu_mask_write(0xFD08149C, 0xFFFFFFFFU, 0x01266300U);
psu_mask_write(0xFD0814AC, 0xFFFFFFFFU, 0x00041800U);
psu_mask_write(0xFD0814B0, 0xFFFFFFFFU, 0x70400000U);
psu_mask_write(0xFD0814C0, 0xFFFFFFFFU, 0x15019FFEU);
psu_mask_write(0xFD0814C4, 0xFFFFFFFFU, 0x21100000U);
psu_mask_write(0xFD0814DC, 0xFFFFFFFFU, 0x01266300U);
psu_mask_write(0xFD0814EC, 0xFFFFFFFFU, 0x00041800U);
psu_mask_write(0xFD0814F0, 0xFFFFFFFFU, 0x70400000U);
psu_mask_write(0xFD081500, 0xFFFFFFFFU, 0x15019FFEU);
psu_mask_write(0xFD081504, 0xFFFFFFFFU, 0x21100000U);
psu_mask_write(0xFD08151C, 0xFFFFFFFFU, 0x01266300U);
psu_mask_write(0xFD08152C, 0xFFFFFFFFU, 0x00041800U);
psu_mask_write(0xFD081530, 0xFFFFFFFFU, 0x70400000U);
psu_mask_write(0xFD0817DC, 0xFFFFFFFFU, 0x012643C4U);
return 1;
}
static unsigned long psu_ddr_qos_init_data(void)
{
psu_mask_write(0xFD360008, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD36001C, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD370008, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD37001C, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD380008, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD38001C, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD390008, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD39001C, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD3A0008, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD3A001C, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD3B0008, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFD3B001C, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFF9B0008, 0x0000000FU, 0x00000000U);
psu_mask_write(0xFF9B001C, 0x0000000FU, 0x00000000U);
return 1;
}
static unsigned long psu_mio_init_data(void)
{
psu_mask_write(0xFF180034, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF180038, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF18003C, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF180040, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF180044, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF180048, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF18004C, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF180050, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF180054, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF180058, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF18005C, 0x000000FEU, 0x00000008U);
psu_mask_write(0xFF180068, 0x000000FEU, 0x00000080U);
psu_mask_write(0xFF18006C, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF180070, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF180074, 0x000000FEU, 0x00000080U);
psu_mask_write(0xFF180078, 0x000000FEU, 0x00000080U);
psu_mask_write(0xFF18007C, 0x000000FEU, 0x00000080U);
psu_mask_write(0xFF180080, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF180084, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF180088, 0x000000FEU, 0x00000040U);
psu_mask_write(0xFF18008C, 0x000000FEU, 0x00000040U);
psu_mask_write(0xFF180090, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF180094, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF180098, 0x000000FEU, 0x000000C0U);
psu_mask_write(0xFF18009C, 0x000000FEU, 0x000000C0U);
psu_mask_write(0xFF1800A0, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF1800A4, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF1800A8, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF1800AC, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF1800B0, 0x000000FEU, 0x00000000U);
psu_mask_write(0xFF1800B4, 0x000000FEU, 0x00000010U);
psu_mask_write(0xFF1800B8, 0x000000FEU, 0x00000010U);
psu_mask_write(0xFF1800BC, 0x000000FEU, 0x00000010U);
psu_mask_write(0xFF1800C0, 0x000000FEU, 0x00000010U);
psu_mask_write(0xFF1800C4, 0x000000FEU, 0x00000010U);
psu_mask_write(0xFF1800C8, 0x000000FEU, 0x00000010U);
psu_mask_write(0xFF1800CC, 0x000000FEU, 0x00000010U);
psu_mask_write(0xFF1800D0, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800D4, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800D8, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800DC, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800E0, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800E4, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800E8, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800EC, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800F0, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800F4, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800F8, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF1800FC, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180100, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180104, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180108, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF18010C, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180110, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180114, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180118, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF18011C, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180120, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180124, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180128, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF18012C, 0x000000FEU, 0x00000004U);
psu_mask_write(0xFF180130, 0x000000FEU, 0x00000060U);
psu_mask_write(0xFF180134, 0x000000FEU, 0x00000060U);
psu_mask_write(0xFF180204, 0xFCFFE000U, 0x00000000U);
psu_mask_write(0xFF180208, 0xFFFFFFFFU, 0x00B02040U);
psu_mask_write(0xFF18020C, 0x00003FFFU, 0x0000000BU);
psu_mask_write(0xFF180138, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF18013C, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180140, 0x03FFFFFFU, 0x033FFFFFU);
psu_mask_write(0xFF180144, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180148, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF18014C, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180154, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180158, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF18015C, 0x03FFFFFFU, 0x01FF9FFFU);
psu_mask_write(0xFF180160, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180164, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180168, 0x03FFFFFFU, 0x03F76FFFU);
psu_mask_write(0xFF180170, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180174, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180178, 0x03FFFFFFU, 0x02FBFFBFU);
psu_mask_write(0xFF18017C, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180180, 0x03FFFFFFU, 0x03FFFFFFU);
psu_mask_write(0xFF180184, 0x03FFFFFFU, 0x03FF4FF4U);
psu_mask_write(0xFF180200, 0x0000000FU, 0x00000000U);
return 1;
}
static unsigned long psu_peripherals_pre_init_data(void)
{
psu_mask_write(0xFF5E0108, 0x013F3F07U, 0x01012302U);
return 1;
}
static unsigned long psu_peripherals_init_data(void)
{
psu_mask_write(0xFD1A0100, 0x0000807CU, 0x00000000U);
psu_mask_write(0xFF5E0238, 0x001A0000U, 0x00000000U);
psu_mask_write(0xFF5E023C, 0x0093C018U, 0x00000000U);
psu_mask_write(0xFF5E0230, 0x00000001U, 0x00000000U);
psu_mask_write(0xFF5E023C, 0x00000C00U, 0x00000000U);
psu_mask_write(0xFF5E0238, 0x00000060U, 0x00000000U);
psu_mask_write(0xFF180310, 0x00008001U, 0x00000001U);
psu_mask_write(0xFF180320, 0x33843384U, 0x00801284U);
psu_mask_write(0xFF18031C, 0x00007FFEU, 0x00006450U);
psu_mask_write(0xFF180358, 0x00080000U, 0x00080000U);
psu_mask_write(0xFF18031C, 0x7FFE0000U, 0x64500000U);
psu_mask_write(0xFF180358, 0x00000008U, 0x00000008U);
psu_mask_write(0xFF180324, 0x000003C0U, 0x00000000U);
psu_mask_write(0xFF180324, 0x03C00000U, 0x00000000U);
psu_mask_write(0xFF5E0238, 0x00000200U, 0x00000000U);
psu_mask_write(0xFF5E0238, 0x00008000U, 0x00000000U);
psu_mask_write(0xFF5E0238, 0x00000008U, 0x00000000U);
psu_mask_write(0xFF5E0238, 0x00007800U, 0x00000000U);
psu_mask_write(0xFF5E0238, 0x00000002U, 0x00000000U);
psu_mask_write(0xFF000034, 0x000000FFU, 0x00000005U);
psu_mask_write(0xFF000018, 0x0000FFFFU, 0x0000008FU);
psu_mask_write(0xFF000000, 0x000001FFU, 0x00000017U);
psu_mask_write(0xFF000004, 0x000003FFU, 0x00000020U);
psu_mask_write(0xFF5E0238, 0x00040000U, 0x00000000U);
psu_mask_write(0xFF4B0024, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFFCA5000, 0x00001FFFU, 0x00000000U);
psu_mask_write(0xFD5C0060, 0x000F000FU, 0x00000000U);
psu_mask_write(0xFFA60040, 0x80000000U, 0x80000000U);
psu_mask_write(0xFF260020, 0xFFFFFFFFU, 0x01FC9F08U);
psu_mask_write(0xFF260000, 0x00000001U, 0x00000001U);
psu_mask_write(0xFF5E0250, 0x00000F0FU, 0x00000202U);
mask_delay(1);
psu_mask_write(0xFF5E0250, 0x00000F0FU, 0x00000002U);
mask_delay(5);
psu_mask_write(0xFF5E0250, 0x00000F0FU, 0x00000202U);
return 1;
}
static unsigned long psu_serdes_init_data(void)
{
psu_mask_write(0xFD410000, 0x0000001FU, 0x0000000FU);
psu_mask_write(0xFD410004, 0x0000001FU, 0x00000008U);
psu_mask_write(0xFD402860, 0x00000080U, 0x00000080U);
psu_mask_write(0xFD402864, 0x00000080U, 0x00000080U);
psu_mask_write(0xFD406094, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD406368, 0x000000FFU, 0x00000038U);
psu_mask_write(0xFD40636C, 0x00000007U, 0x00000003U);
psu_mask_write(0xFD406370, 0x000000FFU, 0x000000F4U);
psu_mask_write(0xFD406374, 0x000000FFU, 0x00000031U);
psu_mask_write(0xFD406378, 0x000000FFU, 0x00000002U);
psu_mask_write(0xFD40637C, 0x00000033U, 0x00000030U);
psu_mask_write(0xFD40106C, 0x0000000FU, 0x0000000FU);
psu_mask_write(0xFD4000F4, 0x0000000BU, 0x0000000BU);
psu_mask_write(0xFD40506C, 0x00000003U, 0x00000003U);
psu_mask_write(0xFD4040F4, 0x00000003U, 0x00000003U);
psu_mask_write(0xFD4050CC, 0x00000020U, 0x00000020U);
psu_mask_write(0xFD401074, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD405074, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD409074, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD40D074, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD40189C, 0x00000080U, 0x00000080U);
psu_mask_write(0xFD4018F8, 0x000000FFU, 0x0000007DU);
psu_mask_write(0xFD4018FC, 0x000000FFU, 0x0000007DU);
psu_mask_write(0xFD401990, 0x000000FFU, 0x00000000U);
psu_mask_write(0xFD401924, 0x000000FFU, 0x00000082U);
psu_mask_write(0xFD401928, 0x000000FFU, 0x00000000U);
psu_mask_write(0xFD401900, 0x000000FFU, 0x00000064U);
psu_mask_write(0xFD40192C, 0x000000FFU, 0x00000000U);
psu_mask_write(0xFD401980, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFD401914, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFD401918, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD401940, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFD401944, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD401994, 0x00000007U, 0x00000007U);
psu_mask_write(0xFD40589C, 0x00000080U, 0x00000080U);
psu_mask_write(0xFD4058F8, 0x000000FFU, 0x0000001AU);
psu_mask_write(0xFD4058FC, 0x000000FFU, 0x0000001AU);
psu_mask_write(0xFD405990, 0x000000FFU, 0x00000010U);
psu_mask_write(0xFD405924, 0x000000FFU, 0x000000FEU);
psu_mask_write(0xFD405928, 0x000000FFU, 0x00000000U);
psu_mask_write(0xFD405900, 0x000000FFU, 0x0000001AU);
psu_mask_write(0xFD40592C, 0x000000FFU, 0x00000000U);
psu_mask_write(0xFD405980, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFD405914, 0x000000FFU, 0x000000F7U);
psu_mask_write(0xFD405918, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD405940, 0x000000FFU, 0x000000F7U);
psu_mask_write(0xFD405944, 0x00000001U, 0x00000001U);
psu_mask_write(0xFD405994, 0x00000007U, 0x00000007U);
psu_mask_write(0xFD409994, 0x00000007U, 0x00000007U);
psu_mask_write(0xFD40D994, 0x00000007U, 0x00000007U);
psu_mask_write(0xFD40107C, 0x0000000FU, 0x00000001U);
psu_mask_write(0xFD40507C, 0x0000000FU, 0x00000001U);
psu_mask_write(0xFD40907C, 0x0000000FU, 0x00000001U);
psu_mask_write(0xFD40D07C, 0x0000000FU, 0x00000001U);
psu_mask_write(0xFD4019A4, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFD401038, 0x00000040U, 0x00000040U);
psu_mask_write(0xFD40102C, 0x00000040U, 0x00000040U);
psu_mask_write(0xFD4059A4, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFD405038, 0x00000040U, 0x00000040U);
psu_mask_write(0xFD40502C, 0x00000040U, 0x00000040U);
psu_mask_write(0xFD4099A4, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFD409038, 0x00000040U, 0x00000040U);
psu_mask_write(0xFD40902C, 0x00000040U, 0x00000040U);
psu_mask_write(0xFD40D9A4, 0x000000FFU, 0x000000FFU);
psu_mask_write(0xFD40D038, 0x00000040U, 0x00000040U);
psu_mask_write(0xFD40D02C, 0x00000040U, 0x00000040U);
psu_mask_write(0xFD4019AC, 0x00000003U, 0x00000000U);
psu_mask_write(0xFD4059AC, 0x00000003U, 0x00000000U);
psu_mask_write(0xFD4099AC, 0x00000003U, 0x00000000U);
psu_mask_write(0xFD40D9AC, 0x00000003U, 0x00000000U);
psu_mask_write(0xFD401978, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD405978, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD409978, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD40D978, 0x00000010U, 0x00000010U);
psu_mask_write(0xFD410010, 0x00000077U, 0x00000035U);
psu_mask_write(0xFD410040, 0x00000003U, 0x00000000U);
psu_mask_write(0xFD410044, 0x00000003U, 0x00000000U);
return 1;
}
static unsigned long psu_resetout_init_data(void)
{
psu_mask_write(0xFF5E023C, 0x00000400U, 0x00000000U);
psu_mask_write(0xFF9D0080, 0x00000001U, 0x00000001U);
psu_mask_write(0xFF9D007C, 0x00000001U, 0x00000000U);
psu_mask_write(0xFF5E023C, 0x00000140U, 0x00000000U);
psu_mask_write(0xFF5E023C, 0x00000800U, 0x00000000U);
psu_mask_write(0xFF9E0080, 0x00000001U, 0x00000001U);
psu_mask_write(0xFF9E007C, 0x00000001U, 0x00000001U);
psu_mask_write(0xFF5E023C, 0x00000280U, 0x00000000U);
psu_mask_write(0xFF5E0230, 0x00000001U, 0x00000000U);
psu_mask_write(0xFE20C200, 0x00023FFFU, 0x00022457U);
psu_mask_write(0xFE20C630, 0x003FFF00U, 0x00000000U);
psu_mask_write(0xFE20C11C, 0x00000600U, 0x00000600U);
psu_mask_write(0xFE20C12C, 0x00004000U, 0x00004000U);
psu_mask_write(0xFE30C200, 0x00023FFFU, 0x00022457U);
psu_mask_write(0xFE30C630, 0x003FFF00U, 0x00000000U);
psu_mask_write(0xFE30C12C, 0x00004000U, 0x00004000U);
psu_mask_write(0xFE30C11C, 0x00000400U, 0x00000400U);
psu_mask_write(0xFD480064, 0x00000200U, 0x00000200U);
mask_poll(0xFD4023E4, 0x00000010U);
mask_poll(0xFD4063E4, 0x00000010U);
return 1;
}
static unsigned long psu_resetin_init_data(void)
{
psu_mask_write(0xFF5E023C, 0x00000540U, 0x00000540U);
psu_mask_write(0xFF5E023C, 0x00000A80U, 0x00000A80U);
psu_mask_write(0xFF5E0230, 0x00000001U, 0x00000001U);
return 1;
}
static unsigned long psu_afi_config(void)
{
psu_mask_write(0xFD1A0100, 0x00001F80U, 0x00000000U);
psu_mask_write(0xFF5E023C, 0x00080000U, 0x00000000U);
psu_mask_write(0xFD615000, 0x00000F00U, 0x00000A00U);
psu_mask_write(0xFF419000, 0x00000300U, 0x00000000U);
psu_mask_write(0xFD360000, 0x00000003U, 0x00000000U);
psu_mask_write(0xFD360014, 0x00000003U, 0x00000000U);
return 1;
}
static unsigned long psu_ddr_phybringup_data(void)
{
unsigned int regval = 0;
unsigned int pll_retry = 10;
unsigned int pll_locked = 0;
int cur_r006_trefprd;
while ((pll_retry > 0) && (!pll_locked)) {
Xil_Out32(0xFD080004, 0x00040010);
Xil_Out32(0xFD080004, 0x00040011);
while ((Xil_In32(0xFD080030) & 0x1) != 1)
;
pll_locked = (Xil_In32(0xFD080030) & 0x80000000)
>> 31;
pll_locked &= (Xil_In32(0xFD0807E0) & 0x10000)
>> 16;
pll_locked &= (Xil_In32(0xFD0809E0) & 0x10000)
>> 16;
pll_retry--;
}
Xil_Out32(0xFD0800C4, Xil_In32(0xFD0800C4) | (pll_retry << 16));
if (!pll_locked)
return 0;
Xil_Out32(0xFD080004U, 0x00040063U);
while ((Xil_In32(0xFD080030U) & 0x0000000FU) != 0x0000000FU)
;
prog_reg(0xFD080004U, 0x00000001U, 0x00000000U, 0x00000001U);
while ((Xil_In32(0xFD080030U) & 0x000000FFU) != 0x0000001FU)
;
Xil_Out32(0xFD0701B0U, 0x00000001U);
Xil_Out32(0xFD070320U, 0x00000001U);
while ((Xil_In32(0xFD070004U) & 0x0000000FU) != 0x00000001U)
;
prog_reg(0xFD080014U, 0x00000040U, 0x00000006U, 0x00000001U);
Xil_Out32(0xFD080004, 0x0004FE01);
regval = Xil_In32(0xFD080030);
while (regval != 0x80000FFF)
regval = Xil_In32(0xFD080030);
regval = ((Xil_In32(0xFD080030) & 0x1FFF0000) >> 18);
if (regval != 0)
return 0;
Xil_Out32(0xFD080200U, 0x110091C7U);
cur_r006_trefprd = (Xil_In32(0xFD080018U) & 0x0003FFFFU) >> 0x00000000U;
prog_reg(0xFD080018, 0x3FFFF, 0x0, cur_r006_trefprd);
prog_reg(0xFD08001CU, 0x00000018U, 0x00000003U, 0x00000003U);
prog_reg(0xFD08142CU, 0x00000030U, 0x00000004U, 0x00000003U);
prog_reg(0xFD08146CU, 0x00000030U, 0x00000004U, 0x00000003U);
prog_reg(0xFD0814ACU, 0x00000030U, 0x00000004U, 0x00000003U);
prog_reg(0xFD0814ECU, 0x00000030U, 0x00000004U, 0x00000003U);
prog_reg(0xFD08152CU, 0x00000030U, 0x00000004U, 0x00000003U);
Xil_Out32(0xFD080004, 0x00060001);
regval = Xil_In32(0xFD080030);
while ((regval & 0x80004001) != 0x80004001)
regval = Xil_In32(0xFD080030);
prog_reg(0xFD08001CU, 0x00000018U, 0x00000003U, 0x00000000U);
prog_reg(0xFD08142CU, 0x00000030U, 0x00000004U, 0x00000000U);
prog_reg(0xFD08146CU, 0x00000030U, 0x00000004U, 0x00000000U);
prog_reg(0xFD0814ACU, 0x00000030U, 0x00000004U, 0x00000000U);
prog_reg(0xFD0814ECU, 0x00000030U, 0x00000004U, 0x00000000U);
prog_reg(0xFD08152CU, 0x00000030U, 0x00000004U, 0x00000000U);
Xil_Out32(0xFD080200U, 0x810091C7U);
prog_reg(0xFD080018, 0x3FFFF, 0x0, cur_r006_trefprd);
Xil_Out32(0xFD080004, 0x0000C001);
regval = Xil_In32(0xFD080030);
while ((regval & 0x80000C01) != 0x80000C01)
regval = Xil_In32(0xFD080030);
Xil_Out32(0xFD070180U, 0x01000040U);
Xil_Out32(0xFD070060U, 0x00000000U);
prog_reg(0xFD080014U, 0x00000040U, 0x00000006U, 0x00000000U);
return 1;
}
static int serdes_enb_coarse_saturation(void)
{
Xil_Out32(0xFD402094, 0x00000010);
Xil_Out32(0xFD406094, 0x00000010);
Xil_Out32(0xFD40A094, 0x00000010);
Xil_Out32(0xFD40E094, 0x00000010);
return 1;
}
static int serdes_fixcal_code(void)
{
int maskstatus = 1;
unsigned int rdata = 0;
unsigned int match_pmos_code[23];
unsigned int match_nmos_code[23];
unsigned int match_ical_code[7];
unsigned int match_rcal_code[7];
unsigned int p_code = 0, n_code = 0, i_code = 0, r_code = 0;
unsigned int repeat_count = 0;
unsigned int L3_TM_CALIB_DIG20 = 0;
unsigned int L3_TM_CALIB_DIG19 = 0;
unsigned int L3_TM_CALIB_DIG18 = 0;
unsigned int L3_TM_CALIB_DIG16 = 0;
unsigned int L3_TM_CALIB_DIG15 = 0;
unsigned int L3_TM_CALIB_DIG14 = 0;
int count = 0, i = 0;
rdata = Xil_In32(0xFD40289C);
rdata = rdata & ~0x03;
rdata = rdata | 0x1;
Xil_Out32(0xFD40289C, rdata);
do {
if (count == 1100000)
break;
rdata = Xil_In32(0xFD402B1C);
count++;
} while ((rdata & 0x0000000E) != 0x0000000E);
for (i = 0; i < 23; i++) {
match_pmos_code[i] = 0;
match_nmos_code[i] = 0;
}
for (i = 0; i < 7; i++) {
match_ical_code[i] = 0;
match_rcal_code[i] = 0;
}
do {
Xil_Out32(0xFD410010, 0x00000000);
Xil_Out32(0xFD410014, 0x00000000);
Xil_Out32(0xFD410010, 0x00000001);
Xil_Out32(0xFD410014, 0x00000000);
maskstatus = mask_poll(0xFD40EF14, 0x2);
if (maskstatus == 0) {
xil_printf("#SERDES initialization timed out\n\r");
return maskstatus;
}
p_code = mask_read(0xFD40EF18, 0xFFFFFFFF);
n_code = mask_read(0xFD40EF1C, 0xFFFFFFFF);
;
i_code = mask_read(0xFD40EF24, 0xFFFFFFFF);
r_code = mask_read(0xFD40EF28, 0xFFFFFFFF);
;
if (p_code >= 0x26 && p_code <= 0x3C)
match_pmos_code[p_code - 0x26] += 1;
if (n_code >= 0x26 && n_code <= 0x3C)
match_nmos_code[n_code - 0x26] += 1;
if (i_code >= 0xC && i_code <= 0x12)
match_ical_code[i_code - 0xc] += 1;
if (r_code >= 0x6 && r_code <= 0xC)
match_rcal_code[r_code - 0x6] += 1;
} while (repeat_count++ < 10);
for (i = 0; i < 23; i++) {
if (match_pmos_code[i] >= match_pmos_code[0]) {
match_pmos_code[0] = match_pmos_code[i];
p_code = 0x26 + i;
}
if (match_nmos_code[i] >= match_nmos_code[0]) {
match_nmos_code[0] = match_nmos_code[i];
n_code = 0x26 + i;
}
}
for (i = 0; i < 7; i++) {
if (match_ical_code[i] >= match_ical_code[0]) {
match_ical_code[0] = match_ical_code[i];
i_code = 0xC + i;
}
if (match_rcal_code[i] >= match_rcal_code[0]) {
match_rcal_code[0] = match_rcal_code[i];
r_code = 0x6 + i;
}
}
L3_TM_CALIB_DIG20 = mask_read(0xFD40EC50, 0xFFFFFFF0);
L3_TM_CALIB_DIG20 = L3_TM_CALIB_DIG20 | 0x8 | ((p_code >> 2) & 0x7);
L3_TM_CALIB_DIG19 = mask_read(0xFD40EC4C, 0xFFFFFF18);
L3_TM_CALIB_DIG19 = L3_TM_CALIB_DIG19 | ((p_code & 0x3) << 6)
| 0x20 | 0x4 | ((n_code >> 3) & 0x3);
L3_TM_CALIB_DIG18 = mask_read(0xFD40EC48, 0xFFFFFF0F);
L3_TM_CALIB_DIG18 = L3_TM_CALIB_DIG18 | ((n_code & 0x7) << 5) | 0x10;
L3_TM_CALIB_DIG16 = mask_read(0xFD40EC40, 0xFFFFFFF8);
L3_TM_CALIB_DIG16 = L3_TM_CALIB_DIG16 | ((r_code >> 1) & 0x7);
L3_TM_CALIB_DIG15 = mask_read(0xFD40EC3C, 0xFFFFFF30);
L3_TM_CALIB_DIG15 = L3_TM_CALIB_DIG15 | ((r_code & 0x1) << 7)
| 0x40 | 0x8 | ((i_code >> 1) & 0x7);
L3_TM_CALIB_DIG14 = mask_read(0xFD40EC38, 0xFFFFFF3F);
L3_TM_CALIB_DIG14 = L3_TM_CALIB_DIG14 | ((i_code & 0x1) << 7) | 0x40;
Xil_Out32(0xFD40EC50, L3_TM_CALIB_DIG20);
Xil_Out32(0xFD40EC4C, L3_TM_CALIB_DIG19);
Xil_Out32(0xFD40EC48, L3_TM_CALIB_DIG18);
Xil_Out32(0xFD40EC40, L3_TM_CALIB_DIG16);
Xil_Out32(0xFD40EC3C, L3_TM_CALIB_DIG15);
Xil_Out32(0xFD40EC38, L3_TM_CALIB_DIG14);
return maskstatus;
}
static int init_serdes(void)
{
int status = 1;
status &= psu_resetin_init_data();
status &= serdes_fixcal_code();
status &= serdes_enb_coarse_saturation();
status &= psu_serdes_init_data();
status &= psu_resetout_init_data();
return status;
}
static void init_peripheral(void)
{
psu_mask_write(0xFD5F0018, 0x8000001FU, 0x8000001FU);
}
int psu_init(void)
{
int status = 1;
status &= psu_mio_init_data();
status &= psu_peripherals_pre_init_data();
status &= psu_pll_init_data();
status &= psu_clock_init_data();
status &= psu_ddr_init_data();
status &= psu_ddr_phybringup_data();
status &= psu_peripherals_init_data();
status &= init_serdes();
init_peripheral();
status &= psu_afi_config();
psu_ddr_qos_init_data();
if (status == 0)
return 1;
return 0;
}
+39 -9
View File
@@ -358,6 +358,21 @@ static int multi_boot(void)
return multiboot;
}
#if defined(CONFIG_SPL_BUILD)
static void restore_jtag(void)
{
if (current_el() != 3)
return;
writel(CSU_JTAG_SEC_GATE_DISABLE, &csu_base->jtag_sec);
writel(CSU_JTAG_DAP_ENABLE_DEBUG, &csu_base->jtag_dap_cfg);
writel(CSU_JTAG_CHAIN_WR_SETUP, &csu_base->jtag_chain_status_wr);
writel(CRLAPB_DBG_LPD_CTRL_SETUP_CLK, &crlapb_base->dbg_lpd_ctrl);
writel(CRLAPB_RST_LPD_DBG_RESET, &crlapb_base->rst_lpd_dbg);
writel(CSU_PCAP_PROG_RELEASE_PL, &csu_base->pcap_prog);
}
#endif
#define PS_SYSMON_ANALOG_BUS_VAL 0x3210
#define PS_SYSMON_ANALOG_BUS_REG 0xFFA50914
@@ -377,6 +392,10 @@ int board_init(void)
zynqmp_pmufw_load_config_object(zynqmp_pm_cfg_obj,
zynqmp_pm_cfg_obj_size);
printf("Silicon version:\t%d\n", zynqmp_get_silicon_version());
/* the CSU disables the JTAG interface when secure boot is enabled */
if (CONFIG_IS_ENABLED(ZYNQMP_RESTORE_JTAG))
restore_jtag();
#else
if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM))
xilinx_read_eeprom();
@@ -477,7 +496,7 @@ ulong board_get_usable_ram_top(ulong total_size)
lmb_init(&lmb);
lmb_add(&lmb, gd->ram_base, gd->ram_size);
boot_fdt_add_mem_rsv_regions(&lmb, (void *)gd->fdt_blob);
size = ALIGN(CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE),
size = ALIGN(CONFIG_SYS_MALLOC_LEN + total_size, MMU_SECTION_SIZE);
reg = lmb_alloc(&lmb, size, MMU_SECTION_SIZE);
if (!reg)
@@ -621,7 +640,7 @@ int board_late_init(void)
const char *mode;
char *new_targets;
char *env_targets;
int ret;
int ret, multiboot;
#if defined(CONFIG_USB_ETHER) && !defined(CONFIG_USB_GADGET_DOWNLOAD)
usb_ether_init();
@@ -639,6 +658,10 @@ int board_late_init(void)
if (ret)
return ret;
multiboot = multi_boot();
if (multiboot >= 0)
env_set_hex("multiboot", multiboot);
bootmode = zynqmp_get_bootmode();
puts("Bootmode: ");
@@ -691,7 +714,7 @@ int board_late_init(void)
break;
case SD1_LSHFT_MODE:
puts("LVL_SHFT_");
/* fall through */
fallthrough;
case SD_MODE1:
puts("SD_MODE1\n");
if (uclass_get_device_by_name(UCLASS_MMC,
@@ -845,6 +868,10 @@ void set_dfu_alt_info(char *interface, char *devstr)
memset(buf, 0, sizeof(buf));
multiboot = multi_boot();
if (multiboot < 0)
multiboot = 0;
multiboot = env_get_hex("multiboot", multiboot);
debug("Multiboot: %d\n", multiboot);
switch (zynqmp_get_bootmode()) {
@@ -856,20 +883,23 @@ void set_dfu_alt_info(char *interface, char *devstr)
if (!multiboot)
snprintf(buf, DFU_ALT_BUF_LEN,
"mmc %d:1=boot.bin fat %d 1;"
"u-boot.itb fat %d 1",
bootseq, bootseq, bootseq);
"%s fat %d 1",
bootseq, bootseq,
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME, bootseq);
else
snprintf(buf, DFU_ALT_BUF_LEN,
"mmc %d:1=boot%04d.bin fat %d 1;"
"u-boot.itb fat %d 1",
bootseq, multiboot, bootseq, bootseq);
"%s fat %d 1",
bootseq, multiboot, bootseq,
CONFIG_SPL_FS_LOAD_PAYLOAD_NAME, bootseq);
break;
case QSPI_MODE_24BIT:
case QSPI_MODE_32BIT:
snprintf(buf, DFU_ALT_BUF_LEN,
"sf 0:0=boot.bin raw %x 0x1500000;"
"u-boot.itb raw 0x%x 0x500000",
multiboot * SZ_32K, CONFIG_SYS_SPI_U_BOOT_OFFS);
"%s raw 0x%x 0x500000",
multiboot * SZ_32K, CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,
CONFIG_SYS_SPI_U_BOOT_OFFS);
break;
default:
return;
+1
View File
@@ -14,6 +14,7 @@
#include <env.h>
#include <fpga.h>
#include <image.h>
#include <init.h>
#include <mapmem.h>
#include <rtc.h>
#include <watchdog.h>
+1 -5
View File
@@ -9,6 +9,7 @@
#ifndef USE_HOSTCC
#include <common.h>
#include <env.h>
#include <init.h>
#include <lmb.h>
#include <log.h>
#include <malloc.h>
@@ -29,11 +30,6 @@
#include <linux/errno.h>
#include <asm/io.h>
#ifdef CONFIG_CMD_BDI
extern int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]);
#endif
DECLARE_GLOBAL_DATA_PTR;
/* Set this if we have less than 4 MB of malloc() space */
+11 -6
View File
@@ -406,9 +406,9 @@ static int do_tpm_load_key_by_sha1(struct cmd_tbl *cmdtp, int flag, int argc,
void *key;
struct udevice *dev;
rc = get_tpm(&dev);
if (rc)
return rc;
err = get_tpm(&dev);
if (err)
return err;
if (argc < 5)
return CMD_RET_USAGE;
@@ -420,7 +420,7 @@ static int do_tpm_load_key_by_sha1(struct cmd_tbl *cmdtp, int flag, int argc,
return CMD_RET_FAILURE;
parse_byte_string(argv[4], usage_auth, NULL);
err = tpm_find_key_sha1(usage_auth, parent_hash, &parent_handle);
err = tpm1_find_key_sha1(dev, usage_auth, parent_hash, &parent_handle);
if (err) {
printf("Could not find matching parent key (err = %d)\n", err);
return CMD_RET_FAILURE;
@@ -428,7 +428,7 @@ static int do_tpm_load_key_by_sha1(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Found parent key %08x\n", parent_handle);
err = tpm_load_key2_oiap(parent_handle, key, key_len, usage_auth,
err = tpm1_load_key2_oiap(dev, parent_handle, key, key_len, usage_auth,
&key_handle);
if (!err) {
printf("Key handle is 0x%x\n", key_handle);
@@ -582,6 +582,7 @@ static int do_tpm_flush(struct cmd_tbl *cmdtp, int flag, int argc,
static int do_tpm_list(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
int type = 0;
u16 res_count;
u8 buf[288];
@@ -589,6 +590,10 @@ static int do_tpm_list(struct cmd_tbl *cmdtp, int flag, int argc,
int err;
uint i;
err = get_tpm(&dev);
if (err)
return err;
if (argc != 2)
return CMD_RET_USAGE;
@@ -619,7 +624,7 @@ static int do_tpm_list(struct cmd_tbl *cmdtp, int flag, int argc,
}
/* fetch list of already loaded resources in the TPM */
err = tpm_get_capability(TPM_CAP_HANDLE, type, buf,
err = tpm_get_capability(dev, TPM_CAP_HANDLE, type, buf,
sizeof(buf));
if (err) {
printf("tpm_get_capability returned error %d.\n", err);
+2 -1
View File
@@ -151,7 +151,8 @@ static int do_tpm_pcr_read(struct cmd_tbl *cmdtp, int flag, int argc,
data = map_sysmem(simple_strtoul(argv[2], NULL, 0), 0);
rc = tpm2_pcr_read(dev, index, priv->pcr_select_min, data, &updates);
rc = tpm2_pcr_read(dev, index, priv->pcr_select_min, TPM2_ALG_SHA256,
data, TPM2_DIGEST_LEN, &updates);
if (!rc) {
printf("PCR #%u content (%u known updates):\n", index, updates);
print_byte_string(data, TPM2_DIGEST_LEN);
+18 -16
View File
@@ -673,30 +673,32 @@ static int reloc_bloblist(void)
static int setup_reloc(void)
{
if (gd->flags & GD_FLG_SKIP_RELOC) {
debug("Skipping relocation due to flag\n");
return 0;
}
if (!(gd->flags & GD_FLG_SKIP_RELOC)) {
#ifdef CONFIG_SYS_TEXT_BASE
#ifdef ARM
gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start;
gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start;
#elif defined(CONFIG_M68K)
/*
* On all ColdFire arch cpu, monitor code starts always
* just after the default vector table location, so at 0x400
*/
gd->reloc_off = gd->relocaddr - (CONFIG_SYS_TEXT_BASE + 0x400);
/*
* On all ColdFire arch cpu, monitor code starts always
* just after the default vector table location, so at 0x400
*/
gd->reloc_off = gd->relocaddr - (CONFIG_SYS_TEXT_BASE + 0x400);
#elif !defined(CONFIG_SANDBOX)
gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE;
gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE;
#endif
#endif
}
memcpy(gd->new_gd, (char *)gd, sizeof(gd_t));
debug("Relocation Offset is: %08lx\n", gd->reloc_off);
debug("Relocating to %08lx, new gd at %08lx, sp at %08lx\n",
gd->relocaddr, (ulong)map_to_sysmem(gd->new_gd),
gd->start_addr_sp);
if (gd->flags & GD_FLG_SKIP_RELOC) {
debug("Skipping relocation due to flag\n");
} else {
debug("Relocation Offset is: %08lx\n", gd->reloc_off);
debug("Relocating to %08lx, new gd at %08lx, sp at %08lx\n",
gd->relocaddr, (ulong)map_to_sysmem(gd->new_gd),
gd->start_addr_sp);
}
return 0;
}
+16
View File
@@ -0,0 +1,16 @@
CONFIG_ARM=y
CONFIG_ARCH_EXYNOS=y
CONFIG_ARCH_EXYNOS9=y
CONFIG_S5P=y
CONFIG_TARGET_BEYOND=y
CONFIG_DEFAULT_DEVICE_TREE="exynos9820-beyond1lte"
# TODO fix the address since sboot is causing issues
CONFIG_SYS_TEXT_BASE=0x80001000
CONFIG_BOARD_EARLY_INIT_F=n
CONFIG_SKIP_LOWLEVEL_INIT=y
CONFIG_DISPLAY_CPUINFO=n
CONFIG_STANDALONE_LOAD_ADDR=0x10008000
CONFIG_SYS_MALLOC_F_LEN=0x8000
CONFIG_POSITION_INDEPENDENT=y
CONFIG_SYS_LOAD_ADDR=0x81ad7fff
CONFIG_PSCI_RESET=n
+34
View File
@@ -0,0 +1,34 @@
/*
* Configuration settings for the SAMSUNG ESPRESSO7420 board.
* Copyright (C) 2016 Samsung Electronics
* Thomas Abraham <thomas.ab@samsung.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __CONFIG_EXYNOS9820_H
#define __CONFIG_EXYNOS9820_H
#include <configs/exynos9820-common.h>
#define CONFIG_BOARD_COMMON
#define CONFIG_EXYNOS9820
#define CONFIG_ENV_IS_NOWHERE
#define CONFIG_SYS_SDRAM_BASE 0x40000000
#define CONFIG_SYS_TEXT_BASE 0x43E00000
#define CONFIG_SPL_STACK CONFIG_IRAM_END
#define CONFIG_SYS_INIT_SP_ADDR CONFIG_IRAM_END
/* select serial console configuration */
#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"
#define CONFIG_IDENT_STRING " for ESPRESSO7420"
#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0"
/* DRAM Memory Banks */
#define CONFIG_NR_DRAM_BANKS 8
#define SDRAM_BANK_SIZE (256UL << 20UL) /* 256 MB */
#endif /* __CONFIG_EXYNOS9820_H */
+9
View File
@@ -0,0 +1,9 @@
CONFIG_ARM=y
CONFIG_ARCH_EXYNOS=y
CONFIG_ARCH_EXYNOS9820=y
CONFIG_TARGET_EXYNOS9820=y
CONFIG_DEFAULT_DEVICE_TREE="exynos9820"
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_SYS_PROMPT="EXYNOS9820 # "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_SETEXPR is not set
-1
View File
@@ -6,7 +6,6 @@ CONFIG_DEFAULT_DEVICE_TREE="microchip-mpfs-icicle-kit"
CONFIG_TARGET_MICROCHIP_ICICLE=y
CONFIG_ARCH_RV64I=y
CONFIG_RISCV_SMODE=y
CONFIG_SBI_V01=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_SYS_LOAD_ADDR=0x80200000
CONFIG_FIT=y
+1
View File
@@ -23,6 +23,7 @@ CONFIG_CMD_DFU=y
CONFIG_CMD_MTD=y
CONFIG_CMD_PCI=y
CONFIG_CMD_USB=y
CONFIG_CMD_TPM=y
CONFIG_CMD_MTDPARTS=y
CONFIG_OF_BOARD=y
CONFIG_ENV_IS_IN_FLASH=y
+1
View File
@@ -25,6 +25,7 @@ CONFIG_CMD_DFU=y
CONFIG_CMD_MTD=y
CONFIG_CMD_PCI=y
CONFIG_CMD_USB=y
CONFIG_CMD_TPM=y
CONFIG_CMD_MTDPARTS=y
CONFIG_OF_BOARD=y
CONFIG_ENV_IS_IN_FLASH=y
-1
View File
@@ -39,7 +39,6 @@ CONFIG_MULTI_DTB_FIT_LZO=y
CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SYS_MMC_ENV_PART=2
CONFIG_VERSION_VARIABLE=y
CONFIG_REGMAP=y
+6
View File
@@ -8,6 +8,7 @@ CONFIG_SPL_DM_SPI=y
CONFIG_DEFAULT_DEVICE_TREE="hifive-unmatched-a00"
CONFIG_SPL_MMC=y
CONFIG_SPL=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y
CONFIG_SPL_SPI=y
CONFIG_AHCI=y
CONFIG_TARGET_SIFIVE_UNMATCHED=y
@@ -23,17 +24,22 @@ CONFIG_DISPLAY_BOARDINFO=y
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_ID_EEPROM=y
CONFIG_SPL_SEPARATE_BSS=y
CONFIG_SPL_DM_SPI_FLASH=y
CONFIG_SPL_DM_RESET=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_CMD_EEPROM=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_PWM=y
CONFIG_CMD_GPT_RENAME=y
CONFIG_CMD_PCI=y
CONFIG_CMD_USB=y
CONFIG_USE_ENV_SPI_BUS=y
CONFIG_ENV_SPI_BUS=1
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SCSI_AHCI=y
CONFIG_AHCI_PCI=y
CONFIG_SPL_CLK=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SYS_I2C_EEPROM_ADDR=0x54
CONFIG_E1000=y
CONFIG_NVME=y
+2
View File
@@ -108,6 +108,8 @@ CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_DM_ETH=y
CONFIG_DWC_ETH_QOS=y
CONFIG_PHY=y
+1 -1
View File
@@ -81,7 +81,7 @@ CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
CONFIG_CMD_UBI=y
CONFIG_PARTITION_TYPE_GUID=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_LIST="avnet-ultra96-rev1 zynqmp-a2197-revA zynqmp-e-a2197-00-revA zynqmp-g-a2197-00-revA zynqmp-m-a2197-01-revA zynqmp-m-a2197-02-revA zynqmp-m-a2197-03-revA zynqmp-p-a2197-00-revA zynqmp-zc1232-revA zynqmp-zc1254-revA zynqmp-zc1751-xm015-dc1 zynqmp-zc1751-xm016-dc2 zynqmp-zc1751-xm017-dc3 zynqmp-zc1751-xm018-dc4 zynqmp-zc1751-xm019-dc5 zynqmp-zcu100-revC zynqmp-zcu102-rev1.1 zynqmp-zcu102-rev1.0 zynqmp-zcu102-revA zynqmp-zcu102-revB zynqmp-zcu104-revA zynqmp-zcu104-revC zynqmp-zcu106-revA zynqmp-zcu111-revA zynqmp-zcu1275-revA zynqmp-zcu1275-revB zynqmp-zcu1285-revA zynqmp-zcu208-revA zynqmp-zcu216-revA zynqmp-topic-miamimp-xilinx-xdp-v1r1 zynqmp-sm-k26-revA zynqmp-smk-k26-revA"
CONFIG_OF_LIST="avnet-ultra96-rev1 zynqmp-a2197-revA zynqmp-e-a2197-00-revA zynqmp-g-a2197-00-revA zynqmp-m-a2197-01-revA zynqmp-m-a2197-02-revA zynqmp-m-a2197-03-revA zynqmp-p-a2197-00-revA zynqmp-zc1232-revA zynqmp-zc1254-revA zynqmp-zc1751-xm015-dc1 zynqmp-zc1751-xm016-dc2 zynqmp-zc1751-xm017-dc3 zynqmp-zc1751-xm018-dc4 zynqmp-zc1751-xm019-dc5 zynqmp-zcu100-revC zynqmp-zcu102-rev1.1 zynqmp-zcu102-rev1.0 zynqmp-zcu102-revA zynqmp-zcu102-revB zynqmp-zcu104-revA zynqmp-zcu104-revC zynqmp-zcu106-revA zynqmp-zcu111-revA zynqmp-zcu1275-revA zynqmp-zcu1275-revB zynqmp-zcu1285-revA zynqmp-zcu208-revA zynqmp-zcu216-revA zynqmp-topic-miamimp-xilinx-xdp-v1r1 zynqmp-sm-k26-revA zynqmp-smk-k26-revA zynqmp-dlc21-revA"
CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names interrupt-parent interrupts iommus power-domains"
CONFIG_ENV_IS_NOWHERE=y
CONFIG_ENV_IS_IN_FAT=y
+11 -1
View File
@@ -296,8 +296,11 @@ static void print_part_header(const char *type, struct blk_desc *dev_desc)
case IF_TYPE_VIRTIO:
puts("VirtIO");
break;
case IF_TYPE_EFI_MEDIA:
puts("EFI");
break;
default:
puts ("UNKNOWN");
puts("UNKNOWN");
break;
}
printf (" device %d -- Partition Type: %s\n\n",
@@ -668,6 +671,13 @@ int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name,
part_drv = part_driver_lookup_type(dev_desc);
if (!part_drv)
return -1;
if (!part_drv->get_info) {
log_debug("## Driver %s does not have the get_info() method\n",
part_drv->name);
return -ENOSYS;
}
for (i = 1; i < part_drv->max_entries; i++) {
ret = part_drv->get_info(dev_desc, i, info);
if (ret != 0) {
+11 -12
View File
@@ -18,8 +18,8 @@ How it works:
-------------
The USB (at least the USB UHCI) needs a frame list (4k), transfer
descripor and queue headers which are all located in the main memory.
The UHCI allocates every milisecond the PCI bus and reads the current
descriptor and queue headers which are all located in the main memory.
The UHCI allocates every millisecond the PCI bus and reads the current
frame pointer. This may cause to crash the OS during boot. So the USB
_MUST_ be stopped during OS boot. This is the reason, why the USB is
NOT automatically started during start-up. If someone needs the USB
@@ -27,10 +27,10 @@ he has to start it and should therefore be aware that he had to stop
it before booting the OS.
For USB keyboards this can be done by a script which is automatically
started after the U-Boot is up and running. To boot an OS with a an
started after the U-Boot is up and running. To boot an OS with a
USB keyboard another script is necessary, which first disables the
USB and then executes the boot command. If the boot command fails,
the script can reenable the USB kbd.
the script can re-enable the USB keyboard.
Common USB Commands:
- usb start:
@@ -40,10 +40,10 @@ Common USB Commands:
- usb info [dev]: shows all USB infos of the device dev, or of all
the devices
- usb stop [f]: stops the USB. If f==1 the USB will also stop if
an USB keyboard is assigned as stdin. The stdin
a USB keyboard is assigned as stdin. The stdin
is then switched to serial input.
Storage USB Commands:
- usb scan: scans the USB for storage devices.The USB must be
- usb scan: scans the USB for storage devices. The USB must be
running for this command (usb start)
- usb device [dev]: show or set current USB storage device
- usb part [dev]: print partition table of one or all USB storage
@@ -57,7 +57,7 @@ Storage USB Commands:
Config Switches:
----------------
CONFIG_CMD_USB enables basic USB support and the usb command
CONFIG_USB_UHCI defines the lowlevel part.A lowlevel part must be defined
CONFIG_USB_UHCI defines the lowlevel part. A lowlevel part must be defined
if using CONFIG_CMD_USB
CONFIG_USB_KEYBOARD enables the USB Keyboard
CONFIG_USB_STORAGE enables the USB storage devices
@@ -124,7 +124,7 @@ bootp
To enable USB Host Ethernet in U-Boot, your platform must of course
support USB with CONFIG_CMD_USB enabled and working. You will need to
add some config settings to your board config:
add some settings to your board configuration:
CONFIG_CMD_USB=y /* the 'usb' interactive command */
CONFIG_USB_HOST_ETHER=y /* Enable USB Ethernet adapters */
@@ -158,7 +158,7 @@ settings should start you off:
You can also set the default IP address of your board and the server
as well as the default file to load when a 'bootp' command is issued.
However note that encoding these individual network settings into a
common exectuable is discouraged, as it leads to potential conflicts,
common executable is discouraged, as it leads to potential conflicts,
and all the parameters can either get stored in the board's external
environment, or get obtained from the bootp server if not set.
@@ -166,7 +166,6 @@ environment, or get obtained from the bootp server if not set.
#define CONFIG_SERVERIP 10.0.0.1 (replace with your value)
#define CONFIG_BOOTFILE "uImage"
The 'usb start' command should identify the adapter something like this:
CrOS> usb start
@@ -211,8 +210,8 @@ MAC Addresses
Most Ethernet dongles have a built-in MAC address which is unique in the
world. This is important so that devices on the network can be
distinguised from each other. MAC address conflicts are evil and
generally result in strange and eratic behaviour.
distinguished from each other. MAC address conflicts are evil and
generally result in strange and erratic behaviour.
Some boards have USB Ethernet chips on-board, and these sometimes do not
have an assigned MAC address. In this case it is up to you to assign
+1
View File
@@ -10,6 +10,7 @@ U-Boot API documentation
efi
getopt
linker_lists
lmb
logging
pinctrl
rng
+7
View File
@@ -0,0 +1,7 @@
.. SPDX-License-Identifier: GPL-2.0+
Logical memory blocks
=====================
.. kernel-doc:: include/lmb.h
:internal:
+7 -2
View File
@@ -65,7 +65,8 @@ can be enabled with the following command line parameters:
- To add a Serial ATA disk via an Intel ICH9 AHCI controller, pass e.g.::
-drive if=none,file=disk.img,id=mydisk -device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0
-drive if=none,file=disk.img,format=raw,id=mydisk \
-device ich9-ahci,id=ahci -device ide-drive,drive=mydisk,bus=ahci.0
- To add an Intel E1000 network adapter, pass e.g.::
@@ -75,10 +76,14 @@ can be enabled with the following command line parameters:
-device usb-ehci,id=ehci
- To add a NVMe disk, pass e.g.::
- To add an NVMe disk, pass e.g.::
-drive if=none,file=disk.img,id=mydisk -device nvme,drive=mydisk,serial=foo
- To add a random number generator, pass e.g.::
-device virtio-rng-pci
These have been tested in QEMU 2.9.0 but should work in at least 2.5.0 as well.
Enabling TPMv2 support
+5 -2
View File
@@ -20,6 +20,7 @@ The support for following drivers are already enabled:
2. Microchip Clock Driver.
3. Cadence MACB ethernet driver for networking support.
4. Cadence MMC Driver for eMMC/SD support.
5. Microchip I2C Driver.
Booting from eMMC using HSS
---------------------------
@@ -214,7 +215,8 @@ GPT partition.
Booting
~~~~~~~
You should see the U-Boot prompt on UART0.
You should see the U-Boot prompt on UART1.
(Note: UART0 is reserved for HSS)
Sample boot log from MPFS Icicle Kit
''''''''''''''''''''''''''''''''''''
@@ -451,7 +453,8 @@ copied payload and Linux image.
sudo dd if=<payload_binary> of=/dev/sdX2 bs=512
You should see the U-Boot prompt on UART0.
You should see the U-Boot prompt on UART1.
(Note: UART0 is reserved for HSS)
GUID type
~~~~~~~~~
+1 -1
View File
@@ -49,7 +49,7 @@ OP-TEE:
.. code-block:: text
$ make PLATFORM=k3-am65x CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=2 CFG_CONSOLE_UART=1
$ make PLATFORM=k3-am65x CFG_ARM64_core=y CFG_TEE_CORE_LOG_LEVEL=2 CFG_CONSOLE_UART=1 CFG_USER_TA_TARGETS="ta_arm64"
U-Boot:
+31
View File
@@ -534,3 +534,34 @@ Sample boot log from HiFive Unmatched board
OpenEmbedded nodistro.0 unmatched ttySIF0
unmatched login:
Booting from SPI
----------------
Use Building steps from "Booting from uSD using U-Boot SPL" section.
Partition the SPI in Linux via mtdblock. The partition types here are
"HiFive Unleashed FSBL", "HiFive Unleashed BBL", and "U-Boot environment"
for partitions one through three respectively.
.. code-block:: none
sgdisk --clear -a 1 \
--new=1:40:2087 --change-name=1:spl --typecode=1:5B193300-FC78-40CD-8002-E86C45580B47 \
--new=2:2088:10279 --change-name=2:uboot --typecode=2:2E54B353-1271-4842-806F-E436D6AF6985 \
--new=3:10280:10535 --change-name=3:env --typecode=3:3DE21764-95BD-54BD-A5C3-4ABE786F38A8 \
/dev/mtdblock0
Write U-boot SPL and U-boot to their partitions.
.. code-block:: none
dd if=u-boot-spl.bin of=/dev/mtdblock0 bs=4096 seek=5 conv=sync
dd if=u-boot.itb of=/dev/mtdblock0 bs=4096 seek=261 conv=sync
Power off the board.
Change DIP switches MSEL[3:0] to 0110.
Power up the board.
+8 -8
View File
@@ -4,7 +4,7 @@
Tracing in U-Boot
=================
U-Boot supports a simple tracing feature which allows a record of excecution
U-Boot supports a simple tracing feature which allows a record of execution
to be collected and sent to a host machine for analysis. At present the
main use for this is to profile boot time.
@@ -161,10 +161,10 @@ limit of the trace buffer size you have specified. Once that is exhausted
no more data will be collected.
Collecting trace data has an affect on execution time/performance. You
will notice this particularly with trvial functions - the overhead of
will notice this particularly with trivial functions - the overhead of
recording their execution may even exceed their normal execution time.
In practice this doesn't matter much so long as you are aware of the
effect. Once you have done your optimisations, turn off tracing before
effect. Once you have done your optimizations, turn off tracing before
doing end-to-end timing.
The best time to start tracing is right at the beginning of U-Boot. The
@@ -184,7 +184,7 @@ the OS. In practical terms, U-Boot runs the 'fakegocmd' environment
variable at this point. This variable should have a short script which
collects the trace data and writes it somewhere.
Trace data collection relies on a microsecond timer, accesed through
Trace data collection relies on a microsecond timer, accessed through
timer_get_us(). So the first think you should do is make sure that
this produces sensible results for your board. Suitable sources for
this timer include high resolution timers, PWMs or profile timers if
@@ -285,7 +285,7 @@ Options
Specify U-Boot map file
-p <trace_file>
Specifiy profile/trace file
Specify profile/trace file
Commands:
@@ -315,11 +315,11 @@ time:
2. Build U-Boot with tracing and run it. Note the difference in boot time
(it is common for tracing to add 10% to the time)
3. Collect the trace information as descibed above. Use this to find where
3. Collect the trace information as described above. Use this to find where
all the time is being spent.
4. Take a look at that code and see if you can optimise it. Perhaps it is
possible to speed up the initialisation of a device, or remove an unused
4. Take a look at that code and see if you can optimize it. Perhaps it is
possible to speed up the initialization of a device, or remove an unused
feature.
5. Rebuild, run and collect again. Compare your results.
+4 -4
View File
@@ -620,12 +620,12 @@ EFI_DRIVER_BINDING_PROTOCOL implementation for the UEFI drivers.
A linker created list is used to keep track of the UEFI drivers. To create an
entry in the list the UEFI driver uses the U_BOOT_DRIVER macro specifying
UCLASS_EFI as the ID of its uclass, e.g::
UCLASS_EFI_LOADER as the ID of its uclass, e.g::
/* Identify as UEFI driver */
U_BOOT_DRIVER(efi_block) = {
.name = "EFI block driver",
.id = UCLASS_EFI,
.id = UCLASS_EFI_LOADER,
.ops = &driver_ops,
};
@@ -651,8 +651,8 @@ UEFI block IO driver
The UEFI block IO driver supports devices exposing the EFI_BLOCK_IO_PROTOCOL.
When connected it creates a new U-Boot block IO device with interface type
IF_TYPE_EFI, adds child controllers mapping the partitions, and installs the
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL on these. This can be used together with the
IF_TYPE_EFI_LOADER, adds child controllers mapping the partitions, and installs
the EFI_SIMPLE_FILE_SYSTEM_PROTOCOL on these. This can be used together with the
software iPXE to boot from iSCSI network drives [4].
This driver is only available if U-Boot is configured with::
+1 -1
View File
@@ -102,7 +102,7 @@ Manually Loading and Applying Overlays
::
=> fdtaddr $fdtaddr
=> fdt addr $fdtaddr
4. Grow it enough so it can encompass all applied overlays
+33
View File
@@ -61,6 +61,39 @@ config TPL_BLOCK_CACHE
help
This option enables the disk-block cache in TPL
config EFI_MEDIA
bool "Support EFI media drivers"
default y if EFI || SANDBOX
help
Enable this to support media devices on top of UEFI. This enables
just the uclass so you also need a specific driver to make this do
anything.
For sandbox there is a test driver.
if EFI_MEDIA
config EFI_MEDIA_SANDBOX
bool "Sandbox EFI media driver"
depends on SANDBOX
default y
help
Enables a simple sandbox media driver, used for testing just the
EFI_MEDIA uclass. It does not do anything useful, since sandbox does
not actually support running on top of UEFI.
config EFI_MEDIA_BLK
bool "EFI media block driver"
depends on EFI_APP
default y
help
Enables a block driver for providing access to UEFI devices. This
allows use of block devices detected by the underlying UEFI
implementation. With this it is possible to use filesystems on these
devices, for example.
endif # EFI_MEDIA
config IDE
bool "Support IDE controllers"
select HAVE_BLOCK_DEVICE
+4
View File
@@ -14,3 +14,7 @@ obj-$(CONFIG_IDE) += ide.o
endif
obj-$(CONFIG_SANDBOX) += sandbox.o
obj-$(CONFIG_$(SPL_TPL_)BLOCK_CACHE) += blkcache.o
obj-$(CONFIG_EFI_MEDIA) += efi-media-uclass.o
obj-$(CONFIG_EFI_MEDIA_SANDBOX) += sb_efi_media.o
obj-$(CONFIG_EFI_MEDIA_BLK) += efi_blk.o
+4 -2
View File
@@ -28,7 +28,8 @@ static const char *if_typename_str[IF_TYPE_COUNT] = {
[IF_TYPE_SATA] = "sata",
[IF_TYPE_HOST] = "host",
[IF_TYPE_NVME] = "nvme",
[IF_TYPE_EFI] = "efi",
[IF_TYPE_EFI_MEDIA] = "efi",
[IF_TYPE_EFI_LOADER] = "efiloader",
[IF_TYPE_VIRTIO] = "virtio",
[IF_TYPE_PVBLOCK] = "pvblock",
};
@@ -44,7 +45,8 @@ static enum uclass_id if_type_uclass_id[IF_TYPE_COUNT] = {
[IF_TYPE_SATA] = UCLASS_AHCI,
[IF_TYPE_HOST] = UCLASS_ROOT,
[IF_TYPE_NVME] = UCLASS_NVME,
[IF_TYPE_EFI] = UCLASS_EFI,
[IF_TYPE_EFI_MEDIA] = UCLASS_EFI_MEDIA,
[IF_TYPE_EFI_LOADER] = UCLASS_EFI_LOADER,
[IF_TYPE_VIRTIO] = UCLASS_VIRTIO,
[IF_TYPE_PVBLOCK] = UCLASS_PVBLOCK,
};
+15
View File
@@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Uclass for EFI media devices
*
* Copyright 2021 Google LLC
*/
#include <common.h>
#include <dm.h>
UCLASS_DRIVER(efi_media) = {
.id = UCLASS_EFI_MEDIA,
.name = "efi_media",
.flags = DM_UC_FLAG_SEQ_ALIAS,
};
+115
View File
@@ -0,0 +1,115 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Block driver for EFI devices
* This supports a media driver of UCLASS_EFI with a child UCLASS_BLK
* It allows block-level access to EFI devices made available via EFI boot
* services
*
* Copyright 2021 Google LLC
*/
#include <common.h>
#include <blk.h>
#include <dm.h>
#include <efi.h>
#include <efi_api.h>
struct efi_block_plat {
struct efi_block_io *blkio;
};
/**
* Read from block device
*
* @dev: device
* @blknr: first block to be read
* @blkcnt: number of blocks to read
* @buffer: output buffer
* Return: number of blocks transferred
*/
static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
void *buffer)
{
struct efi_block_plat *plat = dev_get_plat(dev);
struct efi_block_io *io = plat->blkio;
efi_status_t ret;
log_debug("read buf=%p, block=%lx, count=%lx: ", buffer, (ulong)blknr,
(ulong)blkcnt);
ret = io->read_blocks(io, io->media->media_id, blknr,
blkcnt * io->media->block_size, buffer);
log_debug("ret=%lx (dec %ld)\n", ret & ~EFI_ERROR_MASK,
ret & ~EFI_ERROR_MASK);
if (ret)
return 0;
return blkcnt;
}
/**
* Write to block device
*
* @dev: device
* @blknr: first block to be write
* @blkcnt: number of blocks to write
* @buffer: input buffer
* Return: number of blocks transferred
*/
static ulong efi_bl_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt,
const void *buffer)
{
struct efi_block_plat *plat = dev_get_plat(dev);
struct efi_block_io *io = plat->blkio;
efi_status_t ret;
log_debug("write buf=%p, block=%lx, count=%lx: ", buffer, (ulong)blknr,
(ulong)blkcnt);
ret = io->write_blocks(io, io->media->media_id, blknr,
blkcnt * io->media->block_size, (void *)buffer);
log_debug("ret=%lx (dec %ld)\n", ret & ~EFI_ERROR_MASK,
ret & ~EFI_ERROR_MASK);
if (ret)
return 0;
return blkcnt;
}
/* Block device driver operators */
static const struct blk_ops efi_blk_ops = {
.read = efi_bl_read,
.write = efi_bl_write,
};
U_BOOT_DRIVER(efi_block) = {
.name = "efi_block",
.id = UCLASS_BLK,
.ops = &efi_blk_ops,
.plat_auto = sizeof(struct efi_block_plat),
};
static int efi_media_bind(struct udevice *dev)
{
struct efi_media_plat *plat = dev_get_plat(dev);
struct efi_block_plat *blk_plat;
struct udevice *blk;
int ret;
ret = blk_create_devicef(dev, "efi_block", "blk", IF_TYPE_EFI_MEDIA,
dev_seq(dev), plat->blkio->media->block_size,
plat->blkio->media->last_block, &blk);
if (ret) {
debug("Cannot create block device\n");
return ret;
}
blk_plat = dev_get_plat(blk);
blk_plat->blkio = plat->blkio;
return 0;
}
U_BOOT_DRIVER(efi_media) = {
.name = "efi_media",
.id = UCLASS_EFI_MEDIA,
.bind = efi_media_bind,
.plat_auto = sizeof(struct efi_media_plat),
};
+20
View File
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* EFI_MEDIA driver for sandbox
*
* Copyright 2021 Google LLC
*/
#include <common.h>
#include <dm.h>
static const struct udevice_id sandbox_efi_media_ids[] = {
{ .compatible = "sandbox,efi-media" },
{ }
};
U_BOOT_DRIVER(sandbox_efi_media) = {
.name = "sandbox_efi_media",
.id = UCLASS_EFI_MEDIA,
.of_match = sandbox_efi_media_ids,
};
+6 -3
View File
@@ -4,14 +4,17 @@
* Copyright 2019 NXP
*/
#define LOG_CATEGORY UCLASS_CLK
#include <common.h>
#include <asm/io.h>
#include <malloc.h>
#include <clk.h>
#include <clk-uclass.h>
#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <dm/device.h>
#include <dm/devres.h>
#include <linux/clk-provider.h>
#include <clk.h>
#include <linux/err.h>
#include "clk.h"
+5 -1
View File
@@ -9,14 +9,18 @@
*
*/
#define LOG_CATEGORY UCLASS_CLK
#include <common.h>
#include <asm/io.h>
#include <malloc.h>
#include <clk-uclass.h>
#include <log.h>
#include <dm/device.h>
#include <dm/devres.h>
#include <dm/uclass.h>
#include <dm/lists.h>
#include <dm/device_compat.h>
#include <dm/device-internal.h>
#include <linux/bug.h>
#include <linux/clk-provider.h>
@@ -190,7 +194,7 @@ static struct clk *_register_divider(struct device *dev, const char *name,
if (clk_divider_flags & CLK_DIVIDER_HIWORD_MASK) {
if (width + shift > 16) {
pr_warn("divider value exceeds LOWORD field\n");
dev_warn(dev, "divider value exceeds LOWORD field\n");
return ERR_PTR(-EINVAL);
}
}
+9 -4
View File
@@ -5,17 +5,22 @@
*
* Copyright (C) 2011 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de>
*/
#define LOG_CATEGORY UCLASS_CLK
#include <common.h>
#include <malloc.h>
#include <clk.h>
#include <clk-uclass.h>
#include <div64.h>
#include <log.h>
#include <malloc.h>
#include <dm/device.h>
#include <dm/devres.h>
#include <linux/clk-provider.h>
#include <div64.h>
#include <clk.h>
#include "clk.h"
#include <linux/err.h>
#include "clk.h"
#define UBOOT_DM_CLK_IMX_FIXED_FACTOR "ccf_clk_fixed_factor"
static ulong clk_factor_recalc_rate(struct clk *clk)
+10 -5
View File
@@ -7,18 +7,23 @@
* Gated clock implementation
*/
#define LOG_CATEGORY UCLASS_CLK
#include <common.h>
#include <asm/io.h>
#include <malloc.h>
#include <clk.h>
#include <log.h>
#include <clk-uclass.h>
#include <malloc.h>
#include <asm/io.h>
#include <dm/device.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <linux/bitops.h>
#include <linux/clk-provider.h>
#include <clk.h>
#include "clk.h"
#include <linux/err.h>
#include "clk.h"
#define UBOOT_DM_CLK_GATE "clk_gate"
/**
@@ -123,7 +128,7 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
if (clk_gate_flags & CLK_GATE_HIWORD_MASK) {
if (bit_idx > 15) {
pr_err("gate bit exceeds LOWORD field\n");
dev_err(dev, "gate bit exceeds LOWORD field\n");
return ERR_PTR(-EINVAL);
}
}
+9 -4
View File
@@ -21,17 +21,22 @@
* clock.
*/
#define LOG_CATEGORY UCLASS_CLK
#include <common.h>
#include <clk.h>
#include <clk-uclass.h>
#include <log.h>
#include <malloc.h>
#include <asm/io.h>
#include <dm/device.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
#include <dm/uclass.h>
#include <linux/bitops.h>
#include <malloc.h>
#include <asm/io.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include "clk.h"
#define UBOOT_DM_CLK_CCF_MUX "ccf_clk_mux"
@@ -123,7 +128,7 @@ static int clk_mux_set_parent(struct clk *clk, struct clk *parent)
index = clk_fetch_parent_index(clk, parent);
if (index < 0) {
printf("Could not fetch index\n");
log_err("Could not fetch index\n");
return index;
}
@@ -169,7 +174,7 @@ struct clk *clk_hw_register_mux_table(struct device *dev, const char *name,
if (clk_mux_flags & CLK_MUX_HIWORD_MASK) {
width = fls(mask) - ffs(mask) + 1;
if (width + shift > 16) {
pr_err("mux value exceeds LOWORD field\n");
dev_err(dev, "mux value exceeds LOWORD field\n");
return ERR_PTR(-EINVAL);
}
}
Loaded 100 of 182 files, more files were not shown because too many files have changed in this diff. Show more