platform/kernel/u-boot.git
4 years agopico-imx6ul: Add LCD support
Fabio Estevam [Tue, 10 Sep 2019 01:23:39 +0000 (22:23 -0300)]
pico-imx6ul: Add LCD support

Add support for the VXT VL050-8048NT-C01 panel connected through
the 24 bit parallel LCDIF interface.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
4 years agopico-imx6ul: Increase the CONFIG_ENV_OFFSET size
Fabio Estevam [Thu, 12 Sep 2019 14:15:54 +0000 (11:15 -0300)]
pico-imx6ul: Increase the CONFIG_ENV_OFFSET size

U-Boot binary has grown in such a way that it goes beyond the reserved
area for the environment variables.

Running "saveenv" causes U-Boot to hang because of this overlap.

Fix this problem by increasing the CONFIG_ENV_OFFSET size.

Also, in order to prevent this same problem in the future, use
CONFIG_BOARD_SIZE_LIMIT, which will detect the overlap in build-time.

CONFIG_BOARD_SIZE_LIMIT does not accept math expressions, so declare
CONFIG_ENV_OFFSET with its direct value instead.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
4 years agopico-imx6ul: Add DWARF baseboard support
Otavio Salvador [Sun, 7 Apr 2019 19:43:02 +0000 (16:43 -0300)]
pico-imx6ul: Add DWARF baseboard support

This add the boot menu option for the DWARF baseboard as well as a
specific config file for users which wish to use it as a pre-defined
board.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
4 years agoRevert "habv4: tools: Avoid hardcoded CSF size for SPL targets"
Stefano Babic [Fri, 13 Sep 2019 16:53:03 +0000 (18:53 +0200)]
Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets"

This reverts commit 62a52f3f85bf33e286632e99f0d39b2c166af0c4.

4 years agohabv4: tools: Avoid hardcoded CSF size for SPL targets
Breno Matheus Lima [Thu, 18 Jul 2019 12:34:15 +0000 (12:34 +0000)]
habv4: tools: Avoid hardcoded CSF size for SPL targets

Currently it's not possible to authenticate the U-Boot proper of
mx6ul_14x14_evk_defconfig target:

Authenticate image from DDR location 0x877fffc0...
bad magic magic=0x0 length=0x00 version=0x3
bad length magic=0x0 length=0x00 version=0x3
bad version magic=0x0 length=0x00 version=0x3
spl: ERROR:  image authentication fail

