platform/kernel/u-boot.git
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Wed, 29 Jul 2020 20:30:45 +0000 (16:30 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- fix SPL boot issue due to early dbgmcu_init() call
- fix SPL boot issue due to dcache memory region configuration
- add support of CONFIG_ENV_IS_IN_MMC
- add specific SD/eMMC partition for U-Boot enviromnent
- enable env in SPL
- use "env info -q" to remove log during boot
- remove env location override for dh_stm32mp1
- update management of misc_read
- check result of find_mmc_device in stm32prog
- use regulator_set_enable_if_allowed for disabling vdd supply in usbphyc
- enable CMD_ADTIMG flag to handle Android images
- device tree alignment with Linux Kernel v5.8-rc1
- remove hnp-srp-disable for usbotg on dk1
- add reset support to uart nodes on stm32mp15x
- use correct weak function name spl_board_prepare_for_linux
- use cd-gpios for ST and DHSOM boards
- add seeed studio odyssey-stm32mp157c board support
- move ethernet PHY into SoM DT
- add DHSOM based DRC02 board support

4 years agoMerge branch '2020-07-29-add-brcm-ns3-support'
Tom Rini [Wed, 29 Jul 2020 18:24:17 +0000 (14:24 -0400)]
Merge branch '2020-07-29-add-brcm-ns3-support'

- Add initial Broadcom NS3 SoC support.

4 years agoarch: arm: use dt and UCLASS_SYSCON to get gic lpi details
Rayagonda Kokatanur [Sun, 26 Jul 2020 17:07:33 +0000 (22:37 +0530)]
arch: arm: use dt and UCLASS_SYSCON to get gic lpi details

Use device tree and UCLASS_SYSCON driver to get
Generic Interrupt Controller (GIC) lpi address and
maximum GIC redistributors count.

Also update Kconfig to select REGMAP and SYSCON when
GIC_V3_ITS is enabled.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoarch: arm: use dt and UCLASS_IRQ to get gic details
Rayagonda Kokatanur [Sun, 26 Jul 2020 17:07:32 +0000 (22:37 +0530)]
arch: arm: use dt and UCLASS_IRQ to get gic details

Use device tree and UCLASS_IRQ driver to get following
Generic Interrupt Controller (GIC) details,

-GIC Distributor interface (GICD) base address and
-GIC Redistributors (GICR) base address.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable tee and optee driver
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:27:20 +0000 (22:57 +0530)]
configs: ns3: enable tee and optee driver

Enable tee and optee drivers.

Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodrivers: tee: broadcom: add optee based bnxt fw load driver
Vikas Gupta [Wed, 15 Jul 2020 17:27:19 +0000 (22:57 +0530)]
drivers: tee: broadcom: add optee based bnxt fw load driver

Add optee based bnxt fw load driver.
bnxt is Broadcom NetXtreme controller Ethernet card.
This driver is used to load bnxt firmware binary using OpTEE.

Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: ns3: add development keys used in FIT
Pramod Kumar [Wed, 15 Jul 2020 17:25:41 +0000 (22:55 +0530)]
board: ns3: add development keys used in FIT

Add development keys used in FIT.

Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: ns3: add FIT image its file
Pramod Kumar [Wed, 15 Jul 2020 17:25:40 +0000 (22:55 +0530)]
board: ns3: add FIT image its file

Add FIT image its file.

Signed-off-by: Pramod Kumar <pramod.kumar@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable FIT config
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:25:39 +0000 (22:55 +0530)]
configs: ns3: enable FIT config

Enable FIT config for NS3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable sp805 watchdog driver
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:07 +0000 (22:53 +0530)]
configs: ns3: enable sp805 watchdog driver

Enable sp805 watchdog driver for ns3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable EXT4 and FAT fs support
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:06 +0000 (22:53 +0530)]
configs: ns3: enable EXT4 and FAT fs support

Enable EXT4 and FAT fs support for ns3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable gpt commands
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:05 +0000 (22:53 +0530)]
configs: ns3: enable gpt commands

Enable gpt commands for ns3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable mmc commands
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:04 +0000 (22:53 +0530)]
configs: ns3: enable mmc commands

Enable mmc commands for NS3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable BCM IPROC mmc driver
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:03 +0000 (22:53 +0530)]
configs: ns3: enable BCM IPROC mmc driver

Enable BCM IPROC mmc driver ns3.
Enable DMA for MMC Host to have better reads and writes.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodt-bindings: pinctrl: add ns3 pads definition
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:02 +0000 (22:53 +0530)]
dt-bindings: pinctrl: add ns3 pads definition

Add NS3 pads definitions.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable pinctrl driver
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:23:01 +0000 (22:53 +0530)]
configs: ns3: enable pinctrl driver

Enable pinctrl driver for ns3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agogpio: do not include <asm/arch/gpio.h> on TARGET_BCMNS3
Rayagonda Kokatanur [Tue, 5 May 2020 17:56:47 +0000 (23:26 +0530)]
gpio: do not include <asm/arch/gpio.h> on TARGET_BCMNS3

As no gpio.h is defined for this architecture, to avoid
compilation failure, do not include <asm/arch/gpio.h> for
arch bcmns3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodrivers: gpio: add broadcom iproc gpio driver support
Rayagonda Kokatanur [Tue, 5 May 2020 17:56:46 +0000 (23:26 +0530)]
drivers: gpio: add broadcom iproc gpio driver support

Add gpio driver support for Broadcom iproc-based socs.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMAINTAINERS: update maintainers for broadcom ns3 platform
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:09 +0000 (22:49 +0530)]
MAINTAINERS: update maintainers for broadcom ns3 platform

