Peng Fan [Wed, 18 Oct 2017 06:06:10 +0000 (14:06 +0800)]
MLK-16602 imx8mq: enlarge uboot entry
Enlarge uboot entry and ENV offset, to leave space for TEE when using
fit.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Jean-Jacques Hiblot [Fri, 15 Sep 2017 10:57:27 +0000 (12:57 +0200)]
fit: If no matching config is found in fit_find_config_node(), use the default one
If board_fit_config_name_match() doesn't match any configuration node,
then use the default one (if provided).
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit
02035d0086b3f9114463a9b9df38a5618ffe8a04)
Peng Fan [Wed, 18 Oct 2017 01:56:36 +0000 (09:56 +0800)]
MLK-16599 imx8m: support SPL FIT
Support SPL FIT. Uboot text base are also modified, because spl
will load fit to address before text base of uboot.
According to new ATF request, modified the SPL stack/bss to OCRAM_S
space.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
York Sun [Fri, 15 Sep 2017 15:21:13 +0000 (08:21 -0700)]
spl: Fix compiling warning on gunzip argument
common/spl/spl_fit.c:201:12: warning: passing argument 4 of ‘gunzip’
from incompatible pointer type [-Wincompatible-pointer-types]
src, &length))
Signed-off-by: York Sun <york.sun@nxp.com>
Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
CC: Jean-Jacques Hiblot <jjhiblot@ti.com>
(cherry picked from commit
933f67aa56ea742f014b21bfe50a16a00e97b9bd)
York Sun [Tue, 15 Aug 2017 18:14:45 +0000 (11:14 -0700)]
spl: fit: Add booting OS first
If CONFIG_SPL_OS_BOOT is enabled, boot OS if kernel image is found
in FIT structure.
Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit
c8bc3c0c9ff7ce649b2af1416919b50ecf504874)
York Sun [Tue, 15 Aug 2017 18:14:44 +0000 (11:14 -0700)]
spl: fit: Support both external and embedded data
SPL supports U-Boot image in FIT format which has data outside of
FIT structure. This adds support for embedded data for normal FIT
images.
Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit
5fd13d973613d308663f97b51059ecd9179baf09)
York Sun [Tue, 15 Aug 2017 18:14:43 +0000 (11:14 -0700)]
spl: fit: Eanble GZIP support for image decompression
Add Kconfig option SPL_GZIP and SPL_ZLIB to enable gunzip support for
SPL boot, eg. falcon boot compressed kernel image.
Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit
7264f2928b46c5f5685e39ed607652c8991e47b6)
Cooper Jr., Franklin [Fri, 16 Jun 2017 22:25:05 +0000 (17:25 -0500)]
spl: fit: Break out some functions into a common file
Some of the functions within spl_fit will be used for non spl purposes.
Instead of duplicating functions simply break the functions to be reused
into its own file.
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Only add the new define to image.h, otherwise we see breakage
due to massive include leakage into host tools in some cases]
Signed-off-by: Tom Rini <trini@konsulko.com>
(cherry picked from commit
3863f840fa03f6b93672a5afff74f15d460cb911)
York Sun [Tue, 15 Aug 2017 18:14:42 +0000 (11:14 -0700)]
cmd: spl: Fix compiling warning
Fix warning "cast from pointer to integer of different size".
Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
(cherry picked from commit
d1f2ee7021dc4a89f43e25f289747a27da0e930f)
Andre Przywara [Wed, 26 Apr 2017 00:32:45 +0000 (01:32 +0100)]
Makefile: add rules to generate SPL FIT images
Some platforms require more complex U-Boot images than we can easily
generate via the mkimage command line, for instance to load additional
image files.
Introduce a CONFIG_SPL_FIT_SOURCE and CONFIG_SPL_FIT_GENERATOR symbol,
which can either hold an .its source file describing the image layout,
or, in the second case, a generator tool (script) to create such
a source file. This script gets passed the list of device tree files
from the CONFIG_OF_LIST variable.
A platform or board can define either of those in their defconfig file
to allow an easy building of such an image.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit
1a12fdc461421b5a385ab5d7926e5425d429d48e)
Andre Przywara [Wed, 26 Apr 2017 00:32:38 +0000 (01:32 +0100)]
Kconfig: fix SPL_FIT dependency
SPL_FIT obviously requires libfdt in SPL, so let Kconfig express that by
selecting SPL_OF_LIBFDT.
Also make the actual options that users want (SPL signature and SPL FIT
loading) visible in the menu and let them select the SPL_FIT as a
requirement.
Also remove the now redundant SPL_OF_LIBFDT from those Kconfigs that had
it in for the SPL FIT loading feature.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[Remove change from configs/evb-rk3399_defconfig]
Signed-off-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit
85c07a5a379e5874aef0e5a0560536a2e6fa6114)
Andre Przywara [Wed, 26 Apr 2017 00:32:37 +0000 (01:32 +0100)]
SPL: FIT: allow loading multiple images
So far we were not using the FIT image format to its full potential:
The SPL FIT loader was just loading the first image from the /images
node plus one of the listed DTBs.
Now with the refactored loader code it's easy to load an arbitrary
number of images in addition to the two mentioned above.
As described in the FIT image source file format description, iterate
over all images listed at the "loadables" property in the configuration
node and load every image at its desired location.
This allows to load any kind of images:
- firmware images to execute before U-Boot proper (for instance
ARM Trusted Firmware (ATF))
- firmware images for management processors (SCP, arisc, ...)
- firmware images for devices like WiFi controllers
- bit files for FPGAs
- additional configuration data
- kernels and/or ramdisks
The actual usage of this feature would be platform and/or board specific.
Also update the FIT documentation to mention the new SPL feature and
provide an example .its file to demonstrate its features.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lokesh Vutla <lokeshvuta@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit
411cf32d200aeca0754ce7083c51391af84cf612)
Andre Przywara [Wed, 26 Apr 2017 00:32:36 +0000 (01:32 +0100)]
SPL: FIT: factor out spl_load_fit_image()
At the moment we load two images from a FIT image: the actual U-Boot
image and the .dtb file. Both times we have very similar code, that deals
with alignment requirements the media we load from imposes upon us.
Factor out this code into a new function, which we just call twice.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit
8baa381882e8b5e8684b331f09b04e2e2784fb0d)
Andre Przywara [Wed, 26 Apr 2017 00:32:35 +0000 (01:32 +0100)]
SPL: FIT: improve error handling
At the moment we ignore any errors due to missing FIT properties,
instead go ahead and calculate our addresses with the -1 return value.
Fix this and bail out if any of the mandatory properties are missing.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit
5c8c8faccf0e660040ada1a9376b74a6807d4f5f)
Andre Przywara [Wed, 26 Apr 2017 00:32:34 +0000 (01:32 +0100)]
SPL: FIT: rework U-Boot image loading
Currently the SPL FIT loader always looks only for the first image in
the /images node a FIT tree, which it loads and later executes.
Generalize this by looking for a "firmware" property in the matched
configuration subnode, or, if that does not exist, for the first string
in the "loadables" property. Then using the string in that property,
load the image of that name from the /images node.
This still loads only one image at the moment, but refactors the code to
allow extending this in a following patch.
To simplify later re-usage, we also generalize the spl_fit_select_index()
function to not return the image location, but just the node offset.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lokesh Vutla <lokeshvuta@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit
736806fbfa7a0ffc2bc18c1521e42ac578b1ad1e)
Andre Przywara [Wed, 26 Apr 2017 00:32:33 +0000 (01:32 +0100)]
SPL: FIT: refactor FDT loading
Currently the SPL FIT loader uses the spl_fit_select_fdt() function to
find the offset to the right DTB within the FIT image.
For this it iterates over all subnodes of the /configuration node in
the FIT tree and compares all "description" strings therein using a
board specific matching function.
If that finds a match, it uses the string in the "fdt" property of that
subnode to locate the matching subnode in the /images node, which points
to the DTB data.
Now this works very well, but is quite specific to cover this particular
use case. To open up the door for a more generic usage, let's split this
function into:
1) a function that just returns the node offset for the matching
configuration node (spl_fit_find_config_node())
2) a function that returns the image data any given property in a given
configuration node points to, additionally using a given index into
a possbile list of strings (spl_fit_select_index())
This allows us to replace the specific function above by asking for the
image the _first string of the "fdt" property_ in the matching
configuration subnode points to.
This patch introduces no functional changes, it just refactors the code
to allow reusing it later.
(diff is overly clever here and produces a hard-to-read patch, so I
recommend to throw a look at the result instead).
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lokesh Vutla <lokeshvuta@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Jagan Teki <jagan@openedev.com>
(cherry picked from commit
4b9340abdc23f25b75282cdc8b84a06c8b10cd27)
ji.luo [Tue, 17 Oct 2017 07:52:07 +0000 (15:52 +0800)]
MA-10469 Fix build error for Android uboot
Add FASTBOOT_PARTITION_TEE definition for normal Android, this
will fix the build error in u-boot.
Change-Id: I7800e8370fbabe01d6d25e0a9f2b9e4578a805b0
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Thu, 28 Sep 2017 01:48:51 +0000 (09:48 +0800)]
MA-10346 Fix build error for imx6ul-spriot board
Fix CONFIG_BOOTDELAY redefine error for imx6ul-spriot board.
Change-Id: I949b6b815f9232e88cf72be853c8fca6f544b155
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Wed, 27 Sep 2017 07:59:52 +0000 (15:59 +0800)]
MA-10342 Revert "Fix get partition error in fastboot"
This reverts commit
82a7723b3f69c2631770d0f30ad16269e9d86389.
The partition 'tos' was hard coded in u-boot so this patch wasn't needed
anymore.
Change-Id: Ie1f651c7c813379dcd8768da0bc9a628d1741fd1
Signed-off-by: ji.luo <ji.luo@nxp.com>
Marty Faltesek [Wed, 30 Aug 2017 20:57:23 +0000 (13:57 -0700)]
MA-10341 Rename physical partition boot0 from bootloader to bootloader0.
On the imx7d, the bootloader currently in use resides on physical partition
boot0, and is currently referenced and hard coded as "bootloader". But
this conflicts with the new bootloader_a and bootloader_b in the gpt, so
that "fastboot flash bootloader ..." flashes to bootloader_a or b. With this
fix boot0 can instead by explicitly referenced as
"fastboot flash bootloader0 ...".
"bootloader0" is currently the only bootloader on the system, but
once a/b bootloading is implemented it is going to be a more SPL-like
that loads either bootloader_a or bootloader_b.
Test: manually verified flashing bootloader0, bootloader, and bootloader_a
and bootloader_b.
Change-Id: I03a85289f80cdf5f1b80dc07a962a143c6a351e1
ji.luo [Mon, 25 Sep 2017 12:44:54 +0000 (20:44 +0800)]
MA-10340 Don't pass dm-verity commandline to kernel
The dm-verity commandline has conflicts with system bootargs and we can't
determine whether dm-verity is opened by the commandline for now.
Change-Id: I043e82b6bc2ee67f476e8a90dcb8404b6dd7a0bf
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Wed, 20 Sep 2017 05:31:46 +0000 (13:31 +0800)]
MA-10339 Cancel the 3 seconds countdown before autoboot
Cancel the 3 seconds countdown and press anykey will not inetrrupt
autoboot process.
Change-Id: Iaf813795520da09dd02d0a0fca18ed8e3b9c2e39
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Wed, 6 Sep 2017 10:53:56 +0000 (18:53 +0800)]
MA-10337-3 Add ATX support for i.MX6UL and i.MX7D
Change-Id: Id2518949d6379a901f6db2044d9d2a59e119d6c4
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Tue, 12 Sep 2017 08:06:49 +0000 (16:06 +0800)]
MA-10338-4 Correct 'fastboot getvar current-slot' command
Remove the underscore prefix of current slot.
Change-Id: I07a0513dfcfbf395087d57e3680c8d662ec827aa
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Thu, 14 Sep 2017 02:32:59 +0000 (10:32 +0800)]
MA-10338-3 Refine misc local variables in get_single_var()
Change-Id: I0b57cae7a172d906bf7d43f19e938a72c74b3b16
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Sat, 2 Sep 2017 09:05:22 +0000 (17:05 +0800)]
MA-10337-2 Integrate ATX code into u-boot and fix build error
Change-Id: I6ab29f86df748d173954400d534f1fb3c990f5b9
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Tue, 12 Sep 2017 08:56:22 +0000 (16:56 +0800)]
MA-10338-2 Add support for some fastboot getvar command
Add support for fastboot getvar command:
fastboot getvar erase-block-size
fastboot getvar logical-block-size
Change-Id: Id1410d46307e67342e5489a26a96725e1d6a259e
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Tue, 12 Sep 2017 07:34:59 +0000 (15:34 +0800)]
MA-10338-1 Correct 'fastboot getvar partition-type' command
Correct some partition file system type from 'emmc' to 'raw'.
Change-Id: If417ab9f14abfe27b4d5da5f7354922a80c4df18
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Sat, 2 Sep 2017 09:55:12 +0000 (17:55 +0800)]
MA-10337-1 Support ATX in u-boot
This patch did:
1.Hard code the permanent attribute into u-boot.
2.Store first 112 bits of sha256(permanent attribute) hash into fuse.
(CONFIG_AVB_FUSE was removed because it's an irreversible operation)
3.Implement platform-specific operations defined in avb_atx_ops.h.
Change-Id: I65de9860e7c5ca1f7ebfbd87300faee0ccacaac3
Signed-off-by: ji.luo <ji.luo@nxp.com>
Haoran.Wang [Tue, 29 Aug 2017 08:53:29 +0000 (16:53 +0800)]
MA-9478-3 [iot] Enable Trusty for pico-imx6ul
Duplicate defconfig for pico-imx6ul
by picosom-imx6ul-trusty_defconfig.
Change-Id: I559124e8e94eb40f943e0c4d68b9a6da821c6f41
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
(cherry picked from commit
f019c752e4ac1ab210b9a09a00d48a6eaf3fefb3)
ji.luo [Wed, 23 Aug 2017 07:53:08 +0000 (15:53 +0800)]
MA-10336-2 Add new avb method support for i.MX6UL and i.MX7D
Change-Id: I8f5b69043a63034ab53d5926de0469a29132659f
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Tue, 22 Aug 2017 12:09:46 +0000 (20:09 +0800)]
MA-10336-1 Take new AVB method
Use hard code public key instead of reading it from RPMB.
Read RPMB key from last block of BOOT1 instead of fuse.
Change-Id: Icddd0bc45af8f9a9b222d54e16a7dfc6efa6c8b2
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Tue, 22 Aug 2017 08:14:51 +0000 (16:14 +0800)]
MA-10335 Fix problems in read_keyslot_package()
Change-Id: I052314f2304a93a79fa912125c555cae173d8749
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Wed, 2 Aug 2017 05:05:11 +0000 (13:05 +0800)]
MA-10334 Rename Aquila board name to spriot board name
Change-Id: Iee122d36d83bc6e1ae007fb2f2053c6e9e7fc2a2
Signed-off-by: ji.luo <ji.luo@nxp.com>
Haoran.Wang [Wed, 19 Jul 2017 10:36:51 +0000 (18:36 +0800)]
MA-9478-2 [iot] Support keyslot package function
RPMB keyblob stored in the last block of boot1
partition of MMC1. It will be load into
CAAM SEC_RAM and format into "keyslot" package.
This is enabled on pico7d and iopb6ul.
Change-Id: I5d9ab12e7d14945ebd8f926e20bed19b02e65009
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Haoran.Wang [Wed, 12 Jul 2017 12:01:15 +0000 (20:01 +0800)]
MA-9478-1 [iot] Enable Trusty for iopb6ul and pico7d
Change-Id: I0aa12c5092953804e724c0534f2e81abd9ee47d5
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Haoran.Wang [Thu, 29 Jun 2017 08:05:51 +0000 (16:05 +0800)]
MA-9478 [iot] Add boot Trusty OS codes for imx6 and imx7
Use trusty_os_init to load Trusty OS from CONFIG_TRUSTY_OS_ENTRY
before u-boot ready.
Add "tos" partition following the Android bootloader requirement.
Change-Id: I294df0ea1b44ffd12135a8325a73d1ac9399b5f5
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Ye Li [Fri, 13 Oct 2017 09:23:20 +0000 (04:23 -0500)]
MLK-16587-2 imx8qm/qxp: Change to use SCFW API to get boot device
Since SCFW has implemented a new API sc_misc_get_boot_dev to get boot device,
change u-boot to use this API for QM/QXP, not use ROM INFO.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 13 Oct 2017 08:34:25 +0000 (03:34 -0500)]
MLK-16587-1 imx8qm/qxp: Sync SCFW API to latest
Sync SCFW API to commit
a6fd9a48626ef8c93a798c5fb984898b2017bf16.
It adds a API to get boot device.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 10 Oct 2017 08:42:34 +0000 (03:42 -0500)]
MLK-16562 imx8qxp: Fix MAC fuse address for QXP
Since i.MX8QXP only use one 16K fuse array, it has different fuse address for
2nd half 256 fuse words with QM. According to its fuse map, the fuse addresses
for MAC1 and MAC2 are 708-711.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Leonard Crestez [Wed, 4 Oct 2017 13:15:04 +0000 (16:15 +0300)]
MLK-16560-4: imx8: Remove hardcoded sids for sdhc/fec
This is better done through dts.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Leonard Crestez [Wed, 27 Sep 2017 16:28:05 +0000 (19:28 +0300)]
MLK-16560-3: imx8: config_smmu_fdt: Support mmu-masters binding
This is deprecated in favor of the generic iommus binding but xen only
supports this older version.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Leonard Crestez [Wed, 27 Sep 2017 16:55:56 +0000 (19:55 +0300)]
MLK-16560-2: imx8: Use fsl,sc_rsrc_id binding to map device to rsrc
Using the SMMU for some devices (like dpu) requires a streamid to be
assigned to multiple resources.
Determining the resource ids for a device is a problem that occurs in
multiple contexts. So far uboot deals with this by parsing the
power-domain node which is insufficient here.
Add a new devicetree property called fsl,sc_rsrc_id which lists the
resource ids associated by a certain device.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Leonard Crestez [Wed, 27 Sep 2017 16:27:05 +0000 (19:27 +0300)]
MLK-16560-1: imx8: Configure sids based on iommu properties in dtb
Use streamids specified in dtb because they need to match anyway. This
removes the need to rebuild uboot for stream id assignments.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 26 Sep 2017 05:44:47 +0000 (00:44 -0500)]
MLK-16535 net: fec: Fix issue in DM probe function
Met a problem that mii command fails to work after u-boot booting up.
The root cause is the fec_probe function initializes ethernet PHY first,
then reset the FEC controller. This causes the mii_speed register reset
to 0 and lead mdio can't work.
Change the flow to reset FEC controller prior than setup PHY.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 20 Sep 2017 05:58:49 +0000 (00:58 -0500)]
MLK-16503 imx8qm_mek: Add support for QM MEK board
Add build config, dts and board codes for i.MX8QM MEK board. Supported
peripherals: UART, eMMC/SD, ENET, I2C, USB TYPEC DFP mode, flexspi.
DTS is ported from kernel commit
a4fff857ea5f0a6513b943e0b0b842d5008785f1,
and enable more peripherals.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 20 Sep 2017 09:27:09 +0000 (04:27 -0500)]
MLK-16499-2 mmc: fsl_esdhc: Remove duplicated clock settings
In esdhc_set_ios, the clock has been setup before calling esdhc_set_timing.
So no need to call set_sysctl more.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 20 Sep 2017 09:22:40 +0000 (04:22 -0500)]
MLK-16499-1 mmc: Add support for HS400
The HS400 ES (Enhanced Strobe) has been added. This patch addes support
for HS400 for eMMC 5.0 devices. It needs tuning at HS200 to synchronize
command response.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Wed, 20 Sep 2017 07:05:47 +0000 (15:05 +0800)]
MLK-16496-2 mmc: fsl_esdhc: add hs400 es mode support
Add HS400 ES mode support.
The flow is same as mmc_select_hs400es in kernel drivers/mmc/core/mmc.c.
With HS400 ES, there is no tuning needed.
With Toshiba 32GB Automotive eMMC5.1 on 8QXP ARM2 board, speed test:
'time mmc read 0x90000000 0 0x200000' shows that speed is 282MB/s.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Peng Fan [Wed, 20 Sep 2017 07:07:53 +0000 (15:07 +0800)]
MLK-16496-1 imx8qm/qxp: set usdhc clock to 400M
Set usdhc clock to 400M. When enabling HS400 ES, DDR EN is enabled,
if we still have input clock as 200M, the real output clock will be 100M.
So set clock to 400M to get real 200M output when enabling HS400/ES.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 12 Sep 2017 09:41:45 +0000 (04:41 -0500)]
MLK-16431-3 imx8qxp_mek: Enable the USB3.0 XHCI driver
Enable the USB3.0 XHCI driver to support host mode on MEK board.
The USB3.0 typec on MEK board uses PTN5110 TCPC as cc logic and power control. Different like
the device on ARM2 board, this IC needs driver to control and get status through I2C bus.
In this patch, we simply call the TCPC API to set to DFP mode, check the CC status for SS MUX select
and enable source VBUS power. When the USB host is shutdown, disable the VBUS power.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 12 Sep 2017 09:38:00 +0000 (04:38 -0500)]
MLK-16431-2 imx8qxp_mek: Add driver for USB typec port controller (TCPC)
Add an simple driver for USB typec port controller in freescale common codes.
The functions in this driver help to initialize the TCPC, set and work with
fixed DFP role.
Will improve it later to support UFP and move to driver directory.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Mon, 11 Sep 2017 03:31:03 +0000 (22:31 -0500)]
MLK-16431-1 xhci-imx8: call board_usb_cleanup when xhci stop
Call the board_usb_cleanup in xhci_imx8_remove (DM) and xhci_hcd_stop (non-DM) to
execute some board level usb stop in cc logic and ss mux.
Signed-off-by: Ye Li <ye.li@nxp.com>
Frank Li [Wed, 13 Sep 2017 16:06:47 +0000 (11:06 -0500)]
MLK-16465: fine tune build info to find it easily.
Find buildinfo easily and copy everything just one click
U-Boot
2017.03-00031-g0596078-dirty (Sep 13 2017 - 10:59:41 -0500)
CPU: Freescale i.MX8QXP revA A35 at 1200 MHz at 6C
Model: Freescale i.MX8QXP LPDDR4 ARM2
Board: iMX8QXP LPDDR4 ARM2
Boot: SD1
DRAM: 3 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
[pcie_ctrlb_sata_phy_init_rc] LNK DOWN
8600000
In: serial
Out: serial
Err: serial
BuildInfo:
- SCFW
f0cb8b8e, IMX-MKIMAGE
cc994971, ATF 0
- U-Boot
2017.03-00031-g0596078-dirty
switch to partitions
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Ye Li [Thu, 14 Sep 2017 02:48:28 +0000 (21:48 -0500)]
MLK-16467 serial_lpuart: Fix FIFO_RXFE definition in LPUART driver
Accroding to RM, the Receive FIFO Enable (RXFE) field in LPUART FIFO register
is bit 3, so the definition should change to 0x08 not 0x40.
Otherwise the Receive FIFO is not disabled.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Adrian Negreanu [Mon, 11 Sep 2017 13:51:41 +0000 (16:51 +0300)]
imx8: add board_name and board_rev
Export the board_name and board_rev for these boards:
- 8MQ EVK
- 8QM ARM2
- 8QXP ARM2
- 8QXP MEK
These two variables are used by an autotest u-boot script,
to request the needed BSP files.
Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 13 Sep 2017 09:06:08 +0000 (04:06 -0500)]
MLK-16451 imx8qm/qxp: Enable PSCI reset
Since the arm trusted firmware has implemented the system reset in PSCI.
We can enable the CONFIG_PSCI_RESET to call PSCI API to reset the u-boot.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 13 Sep 2017 06:25:15 +0000 (01:25 -0500)]
MLK-16443 imx8qm/qxp: Fix UART pad setting
Found kernel won't be loaded when UART does not connect to the board. This is
because UART received one data with frame error in this case, and stop in
u-boot console.
The root cause is we set wrong pad setting for UART. The pad should be set
to pull up not pull down. The pull down will cause problem to UART START bit.
This patch fix the UART pad to 0x600020 (input and output, high drive strength,
and pull up).
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 11 Sep 2017 09:27:13 +0000 (04:27 -0500)]
MLK-16441-2 imx8qm/qxp: print commit hash for SCFW, IMX-MKIMAGE and ATF
Since we have many software running on QM/QXP, it is better to print their
commit ids in u-boot to know their versions.
This patch enables the CONFIG_ARCH_MISC_INIT. In arch_misc_init to gets the
commit ids for SCFW and ATF via their APIs and get the commit for imx-mkimage
at the end of u-boot.bin loading address.
Once the commit ids are acquired, show them in console like:
BuildInfo: SCFW
45c567e8, IMX-MKIMAGE
cc994971, ATF
0a9efa7
and set them to environment variables like:
commit_atf=
0a9efa7
commit_mkimage=
cc994971
commit_scfw=
45c567e8
If old software are running which does not support provide commit it, the patch
use 0 instead.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 11 Sep 2017 10:59:01 +0000 (05:59 -0500)]
MLK-16441-1 imx8qm/qxp: Update scfw api
Update SCFW API to latest commit
45c567e830b2b915982ea5f2fcd60d235991a415
which contains new API to get build info for SCFW.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
guoyin.chen [Tue, 12 Sep 2017 11:22:59 +0000 (19:22 +0800)]
MA-10217 bootloader mode not function if there is a unknown cmd in misc
System cannot run into bootloader/recovery mode once there is unknown cmd
in misc partition as:
1. uboot will never clean the unknown cmd.
2. init will never overwrite the unknown cmd.
arm2_8q:/ # reboot bootloader
init: [libfs_mgr]fs_mgr_read_fstab_dt(): failed to read fstab from dt
init: reboot-bootloader: Error writing bootloader_message: Bootloader command pending.
init: Reboot start, reason: reboot,bootloader, rebootTarget: bootloader
Change-Id: I51043e7cbde3f3e508c5fe99e9dba27e5f99f443
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
Zhang Bo [Thu, 7 Sep 2017 10:57:57 +0000 (18:57 +0800)]
MA-9554[Android_6DL_SD]RTC: Sometimes the RTC reset to the initial time 1970 after softare reboot the first time. 40%
RTC timer is default disabled after power off and bootup again. it will be
enabled in kernel rtc driver init. But rtc time is shorter than system clock,
so rtc time cannot update to system clock in rtc_hctosys(), and the sysfs
file /sys/class/rtc/rtc0/hctosys cat result is 0. Android AlarmManagerService
cannot work normally when hctosys is 0.
Enable RTC in u-boot so the time in RTC timer is longer than system clock.
Change-Id: Ie8b1c1b36e5ab48031efe44dd06468ac35ca3d3b
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
guoyin.chen [Thu, 7 Sep 2017 13:32:35 +0000 (21:32 +0800)]
MA-10167 Add soc_type to be imx8mq to align the init.imx8mq.rc
It will be used by android init to load the init.imx8mq.rc
Change-Id: Id157cfe6952c9ccf4021d9098e25d9e9d545859f
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
Ye Li [Tue, 5 Sep 2017 06:45:21 +0000 (01:45 -0500)]
MLK-16369 eth: fec: Fix DM driver issue in recv
When using ethernet DM driver, the recv interface has a change with non-DM
interface, that driver needs to set the packet pointer and provide it to upper
layer to process.
In fec driver, the fecmxc_recv functions does not handle the packet pointer parameter.
This may cause crash in upper layer processing because the packet pointer is not set.
This patch allocates a buffer for the packet pointer and free it through free_pkt interface.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 5 Sep 2017 03:16:06 +0000 (11:16 +0800)]
MLK-16365 mmc: add sd/mmc legacy capability
Add SD/MMC legacy capability. Otherwise the legacy cards supports will
be broken.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 4 Sep 2017 02:11:39 +0000 (21:11 -0500)]
MLK-16361-2 imx8qm/qxp: Use sw_info for USB boot check
The sw_info in handover structure has included the boot device info
provided by SC ROM. We can exploit this info, no need to check the
USB2 PHY PWD register.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 1 Sep 2017 10:26:58 +0000 (05:26 -0500)]
MLK-16361-1 imx8qm/qxp: Send boot status to SCFW if booted by SC ROM
We met u-boot hang when booting from eMMC fastboot on QM/QXP boards.
The hang happens on u-boot accessing USB2 PHY for checking USB boot.
The root cause is when putting AP image (u-boot-atf.bin) in first container,
the USB2 PHY reset bit won’t be set in CONN SS by SCFW, because this SS has been
powered on by SC ROM.
In normal boot case, we won't meet such issue. Because we put u-boot-atf.bin in second
container and AP ROM will boot up for loading this binary. When AP ROM completes the
loading, it calls “misc_boot_status” API to power off the boot device and also power
off the CONN SS. Then when u-boot enables any the module in CONN, the CONN SS will power
on again by SCFW and set the USB2 PHY reset bit.
Since the clock settings are different in SC ROM and SCFW, so it is suggested to power off
CONN SS when booting is completed. In this patch, we check the g_ap_mu field in pass over
structure which is used to pass into from SC ROM to AP ROM. This field is set only when AP
image is included in the second container. If this field is not set, we suppose the booting
only uses SC ROM, then u-boot calls "misc_boot_status" at early stage to power off
boot device.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Zhang Bo [Thu, 31 Aug 2017 10:36:20 +0000 (18:36 +0800)]
MA-10118-1[Android EVK-8MQ] realize the get_board_serial function which read unique id from ocopt
Correct fuse_bank0_regs structure to make bank register be match with fuse map.
Change-Id: I023c7d57b9fe1d57b0c2735f058714e9f25dca56
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
Ye Li [Thu, 31 Aug 2017 02:58:03 +0000 (21:58 -0500)]
MLK-16333 imx8qm/qxp: Change memory region 0x0-0x1c000000 to strongly order
This memory region is for LSIO subsystem, including OCRAM, AP ROM,
flexspi0 mapped memory and flexspi1 buffer. If we set it to cachable,
the AHB read in flexspi driver will have coherence problem.
This patch set this memory region to strongly order to avoid any issue
in driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 30 Aug 2017 10:18:37 +0000 (05:18 -0500)]
MLK-16326 imx8qxp_mek: Add LVDS0 display support for splash screen
The MEK board has two display ports, we enable the LVDS0 as default display. User
needs to connect miniSAS LVDS to HDMI card on the CPU board and set "panel" env variable
to "IT6263" to enable the display.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Zhang Bo [Wed, 30 Aug 2017 09:51:36 +0000 (17:51 +0800)]
MA-10118[Android EVK-8MQ] realize the get_board_serial function which read unique id from ocopt
Read the unique id directly from the ocopt register.
Change-Id: I6cfb246153812709ea98edd5b9a85aff4714a329
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
Ye Li [Tue, 29 Aug 2017 07:18:55 +0000 (02:18 -0500)]
MLK-16288 fsl_esdhc: Workaround for eMMC HS200 and SD SDR104 switch fail issue
Met randomly switch fail (60%) on 8QXP ARM2 A1 board, when entering eMMC HS200 or SD SDR104 mode.
The failure happens on the first command (CMD55 for SD, CMD8 for eMMC) after the tuning process
is done. The failure error is CTOE (command timeout). Can't reproduce it on QXP MEK.
This patch addes a workaround to send CMD12 after tuning process is done. This helps to stop any
transmission that device may involve during tuning. The stress test is passed on QXP ARM A1 with
this workaround added.
Also this patch fixes a issue for tuning parameter "tuning_start_tap".
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 29 Aug 2017 09:35:27 +0000 (04:35 -0500)]
MLK-16292 DTS: imx8qm/qxp: Update usdhc pad settings to fix DSE issue
Sychronize the usdhc pad settings from kernel DTS file to
fix DSE setting problem. For dual voltage pads, only bits[0]
is defined for DSE.
0: high drive strength
1: low drive strength
Kernel commit:
7084cf02e6cc2c9fb7f474f6cc1ba8f8d00793c7
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 29 Aug 2017 07:53:54 +0000 (02:53 -0500)]
MLK-16247 imx8/imx8m: Rename env variable fdtaddr to fdt_addr
i.MX6/7 uses fdt_addr while all i.MX8/8M uses fdtaddr, this causes
the env is inconsistent for the autotest u-boot scripts. So rename
the fdtaddr to fdt_addr.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 29 Aug 2017 07:36:52 +0000 (02:36 -0500)]
MLK-16249 mx6dlsabresd: Fix the VDD ARM voltage for 396MHz CPU freq
According to the MX6DL datasheet (IMX6SDLCEC Rev. 5, 06/2015)
"LDO Output Set Point (VDD_ARM_CAP) = 1.125 V minimum for operation
up to 396 MHz."
So change the VDD ARM to 1.15V (with 25mv margin).
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Ye Li [Tue, 29 Aug 2017 07:26:12 +0000 (02:26 -0500)]
MLK-16289 pca953x_gpio: Fix build warning
Fix uild warning below introduced by
commit:
cb20ff23c83b80b4115c8a44ea436cb6b40429f1
drivers/gpio/pca953x_gpio.c: In function ‘pca953x_probe’:
drivers/gpio/pca953x_gpio.c:325:48: warning: passing argument 3 of
‘pca953x_write_regs’ from incompatible pointer type [-Wincompatible-pointer-types]
ret = pca953x_write_regs(dev, PCA953X_INVERT, &val);
^
drivers/gpio/pca953x_gpio.c:135:12: note: expected ‘u8 * {aka unsigned char *}’
but argument is of type ‘u8 (*)[5] {aka unsigned char (*)[5]}’
static int pca953x_write_regs(struct udevice *dev, int reg, u8 *val)
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 29 Aug 2017 07:00:31 +0000 (02:00 -0500)]
MLK-16287 imx8qxp_arm2: increase the off-on-delay for usdhc2 vmmc supply
Current value of "off-on-delay-us" is 3500us for usdhc2 vmmc regulator,
this is measured value but not have margin added. We found QXP ARM2
RevA1 board can't work with this value. So increase it to 5000us with
1500us margin added.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
zhang sanshan [Tue, 29 Aug 2017 02:23:51 +0000 (10:23 +0800)]
MA-10079 [Android] enable fastboot for imx8mq
enable CONFIG_CMD_FASTBOOT which support command:"fastboot 0"
enable CONFIG_FASTBOOT_FLASH wihch support commands:"fastboot flash XXX"
Change-Id: I514e2d5ea221a8551f4afa799fa5b48e4373fca4
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Li Jun [Fri, 25 Aug 2017 18:13:05 +0000 (02:13 +0800)]
MLK-16273-3 imx8mq: evk: enable usb gadget drivers
Enable dwc3 controller driver and gadget mass storage drivers.
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Li Jun [Fri, 25 Aug 2017 18:10:50 +0000 (02:10 +0800)]
MLK-16273-2 imx8mq: evk: add usb init for USB0 device mode
Add USB0(type-c) config and PHY init to enable device mode.
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Li Jun [Fri, 25 Aug 2017 17:49:51 +0000 (01:49 +0800)]
MLK-16273-1 usb: dwc3: add suspend clock setting interface
Some dwc3 based USB3 IP may have a wrong default suspend clk
setting, so add an interface to correct it by board setting.
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Felipe Balbi [Wed, 22 Feb 2017 15:12:40 +0000 (17:12 +0200)]
usb: gadget: g_dnl: only set iSerialNumber if we have a serial#
We don't want to claim that we support a serial number string and
later return nothing. Because of that, if g_dnl_serial is an empty
string, let's skip setting iSerialNumber to a valid number.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
(cherry picked from commit
842778a091047b0c868efa12229633959f711152)
Felipe Balbi [Wed, 22 Feb 2017 15:12:41 +0000 (17:12 +0200)]
usb: gadget: g_dnl: don't set iProduct nor iSerialNumber
Both these numbers are calculated in runtime and dynamically assigned
to the device descriptor during bind().
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
(cherry picked from commit
207835b13feeae15db0555574d89352a4e5379a4)
Philipp Tomsich [Thu, 6 Apr 2017 14:58:53 +0000 (16:58 +0200)]
usb: dwc3: gadget: make cache-maintenance on event buffers more robust
Merely using dma_alloc_coherent does not ensure that there is no stale
data left in the caches for the allocated DMA buffer (i.e. that the
affected cacheline may still be dirty).
The original code was doing the following (on AArch64, which
translates a 'flush' into a 'clean + invalidate'):
# during initialisation:
1. allocate buffers via memalign
=> buffers may still be modified (cached, dirty)
# during interrupt processing
2. clean + invalidate buffers
=> may commit stale data from a modified cacheline
3. read from buffers
This could lead to garbage info being written to buffers before
reading them during even-processing.
To make the event processing more robust, we use the following sequence
for the cache-maintenance:
# during initialisation:
1. allocate buffers via memalign
2. clean + invalidate buffers
(we only need the 'invalidate' part, but dwc3_flush_cache()
always performs a 'clean + invalidate')
# during interrupt processing
3. read the buffers
(we know these lines are not cached, due to the previous
invalidation and no other code touching them in-between)
4. clean + invalidate buffers
=> writes back any modification we may have made during event
processing and ensures that the lines are not in the cache
the next time we enter interrupt processing
Note that with the original sequence, we observe reproducible
(depending on the cache state: i.e. running dhcp/usb start before will
upset caches to get us around this) issues in the event processing (a
fatal synchronous abort in dwc3_gadget_uboot_handle_interrupt on the
first time interrupt handling is invoked) when running USB mass
storage emulation on our RK3399-Q7 with data-caches on.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
(cherry picked from commit
889239d6b5c15c82d507498ded5e3b8fea2d44cf)
Philipp Tomsich [Thu, 6 Apr 2017 14:58:52 +0000 (16:58 +0200)]
usb: dwc3: ensure consistent types for dwc3_flush_cache
The dwc3_flush_cache() call was declared and used inconsistently:
* The declaration assumed 'int' for addresses (a potential issue
when running in a LP64 memory model).
* The invocation cast the address to 'long'.
This change ensures that both the declaration and usage of this
function consistently uses 'uintptr_t' for correct behaviour even
when the allocated buffers (to be flushed) reside outside of the
lower 32bits of memory.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
(cherry picked from commit
b7bf4a95922c3e1a4974aa34ebb714ac2eb89937)
Ranjani Vaidyanathan [Thu, 24 Aug 2017 22:40:45 +0000 (17:40 -0500)]
MLK16263 - Update uboot to the latest SCFW API
Update uboot to the latest SCFW based on commit:
"
commit
129c16e312334af7b07d71d6dccac1cda1808b93
Author: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Date: Thu Aug 24 16:50:59 2017 -0500
Add support to change DRC clock rate.
"
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Peng Fan [Fri, 25 Aug 2017 06:35:39 +0000 (14:35 +0800)]
MLK-16268 arm: dts: 8qxp: add delay-us for usdhc2
Measured signal using oscilloscope.
Add startup delay and off-on-delay-us to make usdhc2 vmmc
supply work properly. Otherwise, the delay between power
off/on is short and power actully not off, then card report
S18A as 0 and could not switch voltage to 1.8V.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 23 Aug 2017 09:40:58 +0000 (04:40 -0500)]
MLK-16246 imx8mq_evk: Update DTB to disable DCSS and HDMI for mfgtool
When booting for mfgtool, we need to disable DCSS and HDMI since the HDMI
firmware won't be loaded by mfgtool. Add the detect in u-boot and update the
DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 22 Aug 2017 02:03:35 +0000 (21:03 -0500)]
MLK-16238-3 imx8m_evk: Update codes to enable TMU
Update SoC codes, DTSi and defconfig to enable TMU for i.MX8M EVK board.
Also implement functions to get speed grade and market segment info from fuse.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 22 Aug 2017 01:43:55 +0000 (20:43 -0500)]
MLK-16238-2 imx: Update CPU info print to support TMU
Current cpu info common function in imx-common only supports imx-thermal, update
the codes to also support TMU.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 21 Aug 2017 10:41:12 +0000 (05:41 -0500)]
MLK-16238-1 thermal: Add TMU driver for i.MX8M
Porting the TMU driver from kernel and supporting DM in the driver.
Users need to provide the TMU node and sensors nodes in DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 18 Aug 2017 06:57:43 +0000 (01:57 -0500)]
MLK-16219 pca953x_gpio: Clear the polarity invert register at init
The pca953x_gpio driver uses default value of polarity inversion register.
For some devices like PCA9557 and MAX7310, their polarity inversion register
default value is 0xf0. So for high 4 ports, when reading their values,
the values are inverted as the actual level.
This patch clears the polarity inversion register to 0 at init. So that the port read
and write values are aligned.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 16 Aug 2017 13:41:50 +0000 (08:41 -0500)]
MLK-16208-3 imx8qm/qxp: Enable the CPU thermal sensor to get temperature
Add "u-boot,dm-pre-reloc" to thermal node in QM and QXP DTSi files, and
enable the thermal driver in relevant build targets.
In SoC level, will get and print the CPU temperature at booting.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 17 Aug 2017 06:24:39 +0000 (01:24 -0500)]
MLK-16208-2 imx8qm/qxp: add function to read ARM core part number
Add a function to read the MIDR_EL1 register from ARM to get its
part number. This is used to distinguish the A53/A35/A72.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 16 Aug 2017 13:37:13 +0000 (08:37 -0500)]
MLK-16208-1 thermal: Add driver to support i.MX8QM/QXP CPU thermal sensor
Add the DM thermal driver for i.MX8QM and QXP. The driver depends on DTB thermal
sensor nodes. Will create device for each thermal in thermal-zones. User can
use the thermal name to get the device from UCLASS_THERMAL.
The driver flag is set to DM_FLAG_PRE_RELOC, to support run it at early stage,
need add "u-boot,dm-pre-reloc" property to the thermal node.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 18 Aug 2017 02:50:18 +0000 (10:50 +0800)]
mmc: fsl_esdhc: fix build issue
Fix the following build issue:
"
In function ‘esdhc_set_ios’:
warning: unused variable ‘ret’ [-Wunused-variable]
int ret;
^~~
At top level:
warning: ‘usdhc_imx8qm_data’ defined but not used [-Wunused-variable]
static struct esdhc_soc_data usdhc_imx8qm_data = {
^~~~~~~~~~~~~~~~~
To qxp nand boot defconfig:
error: ‘esdhc_set_vdd’ undeclared here (not in a function)
.set_vdd = esdhc_set_vdd,
^~~~~~~~~~~~~
"
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 16 Aug 2017 05:58:29 +0000 (00:58 -0500)]
MLK-16198-4 imx8qm/qxp: Update ARM2 boards to support xhci and ehci at same time
When using DM xhci and ehci drivers, we can support both two controllers
(OTG and USB3) at same time. Refactor the QM and QXP ARM2 board codes and
configurations to enable them.
Because the xhci-imx8 driver will initialize the clock, and DM framework
will enable power domains, so only keep the power up in board level codes
for non-DM driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng@nxp.com>
Ye Li [Wed, 16 Aug 2017 04:05:06 +0000 (23:05 -0500)]
MLK-16198-3 usb: xhci-imx8: Add core reset function
Found a problem that after "usb stop" command, the next "usb start" can't enumerate
any devices. Need to put the xhci core to reset status in stop.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng@nxp.com>
Ye Li [Wed, 16 Aug 2017 05:48:22 +0000 (00:48 -0500)]
MLK-16198-2 usb: xhci-imx8: Add clock init interface
Introduce a clock init interface for xhci-imx8 to initialize its clocks
in SoC level. Also implement it for i.MX8QM/QXP.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng@nxp.com>
Ye Li [Wed, 16 Aug 2017 05:40:44 +0000 (00:40 -0500)]
MLK-16198-1 usb: xhci-imx8: Add basic DM support
Add basic DM support to the xhci-imx8 driver, which only probes the
USB3 node, but won't parse any properties from node in DTS.
The registers address are still hard coded, that share with non-DM codes.
Will improve it to get from the "reg" property in future.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng@nxp.com>