oweals/u-boot.git
4 years agoboard: ge: bx50v3: use DM for uart
Robert Beckett [Fri, 31 Jan 2020 13:08:01 +0000 (15:08 +0200)]
board: ge: bx50v3: use DM for uart

Remove legacy uart pad and iomux code
Enable DM serial and mxc uart

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agoboard: ge: mx53ppd: Use DM for ethernet
Robert Beckett [Fri, 31 Jan 2020 13:08:00 +0000 (15:08 +0200)]
board: ge: mx53ppd: Use DM for ethernet

Remove legacy iomux setup for fec.
Enable phylib and DM fec.
Use Kconfig for enabling fec.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agoboard: ge: bx50v3: Enable DM PWM for backlight
Robert Beckett [Fri, 31 Jan 2020 13:07:59 +0000 (15:07 +0200)]
board: ge: bx50v3: Enable DM PWM for backlight

Add backlight and panel devicetree definitions
Use UCLASS_PANEL to enable backlight via display enable handler
Remove old explicit gpio code for handling backlight
Use cls command to initiate display in HW agnostic manner
Enable DM regulator and pwm

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agoboard: ge: bx50v3: override panel
Ian Ray [Fri, 31 Jan 2020 13:07:58 +0000 (15:07 +0200)]
board: ge: bx50v3: override panel

Override the panel compatible string for LCD in U-Boot.

Include U-Boot device tree overrides in device-specific device trees so
that the panel compatible string is used.

Fixes: 8c26739859c6 ("board: ge: bx50v3: sync devicetrees from Linux")
Signed-off-by: Ian Ray <ian.ray@ge.com>
4 years agoboard: ge: mx53ppd: enable DM_VIDEO
Ian Ray [Fri, 31 Jan 2020 13:07:57 +0000 (15:07 +0200)]
board: ge: mx53ppd: enable DM_VIDEO