Update MAINTAINERS for broadcom ns3 platform (TARGET_NS3).

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodoc: add README doc for bcmns3 platform
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:08 +0000 (22:49 +0530)]
doc: add README doc for bcmns3 platform

Add README doc for bcmns3 platform.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoinclude/configs: ns3: add support for flashing images
Bharat Gooty [Wed, 15 Jul 2020 17:19:07 +0000 (22:49 +0530)]
include/configs: ns3: add support for flashing images

Add support for flashing images into QSPI and eMMC.

Signed-off-by: Bharat Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoinclude/configs: ns3: add env variables for Linux boot
Bharat Gooty [Wed, 15 Jul 2020 17:19:06 +0000 (22:49 +0530)]
include/configs: ns3: add env variables for Linux boot

Add env variables and commands for booting Linux.

Signed-off-by: Bharat Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: ns3: limit U-boot relocation within 16MB memory
Bharat Kumar Reddy Gooty [Wed, 15 Jul 2020 17:19:05 +0000 (22:49 +0530)]
board: ns3: limit U-boot relocation within 16MB memory

By default relocation happens to a higher address of DDR,
i.e, DDR start + DDR size.

U-Boot shall be used to collect the ramdump.
Restrict U-Boot to use only the 16MB memory, so that this
memory can be reserved. Limit relocation to happen within
16MB memory, start 0xFF00_0000 and end 0x1_0000_0000

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: ns3: define ddr memory layout
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:04 +0000 (22:49 +0530)]
board: ns3: define ddr memory layout

Add both DRAM banks memory information and
the corresponding MMU page table mappings.

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodt-bindings: memory: ns3: add ddr memory definition
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:03 +0000 (22:49 +0530)]
dt-bindings: memory: ns3: add ddr memory definition

Add ddr memory definitions.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable GIC_V3 ITS
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:02 +0000 (22:49 +0530)]
configs: ns3: enable GIC_V3 ITS

Enables the Generic Interrupt Controller (GIC) V3
Interrupt Translation Service (ITS) Locality-specific Peripheral
Interrupts (LPI) configuration table and LPI table.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: ns3: program GIC LPI tables
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:01 +0000 (22:49 +0530)]
board: ns3: program GIC LPI tables

U-boot programs the GIC LPI configuration tables and enables
the LPI table.

Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: ns3: default reset type to L3
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:19:00 +0000 (22:49 +0530)]
board: ns3: default reset type to L3

Default "reset" from U-Boot to L3 reset.
"reset" command with argument will trigger L1 reset.

Signed-off-by: Rajesh Ravi <rajesh.ravi@broadcom.com>
Signed-off-by: Bharat Kumar Reddy Gooty <bharat.gooty@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: ns3: add api to save boot parameters passed from BL31
Abhishek Shah [Wed, 15 Jul 2020 17:18:59 +0000 (22:48 +0530)]
board: ns3: add api to save boot parameters passed from BL31

Add API to save boot parameters passed from BL31

Use assembly implementation of save_boot_params instead of c function.
Because generally ATF does not set up SP_EL2 on exiting.
Thus, usage of a C function immediately after exiting with no stack
setup done by ATF explicitly, may cause SP_EL2 to be not sane,
which in turn causes a crash if this boot was not lucky to get
an SP_EL2 in valid range. Replace C implementation with assembly one
which does not use stack this early, and let u-boot to set up its stack
later.

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Signed-off-by: Rajesh Ravi <rajesh.ravi@broadcom.com>
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agodt-bindings: memory: ns3: add memory definitions
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:58 +0000 (22:48 +0530)]
dt-bindings: memory: ns3: add memory definitions

Add NS3 memory definitions.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoconfigs: ns3: enable clock subsystem
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:57 +0000 (22:48 +0530)]
configs: ns3: enable clock subsystem

Enable clock subsystem for ns3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoarm: cpu: armv8: add L3 memory flush support
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:56 +0000 (22:48 +0530)]
arm: cpu: armv8: add L3 memory flush support

Add L3 memory flush support for NS3.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoboard: ns3: add support for Broadcom Northstar 3
Rayagonda Kokatanur [Wed, 15 Jul 2020 17:18:55 +0000 (22:48 +0530)]
board: ns3: add support for Broadcom Northstar 3

Add support for Broadcom Northstar 3 SoC.
NS3 is a octo-core 64-bit ARMv8 Cortex-A72 processors
targeting a broad range of networking applications.

Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
4 years agoMerge branch '2020-07-28-misc-soc-improvements'
Tom Rini [Wed, 29 Jul 2020 13:26:11 +0000 (09:26 -0400)]
Merge branch '2020-07-28-misc-soc-improvements'

- Assorted MediaTek improvements
- s5p4418 support
- QEMU ARM platform improvements
- Qualcomm IPQ40xx support

4 years agoboard: mediatek: Add support for UniElec U7623 board
David Woodhouse [Sun, 12 Jul 2020 22:33:03 +0000 (23:33 +0100)]
board: mediatek: Add support for UniElec U7623 board

This is an MT7623A-based board, very similar to the Banana Pi R2.

http://www.unielecinc.com/q/news/cn/p/product/detail.html?qd_guid=OjXwKCaRlN

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoboard: mediatek: Use CONFIG_DEFAULT_FDT_FILE for default environment
David Woodhouse [Sun, 12 Jul 2020 22:33:02 +0000 (23:33 +0100)]
board: mediatek: Use CONFIG_DEFAULT_FDT_FILE for default environment

Rather than hard-coding it to the Banana Pi R2.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoboard: mediatek: fix mmc_get_boot_dev() for platforms without external SD
David Woodhouse [Sun, 12 Jul 2020 22:33:01 +0000 (23:33 +0100)]
board: mediatek: fix mmc_get_boot_dev() for platforms without external SD

