summaryrefslogtreecommitdiff
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* imx: mx7: run sec_init for CAAM RNGBryan O'Donoghue2018-02-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a sec_init call into arch_misc_init(). Doing so in conjunction with the patch "drivers/crypto/fsl: assign job-rings to non-TrustZone" enables use of the CAAM in Linux when OPTEE/TrustZone is active. u-boot will initialise the RNG and assign ownership of the job-ring registers to a non-TrustZone context. With recent changes by Lukas Auer to fully initialize the RNG in sec_init() this means that u-boot will hand-off the CAAM in a state that Linux then can use the CAAM without touching the reserved DECO registers. This change is safe both for the OPTEE/TrustZone boot path and the regular non-OPTEE/TrustZone boot path. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Marco Franchi <marco.franchi@nxp.com> Cc: Vanessa Maegima <vanessa.maegima@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Tested-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* i2c: imx: Take mx6dqp in consideration in the I2C_PADS_INFO macroEran Matityahu2018-02-041-2/+1
| | | | | | | | | | We should take the MX6DP and MX6QP options in consideration in the I2C_PADS_INFO macro. Based on a patch by Pierluigi Passaro <pierluigi.p@variscite.com> Signed-off-by: Eran Matityahu <eran.m@variscite.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* iomux-v3: Take mx6dqp in consideration for imx_iomux_v3_setup_pad()Eran Matityahu2018-02-041-1/+1
| | | | | | | | | | We should take the MX6DP and MX6QP options in consideration when defining imx_iomux_v3_setup_pad(). Based on a patch by Pierluigi Passaro <pierluigi.p@variscite.com> Signed-off-by: Eran Matityahu <eran.m@variscite.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* arm: dts: imx6ull: move input include to base device treeStefan Agner2018-02-042-1/+1
| | | | | | | The input keycode KEY_POWER is used in the imx6ull.dtsi file, hence include the input header where used. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
* imx: mx25: Remove SION bit in all pin-mux that are safeMichael Trimarchi2018-02-041-281/+290
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SION bit should be used in the situation that we need to read back the value of a pin and should not be set by default macro. We get some malfunction as raised by following thread https://www.spinics.net/lists/linux-usb/msg162574.html As reported by this application note: https://www.nxp.com/docs/en/application-note/AN5078.pdf The software input on (SION) bit is an option to force an input path to be active regardless of the value driven by the corresponding module. It is used when the nature direction of a pin depending on selected alternative function is an output, but it is needed to read the real logic value on a pin. The SION bit can be used in: • Loopback: the module of a selected alternative function drives the pad and also receives the pad value as an input • GPIO capture: the module of a selected alternative function drives the pin and the value is captured by the GPIO SION bit is not necessary when the pin is configured as a peripheral apart specific silicon bug. If an application needs to have this set, this should be done in board file or in dts file Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* ARM: dts: add pinmux and tuning settings for HS200/SDR104Peng Fan2018-02-041-0/+88
| | | | | | | | | | | | | | | | | The pinmux and tuning settings are from https://source.codeaurora.org/external/imx/linux-imx/tree/arch/ arm/boot/dts/imx7s.dtsi?h=imx_4.9.11_1.0.0_ga https://source.codeaurora.org/external/imx/linux-imx/tree/arch/ arm/boot/dts/imx7d-sdb.dts?h=imx_4.9.11_1.0.0_ga To support HS200 and SDR104, we need change pinmux settings dynamically. And configure tuning step and start tuning tap, otherwise you may see tuning failure. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Jaehoon Chung <jh80.chung@samsung.com>
* arm: imx: mx53loco: remove usage of mx53_dram_sizePatrick Bruenn2018-02-041-0/+1
| | | | | | | | | | | Static variables are not available during board_init_f(). 'static uint32_t mx53_dram_size[2];' was used in board specific dram_init(), dram_init_banksize() and get_effective_memsize() to avoid multiple calls to get_ram_size(). Reused dram initialization functions from arch/arm/mach-imx/mx5/mx53_dram.c Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
* arm: imx: m53evk: remove usage of mx53_dram_sizePatrick Bruenn2018-02-041-0/+1
| | | | | | | | | | | Static variables are not available during board_init_f(). 'static uint32_t mx53_dram_size[2];' was used in board specific dram_init(), dram_init_banksize() and get_effective_memsize() to avoid multiple calls to get_ram_size(). Reused dram initialization functions from arch/arm/mach-imx/mx5/mx53_dram.c Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
* arm: imx: cx9020: move dram init into common placePatrick Bruenn2018-02-042-0/+48
| | | | | | | | Move dram_init(), dram_init_banksize() and get_effective_memsize() to arch/arm/mach-imx/mx5/mx53_dram.c, where it can be reused by m53evk and mx53loco. Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
* imx: mx8m: add ddr controller memory mapPeng Fan2018-02-041-0/+356
| | | | | | | | Add ddrc memory map and enum types used in ddr initialization. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
* imx: imx8mq: add dtsi filePeng Fan2018-02-042-0/+521
| | | | | | | | Add dtsi file for i.MX8MQ. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
* imx: lcdif: include i.MX8MPeng Fan2018-02-041-4/+6
| | | | | | | | | Include i.MX8M in lcdif register layout map. Also included i.MX7ULP in this patch, since share same with i.MX8M. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* imx: makefile: compile files for i.MX8MPeng Fan2018-02-041-2/+11
| | | | | | | | Compile files for i.MX8M Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
* imx: mx8m: add soc related settings and filesPeng Fan2018-02-047-2/+333
| | | | | | | | | | | | | | | | | Add SoC level initialization code - arch_cpu_init - mmu table - detect cpu revision - reset cpu and wdog settings - timer init - wdog settings - lowlevel init to save/restore registers - a few dummy header file to avoid build failure - ft_system_setup Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com>
* imx: mx7: move mmc env code to mmc_env.cPeng Fan2018-02-043-21/+31
| | | | | | The mx7 mmc env code is shared by i.MX8M, so move it to mmc_env.c. Signed-off-by: Peng Fan <peng.fan@nxp.com>
* imx: cpu: support get_boot_device for i.MX8MPeng Fan2018-02-041-1/+6
| | | | | | | | | Enable get_boot_device for i.MX8M, it supports boot type USB. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: mx7: move get_boot_device to cpu.cPeng Fan2018-02-044-43/+47
| | | | | | | | | | Move get_boot_device to cpu.c to prepare adding i.MX8M support, because i.MX8M share same code with i.MX7. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: bootaux: support i.MX8MPeng Fan2018-02-041-0/+10
| | | | | | | | Add i.MX8M support. Because i.MX8M use SiP call trap to Arm Trusted Firmware to handle M4, so use #ifdef to avoid build error on i.MX6/7. Signed-off-by: Peng Fan <peng.fan@nxp.com>
* imx: cleanup bootauxPeng Fan2018-02-045-90/+39
| | | | | | | | | | | Move i.MX6/7 bootaux code to imx_bootaux.c. The i.MX6/7 has different src layout, so define M4 reg offset to ease the cleanup. Redefine the M4 related BIT for share common code. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com>
* imx: refactor imx_get_mac_from_fusePeng Fan2018-02-044-67/+63
| | | | | | | | | | | | | | Move imx_get_mac_from_fuse to a new mac.c for i.MX6/7. Since fuse regs structure are different for i.MX6/7, use mac address offset in code and define a new local struture imx_mac_fuse. Also sort the config order. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: cpu: add cpu speed/grade for i.MX8MPeng Fan2018-02-041-12/+15
| | | | | | | | | | Use more general enum types for speed grade. Refine get_cpu_speed_grade_hz to support i.MX8M. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: cpu: move speed/temp to common cpuPeng Fan2018-02-042-71/+73
| | | | | | | | | | The i.MX7 cpu speed/temp code could be reused on i.MX8M, so move them to common cpu code. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: add pad settings bit definition for i.MX8MPeng Fan2018-02-041-1/+21
| | | | | | | | | Add pad settings bit definition for i.MX8M. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: add i.MX8MQ SoC Revision and is_mx8m helperPeng Fan2018-02-042-2/+5
| | | | | | | | | | | Add i.MX8MQ SoC Revision Add is_mx8m helper The 7ULP is a dummy number, so use 0xEx. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: spl: implement spl_boot_device for i.MX8MPeng Fan2018-02-041-3/+5
| | | | | | | | | Implement spl_boot_device for i.MX8M. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: cpu: update cpu file to support i.MX8MPeng Fan2018-02-041-1/+10
| | | | | | | | | | Update get_reset_cause to reflect i.MX8M Compile out get_ahb_clk and set_chipselect_size for i.MX8M Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: boot_mode: add USB_BOOT entryPeng Fan2018-02-041-0/+1
| | | | | | | | Add USB_BOOT entry. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* imx: add sip functionPeng Fan2018-02-043-0/+28
| | | | | | | | | | | | | Add SiP (Silicon Provider) services function to issue SMC call to Arm Trusted Firmware. More SiP information could be found in https://github.com/ARM-software/arm-trusted-firmware/blob/master/ docs/arm-sip-service.rst Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
* imx: mx8m: add clock driverPeng Fan2018-02-044-0/+2201
| | | | | | | | | | | | | Add clock driver to support i.MX8M. There are two kind PLLs, FRAC pll and SSCG pll. ROM already configured SYS PLL1/2, we only need to configure the output. ocotp/i2c/pll decoding and configuration/usdhc/lcdif/dram pll/ enet clock are configured in the code. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
* imx: mx8m: add pin header filePeng Fan2018-02-041-0/+623
| | | | | | | | | Add pin header file for i.MX8M Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: mx8m: add register definition header filePeng Fan2018-02-041-0/+468
| | | | | | | | | Add register definition header file for i.MX8M Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: add i.MX8M into KconfigPeng Fan2018-02-043-5/+23
| | | | | | | | | | Add i.MX8M into Kconfig, create a new folder mx8m dedicated for i.MX8M. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx: mx7: psci: add system power off supportAnson Huang2018-02-042-0/+25
| | | | | | | | Add i.MX7 PSCI system power off support, linux kernel can use "poweroff" command to power off system via SNVS, PMIC power will be disabled. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
* imx: mx7: psci: add system reset supportAnson Huang2018-02-042-1/+21
| | | | | | | | Add i.MX7 PSCI system reset support, linux kernel can use "reboot" command to reset system even wdog driver is disabled in kernel. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
* board: i.MX6QDL: add Engicam i.CoreM6 1.5 QDL MIPI starter kitJagan Teki2018-02-044-0/+72
| | | | | | | | | | | | | | | | | | i.CoreM6 1.5 is an another i.CoreM6 QDL cpu modules which can be connected to EDIMM starter kit design with eMMC and MIPI-CSI interfaces suitable for Android and video capture application. notable features: CPU NXP i.MX6 S/DL/D/Q, Up to 4 x Cortex-A9@800MHz Memory Up to 2 GB DDR3-1066 Video Interfaces Up to 1 Parallel Up to 2 LVDS HDMI 1.4 port 8 bit CSI INPUT MIPI-CSI INPUT 1 x 10/100 Ethernet interface, 2 x USB, 1 x PCIe, 1 x I2S etc This patch adds support for Quad/Dual and DualLite/Solo SOM's on MIPI starter kit with boot from SD and eMMC. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* davinci: Fix omapl138_lcdk buildsTom Rini2018-01-311-15/+14
| | | | | | | | | | | | | The omapl138_lcdk platform is not a DA850 SoC so we need to select SOC_DA8XX and not SOC_DA850, as it was before. It does however point out a bit of a misnomer in how all of these PLL defines are named as they are generic to DA8xx, not DA850 centric. Remove the 'if SOC_DA850' under the defaults as these are simply the defaults. As SOC_DA8XX will select SYS_DA850_DDR_INIT when needed, we do not need it under both SOC options. Fixes: 76e22222d3aa ("Convert CONFIG_SYS_DV_CLKMODE et al to Kconfig") Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'xilinx-for-v2018.03' of git://git.denx.de/u-boot-microblazeTom Rini2018-01-3121-35/+334
|\ | | | | | | | | | | | | | | | | | | | | | | Xilinx changes for v2018.03 - Several Kconfig fixes (also moving configs to defconfigs) - Some DTS updates - ZynqMP psu rework based on Zynq concept - Add low level initialization for zc770 and zcu102 - Add support for Zynq zc770 x16 nand configuration - Add mini nand/emmc ZynqMP targets - Some arasan nand changes
| * arm64: zynqmp: Fix misspelled choice defaultUlf Magnusson2018-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no JTAG symbol in the "Boot mode" choice. JTAG_MODE was probably intended. No functional changes. Kconfig choices fall back on using the first (visible) symbol in the choice as the default if the default symbol is not visible. Discovered in Kconfiglib (https://github.com/ulfalizer/Kconfiglib), which prints the following warning: warning: the default selection JTAG (undefined) of <choice> (defined at arch/arm/cpu/armv8/zynqmp/Kconfig:107) is not contained in the choice I've added a corresponding warning to the C tools too, which is currently in linux-next: https://patchwork.kernel.org/patch/9983667/ Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm: zynq: Remove ethernet alias for topic-miamiMichal Simek2018-01-301-1/+0
| | | | | | | | | | | | | | Ethernet is not enabled that's why this alias should be completely unused. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm: zynq: Mark cc108 uart to be initialized before relocationMichal Simek2018-01-301-0/+1
| | | | | | | | | | | | | | The same change is done for others zynq boards to get uart as early as possible. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm: zynq: Update years in copyright to reflect latest changesMichal Simek2018-01-305-5/+5
| | | | | | | | | | | | Updating year in zynq files. Also add missing Copyright to board.c. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm64: zynqmp: Prepare psu_init reworkMichal Simek2018-01-305-11/+108
| | | | | | | | | | | | | | | | | | Move generic functions to common location psu_spl_init.c. Function declarations are added to private header. These changes are done in connection to the fact that still files from HDF can be copied over and compilation should pass. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: zynqmp: Add new target with only emmc enabledSiva Durga Prasad Paladugu2018-01-302-0/+77
| | | | | | | | | | | | | | | | | | | | This patch adds new target which is called as mini configuration with only emmc functionality and other required basic features enabled. This will be used to run in system with small footprint and needs emmc support. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * xilinx: zynqmp: Add new target with only nand enabledSiva Durga Prasad Paladugu2018-01-302-0/+110
| | | | | | | | | | | | | | | | | | | | This patch adds new target which is called as mini configuration with only nand functionality and other required basic features enabled. This will be used to run in system with small footprint and needs nand support. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm64: zynqmp: Provide a config to not map DDR region in MMU tableSiva Durga Prasad Paladugu2018-01-302-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DDR less systems are possible for configuration like mini qspi and making DDR region as normal memory may cause speculative access which results u-boot hang if DDR is absent. So, this patch fixes the issue by not making DDR memory region entry into MMU table. Future solution is to prepare MMU table per memory node in dts instead of hard code DDR addresses. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm64: zynqmp: Propagate error value from psu_init()Michal Simek2018-01-302-2/+3
| | | | | | | | | | | | | | | | psu_init() returns int which wasn't declared and checked. The patch is fixing function declarations and code to handle return values properly. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm64: zynqmp: Remove whitespaces in psu_init() commentMichal Simek2018-01-301-4/+4
| | | | | | | | | | | | Remove additional spaces before comment. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm: zynq: Fix pmu register description coding styleMichal Simek2018-01-301-1/+2
| | | | | | | | | | | | | | | | Drop the space before/after '<' and '>'; and separate the entries to be a bit more readable. Reported-by: Julia Cartwright <julia@ni.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm: zynq: Enable DM_GPIO when neededMichal Simek2018-01-301-1/+0
| | | | | | | | | | | | | | | | There are two reasons for doing this change. There is still !DM driver for xilinx soft gpio IP and especially it is saving some space for memory constrained boards like cse (almost ~400B). Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * arm: zynq: Enable DM_ETH and DM_MMC only if subsystem is enabledMichal Simek2018-01-301-2/+2
| | | | | | | | | | | | | | Do not enable DM_ETH/MMC if subsystems are not enabled. This saves memory for memory constrained boards like cse. Signed-off-by: Michal Simek <michal.simek@xilinx.com>