Enable DM_VIDEO for mx53ppd.
Enable DM_REGULATOR_FIXED and DM_PWM for the backlight.
Remove unused MX53PPD_LCD_POWER.
Remove old (incorrect) setup_iomux_lcd.
Enable backlight via display enable handler.
Use cls command to initiate display in HW agnostic manner.
Modify `failbootcmd' to use lcdputs.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agoboard: ge: mx53ppd: add i2c eeprom bootcount storage
Robert Beckett [Fri, 31 Jan 2020 13:07:56 +0000 (15:07 +0200)]
board: ge: mx53ppd: add i2c eeprom bootcount storage

Add bootcount node, linking to i2c eeprom "bootcount" partitions for
storage.
Enable i2c eeprom bootcount backend storage.
Enable bootcount command and use it for failbootcmd.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agoboard: ge: bx50v3: add i2c eeprom bootcount storage
Robert Beckett [Fri, 31 Jan 2020 13:07:55 +0000 (15:07 +0200)]
board: ge: bx50v3: add i2c eeprom bootcount storage

Add bootcount node, linking to i2c eeprom "bootcount" partitions for
storage.
Enable i2c eeprom bootcount backend storage.
Enable bootcount command and use it for failbootcmd.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agoboard: ge: bx50v3, imx53ppd: use DM I2C
Robert Beckett [Fri, 31 Jan 2020 13:07:54 +0000 (15:07 +0200)]
board: ge: bx50v3, imx53ppd: use DM I2C

Remove old (pre-DM) i2c setup code.
Enable DM i2c.
Convert common code to use DM rtc.
Convert common code to read VPD from eeprom partition.
Convert the generic i2c PMIC init code to use the new da9063 driver.

mx53ppd only:
Correct RTC compatible in device tree.
Enable MXC DM i2c driver.
Define CONFIG_SYS_MALLOC_F_LEN so that DM is available in pre-reloc.
Make GPIO banks available during preloc, since initialisation is done
in board_early_init_f().
Add gpio_request() calls to satisfy the DM_GPIO compatibility API.
Remove unused power configuration.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Ian Ray <ian.ray@ge.com>
4 years agoboard: ge: bx50v3, imx53ppd: add eeprom partitions
Robert Beckett [Fri, 31 Jan 2020 13:07:53 +0000 (15:07 +0200)]
board: ge: bx50v3, imx53ppd: add eeprom partitions

Add eeprom partitions to device tree.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agomisc: i2c_eeprom: set offset len and chip addr offset mask
Robert Beckett [Fri, 31 Jan 2020 13:07:52 +0000 (15:07 +0200)]
misc: i2c_eeprom: set offset len and chip addr offset mask

Set the correct offset length and chip address offset mask for each
device to allow correct access to total capacity of the devices.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
4 years agoimx: mx6ul_14x14_evk: turn of backlight and LCD before booting OS
Anatolij Gustschin [Sat, 25 Jan 2020 23:35:59 +0000 (00:35 +0100)]
imx: mx6ul_14x14_evk: turn of backlight and LCD before booting OS

This should help keeping the screen black when booting the kernel.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reported-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6sabresd: Convert PCI to driver model
Alifer Moraes [Mon, 20 Jan 2020 16:31:02 +0000 (13:31 -0300)]
mx6sabresd: Convert PCI to driver model

Convert imx6sabresd PCI to driver model to fix the following warning:

===================== WARNING ======================
This board does not use CONFIG_DM_PCI Please update
the board to use CONFIG_DM_PCI before the v2019.07 release.
Failure to update by the deadline may result in board removal.
See doc/driver-model/MIGRATION.txt for more info.
====================================================

After the conversion the following commands were used for testing:

=> pci enum
PCI: Failed autoconfig bar 10
PCI: Failed autoconfig bar 10
=> pci 1
Scanning PCI devices on bus 1
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6sabre_common: Remove FEC related settings
Fabio Estevam [Mon, 20 Jan 2020 16:31:01 +0000 (13:31 -0300)]
mx6sabre_common: Remove FEC related settings

In preparation for converting to DM_ETH and moving the FEC symbols
to Kconfig we need to move the FEC definitions to mx6sabreauto.h
and mx6sabresd.h to avoid build breakage during the conversion.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
4 years agoimx6: aristainetos: fix NAND detection with latest mainline
Heiko Schocher [Thu, 30 Jan 2020 13:10:05 +0000 (14:10 +0100)]
imx6: aristainetos: fix NAND detection with latest mainline

commit 88718be30010 ("mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND")
moved CONFIG_NAND -> CONFIG_MTD_RAW_NAND. Adapt board code to this
change, as last merge did not respect the above commit.

Signed-off-by: Heiko Schocher <hs@denx.de>
4 years agoARM: imx: novena: Enable DM thermal
Marek Vasut [Mon, 27 Jan 2020 00:15:28 +0000 (01:15 +0100)]
ARM: imx: novena: Enable DM thermal

Enable DM thermal driver and iMX thermal driver to get accurate
CPU frequency reporting in the boot log.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agoARM: imx: novena: Enable DM ethernet
Marek Vasut [Mon, 27 Jan 2020 00:15:27 +0000 (01:15 +0100)]
ARM: imx: novena: Enable DM ethernet

Convert to DM ethernet to prevent board removal.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agoARM: imx: novena: Move defconfig bits to arch Kconfig
Marek Vasut [Mon, 27 Jan 2020 00:15:26 +0000 (01:15 +0100)]
ARM: imx: novena: Move defconfig bits to arch Kconfig

Just move the defconfig entries which are required into the Novena
entry in arch Kconfig, no functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Vagrant Cascadian <vagrant@debian.org>
4 years agomx7dsabre: Fix usbtog probe when use dfu or ums
Joris Offouga [Wed, 29 Jan 2020 21:06:01 +0000 (22:06 +0100)]
mx7dsabre: Fix usbtog probe when use dfu or ums

Before:
=> ums 0 mmc 0
UMS: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x1dacc00
usb dr_mode not found
CTRL+C - Operation aborted
=> dfu 0 mmc 0
usb dr_mode not found

After :
=> ums 0 mmc 0
UMS: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x1dacc00
=> dfu 0 mmc 0

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoarm: dts: imx7s-warp7: Move u-boot specific node in u-boot.dtsi
Joris Offouga [Wed, 29 Jan 2020 21:06:00 +0000 (22:06 +0100)]
arm: dts: imx7s-warp7: Move u-boot specific node in u-boot.dtsi

These nodes are not in upstream kernel, so move these in u-boot.dtsi

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agowarp7: remove unused usb configs
Joris Offouga [Wed, 29 Jan 2020 21:05:59 +0000 (22:05 +0100)]
warp7: remove unused usb configs

With commit 6b503f9e6549("warp7: Switch to DM USB").
These configs are not necessary

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agowarp7: Fix the pmic_get() parameter in the DM case
Joris Offouga [Wed, 29 Jan 2020 21:05:58 +0000 (22:05 +0100)]
warp7: Fix the pmic_get() parameter in the DM case

When pmic_get() is used with DM the first parameter must be
the complete node name plus the unit address, so fix it
accordingly

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoarm: xea: dts: Add 'fec-3v3' regulator properties to prevent accidental disablement
Lukasz Majewski [Sat, 25 Jan 2020 08:01:40 +0000 (09:01 +0100)]
arm: xea: dts: Add 'fec-3v3' regulator properties to prevent accidental disablement

The 'enable-active-high' DTS property configures GPIO so it is active with
HIGH state (by default it is low).

The 'regulator-boot-on' property indicates that the regulator was enabled
in the 'earlier' stage - i.e. bootloader/firmware.
In the XEA case the 'fec-3v3' was configured (as a "wrapper" on GPIO0_0) in
very early SPL code, so it shouldn't be modified at latter stages.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoarm: xea: spl: Add GPIO0_0 setup on spl_board_init
Lukasz Majewski [Sat, 25 Jan 2020 08:01:39 +0000 (09:01 +0100)]
arm: xea: spl: Add GPIO0_0 setup on spl_board_init

Explicitly configure GPIO0_0 in SPL, which controlls 3V3 voltage
on the XEA board (it also supplies TIVAs).

This code would enable TIVAs power supply early (also when board
uses the falcon boot).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoarm: xea: config: Enable support for XEA board specific device tree tweaks
Lukasz Majewski [Sat, 25 Jan 2020 08:01:38 +0000 (09:01 +0100)]
arm: xea: config: Enable support for XEA board specific device tree tweaks

This patch enables support for CONFIG_OF_BOARD_SETUP in xea defconfig.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoarm: xea: Provide function to set L2 switch 'local-mac-address' property
Lukasz Majewski [Sat, 25 Jan 2020 08:01:37 +0000 (09:01 +0100)]
arm: xea: Provide function to set L2 switch 'local-mac-address' property

The 'local-mac-address' property needs to be adjusted to the MAC address
value stored in U-Boot's 'ethaddr' env variable.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agoarm: xea: defconfig: Define space for redundant envs in SPI-NOR flash
Lukasz Majewski [Sat, 25 Jan 2020 08:01:36 +0000 (09:01 +0100)]
arm: xea: defconfig: Define space for redundant envs in SPI-NOR flash

Redundant envs help with assuring better reliability for the system as they
prevent from the situation when envs are stored only in a single place.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
4 years agomx7ulp_com: Remove unneeded SoC definitions
Fabio Estevam [Tue, 21 Jan 2020 13:30:09 +0000 (10:30 -0300)]
mx7ulp_com: Remove unneeded SoC definitions

Since commit 9c27310ac23c ("mx7ulp: Move SoC base address to a common
file") we no longer need to have these SoC definitions in the board
file, so remove them.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
4 years agocmd: mdc/mwc: normalize disjoint MX_CYCLIC usage
Joel Johnson [Wed, 29 Jan 2020 16:17:18 +0000 (09:17 -0700)]
cmd: mdc/mwc: normalize disjoint MX_CYCLIC usage

Both CMD_MX_CYCLIC and MX_CYCLIC are in use and defined in Kconfig,
but only the non-CMD version currently does anything. This changes all
usages to prefer the CMD_MX_CYCLIC option (since it's only affecting
addition of the commands), and switches defconfigs using the non-CMD
version to use the CMD version.

Signed-off-by: Joel Johnson <mrjoel@lixil.net>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agotools: imx8m_image: fix warning message
Sébastien Szymanski [Tue, 21 Jan 2020 10:58:42 +0000 (11:58 +0100)]
tools: imx8m_image: fix warning message

When a firmware file is missing the warning message doesn't indicate the
firmware file name because '$tmp' var doesn't exist.
Fix the warning message and while at it reduce the if/else statement.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
4 years agomx6sxsabresd: Keep only one target
Fabio Estevam [Mon, 27 Jan 2020 13:33:50 +0000 (10:33 -0300)]
mx6sxsabresd: Keep only one target

Currently there are two targets for the i.MX6SX SabreSD board:
mx6sxsabresd_defconfig and mx6sxsabresd_spl_defconfig.

This brings additional maintainance effort without a clear
advantage.

Keep only the mx6sxsabresd_defconfig one and remove
mx6sxsabresd_spl_defconfig to keep it simpler.

Also remove the SPL related code from the board file.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
4 years agomx6ul_14x14_evk: Move CONFIG_DM_74X164 to defconfig
Fabio Estevam [Wed, 29 Jan 2020 16:58:03 +0000 (13:58 -0300)]
mx6ul_14x14_evk: Move CONFIG_DM_74X164 to defconfig

The CONFIG_DM_74X164 symbols should be moved to the defconfig file,
as indicated in the comments.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
4 years agogpio: Let DM_74X164 be built without CONFIG_SPL_GPIO
Fabio Estevam [Wed, 29 Jan 2020 16:58:02 +0000 (13:58 -0300)]
gpio: Let DM_74X164 be built without CONFIG_SPL_GPIO

Since commit bcee8d6764f9 ("dm: gpio: Allow control of GPIO uclass in SPL")
CONFIG_DM_74X164 is no longer built for mx7dsabresd_defconfig, as
this target does not use CONFIG_SPL_GPIO.

Remove such dependency and let the the 74X164 GPIO driver be built
again.

This restores Ethernet functionality on the imx7-sdb board as the
Ethernet reset PHY comes from a GPIO driven by a 74LV595PW I/O
expander.

Fixes: bcee8d6764f9 ("dm: gpio: Allow control of GPIO uclass in SPL")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Alifer Moraes <alifer.wsdm@gmail.com>
4 years agoimx: imx8mm_evk: spelling in readme file
Marcel Ziswiler [Tue, 28 Jan 2020 13:42:28 +0000 (14:42 +0100)]
imx: imx8mm_evk: spelling in readme file

Minor spelling fix in README file.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agoboard: toradex: verdin-imx8mm: add MAINTAINERS
Igor Opaniuk [Tue, 28 Jan 2020 13:42:27 +0000 (14:42 +0100)]
board: toradex: verdin-imx8mm: add MAINTAINERS

Assign Igor Opaniuk as a board maintainer.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agoboard: toradex: verdin-imx8mm: add README
Igor Opaniuk [Tue, 28 Jan 2020 13:42:26 +0000 (14:42 +0100)]
board: toradex: verdin-imx8mm: add README

Add README with build steps for U-boot and TF-A for Verdin iMX8M Mini SoM.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agoboard: toradex: Add Verdin iMX8M Mini support
Igor Opaniuk [Tue, 28 Jan 2020 13:42:25 +0000 (14:42 +0100)]
board: toradex: Add Verdin iMX8M Mini support

This adds initial minimal support for the Toradex Verdin iMX8M Mini Quad
2GB WB IT V1.0A module. They are now strapped to boot from eFuses which
are factory fused to properly boot from their on-module eMMC. U-Boot
supports booting from the on-module eMMC only, SDP support is disabled
for now due to missing i.MX 8M Mini USB support.

Functionality wise the following is known to be working:
- eMMC, 8-bit and 4-bit MMC/SD card slots
- Ethernet
- GPIOs
- I2C

Boot sequence is:
SPL ---> ATF (TF-A) ---> U-boot proper

ATF, U-boot proper and u-boot.dtb images are packed into a FIT image,
loaded by SPL.

Boot:
U-Boot SPL 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)
Normal Boot
Trying to boot from MMC1
NOTICE:  Configuring TZASC380
NOTICE:  RDC off
NOTICE:  BL31: v2.0(release):rel_imx_4.14.98_2.3.0-0-g09c5cc994-dirty
NOTICE:  BL31: Built : 01:11:41, Jan 25 2020
NOTICE:  sip svc init

U-Boot 2020.01-00187-gd411d164e5 (Jan 26 2020 - 04:47:26 +0100)

CPU:   Freescale i.MX8MMQ rev1.0 at 0 MHz
Reset cause: POR
DRAM:  2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Verdin iMX8M Mini Quad 2GB Wi-Fi / BT IT V1.0A, Serial#
 06535149
Net:   eth0: ethernet@30be0000
Hit any key to stop autoboot:  0
Verdin iMX8MM #

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agotoradex: tdx-cfg-block: add Verdin iMX8M Mini/Nano support
Marcel Ziswiler [Tue, 28 Jan 2020 13:42:24 +0000 (14:42 +0100)]
toradex: tdx-cfg-block: add Verdin iMX8M Mini/Nano support

Add support for storing configuration for Verdin iMX8M Mini and
Nano SoMs in Toradex config block.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agotoradex: tdx-cfg-block: add Apalis iMX8X support
Marcel Ziswiler [Tue, 28 Jan 2020 13:42:23 +0000 (14:42 +0100)]
toradex: tdx-cfg-block: add Apalis iMX8X support

Add support for storing configuration for Apalis iMX8X SoM
in Toradex config block.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agoarm: dts: imx8mm-pinfunc: sync latest linux-next pin func header
Marcel Ziswiler [Tue, 28 Jan 2020 13:42:22 +0000 (14:42 +0100)]
arm: dts: imx8mm-pinfunc: sync latest linux-next pin func header

Synchronise with latest linux-next kernel pin func header file.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
4 years agoMerge branch '2020-02-07-master-imports'
Tom Rini [Sat, 8 Feb 2020 00:04:23 +0000 (19:04 -0500)]
Merge branch '2020-02-07-master-imports'

- 2 FAT fixes.
- MediaTek ethernet support improvement.
- Initial Cortina Access CAxxxx family support.
- Correct return value of do_gpio() and so gpio shell command.

4 years agoboard: presidio-asic: Add basic G3 engr. development board support
Alex Nemirovsky [Thu, 30 Jan 2020 20:34:59 +0000 (12:34 -0800)]
board: presidio-asic: Add basic G3 engr. development board support

Add basic Presidio G3 engineering board support

Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
4 years agoserial: serial_cortina: add UART DM driver for CAxxxx SoCs
Jason Li [Thu, 30 Jan 2020 20:34:58 +0000 (12:34 -0800)]
serial: serial_cortina: add UART DM driver for CAxxxx SoCs

Add serial UART driver support for all Cortina Access
CAxxxx family of SoCs.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Jason Li <jason.li@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
4 years agowatchdog: cortina_wdt: add support for HW WDT on CAxxxx SoCs
Jason Li [Thu, 30 Jan 2020 20:34:57 +0000 (12:34 -0800)]
watchdog: cortina_wdt: add support for HW WDT on CAxxxx SoCs

Add support for hardware watchdog timer on all Cortina Access
CAxxxx family of SoCs.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Jason Li <jason.li@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
4 years agogpio: cortina_gpio: add DM_GPIO driver for CAxxxx SoCs
Jason Li [Thu, 30 Jan 2020 20:34:56 +0000 (12:34 -0800)]
gpio: cortina_gpio: add DM_GPIO driver for CAxxxx SoCs

DM_GPIO based GPIO controller driver for CAxxxx SoCs.
This driver support multiple CPU architectures and
Cortina Access SoC platforms.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Jason Li <jason.li@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
4 years agogpio: do not include <asm/arch/gpio.h> for Cortina CAxxxx SoCs
Jason Li [Thu, 30 Jan 2020 20:34:55 +0000 (12:34 -0800)]
gpio: do not include <asm/arch/gpio.h> for Cortina CAxxxx SoCs

The Cortina CAxxxx GPIO driver maintains DM_GPIO support
across different CPU ISA in the CAxxxx Soc Family; Not just ARM.
Therefore, it is not desirable to split out and maintain separete
gpio header file for each CPU architecture.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jason Li <jason.li@cortina-access.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
4 years agoMAINTAINERS, git-mailrc: cortina: add Custodian for Cortina Access Inc.
Alex Nemirovsky [Thu, 30 Jan 2020 20:34:54 +0000 (12:34 -0800)]
MAINTAINERS, git-mailrc: cortina: add Custodian for Cortina Access Inc.

Assign Alex Nemirovsky as custodian for all
Cortina Access (CA) for ARM and MIPS based SoCs.

Currently Cortina Access CAxxxx family of SoCs support both
ARM and MIPS ISA.  Drivers have cross platform support for
both architectures.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com>
4 years agompc8xx: Expose show_regs()
Tom Rini [Wed, 29 Jan 2020 16:07:19 +0000 (11:07 -0500)]
mpc8xx: Expose show_regs()

To match the other PowerPC platforms the function show_regs() must not
be marked static but instead be an exposed global function.

Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Christophe Leroy <christophe.leroy@c-s.fr>
4 years agocmd/elf.c: Add SPDX tag
Tom Rini [Wed, 29 Jan 2020 16:03:34 +0000 (11:03 -0500)]
cmd/elf.c: Add SPDX tag

Based on reading the text of the license comment this appears to be
the BSD-2-Clause license but with an imperfect word match as
BSD-2-Clause was not (as far as I recall) a common license choice at the
time the code was written.

Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoconfigs: mediatek: enable mt7622 ethernet support
MarkLee [Tue, 21 Jan 2020 11:32:00 +0000 (19:32 +0800)]
configs: mediatek: enable mt7622 ethernet support

This patch enable mt7622 ethernet support in its defconfig

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
4 years agoeth: mtk-eth: aarch64: fix build warnings on ethernet-driver
Frank Wunderlich [Fri, 31 Jan 2020 09:23:29 +0000 (10:23 +0100)]
eth: mtk-eth: aarch64: fix build warnings on ethernet-driver

building mtk ethernet driver for aarch64 (mt7622) results
in warnings/errors

  "error: cast from pointer to integer of different size"

Fixes: 23f17164d9 ("ethernet: MediaTek: add ethernet driver for MediaTek ARM-based SoCs")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
4 years agoarm: dts: mediatek: add ethernet and sgmii dts node for mt7622
MarkLee [Tue, 21 Jan 2020 11:31:59 +0000 (19:31 +0800)]
arm: dts: mediatek: add ethernet and sgmii dts node for mt7622

This patch add eth and sgmii dts node for mt7622 to support ethernet

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
4 years agoeth: mtk-eth: add mt7622 support in mediatek eth driver
MarkLee [Tue, 21 Jan 2020 11:31:58 +0000 (19:31 +0800)]
eth: mtk-eth: add mt7622 support in mediatek eth driver

This patch add mt7622 support in mediatek eth driver

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
4 years agoeth: mtk-eth: add sgmii mode support in mediatek eth driver
MarkLee [Tue, 21 Jan 2020 11:31:57 +0000 (19:31 +0800)]
eth: mtk-eth: add sgmii mode support in mediatek eth driver

This patch add sgmii init part for the mediatek SoC that
support sgmii mode. It is a must for mt7622.

Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
4 years agofat: write: adjust data written in each partial write
Marek Szyprowski [Mon, 2 Dec 2019 11:11:14 +0000 (12:11 +0100)]
fat: write: adjust data written in each partial write

The code for handing file overwrite incorrectly calculated the amount of
data to write when writing to the last non-cluster aligned chunk. Fix
this by ensuring that no more data than the 'filesize' is written to disk.
While touching min()-based calculations, change it to type-safe min_t()
function.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
This patch finally fixes the issue revealed by the test script from the
previous patch. The correctness of the change has been also verified by
the following additional test scripts:

--->8-fat_test2.sh---
#!/bin/bash
make sandbox_defconfig
make
dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
mkfs.vfat -v /tmp/10M.img
cat >/tmp/cmds <<EOF
x
host bind 0 /tmp/10M.img
fatls host 0
mw 0x1000000 0x0a434241 0x1000 # "ABC\n"
mw 0x1100000 0x0a464544 0x8000 # "DEF\n"
fatwrite host 0 0x1000000 file0001.raw 0x1000
fatwrite host 0 0x1000000 file0002.raw 0x1000
fatwrite host 0 0x1000000 file0003.raw 0x1000
fatwrite host 0 0x1000000 file0004.raw 0x1000
fatwrite host 0 0x1000000 file0005.raw 0x1000
fatrm host 0 file0002.raw
fatrm host 0 file0004.raw
fatls host 0
fatwrite host 0 0x1100000 file0007.raw 0x2000
fatwrite host 0 0x1100000 file0007.raw 0x1f00
reset
EOF
./u-boot </tmp/cmds
#verify
rm -r /tmp/result /tmp/model
mkdir /tmp/result
mkdir /tmp/model
yes ABC | head -c 4096 >/tmp/model/file0001.raw
yes ABC | head -c 4096 >/tmp/model/file0003.raw
yes ABC | head -c 4096 >/tmp/model/file0005.raw
yes DEF | head -c 7936 >/tmp/model/file0007.raw
mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
hd /tmp/10M.img
if diff -urq /tmp/model /tmp/result
then
echo Test okay
else
echo Test fail
fi
--->8-fat_test3.sh---
#!/bin/bash
make sandbox_defconfig
make
dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
mkfs.vfat -v /tmp/10M.img
cat >/tmp/cmds <<EOF
x
host bind 0 /tmp/10M.img
fatls host 0
mw 0x1000000 0x0a434241 0x1000 # "ABC\n"
mw 0x1100000 0x0a464544 0x8000 # "DEF\n"
fatwrite host 0 0x1000000 file0001.raw 0x1000
fatwrite host 0 0x1000000 file0002.raw 0x1000
fatwrite host 0 0x1000000 file0003.raw 0x1000
fatwrite host 0 0x1000000 file0004.raw 0x1000
fatwrite host 0 0x1000000 file0005.raw 0x1000
fatrm host 0 file0002.raw
fatrm host 0 file0004.raw
fatls host 0
fatwrite host 0 0x1100000 file0007.raw 0x2000
fatwrite host 0 0x1100000 file0007.raw 0x2100
reset
EOF
./u-boot </tmp/cmds
#verify
rm -r /tmp/result /tmp/model
mkdir /tmp/result
mkdir /tmp/model
yes ABC | head -c 4096 >/tmp/model/file0001.raw
yes ABC | head -c 4096 >/tmp/model/file0003.raw
yes ABC | head -c 4096 >/tmp/model/file0005.raw
yes DEF | head -c 8448 >/tmp/model/file0007.raw
mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
hd /tmp/10M.img
if diff -urq /tmp/model /tmp/result
then
echo Test okay
else
echo Test fail
fi
--->8-fat_test4.sh---
#!/bin/bash
make sandbox_defconfig
make
dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
mkfs.vfat -v /tmp/10M.img
cat >/tmp/cmds <<EOF
x
host bind 0 /tmp/10M.img
fatls host 0
mw 0x1000000 0x0a434241 0x1000 # "ABC\n"
mw 0x1100000 0x0a464544 0x8000 # "DEF\n"
mw 0x1200000 0x0a494847 0x8000 # "GHI\n"
fatwrite host 0 0x1000000 file0001.raw 0x1000
fatwrite host 0 0x1000000 file0002.raw 0x1000
fatwrite host 0 0x1000000 file0003.raw 0x1000
fatwrite host 0 0x1000000 file0004.raw 0x1000
fatwrite host 0 0x1000000 file0005.raw 0x1000
fatrm host 0 file0002.raw
fatrm host 0 file0004.raw
fatls host 0
fatwrite host 0 0x1100000 file0007.raw 0x900
fatwrite host 0 0x1200000 file0007.raw 0x900 0x900
fatwrite host 0 0x1100000 file0007.raw 0x900 0x1200
fatwrite host 0 0x1200000 file0007.raw 0x900 0x1b00
reset
EOF
./u-boot </tmp/cmds
#verify
rm -r /tmp/result /tmp/model
mkdir /tmp/result
mkdir /tmp/model
yes ABC | head -c 4096 >/tmp/model/file0001.raw
yes ABC | head -c 4096 >/tmp/model/file0003.raw
yes ABC | head -c 4096 >/tmp/model/file0005.raw
yes DEF | head -c 2304 >/tmp/model/file0007.raw
yes GHI | head -c 2304 >>/tmp/model/file0007.raw
yes DEF | head -c 2304 >>/tmp/model/file0007.raw
yes GHI | head -c 2304 >>/tmp/model/file0007.raw
mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
hd /tmp/10M.img
if diff -urq /tmp/model /tmp/result
then
echo Test okay
else
echo Test fail
fi
--->8---
Feel free to prepare a proper sandbox/py_test based tests based on
the provided test scripts.

4 years agofat: write: fix broken write to fragmented files
Marek Szyprowski [Mon, 2 Dec 2019 11:11:13 +0000 (12:11 +0100)]
fat: write: fix broken write to fragmented files

The code for handing file overwrite incorrectly assumed that the file on
disk is always contiguous. This resulted in corrupting disk structure
every time when write to existing fragmented file happened. Fix this
by adding proper check for cluster discontinuity and adjust chunk size
on each partial write.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
This patch partially fixes the issue revealed by the following test
script:

--->8-fat_test1.sh---
#!/bin/bash
make sandbox_defconfig
make
dd if=/dev/zero of=/tmp/10M.img bs=1024 count=10k
mkfs.vfat -v /tmp/10M.img
cat >/tmp/cmds <<EOF
x
host bind 0 /tmp/10M.img
fatls host 0
mw 0x1000000 0x0a434241 0x1000 # "ABC\n"
mw 0x1100000 0x0a464544 0x8000 # "DEF\n"
fatwrite host 0 0x1000000 file0001.raw 0x1000
fatwrite host 0 0x1000000 file0002.raw 0x1000
fatwrite host 0 0x1000000 file0003.raw 0x1000
fatwrite host 0 0x1000000 file0004.raw 0x1000
fatwrite host 0 0x1000000 file0005.raw 0x1000
fatrm host 0 file0002.raw
fatrm host 0 file0004.raw
fatls host 0
fatwrite host 0 0x1100000 file0007.raw 0x4000
fatwrite host 0 0x1100000 file0007.raw 0x4000
reset
EOF
./u-boot </tmp/cmds
#verify
rm -r /tmp/result /tmp/model
mkdir /tmp/result
mkdir /tmp/model
yes ABC | head -c 4096 >/tmp/model/file0001.raw
yes ABC | head -c 4096 >/tmp/model/file0003.raw
yes ABC | head -c 4096 >/tmp/model/file0005.raw
yes DEF | head -c 16384 >/tmp/model/file0007.raw
mcopy -n -i /tmp/10M.img ::file0001.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0003.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0005.raw /tmp/result
mcopy -n -i /tmp/10M.img ::file0007.raw /tmp/result
hd /tmp/10M.img
if diff -urq /tmp/model /tmp/result
then
echo Test okay
else
echo Test fail
fi
--->8---

Overwritting a discontiguous test file (file0007.raw) no longer causes
corruption to file0003.raw, which's data lies between the chunks of the
test file. The amount of data written to disk is still incorrect, what
causes damage to the file (file0005.raw), which's data lies next to the
test file. This will be fixed by the next patch.

Feel free to prepare a proper sandbox/py_test based tests based on the
provided test scripts.

4 years agocmd: gpio: Correct do_gpio() return value
Luka Kovacic [Sun, 5 Jan 2020 19:10:56 +0000 (20:10 +0100)]
cmd: gpio: Correct do_gpio() return value

Use the correct return value in function do_gpio() and update
commands documentation with the return values from command_ret_t enum.

CMD_RET_SUCCESS is returned on command success and CMD_RET_FAILURE is
returned on command failure.

The command was returning the pin value, which caused confusion when
debugging (#define DEBUG).

Signed-off-by: Luka Kovacic <luka.kovacic@sartura.hr>
Tested-by: Robert Marko <robert.marko@sartura.hr>
4 years agoazure/gitlab: Update to Docker to have SDL2 available
Tom Rini [Fri, 7 Feb 2020 16:47:28 +0000 (11:47 -0500)]
azure/gitlab: Update to Docker to have SDL2 available

Update to a newer Docker image that contains SDL2 libraries as required
by recent Sandbox changes.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoazure: Use our own GRUB binaries
Tom Rini [Fri, 7 Feb 2020 16:45:55 +0000 (11:45 -0500)]
azure: Use our own GRUB binaries

Use the same logic from 24df1b14f3ab to use our own GRUB binaries in
Azure pipelines as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agogitlab: use our own GRUB
Heinrich Schuchardt [Thu, 19 Dec 2019 12:30:32 +0000 (13:30 +0100)]
gitlab: use our own GRUB

Up to now we have been relying on openSUSE repositories for GRUB on arm and
arm64 though we have included GRUB in our Docker image.

Use the GRUB included in our Docker image.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMerge tag 'efi-2020-04-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 7 Feb 2020 04:19:27 +0000 (23:19 -0500)]
Merge tag 'efi-2020-04-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-04-rc2

Fix pylint issues in Python based tests.

4 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Fri, 7 Feb 2020 04:18:42 +0000 (23:18 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- Gen 5 and Watchdog fixes

4 years agovideo: enable VIDEO_ANSI and all VIDEO_BBP options
Anatolij Gustschin [Tue, 4 Feb 2020 21:43:06 +0000 (22:43 +0100)]
video: enable VIDEO_ANSI and all VIDEO_BBP options

This partially reverts changes by commit 2cc393f32fd9
("video: make BPP and ANSI configs optional") since it
caused issues with other boards (missing LCD console
output on pinebook, x86 platform or sandbox). Enable
all disabled options again and opt out of not supported
color depth in board defconfigs.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Reported-by: Vagrant Cascadian <vagrant@debian.org>
4 years agoconfigs: Resync with savedefconfig
Tom Rini [Thu, 6 Feb 2020 18:42:52 +0000 (13:42 -0500)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
Tom Rini [Wed, 5 Feb 2020 12:19:52 +0000 (07:19 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq

- Bug fixes on ls1012a, ls1021a, ls1028ardb platforms Integrate fspi for
  ls1028a, add DM-I2C support, update secure boot header offset

4 years agoMerge tag 'rpi-next-2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-raspb...
Tom Rini [Wed, 5 Feb 2020 12:18:12 +0000 (07:18 -0500)]
Merge tag 'rpi-next-2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-raspberrypi

- DFU support file operations lager then the default max size
- add dfu support to dwc2 for bcm2835
- enable DFU for RPi4
- Fix RPi4 memory map to include the genet device
- add driver for the genet ethernet device
- enable network support in RPi4 config

4 years agotest: efi_selftest: fix pylint warnings
Heinrich Schuchardt [Sat, 25 Jan 2020 20:58:56 +0000 (21:58 +0100)]
test: efi_selftest: fix pylint warnings

Fix pylint warnings:

* add missing module and function documentation
* correct indentation

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agotest: test_efi_fit: fix pylint warnings
Heinrich Schuchardt [Sat, 25 Jan 2020 20:41:29 +0000 (21:41 +0100)]
test: test_efi_fit: fix pylint warnings

Fix warnings issued by pylint:

* naming of variables
* usage of commas and semicolons
* indentation
* placement of module description

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoddr: altera: Add DDR2 support to Gen5 driver
Marek Vasut [Thu, 17 Oct 2019 22:22:31 +0000 (00:22 +0200)]
ddr: altera: Add DDR2 support to Gen5 driver

Add DDR2 support to Gen5 DRAM driver. As the DDR2 macro names generated
by Quartus are named differently than the DDR3 ones, use anon unions to
store them in the same structures, without growing their size.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agowatchdog: designware: Optionally fetch clock and reset from DT
Marek Vasut [Thu, 3 Oct 2019 12:47:07 +0000 (14:47 +0200)]
watchdog: designware: Optionally fetch clock and reset from DT

Add optional support for fetching watchdog clock rate from DT
and ungating reset via reset framework. This is optional as not
all platforms using DW WDT support the clock and reset frameworks
yet.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dalon Westergreen <dwesterg@gmail.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Philipp Tomisch <philipp.tomisch@theobroma-systems.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # roc-rk3399-pc
4 years agowatchdog: designware: Convert to DM and DT probing
Marek Vasut [Wed, 26 Jun 2019 23:19:23 +0000 (01:19 +0200)]
watchdog: designware: Convert to DM and DT probing

Convert the designware watchdog timer driver to DM and add DT probing
support. Perform minor coding style clean up, like drop superfluous
braces. These ought to be no functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <chin.liang.see@intel.com>
Cc: Dalon Westergreen <dwesterg@gmail.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Philipp Tomisch <philipp.tomisch@theobroma-systems.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com> # roc-rk3399-pc
4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Tue, 4 Feb 2020 16:36:49 +0000 (11:36 -0500)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- Various minor fixes for x86
- Switch to ACPI mode on Intel edison
- Support run-time configuration for NS16550 driver
- Update coreboot and slimbootloader serial drivers to use NS16550
run-time configuration
- ICH SPI driver fixes to hardware sequencing erase case
- Move ITSS from Apollo Lake to a more generic location
- Intel GPIO driver bug fixes
- Move to vs2017-win2016 platform build host for Azure pipelines

4 years agoMerge tag 'ti-v2020.04-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
Tom Rini [Tue, 4 Feb 2020 13:16:01 +0000 (08:16 -0500)]
Merge tag 'ti-v2020.04-rc2' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti

- DFU boot support for J721e
- I2C support for J721e
- GPIO support for J721e
- Android boot image updates on AM57XX
- OMAP watchdog fixes

4 years agoboard: ls1012ardb: do not use imply CONFIG_
Heinrich Schuchardt [Sat, 25 Jan 2020 19:40:21 +0000 (20:40 +0100)]
board: ls1012ardb: do not use imply CONFIG_

Inside Kconfig we must not use the CONFIG_ prefix with the imply statement.

Fixes: 28e3c39e535b ("board: freescale: ls1012a2g5rdb: enable network
support on ls1012a2g5rdb")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls2088a: Updates secure boot headers offset
Priyanka Singh [Wed, 22 Jan 2020 10:32:38 +0000 (10:32 +0000)]
armv8: ls2088a: Updates secure boot headers offset

Updates the secure boot headers offsets of Kernel and other
firmware images for SD and NOR boot sources used by
esbc_validate command.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1088a: Updates secure boot headers offset
Priyanka Singh [Wed, 22 Jan 2020 10:32:34 +0000 (10:32 +0000)]
armv8: ls1088a: Updates secure boot headers offset

Updates the secure boot headers offsets of Kernel and other
firmware images for SD and QSPI boot sources used by
esbc_validate command.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: lx2160a: Updates secure boot headers offset
Priyanka Singh [Wed, 22 Jan 2020 10:31:22 +0000 (10:31 +0000)]
armv8: lx2160a: Updates secure boot headers offset

Updates the secure boot headers offsets of Kernel and other
firmware images for SD and XSPI boot sources used by
esbc_validate command.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1012ardb: Updates secure boot headers offset
Priyanka Singh [Wed, 22 Jan 2020 10:29:52 +0000 (10:29 +0000)]
armv8: ls1012ardb: Updates secure boot headers offset

Updates the secure boot headers offsets of Kernel and other
firmware images used by esbc_validate command.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: ls1046a: Updates secure boot headers offset
Priyanka Singh [Wed, 22 Jan 2020 10:29:46 +0000 (10:29 +0000)]
armv8: ls1046a: Updates secure boot headers offset

Updates the secure boot headers offsets of Kernel and other
firmware images for SD and QSPI boot sources used by
esbc_validate command.

Signed-off-by: Priyanka Singh <priyanka.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1021a: Reserve low memory for CMA
Alison Wang [Tue, 21 Jan 2020 07:33:01 +0000 (07:33 +0000)]
configs: ls1021a: Reserve low memory for CMA

The default reserved memory for CMA is high memory. If LPAE is enabled,
highmem pages are non-remapped and can not be used with
dma_alloc_coherent. This patch will reserve low memory for CMA and fix
the issue on LS1021A.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodm: arm: ls1021a: add i2c DM support
Biwen Li [Tue, 31 Dec 2019 07:33:44 +0000 (15:33 +0800)]
dm: arm: ls1021a: add i2c DM support

This supports i2c DM and enables CONFIG_DM_I2C
for SoC LS1021A

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agodm: arm64: ls1012a: add i2c DM support
Biwen Li [Tue, 31 Dec 2019 07:33:41 +0000 (15:33 +0800)]
dm: arm64: ls1012a: add i2c DM support

This supports i2c DM and enables CONFIG_DM_I2C
for SoC LS1012A

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoKconfigs: layerscape: use a convenient default value for SYS_MALLOC_F_LEN
Biwen Li [Tue, 31 Dec 2019 07:33:40 +0000 (15:33 +0800)]
Kconfigs: layerscape: use a convenient default value for SYS_MALLOC_F_LEN

The default value of CONFIG_SYS_MALLOC_F_LEN (0x400)
leaves U-Boot with not enough memory to load i2c driver
before relocate, causing it to hang.

Change the default value of CONFIG_SYS_MALLOC_F_LEN
for below SoCs,
- LS1012A
- LS1021A
- LS1043A
- LS1046A

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoi2c: mxc_i2c: add DM_FLAG_PRE_RELOC flag
Biwen Li [Tue, 31 Dec 2019 07:33:39 +0000 (15:33 +0800)]
i2c: mxc_i2c: add DM_FLAG_PRE_RELOC flag

This adds DM_FLAG_PRE_RELOC flag to probe i2c driver
before relocation

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarmv8: fsl-layerscape: spl: fix build error when DM_I2C is enabled
Biwen Li [Tue, 31 Dec 2019 07:33:38 +0000 (15:33 +0800)]
armv8: fsl-layerscape: spl: fix build error when DM_I2C is enabled

Fix below SPL build error when DM_I2C is enabled,
- arch/arm/cpu/armv8/built-in.o: In function `board_init_f:
  arch/arm/cpu/armv8/fsl-layerscape/spl.c:74: undefined reference to `i2c_init_all'
  arch/arm/cpu/armv8/fsl-layerscape/spl.c:74:(.text.board_init_f+0x30):
  relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol
  `i2c_init_all'
  make[2]: *** [spl/u-boot-spl] Error 1
  make[1]: *** [spl/u-boot-spl] Error 2
  make: *** [sub-make] Error 2
  arch/arm/cpu/armv8/fsl-layerscape/spl.c: In function 'board_init_f':
  arch/arm/cpu/armv8/fsl-layerscape/spl.c:74:2: warning: implicit
  declaration of function 'i2c_init_all'; did you mean 'misc_init_r'?
  [-Wimplicit-function-declaration]`

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agortc: pcf8563: Add driver model support
Biwen Li [Tue, 31 Dec 2019 07:33:37 +0000 (15:33 +0800)]
rtc: pcf8563: Add driver model support

Add support of driver model of pcf8563

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1028a: Enable FSPI support
Kuldeep Singh [Wed, 6 Nov 2019 11:08:02 +0000 (16:38 +0530)]
configs: ls1028a: Enable FSPI support

Enable FSPI controller support. So, flash environment can now be used

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: lx2160a: Add FSPI node properties
Kuldeep Singh [Wed, 6 Nov 2019 11:08:01 +0000 (16:38 +0530)]
arm: dts: lx2160a: Add FSPI node properties

Align flexspi node properties with linux device-tree properties
Tested on LX2160A-RDB

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls1028a: Add FSPI node properties
Kuldeep Singh [Wed, 6 Nov 2019 11:08:00 +0000 (16:38 +0530)]
arm: dts: ls1028a: Add FSPI node properties

Align flexspi node properties with linux device-tree properties
Tested on LS1028A-RDB

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoboard: fsl: lx2160a: Add support to reset to eMMC
Meenakshi Aggarwal [Thu, 23 Jan 2020 12:25:10 +0000 (17:55 +0530)]
board: fsl: lx2160a: Add support to reset to eMMC

Add support of "qixis_reset emmc" command for lx2160a based platforms

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: dts: ls1028a: fix interrupt properties
Michael Walle [Tue, 17 Dec 2019 23:10:00 +0000 (00:10 +0100)]
arm: dts: ls1028a: fix interrupt properties

Sync the interrupt properties with the ones from Linux. Also use the
constants provided by the dt-bindings header. Please note, that there
are actual changes/fixes in the irq flags. U-Boot won't use the
interrupt properties anyway. It's just to be consistent with the Linux
device tree.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoarm: ls1028a: use the new flexspi driver
Michael Walle [Tue, 17 Dec 2019 23:09:59 +0000 (00:09 +0100)]
arm: ls1028a: use the new flexspi driver

Also align the fspi node with the kernel one.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoconfigs: ls1012ardb: Enable CONFIG_SYS_RELOC_GD_ENV_ADDR
Kuldeep Singh [Thu, 12 Dec 2019 09:16:04 +0000 (14:46 +0530)]
configs: ls1012ardb: Enable CONFIG_SYS_RELOC_GD_ENV_ADDR

Enable the config for ls1012ardb as the entry got missed earlier.

Fixes: 8d8ee47e03 ("env: Add CONFIG_SYS_RELOC_GD_ENV_ADDR symbol")
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
4 years agoazure: Move to vs2017-win2016 platform build host
Tom Rini [Mon, 27 Jan 2020 21:23:29 +0000 (16:23 -0500)]
azure: Move to vs2017-win2016 platform build host

Azure is moving to remove the vs2015-win2012r2 platform build host.  The
two suggested new platforms to use are vs2017-win2016 and windows-2019.
For now, move up to vs2017-win2016.

Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
4 years agogpio: intel_gpio: Fix register/bit offsets intel_gpio_get_value()
Wolfgang Wallner [Mon, 3 Feb 2020 10:38:06 +0000 (11:38 +0100)]
gpio: intel_gpio: Fix register/bit offsets intel_gpio_get_value()

Fix the following in intel_gpio_get_value():

 * The value of the register is contained in the variable 'reg', not in
   'mode'. The variable 'mode' contains only the configuration whether
   the gpio is currently an input or an output.

 * The correct bitmasks for the input and output value are
   PAD_CFG0_RX_STATE and PAD_CFG0_TX_STATE.
   Use them instead of the currently used PAD_CFG0_RX_STATE_BIT and
   PAD_CFG0_TX_STATE_BIT.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agogpio: intel_gpio: Clear tx state bit when setting output
Wolfgang Wallner [Mon, 3 Feb 2020 10:38:05 +0000 (11:38 +0100)]
gpio: intel_gpio: Clear tx state bit when setting output

Add missing 'PAD_CFG0_TX_STATE' to the clear mask for pcr_clrsetbits32().
Otherwise this bit cannot be cleared again after it has been set once.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agogpio: intel_gpio: Pass pinctrl device to pcr_clrsetbits32()
Wolfgang Wallner [Mon, 3 Feb 2020 10:38:04 +0000 (11:38 +0100)]
gpio: intel_gpio: Pass pinctrl device to pcr_clrsetbits32()

The function pcr_clrsetbits32() expects a device with a P2SB parent
device. In intel_gpio_direction_output() and intel_gpio_set_value()
the device 'dev' is passed to pcr_clrsetbits32(), which is a
gpio-controller with a device 'pinctrl' as parent. This does not match
the expectations of pcr_clrsetbits32(). But the 'pinctrl' device has a
P2SB as parent.

Pass the 'pinctrl' device instead of the 'dev' device to
pcr_clrsetbits32().

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: itss: Remove apl-prefix
Wolfgang Wallner [Wed, 22 Jan 2020 15:01:47 +0000 (16:01 +0100)]
x86: itss: Remove apl-prefix

The Interrupt Timer Subsystem (ITSS) is not specific to Apollo Lake, so
remove the apl-prefix of the implemented functions/structures/...

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: itss: Add a Kconfig option to enable/disable ITSS driver
Wolfgang Wallner [Mon, 3 Feb 2020 13:06:45 +0000 (14:06 +0100)]
x86: itss: Add a Kconfig option to enable/disable ITSS driver

Add a Kconfig option to support enabling/disabling the inclusion of
the ITSS driver depending on the platform.

Atuomatically select the ITSS driver when building for Apollo Lake.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: squashed in http://patchwork.ozlabs.org/patch/1232761/]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agox86: Move itss.c from Apollo Lake to a more generic location
Wolfgang Wallner [Wed, 22 Jan 2020 15:01:46 +0000 (16:01 +0100)]
x86: Move itss.c from Apollo Lake to a more generic location

The Interrupt Timer Subsystem (ITSS) is not specific to Apollo Lake, so
move it to a common location within arch/x86.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: conditionally build itss.c]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agowatchdog: omap_wdt: Fix WDT coding style
Marek Vasut [Fri, 24 Jan 2020 04:44:25 +0000 (05:44 +0100)]
watchdog: omap_wdt: Fix WDT coding style

Fix obvious coding style problems, no functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Sam Protsenko <semen.protsenko@linaro.org>
Cc: Suniel Mahesh <sunil.m@techveda.org>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>