Commit Graph

16396 Commits

Author SHA1 Message Date
Weijie Gao
d24416c3fa arm: mediatek: remove arch_misc_init
The watchdog of mediatek chips is enabled by bootrom before u-boot is
running. Previously we choose to enable the wdt driver only to disable the
watchdog hardware.

Now wdt service is enabled by default. The function arch_misc_init which is
only used to disable wdt is no longer needed.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
2019-07-07 17:38:55 -04:00
Tom Rini
e597e5b6bc Merge https://gitlab.denx.de/u-boot/custodians/u-boot-usb
- DWC and i.MX6 fixes
2019-07-07 07:06:03 -04:00
Tom Rini
ace0d2ef2b Merge tag 'rockchip-for-v2019.07-rc5-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip 2019-07-07 07:05:47 -04:00
Tom Rini
54869e0811 - fix complation error for CONFIG_USB
- update RPi3 DTBs to v5.1-rc6 state
 - add defconfig for RPi3 B+
 - Fix BCM2835_MBOX_TAG_TEST_PIXEL_ORDER define
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEiUuSfQSYnG8EMsBltDliWyzx00MFAl0A9VQSHG1icnVnZ2Vy
 QHN1c2UuY29tAAoJELQ5Ylss8dNDyY8P/AsPYLpXkARV1UPaEr9m89uCnrXa0Ggm
 PBFiNUUmM/xRB6J9IQe1YnMio+azVvcpc1AkOTLG7ypgFxAiukfzDS1mnaQye8Mg
 Exq3GgrDZrLp1jXYXSf3EZgIbJhpejHf433frNoJkveq6GTPJpI0mpMsaDVkzy/Q
 jVKm4bLolyXkERIUcOvvhyTwyUJhJv7n6n3+yBMgfssZexhSCzf9nXI7Ds98mxaN
 UNrF6oqvKeICJpvGpfJ+sO4lzaWk/Uc5TEzJ9QnUn0bEePLjJY35H1C5Wmhfo4/L
 KHPGwFTVNvi2byXmht6UK+OWdp1D7NWF+il2dhJUm3kaURkYBVdKAmFd9SpevRX6
 SCsM5spkLeciVIc4keTgZI7yRcvkIq7qul9eCTQnviO/I3h1YykHMgWZjNDkY8ZG
 HhKSKRjpdT+BHq4mWca1Q29cpWwshgC01Vq8Pig/4EOoOSWJ79Y+Qm+xeOwDf2ph
 fRKP40Ves+ER/z+2tAAmj/wuKqD1B8UTIZ4i69lAUei5aSvTwpf1saEV3gIjoaqj
 5fhoCKamsQhXnv0DjYMliXHYZ78EZzZyh6Fr9LHFnlc861IrRawqTPjRuerdjGwd
 jrp/vhwv5regzfDmWGSVo1CCscWvXgf3Tfag2Uwc+u5lXOSgJd8XPZJFiRMGFBon
 fJN1lxjxLRQf
 =0ulJ
 -----END PGP SIGNATURE-----

Merge tag 'rpi-next-2019.07' of https://github.com/mbgg/u-boot

- fix complation error for CONFIG_USB
- update RPi3 DTBs to v5.1-rc6 state
- add defconfig for RPi3 B+
- Fix BCM2835_MBOX_TAG_TEST_PIXEL_ORDER define
2019-07-05 18:19:47 -04:00
Stefan Roese
9814fb272f mips: mt76xx: Implement new d-cache fix in last_stage_init()
With commit 06985289d4 ("watchdog: Implement generic watchdog_reset()
version") the init sequence has changed in arch_misc_init(), resulting
in a re-appearance of the d-cache issue on MT7688 boards (e.g. gardena).
When this happens, the first (or sometimes later ones as well) TFTP
command hangs and does not complete correctly. This leads to the
assumption that the d-cache is not in a clean state once the ethernet
driver is called (d-cache is used here for the buffers). The old work-
around with the cache flush somehow does not work any more now with
the new code change.

Unfortunately adding CONFIG_SYS_MALLOC_CLEAR_ON_INIT also did not fix
this issue. With v2019.07-rc3 it shows again. The time of accessing
the data seems to be very important here. It needs to be "very late"
in the boot process.

Testing has shown, that copying a 64KiB area in DDR at a very late
bootup time, directly before calling into the prompt, fixes this issue.
Flushing of the complete d-cache does not seem to necessary, as this
copy alone seems to fix this problem.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2019-07-05 17:12:27 +02:00
Jean-Jacques Hiblot
07e33711fe dm: Add a No-op uclass
This uclass is intended for devices that do not need any features from the
uclass, including binding children.
This will typically be used by devices that are used to bind child devices
but do not use dm_scan_fdt_dev() to do it. That is for example the case of
several USB wrappers that have 2 child devices (1 for device and 1 for
host) but bind only one at a any given time.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-05 14:19:41 +02:00
Andy Yan
619f002db8 rockchip: make_fit_atf.py: fix loadables property set error
Commit b238e4b00c ("rockchip: Cleanup of make_fit_atf.py.") set
firmware = "atf_1";
loadables = "uboot","atf_1","atf_2";

Actually it should be:
firmware = "atf_1";
loadables = "uboot","atf_2","atf_3";

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-05 15:57:52 +08:00
Neil Armstrong
dad258fadd ARM: meson: add unique MAC address generation
Add support for generating an unique MAC address using the SoC internal
serial number from the Secure Monitor interface.

The algorithm generates an unicast locally administered 6bytes minus 2bits
address using an crc16 of the serial for the top 16bits with the lower 2 bits
masked to setup the unicast locally administered property and a crc24 for
the lower 24bits.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-04 16:04:59 +02:00
Neil Armstrong
0ef8e4069e ARM: meson: sm: Add secure monitor calls to retrieve SoC serial number
The Secure Monitor interface permits retrieving the SoC Serial Number,
add a function to retrieve it.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-04 16:04:59 +02:00
Fabio Estevam
5b85858251 wandboard: Add FIT image support
After the transition to DM, only the mx6dl/solo wandboard
is supported.

Add FIT image support so that all the wandboard variants
can be supported, like it was prior to the DM conversion.

Successfully booted Linux on mx6q/solo/qp wandboards.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-07-04 14:19:49 +02:00
Fabio Estevam
df51656986 wandboard: Add mmc0 alias
Add a mmc0 alias so that U-Boot proper can associate mmc0
with the boot SD card.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-07-04 14:19:49 +02:00
Fabio Estevam
6b573ed0bc wandboard: Import extra wandboard devicetree files
Import wandboard devicetree files so that the mx6q and mx6qp
variants can be properly supported.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-07-04 14:19:48 +02:00
Fabio Estevam
b76ba47cce wandboard: Sync with devicetree files from kernel 5.1.9
Udate the wandboard devicetree files with the ones
from kernel 5.1.9.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-07-04 14:19:48 +02:00
Fabio Estevam
ba18fdb312 mx6: dts: Move dtbs under SoC level
Place dtbs under SoC level rather than board level.

imx6q-novena.dtb and imx6dl-wandboard-revb1.dtb were
placed under the board config option, so move them
to SoC level.

This also aligns with the kernel dts Makefile format.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-07-04 14:19:48 +02:00
Fabio Estevam
7e8c2190c7 mx6: dts: Keep dtb entries sorted
Keep dtb entries sorted to help adding new dtbs
in an organized form.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-07-04 14:19:48 +02:00
Kever Yang
665ebcadd6 rockchip: rk3288: enable TPL for tinker-board
All the config for TPL has been update, we can enable the TPL.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-02 11:49:49 +08:00
Kever Yang
e3f9a93e5a rockchip: dts: rk3288-tinker: enable sdmmc pinctrl node in spl
rockchip pinctrl driver has update to use dts, so we need
to add the pinctrl config in SPL for sdmmc.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-02 11:49:49 +08:00
Kever Yang
7e7f79207d rockchip: dts: tinker: migrate the dm-pre-reloc tag into -u-boot dts
Migrate all the "u-boot,dm-pre-reloc" tag from rk3288-tinker.dts
into rk3288-tinker-u-boot.dtsi.
When both board level and soc level '-u-boot.dtsi' files exist,
we need to include the soc level 'rk3288-u-boot.dtsi' manually.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-02 11:49:49 +08:00
Kever Yang
590dc42620 rockchip: dts: rk3288: move reloc tag into -u-boot dts
Move all the tag "u-boot,dm-pre-reloc" from rk3288.dtsi
into rk3288-u-boot.dtsi.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-02 11:49:49 +08:00
Kever Yang
45290847df rockchip: rk3288: add separate TPL STACK address
TPL is at SRAM while other stage is at SDRAM, so it needs
separate STACK.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-07-02 11:49:49 +08:00
Kever Yang
d18ca747b6 rockchip: rk3288: enable TPL configs to chip level
More boards other than vyasa needs TPL, so enable the TPL configs
at chip level instead of board level.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-07-02 11:49:49 +08:00
Mark Kettenis
5a6d960b22 rockchip: dts: rk3399: rockpro64: Provide init voltage
Add missing regulator-init-microvolt property to vdd_log regulator.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
(Rebase on latest u-boot-rockchip master)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>

Change-Id: I13b24fb81e8ad269d7dbb0c7b67f5f4795d2e775
2019-07-02 10:49:17 +08:00
Masahiro Yamada
69492fb4c5 ARM: uniphier: move sg_set_{pinsel, iectrl} to more relevant places
Move the sg_set_pinsel macro to arch/arm/mach-uniphier/arm32/debug_ll.S
since it is not used anywhere else.

Move the C functions sg_set_{pinsel,iectrl} to debug-uart.c since they
are not used anywhere else.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-06-29 22:31:18 +09:00
Masahiro Yamada
e3d5d3ac5b ARM: uniphier: remove unused init code for CONFIG_DEBUG_UART
debug_uart_init() is called from spl_board_init(), which is only
compiled for SPL. For U-boot proper, _debug_uart_init() is unreachable,
so dropped by the dead code elimination.

Now that 64-bit SoCs of this SoC family no longer support SPL,
debug-uart-ld20.c is never compiled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-06-29 22:31:18 +09:00
Masahiro Yamada
3b7fc3ff31 ARM: uniphier: include <linux/io.h> from dram_init.c
This file calls readl(), so needs to include <linux/io.h>.
Currently, it relies on someone else including it.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-06-29 22:31:17 +09:00
Masahiro Yamada
139a94a986 ARM: uniphier: remove unused sg_set_iectrl_range()
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-06-29 22:31:16 +09:00
Masahiro Yamada
3f0d299e88 ARM: uniphier: remove unused SC_DPLLOSCCTRL
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-06-29 22:31:15 +09:00
Masahiro Yamada
caee7619a9 ARM: uniphier: fix build error for CONFIG_DEBUG_LL=y
Commit e27d6c7d32 ("ARM: uniphier: simplify SoC ID get function")
accidentally removed the macros needed to compile debug_ll.S

Revive them.

Fixes: e27d6c7d32 ("ARM: uniphier: simplify SoC ID get function")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-06-29 22:31:14 +09:00
Tom Rini
0352e878d2 Fixes for 2019.07
- menlo board
 - allow SDB on Sabre
 - HAB for mx6sl
 - apalis board
 -----BEGIN PGP SIGNATURE-----
 
 iQHDBAABCgAtFiEEiZClFGvhzbUNsmAvKMTY0yrV63cFAl0VwBcPHHNiYWJpY0Bk
 ZW54LmRlAAoJECjE2NMq1et3k4AL/iaMEhY5e43krMSmlnWDfS2DsTVpyUBX1Q7X
 JHkuKQ8iH3bBSquwLNFju2hGNK8whCHfsIB5QgSh4uK3JIzWAh+/5TCGXbPDkGMJ
 PI/hyxKy2EB245SMshcJMHbyLK6PeHi4V/WA4WyY2c91Dz/DNx7UhMZOlFm8wyMl
 TwDCwtlqHodz0tXKUziCjSqTfxj7WSThwuyQ0SEHAccglM1MzM1JHq1RcdV7Pjdh
 bDpMC0rjcxYl5MM7gIig5OMtx+26HgP6JM+QfeoEuBm0PbhxV6ZFyHlafb8W/ba0
 SjzMWIknZWYA9GTAkdUgN+E0ChZVID0oSVoVh51eKiOG1z+LpkJEKE7xsaCAeBiQ
 BupLRgd0tBtqVK345EFDCy5UkYrnkLOnI+3JQNZ9bxBoPmKAf6wvhqa9Jf3bc+rP
 iSYh9Lm3sWVlXKcLR4ltS39D48OT8GZqun8zLpZkwpAWxRMuFvR+R7Q+VMVKmEF2
 1dn3EJhMsvbmTj0lYRp+ObEEpJDL9A==
 =DFoX
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-imx-20190628' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

Fixes for 2019.07

- menlo board
- allow SDB on Sabre
- HAB for mx6sl
- apalis board
2019-06-28 08:00:22 -04:00
Tom Rini
cb8cc1d8fb STM32 MCU fixes/cleanup:
_ Fix SPL console for STM32F769 Discovery
 _ Fix Memory Protection Unit size for STM32F4 series
 _ Cleanup DT for STM32F746 Discovery
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEXyrViUccKBz9c35Jysd4L3sz/6YFAl0VyiEXHHBhdHJpY2Uu
 Y2hvdGFyZEBzdC5jb20ACgkQysd4L3sz/6YHxw//e+N2aQrdtioDGqHupwycdDWy
 323WMLCnbX6aGgHXMKCRT2X0I+gwQ1Me4Hc4LvwwbsiNoEfwvqR7mo0zE1uHs9kI
 aq+PPsxSyxvFDuT33WhtJqkXPKylMZpLt7HPeA2yuxuQKfLb1G/IqptPCJTbKNBp
 TywIUqYi/d59qkKVC6ohYFB+EigbNNy5Qm2EIxYgfUIsfHURycCX3czSHUyVU4Hn
 GkaBueTEgc1zCXq+yTEYe/0+ESlBpyZQmvf4midx6+knRw6IFy21QsReqNWMWV9H
 Tw6x5m+GpFru1N3kbldz+cfzRLTDjMDGTxT9Dv3JNvA3pu8Mo61esa7vwZnE3njD
 8BGSjwesSFL0i6KEvWc3Ir6U7F5P0wnI+FZ352ixGbleRiOCH6Gn8dpXY9xdPMFt
 m4XME44iXZZDtV9jqCdTNNBUOrp6ieQGOxvOhJAQDYgl0Cf+f2vYVAq7Q+wG8A99
 RdiZ8oLEn0e99aoKwUEj0VaNVMciSeInNif8TZlL2zduDO7gWtFeGIx3dDgzDYls
 0IyQdbUgwCBuZXc/zShaJKcbmdC2K/G/s6+bYyLk940ncLJPwyrNIGA7CK70vMr/
 MS4THwlVmpWm4SpiKXqyIJTPzKylYVXTxtnOvUc5lelkqKdARtYrBvxwnDXLtc2o
 DHJC1RtqlW7L9oEcci0=
 =5mJg
 -----END PGP SIGNATURE-----

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

STM32 MCU fixes/cleanup:
- Fix SPL console for STM32F769 Discovery
- Fix Memory Protection Unit size for STM32F4 series
- Cleanup DT for STM32F746 Discovery
2019-06-28 07:59:38 -04:00
Patrice Chotard
36cb793b35 mach-stm32: Fix MPU region size dedicated to SDRAM for STM32F4
The MPU region dedicated for SDRAM for STM32F4 SoCs family
was set to 16MB, but STM32F429 Evaluation board have 32MB of SDRAM.

When kernel starts, only first 16MB of SDRAM are configured with XN
(eXecute Never) bit disabled, whereas kernel is using 32MB.
To avoid such situation in the future, extend this MPU region to 512MB
as for STM32F7/H7.

It fixes the following user land exception on STM32F429 Evaluation
board :

[    1.713002] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    1.722605] devtmpfs: mounted
[    1.733057] Freeing unused kernel memory: 72K
[    1.737622] This architecture does not have kernel memory protection.
[    1.744070] Run /sbin/init as init process
[    1.906850]
[    1.906850] Unhandled exception: IPSR = 00000004 LR = fffffffd
[    1.914282] CPU: 0 PID: 1 Comm: init Not tainted 5.1.0-00002-gcf9ca5719954 #6
[    1.921433] Hardware name: STM32 (Device Tree Support)
[    1.926601] PC is at 0x1a00b64
[    1.929642] LR is at   (null)
[    1.932669] pc : [<01a00b64>]    lr : [<00000000>]    psr: 01000000
[    1.938993] sp : 01a5cfb0  ip : 00000000  fp : 00000000
[    1.944269] r10: 01a43b00  r9 : 00000000  r8 : 00000000
[    1.949564] r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : 00000000
[    1.956168] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : 00000000
[    1.962701] xPSR: 01000000
[    1.965506] CPU: 0 PID: 1 Comm: init Not tainted 5.1.0-00002-gcf9ca5719954 #6
[    1.972658] Hardware name: STM32 (Device Tree Support)
[    1.978132] [<0000c009>] (unwind_backtrace) from [<0000b24f>] (show_stack+0xb/0xc)
[    1.986024] [<0000b24f>] (show_stack) from [<0000b947>] (__invalid_entry+0x4b/0x4c)

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-28 09:45:27 +02:00
Patrice Chotard
1d3d87b41a ARM: dts: stm32: Remove useless u-boot, dm-pre-reloc in stm32f746-disco-u-boot.dtsi
As in stm32f7-u-boot.dtsi these nodes already have "u-bootdm-pre-reloc"
property, no need to add them again in stm32f746-disco-u-boot.dtsi.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-28 09:45:07 +02:00
Patrice Chotard
b8e8fdff29 ARM: dts: stm32: Add u-boot, dm-pre-reloc for usart1_pins_a for stm32f769-disco
This allow to get console output in SPL for stm32f769-disco.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-28 09:45:07 +02:00
Marek Vasut
26bb95f056 ARM: dts: imx: m53menlo: Import M53Menlo DT from Linux
Import iMX53 M53Menlo device tree from Linux next-20190607 3f310e51ceb1 .
Enable DT control in full U-Boot . Add U-Boot extras into separate DTSi,
the GPIO controllers need to be inited early, otherwise m53_set_clock()
won't be able to detect the correct CPU clock frequency by reading the
GPIO.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
2019-06-27 14:14:23 +02:00
Marek Vasut
1d255904c3 ARM: dts: imx: imx53: Synchronize iMX53 DT with Linux
Synchronize iMX53 device tree from Linux next-20190607 3f310e51ceb1 ,
this is needed to get NFC, UART, USBOTG DT nodes.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
2019-06-27 14:14:12 +02:00
Breno Matheus Lima
5760069ae8 mx6sl: hab: Fix pu_irom_mmu_enabled address
According to hab.c code we have to notify the ROM code if the MMU is
enabled or not. This is achieved by setting the "pu_irom_mmu_enabled"
to 0x1.

