Commit Graph

20698 Commits

Author SHA1 Message Date
Suniel Mahesh
01892d230d rockchip: rk3399: split roc-pc-rk3399 out of evb_rk3399
roc-pc-rk3399 board has one user button & three user LED's. Currently
we don't have any code support for these devices. Since button and LED's are
specific to roc-pc-rk3399 board, split it into its own board file and add code
support here.

Signed-off-by: Suniel Mahesh <sunil@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-02-19 16:45:38 +08:00
Jagan Teki
a30c68945c rk3288: vyasa: Add console settings
Add console settings like stdin, stdout and stderr as
cros-ec-keyb and vidconsole respectively for Vyasa Rk3288
board.

This would certainly help to detect the attached video
devices (like HDMI) and print the console message on display.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-02-19 16:45:38 +08:00
Jagan Teki
d7e7a5b044 rk3288: tinker: Enable HDMI output
Enable HDMI output for Tinker RK3288 board.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-02-19 16:45:38 +08:00
Tom Rini
f2a73d6867 - add DH Electronics DHCOM SoM and PDK2 board
- DT alignment with kernel v5.5-rc7 for stm32mp1 boards
 - fix STM32 image format for big endian hosts in mkimage
 - solve warnings in device tree and code for stm32mp1 boards
 - remove fdt_high and initrd_high for stm32 and stih boards
 - add support of STM32MP15x Rev.Z
 - update stm32mp1 readme
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEE56Yx6b9SnloYCWtD4rK92eCqk3UFAl5GcB0ACgkQ4rK92eCq
 k3Wr9gf/dDPJi6UBhLDio/IVKDBddOEUN0Lwdr9W0upL+DrdvEOyNyMSEKuLccIE
 UTd1NmNNwcvgDRaPvB5o3R7twWItTW0cYlmVkFSZ228aq6xdf/SElN2OUD6B9Gh+
 8bi6oVLu41TNMYn4VYxsEftcT2megfH8s+SH/FlvR5ua1yCC1vyrytEQjPIbJAB2
 sa90ewDyp5EYqGLdAk6AVjPLeNZsaleGwuyLf04PoC2xhn+3HTEKJCJN4O46aJUr
 0GUI7YN7pTjIfZdYfFqjcwoQV1xV2HtbjCTcOb8Td8TEYjIoILF8tSyfIwDXWGB5
 zMQIQxUdQyNiqdBPFcnkAufjk+zLIQ==
 =0dG+
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20200214' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- add DH Electronics DHCOM SoM and PDK2 board
- DT alignment with kernel v5.5-rc7 for stm32mp1 boards
- fix STM32 image format for big endian hosts in mkimage
- solve warnings in device tree and code for stm32mp1 boards
- remove fdt_high and initrd_high for stm32 and stih boards
- add support of STM32MP15x Rev.Z
- update stm32mp1 readme
2020-02-14 07:31:47 -05:00
Tom Rini
e6da32f243 Merge tag 'ti-v2020.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
K3 J721E/AM65X:
- UART boot fixes for J721E
- Enabling debug uart for AM65x

DRA7xx/AM57xx:
- Preveinting boot from Invalid boot configuration for AM57xx

Keysonte2:
- Linux Boot fixes for K2 platforms.

AM33/AM43/Davinci:
- Ethernt boot fixes for AM43XX
- USB Host boot fixes for AM43XX
2020-02-14 07:31:02 -05:00
Patrice Chotard
8ee5e3c81f board: stm32: remove fdt_high and fdt_highinitrd_high
For stm32 f4, f7 and h7 boards, remove fdt_high and
initrd_high as they shouldn't be used, this allows the fdt
and initrd relocation.
This implies to set CONFIG_SYS_BOOTMAPSZ to indicate the
amount of memory available to contain kernel, device tree
and initrd for relocation.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com>
2020-02-13 18:47:00 +01:00
Patrice Chotard
638c2058f8 board: stm32: fix extra env setings addresses
For stm32f4, f7 and h7 boards, reserve:
 - 4MB for kernel
 - 64KB for fdt, boot script, pxefile
 - the remaining memory for ramdisk

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com>
2020-02-13 18:47:00 +01:00
Patrice Chotard
83ba243897 board: stih410-b2260: remove fdt_high and initrd_high
Remove fdt_high and initrd_high as they shouldn't be used,
this allows the fdt and initrd relocation.
This implies to set CONFIG_SYS_BOOTMAPSZ to indicate the
amount of memory available to contain kernel, device tree
and initrd for relocation.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com>
2020-02-13 18:47:00 +01:00
Patrick Delaunay
ac5769cba1 stm32mp1: remove fdt_high and initrd_high in environment
Remove fdt_high and initrd_high (set to 0xffffffff) in stm32mp1 board
enviromnent, and U-Boot always relocate FDT and initrd in bootm command.

