summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* pinctrl: rockchip: Add pinctrl support for rk3308David Wu2019-12-064-1/+468
| | | | | | | | | | | | | An iomux register contains 8 pins, each of which is represented by 2 bits, but the register offset is 0x8. For example, GRF_GPIO0A_IOMUX offset is 0x0, but GRF_GPIO0B_IOMUX offset is 0x8, the offset 0x4 is reserved. So add a type IOMUX_8WIDTH_2BIT to calculate offset. Signed-off-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* arm: rockchip: rk3308: Initialize the iomux configurationDavid Wu2019-12-061-0/+37
| | | | | | | | When we want to use plus pinctrl feature, we need to enable them at spl. Signed-off-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* pwm: rk_pwm: Make PWM driver to support all Rockchip SocsDavid Wu2019-12-062-25/+130
| | | | | | | | | | | | | | | | | This PWM driver can be used to support pwm functions for on all Rockchip Socs. The previous chips than RK3288 did not support polarity, and register layout was different from the RK3288 PWM. The RK3288 keep the current functions. RK3328 and the chips after it, which can support hardware lock, configure duty, period and polarity at next same period, to prevent the intermediate temporary state. Signed-off-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* dts: rk3308: Enable ethernet function supported for Firefly ROC_RK3308_CCDavid Wu2019-12-061-0/+9
| | | | | | | | The Firefly ROC_RK3308_CC use ref_clock of input mode, and rmii pins of m1 group. Signed-off-by: David Wu <david.wu@rock-chips.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
* arm: dts: Add mac node for rk3308 at dtsi levelDavid Wu2019-12-061-0/+22
| | | | | | | | 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>
* net: gmac_rockchip: Add support for rk3308David Wu2019-12-061-0/+65
| | | | | | | | 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>
* rockchip: config: add support for firefly-px30 boardKever Yang2019-12-062-0/+114
| | | | | | | | | 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>
* rockchip: misc: protect serial# from getting overwrittenHeiko Stuebner2019-12-051-1/+10
| | | | | | | | | | | | 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>
* rockchip: misc: don't fail if eth_addr already setHeiko Stuebner2019-12-051-1/+1
| | | | | | | | | | | | 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: 04825384999f ("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>
* rockchip: px30: Add support for using UART3 as debug UARTPaul Kocialkowski2019-12-052-0/+96
| | | | | | | | | | | | | | | 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>
* rockchip: px30: Rename CONFIG_DEBUG_UART2_CHANNEL to CONFIG_DEBUG_UART_CHANNELPaul Kocialkowski2019-12-052-5/+5
| | | | | | | | | | 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>
* rockchip: px30: Fixup PMUGRF registers layout orderPaul Kocialkowski2019-12-051-8/+8
| | | | | | | | | 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>
* rockchip: evb-px5: disable NETAndy Yan2019-12-051-1/+1
| | | | | | | 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>
* rockchip: px5: enable spl-fifo-mode for emmc for px5-evbAndy Yan2019-12-051-0/+2
| | | | | | | | | | 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>
* rockchip: rk3308: enable spl-fifo-mode for emmcAndy Yan2019-12-051-0/+2
| | | | | | | | | | | 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>
* doc: rockchip: Update build instruction for rk3308Andy Yan2019-12-051-1/+0
| | | | | | | | | | After commit d8765e2422cd ("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>
* Merge git://git.denx.de/u-boot-shTom Rini2019-12-043-6/+6
|\ | | | | | | - Convert some R-Car Gen3 platforms to DM_SPI{,_FLASH}
| * ARM: rmobile: Convert M2N Gose to DM_SPI{,_FLASH}Marek Vasut2019-12-041-2/+2
| | | | | | | | | | | | | | 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>
| * ARM: rmobile: Convert M2W Koelsch to DM_SPI{,_FLASH}Marek Vasut2019-12-041-2/+2
| | | | | | | | | | | | | | 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>
| * ARM: rmobile: Convert H2 Lager to DM_SPI{,_FLASH}Marek Vasut2019-12-041-2/+2
| | | | | | | | | | | | | | 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>
* | configs: Resync with savedefconfigWIP/04Dec2019Tom Rini2019-12-04967-1377/+668
| | | | | | | | | | | | Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge branch '2019-10-27-mtd-cleanup'Tom Rini2019-12-04914-657/+1760
|\ \ | |/ |/| | | - Merge the series to clean up our MTD Kconfig and Makefile logic
| * mtd: Makefile: deep cleanupMiquel Raynal2019-12-044-26/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * cmd: make MTD commands depend on MTDMiquel Raynal2019-12-041-3/+7
| | | | | | | | | | | | | | 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>
| * cmd: nand/sf: isolate legacy codeMiquel Raynal2019-12-049-101/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * cmd: mtdparts: Kconfig: join mtdparts command entry with its optionsMiquel Raynal2019-12-041-14/+14
| | | | | | | | | | | | | | Move the Kconfig entry of the option right after the entry of the mtdparts command. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
| * mtd: spi: SPI_FLASH_MTD depends on MTDMiquel Raynal2019-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
| * dfu: add dependency on the raw NAND coreMiquel Raynal2019-12-042-0/+2
| | | | | | | | | | | | | | | | | | 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>
| * mtd: nand: add includes in NAND core to avoid warningsMiquel Raynal2019-12-042-0/+2
| | | | | | | | | | | | | | | | | | 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>
| * configs: ls104x/ls108x/ls208x: Build the raw NAND core with TFABOOTMiquel Raynal2019-12-0413-0/+19
| | | | | | | | | | | | | | | | 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>
| * configs: socfpga: mcvevk: Remove useless UBI infosMiquel Raynal2019-12-041-3/+0
| | | | | | | | | | | | | | | | 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>
| * configs: remove MTD support from bcm11130 and M54418TWR defconfigsMiquel Raynal2019-12-044-4/+0
| | | | | | | | | | | | | | | | | | | | 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>
| * configs: remove raw NAND core from k2g defconfigsMiquel Raynal2019-12-042-2/+0
| | | | | | | | | | | | | | | | | | | | 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>
| * configs: move CONFIG_MTD in defconfigs when set in arch includesMiquel Raynal2019-12-043-2/+1
| | | | | | | | | | | | | | | | 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>
| * mtd: ensure MTD is compiled when CMD_MTDPARTS is selectedMiquel Raynal2019-12-0481-0/+81
| | | | | | | | | | | | | | | | | | 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>
| * mtd: ensure CMD_NAND is compiled when its options are selectedMiquel Raynal2019-12-0429-0/+29
| | | | | | | | | | | | | | | | 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>
| * mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selectedMiquel Raynal2019-12-042-0/+3
| | | | | | | | | | | | | | 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>
| * mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selectedMiquel Raynal2019-12-042-0/+4
| | | | | | | | | | | | | | 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>
| * mtd: ensure UBI is compiled when using fastmapMiquel Raynal2019-12-0417-0/+18
| | | | | | | | | | | | | | 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>
| * mtd: ensure MTD is compiled when there is a SPI NOR flash using MTDMiquel Raynal2019-12-04117-0/+117
| | | | | | | | | | | | | | | | 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>
| * mtd: ensure MTD/the raw NAND core are compiled when there is a NAND flashMiquel Raynal2019-12-04498-1/+642
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTDMiquel Raynal2019-12-03204-92/+207
| | | | | | | | | | | | | | 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>
| * mtd: rename CONFIG_MTD -> CONFIG_DM_MTDMiquel Raynal2019-12-0384-78/+90
| | | | | | | | | | | | | | | | | | | | 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>
| * mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NANDMiquel Raynal2019-12-03324-390/+419
|/ | | | | | | | | 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>
* Merge tag 'efi-2020-01-rc5' of ↵WIP/03Dec2019Tom Rini2019-12-031-2/+2
|\ | | | | | | | | | | | | | | 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.
| * cmd: efidebug: fix a build error in show_efi_boot_opt()AKASHI Takahiro2019-12-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge tag 'dm-pull-3dec19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini2019-12-031-17/+19
|\ \ | | | | | | | | | Fix stdout-path handling
| * | dm: serial: Handle "stdout-path" with ":options" correctlyBin Meng2019-12-021-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With commit f0921f5098d8 ("fdt: Sync up to the latest libfdt"), SiFive Unleashed board does not boot any more. This was due to the U-Boot local changes commit 77d7fff8cec2 ("fdt: Fix handling of paths with options in them") to libfdt/fdt_ro.c was dropped during the libfdt upgrade. >From the history [1] it was mentioned that the U-Boot changes commit 77d7fff8cec2 ("fdt: Fix handling of paths with options in them") was rejected by libfdt upstream, hence we need find another way to fix the things. This commit uses another method, by updating serial_check_stdout() directly to handle the situation of "stdout-path" with ":options". A simpler way is to change the logic in fdtdec_get_chosen_node() to do similar thing, but I feel that not every property in chosen node may have the option in them, hence it would make more sense to do the special handling in serial_check_stdout() directly. [1]: http://patchwork.ozlabs.org/patch/462756/ Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Merge branch '2019-12-03-master-imports'Tom Rini2019-12-0381-138/+3098
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | - omapl138_lcdk fixes - MediaTek MT8518 support - VxWorks standard DTB support - Assorted bug fixes
| * | arm64: zynqmp: Point zcu216 defconfig to correct dts fileMichal Simek2019-12-031-1/+1
| | | | | | | | | | | | | | | | | | Defconfig is pointing to incorrect DT file which needs to be fix. Signed-off-by: Michal Simek <michal.simek@xilinx.com>