Adam Ford [Wed, 7 Aug 2019 17:05:59 +0000 (12:05 -0500)]
ARM: imx6q_logic: Enable DM_SERIAL
In order to call preloader_console_init from board_init_f when
DM_SERIAL is enabled, it neesd to call spl_early_init() to get early access
to DM and device tree.
This patch calls spl_early_init just before preloader_console_init()
and enables DM_SERIAL and SPL_DM_SERIAL.
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Adam Ford [Wed, 7 Aug 2019 17:05:58 +0000 (12:05 -0500)]
ARM: imx6qlogic: Cleanup board_init_f
Per the workflow found in crt0.S, we don't need to clear BSS in
board_init_f nor do we need to call board_init_r since that will be
done for us from main when we return from board_init_f.
This patch removes the unneeded function calls from board_init_f.
Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Breno Matheus Lima [Thu, 18 Jul 2019 20:44:31 +0000 (20:44 +0000)]
mx6ulevk: Include SDP boot instructions in README
Add instructions on how to boot mx6ul_14x14_evk_defconfig target
using the Serial Download Protocol.
Add examples from uuu and imx_usb_loader tools.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Jacky Bai [Thu, 8 Aug 2019 09:59:11 +0000 (09:59 +0000)]
ddr: imx8m: Fix the ddr init hang on imx8mq
On, i.MX8MQ, the PLL config must be done when ddrmix
isolation is released. So move the dram pll init after
iso config done. For other i.MX8M SOC, either init pll
before or after isolation is ok.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Jacky Bai [Thu, 8 Aug 2019 09:59:08 +0000 (09:59 +0000)]
driver: ddr: Refine the ddr init driver on imx8m
Refine the ddr init driver to make it more reusable for different
DDR type(LPDDR4, DDR4 & DDR3L). So we can reduce some redundant
code.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Bai Ping [Thu, 8 Aug 2019 09:59:05 +0000 (09:59 +0000)]
imx8mq: Update the ddrc QoS setting for B1 chip
Update the ddrc Qos setting for B1 to align with B0's setting.
Correct the initial clock for dram_pll. This setting will be
overwrite before ddr phy training. Although there is no impact
on the dram init, we still need to correct it to eliminate
confusion.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Tested-by: Robby Cai <robby.cai@nxp.com>
Ye Li [Thu, 8 Aug 2019 09:59:02 +0000 (09:59 +0000)]
ddr: imx8m: Fix ddr4 driver build issue
Since the parameter of dram_pll_init is changed, update to use new.
Also remove non-existed header file.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 14 Aug 2019 11:31:40 +0000 (11:31 +0000)]
spi: fsl_qspi: Add support for QSPI on iMX7ULP
Add the compatible string and driver data for iMX7ULP platform
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 14 Aug 2019 11:31:36 +0000 (11:31 +0000)]
spi: fsl_qspi: Update to use driver data
Add the driver data for each compatible string. So we can remove the
SOC config and use driver data instead.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 14 Aug 2019 11:31:31 +0000 (11:31 +0000)]
spi: fsl_qspi: Update write data size for page program LUT
The write data size can be overwritten by writing to the IDATSZ
field of IPCR register. Since the driver always updates the IDATSZ
in page program operation. Set the LUT data size to 0 to align
the codes with iMX.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 14 Aug 2019 11:31:27 +0000 (11:31 +0000)]
spi: fsl_qspi: Fix DDR mode setting for latest iMX platforms
On latest iMX platforms like iMX7D/iMX6UL/iMX8MQ, the QSPI controller
is updated to have TDH field in FLSHCR register. According to reference
manual, this TDH must be set to 1 when DDR_EN is set. Otherwise, the TX
DDR delay logic won't be enabled.
Another issue in DDR mode is the MCR register will be overwritten in
every read/write/erase operation. This causes DDR_EN been cleared while
TDH=1, then no clk2x output for TX data shift and all operations will
fail.
Signed-off-by: Ye Li <ye.li@nxp.com>
Parthiban Nallathambi [Fri, 23 Aug 2019 16:35:10 +0000 (18:35 +0200)]
imx: nandbcb: include long help only when enabled
conditionally include long help text when enabled
Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Parthiban Nallathambi [Fri, 23 Aug 2019 16:35:09 +0000 (18:35 +0200)]
imx: initialize fec only when enabled
board early initialize fec ethernet controller pinmux
only when FEC is enabled
Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Parthiban Nallathambi [Fri, 23 Aug 2019 16:35:08 +0000 (18:35 +0200)]
imx: remove board specific boot order from spl
boot order was added to handle both SD and eMMC. But commit
14d319b1 introduced to handle both eMMC and SD globally.
Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Parthiban Nallathambi [Fri, 23 Aug 2019 16:19:48 +0000 (18:19 +0200)]
imx: pcl063: add nand boot support
Booting from NAND needs nandbcb and nand boot device selection
Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Igor Opaniuk [Fri, 23 Aug 2019 17:00:49 +0000 (20:00 +0300)]
apalis_imx6: use distroboot by default
Use distro_bootcmd as default bootcmd instead of legacy wrappers.
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Igor Opaniuk [Fri, 23 Aug 2019 17:00:48 +0000 (20:00 +0300)]
colibri_imx6/imx7/imx8x: use distroboot by default
Use distro_bootcmd as defauult bootcmd instead of legacy wrappers.
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Peng Fan [Mon, 23 Sep 2019 10:12:31 +0000 (10:12 +0000)]
misc: imx8: add more scfw api
Add more scfw api for clk/partition/seco usage
The api will be used by ccf/partition/secure boot.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Mon, 23 Sep 2019 02:18:48 +0000 (10:18 +0800)]
spl: nor: 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>
Peng Fan [Mon, 23 Sep 2019 02:18:47 +0000 (10:18 +0800)]
spl: spi: 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>
Peng Fan [Mon, 23 Sep 2019 02:18:46 +0000 (10:18 +0800)]
spl: nand: 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>
Peng Fan [Mon, 23 Sep 2019 02:18:45 +0000 (10:18 +0800)]
imx8: update README
After u-boot.cnt is padded to flash.bin automatically by script,
no need to burn the image mannually, so drop the step.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Mon, 23 Sep 2019 02:18:44 +0000 (10:18 +0800)]
imx8: Add support to get container image set size
To avoid hardcoded offset when adding u-boot.cnt to flash.bin, we use
flexible offset which is calculated based on the size of the container
image generated int the first stage. And pad u-boot.cnt at 1KB
alignment.
So add code to get the offset when SPL loading u-boot.cnt.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Mon, 23 Sep 2019 02:18:43 +0000 (10:18 +0800)]
spl: nand: Introduce spl_nand_get_uboot_raw_page
Introduce weak spl_nand_get_uboot_raw_page, then platform could
have their own implementation.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Peng Fan [Mon, 23 Sep 2019 02:18:42 +0000 (10:18 +0800)]
spl: nor: introduce spl_nor_get_uboot_base
Introduce weak spl_nor_get_uboot_base, then platform have their own
implementation.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Peng Fan [Mon, 23 Sep 2019 02:18:41 +0000 (10:18 +0800)]
spl: spi: introduce spl_spi_get_uboot_offs
Introduce a weak function spl_spi_get_uboot_offs, then
platform could have their own implementation.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Peng Fan [Mon, 23 Sep 2019 02:18:40 +0000 (10:18 +0800)]
spl: mmc: introduce spl_mmc_get_uboot_raw_sector
Introduce a weak function spl_mmc_get_uboot_raw_sector, then platform
could have their own implementation.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tien Fong Chee <tien.fong.chee@intel.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Andreas Dannenberg <dannenberg@ti.com>
Cc: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Peng Fan [Tue, 27 Aug 2019 06:26:08 +0000 (06:26 +0000)]
imx: Add i.MX8MM EVK board support.
Add board and SoC dts
Add ddr training code
support SD/MMC/GPIO/PINCTRL/UART
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:26:04 +0000 (06:26 +0000)]
arm: dts: add i.MX8MM pin func
Import i.MX8MM pin func from Linux Kernel,
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>
Peng Fan [Tue, 27 Aug 2019 06:26:01 +0000 (06:26 +0000)]
arm: dts: import i.MX8MM dtsi
Import i.MX8MM dtsi from Linux Kernel,
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>
Peng Fan [Tue, 27 Aug 2019 06:25:58 +0000 (06:25 +0000)]
imx8m: soc: probe clock device in arch_cpu_init_dm
Because we need to get cpu freq in print_cpuinfo at very early stage,
so we need to make sure the ccm be probed.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:54 +0000 (06:25 +0000)]
imx: mmc_env: update runtime SD/MMC boot env device
When DM_MMC enabled, the USDHC index in U-Boot is the USDHC port.
To directly return devno, we could avoid add board specific code.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:51 +0000 (06:25 +0000)]
imx8m: add clk support for i.MX8MM
Introduce clk implementation for i.MX8MM, including pll configuration,
ccm configuration. Mostly will be done clk dm driver,
but such as DRAM part, we still use non clk dm driver, because we
have limited sram.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:48 +0000 (06:25 +0000)]
imx8m: restructure clock.h
i.MX8MQ and i.MX8MM use different analog pll design, but they
share same ccm design.
Add clock_imx8mq.h for i.MX8MQ
keep common part in clock.h
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:44 +0000 (06:25 +0000)]
imx8m: rename clock to clock_imx8mq
i.MX8MQ and i.MX8MM has totally different pll design, so
rename clock to clock_imx8mq.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:41 +0000 (06:25 +0000)]
imx8m: restrict reset_cpu
Make reset_cpu only visible when CONFIG_SYSRESET not defined
or CONFIG_SPL_BUILD.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:37 +0000 (06:25 +0000)]
imx8m: soc: enable SCTR clock before timer init
To i.MX8MM SCTR clock is disabled by ROM, so before timer init
need to enable it.
To i.MX8MQ, it does not hurt the clock is enabled again.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 27 Aug 2019 06:25:34 +0000 (06:25 +0000)]
imx8m: Configure trustzone region 0 for non-secure access
Set trustzone region 0 to allow both non-secure and secure access
when trust zone is enabled. We found USB controller fails to access
DDR if the default region 0 is secure access only.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:30 +0000 (06:25 +0000)]
imx8m: set BYPASS ID SWAP to avoid AXI bus errors
set the BYPASS ID SWAP bit (GPR10 bit 1) in order for GPU not to
generated AXI bus errors with TZC380 enabled.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:27 +0000 (06:25 +0000)]
imx8m: Fix MMU table issue for OPTEE memory
When running with OPTEE, the MMU table in u-boot does not remove the OPTEE
memory from its settings. So ARM speculative prefetch in u-boot may access
that OPTEE memory. Due to trust zone is enabled by OPTEE and that memory
is set to secure access, then the speculative prefetch will fail and cause
various memory issue in u-boot.
The fail address register and int_status register in trustzone has logged
that speculative access from u-boot.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:23 +0000 (06:25 +0000)]
imx: add i.MX8MM PE property
i.MX8MM does not have LVTTL, it has a PE property
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:20 +0000 (06:25 +0000)]
imx8m: add pin header for i.MX8MM
Add pin header file for i.MX8MM
To IMX8MM_PAD_NAND_WE_B_USDHC3_CLK, IOMUX_CONFIG_SION needs to be
selected.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:17 +0000 (06:25 +0000)]
imx: add get_cpu_rev support for i.MX8MM
There are several variants based on i.MX8MM, add the support in
get_cpu_rev
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:14 +0000 (06:25 +0000)]
imx8m: update imx-regs for i.MX8MM
i.MX8MM has similar architecture with i.MX8MQ, but it has totally
different PLL design and register layout change.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:10 +0000 (06:25 +0000)]
imx8m: imx-regs: drop unused register definitions
Drop unused register definitions and structures for i.MX8MQ
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:07 +0000 (06:25 +0000)]
imx: spl: add spl_board_boot_device for i.MX8MM
Differnet board has different controller used, it is
hard to use one layout for them all.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:04 +0000 (06:25 +0000)]
imx: add i.MX8MM cpu type
Add i.MX8MM cpu type and related helper functions
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:25:01 +0000 (06:25 +0000)]
imx: imx8mm: add clock bindings header
Import clock bindings header file from Linux 5.3.0-rc2
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:24:57 +0000 (06:24 +0000)]
imx: add IMX8MM kconfig entry
Add IMX8MM kconfig entry
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:24:54 +0000 (06:24 +0000)]
imx: add IMX8MQ kconfig entry
Add IMX8MQ kconfig entry, preparing support IMX8MM
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:24:50 +0000 (06:24 +0000)]
imx8m: add image cfg for i.MX8MM lpddr4
There is no HDMI on i.MX8MM, so we need to remove HDMI entry, then
we could not reuse imximage.cfg, so create a new one.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:24:47 +0000 (06:24 +0000)]
ddr: imx8m: fix ddr firmware location when enable SPL OF
With CONFIG_SPL_OF_CONTROL, the device tree will be padded to
end of the u-boot-spl-nodtb.bin, however we also put
the ddr firmware file to this location, so need to adapt
the code with SPL OF and align to 4 bytes to ease copy firmware.
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 27 Aug 2019 06:24:43 +0000 (06:24 +0000)]
tools: imx8m_image: align spl bin image size
The loader for the DDR firmware in drivers/ddr/imx/imx8m/helper.c uses a
4-byte-aligned address to load the firmware. In cases where OF is
enabled in SPL the dtb will be appended to the SPL binary and can result
in a binary that is not aligned correctly. If OF is not enabled in SPL,
`_end` is already aligned correctly, but this patch does not hurt.
To ensure the correct alignment we use dd to create a temporary file
u-boot-spl-pad.bin with the correct padding.
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Frieder Schrempf [Tue, 27 Aug 2019 06:24:40 +0000 (06:24 +0000)]
imx: mkimage_fit_atf: Fix FIT image for correct boot order
Fix the FIT image metadata for i.MX8 to result in the intended boot
order (SPL -> ATF -> U-Boot).
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Stefan Roese [Fri, 20 Sep 2019 16:09:10 +0000 (18:09 +0200)]
Kconfig: Set default BUILD_TARGET for ARCH_MX6 with SPL
Use BUILD_TARGET to automatically build "u-boot-with-spl.imx" on MX6
targets with SPL.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Stefan Roese [Fri, 20 Sep 2019 16:09:09 +0000 (18:09 +0200)]
ARM: imx: arch/arm/mach-imx/spl_qspi.cfg
Similar to "spl_sd.cfg", this patch introduces "spl_qspi.cfg" so that
all i.MX6 based boards can use it, when they use SPL and QSPI boot
mode.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Stefan Roese [Fri, 20 Sep 2019 16:09:08 +0000 (18:09 +0200)]
ARM: imx: Add QSPI boot mode for i.MX6UL/ULL
This patch adds the missing boot mode detection for QSPI boot on
i.MX6UL/ULL. Without it, booting with SPL from QSPI NOR does not work.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Anatolij Gustschin [Mon, 23 Sep 2019 16:05:05 +0000 (18:05 +0200)]
imx: mx6ul_14x14_evk: fix link issue
Since recent splash changes common code for splashscreen logo
should be used instead of adding duplicated code under board
directories. mx6ul_9x9_evk and mx6ul_14x14_evk configurations
used old board specific logo code and do not link, fix them.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
Breno Matheus Lima [Mon, 23 Sep 2019 18:39:47 +0000 (18:39 +0000)]
imx: Kconfig: Reduce default CONFIG_CSF_SIZE
The default CSF_SIZE defined in Kconfig is too high and SPL cannot
fit into the OCRAM in certain cases.
The CSF cannot achieve 0x2000 length when using RSA 4K key which is
the largest key size supported by HABv4.
According to AN12056 "Encrypted Boot on HABv4 and CAAM Enabled Devices"
it's recommended to pad CSF binary to 0x2000 and append DEK blob to
deploy encrypted boot images.
As the maximum DEK blob size is 0x58 we can reduce CSF_SIZE to 0x2060
which should cover both CSF and DEK blob length.
Update default_image.c and image.c to align with this change and avoid
a U-Boot proper authentication failure in HAB closed devices:
Authenticate image from DDR location 0x877fffc0...
bad magic magic=0x32 length=0x6131 version=0x38
bad length magic=0x32 length=0x6131 version=0x38
bad version magic=0x32 length=0x6131 version=0x38
spl: ERROR: image authentication fail
Fixes:
96d27fb218 (Revert "habv4: tools: Avoid hardcoded CSF size for SPL targets")
Reported-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Patrick Wildt [Thu, 3 Oct 2019 14:13:24 +0000 (16:13 +0200)]
imx: enable the reset controller on the i.MX8MQ EVK
This patch makes sure that the reset controller driver is compiled
for the i.MX8MQ EVK.
Signed-off-by: Patrick Wildt <patrick@blueri.se>
Patrick Wildt [Thu, 3 Oct 2019 14:12:57 +0000 (16:12 +0200)]
imx: add the i.MX8M reset controller node
This patch adds the reset controller node to the i.MX8MQ SoC
device tree.
Signed-off-by: Patrick Wildt <patrick@blueri.se>
Patrick Wildt [Thu, 3 Oct 2019 14:08:35 +0000 (16:08 +0200)]
imx: add support for i.MX7/i.MX8MQ reset controller
Add support for the reset controller that's used on the i.MX7D
and i.MX8MQ. This will be needed to be able to assert the PCIe
reset pins. Bindings taken from Linux, driver implementation
mostly taken from Linux and adjusted to U-Boot infrastructure.
Signed-off-by: Patrick Wildt <patrick@blueri.se>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Patrick Wildt [Thu, 3 Oct 2019 13:51:50 +0000 (15:51 +0200)]
imx: add support for i.MX8MQ power domain controller
Add support for the power domain controller that's used on the
i.MX8MQ. This will be needed to be able to power on the PCIe
controller. Bindings taken from Linux, driver implementation
taken from the i.MX8 power domain controller and adjusted for
the i.MX8M SoC.
Signed-off-by: Patrick Wildt <patrick@blueri.se>
Parthiban Nallathambi [Thu, 26 Sep 2019 13:47:08 +0000 (15:47 +0200)]
ARM: dts: pcl063: add usdhc reset pin of eMMC
pcl063 phycore SoM with eMMC also got usdhc reset pin,
add reset pin to pinmux.
Signed-off-by: Parthiban Nallathambi <pn@denx.de>
Fabio Estevam [Fri, 4 Oct 2019 11:05:58 +0000 (08:05 -0300)]
imx: mxs: Fix location for the elftosb tool
The Denx FTP location is no longer reachable.
Switch to the Timesys repository instead.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Fabio Estevam [Fri, 4 Oct 2019 11:05:57 +0000 (08:05 -0300)]
mx28evk: README: Fix location for the generic mxs README
doc/README.mxs no longer exists. It has been renamed doc/imx/common/mxs.txt,
so fix the mx28evk README accordingly.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Anatolij Gustschin [Fri, 20 Sep 2019 20:49:06 +0000 (22:49 +0200)]
imx: wandboard: convert FEC support to DM_ETH
Remove CONFIG_DM_ETH conversion warning to avoid board removal.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:55:01 +0000 (09:55 +0200)]
spi: Add support for SPL_OF_PLATDATA to mxs_gpio.c driver
After this patch the mxs_gpio.c DM/DTS driver can be used at early SPL to
read states of gpio pins (and for example alter the boot flow).
It was necessary to adjust its name to 'fsl_imx_2{38}_gpio' to match
requirements for SPL_OF_PLATDATA usage.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:55:00 +0000 (09:55 +0200)]
mmc: Replace printf with debug call for timeouts in the i.MX28 mxs driver
This change replaces printf() with debug() for the notification about
commands timeouts.
This is done on purpose (also other drivers use such approach - dw_mmc.c,
mvebu_mmc.c), as the mmc core code (mmc.c) uses timeouts to assess if one
is using sd card or eMMC device.
In such situation timeout is a some kind of a "normal" behavior and there
shall not be any output to the console.
There is no impact on boot time for boards using this driver (even in SPL)
when two extra timeouts are returned (no SD card present, only eMMC
available).
Boot time tested with grabserial:
sudo grabserial -b 115200 -d /dev/ttyUSB1 -e 30 -t -m "^U-Boot SPL*"
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:59 +0000 (09:54 +0200)]
mmc: Convert mxsmmc eMMC driver for i.MX2{38} to DM/DTS
This patch converts the mxsmmc driver to support DM/DTS.
Moreover, it is also possible to use it in early SPL with
SPL_OF_PLATDATA enabled.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:58 +0000 (09:54 +0200)]
spi: Add support for SPL_OF_PLATDATA to mxs_spi.c driver
After this patch the mxs_spi.c DM/DTS driver can be used at early SPL to
read payload from SPI-NOR memories.
It was necessary to adjust its name to 'fsl_imx_2{38}_spi' to match
requirements for SPL_OF_PLATDATA usage.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:57 +0000 (09:54 +0200)]
spi: fix: Call mxs_reset_block() during DM/DTS probe
Without this change the DM/DTS version of mxs_spi driver doesn't reset the
SPI IP block in probe.
As a result this driver (when used solely on U-Boot proper) relies on reset
performed by mxs spi driver in SPL.
In the use case where eMMC is used in SPL as a boot primary device, the
mxs_reset_block() is not called at all and DM/DTS aware SPI driver in
U-Boot proper is malfunctioning.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:56 +0000 (09:54 +0200)]
spl: Init proper struct driver member (platdata_auto_alloc_size) for mxs_spi
This change initializes proper member of struct driver -
platdata_auto_alloc_size instead of priv_auto_alloc_size, which is setup
twice.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Thu, 5 Sep 2019 07:54:55 +0000 (09:54 +0200)]
dts: imx28: Remove #include "imx28.dtsi" from imx28-u-boot.dtsi file
After this change it is possible to use imx28-<board>-u-boot.dtsi with
the imx28-u-boot.dtsi explicitly included without breaking setup from
imx28-<board>.dts file.
The problem is that the imx28.dtsi included in a wrong place overrides the
changes made in imx28-<board>.dts. As a result some devices are "disabled"
in the final DTB.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Mon, 9 Sep 2019 13:32:13 +0000 (15:32 +0200)]
imx: Introduce CONFIG_SPL_FORCE_MMC_BOOT to force MMC boot on falcon mode
This change tries to fix the following problem:
- The board boots (to be more precise - ROM loads SPL) from a slow SPI-NOR
memory.
As a result the spl_boot_device() will return SPI-NOR as a boot device
(which is correct).
- The problem is that in 'falcon boot' the eMMC is used as a boot medium to
load kernel from its partition.
Calling spl_boot_device() will break things as it returns SPI-NOR device.
To fix this issue the new CONFIG_SPL_FORCE_MMC_BOOT Kconfig flag is
introduced to handle this special use case. By default it is not defined,
so there is no change in the legacy code flow.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:50 +0000 (16:38 +0200)]
imx: Rewrite display5 get_board_id() function to use dm_gpio_* API
The get_board_id() function was using the old gpio_* compatibility layer
to read HW and SW ID numbers encoded on the PCB board.
After this change the new dm_gpio* API is used for this purpose.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:49 +0000 (16:38 +0200)]
imx: Convert emergency pad of display5 to use dm_gpio* functions
After this change the display5's emergency gpio use dm_gpio* functions
instead of legacy ones (gpio*) to read its state.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:47 +0000 (16:38 +0200)]
ARM: Update display5_factory_defconfig after switch to DM/DTS and uuu utility
This commit updates the display5_factory_defconfig file after the switch
to DM/DTS for this board.
Moreover, the VID and PID for SPL running SDP gadget have been updated to
allow seamless work with 'uuu' utility from NXP (the imx_usb doesn't work
properly after embedding the u-boot proper into fitImage - problem with IVT
embedding in FIT).
Example to use 'uuu' session:
cat << EOF > display5_recovery.lst
uuu_version 1.2.135
SDP: boot -f /srv/tftp/SPL
SDPU: write -f /srv/tftp/u-boot-dtb.img -addr 0x10000000
SDPU: jump -addr 0x10000000
SDPU: done
EOF
sudo ./uuu/uuu display5_recovery.lst
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:46 +0000 (16:38 +0200)]
ARM: display5: Remove common.c file (after DM/DTS U-Boot proper conversion)
The common.c file content can be safely moved to spl.c file after
performing the DM/DTS conversion for the U-Boot proper.
It contains the non DM/DTS setup code, which now is only used by SPL.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:45 +0000 (16:38 +0200)]
DM: WDT: Convert WDT driver to use DM/DTS (including SYSRESET)
This commit enables support for CONFIG_WDT in the U-Boot proper. Moreover,
the SYSRESET_WATCHDOG driver is used to support 'reset' command.
As SPL is not yet ready for DM conversion, the CONFIG_HW_WATCHDOG is
enabled for it. This allows the legacy SPL code to work properly.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:44 +0000 (16:38 +0200)]
ARM: display5: Remove UART initialization code after DM/DTS conversion (non-console)
This UART is not used in U-Boot, so there is no need to initialize it.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:43 +0000 (16:38 +0200)]
DM: SPI: Convert display5 to use SPI with DM/DTS (but no in SPL)
The DM/DTS support for SPI is disabled on purpose for SPL, as it is not
supported as of time of this conversion.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:42 +0000 (16:38 +0200)]
DM: eth: Switch display5 board to use DM_ETH
After this commit the display5 device would use FEC driver supporting
driver model (DM_ETH).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:41 +0000 (16:38 +0200)]
DM: mmc: Switch display5 board to use DM_MMC and BLK (USDHC)
After this commit the display5 device would use eMMC driver supporting
driver model (DM_MMC and BLK).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:40 +0000 (16:38 +0200)]
ARM: imx: defconfig: Enable 'regulator' and 'pmic' commands on display5
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:39 +0000 (16:38 +0200)]
DM: I2C: Switch display5 board to use DM_I2C
After this commit the display5 device would use I2C driver supporting
driver model (DM_I2C).
The 'i2c' and 'eeprom' commands now use DM I2C drivers and initialize
on-bus devices according to device tree description.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:38 +0000 (16:38 +0200)]
ARM: imx: defconfig: Enable CONFIG_PINCTRL{_IMX6} on display5's defconfig
Enable PINCTRL for i.MX6 soc based display5 after DM/DTS conversion.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Tue, 3 Sep 2019 14:38:37 +0000 (16:38 +0200)]
fix: defconfig: Enable OF_CONTROL for display5_factory
This change fixes issue with building display5 "factory" U-Boot variant
when the display5 board gains DM/DTS support.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Lukasz Majewski [Sat, 27 Jul 2019 22:17:05 +0000 (00:17 +0200)]
imx: bk4: Print proper HW revision of VF610's BK4 board
This code uses HW difference on the USB_RESET pin (added PULL UP resistor
on the L333 rev) to distinguish between two BK4 HW revisions.
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Fabio Estevam [Wed, 18 Sep 2019 01:04:57 +0000 (22:04 -0300)]
pico-imx6: Add Falcon mode
Add Falcon mode support, which allows the SPL to load and
jump to the Linux kernel directly, without the need of loading
U-Boot proper.
CONFIG_SPL_OS_BOOT=y needs to be passed in the defconfig
in order to use Falcon mode.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Fabio Estevam [Tue, 17 Sep 2019 17:17:07 +0000 (14:17 -0300)]
pico-imx6: Add splashscreen support
Add splashscreen support. Tested with the parallel
FT5x06-WVGA panel.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Fabio Estevam [Mon, 16 Sep 2019 17:15:00 +0000 (14:15 -0300)]
pico-imx6: Add Ethernet support
Add Ethernet support.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Otavio Salvador [Wed, 19 Jun 2019 18:03:44 +0000 (15:03 -0300)]
pico-imx6: Fix bootmenu handling
We should use a common script to allow booting the U-Boot console as
fallback so we ended using a 'default_boot' and 'base_boot'
environment scripts to accomplish that.
Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Fabio Estevam [Tue, 11 Jun 2019 01:24:12 +0000 (22:24 -0300)]
pico-imx6: Add initial support
Add the initial support for the pico-imx6 variants.
DDR initialization is based on the TechNexion's U-Boot code.
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>
Fabio Estevam [Fri, 12 Jul 2019 12:10:35 +0000 (09:10 -0300)]
mx6: clock: Allow enable_ipu_clock() to be built for SPL code
Allow enable_ipu_clock() to be built for SPL code. This is done
in preparation for configuring the NoC registers on i.MX6QP in SPL.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Fabio Estevam [Fri, 30 Aug 2019 16:58:29 +0000 (13:58 -0300)]
mx53loco: Fix U-Boot corruption after saving the environment
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: Otavio Salvador <otavio@ossystems.com.br>
Stefano Babic [Fri, 20 Sep 2019 06:51:29 +0000 (08:51 +0200)]
board: imx6dl_mamoj: set the value for CSF size
Default value is too high and it covers the worst case. SPL for
imx6dl_mamoj becomes too big and cannot fit into the OCRAM, but CSF size
can be reduced.
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Jagan Teki <jagan@amarulasolutions.com>
CC: Breno Lima <breno.lima@nxp.com>
Otavio Salvador [Mon, 16 Sep 2019 11:14:48 +0000 (08:14 -0300)]
configs: Sync all baseboard specific pico-imx7d
This syncs all baseboard specific defconfig using the
pico-imx7d_defconfig as base. It changes:
- pico-dwarf-imx7d_defconfig
- pico-hobbit-imx7d_defconfig
- pico-nymph-imx7d_defconfig
- pico-pi-imx7d_defconfig
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Joris Offouga [Fri, 30 Aug 2019 12:44:36 +0000 (14:44 +0200)]
configs: pico-imx7d: Convert to DM_VIDEO
This commit convert all pico-imx7d to DM_VIDEO
Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Joris Offouga [Fri, 30 Aug 2019 12:42:59 +0000 (14:42 +0200)]
ARM: dts: pico-imx7d: sync device tree with v5.3-rc6
Synchronize device tree with v5.3-rc6 label
Signed-off-by: Joris Offouga <offougajoris@gmail.com>