The current address in hab.c code is wrong for i.MX6SL, according to ROM
map file the correct address is 0x00901c60.

As we are writing in the wrong address the ROM code is not flushing the
caches when needed, and the following HAB event is observed in certain
scenarios:

--------- HAB Event 1 -----------------
event data:
        0xdb 0x00 0x14 0x41 0x33 0x18 0xc0 0x00
        0xca 0x00 0x0c 0x00 0x01 0xc5 0x00 0x00
        0x00 0x00 0x07 0xe4

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_SIGNATURE (0x18)
CTX = HAB_CTX_COMMAND (0xC0)
ENG = HAB_ENG_ANY (0x00)

Update MX6SL_PU_IROM_MMU_EN_VAR to address this issue.

Reported-by: Frank Zhang <frank.zhang@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-27 14:10:40 +02:00
Jagan Teki
4977cf67de rockchip: rk3399: Enable TPL_BOARD_INIT
Enable TPL_BOARD_INIT, this would help us to show
TPL boot prints.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:29 +08:00
Jagan Teki
97d98e6bbf rockchip: rk3399: tpl: Mark printascii into debug
Now, we have spl_board_init which has TPL banner prints.

So mark the 'U-Boot TPL board init' print into debug.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:29 +08:00
Jagan Teki
c997c0fc28 rockchip: rk3399: tpl: Add spl_board_init
Add spl_board_init for TPL, that have TPL banner will help
to print tpl boot prints.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:28 +08:00
Jagan Teki
adde32d033 rockchip: rk3399: Enable SPL_BOARD_INIT
Enable SPL_BOARD_INIT globally to rk3399, this would
help to print the SPL banner during bootup.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:28 +08:00
Jagan Teki
16b0dd4cd1 rockchip: rk3399: Move u-boot, dm-pre-reloc of uart0, uart2
u-boot,dm-pre-reloc for uart0, uart2 indeed u-boot specific
properties. Move them into rk3399-u-boot.dtsi so the boards
which enabled these node will available during SPL.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:28 +08:00
Jagan Teki
5e7216462b rockchip: rk3399: spl: Mark printascii into debug
Now, we have spl_board_init with preloader_console_init that
indeed show SPL banner.

So mark the 'U-Boot SPL board init' print into debug.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:28 +08:00
Jagan Teki
07586ee432 rockchip: rk3399: Support common spl_board_init
Support common spl_board_init by moving code from puma
board file into, common rk3399-board-spl.c.

Part of the code has sysreset-gpio, regulators_enable_boot_on
but right now only puma board is using this with relevant
config options rest remains common for all targets.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:28 +08:00
Jagan Teki
96070460c3 rockchip: rk3399: Get bl31.elf via BL31
Right now rockchip platform need to copy bl31.elf into u-boot
source directory to make use of building u-boot.itb.

So, add environment variable BL31 like Allwinner SoC so-that the
bl31.elf would available via BL31.

If the builds are not exporting BL31 env, the make_fit_atf.py
explicitly create dummy bl31.elf in u-boot root directory to
satisfy travis builds and it will show the warning on console as

 WARNING: BL31 file bl31.elf NOT found, resulting binary is non-functional
 WARNING: Please read Building section in doc/README.rockchip

Note, that the dummy bl31 files were created during not exporting
BL31 case would be removed via clean target in Makefile.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2019-06-26 21:11:27 +08:00
Matwey V. Kornilov
348a0b7f9e rockchip: dts: rk3328: add rk3328-rock64.dts
rk3328-rock64.dts has been taken from Linux kernel commit

    cff6d1d6f88b ("arm64: dts: rockchip: enable HS200 for eMMC on rock64")

with minor modifications (drop nodes not known by rk3328.dtsi).

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:26 +08:00
Kever Yang
c009aeb8ca rockchip: Kconfig: enable SPL support for rk3328
Enable SPL support and some related option in Kconfig.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
[cherry picked from 430b01462b with minor modifications]
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
2019-06-26 21:11:26 +08:00
Kever Yang
661519e5c5 rockchip: rk3328: add SPL board file support
rk3328 SPL is locate at dram, so do not have strict size limit,
suppose to enable storage media controller driver, load ATF and
U-Boot, then boot into ATF.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
[cherry picked from 4ebe3968b6 with minor modifications]
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-06-26 21:11:26 +08:00
Yangbo Lu
e37ac717d7 Convert to use fsl_esdhc_imx for i.MX platforms
Converted to use fsl_esdhc_imx for i.MX platforms.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Martyn Welch <martyn.welch@collabora.com>
Acked-by: Jason Liu <Jason.hui.liu@nxp.com>
2019-06-23 14:18:34 +08:00
Andy Shevchenko
c974a3d155 watchdog: tangier: Convert to use WDT class
Convert legacy driver to use watchdog class.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2019-06-22 22:27:13 +08:00
Andy Shevchenko
7ce74b70b9 x86: Revert "Don't set up MTRRs in SPL"
This breaks Intel Edison to work. It gets laggish and unable to boot kernel.

Reverts commit 665cb18ea6 for now
till better solution will be proposed.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bin Meng <bmeng.cn@gmail.com>
2019-06-22 22:26:22 +08:00
Mian Yousaf Kaukab
f2f83b2fd0 armv8: fix typo in LINUX_KERNEL_IMAGE_HEADER check
Fixes: 8163faf952 ARMv8: add optional Linux kernel image header

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Andreas Färber <afaerber@suse.de>
2019-06-20 10:57:08 -04:00
Tom Rini
f643fb9f4c Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx
- PCIe driver change to support DM model
- T2080QDS migrated to use PCIe DM model
2019-06-20 09:14:35 -04:00
Tom Rini
e8c185bb15 _ Update STM32MP entry in MAINTAINERS
_ Handle correctly binding for g-tx-fifo-size for USB DWC2 driver
 _ Fix trusted STM32MP1 defconfig with correct ethernet driver
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEXyrViUccKBz9c35Jysd4L3sz/6YFAl0KUq0XHHBhdHJpY2Uu
 Y2hvdGFyZEBzdC5jb20ACgkQysd4L3sz/6Y6ZA//fidCjjfPkJgV0lQJeWJDzaoF
 VOtqpSLj9of5SxCfeXV5Ts1ngnSrwRDpGstuER2l7icFq24XnrtaBBGhlGVZ0wvJ
 ft5VDZZo0VehoxN1yMlGrZ9vCNx5V8v5VJVLDneZdDSFIAJD5aioIe5S9EOfJz6F
 oe9uYXxArDNbzuw6YC7de7RDmMNl7pR5DDhaPMuWr12+T1FxzEVUNh0ohWhJxqL8
 tmieg0kDyBKWHSgna8G1JhIJfGmdxsj2RR7nazPt+OduqRuFE24VuEFRvsjEjhmI
 AiUhb4UpGOtXHtP6g4o2q78t77Quu0SqI6RJJEOcsAF7jGnwrcjjQe6W4JDVy5f5
 zh+SObj2frgaMc0s0hM6/StlZQJp6N09FFjn8G+T9RupL/lKeqH+xnJT5asZJdso
 mLyBbxhQhaGBP2QyUNB02t9aiQeOYJ1jCJCC+/iORQ6jPK+qNboTdPmTGfpbR14v
 /IgVbIsOWE6eKu5u/ac2TXZBkEPOLX6wCh6C0qTGLEEp9dh1Y63/bETy/ZpBqu55
 YTLXVVRK2l9cRXZI8CAyBRBNk6VrdAQq+e48A0dvVWvAMDFalr/54JustzEh5VKs
 oNe+oGRTZt/S3MYCnMjvhcaPZOqAxt+V7MQ8yuubn1TSV29ygcilzHySK0IaT2Cj
 WXD/pNKx+h8cu46i+nE=
 =wz3G
 -----END PGP SIGNATURE-----

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

