oweals/u-boot.git
5 years agoARM: DTS: am335x-evm: Use USB0 in peripheral mode
Jean-Jacques Hiblot [Tue, 22 Jan 2019 15:48:17 +0000 (16:48 +0100)]
ARM: DTS: am335x-evm: Use USB0 in peripheral mode

This USB port is mainly used for RNDIS and DFU. To be able to use it with
DM_USB and DM_USB_GADGET, we need to provide a dr_mode value in the DTS.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agousb: ether: call _usb_eth_halt() if initialization fails
Jean-Jacques Hiblot [Tue, 22 Jan 2019 15:48:16 +0000 (16:48 +0100)]
usb: ether: call _usb_eth_halt() if initialization fails

If the host does not respond in time, the initialization fails. However
the usb ether driver will still be registered. This will make
usb_gadget_probe_driver() fail the next time the initialization is
attempted because it cannot find an available UDC.

Fixing this by calling _usb_eth_halt() when the init fails.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
5 years agoam335x, shc: adapt shc board to DM
Heiko Schocher [Mon, 21 Jan 2019 05:16:28 +0000 (06:16 +0100)]
am335x, shc: adapt shc board to DM

port the am335x based shc board to DM, to get rid
of DW warnings when compiling U-Boot.

- remove uneccessary board code
- adapt defconfigs
- remove unneeded defconfigs
  configs/am335x_shc_prompt_defconfig
  configs/am335x_shc_sdboot_prompt_defconfig

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoARM: dts: am335x-shc: add u-boot specific dtsi
Heiko Schocher [Mon, 21 Jan 2019 05:16:27 +0000 (06:16 +0100)]
ARM: dts: am335x-shc: add u-boot specific dtsi

add u-boot specific am335x-shc-u-boot.dtsi file,
in which we add u-boot specific adaptions.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 years agoarm: dts: add am335x-shc.dts for shc board
Heiko Schocher [Mon, 21 Jan 2019 05:16:26 +0000 (06:16 +0100)]
arm: dts: add am335x-shc.dts for shc board

add DTS from linux tree commit
"47bfa6d9dc8c060bf56554a465c9031e286d2f80"

change for U-Boot:
switch to SPDX-license identifier.

Signed-off-by: Heiko Schocher <hs@denx.de>
5 years agoMerge tag 'video-updates-for-2019.04-rc1' of git://git.denx.de/u-boot-video
Tom Rini [Thu, 31 Jan 2019 21:07:37 +0000 (16:07 -0500)]
Merge tag 'video-updates-for-2019.04-rc1' of git://git.denx.de/u-boot-video

- ihs and imx driver fixes
- relax EDID validation checks for 0 hsync/vsync
  pulse width (support some quirky displays)

5 years agoMerge tag 'u-boot-amlogic-20190131' of git://git.denx.de/u-boot-amlogic
Tom Rini [Thu, 31 Jan 2019 12:19:52 +0000 (07:19 -0500)]
Merge tag 'u-boot-amlogic-20190131' of git://git.denx.de/u-boot-amlogic

- Add features and fixups to support video on Amlogic GX SoCs
- Add video support for Amlogic GX SoC
- Add DT fixups
- Enable Video and USB Console for libretech-cc board

5 years agoarm: libretech-cc: enable video by default
Maxime Jourdan [Thu, 20 Dec 2018 14:13:07 +0000 (15:13 +0100)]
arm: libretech-cc: enable video by default

libretech-cc being the main device tested with CONFIG_VIDEO_MESON, let's
enable it by default.

Also enable:
 - CONFIG_SYS_WHITE_ON_BLACK for prettiness
 - CONFIG_VIDEO_DT_SIMPLEFB for framebuffer sharing with kernel

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agoarm: meson64: enable console mux and console env by default
Maxime Jourdan [Thu, 20 Dec 2018 14:09:12 +0000 (15:09 +0100)]
arm: meson64: enable console mux and console env by default

With the recent addition of the meson VPU driver, enable the following
config entries by default for meson-64 targets: CONFIG_CONSOLE_MUX,
CONFIG_SYS_CONSOLE_IS_IN_ENV.

This allows outputting the console via video if CONFIG_VIDEO_MESON is
selected.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agoconfigs: meson64: use vidconsole and usbkbd if enabled
Neil Armstrong [Thu, 26 Jul 2018 09:45:46 +0000 (11:45 +0200)]
configs: meson64: use vidconsole and usbkbd if enabled

Allows displaying the console via video and using a USB keyboard.

Also enables CONFIG_SPLASH_SCREEN if using video.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agoarm: meson: board-gx: Setup VPU in fdt
Maxime Jourdan [Tue, 11 Dec 2018 11:52:04 +0000 (12:52 +0100)]
arm: meson: board-gx: Setup VPU in fdt

If VIDEO_MESON is enabled, we need to setup the fdt for the framebuffer.

Call meson_vpu_rsv_fb() which reserves the framebuffer memory region for
EFI, and sets up simple-framebuffer nodes if simplefb support is
enabled.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agoarm64: dts: meson-gx: add hhi reg entry to hdmi_tx
Maxime Jourdan [Tue, 11 Dec 2018 10:35:16 +0000 (11:35 +0100)]
arm64: dts: meson-gx: add hhi reg entry to hdmi_tx

There's no reliable way to reuse the hhi entry from the vpu as is done
in the linux kernel, so we duplicate it here.

We will be able to sync against kernel DTS in the future when the VPU
gets based on the clock framework rather than the HHI reg.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoarm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply
Neil Armstrong [Tue, 6 Nov 2018 08:30:14 +0000 (09:30 +0100)]
arm64: dts: meson-gx: Add hdmi_5v regulator as hdmi tx supply

The hdmi_5v regulator must be enabled to provide power to the physical HDMI
PHY and enables the HDMI 5V presence loopback for the monitor.

