We no need invoke the code, since spl framework could help
us do that.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Use spl_early_init to replace spl_init, spl_init will be invoked
in board_init_r, we only need use spl_early_init to setup malloc
and scan early dt.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
timer_init has been invoked in arch_cpu_init, no need to invoke
it again in board code.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Drop useless getting ccm device, there is no need to explicted do this
in board code, and we not enable SPL CLK currently.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
When not booting from FlexSPI, the offset computation is:
offset = image_offset + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512 - 0x8000;
When booting from SD card or eMMC user partition, image_offset is
0x8000. It is useless to add and remove 0x8000.
When booting from other device, image_offset is 0 so this computation is wrong.
Simplfy this computation to work on all booting devices.
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Currently watchdog driver is not selected, which causes system to reboot
after staying 60s in the U-Boot prompt.
Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Currently watchdog driver is not selected, which causes system to reboot
after staying 60s in the U-Boot prompt.
Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Currently watchdog driver is not selected, which causes system to reboot
after staying 60s in the U-Boot prompt.
Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Adam Ford <aford173@gmail.com>
Currently watchdog driver is not selected, which causes system to reboot
after staying 60s in the U-Boot prompt.
Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Currently the watchdog driver is not selected, which causes the following
warnings in both SPL and U-Boot proper:
U-Boot SPL 2020.07-rc1-00387-g67887903af (May 07 2020 - 23:49:27 -0300)
Normal Boot
WDT: Started without servicing (60s timeout)
Trying to boot from MMC1
U-Boot 2020.07-rc1-00387-g67887903af (May 07 2020 - 23:49:27 -0300)
CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz
Reset cause: POR
Model: FSL i.MX8MM EVK board
DRAM: 2 GiB
WDT: Started without servicing (60s timeout)
....
System reboots after staying 60s in the U-Boot prompt.
Fix this problem by enabling CONFIG_WATCHDOG so that watchdog can be
properly serviced.
Suggested-by: Marek Vasut <marex@denx.de>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
With yModem the FIT Image is only supplied once, so we can only
seek forward in the yModem supplied image and never backwards.
With the recent changes to the SPL mechanism, including loading
U-Boot first, FDT after, then the loadables, we must also reorder
the FIT image script to make sure that the loadables are last in
the FIT image.
Signed-off-by: Patrick Wildt <patrick@blueri.se>
Tested-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Accidentally submitted a patch with indentation not correct, let's fix it
by indenting wrong lines.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Enable CONFIG_PCI and CONFIG_NVME and related configs for the
Pinebook Pro.
Signed-off-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
With recently added changes we get support for usb3 including handling
of the phys (type-c and inno-usb2), so enable the necessary config
options on puma.
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
With the current usb stack in u-boot, all host ports on puma work
flawlessly without any additional special handling, so drop that
usb hub hacking from the puma board.
Tested with mass-storage and usb-ethernet on both usb3 and usb2 ports.
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
The introduction of the puma-specific generator was mainly a way
to split the pmu firmware from the ATF binary and not having to
distribute that 4GB (sparse) image that was created before moving
to the bl31.elf as base.
Looking at the publically available repository for that separate
pmu firmware
https://git.theobroma-systems.com/rk3399-cortex-m0.git/
there is also no activity for 3 years and apart from some build
customizations no other changes were done.
And even then, if changes need to be made, this can very well also
happen in the atf context itself, so there is no real need to
diverge from the established build procedure and we can just go
back to using the main make_fit_atf.py script.
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
So far the puma dts files only just included the main puma dtsi without
handling the actual baseboard and rk3399-puma.dtsi was very much
detached from the variant in the mainline Linux kernel.
Recent changes resulted in a strange situation with nonworking puma boards.
Commit ab800e5a6f ("arm: dts: rockchip: puma: move U-Boot specific bits to u-boot.dtsi")
moved the sdram include from rk3399-puma-ddrX.dts to new files
rk3399-puma-ddrx-u-boot.dtsi which were never included anywhere though.
Commit 167efc2c7a ("arm64: dts: rk3399: Sync v5.7-rc1 from Linux")
replaced the rk3399-puma.dtsi nearly completely, but in the kernel
it definitly depends on a baseboard dts to actually enable peripherals
like sd-slot, uarts, etc.
So to untagle this and bring the whole thing more in line with mainline
Linux, bring the rk3399-puma-haikou.dts over as well, drop the separate
DDR-option devicetrees and instead replace them with a puma Kconfig option
to select and include the needed DDR variant.
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
The commit moving puma to the generic cpuid/macaddr helpers used 7 spaces
as indentation, so correct that by moving to the required tabs.
Fixes: fa177ff020 ("board: puma: Use rockchip_* helpers to setup cpuid and macaddr")
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tabs not spaces, so transform it to the common styling.
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
The regulator enable-gpio uses opposite values for the declaration
vs. the enable_active_low property, breaking the regulator enablement.
Make the usbhost-supply work again by bringing them in sync again.
This mimics the upstream Linux change found on:
http://lore.kernel.org/r/20200604091239.424318-1-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
The gmac reset has opposite values for the gpio declaration
and the separate reset-active, bring this in line to make
u-boot also find the ethernet-phy.
This mimics the upstream Linux commit found on
https://lore.kernel.org/r/20200603132836.362519-1-heiko@sntech.de
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Board has flash chip on board so let store U-Boot environment there.
Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Document SPI flash program steps for rockchip platforms.
Suggested-by: Hugh Cole-Baker <sigmaris@gmail.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Mark the default U-Boot environment as SPI flash since
this is an on board flash device.
Updated env offset, size in contrast with default since
the U-Boot proper has to start from 384K.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
On rockchip platforms, SPI boot image creation is not
straightforward like MMC boot image creation where former
requires to specify tpl, spl in multimage format in mkimage,
and later simply do a concatenate mkimaged-tpl with spl.
On this note, let drop rkspi image type creation via kbuild
and let inform via rockchip.rst
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
The 'stdout-path' is missing after dts sync.
Fixes: 167efc2c7a ("arm64: dts: rk3399: Sync v5.7-rc1 from Linux")
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The ROCK-PI-E is a credit card size SBC based on Rockchip RK3328
Quad-Core ARM Cortex A53.
Net - Dual ethernet port, 1 X Gbe, 1 X 100M
USB - USB 3.0
DC - USB-Type C, 5V 2A
Storage - TF card, eMMC
Just build idbloader.img and u-boot.itb for Rockpi E board and
follow the blow steps to replace the relevant partition.
dd if=idbloader.img of=/dev/sdcard seek=64 conv=notrunc
dd if=u-boot.itb of=/dev/sdcard seek=16384 conv=notrunc
Signed-off-by: Banglang Huang <banglang.huang@foxmail.com>
Enable CONFIG_PCI and CONFIG_NVME and related configs for the
ROCKPro64 board.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Enable CONFIG_PCI and CONFIG_NVME and related configs for the
Firefly RK3399 board.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
The following problems are resolved:
* When booting via UEFI an SMBIOS table is presented to the operating
system. If U-Boot tries to add an empty string, this results in corrupted
SMBIOS information. We will now use "Unknown" as property value.
* The EFI_RNG_PROTOCOL uses the DM_RNG drivers. For the virtio RNG driver
the missing DM_RNG Kconfig dependency is added.
* Missing function descriptions for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL are
added.
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl7bMw8ACgkQxIHbvCwF
GsTidBAAiJr0xpDK7fPh7/Q1vwqvuYJoFTvIYMna2rngjBsJbSFYf1noJtedwGbI
KKYkwttU3DhOsyOw1FvbNixuLFFS/wDEYHZO5RgXJJoajd70aFAKWRvMtzC1DsW4
qTeSrFuph/LGWPZKrRUqqSQx6+ZPGN7dyMGZZK1uSm/C1aXPY9ahHUnJGD+e0qpF
aGJKwFYMLslbp3HjP/81rhTYd8REnZjp1iyXcRRv67If1vWP8rLw3xXhsJHRRt9M
5C8u98Zq0qFjRZGcmIPTblA+tuQ+oAYUyz5eg0txyOxmcTiFXEbCknJa1N5vW1/V
HPujgp/0v0WBqa2+ZGwK67Kkx4FQpDtt/Er3beboeeVYkeMFoKbGvz4YadJ6ltG9
caNWtFsjqMnQCD8kD1QMWjHD0Ut6ev5qBUnPEyzWWIviizO5j/O7W2kzrPUuOoIU
mJzBVftMl4g9fytXvjan8VKCa4gkB7HcTliVsKGTen5kqM6ZUJ8XQZkGbuJbsAz6
iFoXEbrmA+IQo8pLb29uJ8h1TwAsJBT14MLHj4xT/6TgNVdcviHLiDcBFnVNXZag
uv57YmpRRmLnCPPEk6j8xDaWOd7z5W44s3HTkUPZDNXk78Iy1rD1TVIamXtyhhcq
iKb2xklhXdi9EQS6Oq4DePVtknWNwisGAbA8BWxdsrsHDBcozWA=
=tmqF
-----END PGP SIGNATURE-----
Merge tag 'efi-2020-07-rc4-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for UEFI sub-system for efi-2020-07-rc4 (2)
The following problems are resolved:
* When booting via UEFI an SMBIOS table is presented to the operating
system. If U-Boot tries to add an empty string, this results in corrupted
SMBIOS information. We will now use "Unknown" as property value.
* The EFI_RNG_PROTOCOL uses the DM_RNG drivers. For the virtio RNG driver
the missing DM_RNG Kconfig dependency is added.
* Missing function descriptions for the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL are
added.
Add the missing Kconfig dependency and let VIRTIO_RNG default to yes.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
smbios_add_string() cannot deal with empty strings. This leads to incorrect
property values and invalid tables. E.g. for the pine64-lts_defconfig
CONFIG_SMBIOS_MANUFACTURER="". Linux command dmidecode shows:
Table 1:
Manufacturer: sunxi
Product Name: sunxi
Table 3:
Invalid entry length (2). DMI table is broken! Stop.
Replace empty strings by "Unknown".
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
- Resync checkpatch.pl (largely) with v5.7 and introduce U-Boot specific
checks in a localized area, so they aren't lost in the future.
- Complete / re-migrate some options from config headers to defconfigs
- Add dependencies to the various debug uart drivers
All of our cmds have a Kconfig entry. Making enabling a CMD via the
config file an error to checkpatch.pl.
Signed-off-by: Tom Rini <trini@konsulko.com>
There is a lot of use of #ifdefs in U-Boot. In an effort reduce this,
suggest using the compile-time construct.
Signed-off-by: Simon Glass <sjg@chromium.org>
A common problem when submitting a new uclass is to forget to add sandbox
tests. Add a warning for this.
Of course tests should always be added for new code, but this one seems to
be missed by nearly every new contributor.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add an option to indicate that U-Boot-specific checks should be enabled.
Add a function to house the code that will be added.
Signed-off-by: Simon Glass <sjg@chromium.org>
Keep the U-Boot changes to $logFunctions
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Resync with v5.7 release which changed the default max line
length, update commit to reflect]
Signed-off-by: Tom Rini <trini@konsulko.com>