Commit 0633e134784a ("imx: hab: Increase CSF_SIZE for i.MX6 and
i.MX7 devices") has increased CSF_SIZE to avoid a possible issue
when booting encrypted boot images.

Commit d21bd69b6e95 ("tools: mkimage: add firmware-ivt image type
for HAB verification") is hardcoding the CSF and IVT sizes, the
new CSF size is not being considered and u-boot-ivt.img fails to
boot.

Avoid hardcoded CSF and IVT size to fix this issue.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx8: cpu: fix mac fuse word for i.MX8QM
Peng Fan [Mon, 26 Aug 2019 08:12:23 +0000 (08:12 +0000)]
imx8: cpu: fix mac fuse word for i.MX8QM

i.MX8QM does not share same FUSE MAC word index, so update the word
index for i.MX8QM.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8: move i.MX8 cpu desc code to drivers/cpu/imx8_cpu.c
Peng Fan [Mon, 26 Aug 2019 08:12:19 +0000 (08:12 +0000)]
imx8: move i.MX8 cpu desc code to drivers/cpu/imx8_cpu.c

Move cpu desc code to cpu driver directory and name it imx8_cpu.c
No functional change.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: scu_api: add sc_pm_is_partition_started
Peng Fan [Mon, 26 Aug 2019 08:12:16 +0000 (08:12 +0000)]
imx: scu_api: add sc_pm_is_partition_started

Add sc_pm_is_partition_started to check whether a partition
has been started. This will be used to detect M4 partition booted up or
not, then we could choose which dtb to use. If M4 is up, we need
use dtb, such as imx8qm-mek-rpmsg.dtb.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8: fdt: add optee node
Peng Fan [Mon, 26 Aug 2019 08:12:13 +0000 (08:12 +0000)]
imx8: fdt: add optee node

Add OP-TEE device tree node for Linux according to args passed from ATF.
If ATF has been built with OP-TEE running, boot_pointer[1] will indicate
that.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8: save args passed from ATF
Peng Fan [Mon, 26 Aug 2019 08:12:09 +0000 (08:12 +0000)]
imx8: save args passed from ATF

We use information from ATF to know whether OP-TEE is running or not.
So save args passed from ATF.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8: fdt: configure sid for masters
Peng Fan [Mon, 26 Aug 2019 08:12:06 +0000 (08:12 +0000)]
imx8: fdt: configure sid for masters

On i.MX8QM, sid is programmable, so we could program sid according the
value encoded in device tree.

This patch support legacy bindings which are still being used by XEN
and new bindings used by Linux Kernel.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: scu_api: add sc_rm_set_master_sid
Peng Fan [Mon, 26 Aug 2019 08:12:03 +0000 (08:12 +0000)]
imx: scu_api: add sc_rm_set_master_sid

Add sc_rm_set_master_sid to set stream sid of masters to make
sure they could use smmu.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoconfigs: imx8qm/qxp_mek: enable CONFIG_OF_SYSTEM_SETUP
Peng Fan [Mon, 26 Aug 2019 08:12:00 +0000 (08:12 +0000)]
configs: imx8qm/qxp_mek: enable CONFIG_OF_SYSTEM_SETUP

Enable CONFIG_OF_SYSTEM_SETUP to let U-Boot could disable
device tree nodes that could not be used by Linux.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8: disable node when the resource is not owned
Peng Fan [Mon, 26 Aug 2019 08:11:56 +0000 (08:11 +0000)]
imx8: disable node when the resource is not owned

When resource is not assigned to non-secure Linux, if linux continue
to use the node, linux may crash or hang. So need to set the node
status to disabled for not owned resources.

The resource id is in the power-domains property in device tree,
so parse the power-domains property to get the resource id and
use scfw api to check whether it is owned by current partition.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8qm: correct fdt_file
Peng Fan [Mon, 26 Aug 2019 08:11:53 +0000 (08:11 +0000)]
imx8qm: correct fdt_file

imx8qm-mek.dtb is the correct fdt file, not fsl-imx8qxp-mek.dtb

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8qm: power up SMMU
Peng Fan [Mon, 26 Aug 2019 08:11:49 +0000 (08:11 +0000)]
imx8qm: power up SMMU

There is SMMU in i.MX8QM. To use SMMU in Linux, need power up it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: sys_proto: add is_imx8qm helper
Peng Fan [Mon, 26 Aug 2019 08:11:46 +0000 (08:11 +0000)]
imx: sys_proto: add is_imx8qm helper

Add is_imx8qm helper which could be used by SoC and Driver code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8: Probe the SCU driver by using uclass function
Ye Li [Mon, 26 Aug 2019 08:11:42 +0000 (08:11 +0000)]
imx8: Probe the SCU driver by using uclass function

Since SCU MU driver has been bound in dm_init, so we don't need to
bind it again. Just replace by using uclass function to probe it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agodoc: imx: mkimage: introduce i.MX8 image format
Peng Fan [Thu, 22 Aug 2019 07:42:49 +0000 (07:42 +0000)]
doc: imx: mkimage: introduce i.MX8 image format

Introduce i.MX8 container set configuration file and add example

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8qm_mek: switch to use container image
Peng Fan [Thu, 22 Aug 2019 07:42:46 +0000 (07:42 +0000)]
imx8qm_mek: switch to use container image

Because FIT could not be used for AHAB secure boot on i.MX8,
so switch to use container image that could let SPL verify
ATF and U-Boot with AHAB.

Enable HUSH_PARSER in defconfig to make run netboot could work.

Note: The AHAB related code has not been added.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8qxp_mek: switch to use container image
Peng Fan [Thu, 22 Aug 2019 07:42:43 +0000 (07:42 +0000)]
imx8qxp_mek: switch to use container image

Because FIT could not be used for AHAB secure boot on i.MX8,
so switch to use container image that could let SPL verify
ATF and U-Boot with AHAB.

Note: The AHAB related code has not been added.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: add container target
Peng Fan [Thu, 22 Aug 2019 07:42:41 +0000 (07:42 +0000)]
imx: add container target

To support SPL loading container file, add a new Makefile target,
and introduce a new Kconfig file to source the cfg file which
will be parsed by mkimage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agospl: mmc: support loading i.MX container format file
Peng Fan [Thu, 22 Aug 2019 07:42:38 +0000 (07:42 +0000)]
spl: mmc: support loading i.MX container format file

i.MX8 only support AHAB secure boot with Container format image,
we could not use FIT to support secure boot, so introduce container
support to let SPL could load container images.

Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx8: support parsing i.MX8 Container file
Peng Fan [Thu, 22 Aug 2019 07:42:33 +0000 (07:42 +0000)]
imx8: support parsing i.MX8 Container file

Add parsing i.MX8 Container file support, this is to let
SPL could load images in a container file to destination address.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: imx8qxp_mek: fix CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
Peng Fan [Wed, 21 Aug 2019 08:28:15 +0000 (08:28 +0000)]
imx: imx8qxp_mek: fix CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR

The first stage of flash.bin is larger than 584 * 512, so when
writting u-boot.itb, some data will be override. Enlarge the
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to fix boot.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: imx6qdl: dtsi: move U-Boot specific change to u-boot.dtsi
Peng Fan [Wed, 14 Aug 2019 09:27:06 +0000 (09:27 +0000)]
imx: imx6qdl: dtsi: move U-Boot specific change to u-boot.dtsi

The changes were added by following patch:
commit <9002e735e717> ("imx: mx6sabresd: fix boot hang with video")
commit <f45ec8fcfb86> ("imx6: dts: add 'u-boot, dm-pre-reloc' to soc and ipu nodes")

Let's move the U-Boot specific change to imx6qdl-u-boot.dtsi

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: mx6sabresd: fix usb start when DM enabled
Peng Fan [Wed, 14 Aug 2019 09:13:04 +0000 (09:13 +0000)]
imx: mx6sabresd: fix usb start when DM enabled

Enable CONFIG_DM_REGULATOR_FIXED to let vbus regulator work.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: configs: Cleanup CONFIG_SECURE_BOOT comments
Breno Matheus Lima [Thu, 18 Jul 2019 12:34:30 +0000 (12:34 +0000)]
imx: configs: Cleanup CONFIG_SECURE_BOOT comments

Since commit 6e1f4d2652e7 ("arm: imx-common: add SECURE_BOOT option
to Kconfig") the SECURE_BOOT option is selected through Kconfig.

Cleanup comments in code to align with this change.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx6: spl: Reduce SPL limit size in case CONFIG_SECURE_BOOT is enabled
Breno Matheus Lima [Thu, 18 Jul 2019 12:34:23 +0000 (12:34 +0000)]
imx6: spl: Reduce SPL limit size in case CONFIG_SECURE_BOOT is enabled

In case CONFIG_SECURE_BOOT is enabled we need to limit the SPL size to
avoid a possible HAB failure event:

--------- HAB Event 1 -----------------
event data:
        0xdb 0x00 0x14 0x42 0x33 0x22 0x33 0x00
        0x00 0x00 0x00 0x0f 0x00 0x90 0x70 0x00
        0x00 0x01 0x10 0x00
STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ADDRESS (0x22)
CTX = HAB_CTX_TARGET (0x33)
ENG = HAB_ENG_ANY (0x00)

As explained in Commit 23612534fe0f ("spl: imx6: Provide a SPL_SIZE_LIMIT
default") the i.MX6 SPL size limit is 68KB.

The ROM code is copying the image size defined in boot data to its
respective load address, in case we exceed the OCRAM free region a
HAB invalid address failure event is generated.

The maximum CSF size is defined in CONFIG_CSF_SIZE, reduce SPL size
limit based on this configuration.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoKconfig: Migrate CONFIG_CSF_SIZE to Kconfig
Breno Matheus Lima [Thu, 18 Jul 2019 12:34:08 +0000 (12:34 +0000)]
Kconfig: Migrate CONFIG_CSF_SIZE to Kconfig

Move CONFIG_CSF_SIZE to Kconfig and define default value as 0x4000.

mx8mqevk requires 0x2000 add this configuration in imx8mq_evk_defconfig
file.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agomx6sabresd: Reduce overall SPL size
Fabio Estevam [Tue, 23 Jul 2019 15:20:46 +0000 (12:20 -0300)]
mx6sabresd: Reduce overall SPL size

Currently the SPL binary is 67 kB, which leaves only 1 kB of free
internal RAM space.

The following options can be safely removed to save some precious
SPL space:

- CONFIG_SPL_FS_EXT4: u-boot-dtb.img is stored in raw sector via dd
command (at offset 69 kB)
- CONFIG_SPL_I2C_SUPPORT: I2C is not used during SPL
- CONFIG_SPL_OS_BOOT: no need to make Falcon mode supported
by default

After this change the SPL binary size gets down to 51 kB.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Change clock rate calculation for NIC1 BUS and EXT
Ye Li [Mon, 22 Jul 2019 01:25:10 +0000 (01:25 +0000)]
i.MX7ULP: Change clock rate calculation for NIC1 BUS and EXT

On i.MX7ULP B0, there is change in NIC clock dividers architecture.
On A0, the NIC1 BUS and EXT dividers were in a chain with NIC1 DIV, but
on B0 they are parallel with NIC1 DIV. So now the dividers are independent.
This patch modifies the scg_nic_get_rate function according to this change.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Set A7 core frequency to 500Mhz for B0 chip
Ye Li [Mon, 22 Jul 2019 01:25:08 +0000 (01:25 +0000)]
i.MX7ULP: Set A7 core frequency to 500Mhz for B0 chip

The normal target frequency for ULP A7 core is 500Mhz, but now ROM
set the core frequency to 413Mhz. So change it to 500Mhz in u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Add CPU revision check for B0
Peng Fan [Mon, 22 Jul 2019 01:25:05 +0000 (01:25 +0000)]
i.MX7ULP: Add CPU revision check for B0

Since there is no register for CPU revision, we use ROM version to
check the A0 or B0 chip.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Workaround APLL PFD2 to 345.6Mhz
Ye Li [Mon, 22 Jul 2019 01:25:03 +0000 (01:25 +0000)]
i.MX7ULP: Workaround APLL PFD2 to 345.6Mhz

The GPU uses APLL PFD2 as its clock parent (483.84Mhz) with divider
set to 1. This frequecy is out of ULP A0 spec. The MAX rate for GPU
is 350Mhz. So we simply configure the APLL PFD2 to 345.6Mhz (FRAC=28)
to workaround the problem. The correct fix should let GPU handle the
clock rate in kernel.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Fix SPLL/APLL clock rate calculation issue
Ye Li [Mon, 22 Jul 2019 01:25:00 +0000 (01:25 +0000)]
i.MX7ULP: Fix SPLL/APLL clock rate calculation issue

The num/denom is a float value, but in the calculation it is convert
to integer 0, and cause the result wrong.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: evk: Enable fuse comamnd
Peng Fan [Mon, 22 Jul 2019 01:24:57 +0000 (01:24 +0000)]
i.MX7ULP: evk: Enable fuse comamnd

Enable fuse command

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agomisc: Kconfig: make i.MX7ULP could use MXC_OCOTP
Peng Fan [Mon, 22 Jul 2019 01:24:55 +0000 (01:24 +0000)]
misc: Kconfig: make i.MX7ULP could use MXC_OCOTP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Fix wrong i2c configuration name
Ye Li [Mon, 22 Jul 2019 01:24:53 +0000 (01:24 +0000)]
i.MX7ULP: Fix wrong i2c configuration name

Wrong I2c driver configuration name is used in codes, so I2c driver is
not built. Correct it.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Add CONFIG_MX7ULP to kconfig
Ye Li [Mon, 22 Jul 2019 01:24:50 +0000 (01:24 +0000)]
i.MX7ULP: Add CONFIG_MX7ULP to kconfig

Since many drivers need this CONFIG_MX7ULP to distiguish the settings
for i.MX7ULP only. Add this entry to cpu's kconfig.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Fix PCC register bits mask and offset issue
Ye Li [Mon, 22 Jul 2019 01:24:47 +0000 (01:24 +0000)]
i.MX7ULP: Fix PCC register bits mask and offset issue

The offset for FRAC and the mask for PCD are not correct.
If we set FRAC, we can't get the right frequency. Fix them
to correct value.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Correct the clock index
Bai Ping [Mon, 22 Jul 2019 01:24:45 +0000 (01:24 +0000)]
i.MX7ULP: Correct the clock index

On i.MX7ULP, value zero is reserved in SCG1 RCCR register,
so the val should be decreased by 1 to get the correct clock
source index.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: Fix system reset after a7 rtc alarm expired.
Bai Ping [Mon, 22 Jul 2019 01:24:42 +0000 (01:24 +0000)]
i.MX7ULP: Fix system reset after a7 rtc alarm expired.

The board will reboot if A7 core enter mem mode by rtc, then M4 core
enter VLLS mode after the RTC alarm expired. Enable the dumb PMIC mode
to fix this issue.
Since i.MX7ULP B0 moves the SNVS LP into M4 domain, A core can't access
it. So check the CPU rev and not apply the settings for B0.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoi.MX7ULP: evk: Modify FDT file to disable SD3.0 for usb boot
Peng Fan [Mon, 22 Jul 2019 01:24:39 +0000 (01:24 +0000)]
i.MX7ULP: evk: Modify FDT file to disable SD3.0 for usb boot

Since the SD3.0 kernel driver needs M4 image support, this causes
problem for usb boot booting into kernel.  To decouple the relationship,
we modify the FDT file in u-boot to disable SD3.0.
So the kernel won't depend on M4 image.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: i.MX7ULP: add get_boot_device
Peng Fan [Mon, 22 Jul 2019 01:24:37 +0000 (01:24 +0000)]
imx: i.MX7ULP: add get_boot_device

Add get_boot_device for i.MX7ULP

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
4 years agoconfigs: nitrogen6x: Add DM_SPI/DM_SPI_FLASH support
Troy Kisky [Mon, 29 Jul 2019 19:15:58 +0000 (12:15 -0700)]
configs: nitrogen6x: Add DM_SPI/DM_SPI_FLASH support

Add CONFIG_DM_SPI/CONFIG_DM_SPI_FLASH to all defconfigs whose board is
    nitrogen6x.

    mx6qsabrelite_defconfig
    nitrogen6dl2g_defconfig
    nitrogen6dl_defconfig
    nitrogen6q2g_defconfig
    nitrogen6q_defconfig
    nitrogen6s1g_defconfig

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
4 years agoconfigs: nitrogen6x: Add DM_GPIO support
Troy Kisky [Mon, 29 Jul 2019 19:15:57 +0000 (12:15 -0700)]
configs: nitrogen6x: Add DM_GPIO support

Add CONFIG_DM_GPIO to all defconfigs whose board is
nitrogen6x.

mx6qsabrelite_defconfig
nitrogen6dl2g_defconfig
nitrogen6dl_defconfig
nitrogen6q2g_defconfig
nitrogen6q_defconfig
nitrogen6s1g_defconfig

This is in preparation for adding CONFIG_DM_SPI.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
4 years agonitrogen6x: reserve used gpios
Troy Kisky [Mon, 29 Jul 2019 19:15:56 +0000 (12:15 -0700)]
nitrogen6x: reserve used gpios

This prevents messages like
gpio@20a0000: get_value: error: gpio GPIO2_2 not reserved

when CONFIG_DM_GPIO is enabled.

Also, when CONFIG_DM_GPIO is enabled, checkboard is too
early to use gpio_get_value, so read it directly on failure.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
4 years agoconfigs: nitrogen6x: Add DM_MMC/DM_USB/AHCI support
Troy Kisky [Mon, 29 Jul 2019 19:15:55 +0000 (12:15 -0700)]
configs: nitrogen6x: Add DM_MMC/DM_USB/AHCI support

Add DM_MMC to all defconfigs whose board is
nitrogen6x.

mx6qsabrelite_defconfig
nitrogen6dl2g_defconfig
nitrogen6dl_defconfig
nitrogen6q2g_defconfig
nitrogen6q_defconfig
nitrogen6s1g_defconfig

This commit is adding multiple configs, but
seems to be the minimum change to not lose features
and still compile fine.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
4 years agonitrogen6x: migrate to using device tree
Troy Kisky [Mon, 29 Jul 2019 19:15:54 +0000 (12:15 -0700)]
nitrogen6x: migrate to using device tree

Migrate to using device tree required for further driver model
integration.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
4 years agoARM: imx: Support larger SPL size on IMX6DQ
Robert Hancock [Thu, 8 Aug 2019 18:14:39 +0000 (12:14 -0600)]
ARM: imx: Support larger SPL size on IMX6DQ

Previously the SPL size on all iMX6 platforms was restricted to 68KB
because the OCRAM size on iMX6SL/DL parts is only 128KB. However, the
other iMX6 variants have 256KB of OCRAM. Add an option
CONFIG_MX6_OCRAM_256KB which allows using the full size on boards which
don't need to support the SL/DL variants. This allows for an SPL size of
196KB, which makes it much easier to use configurations such as SPL with
driver model and FDT control.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Tested-by: Adam Ford <aford173@gmail.com> #imx6q_logic
4 years agospl: imx: only use HAB if spl fit signature is not enabled
Ricardo Salveti [Mon, 2 Sep 2019 21:18:52 +0000 (18:18 -0300)]
spl: imx: only use HAB if spl fit signature is not enabled

There is no need to use HAB for FIT signature validation when
SPL_FIT_SIGNATURE is also enabled, as that will be validated via the
normal U-Boot signed FIT image flow.

This allows having SPL validated by HAB and the payloads to follow
being validated with FIT signatures only.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: apalis_imx6: select MX6Q via Kconfig
Ricardo Salveti [Mon, 2 Sep 2019 21:26:15 +0000 (18:26 -0300)]
imx: apalis_imx6: select MX6Q via Kconfig

Toradex Apalis iMX6 modules are available in the iMX6D and iMX6Q
variants, which are quite similar and already managed via only one
dtb in u-boot (imx6-apalis.dtb). Select MX6Q via Kconfig by default in
order to automatically enable the HAS_CAAM and MX6_SMP features.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoapalis_imx6: fix broken fsl_esdhc_imx conversion
Ricardo Salveti [Mon, 2 Sep 2019 21:12:02 +0000 (18:12 -0300)]
apalis_imx6: fix broken fsl_esdhc_imx conversion

Commit e37ac717d796 ("Convert to use fsl_esdhc_imx for i.MX platforms")
converted FSL_ESDHC to FSL_ESDHC_IMX, but the config check for
apalis_imx6 wasn't updated accordantly.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoapalis_imx6: add board_fit_config_name_match to support FIT in SPL
Ricardo Salveti [Mon, 2 Sep 2019 21:23:27 +0000 (18:23 -0300)]
apalis_imx6: add board_fit_config_name_match to support FIT in SPL

Only one dtb is currently supported, so match with imx6-apalis.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
4 years agoarm: dts: imx: fsl-imx8qm.dtsi: add gpio aliases to fix gpio command
Peng Fan [Wed, 24 Jul 2019 08:53:08 +0000 (08:53 +0000)]
arm: dts: imx: fsl-imx8qm.dtsi: add gpio aliases to fix gpio command

The gpio command currently uses equal bank names "GPIO0_"
for all existing gpio banks, i. e.:

U-Boot# gpio status -a
Bank GPIO0_:
GPIO0_0: input: 0 [ ]
GPIO0_1: input: 0 [ ]
...

Bank GPIO0_:
GPIO0_0: input: 0 [ ]
GPIO0_1: input: 0 [ ]
    ...

So the command is broken, it is not possible to address
a desired bank. Add gpio aliases to fix this.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
4 years agospl: pass args to board_return_to_bootrom
Peng Fan [Wed, 7 Aug 2019 06:40:53 +0000 (06:40 +0000)]
spl: pass args to board_return_to_bootrom

Pass spl_image and bootdev to board_return_bootrom.
i.MX8MN needs the args to let ROM to load images

Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
4 years agoserial: Kconfig: make MXC_UART usable for MX7 and IMX8M
Peng Fan [Wed, 7 Aug 2019 06:49:39 +0000 (06:49 +0000)]
serial: Kconfig: make MXC_UART usable for MX7 and IMX8M

i.MX7 and i.MX8M use mxc uart driver, so let's make the SoC could
use MXC_UART kconfig.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
4 years agotools: imx8mimage: fix HDMI/FIT parsing
Peng Fan [Tue, 6 Aug 2019 10:07:26 +0000 (10:07 +0000)]
tools: imx8mimage: fix HDMI/FIT parsing

Add missed break for HDMI entry.
And moving FIT parsing earlier, because it does not have parameter,
it will not runs into CFG_REG_SIZE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
4 years agopinctrl: imx: use devfdt_get_addr_size_index
Peng Fan [Tue, 6 Aug 2019 10:05:48 +0000 (10:05 +0000)]
pinctrl: imx: use devfdt_get_addr_size_index

fdtdec_get_addr_size could not parse addr/size correctly is
using address-cells 2 and size-cells 2 on an ARM32 SoC.
So switch to use devfdt_get_addr_size_index.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: mx6slevk: enable DM_SPI and DM_SPI_FLASH
Peng Fan [Wed, 31 Jul 2019 08:30:02 +0000 (08:30 +0000)]
imx: mx6slevk: enable DM_SPI and DM_SPI_FLASH

With DM_SPI and DM_SPI_FLASH enabled, we could get:

spi          0  [   ]   mxc_spi               |   |   |   `-- ecspi@02008000
spi_flash    0  [   ]   spi_flash_std         |   |   |       `-- m25p80@0

Signed-off-by: Peng Fan <peng.fan@nxp.com>
4 years agoimx: mx6ul_14x14_evk: convert to DM_VIDEO
Peng Fan [Thu, 1 Aug 2019 06:02:49 +0000 (06:02 +0000)]
imx: mx6ul_14x14_evk: convert to DM_VIDEO

To support DM_VIDEO,
 Add display node for lcdif
 Drop board iomuxc settings.
 Enable DM_VIDEO

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
4 years agoimx: mx6ul_14x14_evk: Fix SPL boot
Peng Fan [Thu, 1 Aug 2019 06:02:41 +0000 (06:02 +0000)]
imx: mx6ul_14x14_evk: Fix SPL boot

When booting SPL on the board, met boot failure:
"
Trying to boot from MMC2
MMC Device 1 not found
spl: could not find mmc device 1. error: -19
SPL: failed to boot from all boot devices
"

Let's register the two mmc controllers in SPL stage to
avoid boot failure.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: add i.MX6ULZ board
Peng Fan [Thu, 8 Aug 2019 09:55:57 +0000 (09:55 +0000)]
imx: add i.MX6ULZ board

Add i.MX6ULZ board support. the i.MX6ULZ is SW compatible
with i.MX6ULL. so most code of i.MX6ULL can be reused
by i.MX6ULZ.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoimx: add i.MX6ULZ cpu type
Peng Fan [Thu, 8 Aug 2019 09:55:52 +0000 (09:55 +0000)]
imx: add i.MX6ULZ cpu type

Add i.MX6ULZ cpu type and helper.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoarm: dts: import dts for i.MX6ULZ
Peng Fan [Thu, 8 Aug 2019 09:55:47 +0000 (09:55 +0000)]
arm: dts: import dts for i.MX6ULZ

Import kernel dts for i.MX6ULZ from
commit <0a8ad0ffa4d8> ("Merge tag 'for-linus-5.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux")

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoarm: dts: sync dts for i.MX6ULL
Peng Fan [Thu, 8 Aug 2019 09:55:37 +0000 (09:55 +0000)]
arm: dts: sync dts for i.MX6ULL

Sync kernel dts for i.MX6ULL from
commit <0a8ad0ffa4d8> ("Merge tag 'for-linus-5.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux")

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoarm: dts: sync dts for i.MX6UL
Peng Fan [Thu, 8 Aug 2019 09:55:33 +0000 (09:55 +0000)]
arm: dts: sync dts for i.MX6UL

Sync kernel dts for i.MX6UL from
commit <0a8ad0ffa4d8> ("Merge tag 'for-linus-5.3-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux")

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
4 years agoPrepare v2019.10 v2019.10
Tom Rini [Mon, 7 Oct 2019 21:14:02 +0000 (17:14 -0400)]
Prepare v2019.10

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoNET: DW: fix regression for ARC boards
Eugeniy Paltsev [Mon, 7 Oct 2019 16:10:50 +0000 (19:10 +0300)]
NET: DW: fix regression for ARC boards

The commit
642b80d256e ("net: designware: drop compatible altr, socfpga-stmmac")
breaks designware ethernet for all ARC boards. It removes
"altr, socfpga-stmmac" compatible from "drivers/net/designware.c"
without changing compatible in the boards which use it.

Fix that by adding "snps,arc-dwmac-3.70a" compatible string to
"drivers/net/designware.c" and using it in ARC boards device tree.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
4 years agoMerge branch '2019-10-06-master-imports'
Tom Rini [Sun, 6 Oct 2019 22:02:18 +0000 (18:02 -0400)]
Merge branch '2019-10-06-master-imports'

- Regression work-around on SoCFPGA by disabling WDT in some cases.
- Fix seg fault on 'host info' in some cases.

4 years agocmd: host: fix seg fault at "host info"
AKASHI Takahiro [Thu, 22 Aug 2019 07:47:39 +0000 (16:47 +0900)]
cmd: host: fix seg fault at "host info"

With the patch below applied, host_block_dev structure was switched
to be placed in platdata rather than priv. The command "host info"
must be aligned with this change. Otherwise, we will see "Segmentation
Fault."

Fixes: 8f994c860d91 ("sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
4 years agoMAINTAINERS: Update my email address
Maxime Ripard [Thu, 3 Oct 2019 16:32:11 +0000 (18:32 +0200)]
MAINTAINERS: Update my email address

I'm not at bootlin anymore, and my mail address doesn't work any longer.

Signed-off-by: Maxime Ripard <mripard@kernel.org>
4 years agoarm: socfpga: disable CONFIG_SPL_WDT for gen5 and a10
Simon Goldschmidt [Sat, 5 Oct 2019 20:10:11 +0000 (22:10 +0200)]
arm: socfpga: disable CONFIG_SPL_WDT for gen5 and a10

These boards don't have a watchdog enabled in SPL, so make sure
CONFIG_SPL_WDT is not enabled.

Fixes: commit 6874cb72204f ("watchdog: Split WDT from SPL_WDT")

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
4 years agogitlab-ci: fix typo 'plaforms'
Heinrich Schuchardt [Sun, 6 Oct 2019 10:26:16 +0000 (12:26 +0200)]
gitlab-ci: fix typo 'plaforms'

%s/plaforms/platforms/g

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Sun, 6 Oct 2019 00:06:58 +0000 (20:06 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- ARM: dts: rmobile: Restore increase off-on delay on the SD Vcc regulator

4 years agoMerge branch '2019-10-04-master-imports'
Tom Rini [Fri, 4 Oct 2019 16:22:43 +0000 (12:22 -0400)]
Merge branch '2019-10-04-master-imports'

- Assorted TI platform fixes
- Revert the change that broke environment flag validation
- Assorted typo fixes
- Assorted Kconfig dependency fixes
- Other minor bug fixes

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Fri, 4 Oct 2019 16:22:28 +0000 (12:22 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- dm: core: Correct low cell in ofnode_read_pci_addr()
- dm: core: Correct bad cast in ofnode_get_addr_size_index()

4 years agoRevert "env: solve compilation error in SPL"
Tom Rini [Fri, 4 Oct 2019 16:21:33 +0000 (12:21 -0400)]
Revert "env: solve compilation error in SPL"

This reverts commit 7d4776545b0f8a8827e5d061206faf61c9ba6ea9.  The
changes here break environment validation and furthermore do not seem to
be required.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agoARM: dts: imx6q-logicpd: Add missing imx6q-logicpd-u-boot for SPL
Adam Ford [Wed, 7 Aug 2019 15:16:33 +0000 (10:16 -0500)]
ARM: dts: imx6q-logicpd: Add missing imx6q-logicpd-u-boot for SPL

The SPL device tree is missing the entires for gpio1, uart1, usdhc1 and
usdhc2.  This creates the missing imx6q-logicpd-u-boot.dtsi file
which will enable these functions so SPL can properly setup UART, detect
microSD card, and startup.

Fixes: 8f4691e31a18 ("ARM: imx6q_logic: With SPL_OF_CONTROL enabled,
remove MMC init")

Signed-off-by: Adam Ford <aford173@gmail.com>
4 years agoinitcall.h: initcall_run_list(): Improve debug output
Ovidiu Panait [Wed, 25 Sep 2019 11:10:54 +0000 (14:10 +0300)]
initcall.h: initcall_run_list(): Improve debug output

Existing debug output is mixed with the function name:
initcall_run_list() initcall: 25263initcall_run_list()  (relocated to 425263)

Turn it to:
initcall_run_list() initcall: 25263 (relocated to 425263)

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
4 years agoKconfig: fix a typo in the description of bmp command.
Andrius Štikonas [Mon, 23 Sep 2019 21:43:41 +0000 (22:43 +0100)]
Kconfig: fix a typo in the description of bmp command.

Signed-off-by: Andrius Štikonas <andrius@stikonas.eu>
4 years agoKconfig: Migrate CONFIG_BOOTM_* options
Tom Rini [Fri, 20 Sep 2019 21:36:50 +0000 (17:36 -0400)]
Kconfig: Migrate CONFIG_BOOTM_* options

Migrate all of the existing OS support options that are under
CONFIG_BOOTM_* to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
4 years agocmd: part: number: return hexadecimal value
Roman Stratiienko [Fri, 20 Sep 2019 13:59:18 +0000 (15:59 +0200)]
cmd: part: number: return hexadecimal value

At this point we are using part number sub-command to retrieve UUID
of the partition using it's name.

e.g.:
 part number mmc $mmcdev system_a system_a_index
 part uuid mmc $mmcdev:${system_a_index} system_a_uuid

Since 'part uuid' sub-command expects partition index in hex format and
'part number' returns decimal value, 'part uuid' command will provide
wrong UUID or fail.

Fixes: be683756f62034 ("cmd: part: Add 'number' sub-command")
Cc: Dirk Behme <dirk.behme@de.bosch.com>
Reported-by: Pontus Fuchs <pontus.fuchs@se.bosch.com>
Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
4 years agoARM: keystone2: update the default addresses of the secure monitor
Jean-Jacques Hiblot [Tue, 17 Sep 2019 21:18:25 +0000 (17:18 -0400)]
ARM: keystone2: update the default addresses of the secure monitor

To accommodate the growth of u-boot, we need to shift the location of the
secure monitor. Moving it 64kB further.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
4 years agoboard: ti: am654: Disable TRNG node for HS devices
Andrew F. Davis [Tue, 17 Sep 2019 21:15:40 +0000 (17:15 -0400)]
board: ti: am654: Disable TRNG node for HS devices

On HS devices the access to TRNG is restricted on the non-secure
ARM side, disable the node in DT to prevent firewall violations.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
4 years agoautoboot: add necessary dependency at AUTOBOOT_MENU_SHOW
AKASHI Takahiro [Thu, 12 Sep 2019 06:31:22 +0000 (15:31 +0900)]
autoboot: add necessary dependency at AUTOBOOT_MENU_SHOW

Otherwise, menu_show() will be undefined in bootdelay_process().

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
4 years agoMAINTAINERS, git-mailrc: Update the maintainer for socfpga
Ley Foon Tan [Fri, 4 Oct 2019 08:43:50 +0000 (16:43 +0800)]
MAINTAINERS, git-mailrc: Update the maintainer for socfpga

This updates MAINTAINERS and git-mailrc to add me as maintainer for
socfpga.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Acked-by: Marek Vasut <marex@denx.de>
4 years agoMakefile: mrproper should remove *.pyc files
Heinrich Schuchardt [Thu, 3 Oct 2019 16:45:29 +0000 (16:45 +0000)]
Makefile: mrproper should remove *.pyc files

*.pyc files contain compiled Python bytecode. 'make mrproper' should remove
them.

Removing *.pyc files helps for instance sometimes when running into an
error "binman: Unknown entry type 'blob' in node '/binman/blob'".

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoMakefile: Fix typo around CONFIG_SPL_FIT_SOURCE
Michal Simek [Wed, 2 Oct 2019 13:53:12 +0000 (15:53 +0200)]
Makefile: Fix typo around CONFIG_SPL_FIT_SOURCE

Trivial fix.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
4 years agoarm: K3: Increase default SYSFW image size allocation
Andrew F. Davis [Tue, 1 Oct 2019 14:33:43 +0000 (10:33 -0400)]
arm: K3: Increase default SYSFW image size allocation

The memory allocated to store the FIT image containing SYSFW and board
configuration data is statically defined to the largest size expected.
This was 269000 bytes but now needs to be grown to 276000 to make room
for the signatures attached to the board configuration data on High
Security devices.

Signed-off-by: Andrew F. Davis <afd@ti.com>
4 years agodm: core: Correct bad cast in ofnode_get_addr_size_index()
Simon Glass [Wed, 25 Sep 2019 14:55:50 +0000 (08:55 -0600)]
dm: core: Correct bad cast in ofnode_get_addr_size_index()

At present this code passes an fdt_addr_t pointer as a u64 pointer which
is not safe, since sizeof(fdt_addr_t) may be 4, e.g. with sandbox. Correct
this to avoid a stack corruption problem.

Fixes: e679d03b08 (core: ofnode: Add ofnode_get_addr_size_index)
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: correct one typo in the commit message]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
4 years agodm: core: Correct low cell in ofnode_read_pci_addr()
Simon Glass [Wed, 25 Sep 2019 14:55:46 +0000 (08:55 -0600)]
dm: core: Correct low cell in ofnode_read_pci_addr()

This reads the low cell of the PCI address from the wrong cell. Fix it.
Also fix the function that this code came from.

Fixes: 9e51204527 (dm: core: Add operations on device tree references)
Fixes: 4ea5243a3a (fdt: fix fdtdec_get_pci_addr() for CONFIG_PHYS_64BIT)
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agoMerge tag 'rpi-next-2019.10.2' of https://github.com/mbgg/u-boot
Tom Rini [Tue, 1 Oct 2019 20:31:26 +0000 (16:31 -0400)]
Merge tag 'rpi-next-2019.10.2' of https://github.com/mbgg/u-boot

RPi4:
Fix amount of memory seen by the kernel.

4 years agoMerge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
Tom Rini [Tue, 1 Oct 2019 20:31:11 +0000 (16:31 -0400)]
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86

- Propagate acpi_rsdp_addr to x86 kernel via boot parameters

4 years agox86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters
Andy Shevchenko [Fri, 13 Sep 2019 15:42:00 +0000 (18:42 +0300)]
x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters

This is reincarnation of the U-Boot

commit 3469bf4274540d1491d58e878a9edc0bdcba17ac
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Wed Jan 10 19:40:15 2018 +0200

    x86: zImage: Propagate acpi_rsdp_addr to kernel via boot parameters

after upstream got eventually the Linux kernel

commit e6e094e053af75cbc164e950814d3d084fb1e698
Author: Juergen Gross <jgross@suse.com>
Date:   Tue Nov 20 08:25:29 2018 +0100

    x86/acpi, x86/boot: Take RSDP address from boot params if available

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
4 years agorpi4: enable dram bank initialization
Matthias Brugger [Mon, 9 Sep 2019 16:31:56 +0000 (18:31 +0200)]
rpi4: enable dram bank initialization

When booting through the efi stub, the memory map get's created by
reading the dram bank information. Depending on the version of the RPi4
this information changes. Read the device tree to initialize the dram
bank data structure. This way the kernel is able to access the whole
range of available memory.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
4 years agoMerge tag 'u-boot-atmel-fixes-2019.10-a' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 30 Sep 2019 11:21:38 +0000 (07:21 -0400)]
Merge tag 'u-boot-atmel-fixes-2019.10-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel fixes for 2019.10 cycle:

This includes only tiny cleanups on env changes related to 2019.10 new
features: removal of duplicate env settings (otherwise there may be
warnings in building..) and a small fix for flashes on Gardena smart
gateway (requires nand bad block tables).

4 years agoMerge tag 'u-boot-rockchip-20190928' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 30 Sep 2019 11:20:35 +0000 (07:20 -0400)]
Merge tag 'u-boot-rockchip-20190928' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip

- Fix efuse read data number for rk3399
- make_fit_atf.py: fix .its generation for a single atf image

4 years agoat91: configs: Drop duplication of defconfig macros
Tudor Ambarus [Fri, 20 Sep 2019 10:52:58 +0000 (10:52 +0000)]
at91: configs: Drop duplication of defconfig macros

'commit a9221f3ebd6d ("at91, omap2plus: configs: migrate CONFIG_ENV_ to defconfigs")'
migrated CONFIG_ENV_ macros to defconfigs but did not remove the
identical redefinition of these macros in include/configs/.

Since the duplicated macros have the same value as the ones in defconfigs,
no "redefined" warnings were raised. Remove duplicated macros for all
sama5 and sam9x5ek boards.

While verifying that the removal of the macros from include/configs did
not change the same macros in defconfigs, overwrite the old defconfig by
saving them with the output from "make arch=ARM savedefconfig". This
resulted in the movement of some macros in the defconfig files.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>