- Update STM32MP entry in MAINTAINERS
- Handle correctly binding for g-tx-fifo-size for USB DWC2 driver
- Fix trusted STM32MP1 defconfig with correct ethernet driver
2019-06-20 09:14:03 -04:00
Hou Zhiqiang
13c5e5bd6a t2080: dts: Added PCIe DT nodes
T2080 integrated 4 PCIe controllers, which is compatible with
the PCI Express™ Base Specification, Revision 3.0, and this
patch is to add DT node for each PCIe controller.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-20 10:44:25 +05:30
Hou Zhiqiang
82c47a21e7 powerpc: mpc85xx: Update the condition to compile PCI routines
Compile the routines of mpc85xx/pci.c when both FSL_PCI_INIT
and DM_PCI are not enabled.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-20 10:44:10 +05:30
Hou Zhiqiang
2b12f6cfe6 powerpc: mpc85xx: Move CONFIG_FSL_PCIE_RESET to Kconfig
Use the Kconfig option to select the PCIe reset errata.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-20 10:44:09 +05:30
Hou Zhiqiang
c16dfd016a powerpc: mpc85xx: Move CONFIG_FSL_PCIE_DISABLE_ASPM to Kconfig
Use the Kconfig option to select the PCIe ASPM errata.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-20 10:43:55 +05:30
Tom Rini
63a4585791 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- LS1046AFRWY support
- USB errata fix and secure boot defconfig support for LS1028A
- Enabled SDHC and SATA for LX2160
- LS1046A serdes fixes
- other minor fixes
2019-06-19 14:01:11 -04:00
Patrick Delaunay
de6e4a6f5c ARM: dts: stm32mp1: remove override for g-tx-fifo-size
Remove the override for usbotg_hs on g-tx-fifo-size as the correct
binding, used in the kernel device tree, is now supported in dwc2
device driver.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-06-19 16:56:11 +02:00
Vabhav Sharma
d90c7ac7a9 armv8: ls1046afrwy: Add support for LS1046AFRWY platform
LS1046AFRWY board supports LS1046A family SoCs. This patch
add base support for this board.
Board support's 4GB ddr memory, i2c, micro-click module,microSD card,
serial console,qspi nor flash,ifc nand flash,qsgmii network interface,
usb 3.0 and serdes interface to support two x1gen3 pcie interface.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Pramod Kumar <pramod.kumar_1@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Alex Marginean
062d8148f8 arm: ls1028a: define the integrated PCI bus (ECAM)
LS1028A includes an integrated PCI bus with 11 PCI functions residing on
bus 0.  ECAM plus the device register space takes up 256MB of address
space.

Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Yinbo Zhu
0dd74ec2df armv8: fsl-lsch2: add clock support for the second eSDHC
Layerscape began to use two eSDHC controllers, for example,
LS1012A. They are same IP block with same reference clock.
This patch is to add clock support for the second eSDHC.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Maciej Pijanowski
c34d8dcb3e arm: fsl-layerscape: add 0x3040 serdes1 settings for LS1046A
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Cc: piotr.krol@3mdeb.com
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Maciej Pijanowski
73420f0220 arm: fsl-layerscape: fix 0x3363 serdes1 settings for ls1046a
As per LS1046A hardware manual, SGMII.9 and SGMII.10 present on
lane D and lane C respectively for 0x3363 protocol.

So fix serdes1 settings for ls1046a.

Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Alex Marginean
4da0e52c9d armv8: fsl-layerscape: fix config dependency for layerscape pci code
Fixes a link error on layerscape platform, linking fails with CONFIG_PCI
set and CONFIG_PCI_LAYERSCAPE unset.

Signed-off-by: Alex Marginean <alexm.osslist@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Pankit Garg
ab748801ef armv8: fsl-layerscape: Change bootcmd update logic
Change bootcmd update logic when CONFIG_ENV_ADDR is not defined

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Pankit Garg
293d75c0b1 armv8: fsl-layerscape: Update qspi clk cfg
Update qspi clock configuration in TFABOOT in case
of all boot sources except qspi boot source.

Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Peng Ma
f68ce9e9ac ARM: dts: ls1021a: Fixed reg for sata node
This patch is to fixed the reg read to "0" for armv7
architecture.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Meenakshi Aggarwal
1dff14c87d armv8/fsl-layerscape: Add loop to check L3 dcache status
Flushing L3 cache may need variable time depending upon cache line
allocation.

Coming up with a proper timeout value would be best handled by
simulations under multiple scenarios in your actual system.
>From the purely HN-F point of view, the flush would take ~15 cycles for
a clean line, and ~22 cycles for a dirty line.  For the dirty line case,
there are many variables outside the HN-F that will increase the
duration per line.  For example, a *DBIDResp from the SN-F/SBSX,
memory controller latency, SN-F/SBSX RetryAck responses, CCN ring
congestion, CCN ring hops, etc, etc.  The worst-case timeout would
have to factor in all of these variables plus the HN-F cycles for
every line in the L3, and assuming all lines are dirty

In case if L3 is not flushed properly, system behaviour will be
erratic, so remove timeout and add loop to check status of L3 cache.

System will stuck in while loop if there is some issue in L3 cache
flushing.

Signed-off-by: Udit Kumar <udit.kumar@nxp.com>
Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Yinbo Zhu
85e5e21981 armv8: lx2160aqds: Enable eSDHC controllers
This patch is to enable esdhc controllers for lx2160aqds

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:57 +05:30
Peng Ma
91f54e7c61 armv8: ls1028a: Add ecc address node for sata.
Move the ecc addr from driver to dts

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:56 +05:30
Yangbo Lu
087bfe67ac armv8: fsl-lsch3: add clock support for the second eSDHC
Layerscape began to use two eSDHC controllers, for example,
LS1028A. They are same IP block with same reference clock.
This patch is to add clock support for the second eSDHC.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:56 +05:30
Peng Ma
d17eb57dcf armv8: lx2160aqds: Enable sata
Change sata node status to enable sata.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:56 +05:30
Xiaowei Bao
36f50b7523 armv8: ls1028a: Add other serdes protocal support
Add other serdes protocal support.

Signed-off-by: Xiaowei Bao <xiaowei.bao@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:56 +05:30
Yinbo Zhu
123fbbbe84 armv8: ls1028a: enable workaround for USB errarum A-009007
Rx Compliance tests may fail intermittently at high jitter
frequencies using default register values.

So program register USB_PHY_RX_OVRD_IN_HI in certain sequence
to make the Rx compliance test pass.

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:56 +05:30
Ran Wang
3458a4198c armv8: ls1028a: enable workaround for USB erratum A-008997
Enable workaround for USB erratum A-008997. Here PCSTXSWINGFULL
registers has been moved to DSCR as compared to other Layerscape SoCs
where it was in SCFG.

Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-06-19 12:54:56 +05:30
Tom Rini
c3f43185ee Merge branch 'master' of git://git.denx.de/u-boot-spi
- Drop zipitz2 board (Tom)
- Add DEPRECATED option (Tom)
- Mark legacy or non-dm drivers as DEPRECATED (Jagan)
2019-06-17 11:32:22 -04:00
Tom Rini
f681eacbfe Merge branch 'master' of git://git.denx.de/u-boot-socfpga
- SPL size check for Gen5, i2c enablement for S10
2019-06-15 13:02:26 -04:00
Marek Vasut
a7e3dacbcb sh: r0p7734: Remove the board
Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-06-14 12:42:06 +02:00
Marek Vasut
c81b1a8a71 sh: ap325rxa: Remove the board
Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-06-14 12:42:06 +02:00
Marek Vasut
52883bac27 sh: ap_sh4a_4a: Remove the board
Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-06-14 12:42:06 +02:00
Marek Vasut
94bb4492e1 sh: ms7750se: Remove the board
Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-06-14 12:42:06 +02:00
Marek Vasut
6b371a7a4b sh: ms7722: Remove the board
Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-06-14 12:42:06 +02:00
Marek Vasut
ea349270e3 sh: espt_giga: Remove the board
Last change to this board was done in 2016, has no prospects of
ever being converted to DM, drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Brandt <chris.brandt@renesas.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Yoshihiro Shimoda <shimoda.yoshihiro.uh@renesas.com>
2019-06-14 12:42:06 +02:00
Simon Goldschmidt
d6d383ca27 arm: socfpga: provide default SPL_SIZE_LIMIT for gen5
This provides an SPL_SIZE_LIMIT that makes the build check that the SPL
binary loaded from flash fits into the SRAM (64 KiB) and leaves enough
room for global data, heap  and stack (512 bytes assumed stack usage).

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2019-06-14 12:41:26 +02:00
Ley Foon Tan
b861cfb53c arm: dts: Stratix10: Enable i2c
Enable i2c1 in Stratix 10 devkit.

SOCFPGA_STRATIX10 # i2c bus
Bus 0:  i2c@ffc02900
SOCFPGA_STRATIX10 # i2c dev 0
Setting bus to 0
SOCFPGA_STRATIX10 # i2c probe
Valid chip addresses: 14 4C 51 68 74

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
2019-06-14 12:41:26 +02:00
Tom Rini
a4298ddaf8 Kconfig: Add SPI / SPI_FLASH as dependencies
In order to use CMD_SF / CMD_SPI / ENV_IS_IN_SPI_FLASH we need to have
the SPI (or SPI_FLASH/DM_SPI_FLASH, for CMD_SF) enabled.  Express this
in the Kconfigs.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-06-13 12:51:06 +05:30
Tom Rini
9a4b90015a arm: Remove zipitz2 board
Per discussion on the list, drop this board again.

Cc: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-06-13 12:50:55 +05:30
Berkus Decker
38e58ff2b7 ARM: bcm283x: Fix definition of MBOX_TAG_TEST_PIXEL_ORDER
The MBOX_TAG_TEST_PIXEL_ORDER define is incorrect. According to official
documentation it has a slightly different numbering.

Correct mailbox constants are defined in e.g.
linux raspberry-firmware https://code.woboq.org/linux/linux/include/soc/bcm2835/raspberrypi-firmware.h.html#RPI_FIRMWARE_FRAMEBUFFER_TEST_PIXEL_ORDER

These are obtained from the bcm2835 documentation
e.g. https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface#test-pixel-order

Fix the define to get us back in sync with the spec.

Signed-off-by: Berkus Decker <berkus+github@metta.systems>
[agraf: clarify subject, extend commit message]
Signed-off-by: Alexander Graf <agraf@csgraf.de>
[mb: updating email of agraf]
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2019-06-12 12:23:46 +02:00
Heinrich Schuchardt
143256b353 fdt: update bcm283x device tree sources to Linux 5.1-rc6 state
Updating the bcm283x device tree sources adds the device trees for

- Raspberry Pi 3 Model A+
- Raspberry Pi 3 Model B+
- Raspberry Pi Compute Module IO board rev1
- Raspberry Pi Compute Module 3 IO board V3.0
- Raspberry Pi Zero

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2019-06-12 12:23:46 +02:00
Tom Rini
2702646bc0 - Add Ethernet support for STM32MP1
- Add saveenv support for STM32MP1
 - Add STM32MP1 Avenger96 board support
 - Add SPI driver suport for STM32MP1
 - Add watchdog support for STM32MP1
 - Update power supply check via USB TYPE-C for STM32MP1 discovery board
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJc+TqsAAoJEMrHeC97M/+miKwP/3OouX3slblEfUELRj/9qLlU
 ypdUDKDQupGSrTIyhJHFdGbA2ct/ERl4mH/kU8NNeCHVCsdvrrmuw+k4jfVZfIyi
 d9gWmU5WanNPzdWwdo0NrVNXjN5LPduxeUCYHdDEggDJuG3YL4LA9pPyrWpL8o8t
 tLPr8YMB1u5Ab8Vn/1A9lKvmw98V59LmWVxZh0AtAdOTvWgEZQe1R5Vex+MHacnK
 uR/Dm3ry5v7ZlR/kMZ0C+Ip1aw9GU4e+O+LCGlU4Jr0GV2XQOr4ehxWtN02nYubc
 sYXbkW7UArR0I0g8YPXPoBI9PToi57bHW/TXKoI8yDIll7vZ9PDjT/FbUJM9rv72
 WU6T7+K2DeHflmp4NljiesD2rDnti0XSCbe4o5o/jD+YkzH6YoJbco4nsae7TBSM
 R3rgV7/+St7zC1IjFq0TUG+S9qSUmZqA4k66+j5/SS6pLQOW3dYemL0/up2cRX5w
 dx00JTQkHyh7Q/GfH8r7yZqIToW9djB9HeT88ovPUCh8rVfDqNn8/WKd2JAfkxda
 QiZDs49BMBsnWpK+vPqiq/suoJeSwDB70iMzrGgBg+mTd9eJcD0c5QBURYE0jm2H
 GqQ04WNi8sLzULhMqKbBdPZhBMzyNmDXF6MC+y/OcUM5k8z6tY8LDro3wgHXWVpX
 DLiFVbkHbLhlUJbeO8dD
 =2C9f
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20190606' of https://github.com/pchotard/u-boot

