summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/include
Commit message (Collapse)AuthorAgeFilesLines
* pinctrl: i.MX7: Fix LPSR sel_imput settingSascha Hauer2017-02-061-0/+8
| | | | | | | | | | | | | | | | The i.MX7 has two pinmux controllers, the regular and the LPSR controller. The LPSR pinmux controller doesn't have any sel_input registers, instead they can be found in the regular pinmux controller. This means whenever we want to apply the the sel_input setting for the LPSR controller, we have to apply them to the regular controller instead. In barebox take the easy way out and just add the difference of the two base addresses to the register offset. The same issue is present in the Kernel aswell, but when the bootloader already configured the pins correctly nobody notices when the Kernel sel_input setup effectively is a no-op. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: add SoC type detection for i.MX6SLAlexander Kurz2017-02-011-1/+18
| | | | | | | | | | | | | | | | | | | | The i.MX6 series SoC type is determined by barebox by examining the USB_ANALOG_DIGPROG aka IMX6_ANATOP_SI_REV register. This register is located at a common offset for all mx6 SoC - except for i.MX6SL where a different offset is used. This creates a dilemma while distinguishing the mx6sl from non-mx6sl SOC since the SoC type identification register location is type specific itself. Access to undocumented and probably invalid or unpredictable registers should be avoided as possible. For the mx6sl detection an access to the general USB_ANALOG_DIGPROG @0x260 cannot be avoided when running on mx6sl. This register contained the value 0x00014009 for different mx6sl Rev. 1.2 based e-book readers using MCIMX6L7DVN10AB and MCIMX6L8DVN10AB SoC. This implementation assumes the value of MAJOR_UPPER (here 0x01) to be smaller than the smallest non-6sl MAJOR_UPPER (0x61 for mx6s). Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: move cpu_type macros in front of cpu_revision codeAlexander Kurz2017-02-011-20/+20
| | | | | | | Preparational commit to enable the use of cpu_type macros in imx6_cpu_revision() Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX7: add AIPS base address definesAlexander Kurz2017-01-301-15/+110
| | | | | | | Import the ARM IP bus base addresses from IMX7DRM 05/2016 AIPS Memory Map Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Add i.MX7 base architecture supportJuergen Borleis2017-01-205-0/+103
| | | | | Signed-off-by Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: iomux-vf610: Add missing pad definitionsAndrey Smirnov2017-01-121-0/+4
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: vf610: Add low-level pin configuration helperAndrey Smirnov2017-01-121-0/+15
| | | | | | | | Add low-level pin configuration helper for early boot code, and convert pinctrl driver to use that code as well. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: iomuxv3: Add low-level pad configuration routineAndrey Smirnov2017-01-121-0/+17
| | | | | | | | Add low-level pad configuration routine that can be used by early boot code as well as leveraged by pinmux driver. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: iomuxv3: Add helper macros to deconstruct iomux_v3_cfg_t valuesAndrey Smirnov2017-01-121-0/+8
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: iomuxv3: Add low-level pad code to headersAndrey Smirnov2017-01-121-0/+28
| | | | | | | | | Add a basic low-level pad configuration function that can be used to implement early boot pin configuration code as well as shared with various iomuxv3 and vf610 drivers. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: Add fusemap for VF610Andrey Smirnov2017-01-123-41/+65
| | | | | | | | Add fusemap header for VF610 and move out fuse definitions that are shared with i.MX6 familiy into a sperate file (ocotp-fusemap.h). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: imx6-fusemap: Fix SJC_RESP_LOCK widthAndrey Smirnov2017-01-121-1/+1
| | | | | | | | According to the datasheet SJC_RESP_LOCK is one bit wide, adjust the definition correspondingly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX: ocotp: Add imx_ocotp_sense_enable()Andrey Smirnov2017-01-121-0/+1
| | | | | | | | Add imx_ocotp_sense_enable() function to allow changing that aspect of OCOTP driver behaviour before calling imx_ocotp_read_field() Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/vybrid'Sascha Hauer2016-11-146-1/+547
|\
| * i.MX: Add DEBUG_LL hooks for VF610Andrey Smirnov2016-11-111-1/+26
| | | | | | | | | | | | | | Add code to support DEBUG_LL functionality on VF610/Vybrid platform. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * i.MX: Add register definitions for VF610 SoCAndrey Smirnov2016-11-113-0/+507
| | | | | | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * i.MX: Add primitive functions for VF610 familyAndrey Smirnov2016-11-112-0/+14
| | | | | | | | | | | | | | Add very basic functions to support VF610 family. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2016-11-144-0/+86
|\ \ | |/ |/|
| * ARM: i.MX6 esdctl: Add i.MX6ul supportSascha Hauer2016-11-081-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: i.MX: beginning i.MX6ul supportSascha Hauer2016-11-081-0/+2
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: i.MX: OCOTP: Add functions to access fuses field wiseSascha Hauer2016-11-082-0/+83
| | | | | | | | | | | | | | Add functions to access the OCOTP fuses field wise, similar to what has been done for the IIM. Also add a i.MX6 fusemap header file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | i.MX: Introduce imx6_cpu_revision()Andrey Smirnov2016-10-041-0/+36
| | | | | | | | | | | | | | | | | | Factor out CPU revision identification code from imx6_init() into a standalone inline function (similar to imx6_cpu_type()), so that it would be possible to use that functionality in PBL code. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: imx6qp: set NoC regulator to bypassLucas Stach2016-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | The NoC regulator only passes the QoS signals through if it is in bypass mode. This is a safe setting to give the IPU priority over other requests. The kernel may change it to some other setting once it knows the bandwidth requirements of the use-case. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX53: Implement NAND xloadSascha Hauer2016-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | Some i.MX53 want to setup the SDRAM from C code rather than from DCD tables. The image size for these boards is limited to the internal SRAM size. To overcome this limitation for i.MX53 boards booting from NAND implement an xload mechanism to load only the PBL to SRAM and let barebox load the rest of the image itself after SDRAM has been initialized. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mtd: imx-nand: Move v3 register definitions to include fileSascha Hauer2016-09-221-0/+49
| | | | | | | | | | | | | | Move v3 register definitions to include file so that they can be reused for the early nand boot code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX: Provide bootsource functions for early boot codeSascha Hauer2016-09-221-0/+5
| | | | | | | | | | | | | | | | The regular bootsource functions only work in a running barebox, provide functions for early code. This has already been done for i.MX6, this patch adds the same functions for the other SoCs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX53: do not pass base address to imx*_boot_save_locSascha Hauer2016-09-221-7/+6
|/ | | | | | | The functions can determine the necessary base addresses themselves since they are SoC specific anyway. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX50: Add iomux definitions for non-DT board implementationsAlexander Kurz2016-09-121-0/+943
| | | | | | | | | | | | | | | | | | | | | | | | | Add non-DT IOMUX definitions for the i.MX50 SOC by converting linux dts/imx50-pinfunc.h by script. perl -we 'while(<>) { next unless /^#define MX50_PAD/; @in=split "[[:space:]]+", uc($_); @out=(); @out[0..4]=@in[3, 2, 5, 4, 6]; $out[2] =~ s/0X//; $out[4] =~ s/0X//; $out[3] = "__NA_" if $out[3] eq "0X000"; push @out, $in[1] =~ /__UART/? "MX50_UART_PAD_CTRL": "NO_PAD_CTRL"; $out=join(", ", @out); $out =~ s/0X/0x/g; print "#define $in[1]\t\t\tIOMUX_PAD($out)\n"; }' < dts/src/arm/imx50-pinfunc.h Additional changes: * typical PAD settings for UART, SPI, I2C and ESDHC * SION bits set for all I2C MUX options Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add i.MX50 supportAlexander Kurz2016-09-126-0/+191
| | | | | Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: add common definitions for i.MX50 SOCAlexander Kurz2016-09-122-0/+14
| | | | | Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX31: Add i2c register convenience functionsAlexander Kurz2016-08-031-0/+15
| | | | | Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX31: add SPI supportAlexander Kurz2016-08-031-3/+3
| | | | | | | | | | | | | | | | | The i.MX31 SPI interface was refered by freescale as spi_ver_0_4 in one of their older vendor extended linux releases. spi_ver_0_4 differs only in minor aspects to spi_ver_0_7 (i.MX35) which is already supported by barebox. Regarding barebox, the differences boil down to the location and length of the CHIP SELECT and BIT COUNT/BURST LENGTH elements of CONREG. The spi_ver_0_4 variant is limited to single word bursts with a maximum of 32 bits_per_word. Add support for the i.MX31 SPI interface to the barebox spi_ver_0_7 implementation. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX31 iomux: remove duplicates with alternate nameAlexander Kurz2016-07-041-3/+0
| | | | | | | | Three iomux were accessinble with two distinct names, typo? Remove the unused duplicates. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX31 iomux: remove obvious duplicatesAlexander Kurz2016-07-041-31/+0
| | | | | | | No need to define some of the iomux twice, remove the duplicates. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx35-regs: add and use common CGR element shiftersAlexander Kurz2016-07-041-0/+15
| | | | | | | | | Add some missing Clock Gate Register element shifters which were implemented as magic numbers in the arm/boards directory. Use the new shifters for inproved code readability. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* eukrea-cpuimx35: Fix wrong clock gating for ESDHC1Alexander Kurz2016-07-041-1/+1
| | | | | | | | | With commit 962d8b89d2ce ("imx35-regs: add defines for USB and SD") the shifter argument for the iMX35 ESDHC1 CGR instance has been erroneously assigned to CGR1 instead of CGR0. Fix this for the eukrea-cpuimx35 board. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: de-duplicate PLL initializer macrosAlexander Kurz2016-07-041-0/+8
| | | | | | | | | Macros for three PLL setups got cloned in different board specific subdirs. Re-unify those macros into a common place and avoid checkpatch 80-char warnings when creating a new board subdir. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: central SOC type definitionAlexander Kurz2016-07-042-10/+15
| | | | | | | | | Move the definition of iMX CPU types to an individual file to allow on-purpose inclusion. Eliminate magic number CPU type encoding in the scripts/imx subdir using the new include file. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM iMX53: avoid magic number addressing for internal RAMAlexander Kurz2016-06-271-0/+5
| | | | | | | | | The imx53 SOC features 128kB of internal SRAM which is commonly used in early stages of barebox to store the stack. Avoid magic numbers while addressing this RAM. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Remove unused procedure imx25_setup_weimcsAlexander Shiyan2016-06-271-3/+0
| | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: HABv3: Set to production modeSascha Hauer2016-05-171-1/+1
| | | | | | | | | | | | | | | | The HABv3 images for engineering mode do not work on a production device and the images for production mode do not work on an engineering device. When in engineering mode the ROM checks the images, but does not stop booting when the signatures are wrong. This means a production image can still be booted on an engineering device. This device can be temporarily put into production mode by writing to the HAB_TYPE shadow fuse register. After a reset the device will come up in production mode and the image can be tested for validity. This means that if we have to decide between production mode images and engineering images, the production images are a better decision. Change this accordingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: IIM: Add function to enable permanent writeSascha Hauer2016-05-171-0/+1
| | | | | | | This adds a function to enable/disable permanent write for the IIM module so that C users no longer have to fiddle with device parameters. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: IIM: Add functions to access fuses field wiseSascha Hauer2016-05-172-0/+291
| | | | | | | | | | | | Accessing the IIM registers is cumbersome. The fuses are documented with different register strides and there is no header file available, so the different fields have to be read in the datasheets and translated into the barebox format over and over again. This patch adds a header file which has defines for the various fuses (for i.MX25 only so far, but others can be added later) along with C functions to read/write the fields. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* include: Move fec eth platform_data to include/platform_dataSascha Hauer2016-04-151-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: remove unused imx-flash-header.hSascha Hauer2016-04-012-214/+0
| | | | | | | All i.MX images are nowadays built with the imx-image tool, so we do not need the header files and Kconfig options anymore. Remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX6: add function cpu_is_mx6s()Stefan Christ2016-02-171-0/+1
| | | | | | | | The cpu_is_mx6* function for the i.MX6 Solo was missing. All other functions are already defined. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/input'Sascha Hauer2016-02-081-1/+1
|\
| * input: move matrix_keypad_build_keymap() to C fileSascha Hauer2016-01-131-1/+1
| | | | | | | | | | | | | | | | Future additions will make the function too big to live as a static inline function. Move to a C file and while at it, move matrix_keypad.h to include/input/ where it belongs to. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: imx: Generate signed images with imx-imageSascha Hauer2016-02-042-0/+87
|/ | | | | | | | | | | The imx-image tool can now generate signed images itself, so we can switch to this mechanism: - Move the CSF templates to header files which can be included by the flash config files - remove images/Makefile.imxhabv4 which is no longer necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: imx6: add MMDC arbitration control register defineLucas Stach2015-11-091-0/+1
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>