This relocation is limited by CONFIG_SYS_BOOTMAPSZ which indicates
the size of the memory region where it is safe to place data passed
to the Linux kernel (DTB, initrd), it is
a) Less than or equal to RAM size.
b) not within the kernel's highmem region

So 256M seems large enough in most circumstances and users
can override this value via environment variable "bootm_mapsize"
if needed.

This modification increases the boot time but avoid assumption
on aligned address for bootm command.

A user can still define this variables themselves if the FDT or
initrd is either left in-place or copied to a specific location.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-02-13 18:47:00 +01:00
Tero Kristo
e8d0d53040 ARM: keystone2: enable initrd fixup for LPAE addressing
Keystone2 u-boot loads the initrd image into non-LPAE addressed memory
but linux kernel is running in LPAE. This causes a conflict as kernel
detects that non-memory address is passed and kernel ignores initrd.
There is an existing fixup logic to modify the address in the proper
configuration, but this is disabled at the moment. Enable the fixup
by setting the env variable for this so that initrd can be used
properly.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-13 21:39:18 +05:30
Heinrich Schuchardt
58fc2b54f5 pci: definition of pci_addr_t and pci_size_t
Currently the size of pci_addr_t and pci_size_t depends on
CONFIG_SYS_PCI_64BIT. For qemu_arm64_defconfig with 4 GiB RAM this leads
to an error

    pci_hose_phys_to_bus: invalid physical address

which is due to the truncation of the bus address in _dm_pci_phys_to_bus.

Defining CONFIG_SYS_PCI_64BIT is not a solution as this results in an error

   PCI: Failed autoconfig bar 10

So let's use unsigned long for pci_addr_t and pci_size_t if
CONFIG_SYS_PCI_64BIT is not defined.

Considering that 32bit U-Boot is used to launch some 64bit x86 systems we
cannot do without CONFIG_SYS_PCI_64BIT requiring u64 as type.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-13 10:10:50 -05:00
Tom Rini
9a8942b53d sandbox conversion to SDL2
TPM TEE driver
 Various minor sandbox video enhancements
 New driver model core utility functions
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAl48iogACgkQfxc6PpAI
 reaVzAf/an3/yKe6r3CVWlcRV6H/dVg1ApnnLpX7jS0p0b++oCVvOiy7z1WPXj3k
 b1SSgENDeeZ/8EHio+Gf7ZidH/TGEj7L6YEFwd1t60GMkZiWEkNf4Z53tw482YG+
 96hoPD+ySTW+ddIdVHWAFG2I4aEiKHANJAp/ItNdD+rLbrEwNQy+eiK5JTOk80B6
 /X8AJCLZeAC1s7vs+2+WolgjT78QGzA9HHalMiublcqh0ivKKk0QeQiOKKPe8JYJ
 om5YY1TxayQ60Xmo5f39/SBfzEEklxw83sU9o1tBeYzyVUpu7fQdkxiDbWdsij77
 DgwLdeYQJGbN+hdSWE0gjTqyhW+lWA==
 =KRoA
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-6feb20' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