- Add Ethernet support for STM32MP1
- Add saveenv support for STM32MP1
- Add STM32MP1 Avenger96 board support
- Add SPI driver suport for STM32MP1
- Add watchdog support for STM32MP1
- Update power supply check via USB TYPE-C for STM32MP1 discovery board
2019-06-11 17:22:22 -04:00
Tom Rini
529faf80c3 u-boot-imx-20190612
--------------------
 
 - Board fixes:
 	- imx6logic
 	- wandboard
 	- mx6sabre boots again
 	- imx8qm_mek
 	- pico-* boards
 	- Toradex apalis / colibri
 	- engicam imx6 (environment)
 	- KP MX53
 	- opos6ul
 - Switch to DM:
 	- vining2000
 	- dh MX6
 	- Toradex colibri i.MX7
 	- Novena
 - Security : fix CSF size for HAB
 - Other:
       - imx: fix building for i.mx8 without spl
       - pcie and switch to DM
 
       mx6sabreauto: Enable SPL SDP support
 -----BEGIN PGP SIGNATURE-----
 
 iQHDBAABCgAtFiEEiZClFGvhzbUNsmAvKMTY0yrV63cFAlz/bLMPHHNiYWJpY0Bk
 ZW54LmRlAAoJECjE2NMq1et3W7oL/1rYXpSr2JE8fdXvqtmugjaPr7lQFzE7Bjkw
 pDyDZA+3tpG8lv5xwjUi0Q+c38RRY6K/1lP/bztGXal+ryx/V0HFNAKKdhzedxhy
 kgB3BGyp0rdEpzRwBLEkUCVFKJyVMI9ztPpzun6FDm+pyvIN4vnvziYPlkrYSyVk
 ZrvCGk6X8OYAJ3qNcTcttPIXTfv0QTs8l6bpw3kHSVoUSAGGQc2FxOUmxvwsZedN
 jpVJ5iB/2xrmSyWMIcGAfXLhzNolooeFgcqdKj7X+x0l0Q1p/S4srGKfYRqqhsAO
 q4H/Xjt47e6oWVclbh3TypnUuxAw0i2BhhczAbr/nnN42aNySWrtQyZm33h/esAy
 dcriYUvHlsoC00sfB1xShF4rhBno8OW+ExJVDwsVMalJr9WI4FujwsE/Aw+CUec8
 ompz1IUz+2+BG+PcVbDNxysM5TcqpdQOaq0JKQUnz/xzyocV75M2pFw9YzQE85J7
 yHAoq5OlW//B1wSRuPlH3vBkVWf2SA==
 =pRXQ
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-imx-20190612' of git://git.denx.de/u-boot-imx

u-boot-imx-20190612
--------------------

- Board fixes:
	- imx6logic
	- wandboard
	- mx6sabre boots again
	- imx8qm_mek
	- pico-* boards
	- Toradex apalis / colibri
	- engicam imx6 (environment)
	- KP MX53
	- opos6ul
- Switch to DM:
	- vining2000
	- dh MX6
	- Toradex colibri i.MX7
	- Novena
- Security : fix CSF size for HAB
- Other:
      - imx: fix building for i.mx8 without spl
      - pcie and switch to DM

      mx6sabreauto: Enable SPL SDP support
2019-06-11 13:41:24 -04:00
Sjoerd Simons
bf219a3602 arm: dts: imx6qdl-u-boot: Alias usb0 to usbotg
All i.mx6 boards seems to have moved to DM_USB, however gadget support
for mx6 is still pre-DM as CI_UDC isn't converted yet. To make this work
the usb otg controller used for gadgets needs to be usb number 0.
Add an alias for this directly in the main u-boot mx6qdl dtsi so it
doesn't need to be done for each board separately.

This fixes regressions wrt. usb gadget functionality in several boards
that have gadget functions enabled in their config, but no usb0 alias in
their device-tree.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2019-06-11 10:43:00 +02:00
Peng Fan
16529ff255 imx: define ARCH_MXC for i.MX8/8M/7ULP
Without this definition, fsl_esdhc will access reserved registers
on i.MX chips, so define ARCH_MXC to fix it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-11 10:43:00 +02:00
Peng Fan
75eba18321 imx: drop imx-regs.h
imx-regs.h under arch-imx has no user, drop it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-11 10:43:00 +02:00
Peng Fan
1796e50939 imx8: cpu: get temperature when print cpu desc
Read the temperature when print cpu inforation.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-06-11 10:43:00 +02:00
Marek Vasut
ac2b71f60b ARM: imx: vining2000: Convert MMC and block to DM
Enable DM block and DM MMC support on iMX6SX VINING|2000 .
Convert board code to match the DM support. This disables
USB mass storage support due to missing DM USB, however
that will be re-enabled in subsequent patch.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
2019-06-11 10:42:48 +02:00
Marek Vasut
6245170b67 ARM: dts: imx: vining2000: Import VINING|2000 DT from Linux
Import iMX6SX VINING|2000 device tree from Linux 5.1.1 b724e9356404 .
Enable DT control in full U-Boot .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
2019-06-11 10:42:48 +02:00
Marek Vasut
4c05e966fd ARM: imx: Rename VINING|2000
The company Samtec was merged into Softing, migrate the board over to
the new name and update copyright headers.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Silvio Fricke <silvio.fricke@softing.com>
Cc: Stefano Babic <sbabic@denx.de>
2019-06-11 10:42:48 +02:00
Marek Vasut
42dc1230cd ARM: imx: Call imx_pcie_remove() only for non-DM PCI driver
The DM iMX PCI driver has DM_FLAG_OS_PREPARE set and will call
imx_pcie_remove() from the .remove callback. Do not call it from
the architecture code again.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-06-11 10:42:48 +02:00
Parthiban Nallathambi
d2d1191843 imx: Extend PCL063 support for phyCORE-i.MX6ULL SOM
Extend PHYTEC phyBOARD-i.MX6UL for phyCORE-i.MX6UL SoM (PCL063)
with eMMC on SoM.

CPU:   Freescale i.MX6ULL rev1.0 792 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 38C
Reset cause: POR
Model: Phytec phyBOARD-i.MX6ULL-Segin SBC
Board: PHYTEC phyCORE-i.MX6ULL
DRAM:  256 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial@02020000
Out:   serial@02020000
Err:   serial@02020000
Net:   FEC0

Working:
 - Eth0
 - i2C
 - MMC/SD
 - eMMC
 - UART (1 & 5)
 - USB (host & otg)

Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
2019-06-11 10:42:48 +02:00
Marcel Ziswiler
3d60366500 board: toradex: add apalis imx8qm 4gb wb it v1.0b module support
This commit adds initial support for the Toradex Apalis iMX8QM 4GB WB IT
V1.0B module. Unlike the V1.0A early access samples exclusively booting
from SD card, they are now strapped to boot from eFuses which are
factory fused to properly boot from their on-module eMMC. U-Boot
supports either booting from the on-module eMMC or may be used for
recovery purpose using the universal update utility (uuu) aka mfgtools
3.0.

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

Unfortunately, there is no USB functionality for the i.MX 8QM as of yet.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-06-11 10:42:48 +02:00
Marcel Ziswiler
1da39d3ce8 imx8qm: fix cpu frequency reporting
CPU frequency reporting failed with the following error message being
printed:

sc_pm_get_clock_rate: resource:507 clk:2: res:3
Could not read CPU frequency: -22
CPU:   NXP i.MX8QM RevB A53 at 0 MHz

Fix this by differentiating between the A35 as found on the i.MX 8QXP
and the A53 as found on the i.MX 8QM SoCs.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-06-11 10:42:48 +02:00
Marcel Ziswiler
38d8955a98 arm: dts: imx8qm: add support for i2c0, i2c1, i2c2, i2c3 and i2c4
Add support for i2c0, i2c1, i2c2, i2c3 and i2c4.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-06-11 10:42:48 +02:00
Marcel Ziswiler
bc527c6dfa arm: dts: imx8qm: add lpuart1, lpuart2, lpuart3, lpuart4
Add support for lpuart1, lpuart2, lpuart3 and lpuart4.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Max Krummenacher <max.krummenacher@toradex.com>
2019-06-11 10:42:48 +02:00
Marek Vasut
6b98b94ce2 ARM: imx: novena: Convert block devices to DM
Enable DM block, DM MMC and DM SATA support on iMX6Q Novena
convert board code to match the DM support.

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>
2019-06-11 10:42:48 +02:00
Marek Vasut
11a3cae71d ARM: dts: imx: novena: Import Novena DT from Linux
Import iMX6Q Novena device tree from Linux 5.1-rc7 37624b58542f .
Enable DT control in full U-Boot .

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>
2019-06-11 10:42:48 +02:00
Jun Nie
79fcbde8eb pico-imx7d: Correct uart clock root
Correct uart clock root ID. Incorrect ID may result the
clock is gated because rate value 0 is returned in
imx_get_uartclk()

The ID can be ignored if CONFIG_SKIP_LOWLEVEL_INIT is not enabled
because init_clk_uart() will enable all uart clocks in that case.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
2019-06-11 10:42:48 +02:00
Jun Nie
bc7c9ed33c imx: mx7: Skip secure init in arch_cpu_init
Skip secure related initialization in arch_cpu_init if low level
init is skipped.  Because these should be done in early stage
firmware, such as ARM trusted firmware.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
2019-06-11 10:42:48 +02:00
Heiko Schocher
16c776d321 arm, imx, Makefile: fix u-boot-dtb.imx build in CONFIG_MULTI_DTB_FIT case
in case CONFIG_MULTI_DTB_FIT is set and u-boot-dtb.imx
image is build, currently u-boot-dtb.bin is used for
generating the u-boot-dtb.imx binary, which is wrong, as
it contains only a dtb blob not the fit.blob

Use instead the u-boot-fit-dtb.bin for generating
u-boot-dtb.imx which contains the fit.blob.

Signed-off-by: Heiko Schocher <hs@denx.de>
2019-06-11 10:42:48 +02:00
Marek Vasut
f54dc48c5b ARM: dts: imx: dh-imx6: Fix SPI CS polarity on DHCOM iMX6 PDK2
The SPI nCS signal is active low, make it so.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
2019-06-11 10:42:48 +02:00
Marek Vasut
5f6d90aade ARM: dts: imx: dh-imx6: Import DHCOM iMX6 PDK2 DTs from Linux
Import DHCOM iMX6 PDK2 device tree from Linux 5.1.1 b724e9356404 .
Enable DT control in full U-Boot .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Ludwig Zenz <lzenz@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
2019-06-11 10:42:48 +02:00
Sébastien Szymanski
0ab85fe68f opos6ul: set REFSEL and REFR fields
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
2019-06-11 10:42:48 +02:00
Marcel Ziswiler
4721d7d3b4 colibri-imx6ull: fix usb host mode
This fixes an issue with USB host mode.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-11 10:42:48 +02:00
Igor Opaniuk
5d2cd9f117 colibri_imx7: migrate usb to driver model
Migrate USB to Driver Model (CONFIG_DM_USB=y).

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-11 10:42:48 +02:00
Marcel Ziswiler
8b98a4916f apalis_imx6: add device tree to makefile
Add device tree to Makefile to avoid newly introduced error:

Device Tree Source is not correctly specified.
Please define 'CONFIG_DEFAULT_DEVICE_TREE'
or build with 'DEVICE_TREE=<device_tree>' argument

make[1]: *** [dts/Makefile:28: arch/arm/dts/imx6-apalis.dtb] Error 1
make: *** [Makefile:1009: dts/dt.dtb] Error 2

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-11 10:42:48 +02:00
Parthiban Nallathambi
a443c8212c ARM: dts: i.MX6ULL: U-Boot specific dts for u-boot, dm-spl
u-boot,dm-spl property is specific to U-Boot, so created one
for i.MX6ULL platforms.

Signed-off-by: Parthiban Nallathambi <parthitce@gmail.com>
2019-06-11 10:42:48 +02:00
Ye Li
15bae9a86d mx7ulp: Add common plugin codes for mx7ulp
Add common plugin codes to call ROM's hwcnfg_setup and generate IVT2
header.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-06-11 10:42:48 +02:00
Marcel Ziswiler
7ce134b7c3 board: toradex: add colibri imx8qxp 2gb wb it v1.0b module support
This commit adds initial support for the Toradex Colibri iMX8QXP 2GB WB
IT V1.0B module. Unlike the V1.0A early access samples exclusively
booting from SD card, they are now strapped to boot from eFuses which
are factory fused to properly boot from their on-module eMMC. U-Boot
supports either booting from the on-module eMMC or may be used for
recovery purpose using the universal update utility (uuu) aka mfgtools
3.0.

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

Unfortunately, there is no USB functionality for the i.MX 8QXP as of
yet.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-11 10:42:48 +02:00
Marcel Ziswiler
4c45e43a2a imx: fix building for i.mx8 without spl
Building with Travis CI complained and stopped with the following error:
+cc1: fatal error: opening output file spl/u-boot-spl.cfgout: No such
file or directory
+compilation terminated.

This fixes commit caceb739ea ("imx: build flash.bin for i.MX8") which
took SPL being enabled on i.MX8 for granted.

