Stephan Gerhold [Thu, 8 Jul 2021 18:33:48 +0000 (20:33 +0200)]
power: pmic: Add driver for ST-Ericsson AB8500 via PRCMU
All devices based on ST-Ericsson Ux500 use a PMIC similar to AB8500
(Analog Baseband). There is AB8500, AB8505, AB9540 and AB8540
although in practice only AB8500 and AB8505 are relevant since the
platforms with AB9540 and AB8540 were cancelled and never used in
production.
In general, the AB8500 PMIC uses I2C as control interface, where the
different register banks are represented as separate I2C devices.
However, in practice AB8500 is always connected to a special I2C bus
on the DB8500 SoC that is controlled by the power/reset/clock
management unit (PRCMU) firmware.
Add a simple driver that allows reading/writing registers of the
AB8500 PMIC. The driver directly accesses registers from the PRCMU
parent device (represented by syscon in U-Boot). Abstracting it
further (e.g. with the i2c uclass) would not provide any advantage
because the PRCMU I2C bus is always just connected to AB8500 and
vice-versa.
The ab8500.h header is mostly taken as-is from Linux (with some
minor adjustments) to allow using similar code in both Linux and
U-Boot.
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Stephan Gerhold [Wed, 7 Jul 2021 10:58:55 +0000 (12:58 +0200)]
board: stemmy: Copy atags for booting downstream/vendor kernel
The U-Boot "stemmy" board is mainly intended to simplify booting
mainline Linux on various smartphones from Samsung based on ST-Ericsson
Ux500. While the mainline kernel is working great, there are still some
features missing there. In particular, it is currently not possible to
charge the battery when using the mainline kernel.
This means that it is still necessary to boot the downstream/vendor
kernel from Samsung sometimes to charge the device. That kernel is
ancient, still uses board files + ATAGS instead of device trees and
relies on a strange very long kernel command line hardcoded in the
Samsung bootloader.
Actually, since mainline is booted with device trees there is a very
simple way to make the old downstream kernel work as well: We can
simply take most of the ATAGS passed to U-Boot from the Samsung
bootloader and copy them as-is when booting a kernel without device
tree. That way the long command line and other needed ATAGS are copied
as-is without having to bother with them.
The only exception is the ATAG_INITRD - since the initrd is loaded
by U-Boot, the atag for that should be generated in U-Boot so it points
to the correct address. All other ATAGS are copied as-is and not
generated in U-Boot.
Also use the chance and provide a serial# for U-Boot by parsing the
ATAG_SERIAL that is also passed by the Samsung bootloader.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Stephan Gerhold [Wed, 7 Jul 2021 10:58:54 +0000 (12:58 +0200)]
board: stemmy: Parse atags to get available memory
At the moment the "stemmy" board attempts to detect the RAM size with
a simple memory test (get_ram_size()). Unfortunately, this does not work
correctly for devices with 768 MiB RAM (e.g. Samsung Galaxy Ace 2
(GT-I8160), "codina"). Reading/writing memory after the 768 MiB RAM
succeeds but actually overwrites some earlier parts of the memory.
For U-Boot this does not result in any major problems, but on Linux
this will eventually lead to strange crashes because of the memory
corruption.
Since the "stemmy" U-Boot port is designed to be chainloaded from
the original Samsung bootloader, the most reliable way to get the
available amount of RAM is to look at the ATAGS passed by the Samsung
bootloader. Fortunately, the header used to generate ATAGS in U-Boot
(asm/setup.h) can also be easily used to parse them.
Also clarify and simplify stemmy.h a bit to make it more clear where
some of the magic values in there are actually coming from.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Kunihiko Hayashi [Tue, 6 Jul 2021 10:01:11 +0000 (19:01 +0900)]
ARM: dts: uniphier: Add support for Akebi96
Add the device tree for Akebi96. Akebi96 is a 96boards certified
development board based on UniPhier LD20.
( https://www.96boards.org/product/akebi96/ )
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Kunihiko Hayashi [Tue, 6 Jul 2021 10:01:10 +0000 (19:01 +0900)]
configs: uniphier: Enable CONFIG_SYS_PCI_64BIT
Enable CONFIG_SYS_PCI_64BIT to allow 64bit access to PCI space.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Kunihiko Hayashi [Tue, 6 Jul 2021 10:01:09 +0000 (19:01 +0900)]
pci: uniphier: Add UniPhier PCIe controller driver
Add PCIe driver for UniPhier SoCs. This PCIe controller is based on
Synopsys DesignWare Core IP.
This version doesn't apply common DW functions because supported
controller doesn't have unroll version of iATU.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Kunihiko Hayashi [Tue, 6 Jul 2021 10:01:08 +0000 (19:01 +0900)]
phy: socionext: Add UniPhier PCIe PHY driver
Add PCIe PHY driver support for Pro5, LD20 and PXs3 SoCs.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Kunihiko Hayashi [Tue, 6 Jul 2021 10:01:07 +0000 (19:01 +0900)]
reset: uniphier: Add PCIe reset entry
Add reset control for PCIe controller on each SoC.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Kunihiko Hayashi [Tue, 6 Jul 2021 10:01:06 +0000 (19:01 +0900)]
clk: uniphier: Add PCIe clock entry
Add clock control for PCIe controller on each SoC.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Ley Foon Tan [Tue, 6 Jul 2021 02:20:27 +0000 (10:20 +0800)]
MAINTAINERS, git-mailrc: socfpga: Change co-maintainer to Tien Fong Chee
I'm no longer work in Intel, change Intel SoCFPGA co-maintainer to
Tien Fong Chee.
Signed-off-by: Ley Foon Tan <lftan.linux@gmail.com>
Acked-by: Marek Vasut <marex@denx.de>
Stephan Gerhold [Mon, 5 Jul 2021 12:18:47 +0000 (14:18 +0200)]
arm: mach-snapdragon: pinctrl: Place pin_name in .data section
According to arch/arm/lib/crt0_64.S, the BSS section is "UNAVAILABLE"
and uninitialized before relocation. Also, it overlaps with the
appended DTB before relocation, so writing data into a variable
in the BSS section might corrupt the appended DTB.
Unfortunately, pinctrl-apq8016.c and pinctrl-apq8096.c do place the
"pin_name" variable in the BSS section (since it's uninitialized).
It's also used before relocation, when setting up the pinctrl for
the serial driver.
On DB410c this causes "GPIO_5" to be written into some part of an
appended DTB, e.g.:
80111820:
edfe0dd0 9f100000 38000000 c00e0000 ...........8....
80111830:
28000000 11000000 10000000 00000000 ...(............
80111840:
4f495047 8800355f 00000000 00000000 GPIO_5..........
80111850:
00000000 00000000 01000000 00000000 ................
80111860:
03000000 04000000 00000000 02000000 ................
80111870:
03000000 04000000 0f000000 02000000 ................
80111880:
03000000 2d000000 1b000000 6c617551 .......-....Qual
80111890:
6d6d6f63 63655420 6c6f6e68 6569676f comm Technologie
Depending on the part of the DTB that is corrupted this might not
cause any problems, but it can also result in strange reboots
without any serial output.
Fortunately, in practice this does not cause issues on DB410c yet
because board_fdt_blob_setup() in dragonboard410c.c currently
overrides the appended DTB with the one passed by the previous
bootloader (LK) (which does not get corrupted).
DB820c does not have board_fdt_blob_setup() so I would expect it to
be affected by this problem. Perhaps everyone was just fortunate to
not compile an U-Boot configuration where the pin_name corrupts an
important part of the DTB.
Make sure "pin_name" is explicitly placed in the .data section
instead of .bss to fix this.
Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Marek Vasut [Sun, 4 Jul 2021 19:32:05 +0000 (21:32 +0200)]
board-info: Call sysinfo_detect() before sysinfo_get_str()
The sysinfo_get_str() implementation checks whether the sysinfo was even
detected. In U-Boot proper, sysinfo_detect() is not called anywhere but
on one specific board. Call sysinfo_detect() before sysinfo_get_str() to
make sure the sysinfo is detected and sysinfo_get_str() returns valid
value instead of -EPERM.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Marek Vasut [Sun, 4 Jul 2021 19:32:04 +0000 (21:32 +0200)]
board-info: Use sysinfo_get()
Replace uclass_first_device_err(UCLASS_SYSINFO, &dev) with sysinfo_get(&dev).
The board_info code may use sysinfo to print board information, so use the
sysinfo functions consistently. The sysinfo_get() is internally implemented
as return uclass_first_device_err(UCLASS_SYSINFO, &dev) anyway, so there is
no functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Marek Vasut [Sun, 4 Jul 2021 19:31:18 +0000 (21:31 +0200)]
misc: i2c_eeprom: Add atmel,24c01 to the list
Linux kernel binding is using atmel,24c01 compatible string. On the
other hand there is atmel,24c01a which is not listed in the kernel.
Add compatible string without "a" suffix to be compatible with Linux
kernel binding.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Stephan Gerhold [Fri, 2 Jul 2021 16:00:13 +0000 (18:00 +0200)]
timer: nomadik-mtu: Use dev_read_addr_ptr()
Simplify the code a bit by using dev_read_addr_ptr() instead of
dev_read_addr(). This avoids having to cast explicitly to the
struct nomadik_mtu_regs.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Stephan Gerhold [Fri, 2 Jul 2021 15:06:18 +0000 (17:06 +0200)]
gpio: Add driver for Nomadik GPIO
Nomadik GPIO is a fairly simple GPIO module used in the ST-Ericsson
Ux500 SoCs (and some older Nomadik SoCs). It uses registers where
each GPIO is represented as a single bit, plus "set" and "clear"
registers that allow updating the state without having to read the
existing state.
The driver implements support for it for use together with DM_GPIO
and the existing ste-dbx5x0.dtsi device tree.
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Stephan Gerhold [Fri, 2 Jul 2021 15:06:17 +0000 (17:06 +0200)]
gpio: Drop long unused DB8500 GPIO driver
The original U-Boot port for the ST-Ericsson U8500 SoC was dropped
in commit
68282f55b846 ("arm: Remove unused ST-Ericsson u8500 arch").
Most of the drivers related to the old port were removed, but the
db8500_gpio.c driver was forgotten for some reason. There is no way
to select it and it does not compile anymore because of missing
headers, so let's just remove it.
The new port for U8500 introduced in commit
689088f9dae8
("arm: Add support for ST-Ericsson U8500 SoC") fully embraces the
new Driver Model and device trees where possible, so this is
preparation to add a new, simplified GPIO driver based on DM_GPIO.
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Anders Dellien [Tue, 15 Jun 2021 10:28:48 +0000 (11:28 +0100)]
board: armltd: Remove bootargs from Total Compute configuration
This information will be maintained in the device tree instead.
Signed-off-by: Anders Dellien <anders.dellien@arm.com>
Tom Rini [Tue, 13 Jul 2021 13:42:19 +0000 (09:42 -0400)]
Merge tag 'efi-2021-10-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2021-10-rc1
Documentation
* fix typo in signature.txt
UEFI
* provide file attributes in EFI_FILE_PROTOCOL.Read()
* various capsule update fixes
Masami Hiramatsu [Mon, 12 Jul 2021 09:05:17 +0000 (18:05 +0900)]
efi_loader: Fix to set bootdev_root correctly if bootdev found
Fix find_boot_device() to set bootdev_root if it finds the
bootdev from BootNext. Currently it sets the bootdev_root only
when it finds bootdev from BootOrder.
Fixes:
c74cd8bd08d1 ("efi_loader: capsule: add capsule_on_disk support")
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Accked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 10 Jul 2021 09:14:13 +0000 (11:14 +0200)]
efi_loader: set CapsuleLast after each capsule
If multiple capsules are applied, the FMP drivers for the individual
capsules can expect the value of CapsuleLast to be accurate. Hence
CapsuleLast must be updated after each capsule.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 10 Jul 2021 09:10:26 +0000 (11:10 +0200)]
efi_loader: missing EFI_CALL() in set_capsule_result
efi_set_variable() should be called with EFI_CALL(). Use
efi_set_variable_int() instead.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 10 Jul 2021 09:03:27 +0000 (11:03 +0200)]
efi_loader: rework messages for capsule updates
* Use log category LOGC_EFI. This allows to remove 'EFI:' prefixes in
messages.
* Rephrase some of the messages.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 15 May 2021 20:41:26 +0000 (22:41 +0200)]
efi_loader: provide file attributes in EFI_FILE_PROTOCOL.Read()
When reading a directory using EFI_FILE_PROTOCOL.Read() provide file
attributes and timestamps.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Mon, 14 Jun 2021 16:47:09 +0000 (18:47 +0200)]
lib: remove superfluous #ifdefs from date.c
We should avoid #ifdef in C modules. Unused functions are eliminated by the
linker.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 15 May 2021 20:06:16 +0000 (22:06 +0200)]
fs: fat: add file attributes to struct fs_dirent
When reading a directory in the UEFI file system we have to return file
attributes and timestamps. Copy this data to the directory entry structure.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Thomas Perrot [Fri, 2 Jul 2021 09:32:37 +0000 (11:32 +0200)]
doc: fix typo in signature.txt
Fix value fields in signature nodes.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Stefano Babic [Sat, 10 Jul 2021 14:31:29 +0000 (16:31 +0200)]
spi: mxc_spi: fix warnings if CLK_ENABLED not set
Following warnings (unused variables) are raised:
drivers/spi/mxc_spi.c: In function 'mxc_spi_probe':
drivers/spi/mxc_spi.c:595:14: error: unused variable 'blob' [-Werror=unused-variable]
595 | const void *blob = gd->fdt_blob;
| ^~~~
drivers/spi/mxc_spi.c:594:6: error: unused variable 'node' [-Werror=unused-variable]
594 | int node = dev_of_offset(bus);
Move the variable declaration inside the code where they are used.
Signed-off-by: Stefano Babic <sbabic@denx.de>
Cody Gray [Sun, 27 Jun 2021 05:15:22 +0000 (22:15 -0700)]
mx6sabresd: Make checkboard respect CONFIG_NXP_BOARD_REVISION
The default implementation of checkboard() calls the
nxp_board_rev_string() function
to retrieve a character representing the revision number of the board.
However, this
attempt to retrieve the revision number may fail in certain situations or be
otherwise undesirable.
There is already a configuration option to avoid retrieving the
revision number of
the board: CONFIG_NXP_BOARD_REVISION. In fact, if this option is enabled, the
nxp_board_rev_string() function's definition will be omitted entirely,
meaning that the previous implementation of checkboard() would result
in a linker error.
This changeset makes the default implementation of checkboard() respect the
CONFIG_NXP_BOARD_REVISION configuration option, only attempting to retrieve
the board revision number if that option is defined.
Signed-off-by: Cody Gray <cody@codygray.com>
Marek Vasut [Sat, 3 Jul 2021 02:55:33 +0000 (04:55 +0200)]
ARM: imx: Pick correct eMMC boot partition from ROM log
In case the iMX8M boot from eMMC boot partition and the primary image
is corrupted, the BootROM is capable of starting a secondary image in
the other eMMC boot partition as a fallback.
However, the BootROM leaves the eMMC BOOT_PARTITION_ENABLE setting as
it was, i.e. pointing to the boot partition containing the corrupted
image, and the BootROM does not provide any indication that this sort
of fallback occured.
According to AN12853 i.MX ROMs Log Events, Rev. 0, May 2020, it is
possible to determine whether fallback event occurred by parsing the
ROM event log. In case ROM event ID 0x51 is present, fallback event
did occur.
This patch implements ROM event log parsing and search for event ID
0x51 for all iMX8M SoCs, and based on that corrects the eMMC boot
partition selection. This way, the SPL loads the remaining boot
components from the same eMMC boot partition from which it was
started, even in case of the fallback.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Harald Seiler <hws@denx.de>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Ye Li <ye.li@nxp.com>
Marek Vasut [Sat, 3 Jul 2021 02:55:32 +0000 (04:55 +0200)]
spl: mmc: Factor out eMMC boot partition selection code
Factor out eMMC boot partition selection code into
default_spl_mmc_emmc_boot_partition() function and implement
weak spl_mmc_emmc_boot_partition(), so that architecture or
board code can override the eMMC boot partition selection.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Harald Seiler <hws@denx.de>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Ye Li <ye.li@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Tim Harvey [Thu, 1 Jul 2021 00:07:42 +0000 (17:07 -0700)]
board: gateworks: venice: remove forced enable of GSC thermal protection
The Gateworks System Controller thermal protection feature will disable
the board primary power supply if the on-board temperature sensor
reaches 86C. In many cases this could occur before the temperature
critical components such as CPU, DRAM, eMMC, and power supplies have
reached their max temperature.
Remove the forced re-enable of thermal protection so that users can
knowingly disable it.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Thu, 1 Jul 2021 00:07:41 +0000 (17:07 -0700)]
board: gateworks: venice: add ftd_file env vars on boot
The ftd_file* vars can be used by bootscripts to look for
appropriate dtb's
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Thu, 1 Jul 2021 00:07:40 +0000 (17:07 -0700)]
board: gateworks: venice: display DTB used
Display the DTB file used for U-Boot.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Thu, 1 Jul 2021 00:07:39 +0000 (17:07 -0700)]
board: gateworks: venice: gsc: fix voltage offset
The voltage offset property is in microvolts so must be scaled
accordingly.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Thu, 1 Jul 2021 00:07:38 +0000 (17:07 -0700)]
board: gateworks: venice: gsc: fix typo
Fix typo in error message.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:10 +0000 (16:50 -0700)]
configs: imx8mm_venice_defconfig: add support for gbe switch
The imx8mm-venice-gw7901 board has an I2C connected KSZ9897S GbE switch
with an IMX8MM FEC MAC master connected via RGMII_ID.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:09 +0000 (16:50 -0700)]
arm: dts: imx8mm-venice-gw7901.dts: fix dsa switch configuration
Fix the dsa switch config:
- remove the unnecessary phy-mode from the switch itself
- added the necessary fixed-link node to the non-cpu ports required
for U-Boot DSA
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:08 +0000 (16:50 -0700)]
net: add support for KSZ9477/KSZ9897/KSZ9567 GbE switch
The Microchip KSZ9477/KSZ9897/KSZ9567 7-Port Gigabit Ethernet Switches
support SGMII/RGMII/MII/RMII with register access via SPI, I2C, or MDIO.
This driver currently supports I2C register access but SPI or MDIO register
access can be easily added at a later time.
Tagging is not implemented and instead the active port is tracked to
avoid needing a tag to store port information.
This was tested with the imx8mm-venice-gw7901 board which has a
KSZ9897S switch with an IMX8MM FEC MAC master connected via RGMII_ID.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:07 +0000 (16:50 -0700)]
net: dsa: enable master promisc mode if available and needed
If ports have their own unique MAC addrs and master has a set_promisc
function, call it so that packets will be received for ports.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:06 +0000 (16:50 -0700)]
net: fec: add set_promisc function
Enabling promiscuous mode is necessary if FEC is the master of a DSA
switch driver where each port has their own MAC address.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:05 +0000 (16:50 -0700)]
net: add set_promisc function to enable/disable Promiscuous mode
Enabling promiscuous mode can be useful for DSA switches where each port
has its own MAC address.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:04 +0000 (16:50 -0700)]
net: fec: set phy_of_node properly for fixed-link phy
If the FEC is connected to a fixed-link (upstream switch port for
example) the phy_of_node should be set to the fixed-link node
so that speed and other properties can be found properly.
In addition fix a typo in the debug string.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:03 +0000 (16:50 -0700)]
net: fec: use device sequence vs index when fetching fec
When using uclass_get_device* to get the FEC device we need to use
device sequence instead of index into UCLASS_ETH. In systems where for
example a I2C based DSA switch exists it will probe before the FEC
master and its ports will be registered first and have the first
indexes yet the FEC's sequence comes from the device-tree alias.
Take for example the imx8mm-venice-gw7901 board which has an i2c based
DSA switch:
u-boot=> net list
eth1 : lan1 00:0d:8d:aa:00:2f
eth2 : lan2 00:0d:8d:aa:00:30
eth3 : lan3 00:0d:8d:aa:00:31
eth4 : lan4 00:0d:8d:aa:00:32
eth0 : ethernet@
30be0000 00:0d:8d:aa:00:2e active
Thus in this case uclass_get_device(UCLASS_ETH, 0, &dev) returns lan1
which is wrong but uclass_get_device_seq(UCLASS_ETH, 0, &dev) returns
ethernet@30be000 which is correct.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Tim Harvey [Wed, 30 Jun 2021 23:50:02 +0000 (16:50 -0700)]
board: gateworks: venice: add imx8mm-gw7901 support
The Gateworks GW7901 is an ARM based single board computer (SBC)
featuring:
- i.MX8M Mini SoC
- LPDDR4 DRAM
- eMMC FLASH
- SPI FRAM
- Gateworks System Controller (GSC)
- Atmel ATECC Crypto Authentication
- USB 2.0
- Microchip GbE Switch
- Multiple multi-protocol RS232/RS485/RS422 Serial ports
- onboard 802.11ac WiFi / BT
- microSD socket
- miniPCIe socket with PCIe, USB 2.0 and dual SIM sockets
- Wide range DC power input
- 802.3at PoE
To add support for this board:
- add dts from Linux (accepted for v5.14)
- add SPL PMIC config
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Frieder Schrempf [Mon, 7 Jun 2021 12:36:42 +0000 (14:36 +0200)]
spi: fsl_qspi: Build driver only if DM_SPI is available
The driver depends on DM_SPI and if it's not available (e. g. in SPL),
then we should not try to build it as this will fail.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Kacper Kubkowski [Wed, 12 May 2021 13:25:48 +0000 (15:25 +0200)]
arm/mach-imx: Fix macros in mmdc_size.c
Make macros actually use passed parameter instead of local variables
that happen
to be named the same as symbols in macro expansion.
Signed-off-by: Kacper Kubkowski <kkubkowski@fluence.pl>
Teresa Remmet [Wed, 7 Jul 2021 12:58:04 +0000 (12:58 +0000)]
board: phytec: imx8mp-phycore: Switch to binman
Use now binman for image creation.
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Teresa Remmet [Wed, 7 Jul 2021 12:58:03 +0000 (12:58 +0000)]
arm: dts: imx8mp-phyboard-pollux-rdk-u-boot: Add wdog pinctrl entry
Add missing pinctrl entry in spl.
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Teresa Remmet [Wed, 7 Jul 2021 12:58:02 +0000 (12:58 +0000)]
board: phytec: phycore-imx8mp: Enable DVS1 control
Enable DVS1 control through PMIC_STBY_REQ.
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Teresa Remmet [Wed, 7 Jul 2021 12:58:01 +0000 (12:58 +0000)]
board: phytec: phycore_imx8mp: Set VDD_ARM to 0,95V
Increase VDD_ARM to prevent timing issues as VDD_SOC is
used in OD mode. Also increase GIC clock.
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Teresa Remmet [Wed, 7 Jul 2021 12:58:00 +0000 (12:58 +0000)]
board: phytec: phycore_imx8mp: Add fec support
Enable support for the fec ethernet on phyCORE-i.MX8MP.
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Teresa Remmet [Wed, 7 Jul 2021 12:57:59 +0000 (12:57 +0000)]
board: phytec: phycore_imx8mp: Change debug UART
With the first redesign the debug UART had changed from
UART2 to UART1.
As the first hardware revision is considered as alpha and
will not be supported in future. The old setup will not
be preserved.
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Teresa Remmet [Wed, 7 Jul 2021 12:57:58 +0000 (12:57 +0000)]
arm: dts: imx8mp-phyboard-pollux: Sync dts files with kernel
This update includes eqos support and some minor changes.
Synced with kernel commit
412627f6ffe3 ("arm64: dts: imx8mp-phyboard-pollux-rdk: Add missing pinctrl entry")
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Teresa Remmet [Wed, 7 Jul 2021 12:57:57 +0000 (12:57 +0000)]
arm: dts: imx8mp: Add common u-boot dtsi
Factor out the common node settings for dm-spl and dm-pre-reloc
and move them to imx8mp-u-boot.dtsi
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Teresa Remmet [Wed, 7 Jul 2021 12:57:56 +0000 (12:57 +0000)]
arm: dts: imx8mp: Resync imx8mp device tree include
Sync imx8mp include with kernel commit:
d1689cd3c0f4 ("arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3"")
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Tim Harvey [Tue, 6 Jul 2021 17:19:09 +0000 (10:19 -0700)]
pci: imx: use reset-gpios if defined by device-tree
If reset-gpio is defined by device-tree use that if
CONFIG_PCIE_IMX_PERST_GPIO is not defined.
Note that after this the following boards which define
CONFIG_PCIE_IMX_PERST_GPIO in their board header file as well as their
device-tree should be able to remove CONFIG_PCIE_IMX_PERST_GPIO without
consequence:
- mx6sabresd
- mx6sxsabresd
- novena
- tbs2910
- vining_2000
Note that the ge_bx50v3 board uses CONFIG_PCIE_IMX_PERST_GPIO and does
not have reset-gpios defined it it's pcie node in the dt thus removing
CONFIG_PCIE_IMX_PERST_GPIO globally can't be done until that board adds
reset-gpios.
Cc: Ian Ray <ian.ray@ge.com> (maintainer:GE BX50V3 BOARD)
Cc: Sebastian Reichel <sebastian.reichel@collabora.com> (maintainer:GE BX50V3 BOARD)
Cc: Fabio Estevam <festevam@gmail.com> (maintainer:MX6SABRESD BOARD)
Cc: Marek Vasut <marex@denx.de> (maintainer:NOVENA BOARD)
Cc: Soeren Moch <smoch@web.de> (maintainer:TBS2910 BOARD)
Cc: Silvio Fricke <open-source@softing.de> (maintainer:VINING_2000 BOARD)
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Fabio Estevam [Tue, 15 Jun 2021 23:38:40 +0000 (20:38 -0300)]
smegw01: Select the CMD_UNZIP option
Select the CMD_UNZIP option so that the 'gzwrite' command
can be used to flash .gz image into the eMMC.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Fabio Estevam [Tue, 15 Jun 2021 23:38:38 +0000 (20:38 -0300)]
smegw01: Allow booting the Yocto image by default
On the Yocto image there is a single partition and the kernel
and dtb are present in the 'boot' directory.
Change it accordingly so that the board can boot the Yocto
image by default.
Use the generic 'load' command instead, which is able to
read from an ext4 partition.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Tim Harvey [Fri, 11 Jun 2021 19:46:28 +0000 (12:46 -0700)]
imx: ventana: display 'none' for MMC if board does not have it
print 'None' instead of just a blank line if nothing is detected:
MMC: None
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:27 +0000 (12:46 -0700)]
imx: ventana: add support for DLC0700XDP21LF LCD display
Add LVDS support for DLC0700XDP21LF 7in 1024x600 display
(equivalent to the DLC-700JMGT4 with new touch controller)
Signed-off-by: Robert Jones <rjones@gateworks.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:26 +0000 (12:46 -0700)]
imx: ventana: display neteowrk PHY
Add displaying the detected network PHY on boot.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:25 +0000 (12:46 -0700)]
imx: ventana: add DP83867 PHY LED configuration
Add DP83867 PHY LED configuration.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:24 +0000 (12:46 -0700)]
imx: ventana: put LTC3676 regulators in continuous mode
In the default pulse-skipping mode regulators that are very lightly
loaded can fail to regulate properly. Switching them to always use
continuous mode causes only around 10mW of overall system power
difference in a lightly loaded system that isn't already operating
them in continuous mode.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:23 +0000 (12:46 -0700)]
imx: ventana: put PFUZ100 regulators in continuous mode
In the default 'auto' mode regulators that are very lightly loaded
can be put in PFM mode and fail to regulator properly. Switching them
to always use continuous PWM mode has a neglibable affect on system
power and garuntees proper regulation under lightly loaded circumstances.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:22 +0000 (12:46 -0700)]
imx: ventana: add PMIC fix for GW54xx-G
Substitutions in EOL parts changes the VDD_2P5 voltage rail such that
the previously unused VGEN6 LDO is needed in place of the lower power
VGEN5 for the GW54xx-G.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:21 +0000 (12:46 -0700)]
imx: ventana: add legacy uboot image support
Add Legacy U-Boot image support needed to boot a uImage.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:20 +0000 (12:46 -0700)]
imx: ventana: increase SYS_BOOTM_LEN
Increase SYS_BOOM_LEN from the default 16M in imx6_common to 64M.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:19 +0000 (12:46 -0700)]
imx: ventana: remove unneeded includes
remove unnecessary includes
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tim Harvey [Fri, 11 Jun 2021 19:46:18 +0000 (12:46 -0700)]
imx: ventana: remove USB_KEYBOARD support
For some time now having USB_KEYBOARD support has caused usb to be
initialized on boot. To allow for a quicker bootup we don't want this
for Ventana and don't really need USB keyboard support so remove it.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Frieder Schrempf [Mon, 7 Jun 2021 12:36:44 +0000 (14:36 +0200)]
imx8m: Restrict usable memory to space below 4G boundary
Some IPs have their accessible address space restricted by the
interconnect. Let's make sure U-Boot only ever uses the space below
the 4G address boundary (which is 3GiB big), even when the effective
available memory is bigger.
We implement board_get_usable_ram_top() for all i.MX8M SoCs, as the
whole family is affected by this.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Frieder Schrempf [Mon, 7 Jun 2021 12:36:43 +0000 (14:36 +0200)]
clk: imx8mm: Add SPI clocks
Add the clocks for the ECSPI controllers. This is ported from
Linux v5.13-rc4.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Frieder Schrempf [Mon, 7 Jun 2021 12:36:41 +0000 (14:36 +0200)]
mtd: spi-nor-ids: Add support for Macronix MX25V8035F and MX25R1635F
The MX25V8035F is a 8Mb SPI NOR flash and the MX25R1635F is very
similar, but has twice the size (16Mb) and supports a wider supply
voltage range.
They were tested on the Kontron Electronics i.MX6UL and i.MX8MM SoMs.
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Christoph Niedermaier [Wed, 5 May 2021 16:23:09 +0000 (18:23 +0200)]
ARM: imx6: Update dhelectronics/dh_imx6/MAINTAINERS file
Adding new DH electronics mailing list and update list of maintainers.
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Tom Rini [Sat, 10 Jul 2021 01:08:52 +0000 (21:08 -0400)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Aside from the usual fixes and updates one visible change is the
MMC update, which fixes some lingering bugs and gives a decent speed
increase on some boards (9->19 MB/s on H6, 21->43 MB/s on A64 eMMC).
I am keeping an watchful eye on bug reports here, to spot any correctness
regressions.
Another change is finally the enablement of the first USB host port on
many boards without micro-USB (data) sockets, like the Pine64 family.
That doubles the number of usable USB ports from 1 to 2 on those boards.
Some smaller fixes, 4GB DRAM support (on the H616) and a new board (ZeroPi)
conclude this first round of changes.
Compile-tested for all 157 sunxi boards, boot-tested on Pine H64,
Pine64-LTS, OrangePi Zero 2 and BananaPi M2 Berry.
Summary:
- DT update for H3/H5/H6
- Enable first USB port on boards without micro-USB
- ZeroPi board support
- 4GB DRAM support for H616 boards
- MMC fixes and speed improvement
- some fixes
Andre Przywara [Wed, 21 Apr 2021 08:33:04 +0000 (09:33 +0100)]
mmc: sunxi: Use mmc_of_parse()
At the moment the Allwinner MMC driver parses the bus-width and
non-removable DT properties itself, in the probe() routine.
There is actually a generic function provided by the MMC framework doing
this job, also it parses more generic properties like broken-cd and
advanced transfer modes.
Drop our own code and call mmc_of_parse() instead, to get all new
features for free.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Andre Przywara [Wed, 5 May 2021 10:33:40 +0000 (11:33 +0100)]
mmc: sunxi: Increase MMIO FIFO read performance
To avoid the complexity of DMA operations (with chained descriptors), we
use repeated MMIO reads and writes to the SD_FIFO_REG, which allows us
to drain or fill the MMC data buffer FIFO very easily.
However those MMIO accesses are somewhat costly, so this limits our MMC
performance, to between 17 and 22 MB/s, but down to 9.5 MB/s on the H6
(partly due to the lower AHB1 frequency).
As it turns out we read the FIFO status register after *every* word we
read or write, which effectively doubles the number of MMIO accesses,
thus effectively more than halving our performance.
To avoid this overhead, we can make use of the FIFO level bits, which are
in the very same FIFO status registers.
So for a read request, we now can collect as many words as the FIFO
level originally indicated, and only then need to update the status
register.
We don't know for sure the size of the FIFO (and it seems to differ
across SoCs anyway), so writing is more fragile, which is why we still
use the old method for that. If we find a minimum FIFO size available on
all SoCs, we could use that, in a later optimisation.
This patch increases the eMMC read speed on a Pine64-LTS from about
22MB/s to 44 MB/s. SD card reads don't gain that much, but with 23 MB/s
we now reach the practical limit for 3.3V SD cards.
On the H6 we double our transfer speed, from 9.5 MB/s to 19.7 MB/s.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Wed, 5 May 2021 09:06:24 +0000 (10:06 +0100)]
mmc: sunxi: Cleanup and fix self-calibration code
Newer SoCs have a self calibration feature, which avoids us writing hard
coded phase delay values into the controller.
Consolidate the code by avoiding unnecessary #ifdefs, and also enabling
the feature for all those newer SoCs.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Wed, 5 May 2021 09:04:41 +0000 (10:04 +0100)]
mmc: sunxi: Enable "new timing mode" on all new SoCs
All SoCs since the Allwinner A64 (H5, H6, R40, H616) feature the so
called "new timing mode", so enable this in Kconfig for those SoCs.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Wed, 5 May 2021 08:57:47 +0000 (09:57 +0100)]
mmc: sunxi: Cleanup "new timing mode" selection
Among the SoCs using the "new timing mode", only the A83T needs to
explicitly switch to that mode.
By just defining the symbol for that one odd A83T bit to 0 for any other
SoCs, we can always OR that in, and save the confusing nested #ifdefs.
Clean up the also confusing new_mode setting on the way.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Andre Przywara [Wed, 5 May 2021 08:57:47 +0000 (09:57 +0100)]
mmc: sunxi: Fix MMC clock parent selection
Most Allwinner SoCs which use the so called "new timing mode" in their
MMC controllers actually use the double-rate PLL6/PERIPH0 clock as their
parent input clock. This is interestingly enough compensated by a hidden
"by 2" post-divider in the mod clock, so the divider and actual output
rate stay the same.
Even though for the H6 and H616 (but only for them!) we use the doubled
input clock for the divider computation, we never accounted for the
implicit post-divider, so the clock was only half the speed on those SoCs.
This didn't really matter so far, as our slow MMIO routine limits the
transfer speed anyway, but we will fix this soon.
Clean up the code around that selection, to always use the normal PLL6
(PERIPH0(1x)) clock as an input. As the rate and divider are the same,
that makes no difference.
Explain the hardware differences in a comment.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Thu, 29 Apr 2021 08:31:58 +0000 (09:31 +0100)]
mmc: sunxi: Fix warnings with CONFIG_PHYS_64BIT
When enabling PHYS_64BIT on 32-bit platforms, we get two warnings about
pointer casts in sunxi_mmc.c. Those are related to MMIO addresses, which
are always below 1GB on all Allwinner SoCs, so there is no problem with
anything having more than 32 bits.
Add the proper casts to make it compile cleanly.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Andre Przywara [Fri, 18 Dec 2020 22:02:11 +0000 (22:02 +0000)]
mmc: sunxi: Avoid #ifdefs in delay and width setup
The delay and bus-width setup are slightly different across the
Allwinner SoC generations, and we covered this so far with some
preprocessor conditionals.
Use the more readable IS_ENABLE() instead.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Andre Przywara [Wed, 28 Apr 2021 20:29:55 +0000 (21:29 +0100)]
sunxi: H616: Enable full 4GB of DRAM
The H616 is our first supported Allwinner SoC which goes beyond the 4GB
address space "barrier", by having more than 32 address bits.
Lift the preliminary 3GB DRAM limit for the H616, and update the page
table setup on the way, to actually map that last GB as well.
As not all devices are actually capable of dealing with more than 32
bits (the DMA in the EMAC for instance), we also limit U-Boot's own
DRAM usage to 4GB on the way.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Sun, 25 Apr 2021 23:38:04 +0000 (00:38 +0100)]
sunxi: board: Add H616 MMC2 pins
We hardcode the pinctrl setting for the MMC controllers in boards.c,
since we need them also in the SPL, where there is no DT yet.
Add the respective setting for the H616 SoC, to enable eMMC on boards
with this SoC as well.
Also to make diagnosing this problem easier, print a warning if a board
tries to setup MMC2 pins without a respective SoC setting being defined.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan at amarulasolutions.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec at siol.net>
Yu-Tung Chang [Sat, 19 Jun 2021 08:16:45 +0000 (16:16 +0800)]
sunxi: h3: Add initial ZeroPi support
ZeroPi is a new board of high performance with low cost
designed by FriendlyElec., using the Allwinner H3 SOC.
ZeroPi features
- Allwinner H3, Quad-core Cortex-A7@1.2GHz
- 256MB/512MB DDR3 RAM
- microsd slot
- 10/100/1000Mbps Ethernet
- Debug Serial Port
- DC 5V/2A power-supply
Signed-off-by: Yu-Tung Chang <mtwget@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Jernej Skrabec [Mon, 7 Jun 2021 17:42:45 +0000 (19:42 +0200)]
configs: OrangePi PC2: Update defaults
OrangePi PC2 board has DRAM with ODT, so enable it.
H5 SoC is also connected to voltage regulator. It's default value is
reasonable at reset, but might be too low when rebooting with a lower
voltage programmed. In order to avoid instability, enable driver for it
and set it to appropriate voltage.
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>
[Andre: remove original ZQ value change, adjust commit message]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Wed, 5 May 2021 12:53:05 +0000 (13:53 +0100)]
sunxi: clock: H6/H616: Fix PLL clock factor encodings
Most clock factors and dividers in the H6 PLLs use a "+1 encoding",
which we were missing on two occasions.
This fixes the MMC clock setup on the H6, which could be slightly off due
to the wrong parent frequency:
mmc 2 set mod-clk req
52000000 parent
1176000000 n 2 m 12 rate
49000000
Also the CPU frequency (PLL1) was a tad too high before.
For PLL5 (DRAM) we already accounted for this +1, but in the DRAM code
itself, not in the bit field macro. Move this there to be aligned with
what the other SoCs and other PLLs do.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Paul Kocialkowski [Thu, 14 Mar 2019 10:38:00 +0000 (10:38 +0000)]
phy: sun4i-usb: Fix PHY0 routing and passby configuration for MUSB
Recent Allwinner platforms (starting with the H3) only use the MUSB
controller for peripheral mode and use HCI for host mode. As a result,
extra steps need to be taken to properly route USB signals to one or
the other. More precisely, the following is required:
* Routing the pins to either HCI/MUSB (controlled by PHY);
* Enabling USB PHY passby in HCI mode (controlled by PMU).
The current code will enable passby for each PHY and reroute PHY0 to
MUSB, which is inconsistent and results in broken USB peripheral support.
Passby on PHY0 must only be enabled when we want to use HCI. Since
host/device mode detection is not available from the PHY code and
because U-Boot does not support changing the mode dynamically anyway,
we can just mux the controller to MUSB if it is enabled and mux it to
HCI otherwise.
This fixes USB peripheral support for platforms with PHY0 dual-route,
especially H3/H5 and V3s.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Tue, 25 May 2021 00:20:25 +0000 (01:20 +0100)]
arm: dts: sunxi: h3: Update DT files
Update the H3 DT files from the Linux 5.12 release.
The changes update some boards, and don't affect U-Boot, but fix Gigabit
Ethernet when this DT is passed on to the Linux kernel.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Tue, 25 May 2021 00:20:25 +0000 (01:20 +0100)]
arm: dts: sunxi: h5: Update DT files
Update the H5 DT files from the Linux 5.12 release.
The changes don't affect U-Boot at all, but fix Gigabit Ethernet when
this DT is passed on to the Linux kernel. It also introduces DVFS.
This also updates the shared sunxi-h3-h5.dtsi, but that only adds nodes
that are of no concern to U-Boot.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Tue, 25 May 2021 00:20:25 +0000 (01:20 +0100)]
arm: dts: sunxi: h6: Update DT files
Update the H6 DT files from the Linux 5.12 release.
The changes are minimal (many LED node renames), but also help to enable
USB port 0 in U-Boot (later), enable the RSB device (not yet used in
U-Boot), and also introduce an MMC frequency limit.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tom Rini [Fri, 9 Jul 2021 18:05:11 +0000 (14:05 -0400)]
Merge branch '2021-07-09-arm-updates'
- Assorted ARM platform updates
Tom Rini [Fri, 9 Jul 2021 18:04:56 +0000 (14:04 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- Support higher baudrates on Armada 3720 UART (Pali & Marek)
- OcteonTX: do not require cavium BDK node to be present (Tim)
Tom Rini [Tue, 29 Jun 2021 23:33:04 +0000 (19:33 -0400)]
arm: armv8: Fix warning about redeclaring global functions as weak
As seen with clang-12:
warning: __asm_invalidate_l3_dcache changed binding to STB_WEAK
As we indeed use ENTRY and then declare the function weak manually. Use
the WEAK declarative from <linux/linkage.h> instead.
Signed-off-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Sat, 29 May 2021 11:34:32 +0000 (13:34 +0200)]
arm: bootm: Disable LMB reservation for command line and board info on arm64
On arm64, board info is not applicable and kernel command line patched into
the DT, so the LMB reservation here makes no sense anymore. On legacy arm32,
this might still be necessary on systems which do not use DT or use legacy
ATAGS. Disable this LMB reservation on arm64.
This also permits Linux DT to specify reserved memory node at address close
to the end of DRAM bank, i.e. overlaping with U-Boot location. Since after
boot, U-Boot will be no more, this is OK.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Hai Pham <hai.pham.ud@renesas.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Rini <trini@konsulko.com>
Patrice Chotard [Wed, 24 Feb 2021 12:48:42 +0000 (13:48 +0100)]
arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable
Fix following compilation issue when SYS_DCACHE_OFF is enable:
drivers/misc/scmi_agent.c:128: undefined reference to `mmu_set_region_dcache_behaviour'
when SYS_DCACHE_OFF is enable, mmu_set_region_dcache_behaviour() must be
defined.
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Mark Kettenis [Wed, 10 Feb 2021 19:14:55 +0000 (20:14 +0100)]
armv8: Handle EL2 Host mode
On implementations that support VHE, the layout of the CPTR_EL2
register depends on whether HCR_EL2.E2H is set. If the bit is
set, CPTR_EL2 uses the same layout as CPACR_EL1 and can in fact
be accessed through that register. In that case, jump to the
EL1 code to enable access to the FP/SIMD registers. This allows
U-Boot to run on systems that pass control to U-Boot in EL2 with
EL2 Host mode enabled such as machines using Apple's M1 SoC.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Tim Harvey [Thu, 17 Jun 2021 23:31:07 +0000 (16:31 -0700)]
octeontx: do not require cavium BDK node to be present
The cavium,bdk node is a non-standard dt node used by the BDK and
therefore it is removed from the dt before booting Linux. Do not
require this node to exist as it won't for standard dt's.
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Pali Rohár [Tue, 25 May 2021 17:42:42 +0000 (19:42 +0200)]
arm: mvebu: a37xx: Enable more baudrates
Extend CONFIG_SYS_BAUDRATE_TABLE and include all standard baudrates and
also nonstandard up to the 6 MBaud. U-Boot's A3720 UART driver can use
baudrates from 300 Baud to 6 MBaud.
This changes all A3720 boards, since all of them include either
mvebu_armada-37xx.h or turris_mox.h config file.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>