Commit Graph

61747 Commits

Author SHA1 Message Date
David Wu
982fab393d arm: dts: Add mac node for rk3308 at dtsi level
The rk3308 only support RMII mode, and if it is output clock
mode, better to use ref_clk pin with drive strength 12ma.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-06 00:06:23 +08:00
David Wu
0ed8f1e5f4 net: gmac_rockchip: Add support for rk3308
Add the glue code to allow the rk3308 variant of the Rockchip gmac
to provide network functionality.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-06 00:06:23 +08:00
Kever Yang
502573686f rockchip: config: add support for firefly-px30 board
This is a core board named Core-PX30-JD4 with a mainboard from Firefly,
name it as firefly-px30 for now.
This board can re-use the dts of PX30, the only difference is the UART IO,
the firefly use UART2 M1 while evb use UART2 M0.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-06 00:06:23 +08:00
Heiko Stuebner
fd3a7ae8e6 rockchip: misc: protect serial# from getting overwritten
serial# is one of the vendor properties and thus protected from being
overwritten if already set. If env_set is called anyway this result in
some nasty warnings, so check for presence before trying that.

In the same direction check for the presence of cpuid# and compare it
to the actual hardware and emit a warning if they don't match.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-05 23:53:07 +08:00
Heiko Stuebner
d490fadc70 rockchip: misc: don't fail if eth_addr already set
rockchip_setup_macaddr() runs from an initcall, so returning an error
code will make that initcall fail thus breaking the boot process.

And if an ethernet address is already set this is definitly not a
cause for that, so just return success in that case.

Fixes: 0482538499 ("rockchip: rk3399: derive ethaddr from cpuid");
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-05 23:53:07 +08:00
Paul Kocialkowski
c541bfda2f rockchip: px30: Add support for using UART3 as debug UART
Some generic PX30 SoMs found in the wild use UART3 as their debug output
instead of UART2 (used for MMC) and UART5.

Make it possible to use UART3 as early debug output, with the associated
clock and pinmux configuration. Two sets of output pins are supported (M0/M1).

Future users should also note that the pinmux default in the dts is to use
the M1 pins while the Kconfig option takes M0 as a default.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
2019-12-05 23:53:07 +08:00
Paul Kocialkowski
ec4fafdf1f rockchip: px30: Rename CONFIG_DEBUG_UART2_CHANNEL to CONFIG_DEBUG_UART_CHANNEL
UART3 also has two sets of pins that can be selected.

Rename the config option to a common name, to allow it to be used for both
UART2 and UART3.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-05 23:53:07 +08:00
Paul Kocialkowski
b0c5e37d0e rockchip: px30: Fixup PMUGRF registers layout order
According to the PX30 TRM, the iomux registers come first, before the pull
and strength control registers.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
2019-12-05 23:53:07 +08:00
Andy Yan
1b8114ac1e rockchip: evb-px5: disable NET
PX5 evb has no ETH port, so disable it.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-05 23:53:07 +08:00
Andy Yan
afe18f205e rockchip: px5: enable spl-fifo-mode for emmc for px5-evb
We need load some parts of ATF to sram, but rockchip
dwmmc controllers can't do dma to non-ddr addresses
space, so set the mmc controller into fifo mode in spl.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-05 23:53:07 +08:00
Andy Yan
081a51c937 rockchip: rk3308: enable spl-fifo-mode for emmc
We need load some parts of ATF to sram, but rockchip
dwmmc controllers can't do dma to non-ddr addresses
space, so set the mmc controller into fifo mode in spl.