Reported-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-06-11 10:42:48 +02:00
Tom Rini
99e14d5249 - mxsfb DM_VIDEO conversion
- splash fix for DM_VIDEO configurations
 - meson HDMI fix for boards without hdmi-supply regulator
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXP4oqg4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXLDlAJ422AAeTYTWf0wrfWz11YUWggd7HQCfcsY+UjgL
 SM69apyCTV0ZGo5uVzE=
 =bQQc
 -----END PGP SIGNATURE-----

Merge tag 'video-updates-for-2019.07-rc3' of git://git.denx.de/u-boot-video

- mxsfb DM_VIDEO conversion
- splash fix for DM_VIDEO configurations
- meson HDMI fix for boards without hdmi-supply regulator
2019-06-10 09:41:19 -04:00
Tom Rini
eb53a18c9e First set of u-boot-atmel fixes for 2019.07 cycle
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJc+lyDAAoJEB6zHgIOrC/I2MQH/A20fKVWQcnvmwwuJ8w/QNZ5
 syNqpRLgw8jIMuLgmnUOQmjhKEsdcNWlESQt+eppTH2yMTSwNlQVT8SVE2s1podP
 QKBSHw4V5UXlYZwZBhrrmL3twVOf6oecoE4gzpnh1ydMHiC1zcHAJuutlNw8y+ye
 IVrojVPu5miN91TJuvkcGdafNdFVO4mBMhGhCFA4VN38OI6Dk/fQg4QBrxj/3XWb
 +EOznxL1YZYGf8hhYqe68vMVVVT5sSq1SbId6JGHRkAYDcn/qKOuOkzW7FP7tbi/
 PidcTmfqOFH1EYnincxQ1cXyhaSs/VOxRHIWgzlRIJJHHp0o7Y+FUGAilSGKHso=
 =tnXy
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-atmel-fixes-2019.07-a' of git://git.denx.de/u-boot-atmel

First set of u-boot-atmel fixes for 2019.07 cycle
2019-06-10 09:41:00 -04:00
Tom Rini
5973901826 Merge branch 'master' of git://git.denx.de/u-boot-tegra
The bulk of these changes are an effort to unify Tegra186 builds with
builds of prior 64-bit Tegra generations. On top of that there are
various improvements that allow data (such as the MAC address and boot
arguments) to be passed through from early firmware to the kernel on
boot.
2019-06-08 09:10:31 -04:00
Heinrich Schuchardt
219dee7e38 imx: move BOARD_SIZE_CHECK to main Makefile
We currently have duplicate definitions for BOARD_SIZE_CHECK in Makefile
and arch/arm/mach-imx/Makefile.

Move the board size check from arch/arm/mach-imx/Makefile to Makefile.

Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like an error
like the following is thrown:

u-boot-dtb.imx exceeds file size limit:
  limit:  503696 bytes
  actual: 509720 bytes
  excess: 6024 bytes
make: *** [Makefile:1051: u-boot-dtb.imx] Error 1

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-06-07 11:03:39 -04:00
Christophe Roullier
c8ef95376f ARM: dts: stm32: Add Ethernet support on stm32mp1
This patch add Ethernet support on stm32mp157 eval board

Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
2019-06-06 17:40:19 +02:00
Patrice Chotard
8c1007a2cb watchdog: stm32mp: Add watchdog driver
This patch adds IWDG (Independent WatchDoG) support for
STM32MP platform.

Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2019-06-06 17:40:16 +02:00
Patrice Chotard
75500a4182 ARM: dts: stm32mp: Add iwdg2 support for stm32mp157c
This patch adds independent watchdog support for stm32mp157c
in SPL.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2019-06-06 17:40:16 +02:00
Patrice Chotard
1538e1a614 stm32mp1: Increase ENV_SIZE
Increase ENV_SIZE from 4 to 8 Ko

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06 17:40:15 +02:00
Patrick Delaunay
c4a739ad50 stm32mp1: activate NAND and NOR support on EV1
Add the necessary configuration to have NAND and NOR support on ev1 board
for BASIC boot (with SPL) or for TRUSTED boot (with TF-A).

STM32MP> nand info

Device 0: nand0, sector size 256 KiB
  Page size       4096 b
  OOB size         224 b
  Erase size    262144 b
  subpagesize     4096 b
  options     0x00184200
  bbt options 0x00060000

STM32MP> sf probe
SF: Detected mx66l51235l with page size 256 Bytes, erase size 64 KiB, total 64 MiB

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-06-06 17:40:12 +02:00
Manivannan Sadhasivam
bc9487d4ab arm: mach-stm32mp: Add newline to the MAC error message
Without newline, the error message appears for non prgrammed OTP boards
looks messsy. Hence add it to look more clean.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06 17:40:12 +02:00
Manivannan Sadhasivam
93ffa2ba80 board: stm32mp1: Add Avenger96 board support
Add support for Avenger96 board from Arrow Electronics based on STM32MP157
MPU. This board is one of the Consumer Edition (CE) boards of the 96Boards
family and has the following features:

SoC: STM32MP157AAC
PMIC: STPMIC1A
RAM: 1024 Mbyte @ 533MHz
Storage: eMMC v4.51: 8 Gbyte
         microSD Socket: UHS-1 v3.01
Ethernet Port: 10/100/1000 Mbit/s, IEEE 802.3 Compliant
Wireless: WiFi 5 GHz & 2.4GHz IEEE 802.11a/b/g/n/ac
          Bluetooth®v4.2 (BR/EDR/BLE)
USB: 2x Type A (USB 2.0) Host and 1x Micro B (USB 2.0) OTG
Display: HDMI: WXGA (1366x768)@ 60 fps, HDMI 1.4
LED: 4x User LED, 1x WiFi LED, 1x BT LED

More information about this board can be found in 96Boards website:
https://www.96boards.org/product/avenger96/

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06 17:40:12 +02:00
Manivannan Sadhasivam
89e4dd57bd arm: dts: stm32mp157: Add missing pinctrl definitions
Add missing pinctrl definitions for STM32MP157.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06 17:40:11 +02:00
Eugen Hristev
0be07872e3 spl: at91: add support for SPL_AT91_MCK_BYPASS
By default the configuration of the PMC is to have an external crystal
connected that requires driving on both XIN and XOUT pins.
The bypass configuration means that only XIN will be used, the SoC will not
do any driving, and the XIN needs to be provided with a proper signal.
This is the MOSCXTBY bit in the PMC main clock generator register.
The SPL needs to properly initialize the PMC registers before switching
to external clock signal and raising the clock to the cruise speed.

Also created Kconfig for this specific configuration.
By default this is disabled.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2019-06-06 10:56:42 +03:00
Tom Rini
dbbb1c43f2 Pull request for UEFI sub-system for v2019.07-rc4-2
Support for managing the non-volatile attribute of UEFI variables
 is added though we do not have a backend for persistence yet.
 
 Error messages for changes of UEFI variables are provided.
 
 UEFI boottime service implementations are corrected.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAlz3mYcACgkQxIHbvCwF
 GsTNgw/8DSxiFXvOF6eTWd2POYfu9wjZXCcMtpsfuLA3b58AjF0VfYhoXgQoel1B
 BnP6wzaIajIM8yafvia38EBloa2ZkBPjqUD/dtvs/hYe9x9kMCqLpsbOgHmjKF4b
 X6w4j4OOvOaEuKnsi6faWmXfsOWA5laYz6/u1Ewau+0P5SMnt/0piVMqkLofFO1i
 TcUzzn8MyfuCOu6UH+nqMZMguPaLkiCZX+aS6Q6tDfd5wfVRDtGTMGrMO/X42tLB
 vqAgW6qRV8U4H08gBx8u2+xiO67soiH+7AVuhc+/6inMCPyAXBwVlr79YihNi75o
 FOftPJ3hcJ+YkLNSVpwayKzrPa9GCCB2PGVDPCWQMwejIgQMkLPq2xRbFCPmLC4N
 WM4E11lqLSDL4xUTqhn+bJfRofaIpV9t79VVNAOkwHD7Wj0mnOVWjnpY+bB3n3hN
 LAneXPiUoQXSy9d3F2dd6J3emQMSTK4TPchGwWyfFwTe8VszynvHbWU8AGyCjbop
 /XAlBHYfuTLjvB+j8WLfua7ocmMtvIAU3CLC8OJ6bvga/VIPtG17rGAiQ1RP9W0u
 JZ4QKOnU2M8NiOrq45GIQEUV/UocNDJ2g5fZshLIzNk1it90RFEQ7kR6WYZZg4Hq
 zHSVjKijqxUcqKfQbSukJInDYI8xS1F+jKgB3HdGCg49ZZb/y74=
 =mCc9
 -----END PGP SIGNATURE-----

Merge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efi

Pull request for UEFI sub-system for v2019.07-rc4-2

Support for managing the non-volatile attribute of UEFI variables
is added though we do not have a backend for persistence yet.

Error messages for changes of UEFI variables are provided.

UEFI boottime service implementations are corrected.
2019-06-05 15:53:18 -04:00
Thierry Reding
879a3bc1c2 ARM: tegra: Mark built-in Ethernet as default on Jetson TX2
Add an "ethernet" alias that points to the default network interface,
which is the built-in EQoS on Jetson TX2.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:35 -07:00
Thierry Reding
1e669b4808 ARM: tegra: Rename pcie-controller to pcie
Recent versions of DTC have checks for PCI host bridge device tree nodes
that are named something other than "pci" or "pcie". Fix all occurrences
of such nodes for Tegra boards to avoid potential warnings from DTC.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:35 -07:00
Thierry Reding
74a50ac2a4 ARM: tegra: Enable position independent build for 64-bit
Note that U-Boot is always chainloaded from cboot starting with L4T
release 28. cboot always loads U-Boot to a fixed address, so making
the builds position independent isn't strictly necessary. However,
position independent builds can be convenient because if U-Boot is
ever loaded to an address different from its link address, it will
still be able to boot.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:35 -07:00
Thierry Reding
b571766453 ARM: tegra: Import cbootargs value from cboot DTB
Read the boot arguments passed by cboot via the /chosen/bootargs
property and store it in the cbootargs environment variable.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:34 -07:00
Thierry Reding
34e12e03c7 ARM: tegra: Implement cboot_get_ethaddr()
This function will attempt to look up an Ethernet address in the DTB
that was passed in from cboot. It does so by first trying to locate the
default Ethernet device for the board (identified by the "ethernet"
alias) and if found, reads the "local-mac-address" property. If the
"ethernet" alias does not exist, or if it points to a device tree node
that doesn't exist, or if the device tree node that it points to does
not have a "local-mac-address" property or if the value is invalid, it
will fall back to the legacy mechanism of looking for the MAC address
stored in the "nvidia,ethernet-mac" or "nvidia,ether-mac" properties of
the "/chosen" node.

The MAC address is then written to the default Ethernet device for the
board (again identified by the "ethernet" alias) in U-Boot's control
DTB. This allows the device driver for that device to read the MAC
address from the standard location in device tree.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:34 -07:00
Thierry Reding
ce353babdb ARM: tegra: Implement cboot_save_boot_params() in C
This is easier to deal with and works just as well for this simple
function.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:34 -07:00
Thierry Reding
a0dbc1314c ARM: tegra: Unify Tegra186 builds
Tegra186 build are currently dealt with in very special ways, which is
because Tegra186 is fundamentally different in many respects. It is no
longer necessary to do many of the low-level programming because early
boot firmware will already have taken care of it.

Unfortunately, separating Tegra186 builds from the rest in this way
makes it difficult to share code with prior generations of Tegra. With
all of the low-level programming code behind Kconfig guards, the build
for Tegra186 can again be unified.

As a side-effect, and partial reason for this change, other Tegra SoC
generations can now make use of the code that deals with taking over a
boot from earlier bootloaders. This used to be nvtboot, but has been
replaced by cboot nowadays. Rename the files and functions related to
this to avoid confusion. The implemented protocols are unchanged.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:34 -07:00
Thierry Reding
836a56e729 ARM: tegra: Workaround UDC boot issues only if necessary
Resetting the USB device controller on boot is only necessary if the SoC
actually has a UDC controller and U-Boot enables support for it. All the
Tegra boards support UDC via the ChipIdea UDC driver, so make the UDC on
boot workaround depend on the ChipIdea UDC driver.

This prevents a crash on Tegra186 which does not have the ChipIdea UDC.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:34 -07:00
Thierry Reding
f9ec2ec850 ARM: tegra: Support TZ-only access to PMC
Some devices may restrict access to the PMC to TrustZone software only.
Non-TZ software can detect this and use SMC calls to the firmware that
runs in the TrustZone to perform accesses to PMC registers.

Note that this also fixes reset_cpu() and the enterrcm command on
Tegra186 where they were previously trying to access the PMC at a wrong
physical address.