On the UniElec U7623 board there is no external SD slot and the preloader
doesn't fill in the magic field at 0x81dffff0 to indicate that it was
booted from eMMC.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
4 years agoarm: add (default) config for nanopi2 board
Stefan Bosch [Fri, 10 Jul 2020 17:07:38 +0000 (19:07 +0200)]
arm: add (default) config for nanopi2 board

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- Configuration changed, mainly several "CONFIG_..." moved from
  s5p4418_nanopi2.h to s5p4418_nanopi2_defconfig and USB related
  configs removed because USB is not supported yet.
- s5p4418_nanopi2.h: "CONFIG_" removed from several s5p4418/nanopi2
  specific defines because the appropriate values do not need to be
  configurable.
- pinctrl is supported now, therefore "CONFIG_PINCTRL=y" added to
  s5p4418_nanopi2_defconfig.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agoarm: add support for SoC s5p4418 (cpu) / nanopi2 board
Stefan Bosch [Fri, 10 Jul 2020 17:07:37 +0000 (19:07 +0200)]
arm: add support for SoC s5p4418 (cpu) / nanopi2 board

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- SPL not supported yet --> no spl-dir in arch/arm/cpu/armv7/s5p4418/.
  Appropriate line in Makefile removed.
- cpu.c: '#include <cpu_func.h>' added.
- arch/arm/cpu/armv7/s5p4418/u-boot.lds removed, is not required
  anylonger.
- "obj-$(CONFIG_ARCH_NEXELL) += s5p-common/" added to
  arch/arm/cpu/armv7/Makefile since s5p-common/pwm.c is used instead
  of drivers/pwm/pwm-nexell.c.
- s5p4418.dtsi: '#include "../../../include/generated/autoconf.h"'
  removed, is not necessary, error at out-of-tree building.
  '#ifdef CONFIG_CPU_NXP4330'-blocks (2x) removed. Some minor changes
  regarding mmc. 'u-boot,dm-pre-reloc' added to dp0 because of added
  DM_VIDEO support.
- board/s5p4418/ renamed to board/friendlyarm/
- All s5p4418-boards except nanopi2 removed because there is no
  possibility to test the other boards.
- Kconfig: Changes to have a structure like mach-bcm283x (RaspberryPi),
  e.g. "config ..." entries moved from/to other Kconfig.
- "CONFIG_" removed from several s5p4418/nanopi2 specific defines
  because the appropriate values do not need to be configurable.
- nanopi2/board.c: All getenv(), getenv_ulong(), setenv() and saveenv()
  renamed to env_get(), env_get_ulong(), env_set() and env_save(),
  respectively. MACH_TYPE_S5P4418 is not defined anymore, therefore
  appropriate code removed (not necessary for DT-kernels).
- nanopi2/onewire.c: All crc8() renamed to crc8_ow() because crc8() is
  already defined in lib/crc8.c (with different parameters).
- dts: "nexell,s5pxx18-i2c" used instead of "i2c-gpio", i2c0 and
  i2c1 added. gmac-, ehci- and dwc2otg-entries removed because the
  appropriate functionality is not supported yet. New mmc-property
  "mmcboost" added.
  s5p4418-pinctrl.dtsi: gmac-entries removed, mmc- and i2c-entries
  added.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agovideo: add nexell video driver (display/video driver)
Stefan Bosch [Fri, 10 Jul 2020 17:07:36 +0000 (19:07 +0200)]
video: add nexell video driver (display/video driver)

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- nexell_display.c: Changed to DM, CONFIG_FB_ADDR can not be used
  anymore because framebuffer is allocated by video_reserve() in
  video-uclass.c. Therefore code changed appropriately.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).
- livetree API (dev_read_...) is used instead of fdt one (fdt...).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agovideo: add nexell video driver (soc: dpc, makefile)
Stefan Bosch [Fri, 10 Jul 2020 17:07:35 +0000 (19:07 +0200)]
video: add nexell video driver (soc: dpc, makefile)

Low level functions for DPC (Display Controller) and Makefile for all
nexell video low level functions.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agovideo: add nexell video driver (soc: lvds, hdmi)
Stefan Bosch [Fri, 10 Jul 2020 17:07:34 +0000 (19:07 +0200)]
video: add nexell video driver (soc: lvds, hdmi)

Low level functions for LVDS and HDMI display interfaces.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agovideo: add nexell video driver (soc: mlc, mipi)
Stefan Bosch [Fri, 10 Jul 2020 17:07:33 +0000 (19:07 +0200)]
video: add nexell video driver (soc: mlc, mipi)

Low level functions for MLC (Multi Layer Control) and MIPI (Mobile
Industry Processor Interface).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agovideo: add nexell video driver (soc: displaytop)
Stefan Bosch [Fri, 10 Jul 2020 17:07:32 +0000 (19:07 +0200)]
video: add nexell video driver (soc: displaytop)

Low level functions for DisplayTop (Display Topology).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agopwm: add driver for nexell
Stefan Bosch [Fri, 10 Jul 2020 17:07:31 +0000 (19:07 +0200)]
pwm: add driver for nexell

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- Since drivers/pwm/pwm-nexell.c is an adapted version of
  s5p-common/pwm.c an appropriately changed version of s5p-common/pwm.c
  is used instead. Therefore arch/arm/mach-s5pc1xx/include/mach/pwm.h
  copied to arch/arm/mach-nexell/include/mach and s5p-common/Makefile
  changed appropriately.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agopinctrl: add nexell driver
