aboutsummaryrefslogtreecommitdiff
path: root/board/gateworks/gw_ventana/common.c
AgeCommit message (Collapse)AuthorFilesLines
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass1-1/+1
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-07-12imx: reorganize IMX code as other SOCsStefano Babic1-1/+1
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-05-12gw_ventana: Fix unused variable warningsTom Rini1-27/+0
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-04-30power: Drop CONFIG_I2C_PMICSimon Glass1-3/+4
This is only used by one board and should not be a CONFIG option. Instead it should use the driver model pmic framework. For now, just move the setting into the only board that uses it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-03-26imx: ventana: fix GW5903 VDD_ARM railTim Harvey1-0/+6
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-03-20imx: ventana: add GW5903 supportTim Harvey1-0/+99
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-03-20imx: ventana: add GW560x supportTim Harvey1-26/+151
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-03-20imx: ventana: add GW5904 supportTim Harvey1-9/+215
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-03-19imx: ventana: make SD3_VSELECT board specificTim Harvey1-13/+17
Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19imx: ventana: make OTG VBUS power enable board specificTim Harvey1-4/+12
Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19imx: ventana: change name of rs232_en to indicate polarityTim Harvey1-1/+1
Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19imx: ventana: move mmc_init to commonTim Harvey1-0/+35
Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2016-07-28imx: ventana: add extra DIO's for GW5520Tim Harvey1-0/+36
The GW5520 has 10 DIO's instead of the typical 4 found on the Ventana product family. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-07-28imx: ventana: make number of digital I/O's dynamicTim Harvey1-205/+194
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: make RS232 enable board specificTim Harvey1-9/+25
Not all Ventana boards have an RS232 transceiver, make it board specific. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31imx: ventana: add fdt fixup to enable UHS-I support on selected boardsTim Harvey1-0/+7
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 Harvey1-0/+54
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31imx: ventana: remove dependence on EECONFIG_SATA eeprom feature bitTim Harvey1-11/+21
The MSATA feature is a board-specific feature on Gateworks Ventana boards. In most cases a 2:1 mux will steer either PCIe or SATA to a miniPCIe socket through an MSATA_EN gpio. In these such cases assign the gpio in the board specific struct and use its presence to determine if we default the GPIO to PCIe and if we later steer it according to hwconfig. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2016-05-31imx: ventana: enable pwm device-tree property based on hwconfigTim Harvey1-0/+5
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: fix invalid dio configuration for pwm modeTim Harvey1-1/+1
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2015-12-01arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitionsMarek Vasut1-1/+1
The following patch changed the PFUZE100 swbst register bit definitions and broke PMIC configuration on multiple boards, at least on the novena and gw_ventana. This patch fixes it. commit 8fa46350a4c7dca7710362f6c871098557b934ad Author: Peng Fan <Peng.Fan@freescale.com> Date: Fri Aug 7 16:43:45 2015 +0800 power: regulator: add pfuze100 support Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Peng Fan <Peng.Fan@freescale.com> Cc: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Vagrant Cascadian <vagrant@aikidev.net> Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com> Tested-by: Vagrant Cascadian <vagrant@aikidev.net> Reviewed-by: Peng Fan <Peng.Fan@freescale.com> Acked-by: Tim Harvey <tharvey@gateworks.com>
2015-06-01imx: ventana: various board-specific GPIO config updatesTim Harvey1-17/+39
- 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 Harvey1-3/+7
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: split out common functions between SPL and ubootTim Harvey1-0/+823
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>