Based on work by Kalyani Chidambaram <kalyanic@nvidia.com> and Tom
Warren <twarren@nvidia.com>.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:34 -07:00
Thierry Reding
8f60d18f94 ARM: tegra: Fix save_boot_params() prototype
The save_boot_params() function takes as its first four arguments the
first four registers. On 32-bit ARM these are r0, r1, r2 and r3, all of
which are 32 bits wide. However, on 64-bit ARM thene registers are x0,
x1, x2 and x3, all of which are 64 bits wide. In order to allow reusing
the save_boot_params() implementation on 64-bit ARM, change it to take
unsigned long parameters rather than the fixed size 32-bit integers.
This ensures that the correct values are passed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:33 -07:00
Thierry Reding
e19143b5eb ARM: tegra: Guard powergate code with a Kconfig symbol
Powergate code is not relevant on all Tegra SoC generations, so guard it
with a Kconfig symbol that can be selected by the generations that need
it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:33 -07:00
Thierry Reding
07ea02bc2d ARM: tegra: Guard pin controller code with a Kconfig symbol
Pin controller code is not relevant on all Tegra SoC generations, so
guard it with a Kconfig symbol that can be selected by the generations
that need it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:33 -07:00
Thierry Reding
1a869c703d ARM: tegra: Guard memory controller code with a Kconfig symbol
Memory controller code is not relevant on all Tegra SoC generations, so
guard it with a Kconfig symbol that can be selected by the generations
that need it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:33 -07:00
Thierry Reding
9e57819294 ARM: tegra: Guard GP pad control code with a Kconfig symbol
The GP pad control code is not relevant on all Tegra SoC generations, so
guard it with a Kconfig symbol that can be selected by the generations
that need it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:33 -07:00
Thierry Reding
b64e0b9231 ARM: tegra: Guard clock code with a Kconfig symbol
Clock code is not relevant on all Tegra SoC generations, so guard it
with a Kconfig symbol that can be selected by the generations that need
it.