Stefan Bosch [Fri, 10 Jul 2020 17:07:30 +0000 (19:07 +0200)]
pinctrl: add nexell driver

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- livetree API (dev_read_...) is used instead of fdt one (fdt...).
- doc/device-tree-bindings/pinctrl/nexell,s5pxx18-pinctrl.txt added.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agommc: add nexell driver
Stefan Bosch [Fri, 10 Jul 2020 17:07:29 +0000 (19:07 +0200)]
mmc: add nexell driver

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- driver changed to DM.
- pinctrl-driver/dt is used now instead of configuring the mmc I/O-pins
  in the mmc-driver.
- nexell_dwmmc_ofdata_to_platdata() reworked, i.e. valid default values
  are used now (where possible) and the appropriate if-blocks have
  been removed.
- new dt-property "mmcboost" is used now instead of "CONFIG_BOOST_MMC"
  which was not defined anywhere.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agoi2c: add nexell driver
Stefan Bosch [Fri, 10 Jul 2020 17:07:28 +0000 (19:07 +0200)]
i2c: add nexell driver

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- i2c/nx_i2c.c: Some adaptions mainly because of changes in
  "struct udevice".
- several Bugfixes in nx_i2c.c.
- the driver has been for s5p6818 only. Code extended appropriately
  in order s5p4418 is also working.
- "probe_chip" added.
- pinctrl-driver/dt is used instead of configuring the i2c I/O-pins
  in the i2c-driver.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).
- livetree API (dev_read_...) is used instead of fdt one (fdt...).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agogpio: add nexell driver
Stefan Bosch [Fri, 10 Jul 2020 17:07:27 +0000 (19:07 +0200)]
gpio: add nexell driver

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- livetree API (dev_read_...) is used instead of fdt one (fdt...).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agoarm: add mach-nexell (all files except header files)
Stefan Bosch [Fri, 10 Jul 2020 17:07:26 +0000 (19:07 +0200)]
arm: add mach-nexell (all files except header files)

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- SPL not supported yet --> no spl-directory in arch/arm/mach-nexell.
  Appropriate line in Makefile removed.
- clock.c: 'section(".data")' added to declaration of clk_periphs[] and
  core_hz.
- Kconfig: Changes to have a structure like in mach-bcm283x/Kconfig,
  e.g. "config ..." entries moved from other Kconfig.
- timer.c: 'section(".data")' added to declaration of timestamp and
  lastdec.
- arch/arm/mach-nexell/serial.c removed because this is for the UARTs
  of the S5P6818 SoC which is not supported yet. S5P4418 UARTs are
  different, here the (existing) PL011-code is used.
- '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where
  possible (and similar).

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agoarm: add mach-nexell (header files)
Stefan Bosch [Fri, 10 Jul 2020 17:07:25 +0000 (19:07 +0200)]
arm: add mach-nexell (header files)

Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01:
- DM_VIDEO support (display_dev.h).
- boot0.h added, handles NSIH --> tools/nexell obsolete.
- gpio.h: Include-path to errno.h changed.

Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
4 years agoarm: qemu: override flash accessors to use virtualizable instructions
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:11 +0000 (12:07 +0200)]
arm: qemu: override flash accessors to use virtualizable instructions

Some instructions in the ARM ISA have multiple output registers, such
as ldrd/ldp (load pair), where two registers are loaded from memory,
but also ldr with indexing, where the memory base register is incremented
as well when the value is loaded to the destination register.

MMIO emulation under KVM is based on using the architecturally defined
syndrome information that is provided when an exception is taken to the
hypervisor. This syndrome information describes whether the instruction
that triggered the exception is a load or a store, what the faulting
address was, and which register was the destination register.

This syndrome information can only describe one destination register, and
when the trapping instruction is one with multiple outputs, KVM throws an
error like

  kvm [615929]: Data abort outside memslots with no valid syndrome info

on the host and kills the QEMU process with the following error:

  U-Boot 2020.07-rc3-00208-g88bd5b179360-dirty (Jun 06 2020 - 11:59:22 +0200)

  DRAM:  1 GiB
  Flash: error: kvm run failed Function not implemented
  R00=00000001 R01=00000040 R02=7ee0ce20 R03=00000000
  R04=7ffd9eec R05=00000004 R06=7ffda3f8 R07=00000055
  R08=7ffd9eec R09=7ef0ded0 R10=7ee0ce20 R11=00000000
  R12=00000004 R13=7ee0cdf8 R14=00000000 R15=7ff72d08
  PSR=200001d3 --C- A svc32
  QEMU: Terminated

This means that, in order to run U-Boot in QEMU under KVM, we need to
avoid such instructions when accessing emulated devices. For the flash
in particular, which is a hybrid between a ROM (backed by a read-only
KVM memslot) when in array mode, and an emulated MMIO device (when in
write mode), we need to take care to only use instructions that KVM can
deal with when they trap.

So override the flash read accessors that are used when running on QEMU
under KVM. Note that the the 64-bit wide read and write accessors have
been omitted: they are never used when running under QEMU given that it
does not emulate CFI flash that supports it.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
4 years agoarm: qemu: disable the EFI workaround for older GRUB
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:10 +0000 (12:07 +0200)]
arm: qemu: disable the EFI workaround for older GRUB

The QEMU/mach-virt targeted port of u-boot currently only runs on
QEMU under TCG emulation, which does not model the caches at all,
and so no users can exist that are relying on the GRUB hack for
EFI boot.

We will shortly enable support for running under KVM, but the GRUB
hack (which disables all caches without doing cache cleaning by VA
during ExitBootServices()) is likely to cause more problems than it
solves, given that KVM hosts require correct maintenance if they
incorporate non-architected system caches.

