diff options
author | Pushpal Sidhu <psidhu@gateworks.com> | 2015-04-08 12:55:00 -0700 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2015-04-22 14:39:12 +0200 |
commit | e9fc6d137bc302c89a2d9395be1a9a4b05f75a74 (patch) | |
tree | 483f43cd8399f56d43095304f2350857adcab58d | |
parent | ee5931d488122f1d4510bf03d37183fabd35fc0d (diff) | |
download | u-boot-imx-e9fc6d137bc302c89a2d9395be1a9a4b05f75a74.zip u-boot-imx-e9fc6d137bc302c89a2d9395be1a9a4b05f75a74.tar.gz u-boot-imx-e9fc6d137bc302c89a2d9395be1a9a4b05f75a74.tar.bz2 |
imx: ventana: add DT fixup for GW522x to change PCIE_RST# GPIO
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>
-rw-r--r-- | board/gateworks/gw_ventana/gw_ventana.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index b7199f1..50a2a9a 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -669,6 +669,8 @@ static iomux_v3_cfg_t const gw52xx_gpio_pads[] = { IOMUX_PADS(PAD_EIM_D31__GPIO3_IO31 | DIO_PAD_CFG), /* PCI_RST# */ IOMUX_PADS(PAD_ENET_TXD1__GPIO1_IO29 | DIO_PAD_CFG), + /* PCI_RST# (GW522x) */ + IOMUX_PADS(PAD_EIM_D23__GPIO3_IO23 | DIO_PAD_CFG), /* PCIESKT_WDIS# */ IOMUX_PADS(PAD_GPIO_17__GPIO7_IO12 | DIO_PAD_CFG), }; @@ -1168,6 +1170,10 @@ static void setup_board_gpio(int board) } #if !defined(CONFIG_CMD_PCI) + /* GW522x Uses GPIO3_IO23 for PCIE_RST# */ + if (board_type == GW52xx && info->model[4] == '2') + gpio_cfg[board].pcie_rst = IMX_GPIO_NR(3, 23); + /* assert PCI_RST# (released by OS when clock is valid) */ gpio_direction_output(gpio_cfg[board].pcie_rst, 0); #endif @@ -1656,6 +1662,28 @@ int ft_board_setup(void *blob, bd_t *bd) fdt_status_disabled(blob, i); } + /* GW522x Uses GPIO3_IO23 instead of GPIO1_IO29 */ + else if (board_type == GW52xx && info->model[4] == '2') { + u32 handle = 0; + u32 *range = NULL; + + i = fdt_node_offset_by_compatible(blob, -1, "fsl,imx6q-pcie"); + if (i) + range = (u32 *)fdt_getprop(blob, i, "reset-gpio", + NULL); + + if (range) { + i = fdt_path_offset(blob, + "/soc/aips-bus@02000000/gpio@020a4000"); + if (i) + handle = fdt_get_phandle(blob, i); + if (handle) { + range[0] = cpu_to_fdt32(handle); + range[1] = cpu_to_fdt32(23); + } + } + } + /* * isolate CSI0_DATA_EN for GW551x below revB to work around * errata causing non functional digital video in (it is not hooked up) |