summaryrefslogtreecommitdiff
path: root/board/gateworks/gw_ventana/gw_ventana.c
AgeCommit message (Collapse)Author
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()Simon Glass
Rename this function for consistency with env_set(). Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16env: Rename setenv() to env_set()Simon Glass
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-12imx: reorganize IMX code as other SOCsStefano Babic
Change is consistent with other SOCs and it is in preparation for adding SOMs. SOC's related files are moved from cpu/ to mach-imx/<SOC>. This change is also coherent with the structure in kernel. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Fabio Estevam <fabio.estevam@nxp.com> CC: Akshay Bhat <akshaybhat@timesys.com> CC: Ken Lin <Ken.Lin@advantech.com.tw> CC: Marek Vasut <marek.vasut@gmail.com> CC: Heiko Schocher <hs@denx.de> CC: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com> CC: Christian Gmeiner <christian.gmeiner@gmail.com> CC: Stefan Roese <sr@denx.de> CC: Patrick Bruenn <p.bruenn@beckhoff.com> CC: Troy Kisky <troy.kisky@boundarydevices.com> CC: Nikita Kiryanov <nikita@compulab.co.il> CC: Otavio Salvador <otavio@ossystems.com.br> CC: "Eric Bénard" <eric@eukrea.com> CC: Jagan Teki <jagan@amarulasolutions.com> CC: Ye Li <ye.li@nxp.com> CC: Peng Fan <peng.fan@nxp.com> CC: Adrian Alonso <adrian.alonso@nxp.com> CC: Alison Wang <b18965@freescale.com> CC: Tim Harvey <tharvey@gateworks.com> CC: Martin Donnelly <martin.donnelly@ge.com> CC: Marcin Niestroj <m.niestroj@grinn-global.com> CC: Lukasz Majewski <lukma@denx.de> CC: Adam Ford <aford173@gmail.com> CC: "Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr> CC: Boris Brezillon <boris.brezillon@free-electrons.com> CC: Soeren Moch <smoch@web.de> CC: Richard Hu <richard.hu@technexion.com> CC: Wig Cheng <wig.cheng@technexion.com> CC: Vanessa Maegima <vanessa.maegima@nxp.com> CC: Max Krummenacher <max.krummenacher@toradex.com> CC: Stefan Agner <stefan.agner@toradex.com> CC: Markus Niebel <Markus.Niebel@tq-group.com> CC: Breno Lima <breno.lima@nxp.com> CC: Francesco Montefoschi <francesco.montefoschi@udoo.org> CC: Jaehoon Chung <jh80.chung@samsung.com> CC: Scott Wood <oss@buserror.net> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Anatolij Gustschin <agust@denx.de> CC: Simon Glass <sjg@chromium.org> CC: "Andrew F. Davis" <afd@ti.com> CC: "Łukasz Majewski" <l.majewski@samsung.com> CC: Patrice Chotard <patrice.chotard@st.com> CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Hans de Goede <hdegoede@redhat.com> CC: Masahiro Yamada <yamada.masahiro@socionext.com> CC: Stephen Warren <swarren@nvidia.com> CC: Andre Przywara <andre.przywara@arm.com> CC: "Álvaro Fernández Rojas" <noltari@gmail.com> CC: York Sun <york.sun@nxp.com> CC: Xiaoliang Yang <xiaoliang.yang@nxp.com> CC: Chen-Yu Tsai <wens@csie.org> CC: George McCollister <george.mccollister@gmail.com> CC: Sven Ebenfeld <sven.ebenfeld@gmail.com> CC: Filip Brozovic <fbrozovic@gmail.com> CC: Petr Kulhavy <brain@jikos.cz> CC: Eric Nelson <eric@nelint.com> CC: Bai Ping <ping.bai@nxp.com> CC: Anson Huang <Anson.Huang@nxp.com> CC: Sanchayan Maity <maitysanchayan@gmail.com> CC: Lokesh Vutla <lokeshvutla@ti.com> CC: Patrick Delaunay <patrick.delaunay@st.com> CC: Gary Bisson <gary.bisson@boundarydevices.com> CC: Alexander Graf <agraf@suse.de> CC: u-boot@lists.denx.de Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-07-11Kconfig: Add CONFIG_SATA to enable SATASimon Glass
At present CONFIG_CMD_SATA enables the 'sata' command which also brings in SATA support. Some boards may wish to enable SATA without the command. Add a separate CONFIG to permit this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-06-05arm: Include asm/setup.h explictlySimon Glass
Include this header where needed so we do not need to rely on common.h. Signed-off-by: Simon Glass <sjg@chromium.org>
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-12gw_ventana: Fix unused variable warningsTom Rini
The variable nfc_pads is only referenced when CONFIG_CMD_NAND is set, move the existing guard and drop a now redundant comment. The variable gwproto_gpio_pads is never referenced, remove it. Cc: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-20imx: ventana: add GW5903 supportTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-03-20imx: ventana: add GW560x supportTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-03-20imx: ventana: add GW5904 supportTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-03-19imx: ventana: make OTG VBUS power enable board specificTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19imx: ventana: fix hwconfigTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19imx: ventana: move mmc_init to commonTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2016-07-28imx: ventana: add dt fixup for watchdog external resetTim Harvey
Added removal of the fsl,ext-reset-output property in the wdog node for board revisions that pre-date the addition of the external watchdog reset signal. This property is a recent addition to mainline linux kernel in order to specify that the IMX watchdog external reset should be used instead of the internal chip-level reset. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-07-28imx: ventana: refactor board-specific dt fixups (no functional change)Tim Harvey
Re-factor the board-specific dt fixups so that they are easier to follow and extend in the future: - use defines for DT paths - use switch/case per board - order models numerically There is no functional change in the code Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-07-28imx: ventana: make hwconfig initialize based on board configurationTim Harvey
The hwconfig env var allows user to control hardware specific configuration of board specific features but not all Ventana boards have the same features. We will use the magic default value of "_UNKNOWN_" to signify that the bootloader should create this based on detected board model. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-07-28imx: ventana: make number of digital I/O's dynamicTim Harvey
Replace the static list of board-specific digital I/O's with a dynamic list. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-07-28imx: ventana: add dt fixup for eth1 mac-addressTim Harvey
Ventana boards with a PCI Marvell Sky2 GigE MAC require the MAC address to be placed in a DT node in order for the mainline linux driver to obtain it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-07-28imx: ventana: add dt fixup for GW16082 irq mappingTim Harvey
The GW16082 mini-PCI expansion mezzanine uses a TI XIO2001 PCIe-to-PCI bridge with legacy INTA/B/C/D interrupts. These interrupts are assigned in the reverse order according to the PCI spec. If the TI bridge is found on the Ventana PCI bus, add device-tree nodes according to bus enumeration explicitly defining the interrupt mapping to override the default PCI mapping in the Linux kernel. This allows the GW16082 to work with upstream kernels that support device-tree irq parsing. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-06-12Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2016-05-31imx: ventana: add fdt fixup to enable UHS-I support on selected boardsTim Harvey
UHS-I support is available on Ventana boards with micro-SD sockets depending on the board revision. For backwards compatibility to not break users who have old bootloaders and newer kernels the device-tree on boards with microSD disables UHS-I support by default by defining the no-1-8-v property in the esdhc controller node. For models/revisions that support switchable 1.8V/3.3V I/O which is detectable by the presence of a pull-down on the SD3_VSELECT pin we remove that property to enable support in the kernel. Additionally we add SD3_VSELECT to the pinmux for clarity (even though U-Boot does not currently support UHS-I modes requiring 1.8V I/O). Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31imx: ventana: add GW553x supportTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31imx: ventana: enable pwm device-tree property based on hwconfigTim Harvey
Most Ventana boards have a connector with off-board digital-I/O signals including some that can be pinmuxed as either a PWM or a GPIO. The hwconfig env variable is used to configure these and they will be pinmuxed according to this configuration in the bootloader. This patch adds a device-tree fixup that will enable the pwm controller nodes appropriately for digital-I/O's that are configured as pwm via hwconfig so that the pin can be used with the Linux kernel /sys/class/pwm API. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31imx: ventana: export backlight gpio after gpio driver is availableTim Harvey
Calling request_gpio to register bklt_gpio with the GPIO driver had no effect in setup_display called from early board init (although pinmuxing it and configuring it as output-low does do what it should). Therefore move the request_gpio later in enable_lvds so that its registered for use by the gpio command if LVDS is actually enabled. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-27Delete tests of CONFIG_OF_LIBFDT when testing CONFIG_OF_BOARD_SETUPRobert P. J. Day
Since CONFIG_OF_BOARD_SETUP depends on CONFIG_OF_LIBFDT: config OF_BOARD_SETUP bool "Set up board-specific details in device tree before boot" depends on OF_LIBFDT ... remove superfluous tests of CONFIG_OF_LIBFDT when testing for CONFIG_OF_BOARD_SETUP. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> [trini: Typo fix: s/ifdefi/ifdef/] Signed-off-by: Tom Rini <trini@konsulko.com>
2015-06-01imx: ventana: skip mtdparts fixup if no flashTim Harvey
This avoids an error message on NAND-less boards. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-06-01imx: ventana: make fdt_file1 and fdt_file2 automatic and non-overridableTim Harvey
The fdt_file1 and fdt_file2 vars provide fallbacks for the fdt file loading script. There is no need to allow the user to override these as if they want to specify the fdt, they should do so in the first attempt which is the fdt_file var. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-06-01imx: ventana: make model env var automatic and non-overridableTim Harvey
We want to model env var to always reflect what was in the EEPROM. There is no point in allowing a user to override this. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-06-01imx: ventana: various board-specific GPIO config updatesTim Harvey
- Added iomux for CAN_STBY and RS484_TEN (GW52xx/GW53xx/GW54xx/GW551x) - Moved iomux of USBHUB_RST# out of board_ehci_hcd_init so that it is done regardless of USB being initialized in bootloader - Added usb_sel iomux/hwconfig for GW552x - Fixed mezzanine DIO for GW54xx - Fixed PANLEDR# for GW54xx - Fixed dio iomux/hwconfig for GW552x - Fixed dio iomux for GW551x - removed redundant #define Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15imx: ventana: detect pmic using i2c probe instead of board modelTim Harvey
Avoid requiring board-model and probe pmic by its i2c address. This is in preparation for being able to call pmic_setup() from SPL and not need board type. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15imx: ventana: move GSC boot watchdog disable function to gsc.cTim Harvey
Move the code that disables the GSC boot watchdog into gsc.c Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15imx: ventana: split out common functions between SPL and ubootTim Harvey
Move shared functions used by both SPL and U-Boot to common.c: - setup_iomux_uart() and uart pad config - gpio pad config In the process also moved the following to common.c in preparation for calling it from the SPL: - split i2c setup into a shared function - move pmic init to setup_pmic() function to call directly from power_init_board() - split gpio setup into early (iomux and default pin config) and late (output configuration based on env) Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15imx: ventana: default msata/pci mux to pci before PCI enumerationTim Harvey
PCI enumeration occurs early, before we fully configure our GPIO's. Make sure we steer the MSATA/PCI mux to PCI in board_init to ensure PCI is selected before enumeration. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15imx: ventana: fix pcie reset for GW522xTim Harvey
The re-assignment of pcie_rst gpio for GW522x needs to occur earlier, before the PCI subsystem calls the toggle funciton. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15imx: ventana: enable DM_SERIALTim Harvey
mxc_serial supports DM so lets use it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-05-15imx: ventana: register gpio's with gpio_requestTim Harvey
Prior to using a gpio a call to gpio_request() should be called to register it with the gpio subsystem. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: set HDMI video in to yuv422bt656 for GW551x-ATim Harvey
The initial revision of the GW551x does not connect enough signals between the HDMI receiver and the IMX6 CSI for 16bit capture mode necessary for yuv422smp capture. Future revisions will, but for the initial rev force it to yuv422bt656 mode which requires an 8bit video data bus. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: use hdmiinfmt env var to override HDMI capture formatTim Harvey
The HDMI receiver used on the GW54xx and GW551x has a 16bit video data bus interconnect between it and the IMX6 CSI. This can be used in two different modes, each having advantages and disadvantages. Allow the hdmiinfmt env var to specify which format is desired (yuv422smp or yuv422bt656). Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: add DT fixup for GW522x to change PCIE_RST# GPIOPushpal Sidhu
The GW522x is functionally the same as a GW52xx except for PCIE_RST# GPIO. Add a DT fixup to change this gpio upon bootup. Signed-off-by: Pushpal Sidhu <psidhu@gateworks.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: add 'gsc wd' command for enabling and disabling GSC watchdogTim Harvey
This adds information about the Gateworks System Controller to the gsc command such as the firmware version, firmware CRC and status of the GSC watchdog (if its enabled and if its tripped). Additionally the 'gsc wd' command can be used to enable or disable the watchdog with the following usage: gsc wd enable [30|60] gsc wd disable Note that the GSC registers are battery-backed by the GSC coincell so once eanbled, they remain enabled across power-cycles or until either the GSC firmware has been updated or FLASH has been re-programmed by the Gateworks JTAG adapter. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: added device-tree display configuration for LVDS displaysTim Harvey
Configure kernel device-tree for display from env var. This is useful to specify the display present when the device-tree supports multiple non-detectable display configurations. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: add support for DLC-700JMGT4 and DLC-800FIGT3 LCD displaysTim Harvey
Add LVDS support for two LVDS LCD displays: DLC-700JMGT4 - 7" 1024x600 DLC-800FIGT3 - 8" 1024x768 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: add DT fixup for GW54xx compatibility with older kernelsTim Harvey
Certain older kernels in use by some customers erroneously define a uart3 for GW54xx with a pinmux that conflicts with NAND. This will remove that node to avoid such conflicts. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: added DT fixup for GW551x-A video inputTim Harvey
The GW551x-A revision does not have the CSI0_DATA_EN pin connected, therefore we need to make sure that signal is not muxed to the CSI_DATA_EN signal internally and do so by steering it to the unused GPIO5_IO20. We do this so that the kernel device-tree can properly define the signal for RevB and beyond boards that do have this hooked up properly and require it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: add mem_mb dynamic env varTim Harvey
Certain OS bootscripts need to know how much memory a board has to adjust kernel parameters (namely Android). This allows those boards to determine mem size in MB. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: only pinmux FEC enet signals for boards using itTim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: add wdis config for GW5520Tim Harvey
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-04-22imx: ventana: Add support for GW551xTim Harvey
The GW551x is a small form factor board based on the IMX6 SoC that includes: * up to 512MB DDR3 memory * up to 2GB NAND flash * 1x miniPCIe socket (with USB) * HDMI out (micro-HDMI) * HDMI in (micro-HDMI) * TTL level I/O (supported by GW16111 breakout board): * I2C * 2x UART * CAN * 2x DIO (GPIO/PWM) * USB OTG Signed-off-by: Tim Harvey <tharvey@gateworks.com>