So let's disable the GRUB hack by default on the QEMU/mach-virt
port.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoarm: qemu: implement enable_caches()
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:09 +0000 (12:07 +0200)]
arm: qemu: implement enable_caches()

Add an override for enable_caches to enable the I and D caches, along
with the cached 1:1 mapping of all of DRAM. This is needed for running
U-Boot under virtualization with QEMU/kvm.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
4 years agoarm: qemu: enable LPAE on 32-bit
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:08 +0000 (12:07 +0200)]
arm: qemu: enable LPAE on 32-bit

QEMU's mach-virt machine only supports selecting CPU models that
implement the virtualization extensions, and are therefore guaranteed
to support LPAE as well.

Initially, QEMU would not allow emulating these CPUs running in HYP
mode (or EL2, for AArch64), but today, it also contains a complete
implementation of the virtualization extensions themselves.

This means we could be running U-Boot in HYP mode, in which case the
LPAE long descriptor page table format is the only format that is
supported. If we are not running in HYP mode, we can use either.

So let's enable CONFIG_ARMV7_LPAE for qemu_arm_defconfig so that we
get the best support for running with the MMU and caches enabled at
any privilege level.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoarm: enable allocate-on-read for LPAE's DCACHE_WRITEBACK/_WRITETHROUGH
Ard Biesheuvel [Tue, 7 Jul 2020 10:07:07 +0000 (12:07 +0200)]
arm: enable allocate-on-read for LPAE's DCACHE_WRITEBACK/_WRITETHROUGH

The LPAE versions of DCACHE_WRITEBACK and DCACHE_WRITETHROUGH are currently
defined as no-allocate for both reads and writes, which deviates from the
non-LPAE definition, and mostly defeats the purpose of enabling the caches
in the first place.

So align LPAE with !LPAE, and enable allocate-on-read for both. And while
at it, add some clarification about the meaning of the chosen values.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
4 years agomsm_gpio: Add support for Qualcomm IPQ40xx
Robert Marko [Mon, 6 Jul 2020 08:37:56 +0000 (10:37 +0200)]
msm_gpio: Add support for Qualcomm IPQ40xx

Snapdragon SoCs and IPQ40xx use common TLMM IP,
so existing driver supports IPQ40xx as well.

So lets simply add a compatible for IPQ40xx.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
4 years agomsm_serial: Read bit rate register value from DT
Robert Marko [Mon, 6 Jul 2020 08:37:55 +0000 (10:37 +0200)]
msm_serial: Read bit rate register value from DT

IPQ40xx and currently supported Snapdragon boards don't use the same one
so enable reading it from DT, if no DT property is found default value
is the same as the previous define.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
4 years agoarm: Add support for Qualcomm IPQ40xx family
Robert Marko [Mon, 6 Jul 2020 08:37:54 +0000 (10:37 +0200)]
arm: Add support for Qualcomm IPQ40xx family

This introduces initial support for the popular Qualcomm
IPQ40x8 and IPQ40x9 WiSoC series.

IPQ40xx series have 4x Cortex A7 ARM-v7A cores.
Supported are: IPQ4018, IPQ4019, IPQ4028 and IPQ4029.

IPQ40x8 and IPQ40x9 use the same cores, but differ in
addressable RAM size (1GB for IPQ40x9 and 256MB for IPQ40x8)
and supported peripherals (IPQ40x8 lacks RGMII, LCD controller
and EMMC/SDHCI controllers).

IQP4028/IPQ4029 models differ from IPQ4018/IPQ4019 only
by their rated temperatures rates with IPQ402X models being
rated for wider temperature ranges.

Initially this supports:
* Simple clock driver (Only for UART1 now, will be extended)
* Pinctrl driver (Supports UARTX and GPIO now, will be extended)
* GPIOs already supported by msm_gpio driver with updates
* UARTs already supported by serial_msm driver with updates

Further peripherals will come in later patches.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
4 years agopinctrl: mediatek: add PUPD/R0/R1 support for MT7623
David Woodhouse [Fri, 19 Jun 2020 11:40:20 +0000 (12:40 +0100)]
pinctrl: mediatek: add PUPD/R0/R1 support for MT7623

The pins for the MMC controller weren't being set up correctly because the
pinctrl driver only sets the GPIO pullup/pulldown config and doesn't
handle the special cases with PUPD/R0/R1 control.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
4 years agoarm: dts: mediatek: enable sgmii mode and mt7531 switch for mt7629
MarkLee [Fri, 19 Jun 2020 11:17:17 +0000 (19:17 +0800)]
arm: dts: mediatek: enable sgmii mode and mt7531 switch for mt7629

This patch enable sgmii mode and mt7531 switch support in mt7629
ethernet dts node

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
4 years agoeth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver
MarkLee [Fri, 19 Jun 2020 11:17:16 +0000 (19:17 +0800)]
eth: mtk-eth: enable mt7629 sgmii mode support in mediatek eth driver

The sgmii mode init flow is almost the same for all mediatek SoC, the
only difference is the register offset(SGMSYS_GEN2_SPEED) is 0x2028
in the old chip(mt7622) but changed to 0x128 for the newer chip(mt7629
and the following chips).

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
4 years agoMerge branch '2020-07-28-Kconfig-migrations'
Tom Rini [Tue, 28 Jul 2020 22:27:34 +0000 (18:27 -0400)]
Merge branch '2020-07-28-Kconfig-migrations'

- Migration of more symbols to Kconfig

4 years agoconfigs: migrate CONFIG_SPL_LOAD_FIT_ADDRESS to defconfigs
Peng Fan [Mon, 6 Jul 2020 07:35:01 +0000 (15:35 +0800)]
configs: migrate CONFIG_SPL_LOAD_FIT_ADDRESS to defconfigs