Fixes: b409f625a6d5 ("ARM64: dts: meson-gx: Add HDMI_5V regulator on selected boards")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
[backport of linux commit e1f2163deac059ad39f07aba9e314ebe605d5a7a]

5 years agoarm64: dts: meson-gx: vpu should be probed before relocation
Maxime Jourdan [Thu, 26 Jul 2018 09:21:39 +0000 (11:21 +0200)]
arm64: dts: meson-gx: vpu should be probed before relocation

Flag the appropriate nodes with u-boot,dm-pre-reloc

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agovideo: Add Meson Video Processing Unit Driver
Neil Armstrong [Tue, 24 Jul 2018 15:45:28 +0000 (17:45 +0200)]
video: Add Meson Video Processing Unit Driver

This adds video output support for Amlogic GXBB/GXL/GXM chips.
The supported ports are CVBS and HDMI (based on DW_HDMI).

When using HDMI, only DMT modes are supported.

There is support for simple-framebuffer (CONFIG_VIDEO_DT_SIMPLEFB)

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jorge Ramire-Ortiz <jramirez@baylibre.com>
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
[narmstrong: fixed defines alignment in meson_canvas.c]
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agovideo: dw_hdmi: add support for color conversion
Jorge Ramirez-Ortiz [Thu, 15 Nov 2018 09:32:03 +0000 (10:32 +0100)]
video: dw_hdmi: add support for color conversion

Some IPs like the meson VPU can only feed a particular pixel format to
dw_hdmi. As of now, the driver is hardcoded to use RGB888 as input.

This commit enables different pixel format inputs, with the appropriate
CSC configuration.

Signed-off-by: Jorge Ramire-Ortiz <jramirez@baylibre.com>
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agovideo: dw_hdmi: support SoC specific read/write ops
Jorge Ramirez-Ortiz [Thu, 8 Nov 2018 15:51:01 +0000 (16:51 +0100)]
video: dw_hdmi: support SoC specific read/write ops

Some IPs like the meson VPU have a specific way to write to dw_hdmi
registers. Make it configurable.

Signed-off-by: Jorge Ramirez-Ortiz <jramirez@baylibre.com>
[added commit description]
Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agopower: domain: meson-gx-pwrc-vpu: add missing depends
Maxime Jourdan [Thu, 20 Dec 2018 13:58:58 +0000 (14:58 +0100)]
power: domain: meson-gx-pwrc-vpu: add missing depends

MESON_GX_VPU_POWER_DOMAIN should depend on POWER_DOMAIN.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
5 years agoMAINTAINERS: Add Amlogic entry
Neil Armstrong [Wed, 30 Jan 2019 09:53:10 +0000 (10:53 +0100)]
MAINTAINERS: Add Amlogic entry

Add entry for Amlogic SoC maintained files and the freshly
created mailing-list.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
5 years agoMakefile: remove generated font files
Heinrich Schuchardt [Tue, 29 Jan 2019 20:15:21 +0000 (21:15 +0100)]
Makefile: remove generated font files