This is in preparation for unifying Tegra186 code with the code used on
older generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:33 -07:00
Thierry Reding
e9c58f2bb8 ARM: tegra: Use common header for PMU declarations
There's no need to replicate the pmu.h header file for every Tegra SoC
generation. Use a single header that is shared across generations.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:33 -07:00
Thierry Reding
bf468e5e1a ARM: tegra: Remove disp1 clock initialization on Tegra210
pll_c is not a valid parent for the disp1 clock, so trying to set it
will fail. Given that display is not used in U-Boot, remove the init
table entry so that disp1 will keep its default parent (clk_m).

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:33 -07:00
Thierry Reding
bca7910b7d ARM: tegra: Fix mux type for disp1 and disp2 clocks on Tegra210
On Tegra210 the parents for the disp1 and disp2 clocks are slightly
different from earlier chips. Only pll_p, pll_d_out0, pll_d2_out0 and
clk_m are valid parents (technically pll_d_out is as well, but U-Boot
doesn't know anything about it). Fix up the type name and the mux
definition.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-06-05 09:16:32 -07:00
Bartosz Golaszewski
1f12208c6a arm: davinci: remove leftover assembly
There are no more users of lowlevel_init.S. Remove the file.

Suggested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-06-05 12:14:02 -04:00
Adam Ford
33ac2b560b arm: omap3: Manually initialize GPIO if OF_CONTROL doesn't
The commong initialization code manually initializes the GPIO
even when OF_CONTROL does it, so we can reduce the code size a
bit by not doing it manually when we have device tree support.

Using the omap3_logic board (dm3730), the sizes shrunk:

Before:

   text	   data	    bss	    dec	    hex	filename
 561066	  28596	 116880	 706542	  ac7ee	u-boot
  55245	   1605	   1888	  58738	   e572	spl/u-boot-spl

After
  text	   data	    bss	    dec	    hex	filename
 560898	  28548	 116872	 706318	  ac70e	u-boot
  55121	   1557	   1888	  58566	   e4c6	spl/u-boot-spl

Signed-off-by: Adam Ford <aford173@gmail.com>
2019-06-05 12:14:02 -04:00
Adam Ford
e3b7ff2476 ARM: DTS: imx6q-logicpd: Resync with Linux 5.1
Resync imx6q-logicpd with Kernel 5.1.5

Signed-off-by: Adam Ford <aford173@gmail.com>
2019-06-05 12:14:02 -04:00
Adam Ford
b4d070fb5a ARM: davinci: Remove ipam390 linker script from Kconfig
With ipam390 support removed in we can remove the reference to the
linker script since that case will never be true.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-06-05 12:14:02 -04:00
Sekhar Nori
2a766db938 ARM: davinci: SPL: fix BSS initialization
U-Boot README recommends initializing SDRAM in board_init_f(). DA850
was doing it as part of board_init_r() (through call to spl_board_init()
which calls arch_cpu_init() which calls da850_ddr_setup())

This worked fine till commit 15b8c75058 ("davinci:
da850evm/omapl138-lcdk: Move BSS to SDRAM because SRAM is full") moved
BSS to SDRAM.

Functions like mmc_initialize() called in board_init_r() assume BSS is
available. Since SDRAM was not initialized when arch/arm/lib/crt0.S tried
to initialize BSS to 0, BSS is not initialized correctly.

Fix this by simply calling arch_cpu_init() from board_init_f(). Also move
preloader_console_init() there to help debug issues with board_init_r().

With this spl_board_init() is no longer needed, we remove it.

Tested using MMC/SD boot on OMAP-L138 LCDK board.

Tested-by: Adam Ford <aford173@gmail.com> #da850evm
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Tested-by: Peter Howard <phoward@gme.net.au> #omapl138_lcdk
2019-06-05 12:14:02 -04:00
Tom Rini
6d93d245c1 Merge git://git.denx.de/u-boot-riscv
- Support Microchip MPFS Icicle board.
- Enable e1000 and nvme support for qemu.
- Enable PCI host ECAM generic driver for qemu.
- Increase the environment size to 128kB for qemu.
2019-06-05 10:07:31 -04:00
Padmarao Begari
39494822e3 riscv: Add Microchip MPFS Icicle board support
This patch adds Microchip MPFS Icicle board support.
For now, NS16550 serial driver is only enabled.
The Microchip MPFS Icicle defconfig by default builds
U-Boot for M-Mode with SMP support.

Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
2019-06-05 13:19:24 +08:00
Igor Opaniuk
a589107d4f ARM: dts: colibri_imx7: Add lcdif node
Extend lcdif DT node with proper display-timings for mxsfb driver.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-04 23:29:26 +02:00
Igor Opaniuk
8c1df09f07 video: mxsfb: add DM_VIDEO support
Extend the driver to build with DM_VIDEO enabled. DTS files
must additionally include 'u-boot,dm-pre-reloc' property in
soc and child nodes to enable driver binding to mxsfb device.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2019-06-04 23:25:54 +02:00
Heinrich Schuchardt
6a853dbcc0 lib: time: export usec_to_tick()
In the UEFI Stall() boottime service we need access to usec_to_tick().

Export the function.

Remove redundant implementation in arch/arm/mach-rockchip/rk_timer.c.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04 22:09:26 +02:00
Dennis Gilmore
7505075dff arm: mvebu: helios4: add MMC to SPL DT
This allows SPL to load the main U-Boot image from MMC once DM_MMC is
enabled.

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2019-06-04 08:33:24 +02:00
Tom Rini
8a802a2eef Merge tag 'rockchip-for-v2019.07-rc3' of git://git.denx.de/u-boot-rockchip
- some fix for rk3399-puma;
- rockchip script make_fit_atf.py cleanup
- Enable TPL for rk3399 orangepi and nanopi4;
- add support for rk3399 boards: Nanopi NEO4, Rockpro64, Rock PI 4;
2019-05-31 07:17:09 -04:00
Neil Armstrong
407544c2ef ARM: meson-gx: Reset GXL/GXM to external PHY when not using internal PHY
When using External PHY, reset the mux to use the external PHY in case U-Boot
was chainloaded from a misconfigured bootloader.

Fixes: 33e3378091 ("ARM: meson: rework soc arch file to prepare for new SoC")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-05-31 10:04:15 +02:00
Neil Armstrong
32f2880641 ARM: dts: Add missing DT for Meson G12A support
The following DT nodes in the process on review for Linux 5.3,
until Linux 5.3 is tagged, add the missing DT nodes in u-boot specific
DTSI files that will be dropped when the v5.3-rc1 DT is synced again.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-05-31 10:04:15 +02:00
Neil Armstrong
b1e81e67ee ARM: dts: sync Amlogic G12A DT with Linux 5.2-rc1
Sync from Linux commit a188339ca5a3 ("Linux 5.2-rc1")

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-05-31 09:57:49 +02:00
Jagan Teki
540c900dec rockchip: rk3399: Add Rock PI 4 support
Add initial support for Rock PI 4 board.

Specification
- Rockchip RK3399
- LPDDR4
- eMMC
- SD card slot
- RTL8211E 1Gbps
- HDMI In/Out, DP, MIPI DSI/CSI
- PCIe M.2
- USB 2.0, USB-3.0
- USB C Type

Commit details of rk3399-rock-pi-4.dts sync from Linux 5.1-rc2:
"arm64: dts: rockchip: add ROCK Pi 4 DTS support"
(sha1: 1b5715c602fda7b812af0e190eddcce2812e5417)

Signed-off-by: Akash Gajjar <akash@openedev.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-05-30 18:22:35 +08:00
Jagan Teki
001d6745e3 rockchip: rk3399: Add Rockpro64 board support
Add initial support for Rockpro64 board.

Specification
- Rockchip RK3399
- 2/4GB Dual-Channel LPDDR3
- SD card slot
- eMMC socket
- 128Mb SPI Flash
- Gigabit ethernet
- PCIe 4X slot
- WiFI/BT module socket
- HDMI In/Out, DP, MIPI DSI/CSI, eDP
- USB 3.0, 2.0
- USB Type C power and data
- GPIO expansion ports
- DC 12V/2A

Commit details of rk3399-rockpro64.dts sync from Linux 5.1-rc2:
"arm64: dts: rockchip: rockpro64 dts add usb regulator"
(sha1: 6db644c79c8d45d73b56bc389aebd85fc3679beb)

'Akash' has sent an initial patch before, so I keep him as board
maintainer and I'm co-maintainer based on our conversation.

Signed-off-by: Akash Gajjar <akash@openedev.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-05-30 18:22:35 +08:00
Jagan Teki
48b5c25f99 rockchip: rk3399: Add Nanopi NEO4 board support
Add initial support for Nanopi NEO4 board.

Specification
- Rockchip RK3399
- 1GB DDR3-1866
- SD card slot
- eMMC Socket
- RTL8211E 1Gbps
- AP6212 WiFI/BT
- HDMI In/Out, DP, MIPI CSI
- USB 3.0, 2.0
- USB Type C power and data
- GPIO expansion ports
- DC 5V/3A

Commit details of rk3399-nanopi-neo4.dts sync from Linux:
"arm64: dts: rockchip: Add Nanopi NEO4 initial support"
(sha1: 092470b537f19788d957aed12d835a179b606014)

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-05-30 18:22:35 +08:00
Christoph Muellner
b238e4b00c rockchip: Cleanup of make_fit_atf.py.
This patch cleans up make_fit_atf.py in the following way:

* Fix all issues reported by pylint
* Move copyright notice from file-to-generate to script
* Fix of-by-one bugs in loadables property
* Remove commented-out (dead) code.

Besides the bugfix no intended changes.

Tested on RK3399-Q7 with TF-A v2.1 as BL31.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-05-30 18:22:35 +08:00
Christoph Muellner
78a1ac33cb rockchip: rk3399: Add option to print on UART3.
The RK3399 SPL does not use a pinctrl driver to setup the UART pins.
Instead it works based on config macros, which set the base address
of the actual UART block.

Currently the RK3399 SPL support UART0 and UART2.
This patch adds UART3 in the same way as UART0.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-05-30 18:22:35 +08:00
Christoph Muellner
dee5ad5ae7 rockchip: pinctrl: rk3399: Add support for UART3.
This patch adds the missing GRF bit definitions for UART3 on the RK3399.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-05-30 18:22:35 +08:00
Tom Rini
e2822ccc2c Merge branch 'master' of git://git.denx.de/u-boot-tegra
- Audio support
2019-05-29 07:28:40 -04:00
Bartosz Golaszewski
d7cc0e4d79 mcx: remove board
This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-05-28 13:58:06 -04:00
Bartosz Golaszewski
2aa20c43e4 twister: remove board
This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2019-05-28 13:58:06 -04:00
Bartosz Golaszewski
899dd71e9f mt_ventoux: remove board
This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2019-05-28 13:58:06 -04:00
Bartosz Golaszewski
8c2644ca69 cm_t3517: remove board
This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-05-28 13:58:06 -04:00
Bartosz Golaszewski
3b88579c64 ipam390: remove board
This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Heiko Schocher <hs@denx.de>
2019-05-28 13:58:06 -04:00
Bartosz Golaszewski
5e92c6856b eco5pk: remove board
This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-05-28 13:58:06 -04:00
Bartosz Golaszewski
7a2b51e36f ea20: remove board
This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2019-05-28 13:58:06 -04:00
Bartosz Golaszewski
881ae794b9 calimain: remove board
This board still doesn't select CONFIG_DM and seems to be umaintained.
As it makes progress on modernizing several DaVinci drivers more
difficult and the maintainer has not expressed interest in updating
it, this patch proposes to remove it.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2019-05-28 13:58:06 -04:00
Tom Rini
c18b103657 Merge branch 'master' of git://git.denx.de/u-boot-sh
- Gen3 PCIe driver + enablement on Salvator-X platforms.
- Gen3 recovery SPL used to reload ATF/OpTee/U-Boot instead of minimon.
- SDHI HS400 fixes ported from latest BSP and datasheet.
2019-05-26 20:18:20 -04:00
Tom Rini
696f02d99b Merge branch 'master' of git://git.denx.de/u-boot-socfpga
- SoCFPGA PL310 cleanup + A10 fix, A10 DT cleanup, DW GPIO fix.
2019-05-26 20:15:46 -04:00
Tom Rini
56730706cc - mtmips: network stability fixes for gardena-smart-gateway
- mtmips: enable CONFIG_USE_PREBOOT and CONFIG_CMD_WDT
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiQkHUH+J02LLC9InKPlOlyTyXBgFAlzn+NMACgkQKPlOlyTy
 XBiBURAAs6A3n2xyHGsfPNfIUB7oXJeHM1Y6ahpo1yJ3qOpuwENCxD4hFyrbReKr
 VsjsSfqgiwVqIRrC55ScR+SNQ0c/GobKP+a+vikQcq3tlWkJGvdKvzq4m0mlxhmf
 IU21uMGXhm9pWOnrUdQ8dg4Mk+wkXDC18LJwvbByT9dRVTmPkAF4+sag+jF0pW/u
 kaI95WRt7u5HKZ2va/aTeZhzWwG+Xs+iGS6VQtbC+Syp477mR6W9CJEXaGYQqCvz
 FtQRD8iOa7kKF7IQa38xFGzQTnoGTsKLHMsVU9YEcM7LS7CTa/zRwumYrNZySB+1
 1f0oYdzLaVMepilKXSLpXdW4NEHZ61uuQ+zZZek1Ys3dehDhjg9GX0LkTIX2KT3/
 8xFfVl1ayT2d6s9BS+I+1SuXkIw68vuWY3Hl3AvIzeyPh2OzGBa+qaJCM9U6T9lR
 9Gdo5wNxaKtwbPw7Pp8cIIcBKyBmRnrKpLJcf9GN+wN5lLlH8bF2LAYxeF43kaQW
 JZwlAc58SQ+kRxhyFIAHEjHWXAGLr6uv83HvWhzg6BUyxujBVkgPoL/diBmcFocO
 sSa+TiDx9GeNmhO/8bvKxPnhWdrRnexpYKTrnwRsNTodma2vNlIAS9DjZh6JGw+n
 nkeik7yBuY3grpLIJGpKX/OA3mu184+ReD/QGuANU5+pb6ivyJA=
 =8HjA
 -----END PGP SIGNATURE-----

Merge tag 'mips-pull-2019-05-24' of git://git.denx.de/u-boot-mips

- mtmips: network stability fixes for gardena-smart-gateway
- mtmips: enable CONFIG_USE_PREBOOT and CONFIG_CMD_WDT
2019-05-25 11:34:31 -04:00
Simon Glass
c5a120b3f0 tegra: sound: Add an I2S driver
Add a driver which supports transmitting digital sound to an audio codec.
This uses fixed parameters as a device-tree binding is not currently
defined.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-05-24 10:14:03 -07:00
Simon Glass
112f2e1443 tegra: sound: Add an audio hub driver
Add a driver for the audio hub. This is modelled as a misc device which
supports writing audio data from I2S.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-05-24 10:13:52 -07:00
Simon Glass
c9d7542bf3 tegra: Add a delay in clock_start_periph_pll()
This function enables a peripheral clock and then immediately sets its
divider. Add a delay to allow the clock to settle first. This matches the
delay in other places which do a similar thing.

Without this, the I2S device on Nyan does not init properly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-05-24 10:13:44 -07:00
Simon Glass
f6ac3fab9b tegra: Correct tegra124 clock name
The first clock type appears to have and incorrect setting for out of the
mux outputs. It should be CLK_M, not OSC. Fix it and its only user.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
2019-05-24 10:13:12 -07:00
Stefan Roese
f913eab9b9 mips: mt76xx: Remove cache workaround and select SYS_MALLOC_CLEAR_ON_INIT
With commit 06985289d4 ("watchdog: Implement generic watchdog_reset()
version") the init sequence has changed in arch_misc_init(), resulting
in a re-appearance of the d-cache issue on MT7688 boards (e.g. gardena).
When this happens, the first (or sometimes later ones as well) TFTP
command hangs and does not complete correctly. This leads to the
assumption that the d-cache is not in a clean state once the ethernet
driver is called (d-cache is used here for the buffers). The old work-
around with the cache flush somehow does not work any more now with
the new code change.

To fix this issue, this patch now removes the old workaround and selects
CONFIG_SYS_MALLOC_CLEAR_ON_INIT for ARCH_MTMIPS. With this option the
complete malloc area is initialized with zeros (cache lines are touched).
Testing has shown that this also fixes the issue on the MT7688 boards.

Signed-off-by: Stefan Roese <sr@denx.de>
Suggested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2019-05-24 15:55:17 +02:00
Tien Fong Chee
ca9387e8b1 Arm: dts: socfpga: Remove invalid property from chose node
Finding bitstream from cff-file is no longer valid after bitstream is built
into FIT image and loaded by generic firmware loader. Remove cff-file
as this is legacy implementation from A10 downstream.

Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
2019-05-24 14:29:51 +02:00
Tom Rini
866a78dc28 - Add various STM32MP1 fixes for serial, env, clk, board, i2c ...
- Add STM32MP1 DDR driver update:
 	These update introduce the DDR interactive mode described in:
 	https://wiki.st.com/stm32mpu/index.php/U-Boot_SPL:_DDR_interactive_mode
 
 	This mode is used by the CubeMX: DDR tuning tool.
 	https://wiki.st.com/stm32mpu/index.php/STM32CubeMX
 
 	The DDR interactive mode is NOT activated by default because
 	it increase the SPL size and slow down the boot time
 	(200ms wait added).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJc5rdIAAoJEMrHeC97M/+mw64P/0jD3C1jvtwkzFQ2DPvnSQEk
 iTZHMb91/9GncSY0S2Cgn8a2+m24F7YFLqibKSdduLLr/w98Zfi7kmO+ju/Kn+qE
 aG6iomyour8+Pr+1LMPolsKKM8lULSgrd4ALRA5CegNsXijvYEE7N8mPrBpdIQem
 BaM4HnQpbtxXU9J/rGHAVagLuHbJmwBvZBQTBAWfQdNR5+vGfplH2sF0cxJF5UTW
 06yBXrwjLW6PEVYZbzYiRQ5Gn7BnBe4nXrl4ReDtS5e4ueRKM166TZljvNCd60KI
 B49eLxd0wT2Zutsz1rT5c/LChXo3cr8FXM3csJ6J6cIBdfFF3frHbIEDM2jZTxJf
 jN7pAHpxbRdYS/GbWS5mSuUyKmxDPt6Kfd7LQUYX9qktqeLG9LfkrmLfGdCSiwkB
 64Z15DoHAuDMab+LlV+rz8ns3YAV0ruFryWfZ8udLWuX3G6NDmivafLR3dgNRdNB
 otkyCdIlq8GQUm3w+5r9wm7aGvHB3UtNYK870AnYA20vmn/WVuUBZ6yE+lce/QpV
 zFS4dgsdbn41EXO/O9TtwMyKT+/s138u2+L7CEegXiNneJmwzbJg3YPeMuaiF8Y2
 oYqlUmfVO/ZuoVvr5dwo4TY96nEhRf2Ul36spRdrx8wBZ0YdL+ByDO5Pcc2B9A+P
 M80QqlT64BJDJ1CqhW5m
 =meeB
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20190523' of https://github.com/pchotard/u-boot

- Add various STM32MP1 fixes for serial, env, clk, board, i2c ...

- Add STM32MP1 DDR driver update:
	These update introduce the DDR interactive mode described in:
	https://wiki.st.com/stm32mpu/index.php/U-Boot_SPL:_DDR_interactive_mode

	This mode is used by the CubeMX: DDR tuning tool.
	https://wiki.st.com/stm32mpu/index.php/STM32CubeMX

	The DDR interactive mode is NOT activated by default because
	it increase the SPL size and slow down the boot time
	(200ms wait added).
2019-05-24 08:13:27 -04:00
Tom Rini
afe9e1f197 Merge git://git.denx.de/u-boot-mpc85xx
- Enable DM for SATA, SDHC, USB in T2080QDS
2019-05-24 08:13:00 -04:00
Angelo Dureghello
196afe62d6 m68k: add dspi chip-select support
Signed-off-by: Angelo Dureghello <angelo@sysam.it>

Changes for v5:
- new patch
2019-05-24 08:11:59 -04:00
Angelo Dureghello
cd3b0717ba m68k: move dspi bus control functions into cf_spi.c driver
This patches move dspi bus-related operations into more
proper location, to avoid the driver to declares them as externs.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
2019-05-24 08:11:59 -04:00
Angelo Dureghello
abe0f87999 m68k: add OF control support to m68k
Add SUPPORT_OF_CONTROL at this stage, to avoid to break build
bisectability.

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
2019-05-24 08:11:58 -04:00
Angelo Dureghello
82e25ecc85 m68k: enabling long jumps on mcf54x5 SoCs
Growing of binary size asks for long assembly jumps.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
2019-05-24 08:11:57 -04:00
Angelo Dureghello
aa54e45ffc m68k: add initial dts files for all m68k boards
This patch adds basic dts files for all the m68k boards.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
[trini: Add CONFIG_TARGET_M5329EVB dtbs and update M5329EVB defconfigs]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-05-24 08:11:53 -04:00
Angelo Dureghello
24bf41ce59 m68k: architecture changes to support fdt
This patch adds fdt support to the m68k architecture.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
2019-05-23 23:14:38 -04:00
Angelo Dureghello
b5867b1a7a m68k: add basic set of devicetrees
This patch adds a basic group of devicetrees, one for each
cpu family, including actually just uart and dspi devices,
since these are the drivers supporting devicetree (support
added in this patch-set).

Acked-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-05-23 23:14:38 -04:00
Marek Vasut
476abb72e0 ARM: socfpga: Clear PL310 early in SPL
On SoCFPGA A10 systems, it can rarely happen that a reboot from Linux
will result in stale data in PL310 L2 cache controller. Even if the L2
cache controller is disabled via the CTRL register CTRL_EN bit, those
data can interfere with operation of devices using DMA, like e.g. the
DWMMC controller. This can in turn cause e.g. SPL to fail reading data
from SD/MMC.

The obvious solution here would be to fully reset the L2 cache controller
via the reset manager MPUMODRST L2 bit, however this causes bus hang even
if executed entirely from L1 I-cache to avoid generating any bus traffic
through the L2 cache controller.

This patch thus configures and enables the L2 cache controller very early
in the SPL boot process, clears the L2 cache and disables the L2 cache
controller again.

The reason for doing it in SPL is because we need to avoid accessing any
of the potentially stale data in the L2 cache, and we are certain any of
the stale data will be below the OCRAM address range. To further reduce
bus traffic during the L2 cache invalidation, we enable L1 I-cache and
run the invalidation code entirely out of the L1 I-cache.

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: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
2019-05-24 00:01:08 +02:00
Marek Vasut
501be47032 ARM: socfpga: Pull PL310 clearing into common code
Pull the PL310 clearing code into common code, so it can be reused
by Arria10.

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: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
2019-05-24 00:01:08 +02:00
Peng Ma
856b9cdb53 powerpc: mpc85xx: delete FSL_SATA for T2080QDS board.
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-23 19:53:09 +05:30
Peng Ma
b8f653f574 arch: powerpc: add sata node for t2080 dts
Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-23 19:53:09 +05:30
Yinbo Zhu
c05e2b9347 arch: powerpc: add usb node in t2080 dts
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-23 19:53:08 +05:30
Patrick Delaunay
1767ac2d1f stm32mp1: ram: add support for LPDDR2/LPDDR3
Manage power supply configuration for board using stpmic1
with LPDDR2 or with LPDDR3:
+ VDD_DDR1 = 1.8V with BUCK3 (bypass if possible)
+ VDD_DDR2 = 1.2V with BUCK2

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:38:11 +02:00
Patrick Delaunay
067a4c001d ARM: dts: stm32mp1: DDR config v1.44
Update DDR configuration with the latest update:

- PUBL_regs: DXnGCR[0]= according to ddr_width to disable Byte
                        lane 2/3 in 16bit
- fix LPDDR2/3 timing_calc to step RL/WL in relaxed
  timings mode
- remove  LPDDR3 RL3 (optional) support vs  MR0[7]
  because MR0[7] can't be read instead  always apply
  worse RL/WL for LPDDR3 when freq < 166MHz)
- change  MR3 to 48ohm drive  for LPDDR2/3
- change default ZPROG[7:4] = 0x1 for LPDDR2/3 ,
  '0' is not allowed even when ODT not used
- use DQSTRN for LPDDR2/3 (it was not set in PIR)
- LPDDR3: set dqsge/dwsgx gate extension to 2,2
  like LPDDR2
-DDRCTRL.dfitmg0:
  + for LPDDR3 tphy_wrlat = WL (as LPDDR2)
  + improvement for relaxed mode vs  RL/Wl at corner case.
    For example @533MHz RL/WL (relaxed) = 9/5 for LPDDR2/3
    and correction to MR2 accordingly
- DDR_PCFGQOS1_1: port1 timeout relaxed from 0x00 to 0x40,
  for LTDC.
- DDR_PCFGWQOS0_0: change vpr level from
  11 to 12 in order to include the CPU on
  the variable priority queue.
- DDR_SCHED: fix to consider 13 levels  (13 levels - 1 = 0xC)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:38:10 +02:00
Patrick Delaunay
c60fed14f6 stm32mp1: ram: change ddr speed to kHz
Allow fractional support in DDR tools.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:38:10 +02:00
Patrick Delaunay
27a986d4e4 stm32mp1: add bootstage support
Add the needed configurations for bootstage and
activate bootstage command.

BOOTSTAGE_REPORT is not activated by default.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:36:47 +02:00
Patrick Delaunay
c596877ee6 armv7: timer: init timer with bootstage
In initf_bootstage() we call bootstage_mark_name() which ends up calling
timer_get_us() before timer_init(); that cause crash for stm32mp1.

This patch solve the issue without changing the initialization sequence.
See also commit 97d20f69f5 ("Enable CONFIG_TIMER_EARLY with bootstage")
for other solution when DM is activated for TIMER.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:36:47 +02:00
Patrick Delaunay
3419982bc3 stm32mp1: add bootcount support
Activate bootcount and use TAMP register to store the count value.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:36:47 +02:00
Patrick Delaunay
bb7288ef1c stm32mp1: psci: add synchronization with ROM code
Use SGI0 interruption  and TAMP_BACKUP_MAGIC_NUMBER
to synchronize the core1 boot sequence requested by
core0 in psci_cpu_on():
- a initial interruption is needed in ROM code after
  RCC_MP_GRSTCSETR_MPUP1RST (psci_cpu_off)
- the ROM code set to 0 the 2 registers
  + TAMP_BACKUP_BRANCH_ADDRESS
  + TAMP_BACKUP_MAGIC_NUMBER
  when magic is not egual to
  BOOT_API_A7_CORE0_MAGIC_NUMBER

This patch solve issue for cpu1 restart in kernel.
echo 0 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu1/online

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:36:46 +02:00
Patrick Delaunay
ee7d772370 stm32mp1: cosmetic: bsec: reorder include files
Reorder the include files in alphabetic order.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:36:46 +02:00
Patrick Delaunay
ce3772ca8d stm32mp1: migrate PREBOOT to Kconfig
Use Kconfig to activate CONFIG_PREBOOT (empty by default).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:36:46 +02:00
Patrick Delaunay
579a3e7bf9 stm32mp1: Move ENV_SIZE and ENV_OFFSET to Kconfig
Add arch stm32mp for ENV migration step and drop more
items from include/configs/xxx.h.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:36:46 +02:00
Patrick Delaunay
ef84dddd83 stm32mp1: Move config SYS_MALLOC_LEN to Kconfig
This patch moves the the config SYS_MALLOC_LEN to
Kconfig as it is already done for zynq arch in
commit 01aa5b8f05 ("Kconfig: Move config
SYS_MALLOC_LEN to Kconfig for zynq")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-23 11:36:46 +02:00
Yinbo Zhu
2cf0eb5dfd arch: powerpc: add eSDHC node to t2080qds dts
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-23 14:22:33 +05:30
Qiang Zhao
7e817c70ca arm: dts: fsl-ls1028a: add sp805 watchdog node
Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Udit Agarwal
d9532e8092 armv8: fsl-layerscape: Set env_loc to ENVL_NOWHERE with CONFIG_ENV_IS_NOWHERE.
ENVL_NOWHERE is dependent on CONFIG_ENV_IS_NOWHERE and not on
CONFIG_CHAIN_OF_TRUST so return ENVL_NOWHERE when CONFIG_ENV_IS_NOWHERE
is enabled

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Peng Ma
e765ee5c50 ARM: dts: Freescale: Add ecc addr for sata node
Move the ecc addr from driver to dts.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Yuantian Tang
f278a21749 armv8: ls1028aqds: Add support of LS1028AQDS
LS1028AQDS Development System is a high-performance
computing, evaluation, and development platform that supports
LS1028A QorIQ Architecture processor.

Signed-off-by: Sudhanshu Gupta <sudhanshu.gupta@nxp.com>
Signed-off-by: Rai Harninder <harninder.rai@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
Signed-off-by: Tang yuantian <andy.tang@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Yuantian Tang
353f36d96e armv8: ls1028ardb: Add support for LS1028ARDB
LS1028A is an ARMv8 implementation. LS1028ARDB is an evaluation
platform that supports the LS1028A family SoCs. This patch add basic
support of the platform.

Signed-off-by: Sudhanshu Gupta <sudhanshu.gupta@nxp.com>
Signed-off-by: Rai Harninder <harninder.rai@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Yuantian Tang
d4ad111dc4 armv8: ls1028a: Add NXP LS1028A SoC support
Ls1028a SoC is based on Layerscape Chassis Generation 3.2
architecture with features:
 2 ARM v8 Cortex-A72 cores, CCI400, SEC, DDR3L/4, LCD, GPU, TSN
 ENETC, 2 USB 3.0, 2 eSDHC, 2 FlexCAN, 2 SPI, SATA, 8 I2C controllers,
 6 LPUARTs, GPIO, SAI, qDMA, eDMA, GIC, TMU etc.

Signed-off-by: Sudhanshu Gupta <sudhanshu.gupta@nxp.com>
Signed-off-by: Rai Harninder <harninder.rai@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Hou Zhiqiang
a8d6050543 armv8: lx2160a: add PCIe controller DT nodes
The LX2160A integrated 6 PCIe Gen4 controllers.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Hou Zhiqiang
20eae4c810 kconfig: add dependency PCIE_LAYERSCAPE_GEN4 for FSL_PCIE_COMPAT
The LX2160A PCIe is using driver PCIE_LAYERSCAPE_GEN4 instead
of PCIE_LAYERSCAPE.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Hou Zhiqiang
059d942283 armv8: lx2160a: add MMU table entries for PCIe
The lx2160a have up to 6 PCIe controllers and have different
address and size of PCIe region.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Hou Zhiqiang
3fbe8f0f44 armv8: fsl-layerscpae: correct the PCIe controllers' region size
The LS2080A has 8GB region for each PCIe controller, while the
other platforms have 32GB.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Hou Zhiqiang
8348e79865 armv8: layerscape: use PCIe address macro for precompile PCIe MMU entry
Change to use PCIe address macro to determine if precompile the PCIe
MMU table entry.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
2019-05-22 12:24:24 +05:30
Marek Vasut
5602330df0 ARM: rmobile: Add recovery SPL for R-Car Gen3
Build an SPL which can be started via SCIF download mode on R-Car Gen3
and allows loading and executing U-Boot uImage with the next stage code.
This is also useful for starting e.g. ATF BL2, which inits the hardware
and returns to the U-Boot SPL, which can then load e.g. U-Boot proper.

The H3, M3-W, M3-N SoCs have plenty of SRAM for storing the U-Boot SPL
while the payload, e.g. ATF BL2, executes, so there is no problem here.

However, E3 and D3 have much less SRAM, hence the loader uses a trick
where it copies itself beyond the area used by BL2 and executes from
there. That area is 32kiB large and not enough to hold U-Boot SPL, BSS,
stack and malloc area, so the later two are placed at +0x4000 offset
from start of SRAM, another area not used by ATF BL2. To make things
even more complicated, the SCIF loader cannot load to the upper 32kiB
of the SRAM directly, hence the copying approach.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-05-21 22:15:31 +02:00
Tom Rini
e1a2ed7180 Merge git://git.denx.de/u-boot-mpc83xx
- Update MPC83xx platform support to current best practices, etc.
2019-05-21 07:13:35 -04:00
Tom Rini
b9625abe03 - update for using splashfile instead of location->name
when loading the splash image from a FIT
 - updates for loading internal and external splash data from FIT
 - DM_GPIO/DM_VIDEO migration for mx53 cx9020 board
 - fix boot issue on mx6sabresd board after DM_VIDEO migration
 - increase the max preallocated framebuffer BPP to 32 in ipuv3
   driver to prepare for configurations with higher color depth
 - allow to use vidconsole_put_string() in board code for text
   output on LCD displays
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXOK5Sw4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXBvoAJ96YrInVKKWtuVigA9lNpk5xbmbeQCdG9wML4LI
 dBbQyzD3mNqvnDMyNPQ=
 =Plt7
 -----END PGP SIGNATURE-----

Merge tag 'video-for-2019.07-rc3' of git://git.denx.de/u-boot-video

- update for using splashfile instead of location->name
  when loading the splash image from a FIT
- updates for loading internal and external splash data from FIT
- DM_GPIO/DM_VIDEO migration for mx53 cx9020 board
- fix boot issue on mx6sabresd board after DM_VIDEO migration
- increase the max preallocated framebuffer BPP to 32 in ipuv3
  driver to prepare for configurations with higher color depth
- allow to use vidconsole_put_string() in board code for text
  output on LCD displays
2019-05-21 07:12:46 -04:00
Dirk Eibach
d494cdb97e mpc83xx: Add gazerbeam board
The gdsys gazerbeam board is based on a Freescale MPC8308 SOC.
It boots from NOR-Flash, kernel and rootfs are stored on
SD-Card.

On board peripherals include:
- 2x 10/100 Mbit/s Ethernet (optional)

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 08:03:38 +02:00
Mario Six
d85c385332 gazerbeam: Add u-boot specific dts include file
Add a U-Boot specific dts file, which encapsulates the needed
modifications to the Gazerbeam Linux device tree.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 08:03:38 +02:00
Mario Six
96373c1d91 gazerbeam: Import Linux DT
Import the Linux device tree for the Gazerbeam board.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 08:03:38 +02:00
Mario Six
7e3974e1f4 mpc83xx: Define _end symbol
To support OF_EMBED, the MPC83xx architecture has to define the "_end"
symbol to correctly access the appended DT.

Fortunately, MPC8xx already defines the symbol, and the linker script is
quite similar to that of MPC83xx, so copy this approach for MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:34 +02:00
Mario Six
6fffab74cd powerpc: Simplify processor.h
Lots of stuff in processor.h was taken verbatim from the Linux kernel.
It was never synced, so most of it was removed or changed in the kernel
since it was imported.

Remove all the stuff that is unused in the current U-Boot sources;
should anybody feel the need to re-sync with the kernel, they can do it
later on.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:34 +02:00
Mario Six
5c22998503 mpc83xx: Use pre-defined asm functions
For a lot of inline assembly calls in the mpc8xxx and mpc83xx
directories, we already have convenient pre-defined helper functions,
but they're not used, resulting in hard-to-read code.

Use these helper functions where ever possible and useful.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:34 +02:00
Mario Six
1e718f43de mpc83xx: Replace ppcDWstore with inline assembly
ppcDWstore/ppcDWload are hardly used by any board, but since they're
implemented in start.S, they're always present in every U-Boot image,
even if they're not needed.

Re-implement these fuctions in C with inline assembly, so that the
compiler can decide when to actually include them.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:34 +02:00
Mario Six
8835836ae7 mpc83xx: Don't define cpu_eth_init for DM eth
Don't use the legacy method of initializing the ethernet controller on
MPC83xx when DM is active.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
9fc148ebc4 mpc83xx: Add arch clock.h to make SDHC work
The fsl-esdhc driver can be used for the SDHC functionality on MPC83xx,
but it needs some additional definitions.

Add a clock.h file, so we can use the driver for MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
133ec60284 mpc83xx: Get rid of CONFIG_SYS_DDR_SDRAM_BASE
CONFIG_SYS_DDR_SDRAM_BASE is set to the same value as
CONFIG_SYS_SDRAM_BASE on all existing boards. Just use
CONFIG_SYS_SDRAM_BASE instead.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
7c2e535770 mpc83xx: Migrate CONFIG_LCRR_* to Kconfig
Migrate the CONFIG_LCRR_* settings to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
e35012e802 mpc83xx: Migrate SPCR to Kconfig
Migrate the SPCR setting to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
73df96a38e mpc83xx: Migrate arbiter config to Kconfig
Migrate the arbiter configuration to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
ba463c1169 mpc8308: Migrate system io config to Kconfig
Migrate the system IO configuration setting to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
71da747431 mpc83xx: Migrate CONFIG_SYS_IMMR to Kconfig
Migrate CONFIG_SYS_IMMR to Kconfig for MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
be5abb0a83 mpc83xx: Migrate HID config to Kconfig
Mirate the HID configuration settings to Kconfig.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
d17e5fdfea mpc83xx: Prepare usage of DM gpio driver
The MPC85xx GPIO driver was converted to handle a broader range of SoCs.

Prepare the MPC83xx code for usage of this driver.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
190d3a0c63 powerpc: mpc83xx: fdt: Use get_serial_clock()
Replace the hard-coded CONFIG_SYS_NS16550_CLK value for the FDT fixup
with the previously introduced get_serial_clock function

This will make it possible to activate DM for serial devices on MPC83xx
later on.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00
Mario Six
ac016c94ae powerpc: mpc83xx: Implement get_serial_clock()
DM serial drivers on PowerPC determine their clock frequency via the
get_serial_clock function. This function is not Implemented yet for
MPC83xx.

This patch Implements the function so that DM serial drivers work on
MPC83xx.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:33 +02:00