Done with:
./tools/moveconfig.py -S SPL_LOAD_FIT_ADDRESS
./tools/moveconfig.py -S SPL_LOAD_FIT_ADDRESS -H

Signed-off-by: Peng Fan <peng.fan@nxp.com>
[trini: A few more migrations]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoKconfig: add SPL_LOAD_FIT_ADDRESS
Peng Fan [Mon, 6 Jul 2020 07:35:00 +0000 (15:35 +0800)]
Kconfig: add SPL_LOAD_FIT_ADDRESS

Add SPL_LOAD_FIT_ADDRESS to make user could add it in defconfig

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoConvert CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to Kconfig
Adam Ford [Fri, 3 Jul 2020 15:17:30 +0000 (10:17 -0500)]
Convert CONFIG_SYS_MMCSD_FS_BOOT_PARTITION to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_MMCSD_FS_BOOT_PARTITION

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoconfigs: Remove dead CONFIG options
Adam Ford [Fri, 3 Jul 2020 14:06:36 +0000 (09:06 -0500)]
configs: Remove dead CONFIG options

BOOTP_DEFAULT is defined in several boards, but this config
option is never checked or used.

This patch removes this config option from config files and
the whitelist.txt

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoConvert CONFIG_BOOTP_SEND_HOSTNAME to Kconfig
Adam Ford [Fri, 3 Jul 2020 14:00:14 +0000 (09:00 -0500)]
Convert CONFIG_BOOTP_SEND_HOSTNAME to Kconfig

This converts the following to Kconfig:
   CONFIG_BOOTP_SEND_HOSTNAME

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoConvert CONFIG_DRIVER_TI_EMAC_USE_RMII to Kconfig
Adam Ford [Fri, 3 Jul 2020 13:27:12 +0000 (08:27 -0500)]
Convert CONFIG_DRIVER_TI_EMAC_USE_RMII to Kconfig

This converts the following to Kconfig:
   CONFIG_DRIVER_TI_EMAC_USE_RMII

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoConvert CONFIG_SPL_NAND_BASE et al to Kconfig
Adam Ford [Fri, 3 Jul 2020 13:09:45 +0000 (08:09 -0500)]
Convert CONFIG_SPL_NAND_BASE et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SPL_NAND_BASE
   CONFIG_SPL_NAND_IDENT

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoConvert CONFIG_SPL_NAND_DRIVERS et al to Kconfig
Adam Ford [Fri, 3 Jul 2020 13:09:44 +0000 (08:09 -0500)]
Convert CONFIG_SPL_NAND_DRIVERS et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SPL_NAND_DRIVERS
   CONFIG_SPL_NAND_ECC
   CONFIG_SPL_NAND_SIMPLE

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoConvert CONFIG_ENV_OVERWRITE to Kconfig
Adam Ford [Fri, 3 Jul 2020 11:48:56 +0000 (06:48 -0500)]
Convert CONFIG_ENV_OVERWRITE to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_OVERWRITE

Signed-off-by: Adam Ford <aford173@gmail.com>
[trini: Rerun migration, remove some comments]
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoARM: dts: stm32: Add DHSOM based DRC02 board
Marek Vasut [Sat, 25 Jul 2020 14:50:56 +0000 (16:50 +0200)]
ARM: dts: stm32: Add DHSOM based DRC02 board

Add DT for DH DRC02 unit, which is a universal controller device.
The system has two ethernet ports, two CANs, RS485 and RS232, USB,
capacitive buttons and an OLED display.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agoARM: dts: stm32: Move ethernet PHY into SoM DT
Marek Vasut [Sat, 25 Jul 2020 14:50:55 +0000 (16:50 +0200)]
ARM: dts: stm32: Move ethernet PHY into SoM DT

The PHY and the VIO regulator is populated on the SoM, move it
into the SoM DT.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agoARM: dts: stm32: add seeed studio odyssey-stm32mp157c board
Marcin Sloniewski [Wed, 8 Jul 2020 17:56:22 +0000 (19:56 +0200)]
ARM: dts: stm32: add seeed studio odyssey-stm32mp157c board

This commit adds device tree files supporting
SBC from Seeed Studio based on STM32MP157C.

This works with generic stm32mp1 config.
Right now only booting from SD card is supported.

Signed-off-by: Marcin Sloniewski <marcin.sloniewski@gmail.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agoRevert "ARM: dts: stm32: Reinstate card detect behavior on ST boards"
Patrick Delaunay [Tue, 7 Jul 2020 16:47:29 +0000 (18:47 +0200)]
Revert "ARM: dts: stm32: Reinstate card detect behavior on ST boards"

Since commit f13ff88b61c3 ("gpio: stm32: add ops set_dir_flags")
the gpio flags are supported by stm32 pinctrl driver.

The cd-gpios is correctly handle in U-Boot and the patch on the
device tree can be removed.

This reverts commit 792919241b3d750cd5295dfe6dd1d0958b9be468.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoRevert "ARM: dts: stm32: Reinstate card detect behavior on DHSOM"
Patrick Delaunay [Tue, 7 Jul 2020 16:46:08 +0000 (18:46 +0200)]
Revert "ARM: dts: stm32: Reinstate card detect behavior on DHSOM"

Since commit f13ff88b61c3 ("gpio: stm32: add ops set_dir_flags")
the gpio flags are supported by stm32 pinctrl driver.

The cd-gpios is correctly handle in U-Boot and the patch on the
device tree can be removed.

This reverts commit 3c2e2a1a79608c5e046313a8c47586d9a734e2a3.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoarm: stm32mp: use correct weak function name spl_board_prepare_for_linux
Patrick Delaunay [Tue, 7 Jul 2020 12:21:53 +0000 (14:21 +0200)]
arm: stm32mp: use correct weak function name spl_board_prepare_for_linux