sandbox conversion to SDL2
TPM TEE driver
Various minor sandbox video enhancements
New driver model core utility functions
2020-02-11 10:58:41 -05:00
Tom Rini
4e5c4683b7 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Move P2SB from Apollo Lake to a more generic location
- Add a function to find a device by drvdata in DM core
- Enhancement of DM IRQ uclass driver
- Add a clock driver for Intel devices
- Add support for ACPI general-purpose events
- Add a TPM driver for H1/Cr50
- Enable TPM on Google Chromebook Coral
2020-02-10 12:27:31 -05:00
Ian Ray
a19d73708f board: ge: bx50v3, imx53ppd: configure CONFIG_SYS_BOOTMAPSZ
Configure `CONFIG_SYS_BOOTMAPSZ' per guidance on u-boot@lists.denx.de.

Signed-off-by: Ian Ray <ian.ray@ge.com>
2020-02-09 21:47:20 +01:00
Robert Beckett
5e13def1ee board: ge: bx50v3, mx53ppd: fix firstboot detection
Use `test' command to test for file existence instead of relying on the
old functionality of the `ext2load' command (which now reports an error
when attempting to load a zero length file).

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Ian Ray <ian.ray@ge.com>
2020-02-09 21:47:20 +01:00
Ian Ray
30f0909c7e board: ge: mx53ppd: use DM for uart
Drop PPD_UART_PAD_CTRL since it matches defaults.
Enable DM serial and MXC uart.

Signed-off-by: Ian Ray <ian.ray@ge.com>
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
2020-02-09 21:47:20 +01:00
Robert Beckett
a707281a00 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>
2020-02-09 21:47:20 +01:00
Robert Beckett
2d1ea19b55 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>
2020-02-09 21:47:20 +01:00
Robert Beckett
92faf43b9c 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>
2020-02-09 21:47:20 +01:00
Ian Ray
9167c20692 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>
2020-02-09 21:47:20 +01:00
Robert Beckett
1d06dc6d16 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>
2020-02-09 21:47:20 +01:00
Robert Beckett
41613a7a58 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>
2020-02-09 21:47:20 +01:00
Robert Beckett
1dec7fa797 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>
2020-02-09 21:47:20 +01:00
Fabio Estevam
70a2df36fe 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>
2020-02-09 15:05:10 +01:00
Marek Vasut
b91f28de83 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>
2020-02-09 15:03:54 +01:00
Joris Offouga
2140cae4e8 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>
2020-02-09 14:59:54 +01:00
Fabio Estevam
17c9d23cbe mx7ulp_com: Remove unneeded SoC definitions
Since commit 9c27310ac2 ("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>
2020-02-09 14:58:37 +01:00
Fabio Estevam
19ba4808c1 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>
2020-02-09 14:52:39 +01:00
Igor Opaniuk
14d5aeff77 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>
2020-02-09 14:50:52 +01:00
Alex Nemirovsky
7d706a886f 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>
2020-02-07 16:16:01 -05:00
Simon Glass
1400a7f3d3 tpm: Add more TPM2 definitions
Add definitions for access and status.

Need to drop the mixed case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-07 22:46:35 +08:00
Simon Glass
025543554c dm: irq: Add support for requesting interrupts
At present driver model supports the IRQ uclass but there is no way to
request a particular interrupt for a driver.

Add a mechanism, similar to clock and reset, to read the interrupts
required by a device from the device tree and to request those interrupts.

U-Boot itself does not have interrupt-driven handlers, so just provide a
means to read and clear an interrupt. This can be useful to handle
peripherals which must use an interrupt to determine when data is
available, for example.

Bring over the basic binding file as well, from Linux v5.4. Note that the
older binding is not supported in U-Boot; the newer 'special form' must be
used.

Add a simple test of the new functionality.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-07 22:46:32 +08:00
Simon Glass
ba87607971 dm: irq: Add support for interrupt controller types
There can be different types of interrupt controllers in a system and some
drivers may need to distinguish between these. In general this can be
handled using the device tree by adding the interrupt information to
device nodes.

However on x86 devices we have interrupt controllers which are not tied
to any particular device and not really used in U-Boot. These still need
to be inited, so a convenient method is to give each controller a type
and allow a particular controller type to be probed.

Add support for this in sandbox along with a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: remove the new bland line at EOF of test/dm/irq.c]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-07 22:44:59 +08:00
Simon Glass
b4d00b256e x86: Add a clock driver for Intel devices
So far we have avoided adding a clock driver for Intel devices. But the
Designware I2C driver needs a different clock (133MHz) on Intel devices
than on others (166MHz). Add a simple driver that provides this
information.

This driver can be expanded later as needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-07 22:41:24 +08:00
Simon Glass
50162348f0 dm: core: Add a function to find a device by drvdata
It is sometimes useful to find a device in a uclass using only its driver
data. The driver data often indicates the 'subtype' of the device, e,g,
via its compatible string.

Add a function to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-07 22:41:24 +08:00
Simon Glass
3cf0fba4ff dm: core: Allow iterating devices without uclass_get()
At present we have uclass_foreach_dev() which requires that uclass_get()
be called beforehand to find the uclass. This is good if we suspect that
that function might fail, but often we know that the uclass is available.

Add a new helper which does this uclass_get() automatically, so that only
the uclass ID is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-07 22:41:24 +08:00
Tom Rini
457faef262 Merge branch 'master' of git://git.denx.de/u-boot-socfpga
- Gen 5 and Watchdog fixes
2020-02-06 23:18:42 -05:00
Simon Glass
f217651575 dm: core: Drop the inclusion of linux/compat.h in dm.h
Most files don't need this header and it pulls in quite of lots of stuff,
malloc() in particular. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 21:48:22 -07:00
Simon Glass
336d4615f8 dm: core: Create a new header file for 'compat' features
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.

Move the compatibility features into a separate header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
61b29b8268 dm: core: Require users of devres to include the header
At present devres.h is included in all files that include dm.h but few
make use of it. Also this pulls in linux/compat which adds several more
headers. Drop the automatic inclusion and require files to include devres
themselves. This provides a good indication of which files use devres.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
2020-02-05 19:33:46 -07:00
Simon Glass
3062cd17af sound: Add a new stop_play() method
At present there is no positive indication that U-Boot has finished
sending sound data. This means that it is not possible to power down an
audio codec, for example. Add a new method that is called once all sound
data has been sent.

Add a new method for this, called when the sound_play() call is done.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
89cdb0b583 sandbox: Drop os_realloc()
Due to recent changes this function is no-longer used. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
f72bdc60b2 sandbox: Rename strdup() functions
These functions include calls to a memory-allocation routine and so need
to use the system routine when called from a library.

To preserve access to these functions for libraries that need it, such as
SDL, rename these functions within U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
1ea1c7d80f string: Allow arch override of strndup() also
At present architectures can override strdup() but not strndup(). Use
the same option for both.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
cfda60f99a sandbox: Use a prefix for all allocation functions
In order to allow use of both U-Boot's malloc() and the C library's
version, set a prefix for the allocation functions so that they can
co-exist.

This is only done for sandbox. For other archs everything remains the
same.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
8d38a8459b mtd: Rename free() to rfree()
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
aae9588223 dma: Rename free() to rfree()
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
fb8c0d595f clk: Rename free() to rfree()
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
093152f275 gpio: Rename free() to rfree()
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
94474b25c3 reset: Rename free() to rfree()
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
4f51188e47 power-domain: Rename free() to rfree()
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
2020-02-05 19:33:46 -07:00
Simon Glass
cc92c3cc68 mailbox: Rename free() to rfree()
This function name conflicts with our desire to #define free() to
something else on sandbox. Since it deals with resources, rename it to
rfree().

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Sean Anderson
7b9d60fc1f cmd: Add command to dump drivers and compatible strings
This adds a subcommand to dm to dump out what drivers are installed, and their
compatible strings. I have found this useful in ensuring that I have the correct
drivers compiled, and that I have put in the correct compatible strings.

Signed-off-by Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Philippe Reynes
bb3f47eb78 tpm: add a helper to iterate on all tpm devices
This add a helper for_each_tpm_device that run
through all the tpm (1.x and 2.0) devices.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2020-02-05 19:33:46 -07:00
Simon Glass
400175b0a7 test: Add a way to check each line of console output
When writing tests to check the output from commands it is useful to be
able to check the output line by line using an assertion. Add helper
macros to support this and to check that there is no unexpected trailing
data.

Also some commands produce a dump using print_buffer(). Add a way to check
that the correct number of bytes are dumped (ignoring the actual
contents).

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
b612312816 console: Add a function to read a line of the output / eof
When recording the console output for testing it is useful to be able to
read the output a line at a time to check that the output is correct. Also
we need to check that we get to the end of the output.

Add a console function to return the next line and another to see how must
data is left.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
02247c1887 bloblist: Tidy up a few comments and code-style nits
Add a messing error code to bloblist_new() and tidy up the line length in
bloblist_addrec().

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
5b044548f5 bloblist: Add a new function to add or check size
A common check is to see if a blob is present, create it if not and make
sure that the size is large enough. Add a function to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:46 -07:00
Simon Glass
903e83ee84 dm: core: Add a way to iterate through children, probing each
It is sometimes useful to process all children, making sure they are
probed first. Add functions to help with this and a macro to make it more
convenient.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
f262d4ca4b dm: core: Add a way to read platdata for all child devices
When generating ACPI tables we need to make sure that all devices have
read their platform data, so that they can generate the tables correctly.

Rather than adding this code in ACPI, create a core function to handle it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
bd933bfd83 dm: core: Add ofnode_get_chosen_prop()
Add a function to read a property from the chosen node, providing access
to its length. Update ofnode_get_chosen_string() to make use of it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
a8167d8ee2 dm: core: Add ofnode_read_prop()
Add a new function to read a property that supports reading the length as
well.

Reimplement ofnode_read_string() using it and fix its comment.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
14ca9f7f5a dm: core: Rename ofnode_get_chosen_prop()
This function is actually intended to read a string rather than a
property. All of its current callers use it that way. Also there is no way
to return the length of the property from this function.

Rename it to better indicate its purpose, using ofnode_read as the prefix
since this matches most other functions.

Also add some tests which are missing for these functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
74d594a20e dm: core: Update comment for ofnode_get_chosen_node()
The current comment is a big vague and misleading. Rewrite it to state
precisely what the function does.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
ba8444a066 test: Add underscore prefix to macro parameters
If a test happens to use the same variable as the macro parameter the
macro does not work as intended. Add an underscore to guard against this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
88b3a37eaa dm: core: Use const device for the dev_read_...() interface
These functions do not modify the device so should use a const pointer to
it. Update the code accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
d975ce21ce dm: core: Use const device for the devfdt...() interface
These functions do not modify the device so should use a const pointer to
it. Update the code accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
194fca9130 dm: pci: Update a few more interfaces for const udevice *
Tidy up a few places where const * should be used.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
c4e72c4ad8 dm: pci: Update the PCI read_config() method to const dev *
At present this method uses a non-const udevice pointer, but the call
should not modify the device. Use a const pointer.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Simon Glass
fc347fbdd4 dm: core: Use const where possible in device.h
Update this header file to use const devices where possible, to permit
callers to also use const.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-05 19:33:45 -07:00
Tom Rini
f5cc89a82a 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
2020-02-05 07:19:52 -05:00
Tom Rini
c95215a6ca - 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
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEUdvKHhzqrUYPB/u8L21+TfbCqH4FAl43/6QSHG1icnVnZ2Vy
 QHN1c2UuY29tAAoJEC9tfk32wqh+Fq0P/1vCbkiRgOtOIMPh/b7qWUVweTdgwcbf
 9v8Qa2IKc0FYgjYjIMjihfbvF7R0vGaOUX13yKDV/3v42cpLkOxBauCYasiXznI+
 9hBwKfOFPzLpSz3SJ+LRn0XhHSAZ1jcT19pgaPmA5Pry6l7JEai4M3JFeYeJRWOt
 N1EFqxqqeAQ+eXdQWXTKh6AiFEia7aL4OVcU5HY9BMyDW8H13gvNejoeSXNKLupM
 GGHJfG/TRKHP5UJoqH+I9XFdkUKfN4e1oWpxl7nA5HpvRfFgO+AQm9OgM2xumnGp
 +4kS4T5FexCrcQ37m5fG9+LSxk2PB8+P0kmfImaO54lUdAtjB+iqg4RUB7eN/vLH
 37S13AB7T8OTjbe8tlLCjGDXQ/8xU+NDZQsE9GnRmaj2UbK57hJPW6kTRgwK4BEZ
 l0Rr9RrHlhrBvywHMII11fhH+wVO0R29GFvRZSSscRqvKq61FF//r8hNQX7xtErf
 +OIEgIcEt9bbLyq7LJQ+2xRdQj4UgSv5/poaaoWX+uY4+yUElbiPpTJLN2oslZ8x
 liUKigWmTgF8G1ukalyA1u3xj0kyfl4QCxoJpNqoaHg9sel0S5igGE0dLzKXUKSw
 1A7BCT0rO/FhoMxc7P4kHjpIKlw6Tatw1wJY3g8VzRgEsXlTawNszadO1jswBmHV
 9XFk+iH6f/rg
 =Sv9b
 -----END PGP SIGNATURE-----

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
2020-02-05 07:18:12 -05:00
Marek Vasut
cf8c836788 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
2020-02-05 03:01:57 +01:00
Tom Rini
d4827fcd4c 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
2020-02-04 11:36:49 -05:00
Priyanka Singh
8526a58aa5 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>
2020-02-04 16:20:25 +05:30
Priyanka Singh
4238e37333 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>
2020-02-04 16:20:25 +05:30
Priyanka Singh
20858a2be0 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>
2020-02-04 16:20:25 +05:30
Priyanka Singh
3e90cfee9d 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>
2020-02-04 16:20:25 +05:30
Priyanka Singh
e735ad3c43 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>
2020-02-04 16:20:25 +05:30
Alison Wang
feb8fa2ef0 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>
2020-02-04 16:20:25 +05:30
Biwen Li
9ebde8849a 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>
2020-02-04 16:20:25 +05:30
Biwen Li
a0affb367a 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>
2020-02-04 16:20:25 +05:30
Meenakshi Aggarwal
bddec1b0e6 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>
2020-02-04 16:19:37 +05:30
Vignesh Raghavendra
4728c6f792 configs: j721e_evm: Add DFU related variables
Add configs to download varies stages of bootloader images to RAM during
DFU boot.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04 09:07:24 +05:30
Sam Protsenko
add1a6bc9b arm: ti: boot: Use correct dtb and dtbo on Android boot
Read correct dtb blob from boot.img/recovery.img and apply correct dtbo
blobs from dtbo partition.

Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04 09:07:24 +05:30
Sam Protsenko
d94e6dbcf6 env: ti: boot: Boot Android with dynamic partitions
Changes:
  - use boot.img instead of boot_fit.img
  - use .dtb from boot.img v2
  - implement recovery boot
  - always boot ramdisk from boot.img, we can't mount system as root
    now, as system is a logical partition inside of super partition
  - don't add "skip_initramfs" to cmdline anymore
  - to boot into recovery, use boot image from recovery partition
  - prepare partition table:
    - A/B scheme
    - use 'super' partition instead of 'system' and 'vendor'
    - add dtbo partitions
    - introduce metadata partition

Not implemented: reading and applying dtbo blobs from dtbo partition.

Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04 09:07:24 +05:30
Sam Protsenko
0f5103dee3 env: ti: boot: Respect slot_suffix in AVB commands
Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04 09:07:24 +05:30
Sam Protsenko
7f2531502c image: android: Add routine to get dtbo params
Android Boot Image v1 adds "Recovery DTB" field in image header and
associate payload in boot image itself [1]. Payload should be in
Android DTB/DTBO format [2]. That "Recovery DTB" area should be only
populated for non-A/B devices, and only in recovery image.

Add function to get an address and size of that payload. That function
can be further used e.g. in 'abootimg' command to provide the user a way
to get the address of recovery dtbo from U-Boot shell, which can be
further parsed using 'adtimg' command.

[1] https://source.android.com/devices/bootloader/boot-image-header
[2] https://source.android.com/devices/architecture/dto/partitions

Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04 09:07:24 +05:30
Sam Protsenko
c3bfad825a image: android: Add functions for handling dtb field
Android Boot Image v2 adds "DTB" payload (and corresponding field in the
image header). Provide functions for its handling:

  - android_image_get_dtb_by_index(): Obtain DTB blob from "DTB" part of
    boot image, by blob's index
  - android_image_print_dtb_contents(): Iterate over all DTB blobs in
    "DTB" part of boot image and print those blobs info

"DTB" payload might be in one of the following formats:
  1. concatenated DTB blobs
  2. Android DTBO format

The latter requires "android-image-dt.c" functionality, so this commit
selects that file for building for CONFIG_ANDROID_BOOT_IMAGE option.

Right now this new functionality isn't used, but it can be used further.
As it's required to apply some specific dtbo blob(s) from "dtbo"
partition, we can't automate this process inside of "bootm" command. But
we can do next:
  - come up with some new command like "abootimg" to extract dtb blob
    from boot image (using functions from this patch)
  - extract desired dtbo blobs from "dtbo" partition using "adtimg"
    command
  - merge dtbo blobs into dtb blob using "fdt apply" command
  - pass resulting dtb blob into bootm command in order to boot the
    Android kernel with Android ramdisk from boot image

Signed-off-by: Sam Protsenko <joe.skb7@gmail.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-02-04 09:07:24 +05:30
Park, Aiden
18416ba119 x86: serial: Use NS16550_DYNAMIC in Slim Bootloader
Slim Bootloader provides serial port info in its HOB to support
both IO or MMIO serial ports, but it's controlled by SYS_NS16550_MEM32
or SYS_NS16550_PORT_MAPPED in U-Boot.
To support both serial port configurations dynamically at runtime,
Slim Bootloader serial driver leverages NS16550_DYNAMIC.

Signed-off-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: remove the obsolete comments for data->type]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04 01:19:26 +08:00
Simon Glass
62cbde4c4e serial: ns16550: Support run-time configuration
At present this driver uses an assortment of CONFIG options to control
how it accesses the hardware. This is painful for platforms that are
supposed to be controlled by a device tree or a previous-stage bootloader.

Add a new CONFIG option to enable fully dynamic configuration. This
controls register spacing, size, offset and endianness.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Aiden Park <aiden.park@intel.com>
Tested-by: Aiden Park <aiden.park@intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: squashed in http://patchwork.ozlabs.org/patch/1232929/]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2020-02-04 01:19:13 +08:00
Marek Vasut
8941f8414d watchdog: designware: Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig
Migrate CONFIG_DESIGNWARE_WATCHDOG to Kconfig and update the headers
accordingly, no functional change. The S10 enables the WDT only in
SPL, but does not enable it in U-Boot itself, hence disable it in
the config again.

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>
2020-02-03 09:26:14 +01:00
Tom Rini
427da6f028 Merge tag 'u-boot-rockchip-20200130' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Support redundant boot for rk3399
- Support binman for rockchip platform
- Update ram driver and add ddr4 support for rk3328
2020-02-01 15:31:04 -05:00
Tom Rini
80e99adbe4 UniPhier SoC updates for v2020.04 (2nd)
Denali NAND driver changes:
  - Set up more registers in denali-spl for SOCFPGA
  - Make clocks optional
  - Do not assert reset signals in the remove hook
  - associate SPARE_AREA_SKIP_BYTES with DT compatible
  - switch to UCLASS_MTD
 
 UniPhier platform changes:
  - fix a bug in dram_init()
  - specify loadaddr for "source" command
 -----BEGIN PGP SIGNATURE-----
 
 iQJSBAABCgA8FiEEbmPs18K1szRHjPqEPYsBB53g2wYFAl40VCseHHlhbWFkYS5t
 YXNhaGlyb0Bzb2Npb25leHQuY29tAAoJED2LAQed4NsGhyAP/jVioSrrTggWpstI
 5dkWwyF5d/p2NdZIwFbEm6tSSmistQIE3Hk7D8vLv6tXRSCIa6Qv3pgQ0mTfRELh
 B54yhNs2S7Ur7LyVeHxlVmoIG/6qefd7pGRvgTttXxNkdHi0Ul7wzSBvQJ5v2XCs
 dxy8uhEVxzVNHqqnbQq85eZEPB0viiCGe3K/mr6mTGrbnfocbuRgev41/C+54dSb
 ssz1VfeSTEmAIlynja4kfUff42yWc6GtFEDoLZQ1CyyOicRpvO1ixL0Jo/k5HptG
 thrs3UXplHZbWc7p7Q8JpAv9MyeN+p62ChpqLJSgqB31UmLMhIGk9O799oEkWGTH
 Oeqim56I0mC8FkEqEG9xoZ24aGVz7g2TRs4KYA00ZGtjf482zBLLcfoEK7MzKSlj
 F61ldTJVOjEd8xNnCPilmVOEuZ1fzCnS8FHaNPDeO437u6GsHs4SnHNdDY3Mnqxj
 6pynfYJoXudzN8bnNQ+LQnllOVt7JwFTmlXLaVTeSJeJWIoO6QbOSlCxpLNR+ajb
 dc6bFMWScMqElO3UkktxXKbQQOgLKwHUUcgdL4poKksbY3Wq7N3rIfhhVbSLzcyn
 Py6mZgVVbMYzYtmirlGj/tzd9LNpb1cH7mVPJsT7eB07co3H7kEdvoCatUEoEaQA
 ju63tX0lCg7MEonxWstcIqMGy0Ql
 =PvYc
 -----END PGP SIGNATURE-----

Merge tag 'uniphier-v2020.04-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier

UniPhier SoC updates for v2020.04 (2nd)

Denali NAND driver changes:
 - Set up more registers in denali-spl for SOCFPGA
 - Make clocks optional
 - Do not assert reset signals in the remove hook
 - associate SPARE_AREA_SKIP_BYTES with DT compatible
 - switch to UCLASS_MTD

UniPhier platform changes:
 - fix a bug in dram_init()
 - specify loadaddr for "source" command
2020-01-31 13:26:28 -05:00
Masahiro Yamada
76cd7d47fb ARM: uniphier: use $loadaddr for source command
If the "source" command is not given the address, it uses
CONFIG_SYS_LOAD_ADDR, which is compile-time determined.

Using the "loadaddr" environment variable is handier because it is
relocated according to the memory base when CONFIG_POSITION_INDEPENDENT
is enabled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-02-01 01:14:32 +09:00
Jagan Teki
79030a4861 rockchip: Add Single boot image (with binman, pad_cat)
All rockchip platforms support TPL or SPL-based bootloader
in mainline with U-Boot proper as final stage. For each
stage we need to burn the image on to flash with respective
offsets.

This patch creates a single boot image component using
- binman, for arm32 rockchip platforms
- pad_cat, for arm64 rockchip platforms.

This would help users to get rid of burning different
boot stage images.

The new image called 'u-boot-rockchip.bin'
which can burn into flash like:

₹ sudo dd if=u-boot-rockchip.bin of=/dev/sda seek=64

This would support all rockchip platforms, except rk3128
since it doesn't support for SPL yet.

Cc: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Cc: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30 11:44:01 +08:00
Jagan Teki
efebc8edd6 rockchip: rk3399: Add bootcount support
Add bootcount support for Rockchip rk3399.

The bootcount value is preserved in PMU_SYS_REG0 register,
this would help to support redundent boot.

Once the redundant boot triggers, the altboot command
will look for extlinux-rollback.conf on particular
bootable partition which supposed to be a recovery
partition where redundant boot required.

Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-01-30 11:44:01 +08:00
Jagan Teki
7c5f6d0aa4 rk3399: Check MMC env while defining it
rk3399 do support SPI flash as well, so there is
a possibility of using flash environment for those
usecases.

So define env device for MMC only when it is used
by specific configuration.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-01-30 11:44:01 +08:00
Marek Szyprowski
f29002fc73 config: enable DFU over USB on Raspberry Pi4 boards
Enable support for DFU over USB. This requires to enable USB gadget,
DWC2 UDC OTG driver and DFU command. DFU entities are defined for the
following firmware objects: u-boot.bin, uboot.env, config.txt, and
zImage/Image.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-01-29 18:30:33 +01:00
Tom Rini
e7ab1cb3f0 Merge tag 'for-v2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
i2c changes for 2020.04
- updates the Designware I2C driver
  - get timings from device tree
  - handle units in nanoseconds
  - make sure that the requested bus speed is not exceeded
  - few smaller clean-ups
- adds enums for i2c speed and update drivers which use them
- global_data: remove unused mxc_i2c specific field
2020-01-29 09:34:13 -05:00