summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/include/mach
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/imx8-hab'Sascha Hauer2019-08-153-0/+66
|\
| * mach-imx: add gencsf header for i.MX8MQRouven Czerwinski2019-08-071-0/+59
| | | | | | | | | | | | | | Add the required gencsf header for i.MX8MQ. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: imx: support signing for i.MX8MQRouven Czerwinski2019-08-071-0/+2
| | | | | | | | | | | | | | | | | | | | Implement signing of the PBL for i.MX8MQ. The imagesize is also modified to i.MX8MQ to only contain the PBL. This obsoletes the max_load_size, which is kept for other boards currently using it. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * esdhc-pbl: add piggy load functionRouven Czerwinski2019-08-071-0/+5
| | | | | | | | | | | | | | | | | | Add a function to load and copy the piggy data to the correct offset expected by barebox in the RAM. This way the PBL can later verify the piggydata before uncompressing and loading the main barebox. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | pinctrl: i.MX iomux-v1: Make base address initialization unnecessarySascha Hauer2019-08-141-1/+20
|/ | | | | | | | | | | | So far we have imx_gpio_mode() to configure a pinmux entry for the older i.MX pinmuxes. For this to work imx_iomuxv1_init() must be called beforehand to configure the base address. Simplify this by introducing SoC specific variants of imx_gpio_mode() which also pass the base address. This makes initialization of the base address unnecessary and the functions usable for PBL. Consequently also compile the code for PBL. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: mach-imx: imx6: Read and print the UID of i.MX6 SOCsStefan Riedmueller2019-07-081-0/+2
| | | | | | | Read the unified ID of the i.MX 6 SOCs and print it in the boot log. Signed-off-by: Stefan Riedmueller <s.riedmueller@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Drop unused usb-imx6.cAndrey Smirnov2019-05-271-3/+0
| | | | | | | | Looks like usb-imx6.c was abandoned and there are no references to either of the functions difined there. Drop it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX25: Add some more clocksSteffen Trumtrar2019-04-121-0/+2
| | | | | | | | | | Add some clocks needed for: - RNGB - SCC - Dryice RTC Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX8MQ: Don't use cpu_is_mx8mq() at core_initcall levelAndrey Smirnov2019-03-181-0/+1
| | | | | | | | | | | | | | | | | Since __imx_cpu_type won't be initialized until imx_init()@postcore_initcall is executed cpu_is_mx8mq() will only work correctly at core_initcall level so long as imx_cpu_type does not resolve into __imx_cpu_type. This is currently the case and imx8mq_init_syscnt_frequency() works as expected, but it probably won't be in the future. To avoid this problem introduce imx8mq_cpu_lowlevel_init() and do system counter frequency initialization there. Also convert all of the i.MX8MQ boards to use this new function. Fixes: 5691aed9a ("ARM: i.MX8MQ: Check CPU type in imx8mq_init_syscnt_frequency()") Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mmc-esdhc'Sascha Hauer2019-02-138-86/+19
|\
| * mci: imx-esdhc: move platform_dataSascha Hauer2019-02-062-49/+1
| | | | | | | | | | | | | | move platform_data from mach-imx/include/mach/ to include/platform_data where it's available for other architectures aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mci: imx-esdhc: use dev_idSascha Hauer2019-02-067-37/+18
| | | | | | | | | | | | | | Avoid using cpu_is_* macros and use a dev_id instead. This will make it easier to integrate the driver into another architecture. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2019-02-132-6/+1
|\ \
| * | ARM: imx: delete unused mach/clock-imx1.hAlexander Shiyan2019-01-211-5/+0
| | | | | | | | | | | | | | | | | | | | | This removes the stale mach/clock-imx1.h include as there is no user of it. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | treewide: Remove trailing whitespaces and tabsAlexander Shiyan2019-01-211-1/+1
| |/ | | | | | | | | | | | | Just a cleanup over barebox tree Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX8MQ: Add corner case for Rev 2.1 siliconAndrey Smirnov2019-02-121-0/+9
| | | | | | | | | | | | | | | | | | Rev 2.1 of i.MX8MQ silicon needs a special check different from predecessor. Add all of the neccessary code to do just that (based on similar code in vendor U-Boot tree). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX8MQ: Read only ROM version majorAndrey Smirnov2019-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't read all 32-bits located at IMX8MQ_ROM_VERSION_*0 since that, besides ROM version major in LSB, willl also contain minor components which we don't account for in the following checks. Change the code to only read LSB instead. This is a port of a vendor U-Boot[1] commit 0377dc881a96b46d858643dfaa5f9ef0dd4acccc ("MLK-19465 imx8mq: Fix cpu rev issue on B0.1 chip") [1] https://source.codeaurora.org/external/imx/uboot-imx Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX8MQ: Invert the logic in imx8mq_cpu_revision()Andrey Smirnov2019-02-121-13/+13
| | | | | | | | | | | | | | | | | | Invert the logic in imx8mq_cpu_revision() and convert it to use early return. This is done in perparation for more corner case logic added in the following commits. No functional change intended. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX8MQ: bbu: Add MMC boot handlerAndrey Smirnov2019-02-111-0/+9
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: imx: add support for Udoo Neo fullUwe Kleine-König2019-01-181-0/+1
|/ | | | | | | | | | | Original patch from Uwe Kleine-König, I fixed the review comments and the imxcfg file to use the udoo neo values. I also tested the support on the udoo neo full board. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/missing-prototypes'Sascha Hauer2018-12-071-0/+1
|\
| * ARM: i.MX27: Add missing prototype for imx27_get_boot_source()Sascha Hauer2018-11-121-0/+1
| | | | | | | | | | | | imx27_get_boot_source() is exported, so add a prototype for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: imx-image: Add support for max_load_size optionSascha Hauer2018-11-301-0/+1
|/ | | | | | | | | | | | | When an image is loaded to SRAM we can normally only load a part of the full image, limited by the available space in SRAM. We currently load the pblb image which is the executable part of the PBL without the compressed barebox payload. We are going to link the compressed barebox image into the pbl image though, so we can't see the desired load size from outside the image anymore. This adds a max_load_size option to set this size explicitly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: Introduce dev_set_name()Andrey Smirnov2018-10-182-2/+2
| | | | | | | | Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX7: bbu: Add I2C and SPI handlerAndrey Smirnov2018-10-081-0/+10
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX7: bbu: Add MMC boot handlerAndrey Smirnov2018-10-081-0/+10
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX7D: DCD: Create shared DDR configuration headerAndrey Smirnov2018-10-081-0/+78
| | | | | | | | Create a shared DDR configuration header based on configuration used by i.MX7D SabreSD board. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: esdctl: Add memory size detection for i.MX7DAndrey Smirnov2018-10-082-0/+3
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: esdctl: Add memory size detection for i.MX8MQAndrey Smirnov2018-09-241-0/+1
| | | | | | | | | Add memory size detection for i.MX8MQ. Only basic LPDDR4 configurations are supported for now. Support for other types of memory can be added later once we have any boards that use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: VFxxx: bbu: Add a handler for MMC boot partitionsAndrey Smirnov2018-09-191-0/+11
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX51: bbu: Add a handler for MMC boot partitionsAndrey Smirnov2018-09-191-0/+10
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/imx-hab'Sascha Hauer2018-09-112-0/+23
|\
| * scripts: imx: Support encrypted boot with HABv4Marcin Niestroj2018-09-042-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .imxcfg configuration files support few more commands, all starting with "hab_encrypt" string. That way it is possible to easily ignore these commands, when image encryption was not requested. Hence, we can use single .imxcfg file to generate signed and encrypted images in the same build. Images are encrypted in place by Freescale Code Signing Tool (cst), using Data Encryption Key (DEK). This key needs to be encapsulated by processor's hardware encryption engine to produce DEK blob, which is unique for each device. DEK blob needs to be part of CSF area, so we make enough space on the end of image to simply append it later, e.g. during device flash procedure. Introduced code was developed and tested on NXP i.MX6UL platform. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: imx: Add support for signed HDMI firmwareAndrey Smirnov2018-09-041-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Boot header on i.MX8MQ SoC allows embedding signed HDMI firmware images that are used by mask ROM code during the very early stages of boot. Since providing that firmware appear to be necessary to enable SoC's HDMI/DP functionality extend imx-image tool to support this feature. To do that add code implementing "signed_hdmi_firmware" keyword, which allows users to specify a path to a binary blob containing all of the necessary headers and footers as well firmware data and code sections (this is how such images are provieded by NXP) Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX: Reset OTG controller during startupSascha Hauer2018-09-041-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting from USB it's sometimes observed that the USB stack on the remote host gets confused. This happens when we adjust the PLLs the USB controller is hanging on. The ROM just leaves the USB controller enabled when it passes control to the bootloader, so in case the usb clks are enabled make sure we reset the otg before doing any critical clock operations. This is currently done for i.MX50, i.MX51, i.MX53 and i.MX6, but a similar thing can happen on other i.MXes aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | arm: mach-imx: remove unused headerMichael Grzeschik2018-09-041-24/+0
| | | | | | | | | | | | | | | | The defines are also in mach/clocks-imx6.h prefixed with MXC instead of MX6. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX: bbu: Add support for MMC on i.MX8MQAndrey Smirnov2018-08-311-0/+9
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX: bbu: Add support for SPI/I2C on VFxxxAndrey Smirnov2018-08-311-0/+11
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX: bbu: Constify all 'devicefile' argumentsAndrey Smirnov2018-08-311-20/+20
| | | | | | | | | | | | | | | | Constify all 'devicefile' arguments since they are treated as so by all of the users in BBU code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: imx: add fusemap entries for i.MX6SDL silicon revision >=1.4Bastian Stender2018-08-311-0/+6
|/ | | | | Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX8MQ: Add code to detect reset reasonAndrey Smirnov2018-08-131-0/+1
| | | | | | | | | Reset reason bits and their meaning seem to be identical between i.MX7 and i.MX8MQ. Share the definitions for the former and used it for the latter. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX8MQ: Replace magic numbers with named constantsAndrey Smirnov2018-08-131-3/+8
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX8M: Expose code to query cpu revisionAndrey Smirnov2018-08-131-0/+38
| | | | | | | | | CPU revision information is needed for boot source detection, so expose it as a small helper function and convert existing code to use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: OCOTP: fix missing include for uint32_t etc.Roland Hieber2018-08-091-0/+1
| | | | | Signed-off-by: Roland Hieber <r.hieber@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: xload-esdhc: Make use of <mach/imx-header.h>Andrey Smirnov2018-08-091-0/+10
| | | | | | | | | Convert esdhc_start_image() to use constants and data types from <mach/imx-header.h>. Also, while at it, define a simple inline function to test if an arbitrary binary blob is i.MX flash header v2. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Move i.MX header definitions to mach-imxAndrey Smirnov2018-08-091-0/+118
| | | | | | | | Move i.MX header definitions from scripts to mach-imx in order to make it available to both script and bootloader code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX8MQ: Add code to load BL31 ATF blobAndrey Smirnov2018-08-081-0/+13
| | | | | | | | Add imx8mq_atf_load_bl31() containing all of the code needed to load and transfer control to BL31 ATF blob on i.MX8M. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: fix compilation with BBU disabledSascha Hauer2018-08-061-1/+1
| | | | | | Make a static inline wrapper actually static inline. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: iomuxv3: restore NO_PAD_CTRL semanticAlexander Kurz2018-07-131-3/+5
| | | | | | | | | | | | | A NO_PAD_CTRL flag used to keep a pad configuration untouched. With commit 094820a63bfd ("i.MX: iomuxv3: Use helper functions in iomux-v3.h") the NO_PAD_CTRL semantic changed to set a pad configurations to zero, which breaks non-DT boards, where NO_PAD_CTRL is freqently used to keep a boot-up default pad configuration, which often is non zero. Restore the old semantic, dont write PAD_CTRL when NO_PAD_CTRL is set. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/vfxxx'Sascha Hauer2018-07-096-0/+448
|\