Replace the function spl_board_prepare_for_boot_linux by the correct
name of the weak function spl_board_prepare_for_linux defined in spl.h.

This patch avoids warning with W=1 option:

u-boot/arch/arm/mach-stm32mp/spl.c:150:6:
warning: no previous prototype for ‘spl_board_prepare_for_boot_linux’
[-Wmissing-prototypes]

Fixes: dc7e5f190de5 ("arm: stm32mp: activate data cache on DDR in SPL")
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoARM: dts: stm32: add reset support to uart nodes on stm32mp15x
Patrick Delaunay [Mon, 6 Jul 2020 12:48:58 +0000 (14:48 +0200)]
ARM: dts: stm32: add reset support to uart nodes on stm32mp15x

STM32 serial IP can be reset via reset controller.
Add the support of reset to uart nodes on stm32mp15-u-boot.dtsi,
the ad-dons file for U-Boot.

This patch fix issues when previous UART configuration, for example
done in TF-A or ROM code, is not handled in U-Boot stm32 serial driver
init.

This reset property won't be not added in Linux kernel device tree
as this reset is not used in Linux STM32 serial driver.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoARM: dts: stm32mp: remove hnp-srp-disable for usbotg on dk1
Patrick Delaunay [Wed, 1 Jul 2020 11:10:10 +0000 (13:10 +0200)]
ARM: dts: stm32mp: remove hnp-srp-disable for usbotg on dk1

Remove hnp-srp-disable for usbotg node because this feature is only needed
for usbotg in HOST mode (in drivers/usb/host/dwc2.c)
and this feature is not activated in stm32mp15 U-Boot
(stm32mp15_basic_defconfig and stm32mp15_trusted_defconfig);
only the device mode is activated and OTG is not supported in DWC2 driver.

This patch reduces the difference between U-Boot and Linux kernel
device-tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoARM: dts: stm32mp1: DT alignment with Linux kernel v5.8-rc1
Patrick Delaunay [Mon, 6 Jul 2020 11:26:53 +0000 (13:26 +0200)]
ARM: dts: stm32mp1: DT alignment with Linux kernel v5.8-rc1

DT alignment with Linux kernel v5.8-rc1 for the STM32MP15x soc
device tree files and the STMicroelectronics boards device tree files.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoARM: dts: rename stm32mp15xx-avenger96 ethernet0_rgmii_pins
Patrick Delaunay [Mon, 6 Jul 2020 11:26:51 +0000 (13:26 +0200)]
ARM: dts: rename stm32mp15xx-avenger96 ethernet0_rgmii_pins

Alignment with pins name used in Linux kernel v5.8.

It is a preleminary step for device tree alignment.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoconfigs: stm32mp15: activate CMD_ADTIMG
Patrick Delaunay [Mon, 6 Jul 2020 13:00:46 +0000 (15:00 +0200)]
configs: stm32mp15: activate CMD_ADTIMG

Activate the support of the command adtimg to handle android images.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agophy: usbphyc: use regulator_set_enable_if_allowed for disabling vdd supply
Patrick Delaunay [Fri, 3 Jul 2020 17:13:02 +0000 (19:13 +0200)]
phy: usbphyc: use regulator_set_enable_if_allowed for disabling vdd supply

Use regulator_set_enable_if_allowed() api instead of regulator_set_enable()
while disabling vdd supply. This way the driver doesn't see an error
when disabling an always-on regulator.

