summaryrefslogtreecommitdiffstats
path: root/board/gateworks/gw_ventana/gw_ventana.c
Commit message (Collapse)AuthorAgeFilesLines
* Delete tests of CONFIG_OF_LIBFDT when testing CONFIG_OF_BOARD_SETUPRobert P. J. Day2016-05-271-2/+2
| | | | | | | | | | | | | | | | 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>
* imx: ventana: skip mtdparts fixup if no flashTim Harvey2015-06-011-3/+5
| | | | | | This avoids an error message on NAND-less boards. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: make fdt_file1 and fdt_file2 automatic and non-overridableTim Harvey2015-06-011-8/+4
| | | | | | | | | 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>
* imx: ventana: make model env var automatic and non-overridableTim Harvey2015-06-011-6/+1
| | | | | | | 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>
* imx: ventana: various board-specific GPIO config updatesTim Harvey2015-06-011-8/+6
| | | | | | | | | | | | | | - 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>
* imx: ventana: detect pmic using i2c probe instead of board modelTim Harvey2015-05-151-1/+1
| | | | | | | | 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>
* imx: ventana: move GSC boot watchdog disable function to gsc.cTim Harvey2015-05-151-22/+2
| | | | | | Move the code that disables the GSC boot watchdog into gsc.c Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: split out common functions between SPL and ubootTim Harvey2015-05-151-863/+11
| | | | | | | | | | | | | | | | 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>
* imx: ventana: default msata/pci mux to pci before PCI enumerationTim Harvey2015-05-151-3/+4
| | | | | | | | 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>
* imx: ventana: fix pcie reset for GW522xTim Harvey2015-05-151-4/+4
| | | | | | | 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>
* imx: ventana: enable DM_SERIALTim Harvey2015-05-151-0/+9
| | | | | | mxc_serial supports DM so lets use it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: register gpio's with gpio_requestTim Harvey2015-05-151-20/+57
| | | | | | | 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>
* imx: ventana: set HDMI video in to yuv422bt656 for GW551x-ATim Harvey2015-04-221-0/+3
| | | | | | | | | 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>
* imx: ventana: use hdmiinfmt env var to override HDMI capture formatTim Harvey2015-04-221-0/+39
| | | | | | | | | 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>
* imx: ventana: add DT fixup for GW522x to change PCIE_RST# GPIOPushpal Sidhu2015-04-221-0/+28
| | | | | | | | 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>
* imx: ventana: add 'gsc wd' command for enabling and disabling GSC watchdogTim Harvey2015-04-221-16/+2
| | | | | | | | | | | | | | | | | | 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>
* imx: ventana: added device-tree display configuration for LVDS displaysTim Harvey2015-04-221-0/+8
| | | | | | | | 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>
* imx: ventana: add support for DLC-700JMGT4 and DLC-800FIGT3 LCD displaysTim Harvey2015-04-221-0/+42
| | | | | | | | Add LVDS support for two LVDS LCD displays: DLC-700JMGT4 - 7" 1024x600 DLC-800FIGT3 - 8" 1024x768 Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add DT fixup for GW54xx compatibility with older kernelsTim Harvey2015-04-221-0/+11
| | | | | | | | 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>
* imx: ventana: added DT fixup for GW551x-A video inputTim Harvey2015-04-221-0/+35
| | | | | | | | | | | 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>
* imx: ventana: add mem_mb dynamic env varTim Harvey2015-04-221-0/+4
| | | | | | | | 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>
* imx: ventana: only pinmux FEC enet signals for boards using itTim Harvey2015-04-221-3/+3
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add wdis config for GW5520Tim Harvey2015-04-221-0/+1
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: Add support for GW551xTim Harvey2015-04-221-9/+53
| | | | | | | | | | | | | | | | | 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>
* imx: ventana: disable IMX6 watchdogs on GW51xx RevA and RevBTim Harvey2015-04-221-0/+21
| | | | | | | | | A board level errata causes the IMX6 watchdog to be unstable on the GW51xx RevA and RevB boards which can cause the watchdog to trip extremely early (under 5seconds) under certain operating conditions. Disable the watchdog node in the device-tree to work around this issue. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: fix various sparse warningsTim Harvey2015-04-221-15/+15
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: set LTC3676 PMIC to appropriate values per datasheetTim Harvey2015-04-221-16/+26
| | | | | | | | | | | | | The IMX6 Datasheets specifies that when the IMX6 LDO is enabled (internal Anatop LDO's for VDD_ARM, VDD_SOC, and VDD_xPU) you need to provide 1350mV on VDD_ARM_IN and VDD_SOC_IN for IMX6Q@1GHz (Automotive) and 1275mV for IMX6DL@800MHz (Industrial). While we are still about 50mV shy on the IMX6Q operating at 1GHz we set it to the max we can and leave it up to the kernel to implement a regulator driver for the LTC3676 and put the LDO's in bypass mode which allows us to drop the voltages by 125mV respectively. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add usb_pcisel hwconfig supportTim Harvey2015-04-221-1/+3
| | | | | | | | The GW52xx has a MUX that can direct front-panel USB OTG to one of the miniPCIe sockets (for use with a cellular modem for example). Use hwconfig to steer this. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: remove unused GPIO configurationTim Harvey2015-04-221-2/+0
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: assign default ethprime dynamicallyTim Harvey2015-04-221-0/+9
| | | | | | | Gateworks Ventana boards don't all use IMX6 FEC, so lets define default ethprime based off the first detected device. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add i210 supportTim Harvey2015-04-221-0/+4
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* fdt: Allow ft_board_setup() to report failureSimon Glass2014-11-211-4/+6
| | | | | | | | | | | | | | | | | | This function can fail if the device tree runs out of space. Rather than silently booting with an incomplete device tree, allow the failure to be detected. Unfortunately this involves changing a lot of places in the code. I have not changed behvaiour to return an error where one is not currently returned, to avoid unexpected breakage. Eventually it would be nice to allow boards to register functions to be called to update the device tree. This would avoid all the many functions to do this. However it's not clear yet if this should be done using driver model or with a linker list. This work is left for later. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* ARM: i.MX: provide declaration for board_spi_cs_gpioEric Nelson2014-10-211-0/+1
| | | | | | | | Provide a public declaration of the board_spi_cs_gpio() callback for i.MX SPI chip selects to prevent the warning "Should it be static?" when compiling with "make C=1". Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
* spi: mxc: fix sf probe when using mxc_spiNikita Kiryanov2014-09-241-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MXC SPI driver has a feature whereas a GPIO line can be used to force CS high across multiple transactions. This is set up by embedding the GPIO information in the CS value: cs = (cs | gpio << 8) This merge of cs and gpio data into one value breaks the sf probe command: if the use of gpio is required, invoking "sf probe <cs>" will not work, because the CS argument doesn't have the GPIO information in it. Instead, the user must use "sf probe <cs | gpio << 8>". For example, if bank 2 gpio 30 is used to force cs high on cs 0, bus 0, then instead of typing "sf probe 0" the user now must type "sf probe 15872". This is inconsistent with the description of the sf probe command, and forces the user to be aware of implementaiton details. Fix this by introducing a new board function: board_spi_cs_gpio(), which will accept a naked CS value, and provide the driver with the relevant GPIO, if one is necessary. Cc: Eric Nelson <eric.nelson@boundarydevices.com> Cc: Eric Benard <eric@eukrea.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Marek Vasut <marex@denx.de> Reviewed-by: Marek Vasut <marex@denx.de> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Reviewed-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
* imx: ventana: Avoid undefined behaviourThierry Reding2014-09-091-1/+1
| | | | | | | | | | | | | | | | | | | The leds array within struct ventana has space for 3 elements, but the setup_board_gpio() function tries to set up 4 GPIOs for LEDs. Recent versions of GCC complain about that: board/gateworks/gw_ventana/gw_ventana.c: In function 'setup_board_gpio': board/gateworks/gw_ventana/gw_ventana.c:987:27: warning: iteration 3u invokes undefined behavior [-Waggressive-loop-optimizations] if (gpio_cfg[board].leds[i]) ^ board/gateworks/gw_ventana/gw_ventana.c:986:2: note: containing loop for (i = 0; i < 4; i++) { ^ Fix this by making the upper bound of the loop match the array size. Signed-off-by: Thierry Reding <treding@nvidia.com> Acked-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add pci fixup for PLX PEX860x switch GPIOTim Harvey2014-09-091-0/+30
| | | | | | | | Most Gateworks Ventana boards use a PLX PEX860x PCIe switch for PCIe expansion. These boards use GPIO on the PLX device as PERST# for the downstream ports thus we assert this when the PLX is enumerated. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: added cputype env varTim Harvey2014-09-091-0/+1
| | | | | | | | There are many similarities between the IMX6QUAD/IMX6DUAL and there are many similarities between the IMX6SOLO/IMX6DUALITE. Add a 'soctype' env variable that tells you which type you have. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add GW5520 supportTim Harvey2014-09-091-7/+73
| | | | | | | | | | | The GW5520 has an IMX6Q SoC with 512MB of DDR3, 256MB of NAND flash as well as: * 2x MiniPCIe sockets * 2x USB host sockets * 2x i210 GigE * HDMI out * digital I/O expansion Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: updated notes regarding NAND boot errataTim Harvey2014-09-091-2/+3
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add econfig commandTim Harvey2014-08-201-82/+18
| | | | | | | | | | | | The Gateworks Ventana EEPROM contains a set of configuration bits that affect the removal of device-tree nodes that support peripherals that do not exist on sub-loaded boards. This patch adds: - a structure to define a config bit name, dt node alias, bit position - an array of supported configuration items - an econfig command to get/set/list configuration bits - use of the array when adjusting the FDT prior to boot Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: leave PCI reset de-asserted if PCI enabledTim Harvey2014-08-201-5/+3
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add iomux for PCISKT_WDIS# gpioTim Harvey2014-08-201-0/+17
| | | | | | | The PCISKT_WDIS# gpio allows for asserting WDIS# going to the various PCIe sockets on the Ventana board. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: enable SION bit on gpio outputsTim Harvey2014-08-201-63/+70
| | | | | | | Enable the SION bit on gpio outputs that we wish to be able to read the value of. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: configure i2c_dis# pin properly for gw53xxTim Harvey2014-08-201-2/+2
| | | | | | | | The i2c_dis# pinmux/padconf was missing for the GW53xx (this feature was added to the GW53xx on revB PCB's). Additionally, remove the duplicate config for GW54xx. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add missing crlf to printTim Harvey2014-08-201-1/+1
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: add video enable gpio pinmux for GW54xxTim Harvey2014-08-201-0/+2
| | | | Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: remove caam disable per eeprom bitTim Harvey2014-08-201-1/+1
| | | | | | | During manufacturing this bit is not getting enabled when it should be, so we will ignore it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* imx: ventana: set dynamic env var for flash layoutTim Harvey2014-08-201-0/+4
| | | | | | | | | | | NAND devices have differing layouts with respect to page size and pages per block. These parameters affect the parameters that need to be passed to mkfs.ubifs and ubinize used to create UBI images. The various NAND chips supported by Gateworks Ventana fall into two different layouts which we refer to as 'normal' and 'large'. This layout is useful when referencing ubi files to download and flash so we create a dynamic env variable for it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
* pmic: pmic_pfuze100: Use a shorter name for PMIC nameFabio Estevam2014-08-081-1/+1
| | | | | | | | | | | It is redundant to use 'PFUZE100_PMIC' as the PMIC name because we already know it is a PMIC. Call it simply 'PFUZE100' instead. Cc: Tim Harvey <tharvey@gateworks.com> Cc: Markus Niebel <Markus.Niebel@tq-group.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
* mx6: Remove duplication of iomuxc structureFabio Estevam2014-07-231-2/+1
| | | | | | | | | | | | | | | There is no need to keep iomuxc_base_regs structure as it serves the exact same purpose of the iomuxc structure, which is to provide access to the GPR registers. The additional fields of iomuxc_base_regs are not used. Other advantage of 'iomuxc' is that it has a shorter name and the variable declarations can fit into a single line. So remove iomuxc_base_regs structure and use iomuxc instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
OpenPOWER on IntegriCloud