summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-01-23mmc: fsl_esdhc_imx.c: fix compiler warningHeiko Schocher
prevent unsued variable compiler warning if DM_REGULATOR is not set. Signed-off-by: Heiko Schocher <hs@denx.de>
2021-01-23imx8mq: configs: add support for distro boot commandsAlice Guo
Supported boot device types in iMX8MQ: MMC, DHCP. CONFIG_DISTRO_DEFAULTS is added for enabling the DISTRO_DEFAULTS option. CONFIG_BOOTCOMMAND which is defined in include/configs/imx8mq_evk.h is deleted because "run distro_bootcmd" is required to be the default boot mode. scriptaddr is the location in RAM where boot.scr.uimg/boot.scr will be loaded to prior to execution. kernel_addr_r is the location in RAM where the kernel will be loaded to. Delete unnecessary environment variables because "run distro_bootcmd" is set to be the default boot mode. Signed-off-by: Alice Guo <alice.guo@nxp.com>
2021-01-23ARM: imx6: dh-imx6: Move bootcounter to SNVS_LPGDRMarek Vasut
Move the bootcounter to SVNS_LPGDR to free up OCRAM for usage by the VPU. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2021-01-23board: phytec: imx8mp: Add PHYTEC phyCORE-i.MX8MP supportTeresa Remmet
Add initial support PHYTEC phyCORE-i.MX8MP SOM. Supported features: - 2GB LPDDR4 RAM - eMMC - external SD - debug UART2 - watchdog Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-01-23w1: mxc: fix buildMartin Fuzzey
Now that header files no longer include common.h it must be included first. Otherwise the build fails with errors like include/asm/arch/clock.h:43:1: error: unknown type name 'u32' u32 imx_get_uartclk(void); Fixes: c3dc39a2f85b ("arm: Don't include common.h in header files") Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-01-23arm: dart6ul: enable DM_ETH for the dart6ulMarc Ferland
This patch converts the dart6ul ethernet support to DM_ETH and cleans up the legacy ethernet code. The clean up, more specifically: * moves the fec2 node and pin definition to the carrier board DTS since the phy associated with it is on the carrier board and not on the SoM; * add the reset pin associated to each phy; * separate the ethernet, mdio and reset pins of each fec so that they are easier to reference; * add clock properties to the phy nodes since they are connected to the 50Mhz ENET[12]_TX_CLK clock of the SoC; * remove CONFIG_BOARD_EARLY_INIT_F since the function is now empty. Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
2021-01-23imx: imx8mm-beacon: Remove relocation restrictionsAdam Ford
The system is capable of relocating RAM disks and the kernel. Remove these restrictions to prevent it. Signed-off-by: Adam Ford <aford173@gmail.com>
2021-01-23imx8mm_beacon: Enable fixed regulator in SPLAdam Ford
Because SPL can support SD UHS, the fixed regulator needs to be enabled in SPL to reset the SD card. Fixes: 1a5d9c84b472 ("imx8mm_beacon: Enable HS400 on MMC controller") Signed-off-by: Adam Ford <aford173@gmail.com>
2021-01-23mx6ul(l)evk: Enable DM_ETH_PHYSean Anderson
This fixes eth0 not initializing properly. Both eth0 and eth1 use the MDIO interface on eth1 to access their PHYs. However, without DM_ETH_PHY, eth0 still tries to use its own MDIO interface to access its phy. Before this patch, a boot log might contain lines like Net: Warning: ethernet@20b4000 using MAC address from ROM eth1: ethernet@20b4000 [PRIME]Could not get PHY for FEC0: addr 2 After this patch they now look like Net: Warning: ethernet@20b4000 using MAC address from ROM eth1: ethernet@20b4000 [PRIME]Get shared mii bus on ethernet@2188000 Warning: ethernet@2188000 using MAC address from ROM , eth0: ethernet@2188000 As an alternative to DM_ETH_PHY, FEC_MXC_SHARE_MDIO could also have been used to achieve the same effect. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-01-23board: imx8mp: add boot.cmd for distro boot on iMX8MPAlice Guo
Distro Boot requires a U-Boot-specific script named boot.scr or boot.scr.uimg which contains boot commands to boot the system. The boot.cmd is such a file. Use mkimage to generate boot.scr or boot.scr.uimg from boot.cmd, and the command is: mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Distro Boot Script" -d boot.cmd boot.scr.uimg The boot.cmd file is an example script and can be modified based on needs. bootargs is set in this script and root uses the default value "/dev/mmcblk1p2 rootwait rw" which can be changed by overriding mmcroot. Signed-off-by: Alice Guo <alice.guo@nxp.com>
2021-01-23imx8mp: configs: add support for distro boot commandsAlice Guo
Supported boot device types in iMX8MP: MMC. CONFIG_CMD_PART is added for command part and CONFIG_CMD_FS_GENERIC is for command fstype. scriptaddr is the location in RAM where boot.scr.uimg/boot.scr will be loaded to prior to execution. kernel_addr_r is the location in RAM where the kernel will be loaded to. Delete unnecessary environment variables because "run distro_bootcmd" is set to be the default boot mode. On the iMX8MP platform I used, "mmc1" represents SD card and "mmc2" represents eMMC. Signed-off-by: Alice Guo <alice.guo@nxp.com>
2021-01-23board: imx8mm: add boot.cmd for distro boot on iMX8MMAlice Guo
Distro Boot requires a U-Boot-specific script named boot.scr or boot.scr.uimg which contains boot commands to boot the system. The boot.cmd is such a file. Use mkimage to generate boot.scr or boot.scr.uimg from boot.cmd, and the command is: mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Distro Boot Script" -d boot.cmd boot.scr.uimg The boot.cmd file is an example script and can be modified based on needs. bootargs is set in this script and root uses the default value " /dev/mmcblk1p2 rootwait rw" which can be changed by overriding mmcroot. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Alice Guo <alice.guo@nxp.com>
2021-01-23imx8mm: configs: add support for distro boot commandsAlice Guo
Supported boot device types in iMX8MM: MMC, DHCP. CONFIG_CMD_PART is added for command part and CONFIG_CMD_FS_GENERIC is for command fstype. CONFIG_BOOTCOMMAND which is defined in include/configs/imx8mm_evk.h is deleted because "run distro_bootcmd" is required to be the default boot mode. scriptaddr is the location in RAM where boot.scr.uimg/boot.scr will be loaded to prior to execution. kernel_addr_r is the location in RAM where the kernel will be loaded to. Delete unnecessary environment variables. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Alice Guo <alice.guo@nxp.com>
2021-01-23imx: timer: Modify GPT timer driver for mx7Ye Li
Modify the GPT common platform driver for mx7 which only use 24Mhz OSC as clock source. Note: at default, the mx7d will use system counter as timer. The GPT is disabled. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx8m: add QSPI boot devPeng Fan
When boot type could not be detected from rom sw info, read sbmr1 to detect, here we only use it to detect FLEXSPI boot, because ROM not update it in rom sw info. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx6: Remove AHCI device before boot OSYe Li
Since we remove SATA device before boot OS, when AHCI is enabled, update the codes to remove AHCI device. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: Fix market segment fuse offset on iMX8MPYe Li
iMX8MP has shifted market segment fuse one bit from 0x440 [7:6] to [6:5], correct it in imx common codes. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23nandbcb: nand support for i.MX8MPHan Xu
Add NAND boot support for i.MX8MP by adding i.MX8MP in nandbcb support list, reading boot_search_count from fuse. i.MX8MN NAND boot is same as i.MX8MP, fix some issues as well. Signed-off-by: Han Xu <han.xu@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: nandbcb: Fix potential overflow in nandbcb_set_boot_configYe Li
Fix Coverity Issue 9006656. In nandbcb_set_boot_config, an integer overflow occurs, with the result converted to a wider integer type. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: nandbcb: Fix potential overflow in fill_dbbt_dataYe Li
Fix Coverity Issue 9006658. In fill_dbbt_data, an integer overflow occurs, with the result converted to a wider integer type Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: nandbcb: Fix resource leak in read_fcbYe Li
Fix Coverity Issue 9006657. In read_fcb, leak of memory to system resource "fcb_raw_page". Adjust the sequence to check the mtd bad block prior than allocation of "fcb_raw_page", also check the NULL return of allocation. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: nandbcb: Fix resource leakYe Li
Fix Coverity Issue 9006655. In write_fcb, leak of memory to resource "fcb_raw_page". Since we have initialized the "ret" to 0, should return the value of ret. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23nandbcb: Fix uninitialized variableYe Li
Fix Coverity Issue 9006654. In write_fcb, use of an uninitialized variable "ret". Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: imx8mn/p: drop CONFIG_SYS_[I,D]CACHE_OFFPeng Fan
Drop CONFIG_SYS_[I,D]CACHE_OFF, it is safe to run with caches enabled on these platforms. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx8m: lowlevel_init: tune alignmentPeng Fan
The minimum alignment is 16 bytes, so use align 4 is enough. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23arm: dts: imx8mq: sync dts from Linux KernelPeng Fan
Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23arm: dts: imx8mm: sync dts from Linux KernelPeng Fan
Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23arm: dts: imx8mp: sync dts from Linux KernelPeng Fan
Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx8m: clock: add type of set_clk_eqosPeng Fan
Add type of set_clk_eqos to make it could be used by other files. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23arm: dts: imx8mn: sync dts from Linux KernelPeng Fan
Sync dts from Linux Kernel commit f838f8d2b694cf9d524dc("mfd: ab8500-debugfs: Remove extraneous seq_putc") Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: imx8mn_evk: correct stack/malloc adressPeng Fan
Move SP to end of OCRAM space. Drop MALLOC_F to make it alloc from stack space. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: ddr: imx8m: Move selfref_en after DDR scrubYe Li
When doing DDR scrub, the DDR may enter into self refresh if the selfref_en is enabled before DDR scrub. This will cause scrub can't complete that SBRSTAT.scrub_done won't be set. Since the selfref_en can be programmed during the course of normal operation, move it after DDR scrub Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: imx8mn_ddr4_evk: Use CONFIG_TARGET_IMX8MN_DDR4_EVK for DDR4 EVK boardPeng Fan
use CONFIG_TARGET_IMX8MN_DDR4_EVK for DDR4 EVK board, we will use CONFIG_TARGET_IMX8MN_EVK for LPDDR4 EVK board. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-23imx: imx8mp_evk: enable eth supportPeng Fan
Add board code to configure the network interface Add net defconfig Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-01-21Merge tag 'u-boot-rockchip-20210121' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip - New board: rk3328 NanoPi R2S board; - Fix init voltage for some rk3399 boards; - enable rng for rk3399 by default; - set default to SPI bus 1 for SPI-flash for some board; - add dwc PCIe controller driver on rockchip platform;
2021-01-21pci: Add Rockchip dwc based PCIe controller driverShawn Lin
Add Rockchip dwc based PCIe controller driver for rk356x platform. Driver support Gen3 by operating as a Root complex. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2021-01-21phy: rockchip: Add Rockchip Synopsys PCIe 3.0 PHYShawn Lin
Add the Rockchip Synopsys based PCIe 3.0 PHY driver as part of Generic PHY framework. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2021-01-21rockchip: rk3328: Add support for FriendlyARM NanoPi R2SDavid Bauer
This adds support for the NanoPi R2S from FriendlyArm. Rockchip RK3328 SoC 1GB DDR4 RAM Gigabit Ethernet (WAN) Gigabit Ethernet (USB3) (LAN) USB 2.0 Host Port MicroSD slot Reset button WAN - LAN - SYS LED Signed-off-by: David Bauer <mail@david-bauer.net> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2021-01-21configs: rk3399: enable rng on firefly/rock960/rockpro64Peter Robinson
Enable the RNG on the Firefly, rock960 and RockPro64 devices to enable KASLR on devices that support it. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Cc: Akash Gajjar <akash@openedev.com> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2021-01-21arm: dts: rockchip: rk3399: enable rng at the SoC levelPeter Robinson
The rng is embedded in the SoC so enable it in the device tree universally, the use of it can be controlled by enabling/disabling at the device config level. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Cc: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2021-01-21rockchip: leez-rk3399: Provide init voltageKever Yang
Add missing regulator-init-microvolt property to vdd_log regulator. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2021-01-21rockchip: firefly-rk3399: Provide init voltageKever Yang
Add missing regulator-init-microvolt property to vdd_log regulator. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2021-01-21rockchip: evb-rk3399: Provide init voltageKever Yang
Add missing regulator-init-microvolt property to vdd_center regulator. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2021-01-21rockchip: puma-haikou: default to SPI bus 1 for SPI-flashHugh Cole-Baker
SPI flash on this machine is located on bus 1, default to using bus 1 for SPI flash and stop aliasing it to bus 0. Formerly the alias spi1 pointed to &spi5, use an alias spi5 for this instead. Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com> Suggested-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2021-01-21rockchip: rk3399-roc-pc: default to SPI bus 1 for SPI-flashHugh Cole-Baker
SPI flash on this board is located on bus 1, default to using bus 1 for SPI flash on both rk3399-roc-pc and -mezzanine, and stop aliasing it to bus 0. Signed-off-by: Hugh Cole-Baker <sigmaris@gmail.com> Suggested-by: Simon Glass <sjg@chromium.org> Fixes: c4cea2bb ("rockchip: Enable building a SPI ROM image on bob") Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
2021-01-20Merge branch '2021-01-20-fs-fixes'Tom Rini
- Minor SquashFS, BTRFS ubifs fixes
2021-01-20ubifs: do not decide upon uninitialized variableHeinrich Schuchardt
Before 'if (err)' we have to initialize the variable otherwise we use a random value from the stack. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-01-20fs: btrfs: simplify close_ctree_fs_info()Heinrich Schuchardt
At the beginning of close_ctree_fs_info() the value 0 is assigned to err and never changed before testing it. Let's get rid of the superfluous variable. Fixes: f06bfcf54d0e ("fs: btrfs: Crossport open_ctree_fs_info() from btrfs-progs") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Qu Wenruo <wqu@suse.com>
2021-01-20Fix squashfs failing to load sparse filesCampbell Suter
SquashFS supports sprase blocks in files - that is, if a given block is composed only of zeros, it's not written to the output file to save space and it's on-disk length field is set to zero to indicate that. Previously the squashfs driver did not recognise that, and would attempt to read and decompress a zero-sized block, which obviously failed. The following command may be used to create a file for testing: cat <(dd if=/dev/urandom of=/dev/stdout bs=1M count=1) \ <(dd if=/dev/zero of=/dev/stdout bs=1M count=1) \ <(dd if=/dev/urandom of=/dev/stdout bs=1k count=200) >test_file Signed-off-by: Campbell Suter <campbell@snapit.group>
2021-01-20fs: btrfs: volumes: prevent overflow for multiplyingQu Wenruo
In __btrfs_map_block() we do a int * int and assign it to u64. This is not safe as the result (int * int) is still evaluated as (int) thus it can overflow. Convert one of the multiplier to u64 to prevent such problem. In real world, this should not cause problem as we have device number limit thus it won't go beyond 4G for a single stripe. But it's harder to teach coverity about all these hidden limits, so just fix the possible overflow. Reported-by: Coverity CID 312957 Reported-by: Coverity CID 312948 Signed-off-by: Qu Wenruo <wqu@suse.com>