And show my best respect to Heiko's work for this solution.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-05 23:53:07 +08:00
Andy Yan
bbc8457ae0 doc: rockchip: Update build instruction for rk3308
After commit d8765e2422 ("Enable building of u-boot.itb
on Rockchip platform"), u-boot.itb will automatically
generated by "make all" command, manually command
"make u-boot.itb" is no longer needed.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2019-12-05 23:53:07 +08:00
Tom Rini
7e5ee346fc Merge git://git.denx.de/u-boot-sh
- Convert some R-Car Gen3 platforms to DM_SPI{,_FLASH}
2019-12-04 18:10:04 -05:00
Tom Rini
0cfccb5401 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04 17:18:38 -05:00
Tom Rini
c1c6e4a9da Merge branch '2019-10-27-mtd-cleanup'
- Merge the series to clean up our MTD Kconfig and Makefile logic
2019-12-04 17:13:35 -05:00
Miquel Raynal
fb4384490d mtd: Makefile: deep cleanup
Move MTD-related lines out of the root Makefile. Put them in their
respective directories. Enclose some of these new lines to skip them
when building the SPL. MTD core files and some MTD device drivers are
compiled in a mtd.o object and included in the final object only if
MTD support is required (there are two different symbols for that, one
for U-Boot and one for the SPL).

Now that all defconfigs have been fixed, we can stop the logic where
enabling a command selects the core files to compile. This logic is
broken since selecting a symbol with a 'depends on' will not enforce
this secondary dependency.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04 17:10:51 -05:00
Miquel Raynal
ff102c54b0 cmd: make MTD commands depend on MTD
Defconfigs have been fixed, now we can add proper dependencies in
Kconfig. SPI FLASH is still not dependent on MTD (deeper rework needed).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04 17:10:51 -05:00
Miquel Raynal
eb446ef625 cmd: nand/sf: isolate legacy code
The 'sf' command is not supposed to rely on the MTD stack, but both
'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite
their location, these functions do not depend at all on the MTD
stack.

This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD is
selected, which is inconsistent with the current situation. Solve this
by moving these three functions (which are only used by the above two
commands) out of mtd_uboot.c and put them in a C file only compiled
with cmd/sf.c and cmd/nand.c.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
[trini: Don't export get_part function now]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04 17:10:51 -05:00
Miquel Raynal
587f44576e cmd: mtdparts: Kconfig: join mtdparts command entry with its options
Move the Kconfig entry of the option right after the entry of the
mtdparts command.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04 17:10:51 -05:00
Miquel Raynal
85f7e9d547 mtd: spi: SPI_FLASH_MTD depends on MTD
It is already the case that all defconfigs with SPI_FLASH_MTD also
declare using MTD, but let's make this consistent and enforce it in
Kconfig. Most of the time SPI_FLASH_MTD is used in conjunction with
UBI, which already depends on MTD.

Suggested-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04 17:10:51 -05:00
Miquel Raynal
f3a02d29e8 dfu: add dependency on the raw NAND core
CONFIG_DFU_NAND needs the raw NAND core being compiled.

Also fix the colibri_vf defconfig to reflect this dependency.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 17:10:51 -05:00
Miquel Raynal
c8f555f102 mtd: nand: add includes in NAND core to avoid warnings
Because of the include's game, when some files are compiled for a SPI
NAND device, no warning appears. But when it is for a raw NAND device,
GCC complains. Fix these warning by including <common.h>.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 17:10:51 -05:00
Miquel Raynal
e81f03248e configs: ls104x/ls108x/ls208x: Build the raw NAND core with TFABOOT
Enabling TFABOOT configuration will compile-in a call to nand_read in
the boot sequence. Handle the situation by also selecting officially
the raw NAND core in this case.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04 17:10:51 -05:00
Miquel Raynal
7db785c703 configs: socfpga: mcvevk: Remove useless UBI infos
There is no flash on this board, there is no reason to define MTD
environment variables nor UBI. Drop them from the configuration file.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Wolfgang Grandegger <wg@aries-embedded.de>
2019-12-04 17:10:51 -05:00
Miquel Raynal
910bc26ee9 configs: remove MTD support from bcm11130 and M54418TWR defconfigs
While the right Kconfig entries were selected, because of the missing
CMD_NAND symbol the raw NAND core was never compiled. Remove it from
the defconfigs otherwise the build will fail.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
[trini: Also do this on bcm11130_nand]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
452f22e7e3 configs: remove raw NAND core from k2g defconfigs
Due to previous Makefile organization, the raw NAND subdirectory was
not compiled in if CMD_NAND was not enabled. Because the Denali driver
does not compile with these boards (undefined environment offset),
remove the dependency within the defconfig over the controller driver
(was ignored anyway in the past).

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
e0a4c2d2a7 configs: move CONFIG_MTD in defconfigs when set in arch includes
Let's be consistent and always declare CONFIG_MTD from the defconfig
file when needed.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
f6434a9561 mtd: ensure MTD is compiled when CMD_MTDPARTS is selected
MTD support must be enabled when using mtdparts. Indeed, functions
like get_mtd_info(), get_mtd_device() and put_mtd_device() are in
drivers/mtd/mtd_uboot.c and are built only with CONFIG_MTD.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
2fa872ee77 mtd: ensure CMD_NAND is compiled when its options are selected
In some files, options of CMD_NAND are selected but not the command
itself. Fix this inconsistency.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
7ccc3f3018 mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selected
Raw NAND support must be enabled when the environment is in NAND.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
00e270473e mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selected
UBI must be enabled when the environment is in UBI.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
f344fb1540 mtd: ensure UBI is compiled when using fastmap
UBI must be enabled when using fastmap, reflect this is defconfigs.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
63ea317245 mtd: ensure MTD is compiled when there is a SPI NOR flash using MTD
MTD must be enabled when there is a SPI NOR flash using the
SPI_FLASH_MTD config entry.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-04 13:26:17 -05:00
Miquel Raynal
d4c2f6b7e3 mtd: ensure MTD/the raw NAND core are compiled when there is a NAND flash
Both symbols must be enabled when there is a raw NAND driver
selected. Also enable them when CONFIG_CMD_NAND is selected to avoid
breaking things when we'll further rework the MTD dependency
description.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
[trini: Rebase and migrate a few more boards here]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04 13:26:17 -05:00
Marek Vasut
019c9b3ea8 ARM: rmobile: Convert M2N Gose to DM_SPI{,_FLASH}
Enable DM_SPI and DM_SPI_FLASH in U-Boot on M2N Gose.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-12-04 18:57:05 +01:00
Marek Vasut
d22c65d139 ARM: rmobile: Convert M2W Koelsch to DM_SPI{,_FLASH}
Enable DM_SPI and DM_SPI_FLASH in U-Boot on M2W Koelsch.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-12-04 18:57:05 +01:00
Marek Vasut
20be3e2ca7 ARM: rmobile: Convert H2 Lager to DM_SPI{,_FLASH}
Enable DM_SPI and DM_SPI_FLASH in U-Boot on H2 Lager.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2019-12-04 18:57:04 +01:00
Miquel Raynal
888f184abe mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD
Like in Linux, just use CONFIG_MTD to compile the MTD stack.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03 23:04:10 -05:00
Miquel Raynal
1de770d544 mtd: rename CONFIG_MTD -> CONFIG_DM_MTD
CONFIG_MTD must be reserved for the MTD core. Like any other
subsystem, prefix the symbol by DM when it comes to DM support.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
[trini: Add Kconfig files]
Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03 23:04:10 -05:00
Miquel Raynal
88718be300 mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND
Add more clarity by changing the Kconfig entry name.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
[trini: Re-run migration, update a few more cases]
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03 23:04:10 -05:00
Tom Rini
94d022bb40 Pull request for UEFI sub-system for efi-2020-01-rc5
A type error in the implementation of the efidebug command is fixed.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl3mvYkACgkQxIHbvCwF
 GsTwNA//dr4Zzsxn+HsAqsriwCu8NrSFiJrLl/V4PKl4EdoZC7mG2XLEH1oWdny1
 TYORBwq5e+j6Qrja9b71N2BVoPQ69JNrZotDl0M7RhmpZ8STuAfhI+7uaM7FCKq5
 Gh2tpUpN3NSTUA18Gl2rJ9IDI7Yf5DFzoX2NKkoQs88Us5HXz6ddNugJFWYdl+Xg
 tAIpn+X8pwMeFkJ0Fp+ytyayBRNtU7Et6MudfdGeTtd6jRVpIkM5HODtmzallWN3
 hO58yHmU/zwze97MT8DEYV8lboxM1Fwdd9Jw6R8nPU/y4KPfIveHemXfqFd67CbJ
 8azfdyCRIkK04y6mhkJK/h+iHBXink363/SWgnHZG75C2LtvH33T5VW7PhPiKuQI
 hfuExLvXHjKYWW6Hkw//Yg4a33gEDR2M2wlNrcmi5SJTNT+dG7C4DjSmVE9qEGe/
 ykDX5DQFyO9UQk8lQgF5mTQ/jd60mcTc02pDaEUQ40n5+kZbTWoM0yKrMwLLRhz+
 pVUD/pJ29X8jO76YQK5UnCUZA9V/YJllasDZ9AV7uJc/Yov9PwpMe4It6goFqCT7
 HuMfN+Hx+Y531zZ1tHUGe7kush46HgAA6pxFi2NFKg+06tjQD0lTun1vD4xYFFtI
 Uu3kZ6Yk+kpDNj1h8HrDgw1HcPqohj7RGa60fSzMifRUxH9N6HA=
 =spg0
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-01-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-01-rc5

A type error in the implementation of the efidebug command is fixed.
2019-12-03 18:12:58 -05:00
Tom Rini
a7bbaf8c13 Fix stdout-path handling
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAl3mkWwACgkQfxc6PpAI
 rebncAf/SvjTDzKZZiCsSKakHr2YJmID1GwCg9HI3vBxJH2vjsdWKBBg7THmaqve
 ST/haRump2HXPBTEHtqIo3wSFkopuzGFmAa/20bpCDoGoJdLrwzWbS1SgPcPNr2m
 gqTbkWweNej+dndM1sYG/Fv5hzWqBfZvKah9vYyW9V6AaIW7r3Ahe+thkpOETKRq
 QT1fe8Y2L25xTRqad5DuvEj0JkRR2RYBInZWp0NkcyoTFRpZUoV7ZVMlMMjgn4b/
 dVJtdDRozURGbbV9F7DmvEpfFMoWfaEn6Q3gsRfuhDBLlil1iYikhsjURyspPgxt
 NNBzgEkxKDeZksLcqNnyG7GKZWp20g==
 =SOs9
 -----END PGP SIGNATURE-----

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

Fix stdout-path handling
2019-12-03 18:12:04 -05:00
Tom Rini
2ae43a2640 Merge branch '2019-12-03-master-imports'
- omapl138_lcdk fixes
- MediaTek MT8518 support
- VxWorks standard DTB support
- Assorted bug fixes
2019-12-03 18:10:17 -05:00
AKASHI Takahiro
0bffb8c46b cmd: efidebug: fix a build error in show_efi_boot_opt()
I detected the following error in sandbox with Clang on Travis CI:
    +cmd/efidebug.c:703:15: error: result of comparison of constant
     9223372036854775822 with expression of type 'int' is always false
     [-Werror,-Wtautological-constant-out-of-range-compare]
    +        else if (ret == EFI_NOT_FOUND)
    +                 ~~~ ^  ~~~~~~~~~~~~~

Simply changing a type of 'ret' to efi_status_t will fix this error.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-12-03 20:54:05 +01:00
Michal Simek
c9f417b28a arm64: zynqmp: Point zcu216 defconfig to correct dts file
Defconfig is pointing to incorrect DT file which needs to be fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-12-03 12:00:25 -05:00
mingming lee
abf2c68566 ARM: MediaTek: add basic support for MT8518 boards
This adds a general board file based on MT8518 SoCs from MediaTek.

Apart from the generic parts (cpu) we add some low level init codes
and initialize the early clocks.

This commit is adding the basic boot support for the MT8518 eMMC board.

Signed-off-by: mingming lee <mingming.lee@mediatek.com>
[trini: Migrate env location to defconfig, set ENV_IS_IN_MMC]
Signeed-off-by: Tom Rini <trini@konsulko.com>
2019-12-03 12:00:03 -05:00
mingming lee
485627dd5f pinctrl: add driver for MT8518
Add Pinctrl driver for MediaTek MT8518 SoC.

Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-03 08:44:14 -05:00
mingming lee
69373bd44a mmc: mtk-sd: Adjust the mmc tuning flow
1.Support cmd response and data tuning together.
2.Support hs400 cmd responese tuning.

Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-03 08:44:14 -05:00
mingming lee
9072400775 clk: mediatek: add driver for MT8518
Add clock driver for MediaTek MT8518 SoC.

Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-03 08:44:14 -05:00
mingming lee
13e89d7522 ARM: MediaTek: Add support for MediaTek MT8518 SoC
Add support for MediaTek MT8518 SoC. This include the file
that will initialize the SoC after boot and its device tree.

Signed-off-by: mingming lee <mingming.lee@mediatek.com>
2019-12-03 08:44:14 -05:00