This patch is needed since the commit f93fab312615 ("Revert 'power:
regulator: Return success on attempt to disable an always-on regulator'")
and use the API introduced by commit cc4a224af226 ("power: regulator:
Introduce regulator_set_enable_if_allowed api").

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoarm: stm32mp: stm32prog: check result of find_mmc_device
Patrick Delaunay [Mon, 6 Jul 2020 11:20:58 +0000 (13:20 +0200)]
arm: stm32mp: stm32prog: check result of find_mmc_device

Check result of find_mmc_device() before calling mmc_init().

This patch avoid a data abort when the command try to acces
to sd/mmc device deactivated in device tree.

Fixes: aff4c5dd8265 ("stm32mp: stm32prog: add MMC device")
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoboard: update test on misc_read result in board_late_init
Patrick Delaunay [Fri, 3 Jul 2020 15:45:07 +0000 (17:45 +0200)]
board: update test on misc_read result in board_late_init

Update management of misc_read, which now return length of data
after the commit 8729b1ae2cbd ("misc: Update read() and write()
methods to return bytes xfered")

Fixes: 8b8b3d6b55b9 ("stm32mp1: board: add environment variable for board id and board rev")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoboard: dh_stm32mp1: remove env location override
Jakob Riepler [Mon, 27 Jul 2020 12:18:29 +0000 (14:18 +0200)]
board: dh_stm32mp1: remove env location override

Overriding the environment location is not necessary as the defconfig
for the relevant boards only enable SPI flash and nowhere sources which
are in the same order per default but having this explicit override
prevents using eMMC or SD card (or EXT4) as environment source.

Signed-off-by: Jakob Riepler <jakob.riepler@aviloo.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agostm32mp1: use the command env info -q in env_check
Patrick Delaunay [Thu, 2 Jul 2020 16:48:02 +0000 (18:48 +0200)]
stm32mp1: use the command env info -q in env_check

Activate the new option -q in command "env info"
to avoid unnecessary trace during boot.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoconfigs:stm32mp1: activate env config in SPL
Patrick Delaunay [Mon, 15 Jun 2020 09:18:24 +0000 (11:18 +0200)]
configs:stm32mp1: activate env config in SPL

Activate env config in SPL with CONFIG_SPL_ENV_SUPPORT
and use CONFIG_IS_ENABLED macro to test the activated
CONFIG_$(SPL_)ENV_IS_IN_... in env_get_location.

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agostm32mp1: use a specific SD/eMMC partition for U-Boot enviromnent
Patrick Delaunay [Mon, 15 Jun 2020 09:18:23 +0000 (11:18 +0200)]
stm32mp1: use a specific SD/eMMC partition for U-Boot enviromnent

Save the environment at the end of the U-Boot partition, the GPT
partition named "ssbl" in SD card or eMMC and avoid requirements
on the "bootfs" file system generated via specific raw tools
(like wic and genimage).

With the previous configuration of the U-Boot environment saved in ext4
file, U-Boot need to create/modify the file uenv.txt in the ext4 file
system; so this EXT4 file system need to be generated without some
functionality, like metadata_csum and dir_index, because they are not
supported by U-Boot.

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agostm32mp1: board: add support of CONFIG_ENV_IS_IN_MMC
Patrick Delaunay [Mon, 15 Jun 2020 09:18:22 +0000 (11:18 +0200)]
stm32mp1: board: add support of CONFIG_ENV_IS_IN_MMC

Add support of CONFIG_ENV_IS_IN_MMC in env_get_location, used for
all mmc device (SD card and eMMC).
The 2 configs CONFIG_ENV_IS_IN_MMC and CONFIG_ENV_IS_IN_EXT4 are
incompatible.

Add the weak function mmc_get_env_dev to select the mmc boot instance.

Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
4 years agostm32mp1: mmu_set_region_dcache_behaviour
Patrick Delaunay [Fri, 24 Jul 2020 09:21:51 +0000 (11:21 +0200)]
stm32mp1: mmu_set_region_dcache_behaviour

Since commit d877f8fd0f09 ("arm: provide a function for boards init
code to modify MMU virtual-physical map") the parameter of
mmu_set_region_dcache_behaviour need to be MMU_SECTION_SIZE
aligned.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoarm: stm32mp: move dbgmcu_init call when DT is ready
Patrick Delaunay [Fri, 24 Jul 2020 09:13:31 +0000 (11:13 +0200)]
arm: stm32mp: move dbgmcu_init call when DT is ready

As the dbgmcu_init use the function bsec_dbgswenable which is based
on the DM and DT, its call can't be done before the spl is initialized
(driver model, DT and malloc) in board_init_f::spl_early_init().

This function call is moved later in spl_board_init().

Fixes: bd3f60d29c24 ("arm: stm32mp: protect DBGMCU_IDC access with BSEC")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
4 years agoMerge branch '2020-07-28-update-azure-tests'
Tom Rini [Tue, 28 Jul 2020 12:49:42 +0000 (08:49 -0400)]
Merge branch '2020-07-28-update-azure-tests'

- Update Azure to fix some recent issues with Windows host tool builds

4 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 28 Jul 2020 12:46:52 +0000 (08:46 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoazure: Switch to use the MSYS2 official installer as the CI base
Bin Meng [Tue, 28 Jul 2020 09:06:44 +0000 (02:06 -0700)]
azure: Switch to use the MSYS2 official installer as the CI base

Recent CI failures were seen [1] when building MSYS2 Windows host
tools. The error messages are something like:

  downloading mingw32.db...
  downloading mingw32.db.sig...
  error: mingw32: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown
  error: mingw32: signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
  error: failed to update mingw32 (invalid or corrupted database (PGP signature))

Per the MSYS2 official news [2], this was caused by a packager
switch and several solutions were suggested, e.g.: a new package
of msys2-keyring and a new msys2 installer that includes them are
released. However right now we have been using the MSYS2 github
CI base repo [3] for the MSYS2 build in U-Boot, but per the project
information on the github webpage, it says: "This repository is
unused/deprecated and will be remove after 2021-01-01". Since it is
unmaintained it's unlikely the new PGP keys will be included in the
git repo, and the only choice is to switch to use the MSYS2 official
installer as the CI base instead.

[1] https://dev.azure.com/u-boot/u-boot/_build/results?buildId=975
[2] https://www.msys2.org/news/#2020-06-29-new-packagers
[3] https://github.com/msys2/msys2-ci-base

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoazure: Add the missing build dependency for MSYS2 build
Bin Meng [Tue, 28 Jul 2020 09:06:43 +0000 (02:06 -0700)]
azure: Add the missing build dependency for MSYS2 build

Package 'flex' is needed when building the U-Boot host tool, but
is currently missing in the build dependency in the CI pipeline.

This is to prepare switching to an installer based CI build.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoazure: Drop 32-bit MSYS2 build
Bin Meng [Tue, 28 Jul 2020 09:06:42 +0000 (02:06 -0700)]
azure: Drop 32-bit MSYS2 build

As of 2020-05-17, 32-bit MSYS2 is no longer actively supported by
the upstream [1]. Let's drop the 32-bit Windows host tool build.

[1] https://www.msys2.org/news/#2020-05-17-32-bit-msys2-no-longer-actively-supported

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoazure: Use a login shell everywhere for MSYS2 build
Bin Meng [Tue, 28 Jul 2020 09:06:41 +0000 (02:06 -0700)]
azure: Use a login shell everywhere for MSYS2 build

This simplifies things a bit to just use a login shell everywhere.

This keeps in sync with MSYS2 upstream commit:
9d11b7f0aa93 ("azure-pipelines: simplify things a bit").

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoPrepare v2020.10-rc1
Tom Rini [Tue, 28 Jul 2020 02:46:03 +0000 (22:46 -0400)]
Prepare v2020.10-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>