If `make mrproper` does not delete the generated drivers/video/fonts/*.S
files a following `make tests` fails.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 years agodfu: mmc: call fs functions instead of run_command
Simon Goldschmidt [Fri, 25 Jan 2019 18:58:01 +0000 (19:58 +0100)]
dfu: mmc: call fs functions instead of run_command

This unbreaks dfu mmc_file_op which is currently broken since using the
load cmd on a buffer from heap is not allowed - added with
commit aa3c609e2be5 ("fs: prevent overwriting reserved memory")

Fixes: commit aa3c609e2be5 ("fs: prevent overwriting reserved memory")
Reported-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Wed, 30 Jan 2019 17:24:32 +0000 (12:24 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

- Enable DM_MMC support

5 years agoarm: sunxi: Enable DM_MMC
Jagan Teki [Tue, 29 Jan 2019 15:54:15 +0000 (15:54 +0000)]
arm: sunxi: Enable DM_MMC

Enable DM_MMC for all Allwinner SoCs, this will eventually
enable BLK.

Also removed DM_MMC enablement in few parts of sunxi
configurations.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agosunxi: A64: pinebook-u-boot: Include sunxi-u-boot.dtsi
Jagan Teki [Fri, 25 Jan 2019 08:28:25 +0000 (13:58 +0530)]
sunxi: A64: pinebook-u-boot: Include sunxi-u-boot.dtsi

Like other Allwinner A64 boards, pinebook also need altering
auto-numbering of mmc2 to mmc1 which is available in common
sunxi dsti file, sunxi-u-boot.dtsi

Pinebook has a separate sun50i-a64-pinebook-u-boot.dtsi which
takes more precedence for u-boot.dtsi inclusion and it eventually
failed to include the sunxi-u-boot.dtsi.

So, this patch add support to include the sunxi-u-boot.dtsi in the
sun50i-a64-pinebook-u-boot.dtsi

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> # Pinebook
5 years agoarm: dts: sunxi: Alter mmc2 auto-numbering to mmc1
Jagan Teki [Mon, 21 Jan 2019 10:31:15 +0000 (16:01 +0530)]
arm: dts: sunxi: Alter mmc2 auto-numbering to mmc1

Environment and fastboot mmc devices are configured based on the number
of mmc slots defined on particular board configs, MMC_SUNXI_SLOT_EXTRA.

If MMC_SUNXI_SLOT_EXTRA is more than 1, the default env and fastboot
mmc devices is mmc1 by assuming mmc0 is SD and mmc1 is emmc device.

But with DM_MMC the mmc devices are numbered as per the dts node
enablement. If there is a chance of having enabling all mmc nodes
in dts say mmc0, mmc1, mmc2 then the default env and fastboot devices
will failed to assign proper emmc device since mmc2 is emmc in most
of the Allwinner platforms.

So, we need to alter the auto-numbering by aliasing mmc2 to mmc1 since
aliases take precedence over auto-numbering.

If the dts enables mmc0, mmc1, mmc2, then all the nodes will probe
sequentially and auto-numbered as it is. but when aliases mmc1 with mmc2
the resulting number should be that mmc0 is till mmc0, mmc2 become mmc1
and mmc2 become mmc1

Without aliases of mmc1 = &mmc2;
-------------------------------
MMC:   mmc@1c0f000: 0, mmc@1c10000: 1, mmc@1c11000: 2

With aliases of mmc1 = &mmc2;
----------------------------
MMC:   Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... OK

Some platforms like A20 has mmc0...mmc3, but there is no usecases now
for enabling all mmc controllers in any of A20 board dts files.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agosunxi: clk: enable clk and reset for CCU devices
Andre Przywara [Tue, 29 Jan 2019 15:54:08 +0000 (15:54 +0000)]
sunxi: clk: enable clk and reset for CCU devices

Some Allwinner clock devices have parent clocks and reset gates itself,
which need to be activated for them to work.

Add some code to just assert all resets and enable all clocks given.
This should enable the A80 MMC config clock, which requires both to be
activated. The full CCU devices typically don't require resets, and have
just fixed clocks as their parents. Since we treat both as optional and
enabling fixed clocks is a NOP, this works for all cases, without the need
to differentiate between those clock types.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jagan Teki <jagan@openedev.com>
5 years agoMerge tag 'u-boot-imx-20190129' of git://git.denx.de/u-boot-imx
Tom Rini [Wed, 30 Jan 2019 12:22:12 +0000 (07:22 -0500)]
Merge tag 'u-boot-imx-20190129' of git://git.denx.de/u-boot-imx

For 2019.04

5 years agommc: sunxi: Honour non-removable property in DT
Andre Przywara [Sat, 19 Jan 2019 01:30:53 +0000 (01:30 +0000)]
mmc: sunxi: Honour non-removable property in DT

If a board DT describes a cd-gpios property, but also marks the storage
as non-removable, we must ignore the GPIO (as Linux does).

Teach the DM_MMC part of the Allwinner MMC driver about the
non-removable DT property, to fix DM_MMC access on the SoPine and
Pine64-LTS board.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jagan Teki <jagan@openedev.com>
5 years agosunxi: board: do MMC pinmux setup for DM_MMC builds
Andre Przywara [Tue, 29 Jan 2019 15:54:14 +0000 (15:54 +0000)]
sunxi: board: do MMC pinmux setup for DM_MMC builds

Enabling DM_MMC skips the call to mmc_pinmux_setup() in board.c, as this
is supposed to be handled by the MMC driver, using DT information.

However we don't have a pinctrl driver yet, but would still like to keep
the working pinmux setup for our MMC devices. So bring this particular
call back to the DM_MMC code flow.

When booting from either SD card or eMMC, the SPL does the setup for us,
but when booting from SPI or USB we must not skip this part.

Fixes, boot via FEL or SPI flash, where the SPL won't setup the pinmux

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jagan Teki <jagan@openedev.com>
[jagan: add Fix details on commit message]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agommc: sunxi: Add DM clk and reset support
Andre Przywara [Tue, 29 Jan 2019 15:54:13 +0000 (15:54 +0000)]
mmc: sunxi: Add DM clk and reset support

Now that we have the gate clocks and the reset gates in our new
Allwinner clock driver, let's make use of them in the MMC driver, when
DM_MMC is defined.
We treat the reset device as optional now, as the older SoCs don't
implement it.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agommc: sunxi: Add DM_MMC support for A80
Jagan Teki [Mon, 21 Jan 2019 10:31:12 +0000 (16:01 +0530)]
mmc: sunxi: Add DM_MMC support for A80

A80 gates clock already be part of CLK framework, so just
add mod_clk offset with A80 compatible string.

Cc: Rask Ingemann Lambertsen <rask@formelder.dk>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 years agommc: sunxi: Add DM_MMC support for H6
Jagan Teki [Tue, 29 Jan 2019 15:54:12 +0000 (15:54 +0000)]
mmc: sunxi: Add DM_MMC support for H6

Unlike other Allwinner SoC's, H6 uses a different MMC mod clock offset.
Connect that with the respective compatible string.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agommc: sunxi: Add remaining compatible strings
Jagan Teki [Tue, 29 Jan 2019 15:54:11 +0000 (15:54 +0000)]
mmc: sunxi: Add remaining compatible strings

Add MMC compatible strings for A83T, A64, H5.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agosunxi: clk: A80: add MMC clock support
Andre Przywara [Tue, 29 Jan 2019 15:54:10 +0000 (15:54 +0000)]
sunxi: clk: A80: add MMC clock support

The A80 handles resets and clock gates for the MMC devices differently,
outside of the CCU IP block. Consequently we have a separate clock
device with a separate binding for that.

Implement that with the respective clock gates and resets to allow the
A80 taking part in the DM_MMC game.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[jagan: fix a80 mmc clock config compatible]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agosunxi: clk: add MMC gates/resets
Andre Przywara [Tue, 29 Jan 2019 15:54:09 +0000 (15:54 +0000)]
sunxi: clk: add MMC gates/resets

Add the MMC clock gates and reset bits for all the Allwinner SoCs.
This allows them to be used by the MMC driver.

We don't advertise the mod clock yet, as this is still handled by the
MMC driver.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[jagan: add V3S, A80 gates/resets]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agosunxi: amarula_a64_relic: Enable USB host
Jagan Teki [Tue, 22 Jan 2019 11:58:28 +0000 (17:28 +0530)]
sunxi: amarula_a64_relic: Enable USB host

Enable USB host controllers for Amarula A64-Relic board,
the respective nodes are already present in DTS.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoarm: stm32mp1: deploy spl in root folder
Patrick Delaunay [Mon, 28 Jan 2019 10:13:27 +0000 (11:13 +0100)]
arm: stm32mp1: deploy spl in root folder

Update generation of spl binaries
- continue to generate all SPL files in spl sub-directory
- copy in root folder the needed file for user (YOCTO, buildroot):
  u-boot-spl.stm32

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agoMerge tag 'u-boot-amlogic-20190129' of git://git.denx.de/u-boot-amlogic
Tom Rini [Tue, 29 Jan 2019 14:40:31 +0000 (09:40 -0500)]
Merge tag 'u-boot-amlogic-20190129' of git://git.denx.de/u-boot-amlogic

Adds pinconf support for the Amlogic pinctrl driver (fixed)

5 years agopinctrl: meson: add pinconf support
Jerome Brunet [Fri, 4 Jan 2019 14:44:34 +0000 (15:44 +0100)]
pinctrl: meson: add pinconf support

Adding pinconf support is necessary to enable boot from SPI
without breaking the eMMC. When booting from SPI, the ROM code
leave pull downs on the eMMC pad.

We need to set pinconf provided in DT to solve this

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
[narmstrong: added missing comma in pinctrl-meson-axg-pmx.c]

5 years agoihs_video_out: Fix error handling
Mario Six [Mon, 28 Jan 2019 08:50:58 +0000 (09:50 +0100)]
ihs_video_out: Fix error handling

The ihs_video_out driver's error handling is incorrect in two places
(one is a missing negation, and in one place a error should be ignored).

Fix these two instances.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
5 years agovideomodes: Relax EDID validation checks for hsync/vsync pulse width
Priit Laes [Fri, 18 Jan 2019 13:56:51 +0000 (15:56 +0200)]
videomodes: Relax EDID validation checks for hsync/vsync pulse width

Current EDID detailed timing parser errors out when either
horizontal or vertical pulse sync width is 0, thus not
allowing a display with EDID listed below work properly.

EDID below works ok within Linux although it warns about
these two fields being 0. Therefore relax the checks a bit
so we can actually use this the screen out of the box.

Of-course, this display itself is somewhat quirky display with
following anti-features:
- HPD pin is not usable
- although resolution is 640x480, only top 240 pixels are visible

$ xxd -p display.edid
00ffffffffffff0005a1e00301000000150f0103800f05780a0f6ea05748
9a2610474f200000010101010101010101010101010101012a08804520e0
0b1020004000953600000018000000fd0034441a2403000a202020202020
0000001000310a20202020202020202020200000001000002a4030701300
782d1100001e006b

$ edid-decode display.edid
EDID version: 1.3
Manufacturer: AMA Model 3e0 Serial Number 1
Digital display
Maximum image size: 15 cm x 5 cm
Gamma: 2.20
RGB color display
First detailed timing is preferred timing
Display x,y Chromaticity:
  Red:   0.6250, 0.3398
  Green: 0.2841, 0.6044
  Blue:  0.1494, 0.0644
  White: 0.2802, 0.3105
Established timings supported:
  640x480@60Hz 4:3 HorFreq: 31469 Hz Clock: 25.175 MHz
Standard timings supported:
Detailed mode: Clock 20.900 MHz, 149 mm x 54 mm
                640  672  672  709 hborder 0
                480  484  484  491 vborder 0
               -hsync -vsync
               VertFreq: 60 Hz, HorFreq: 29478 Hz
Monitor ranges (GTF): 52-68Hz V, 26-36kHz H, max dotclock 30MHz
Dummy block
Dummy block
Checksum: 0x6b (valid)

Signed-off-by: Priit Laes <priit.laes@paf.com>
Signed-off-by: Priit Laes <plaes@plaes.org>
5 years agoimx: video: Fix return value issue
Ye Li [Fri, 4 Jan 2019 09:11:05 +0000 (09:11 +0000)]
imx: video: Fix return value issue

When framebuffer driver init is failed, we should return the err value not 0.
So the video init can exit immediately.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoARM: imx6q_logic: Enable Falcon Mode and fatwrite
Adam Ford [Fri, 28 Dec 2018 16:24:15 +0000 (10:24 -0600)]
ARM: imx6q_logic: Enable Falcon Mode and fatwrite

This patch enables Falcon Mode by default and updates the README
file to show instructions on how to run from the micro SD card
or eMMC.  This patch also enables fatwrite to help assist with
writing the 'args' to the microSD card.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: imx6q_logic: Enable DM_USB and dependent regulators
Adam Ford [Fri, 28 Dec 2018 15:04:25 +0000 (09:04 -0600)]
ARM: imx6q_logic: Enable DM_USB and dependent regulators

With the updated device trees in place, this patch enables
DM_USB which uses several regulators also enabled with this patch.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoARM: DTS: imx6q-logicpd: Update DTS/DTSI files
Adam Ford [Fri, 28 Dec 2018 14:55:41 +0000 (08:55 -0600)]
ARM: DTS: imx6q-logicpd: Update DTS/DTSI files

The i.MX6 SOM and development kits have undergone significant
updates and changes over the past few months.  This re-sync's
the U-Boot with Logic PD's BSP.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoimx6q_logic: Enable MMC booting from SPL
Adam Ford [Fri, 28 Dec 2018 14:47:40 +0000 (08:47 -0600)]
imx6q_logic: Enable MMC booting from SPL

The MMC booting wasn't previously fitting into the codespace.
This patch enables MMC booting from the baseboard by reducing
some DM overhead during SPL.

Signed-off-by: Adam Ford <aford173@gmail.com>
5 years agoarm: imx7s-warp: Convert to DM PMIC
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:14 +0000 (17:40 +0000)]
arm: imx7s-warp: Convert to DM PMIC

This patch converts the warp7 and warp7_bl33 board ports over to using the
DM PMIC model.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agowarp7: defconfig: Switch to DM for I2C
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:13 +0000 (17:40 +0000)]
warp7: defconfig: Switch to DM for I2C

This commit switches to DM I2C for warp7 and warp7_bl33 defconfigs.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agowarp7: defconfig: Switch on IMX7 GPIO/pinctrl for both ports
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:12 +0000 (17:40 +0000)]
warp7: defconfig: Switch on IMX7 GPIO/pinctrl for both ports

Switches on the IMX7 pinctrl driver for the warp7 and warp7_bl33 ports,
necessary to convert over to DM for this board.

It is necessary to switch on pinctrl and GPIO in one go.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:11 +0000 (17:40 +0000)]
arm: dts: imx7s-warp: Create alias for mmc0 to &usdhc3

This patch sets up an alias for mmc0 to usdhc3.

Before the DM conversion only usdhc3 was enabled and therefore it appeared
as MMC 0 to u-boot. After enabling MMC DM though usdhc3 defaults to MMC 2,
which left unattended would drive changes to existing warp7 bootscripts and
environment variables that rely on mmc 0.

Setup the alias of mmc0 and usdhc3 so that existing warp7 boot code will
work unmodified.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: imx7s-warp: Convert to DM MMC initialization
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:10 +0000 (17:40 +0000)]
arm: imx7s-warp: Convert to DM MMC initialization

Converts from fixed initialization of MMC to DM initialization of MMC.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: imx7s-warp: Add DT file hooks
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:09 +0000 (17:40 +0000)]
arm: imx7s-warp: Add DT file hooks

This patch adds DT file hooks for imx7s-warp.dtb to the warp7 and
warp7_bl33 builds.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: dts: imx7s-warp: Import Linux warp7 dts
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:08 +0000 (17:40 +0000)]
arm: dts: imx7s-warp: Import Linux warp7 dts

This patch imports the Linux kernel warp7 dts as at upstream kernel commit
cf76c364a1e1.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
5 years agoarm: dts: imx7: Correct spelling mistake in GPIO name
Bryan O'Donoghue [Fri, 18 Jan 2019 17:40:07 +0000 (17:40 +0000)]
arm: dts: imx7: Correct spelling mistake in GPIO name

As pointed out by Lucas WDOD1_WDOG_ANY should be WDOG1_WDOG_ANY. Once
corrected we can import the latest kernel DTS unmodified.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reported-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoimx8: cpu: restrict checking ROM passover info for revA
Peng Fan [Fri, 18 Jan 2019 08:58:38 +0000 (08:58 +0000)]
imx8: cpu: restrict checking ROM passover info for revA

Passover info only for revA.

move get_cpu_rev out of CONFIG_CPU to avoid build failure when using
get_cpu_rev in SPL.
Add a CONFIG_SPL_BUILD for passover usage, no need to execute it again
in normal U-Boot stage. Also if still checking passover info in normal
U-Boot stage, need to make the passover code executed after
arch_cpu_init_dm.
So to make it easy and clean, only execute the code for SPL stage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: Check the PL310 version for applying errata
Ye Li [Mon, 7 Jan 2019 09:29:21 +0000 (09:29 +0000)]
imx: Check the PL310 version for applying errata

Apply errata based on PL310 version instead of compile
time. Also set Prefetch offset to 15, since it improves
memcpy performance by 35%. Don't enable Incr double
Linefill enable since it adversely affects memcpy
performance by about 32MB/s and reads by 90MB/s. Tested
with 4K to 16MB sized src and dst aligned buffer.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
5 years agoARM: imx: fix: Provide correct enum values for ONENAND/NOR boot recognition
Lukasz Majewski [Thu, 3 Jan 2019 22:50:51 +0000 (23:50 +0100)]
ARM: imx: fix: Provide correct enum values for ONENAND/NOR boot recognition

According to "Table 5-1. Boot Device Select" (page 335,
i.MX 6Dual/6Quad Applications Processor Reference Manual, Rev. 4, 09/2017)
the BOOT_CFG1[3] have following values (regarding EIM booting):
0 - NOR flash and 1 - ONENAND

This commit provides correct identification of the boot medium for IMX6Q
boards booting from NOR memory (MCCMON6 is one of them).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
5 years agodm: arm: imx: migrate cx9020 to CONFIG_DM_MMC
Patrick Bruenn [Thu, 3 Jan 2019 06:54:34 +0000 (07:54 +0100)]
dm: arm: imx: migrate cx9020 to CONFIG_DM_MMC

Enable esdhc1/2 device nodes for cx9020 and build with CONFIG_DM_MMC=y

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
5 years agoarm: imx: Add esdhc1/2 nodes to imx53.dtsi
Patrick Bruenn [Thu, 3 Jan 2019 06:54:33 +0000 (07:54 +0100)]
arm: imx: Add esdhc1/2 nodes to imx53.dtsi

These nodes are required by CX9020 when build with CONFIG_DM_MMC=y
They are copied from Linux 4.20

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
5 years agommc: fsl_esdhc: add compatible for fsl, imx53-esdhc
Patrick Bruenn [Thu, 3 Jan 2019 06:54:32 +0000 (07:54 +0100)]
mmc: fsl_esdhc: add compatible for fsl, imx53-esdhc

Add compatible "fsl,imx53-esdhc" to keep mmc working on i.MX53 platforms
with CONFIG_DM_MMC=y

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
5 years agoimx8mq_evk/README: remove ARCH environment variable
Baruch Siach [Wed, 2 Jan 2019 06:58:29 +0000 (08:58 +0200)]
imx8mq_evk/README: remove ARCH environment variable

There is no need to set the ARCH variable when building U-Boot. In fact,
the ARCH name in U-Boot is 'arm'.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
5 years agoMTD: nand: mxs_nand_spl: Fix empty function pointer for BBT
Adam Ford [Sun, 30 Dec 2018 16:11:16 +0000 (10:11 -0600)]
MTD: nand: mxs_nand_spl: Fix empty function pointer for BBT

The initialization function calls a nand_chip.scan_bbt(mtd) but
scan_bbt is never initialized resulting in an undefined function
pointer.  This will direct the function pointer to nand_default_bbt
defined in the same file.

Signed-off-by: Adam Ford <aford173@gmail.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
5 years agospi: mxc_spi: Fix build warning on ARM64 platforms
Ye Li [Fri, 4 Jan 2019 09:26:00 +0000 (09:26 +0000)]
spi: mxc_spi: Fix build warning on ARM64 platforms

When building mxc_spi driver on ARM64 platforms, get below build warnings.
Fix it in this patch.

In file included from include/common.h:48:0,
 from drivers/spi/mxc_spi.c:9:
 drivers/spi/mxc_spi.c: In function ‘spi_xchg_single’:
drivers/spi/mxc_spi.c:232:21: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
 _func_, bitlen, (u32)dout, (u32)din);
 ^
 include/log.h:135:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
 ^~~~
 drivers/spi/mxc_spi.c:231:2: note: in expansion of macro ‘debug’
debug("%s: bitlen %d dout 0x%x din 0x%x\n",
 ^~~~~
 drivers/spi/mxc_spi.c:232:32: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
 _func_, bitlen, (u32)dout, (u32)din);
 ^
 include/log.h:135:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
 ^~~~
 drivers/spi/mxc_spi.c:231:2: note: in expansion of macro ‘debug’
debug("%s: bitlen %d dout 0x%x din 0x%x\n",
 ^~~~~

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: Fix potential lmb memory overwritten by stack
Ye Li [Fri, 4 Jan 2019 09:10:20 +0000 (09:10 +0000)]
imx: Fix potential lmb memory overwritten by stack

At default, u-boot reserves the memory from SP - 4KB to DRAM end for
lmb in arch_lmb_reserve. So lmb won't allocate any memory from it.
But we found the 4K gap for SP is not enough now, because some FDT
updating operations are added in our u-boot before jumping to kernel,
which needs larger stack. This causes the lmb allocated memory is overwritten
by stack.

Fix the issue by implementing the board_lmb_reserve to reserve from
SP - 16KB to memory end for lmb.

Signed-off-by: Ye Li <ye.li@nxp.com>
5 years agopinctrl: imx: Fix select input issue
Ye Li [Fri, 4 Jan 2019 09:08:26 +0000 (09:08 +0000)]
pinctrl: imx: Fix select input issue

The pinctrl supports to set any bit in input register on iMX6 if
the MSB of input value is 0xff. But the driver uses signed int for
input value, so when executing the codes below, it won't meet.
Because this is arithmetic right shift.

    if (input_val >> 24 == 0xff)

Fix the issue by changing the input_val, config_val and mux_mode to u32.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qxp: mek: update README
Peng Fan [Fri, 21 Dec 2018 06:21:37 +0000 (06:21 +0000)]
imx8qxp: mek: update README

Update README after we switch to use SPL

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qxp: mek: default enable SPL
Peng Fan [Fri, 21 Dec 2018 06:21:34 +0000 (06:21 +0000)]
imx8qxp: mek: default enable SPL

Enable SPL for i.MX8QXP MEK, and currently use SPL FIT.
The SPL enable SPL_DM to use MMC/PINCTRL/POWER DOMAIN/CLK.

Note: SPL FIT could not support secure boot chain, because i.MX8/8X
only support i.MX container format. This container format has
not been upstreamed, so we use FIT for now. When SPL container
supported, we could switch to that.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: build flash.bin for i.MX8
Peng Fan [Fri, 21 Dec 2018 06:21:31 +0000 (06:21 +0000)]
imx: build flash.bin for i.MX8

Build flash.bin for i.MX8 when SPL enabled.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: mkimage_fit_atf: introduce BL33_BASE_ADDR
Peng Fan [Fri, 21 Dec 2018 06:21:29 +0000 (06:21 +0000)]
imx: mkimage_fit_atf: introduce BL33_BASE_ADDR

Introduce BL33_BASE_ADDR, then we could reuse this script for i.MX8QXP.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agodts: imx8qxp-mek: introduce u-boot dtsi
Peng Fan [Fri, 21 Dec 2018 06:21:26 +0000 (06:21 +0000)]
dts: imx8qxp-mek: introduce u-boot dtsi

Introduce u-boot dtsi for i.MX8QXP MEK board.
we do not introduce a common dtsi for SoC, because different board
has different requirement on which needs to be enabled in SPL DM.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agospl: imx8: add spl boot device
Peng Fan [Fri, 21 Dec 2018 06:21:23 +0000 (06:21 +0000)]
spl: imx8: add spl boot device

Add spl_boot_device for i.MX8, also add BOOT_DEVICE_MMC2_2 for
spl_boot_mode.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agogpio: introduce CONFIG_SPL_DM_PCA953X
Peng Fan [Fri, 21 Dec 2018 06:21:21 +0000 (06:21 +0000)]
gpio: introduce CONFIG_SPL_DM_PCA953X

Introduce CONFIG_SPL_DM_PCA953X for SPL usage.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoarm: imx: build mach-imx for i.MX8
Peng Fan [Fri, 21 Dec 2018 06:21:18 +0000 (06:21 +0000)]
arm: imx: build mach-imx for i.MX8

To enable SPL for i.MX8, we could reuse code in arch/arm/mach-imx.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8: scu: use dedicated MU for SPL
Peng Fan [Fri, 21 Dec 2018 06:21:15 +0000 (06:21 +0000)]
imx8: scu: use dedicated MU for SPL

SPL runs in EL3 mode, except MU0_A, others are not powered on,
and could not be used. However normal U-Boot use MU1_A, so we
could not reuse the one in dts. And we could not replace the one
in dts with MU0_A, because MU0_A is reserved in secure world.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx8qxp: add SUPPORT_SPL option
Peng Fan [Fri, 21 Dec 2018 06:21:13 +0000 (06:21 +0000)]
imx8qxp: add SUPPORT_SPL option

Enable SUPPORT_SPL option for i.MX8QXP, then we could enable SPL.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
5 years agoMAINTAINERS: imx: Change Fabio's email address
Fabio Estevam [Mon, 21 Jan 2019 16:29:54 +0000 (14:29 -0200)]
MAINTAINERS: imx: Change Fabio's email address

I prefer to use my personal email address for U-Boot related work.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
5 years agoconfigs: add default configuraiton for Colibri iMX7 with eMMC
Stefan Agner [Tue, 8 Jan 2019 11:42:38 +0000 (12:42 +0100)]
configs: add default configuraiton for Colibri iMX7 with eMMC

Add a default configuration for Colibri iMX7D 1GB (with eMMC
NAND flash).

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoconfigs: colibri_imx7: use distro defaults
Stefan Agner [Tue, 8 Jan 2019 11:42:37 +0000 (12:42 +0100)]
configs: colibri_imx7: use distro defaults

The defconfig already use most features implied by distro defaults.
Make sure we enable all features required by distro boot by making
use of CONFIG_DISTRO_DEFAULTS.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoconfigs: colibri_imx7: use DFU for NAND instead of MMC
Stefan Agner [Tue, 8 Jan 2019 11:42:36 +0000 (12:42 +0100)]
configs: colibri_imx7: use DFU for NAND instead of MMC

The colibri_imx7_defconfig is for Colibri iMX7 raw NAND devices.
Hence DFU for NAND is more useful then for MMC devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoconfigs: colibri_imx7: enable CAAM driver
Stefan Agner [Tue, 8 Jan 2019 11:42:35 +0000 (12:42 +0100)]
configs: colibri_imx7: enable CAAM driver

Access to CAAM in non-secure mode must be enabled by the boot
loader first. The U-Boot CAAM driver enables access to CAAM in
non-secure mode by default. Hence enable the CAAM driver to
allow Linux accessing CAAM directly. This prevents error
messages like the following on Linux boot:
  caam 30900000.caam: Entropy delay = 3200
  caam 30900000.caam: failed to acquire DECO 0
  caam 30900000.caam: failed to instantiate RNG

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx7: drop legacy usdhc support
Stefan Agner [Tue, 8 Jan 2019 11:42:34 +0000 (12:42 +0100)]
colibri_imx7: drop legacy usdhc support

Drop legacy pinmux/usdhc board configuration.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfigs: colibri_imx7: use DM_MMC
Stefan Agner [Tue, 8 Jan 2019 11:42:33 +0000 (12:42 +0100)]
configs: colibri_imx7: use DM_MMC

Now that device tree is in place use DM_MMC for Colibri iMX7
devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoarm: dts: imx7: colibri: add usdhci peripherals to device tree
Stefan Agner [Tue, 8 Jan 2019 11:42:32 +0000 (12:42 +0100)]
arm: dts: imx7: colibri: add usdhci peripherals to device tree

Add usdhci peripherals to device tree. This allows to use DM_MMC
for Colibri iMX7 devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoconfigs: colibri_imx7: use separate device tree
Stefan Agner [Tue, 8 Jan 2019 11:42:31 +0000 (12:42 +0100)]
configs: colibri_imx7: use separate device tree

Use OF_SEPARATE as suggested by the build system.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoconfigs: colibri_imx7: enable DM for raw NAND devices
Stefan Agner [Tue, 8 Jan 2019 11:42:30 +0000 (12:42 +0100)]
configs: colibri_imx7: enable DM for raw NAND devices

Use DM and device trees for raw NAND devices by default. This
fixes -74 NAND read errors since it makes sure the ECC settings
are the same as used in Linux and our downstream U-Boot.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
5 years agoarm: dts: imx7: colibri: split dt for raw NAND and eMMC devices
Stefan Agner [Tue, 8 Jan 2019 11:42:29 +0000 (12:42 +0100)]
arm: dts: imx7: colibri: split dt for raw NAND and eMMC devices

In preparation of adding CONFIG_DM_MMC support use separate device
trees for raw NAND and eMMC devices.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agocolibri_imx7: fix boot commands
Stefan Agner [Tue, 8 Jan 2019 11:42:28 +0000 (12:42 +0100)]
colibri_imx7: fix boot commands

Fix mixed up boot commands between raw NAND and eMMC variant. Also
make sure that the boot_file is defined for the eMMC boot command.

Fixes: a62c60610f51 ("colibri_imx7_emmc: add Colibri iMX7D 1GB (eMMC) module support")
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
5 years agoRevert "tools: imx8image: set dcd_skip to true"
Fabio Estevam [Fri, 18 Jan 2019 13:00:11 +0000 (11:00 -0200)]
Revert "tools: imx8image: set dcd_skip to true"

This reverts commit f7e475db4011d18b4ae974154eb022c3af6a4d16.

This commit breaks the boot on imx8qxp evk and it should only
be re-applied after imx8qxp evk is converted to SPL.

Revert it for now, so that imx8qxp evk can be functional.

Reported-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
5 years agotools: imx8image: use correct printf escape sequence
Heinrich Schuchardt [Mon, 17 Dec 2018 09:22:21 +0000 (10:22 +0100)]
tools: imx8image: use correct printf escape sequence

core is of type uint64_t. So for printing we need "%"PRIu64 (not "%lu").

Without the patch a warning is issued when building on a 32bit system.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agom53menlo: fix addmtd cmd in default environment
Olaf Mandel [Wed, 12 Dec 2018 13:43:43 +0000 (13:43 +0000)]
m53menlo: fix addmtd cmd in default environment

The original definition added the string mtdparts= to the Linux Kernel
args twice: mtdparts=mtdparts=. Fix that.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Reviewed-by: Marek Vasut <marex@denx.de>
5 years agom53menlo: fix splashfile location
Olaf Mandel [Wed, 12 Dec 2018 13:42:00 +0000 (13:42 +0000)]
m53menlo: fix splashfile location

After merging the boot partition into the root partition, the splashfile
resides in the /boot subdirectory: update the default environment to
reflect that.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Reviewed-by: Marek Vasut <marex@denx.de>
5 years agopico-imx7d: Add LCD support
Fabio Estevam [Tue, 11 Dec 2018 18:40:38 +0000 (16:40 -0200)]
pico-imx7d: 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>
5 years agomx7: Do not call lcdif_power_down() in the SPL case
Fabio Estevam [Tue, 11 Dec 2018 18:40:37 +0000 (16:40 -0200)]
mx7: Do not call lcdif_power_down() in the SPL case

Like it was done on imx6 in commit 9236269de57d ("imx: mx6: Fix
implementantion reset_misc")

Do not call lcdif_power_down() in the SPL case to fix the following
build error:

  LD      spl/u-boot-spl
  MKIMAGE u-boot.img
arch/arm/mach-imx/built-in.o: In function `reset_misc':
/home/fabio/ossystems/u-boot/arch/arm/mach-imx/mx7/soc.c:372: undefined reference to `lcdif_power_down'
scripts/Makefile.spl:375: recipe for target 'spl/u-boot-spl' failed

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
5 years agoimx: Add PHYTEC phyBOARD-i.MX6UL-Segin
Martyn Welch [Tue, 11 Dec 2018 11:34:46 +0000 (11:34 +0000)]
imx: Add PHYTEC phyBOARD-i.MX6UL-Segin

Port for the PHYTEC phyBOARD-i.MX6UL-Segin single board computer. Based on
the PHYTEC phyCORE-i.MX6UL SOM (PCL063).

CPU:   Freescale i.MX6UL rev1.2 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 44C
Reset cause: POR
Board: PHYTEC phyCORE-i.MX6UL
I2C:   ready
DRAM:  256 MiB
NAND:  512 MiB
MMC:   FSL_SDHC: 0
In:    serial
Out:   serial
Err:   serial
Net:   FEC0

Working:
 - Eth0
 - i2C
 - MMC/SD
 - NAND
 - UART (1 & 5)
 - USB (host & otg)

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
5 years agoEnable FEC driver to retrieve PHY address from device tree
Martyn Welch [Tue, 11 Dec 2018 11:34:45 +0000 (11:34 +0000)]
Enable FEC driver to retrieve PHY address from device tree

Currently if we have more than one phy on the MDIO bus, we do not have a
good mechanism for determining which should be used at runtime. Enable the
FEC driver to determine the address for the PHY from the device tree.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agoimx: hab: Convert non-NULL IVT DCD pointer warning to an error
Breno Matheus Lima [Fri, 7 Dec 2018 22:31:49 +0000 (22:31 +0000)]
imx: hab: Convert non-NULL IVT DCD pointer warning to an error

The following NXP application notes and manual recommend to ensure the
IVT DCD pointer is Null prior to calling HAB API authenticate_image()
function:

- AN12263: HABv4 RVT Guidelines and Recommendations
- AN4581: Secure Boot on i.MX50, i.MX53, i.MX 6 and i.MX7 Series using
  HABv4
- CST docs: High Assurance Boot Version 4 Application Programming
  Interface Reference Manual

Commit ca89df7dd46f ("imx: hab: Convert DCD non-NULL error to warning")
converted DCD non-NULL error to warning due to the lack of documentation
at the time of first patch submission. We have warned U-Boot users since
v2018.03, and it makes sense now to follow the NXP recommendation to
ensure the IVT DCD pointer is Null.

DCD commands should only be present in the initial boot image loaded by
the SoC ROM. Starting in HAB v4.3.7 the HAB code  will generate an error
if a DCD pointer is present in an image being authenticated by calling the
HAB RVT API. Older versions of HAB will process and run DCD if it is
present, and this could lead to an incorrect authentication boot flow.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
5 years agolinker: Modify linker scripts to be more generic
Tom Rini [Tue, 22 Jan 2019 22:09:26 +0000 (17:09 -0500)]
linker: Modify linker scripts to be more generic

Make use of "IMAGE_MAX_SIZE" and "IMAGE_TEXT_BASE" rather than
CONFIG_SPL_MAX_SIZE and CONFIG_SPL_TEXT_BASE.  This lets us re-use the
same script for both SPL and TPL.  Add logic to scripts/Makefile.spl to
pass in the right value when preprocessing the script.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jagan Teki <jagan@openedev.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Andreas Bießmann <andreas@biessmann.org>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Adam Ford <aford173@gmail.com> #da850evm & omap3_logic_somlv
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agorockchip: Add TPL_MAX_SIZE for RK3288
Tom Rini [Tue, 22 Jan 2019 22:09:25 +0000 (17:09 -0500)]
rockchip: Add TPL_MAX_SIZE for RK3288

Per Kever Yang, 32768 is a reasonable max size for TPL on RK3288.

Cc: Kever Yang <kever.yang@rock-chips.com>
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 years agoPowerPC: Stop re-using CONFIG_SPL_TEXT_BASE for TPL
Tom Rini [Tue, 22 Jan 2019 22:09:24 +0000 (17:09 -0500)]
PowerPC: Stop re-using CONFIG_SPL_TEXT_BASE for TPL

Rather than checking for CONFIG_TPL_BUILD and then re-defining
CONFIG_SPL_TEXT_BASE make use of CONFIG_TPL_TEXT_BASE directly.

Cc: York Sun <york.sun@nxp.com>
Cc: Po Liu <po.liu@nxp.com>
Cc: Qiang Zhao <qiang.zhao@nxp.com>
Cc: Timur Tabi <timur@tabi.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch '2019-01-25-master-imports'
Tom Rini [Sun, 27 Jan 2019 03:47:55 +0000 (22:47 -0500)]
Merge branch '2019-01-25-master-imports'

- snapdragon 820c improvements
- poplar updates
- DFU + SPL cleanups
- Improve the mediatek mmc driver
- Other minor cleanups / improvements