Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42516C4338F for ; Sat, 24 Jul 2021 18:07:40 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B399460E8B for ; Sat, 24 Jul 2021 18:07:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B399460E8B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35CE083168; Sat, 24 Jul 2021 20:07:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 92D5583143; Sat, 24 Jul 2021 20:07:14 +0200 (CEST) Received: from finn.localdomain (finn.gateworks.com [108.161.129.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6F2DE83132 for ; Sat, 24 Jul 2021 20:07:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gateworks.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=tharvey@gateworks.com Received: from 068-189-091-139.biz.spectrum.com ([68.189.91.139] helo=tharvey.pdc.gateworks.com) by finn.localdomain with esmtp (Exim 4.93) (envelope-from ) id 1m7Ldv-00590B-PZ; Sat, 24 Jul 2021 17:40:55 +0000 From: Tim Harvey To: Stefano Babic , Fabio Estevam , "NXP i . MX U-Boot Team" Cc: u-boot@lists.denx.de, Tim Harvey Subject: [RESEND PATCH 14/16] imx: ventana: add GW5913 support Date: Sat, 24 Jul 2021 10:40:44 -0700 Message-Id: <20210724174046.20589-14-tharvey@gateworks.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210724174046.20589-1-tharvey@gateworks.com> References: <20210724174046.20589-1-tharvey@gateworks.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The GW5913 is a Single Board Computer based on the NXP i.MX6Q/DL SoC with the following features: - DDR3 DRAM - NAND FLASH (256MiB or 2048MiB) - Gateworks System Periperhal Controller - front panel LED's - front panel pushbutton - Digital I/O connector (I2C/GPIO/UART) - u-blox Zoe-M8Q GPS - 1x RJ45 GbE - 1x MiniPCIe socket with PCIe USB 2.0 and nanoSIM socket - Passive PoE and wide-range DC power supply Signed-off-by: Tim Harvey --- board/gateworks/gw_ventana/common.c | 54 +++++++++++++++++++++ board/gateworks/gw_ventana/eeprom.c | 2 + board/gateworks/gw_ventana/ventana_eeprom.h | 1 + 3 files changed, 57 insertions(+) diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c index 3a0b18672f..a4c2f5549f 100644 --- a/board/gateworks/gw_ventana/common.c +++ b/board/gateworks/gw_ventana/common.c @@ -843,6 +843,51 @@ struct dio_cfg gw5906_dio[] = { }, }; +struct dio_cfg gw5913_dio[] = { + { + { IOMUX_PADS(PAD_SD1_DAT0__GPIO1_IO16) }, + IMX_GPIO_NR(1, 16), + { 0, 0 }, + 0 + }, + { + { IOMUX_PADS(PAD_SD1_DAT2__GPIO1_IO19) }, + IMX_GPIO_NR(1, 19), + { IOMUX_PADS(PAD_SD1_DAT2__PWM2_OUT) }, + 2 + }, + { + { IOMUX_PADS(PAD_SD1_DAT1__GPIO1_IO17) }, + IMX_GPIO_NR(1, 17), + { IOMUX_PADS(PAD_SD1_DAT1__PWM3_OUT) }, + 3 + }, + { + { IOMUX_PADS(PAD_SD1_CMD__GPIO1_IO18) }, + IMX_GPIO_NR(1, 18), + { IOMUX_PADS(PAD_SD1_CMD__PWM4_OUT) }, + 4 + }, + { + { IOMUX_PADS(PAD_SD2_DAT0__GPIO1_IO15) }, + IMX_GPIO_NR(1, 15), + { 0, 0 }, + 0 + }, + { + { IOMUX_PADS(PAD_SD2_DAT1__GPIO1_IO14) }, + IMX_GPIO_NR(1, 14), + { 0, 0 }, + 0 + }, + { + { IOMUX_PADS(PAD_GPIO_19__GPIO4_IO05) }, + IMX_GPIO_NR(4, 5), + { 0, 0 }, + 0 + }, +}; + /* * Board Specific GPIO */ @@ -1082,6 +1127,15 @@ struct ventana gpio_cfg[GW_UNKNOWN] = { .vsel_pin = IMX_GPIO_NR(6, 14), .mmc_cd = IMX_GPIO_NR(7, 0), }, + + /* GW5913 */ + { + .gpio_pads = gw5912_gpio_pads, + .num_pads = ARRAY_SIZE(gw5912_gpio_pads) / 2, + .dio_cfg = gw5913_dio, + .dio_num = ARRAY_SIZE(gw5913_dio), + .wdis = IMX_GPIO_NR(1, 0), + }, }; #define SETUP_GPIO_OUTPUT(gpio, name, level) \ diff --git a/board/gateworks/gw_ventana/eeprom.c b/board/gateworks/gw_ventana/eeprom.c index a4f3065c7d..d21aa3c38f 100644 --- a/board/gateworks/gw_ventana/eeprom.c +++ b/board/gateworks/gw_ventana/eeprom.c @@ -128,6 +128,8 @@ read_eeprom(int bus, struct ventana_board_info *info) type = GW5910; else if (info->model[4] == '1' && info->model[5] == '2') type = GW5912; + else if (info->model[4] == '1' && info->model[5] == '3') + type = GW5913; break; default: printf("EEPROM: Unknown model in EEPROM: %s\n", info->model); diff --git a/board/gateworks/gw_ventana/ventana_eeprom.h b/board/gateworks/gw_ventana/ventana_eeprom.h index 9cac4a769c..2d5c27261e 100644 --- a/board/gateworks/gw_ventana/ventana_eeprom.h +++ b/board/gateworks/gw_ventana/ventana_eeprom.h @@ -123,6 +123,7 @@ enum { GW5909, GW5910, GW5912, + GW5913, GW_UNKNOWN, GW_BADCRC, }; -- 2.17.1