summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-05-18pinctrl: imx: fix memory leakPeng Fan
Each time set_state is called, a new piece memory will be allocated for pin_data, but not freed, this will incur memory leak. When error, the devm API could not free memory automatically. So need call devm_kfree when error. Issue reported by Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefan Agner <stefan.agner@toradex.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18imx: mx7dsabresd: fix secure config after switching to DMStefano Babic
mx7dsabresd_secure_defconfig was not updated after moving to DM. Signed-off-by: Stefano Babic <sbabic@denx.de>
2017-05-18imx: mx7dsabresd: switch to DM USBPeng Fan
Switch to use DM USB. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2017-05-18imx: mx7dsabresd: reset ENET_RST_BPeng Fan
Reset ENET_RST_B to make ENET function stable. Since DM_GPIO enabled, we use "gpio_spi@0_5" which corresponds to ENET_RST_B. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18imx: mx7dsabresd: enable more DM driversPeng Fan
Enable more DM drivers. The imx I2C/MMC DM drivers needs DM_GPIO enabled. The 74x164 drivers needs SOFT_SPI and DM_GPIO enabled. So needs to enable them together. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18gpio: 74x164: make oe-pins optionalPeng Fan
Make oe-pins optional because some boards have fixed it to enable. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-05-18spi: kconfig: add soft spi Kconfig entryPeng Fan
Add the Kconfig entry for SOFT_SPI which uses gpio to simulate the SPI signals. We use it for accessing 74x164 on some i.MX boards. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Jagan Teki <jagan@openedev.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18arm: dts: imx7d-sdb: add usdhc supportPeng Fan
Add usdhc support Signed-off-by: Peng Fan <peng.fan@nxp.com>
2017-05-18arm: dts: imx7d-sdb: add i2c supportPeng Fan
Add i2c support. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18arm: dts: imx7d-sdb: add regulator node for usb and mmcPeng Fan
Add regulator node for usb and mmc. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18arm: dts: imx7d-sdb: add spi gpio nodePeng Fan
Add spi gpio node for 74LV595. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18arm: dts: imx7d-sdb add basic dtsPeng Fan
Add basic dts for i.MX7D-SDB board. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18arm: dts: imx7: sync with LinuxPeng Fan
Sync with Linux commit 308ac756("Merge tag 'gpio-v4.11-3'"). Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefan Agner <stefan.agner@toradex.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-05-18imx: ventana: update imx wdog external reset dt propertyTim Harvey
Early backports of the imx wdog external reset feature occured before the property was accepted upstream and used 'ext-reset-output' instead of 'fsl,ext-reset-output'. In order to support older kernels remove both properties. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-05-18imx: ventana: fix GW520x external watchdog dt updateTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-05-18mx6sabresd: Remove non-SPL targetsFabio Estevam
Now that mx6sabresd_spl_defconfig can be used to boot all mx6sabresd variants, the non-SPL targets can be safely removed. Signed-off-by: Fabio Estevam <fabio.estvam@nxp.com>
2017-05-18mx6sabresd: Add SPL support for the mx6dl variantFabio Estevam
Add support for the mx6dlsabresd board in SPL. Retrieved the DCD table from: board/freescale/mx6sabresd/mx6dlsabresd.cfg (NXP U-Boot branch imx_v2015.04_4.1.15_1.0.0_ga) Flashed SPL and u-boot.img to an SD card and could successfully boot it on mx6q, mx6qp and mx6dl sabresd boards. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-05-18mx6sabresd: Prepare for supporting MX6DLFabio Estevam
Currently only MX6Q/QP sabresd boards are supported in SPL. In order to also support MX6DL we need to convert to using IOMUX_PADS and SETUP_IOMUX_PADS macros. Other than that move the <asm/arch/mx6-ddr.h> header inclusion to the SPL code block in order to avoid build error. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-05-18engicam: common: Move board_late_initJagan Teki
Move board_late_init into common area from supported boards. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18engicam: common: Move common board codeJagan Teki
Move possible common board code into common area from supported boards. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18geam6/isiot: Move the spl code commonJagan Teki
SPL code for geam6 and isiot are same, so move them in common area. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18icorem6[_rqs]: Move the spl code commonJagan Teki
SPL code for icorem6 and icorem6_rqs are same, so move them in common area. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18i.MX6UL: isiot: Add SETUP_IOMUX_PADSJagan Teki
Add generic SETUP_IOMUX_PADS function, for imx6ul mux pads and use them in Is.IoT board. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18isiot: Fix to use usdhc2_pads for mmc2Jagan Teki
mmc2 in Is.IoT using usdhc1_pads instead usdhc2_pads, so update the same. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18i.MX6UL: geam6ul: Add SETUP_IOMUX_PADSJagan Teki
Add generic SETUP_IOMUX_PADS function, for imx6ul mux pads. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18icorem6: Use drive strength macrosJagan Teki
Use driver strength macros instead of hex numbers. - IMX6DQ_DRIVE_STRENGTH - 0x30 - IMX6SDL_DRIVE_STRENGTH - 0x28 Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18icorem6: Use proper iomux_ddr_regs drive strength valuesJagan Teki
Usually the drive strength values for DQ and SDL are 0x30 and 0x28 respectively, update them accordingly. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18engicam: Move uart mux init to SPLJagan Teki
Since, u-boot handle fdt through uart so move the UART code to SPL instead make it to global area. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18icorem6: Make SPL to pick suitable fdtJagan Teki
SPL FIT is able to pick the suitable fdt file for u-boot, so add that function through board_fit_config_name_match. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18engicam: Set fdt_file env during run-timeJagan Teki
Set fdt_file env variable during board_late_init Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18geam6ul: Add mmc_late_initJagan Teki
Let the runtime code can set the mmcdev and mmcroot based on the devno using mmc_get_env_dev instead of defining separately in build-time configs using mmc_late_init func. Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18geam6ul: Add modeboot env via board_late_initJagan Teki
Add runtime, modeboot env which is setting mmcboot, or nandboot based on the bootdevice so-that conditional macros b/w MMC and NAND for CONFIG_BOOTCOMMAND should be avoided in config files. Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18icorem6: Add mmc_late_initJagan Teki
Let the runtime code can set the mmcdev and mmcroot based on the devno using mmc_get_env_dev instead of defining separately in build-time configs using mmc_late_init func. Cc: Stefano Babic <sbabic@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18icorem6: Add modeboot env via board_late_initJagan Teki
Add runtime, modeboot env which is setting mmcboot, or nandboot based on the bootdevice so-that conditional macros b/w MMC and NAND for CONFIG_BOOTCOMMAND should be avoided in config files. Cc: Matteo Lisi <matteo.lisi@engicam.com> Cc: Michael Trimarchi <michael@amarulasolutions.com> Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-05-18imx-common: rdc-sema: correct return valuePeng Fan
When unlock, if caller is not the sema owner, return -EACCES, not 1. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18thermal: imx: fix calculationPeng Fan
Fix calculation. do_div can not handle negative values. Use div_s64_rem to handle the calculation. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18imx: thermal: update imx6 thermal driver according new equationPeng Fan
>From IC guys: " After a thorough accuracy study of the Temp sense circuit, we found that with our current equation, an average part can read 7 degrees lower than a known forced temperature. We also found out that the standard variance was around 2C; which is the tightest distribution that we could create. We need to change the temp sense equation to center the average part around the target temperature. " New equation: Tmeas = (Nmeas - n1) / slope + t1 + offset n1= fused room count t1= 25 offset=3.580661 slope= 0.4148468 – 0.0015423*n1 According the new equation, update the thermal driver. c1 and c2 changed to u64 type and update comments. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2017-05-18imx-common: timer: clean upPeng Fan
Drop the unneeded code. lib/time.c use timebase_l/h. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-05-18mx25pdk: Add fuse API supportFabio Estevam
Select CONFIG_FSL_IIM and CONFIG_CMD_FUSE so that the fuse API can be used. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-05-18net: fec_mxc: specify the registered eth index by dev_idAndy Duan
Specify the registered eth index by dev_id. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2017-05-18net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuseAndy Duan
Avoid transfer parameter dev_id value with "-1" to .fec_get_hwaddr(), it should transfer fec->dev_id to get mac address from fuse. Signed-off-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Stefano Babic <sbabic@denx.de>
2017-05-18net: fec: do not access reserved register for i.MX6ULLPeng Fan
The MIB RAM and FIFO receive start register does not exist on i.MX6ULL. Accessing these register will cause enet not work well or cause system report fault. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Joe Hershberger <joe.hershberger@ni.com>
2017-05-17Merge git://git.denx.de/u-boot-uniphierTom Rini
- Add workaround code to make LD20 SoC boot from ARM Trusted Firmware - Sync DT with Linux to fix DTC warnings - Add new SoC support code - Misc fix, updates
2017-05-17Merge git://git.denx.de/u-boot-x86Tom Rini
2017-05-17ARM: uniphier: add more init code for PXs3Masahiro Yamada
Add the boot device table and reset deassertion for eMMC. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-17ARM: uniphier: move kernel physical base to 0x82080000Masahiro Yamada
Reserve enough space below the kernel base. The assumed address map is: 80000000 - 80ffffff : for IPP 81000000 - 81ffffff : for ARM secure 82000000 - : for Linux Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-17ARM: dts: uniphier: sync DT with LinuxMasahiro Yamada
Fix the following DTC warnings: Warning (simple_bus_reg): Node /soc/system-bus@58c00000/support_card@1,1f00000/ethernet@00000000 simple-bus unit address format error, expected "0" Warning (simple_bus_reg): Node /soc/system-bus@58c00000/support_card@1,1f00000/uart@000b0000 simple-bus unit address format error, expected "b0000" Warning (simple_bus_reg): Node /soc/smpctrl@59800000 simple-bus unit address format error, expected "59801000" Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-17ARM: uniphier: add weird workaround code for LD20Masahiro Yamada
When booting from ARM Trusted Firmware, U-Boot runs in EL1-NS. The boot flow is as follows: BL1 -> BL2 -> BL31 -> BL33 (i.e. U-Boot) This boot sequence works fine for LD11 SoC (Cortex-A53), but LD20 SoC (Cortex-A72) hangs in U-Boot. The solution I found is to read sctlr_el1 and write back the value as-is. This should be no effect, but surprisingly fixes the problem for LD20 to boot. I do not know why. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-17ARM: uniphier: add usbupdate commandMasahiro Yamada
This script command will be useful to update boot images in the USB storage. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-17ARM: uniphier: fix MODEL field of REVISION registerMasahiro Yamada
The MODEL field is 3 bit wide. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>