summaryrefslogtreecommitdiff
path: root/board/gateworks
AgeCommit message (Collapse)AuthorFilesLines
2021-06-09imx: ventana: enable dm support for PCI and FEC ethernetTim Harvey2-84/+16
Enable driver model support for FEC ethernet which allows us to remove the iomux and board_eth_init function. Replace the toggling of the ethernet phy reset with dt configuration. Enable driver model support for PCI which allows us to remove the eth1000_initialize() call. Additionally enable PCI_INIT_R to scan for PCI devices on init such as the e1000 that is present on the GW552x. Convert board_pci_fixup to use dm callback and remove pcidisable env variable which is not supported for DM_PCI and thus leave PCI always enabled during init. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-05-02imx: ventana: add delay before reading EEPROMTim Harvey1-0/+1
fixes: d863d054397a ("imx: ventana: convert U-Boot to OF_CONTROL using FIT image") Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-04-08board: gateworks: venice: fix gsc_get_devTim Harvey1-17/+6
use dm_i2c_probe instead of i2c_get_chip which appears to be more reliable. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-04-08imx: ventana: enable dm for SPITim Harvey1-27/+0
Enable driver model for SPI which allows us to remove the iomux and init. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-04-08imx: ventana: enable dm for MTD and NANDTim Harvey1-52/+0
Enable driver model for MTD and NAND support allowing us to remove the iomux, init, and most of the static configuration. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-04-08imx: ventana: enable dm support for MMC and SATATim Harvey1-5/+0
Enable driver model support for MMC and SATA. Note that DM_MMC requires aliases for your mmc devices so they are added to the dts. Linux does not support enumerating mmc devices by alias so these are not present in the Linux dts. Note that we still need board_mmc_init() and board_mmc_getcd() for not DM SPL to support MMC. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-04-08imx: ventana: enable dm support for USBTim Harvey3-36/+4
Enable dm support for USB (which also requires dm support for fixed regulators used for vbus enable) and remove usb iomux which is no longer needed. We can remove the handling of otgpwr_en gpio as this is defined in dt as usbotg vbus-supply but we need to keep the handling of USB_HUB_RST# for boards that have a USB HUB as that isn't defined in the dt's currently. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-04-08imx: ventana: add pinctrl and remove unneeded UART init and configTim Harvey1-12/+0
Once the IMX6 pinctrl driver is added UART is fully using driver mode so we no longer need to config and initialize it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-04-08imx: ventana: convert U-Boot to OF_CONTROL using FIT imageTim Harvey4-2/+117
In preparation for dm conversion convert to OF_CONTROL by adding FIT image support and multi dtb. Add a board_fit_config_name_match to match the dtb based off of EEPROM model. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-04-08imx: ventana: add Gateworks Ventana dtsTim Harvey1-0/+48
Add Gateworks Ventana dts/dtsi files from Linux 5.11 in preparation for conversion to driver-model. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-03-03board: gateworks: imx8mm: Add Gateworks Venice board supportTim Harvey10-0/+3646
Add initial support for Gateworks Venice product family based on the i.MX 8M Mini SoC Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-05dm: Rename U_BOOT_DEVICE() to U_BOOT_DRVINFO()Simon Glass1-1/+1
The current macro is a misnomer since it does not declare a device directly. Instead, it declares driver_info record which U-Boot uses at runtime to create a device. The distinction seems somewhat minor most of the time, but is becomes quite confusing when we actually want to declare a device, with of-platdata. We are left trying to distinguish between a device which isn't actually device, and a device that is (perhaps an 'instance'?) It seems better to rename this macro to describe what it actually is. The macros is not widely used, since boards should use devicetree to declare devices. Rename it to U_BOOT_DRVINFO(), which indicates clearly that this is declaring a new driver_info record, not a device. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass1-1/+1
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass1-1/+1
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada2-4/+4
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-05-19common: Drop linux/delay.h from common headerSimon Glass4-0/+4
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop log.h from common headerSimon Glass5-0/+6
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19command: Remove the cmd_tbl_t typedefSimon Glass2-5/+9
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop init.h from common headerSimon Glass2-0/+2
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop image.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop net.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18arm: Don't include common.h in header filesSimon Glass1-0/+1
It is bad practice to include common.h in other header files since it can bring in any number of superfluous definitions. It implies that some C files don't include it and thus may be missing CONFIG options that are set up by that file. The C files should include these themselves. Update some header files in arch/arm to drop this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-18common: Move hang() to the same header as panic()Simon Glass1-0/+1
At present panic() is in the vsprintf.h header file. That does not seem like an obvious choice for hang(), even though it relates to panic(). So let's put hang() in its own header. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Migrate a few more files] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-15dm: gpio: Allow control of GPIO uclass in SPLSimon Glass1-0/+3
At present if CONFIG_SPL_GPIO_SUPPORT is enabled then the GPIO uclass is included in SPL/TPL without any control for boards. Some boards may want to disable this to reduce code size where GPIOs are not needed in SPL or TPL. Add a new Kconfig option to permit this. Default it to 'y' so that existing boards work correctly. Change existing uses of CONFIG_DM_GPIO to CONFIG_IS_ENABLED(DM_GPIO) to preserve the current behaviour. Also update the 74x164 GPIO driver since it cannot build with SPL. This allows us to remove the hacks in config_uncmd_spl.h and Makefile.uncmd_spl (eventually those files should be removed). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-08-11env: Drop environment.h header file where not neededSimon Glass2-2/+0
This header file is now only used by files that access internal environment features. Drop it from various places where it is not needed. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_get() to env.hSimon Glass1-0/+1
Move env_get() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_set() to env.hSimon Glass1-0/+1
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-11env: Move env_get_yesno() to env.hSimon Glass1-0/+1
Move env_get_yesno() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-08-11env: Move env_init() to env.hSimon Glass1-0/+1
Move env_init() over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-06-23Convert to use fsl_esdhc_imx for i.MX platformsYangbo Lu2-4/+4
Converted to use fsl_esdhc_imx for i.MX platforms. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Martyn Welch <martyn.welch@collabora.com> Acked-by: Jason Liu <Jason.hui.liu@nxp.com>
2019-03-13imx: ventana: added support for 16bit 8Gb density (1GiB) DRAMTim Harvey1-0/+5
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-03-13imx: ventana: hexdump invalid EEPROM dataTim Harvey1-0/+10
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: fix usage of dt paths with leading 0s (Linux 4.15+)Tim Harvey1-49/+41
device-tree paths should never be used that reference node addresses making an assumption about leading zeros. They should not be there per the device-tree specification however they have been there until Linux 4.15 when they were removed via kernel commit 8dccafaa281aa1d240a58bbcdff338aec114a021. This fixes various issues which will occur when using Linux 4.15+ that are being fixed up on a per model per PCB revision basis such as: - enabling MMC UHS-I on board revisions that support it - enabling PWM based on hwconfig - fixing PCIe reset on GW552x - removing cpu external watchdog reset on boards that do not support it - populate PCI dt nodes based on PCI scan in order to fix GW16082 interrupt mapping and inject MAC address for PCI based GbE Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: gw5904/gw5909: disable RS485Tim Harvey1-0/+2
The GW5904/GW5909 have a SP33E multi-protocol serial transceiver which we want to configure to RS232 by default (by de-asserting RS485_EN) Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: add support for GW5901/GW5902Tim Harvey4-1/+146
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: add support for GW5909Tim Harvey3-0/+25
The GW5909 is a small single board computer based on the i.MX6DL SoC with the same peripheral set as the GW5904 but with half the DRAM loaded and an additional RS232 transceiver off UART2. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: add support for GW5908Tim Harvey4-0/+68
The GW5908 is a small single board computer based on the i.MX6DL SoC with the same peripheral set as the GW530x but with 1GiB density DRAM (64bit 512MiB). Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: add support for GW5907Tim Harvey3-0/+18
The GW5907 is a small single board computer based on the i.MX6DL SoC with the following peripheral set: - DDR3 memory (512MB default) - 1x GigE (i.MX6 FEC) - Gateworks System Controller Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: add support for GW5906Tim Harvey4-0/+49
The GW5906 is a GW552x with mechanical and power supply connector differences. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: add i2c detect for all LVDS displaysTim Harvey1-4/+4
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: skip nand init for nandless boardsTim Harvey3-4/+14
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: add support for Z101WX01 LVDS displayTim Harvey1-1/+23
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: add support for GW5905Tim Harvey7-12/+149
The GW5905 is single-board tablet computer based on the i.MX6 SoC with the following peripheral set: - eMMC flash (boot device) - microSD expansion - LVDS display connector for off-board 3D+1C with PWM backlight and I2C based touch controller - MIPI camera connector supporting the TRULY CM8487-B500SA-E (OV5640) - ublox EMMY-W1 WiFi/Bluetooth/NFC module (SDIO/UART) - ublox ZOE-M8Q GPS - LSM9DS1 9-DOF IMU - 1x 1-lane miniPCIe socket with USB 2.0 - Gateworks System Controller - Audio jack with TLV320AIC Audio Codec, Speaker AMP and TSA227E Headphone detect - MAX8607 3-mode LED camera flash - DECT ULE module - FUSB302 USB-C PD and ISL9238 Battery charger Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: remove setup of I2C3 from SPLTim Harvey4-86/+90
Do not setup I2C3 in the SPL for Ventana as some devices on that bus (aic3x codecs) can hang the bus causing i2c_setup to spin endlessly until they are put into reset. Removing the setup of I2C3 from the SPL allows the board-specific GPIO to be configured to take care of putting codecs in reset prior to U-Boot setting up I2C3. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: do not iomux UART1Tim Harvey1-7/+0
The only UART that is garunteed on Ventana boards is UART2 (serial-console). Remove UART1 pinmux as that it is not consistent across all Ventana boards and U-Boot doesn't need it. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2019-02-16imx: ventana: mv88e61xx change LED configurationTim Harvey1-5/+5
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2018-07-25board: constify struct node_info arrayMasahiro Yamada1-1/+1
Add 'const' (also 'static' in some places) to struct node_info arrays to save memory footprint. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini8-16/+8
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-27Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini1-2/+0
We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>