From patchwork Tue Sep 3 14:38:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157046 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8lk4nfQz9s7T for ; Wed, 4 Sep 2019 00:41:22 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 53EEAC21DB3; Tue, 3 Sep 2019 14:39:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D88F5C21DA6; Tue, 3 Sep 2019 14:39:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B64A8C21C50; Tue, 3 Sep 2019 14:39:10 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 8F5AFC21C4A for ; Tue, 3 Sep 2019 14:39:10 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jB31HPz1rLGV; Tue, 3 Sep 2019 16:39:10 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jB2pdPz1qqkB; Tue, 3 Sep 2019 16:39:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id PAPm8yM3i1FU; Tue, 3 Sep 2019 16:39:09 +0200 (CEST) X-Auth-Info: hpFMNPr8V1TBbo3FM91YEefL6jkbwumXiSl8VCP1YJw= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:09 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:37 +0200 Message-Id: <20190903143850.9824-2-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Subject: [U-Boot] [PATCH v2 01/14] fix: defconfig: Enable OF_CONTROL for display5_factory X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This change fixes issue with building display5 "factory" U-Boot variant when the display5 board gains DM/DTS support. Signed-off-by: Lukasz Majewski --- Changes in v2: None configs/display5_factory_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig index 70c64260d87b..c467e8c92890 100644 --- a/configs/display5_factory_defconfig +++ b/configs/display5_factory_defconfig @@ -62,6 +62,8 @@ CONFIG_MTDIDS_DEFAULT="nor0=02008000.spi.1" CONFIG_MTDPARTS_DEFAULT="mtdparts=02008000.spi.1:128k(SPL),1m(u-boot),64k(env1),64k(env2),4m(swu-kernel),16m(swu-initramfs),1m(factory),-(reserved)" # CONFIG_SPL_EFI_PARTITION is not set CONFIG_PARTITION_TYPE_GUID=y +CONFIG_OF_CONTROL=y +CONFIG_DEFAULT_DEVICE_TREE="imx6q-display5" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DFU_MMC=y CONFIG_DFU_SF=y @@ -88,4 +90,3 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x4000 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_IMX_WATCHDOG=y -CONFIG_OF_LIBFDT=y From patchwork Tue Sep 3 14:38:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157045 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8lQ1shnz9sDB for ; Wed, 4 Sep 2019 00:41:06 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D2FCDC21DB3; Tue, 3 Sep 2019 14:39:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7C7D5C21DD9; Tue, 3 Sep 2019 14:39:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EC00EC21C50; Tue, 3 Sep 2019 14:39:11 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id C4BDFC21C4A for ; Tue, 3 Sep 2019 14:39:11 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jC4TR3z1rLGV; Tue, 3 Sep 2019 16:39:11 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jC43bVz1qqkP; Tue, 3 Sep 2019 16:39:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ymx0vXUF0_o0; Tue, 3 Sep 2019 16:39:10 +0200 (CEST) X-Auth-Info: ih/0zYccGAfLHMqA8uyQZrAxJ8oBGKO/pzAgsFrzthA= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:10 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:38 +0200 Message-Id: <20190903143850.9824-3-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v2 02/14] ARM: imx: defconfig: Enable CONFIG_PINCTRL{_IMX6} on display5's defconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Enable PINCTRL for i.MX6 soc based display5 after DM/DTS conversion. Signed-off-by: Lukasz Majewski --- Changes in v2: None configs/display5_defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/display5_defconfig b/configs/display5_defconfig index 8609cd5a8cf6..69f3ceee098b 100644 --- a/configs/display5_defconfig +++ b/configs/display5_defconfig @@ -46,6 +46,7 @@ CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_PART=y +# CONFIG_CMD_PINMUX is not set CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_DHCP=y @@ -79,6 +80,8 @@ CONFIG_PHYLIB=y CONFIG_PHY_MARVELL=y CONFIG_FEC_MXC=y CONFIG_MII=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX6=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_MXC_SPI=y From patchwork Tue Sep 3 14:38:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157055 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8rL3NM1z9sDB for ; Wed, 4 Sep 2019 00:45:22 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2A153C21E02; Tue, 3 Sep 2019 14:40:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8B791C21E0D; Tue, 3 Sep 2019 14:39:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DF4EFC21DD4; Tue, 3 Sep 2019 14:39:18 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 090C7C21DD4 for ; Tue, 3 Sep 2019 14:39:15 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jG0Nk9z1rVvl; Tue, 3 Sep 2019 16:39:13 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jF53k0z1qqkB; Tue, 3 Sep 2019 16:39:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id SPqmtaMgI7Lp; Tue, 3 Sep 2019 16:39:11 +0200 (CEST) X-Auth-Info: ZkUCAF79S+YoCt6ArI5EtIaVCrcGmKsDUxMWcjkwhDM= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:11 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:39 +0200 Message-Id: <20190903143850.9824-4-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Marek Vasut , Parthiban Nallathambi , Otavio Salvador , Martyn Welch , "NXP i.MX U-Boot Team" , Fabien Lahoudere Subject: [U-Boot] [PATCH v2 03/14] DM: I2C: Switch display5 board to use DM_I2C X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" After this commit the display5 device would use I2C driver supporting driver model (DM_I2C). The 'i2c' and 'eeprom' commands now use DM I2C drivers and initialize on-bus devices according to device tree description. Signed-off-by: Lukasz Majewski --- Changes in v2: None arch/arm/mach-imx/mx6/Kconfig | 2 ++ board/liebherr/display5/display5.c | 48 -------------------------------------- configs/display5_defconfig | 14 +++++++++++ include/configs/display5.h | 8 ------- 4 files changed, 16 insertions(+), 56 deletions(-) diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index fe5991e7c6db..39f0e548f5f1 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -187,6 +187,8 @@ config TARGET_DHCOMIMX6 config TARGET_DISPLAY5 bool "LWN DISPLAY5 board" select DM + select DM_I2C + select DM_GPIO select DM_SERIAL select SUPPORT_SPL imply CMD_DM diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index 037c4e69e59c..5ebc8529e9c7 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -119,49 +118,6 @@ int dram_init(void) return 0; } -#define PC MUX_PAD_CTRL(I2C_PAD_CTRL) -/* I2C1: TFA9879 */ -struct i2c_pads_info i2c_pad_info0 = { - .scl = { - .i2c_mode = MX6_PAD_EIM_D21__I2C1_SCL | PC, - .gpio_mode = MX6_PAD_EIM_D21__GPIO3_IO21 | PC, - .gp = IMX_GPIO_NR(3, 21) - }, - .sda = { - .i2c_mode = MX6_PAD_EIM_D28__I2C1_SDA | PC, - .gpio_mode = MX6_PAD_EIM_D28__GPIO3_IO28 | PC, - .gp = IMX_GPIO_NR(3, 28) - } -}; - -/* I2C2: TIVO TM4C123 */ -struct i2c_pads_info i2c_pad_info1 = { - .scl = { - .i2c_mode = MX6_PAD_EIM_EB2__I2C2_SCL | PC, - .gpio_mode = MX6_PAD_EIM_EB2__GPIO2_IO30 | PC, - .gp = IMX_GPIO_NR(2, 30) - }, - .sda = { - .i2c_mode = MX6_PAD_EIM_D16__I2C2_SDA | PC, - .gpio_mode = MX6_PAD_EIM_D16__GPIO3_IO16 | PC, - .gp = IMX_GPIO_NR(3, 16) - } -}; - -/* I2C3: PMIC PF0100, EEPROM AT24C256C */ -struct i2c_pads_info i2c_pad_info2 = { - .scl = { - .i2c_mode = MX6_PAD_EIM_D17__I2C3_SCL | PC, - .gpio_mode = MX6_PAD_EIM_D17__GPIO3_IO17 | PC, - .gp = IMX_GPIO_NR(3, 17) - }, - .sda = { - .i2c_mode = MX6_PAD_EIM_D18__I2C3_SDA | PC, - .gpio_mode = MX6_PAD_EIM_D18__GPIO3_IO18 | PC, - .gp = IMX_GPIO_NR(3, 18) - } -}; - iomux_v3_cfg_t const misc_pads[] = { /* Prod ID GPIO pins */ MX6_PAD_NANDF_D4__GPIO2_IO04 | MUX_PAD_CTRL(NO_PAD_CTRL), @@ -369,10 +325,6 @@ int board_init(void) udelay(25); - setup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0); - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); - setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2); - return 0; } diff --git a/configs/display5_defconfig b/configs/display5_defconfig index 69f3ceee098b..9ab055ac5587 100644 --- a/configs/display5_defconfig +++ b/configs/display5_defconfig @@ -67,6 +67,19 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6q-display5" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_BOOTLIMIT=3 +CONFIG_I2C_SET_DEFAULT_BUS_NUM=y +CONFIG_I2C_DEFAULT_BUS_NUMBER=0x2 +CONFIG_SYS_I2C_MXC=y +CONFIG_SYS_I2C_MXC_I2C1=y +CONFIG_SYS_I2C_MXC_I2C2=y +CONFIG_SYS_I2C_MXC_I2C3=y +CONFIG_MISC=y +CONFIG_I2C_EEPROM=y +CONFIG_SYS_I2C_EEPROM_ADDR=0x50 +CONFIG_SYS_I2C_EEPROM_BUS=2 +CONFIG_SYS_EEPROM_SIZE=32768 +CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5 +CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y CONFIG_MTD_DEVICE=y @@ -85,4 +98,5 @@ CONFIG_PINCTRL_IMX6=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_MXC_SPI=y +CONFIG_I2C_EDID=y CONFIG_IMX_WATCHDOG=y diff --git a/include/configs/display5.h b/include/configs/display5.h index 550b7c09f4f6..2a039c24288f 100644 --- a/include/configs/display5.h +++ b/include/configs/display5.h @@ -57,15 +57,7 @@ #define CONFIG_MXC_UART_BASE UART5_BASE /* I2C Configs */ -#define CONFIG_SYS_I2C -#define CONFIG_SYS_I2C_MXC -#define CONFIG_SYS_I2C_MXC_I2C1 -#define CONFIG_SYS_I2C_MXC_I2C2 -#define CONFIG_SYS_I2C_MXC_I2C3 #define CONFIG_I2C_MULTI_BUS -#define CONFIG_SYS_I2C_SPEED 100000 -#define CONFIG_I2C_EDID -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2 /* Ethernet */ #ifdef CONFIG_FEC_MXC From patchwork Tue Sep 3 14:38:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157058 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8sb25ddz9s7T for ; Wed, 4 Sep 2019 00:46:27 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C50D8C21DD9; Tue, 3 Sep 2019 14:40:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0FCCEC21E16; Tue, 3 Sep 2019 14:39:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6F397C21DC1; Tue, 3 Sep 2019 14:39:18 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 4241BC21E0D for ; Tue, 3 Sep 2019 14:39:15 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jH0hTrz1rLQR; Tue, 3 Sep 2019 16:39:15 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jH0HC8z1qqkB; Tue, 3 Sep 2019 16:39:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id YARTrSgF4TeP; Tue, 3 Sep 2019 16:39:14 +0200 (CEST) X-Auth-Info: t8/IGlPlmrrYnplGT0L4ENTILeU6JUTogaYx0DiIyCo= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:14 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:40 +0200 Message-Id: <20190903143850.9824-5-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v2 04/14] ARM: imx: defconfig: Enable 'regulator' and 'pmic' commands on display5 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Signed-off-by: Lukasz Majewski --- Changes in v2: None configs/display5_defconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configs/display5_defconfig b/configs/display5_defconfig index 9ab055ac5587..6c80a4d46678 100644 --- a/configs/display5_defconfig +++ b/configs/display5_defconfig @@ -54,6 +54,8 @@ CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_FAT=y @@ -95,6 +97,10 @@ CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +CONFIG_DM_PMIC=y +CONFIG_DM_PMIC_PFUZE100=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_PFUZE100=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_MXC_SPI=y From patchwork Tue Sep 3 14:38:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157047 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8mf1LwNz9s7T for ; Wed, 4 Sep 2019 00:42:09 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6FC2FC21DD9; Tue, 3 Sep 2019 14:39:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5C9BDC21DC1; Tue, 3 Sep 2019 14:39:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 82732C21E16; Tue, 3 Sep 2019 14:39:20 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 73D9AC21D9A for ; Tue, 3 Sep 2019 14:39:17 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jK1X8cz1rW6F; Tue, 3 Sep 2019 16:39:17 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jK09kFz1qqkB; Tue, 3 Sep 2019 16:39:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ZRoWWE3WE1a3; Tue, 3 Sep 2019 16:39:15 +0200 (CEST) X-Auth-Info: fB6/w/wkwAC9xtE/8BTKryhciaY2Xg+5DParlTxD5Pg= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:15 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:41 +0200 Message-Id: <20190903143850.9824-6-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Marek Vasut , Parthiban Nallathambi , Otavio Salvador , Martyn Welch , "NXP i.MX U-Boot Team" , Fabien Lahoudere Subject: [U-Boot] [PATCH v2 05/14] DM: mmc: Switch display5 board to use DM_MMC and BLK (USDHC) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" After this commit the display5 device would use eMMC driver supporting driver model (DM_MMC and BLK). Signed-off-by: Lukasz Majewski --- Changes in v2: None arch/arm/mach-imx/mx6/Kconfig | 1 + board/liebherr/display5/common.c | 6 ------ board/liebherr/display5/common.h | 1 - board/liebherr/display5/display5.c | 22 ---------------------- 4 files changed, 1 insertion(+), 29 deletions(-) diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 39f0e548f5f1..2496ecacb104 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -188,6 +188,7 @@ config TARGET_DISPLAY5 bool "LWN DISPLAY5 board" select DM select DM_I2C + select DM_MMC select DM_GPIO select DM_SERIAL select SUPPORT_SPL diff --git a/board/liebherr/display5/common.c b/board/liebherr/display5/common.c index 8390d9a0f31c..754c442427f8 100644 --- a/board/liebherr/display5/common.c +++ b/board/liebherr/display5/common.c @@ -109,12 +109,6 @@ void displ5_set_iomux_usdhc_spl(void) SETUP_IOMUX_PADS(usdhc4_pads); } -void displ5_set_iomux_usdhc(void) -{ - SETUP_IOMUX_PADS(usdhc4_pads); -} - #else void displ5_set_iomux_usdhc_spl(void) {} -void displ5_set_iomux_usdhc(void) {} #endif diff --git a/board/liebherr/display5/common.h b/board/liebherr/display5/common.h index 78c64b02e280..231cefc96009 100644 --- a/board/liebherr/display5/common.h +++ b/board/liebherr/display5/common.h @@ -36,7 +36,6 @@ void displ5_set_iomux_uart(void); void displ5_set_iomux_ecspi_spl(void); void displ5_set_iomux_ecspi(void); void displ5_set_iomux_usdhc_spl(void); -void displ5_set_iomux_usdhc(void); void displ5_set_iomux_misc_spl(void); #endif /* __DISPL5_COMMON_H_ */ diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index 5ebc8529e9c7..0cc77dac0fa1 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include @@ -142,26 +140,6 @@ iomux_v3_cfg_t const misc_pads[] = { MX6_PAD_EIM_D29__GPIO3_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL), }; -#ifdef CONFIG_FSL_ESDHC_IMX -struct fsl_esdhc_cfg usdhc_cfg[1] = { - { USDHC4_BASE_ADDR, 0, 8, }, -}; - -int board_mmc_getcd(struct mmc *mmc) -{ - return 1; -} - -int board_mmc_init(bd_t *bis) -{ - displ5_set_iomux_usdhc(); - - usdhc_cfg[0].sdhc_clk = mxc_get_clock(MXC_ESDHC4_CLK); - - return fsl_esdhc_initialize(bis, &usdhc_cfg[0]); -} -#endif /* CONFIG_FSL_ESDHC_IMX */ - static void displ5_setup_ecspi(void) { int ret; From patchwork Tue Sep 3 14:38:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157050 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8pB6lxkz9s7T for ; Wed, 4 Sep 2019 00:43:30 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A5C2CC21DA1; Tue, 3 Sep 2019 14:39:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id ED55AC21DA1; Tue, 3 Sep 2019 14:39:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 15A18C21C50; Tue, 3 Sep 2019 14:39:22 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 9A3D7C21DA1 for ; Tue, 3 Sep 2019 14:39:19 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jM1wP5z1rW6d; Tue, 3 Sep 2019 16:39:19 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jM1VmKz1qqkB; Tue, 3 Sep 2019 16:39:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id t1bwm6MPTP51; Tue, 3 Sep 2019 16:39:17 +0200 (CEST) X-Auth-Info: QUFA6QjK6RHO6ZUJiDxxzWZxOe34JSyjG3PNI6LXepk= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:17 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:42 +0200 Message-Id: <20190903143850.9824-7-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Marek Vasut , Parthiban Nallathambi , Otavio Salvador , Martyn Welch , Joe Hershberger , "NXP i.MX U-Boot Team" , Fabien Lahoudere Subject: [U-Boot] [PATCH v2 06/14] DM: eth: Switch display5 board to use DM_ETH X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" After this commit the display5 device would use FEC driver supporting driver model (DM_ETH). Signed-off-by: Lukasz Majewski --- Changes in v2: - Use dm_gpio* functions instead of gpio_* ones arch/arm/mach-imx/mx6/Kconfig | 1 + board/liebherr/display5/display5.c | 134 +++++++++---------------------------- include/configs/display5.h | 8 --- 3 files changed, 31 insertions(+), 112 deletions(-) diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index 2496ecacb104..aef18726702b 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -187,6 +187,7 @@ config TARGET_DHCOMIMX6 config TARGET_DISPLAY5 bool "LWN DISPLAY5 board" select DM + select DM_ETH select DM_I2C select DM_MMC select DM_GPIO diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index 0cc77dac0fa1..e008ea9a3fb8 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -155,130 +155,42 @@ static void displ5_setup_ecspi(void) gpio_direction_output(IMX_GPIO_NR(7, 0), 1); } -#ifdef CONFIG_FEC_MXC -iomux_v3_cfg_t const enet_pads[] = { - MX6_PAD_ENET_TXD1__ENET_1588_EVENT0_IN | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET_RXD1__ENET_1588_EVENT3_OUT | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET_MDIO__ENET_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET_MDC__ENET_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_ENET_REF_CLK__ENET_TX_CLK | MUX_PAD_CTRL(ENET_PAD_CTRL), - - /* for old evalboard with R159 present and R160 not populated */ - MX6_PAD_GPIO_16__ENET_REF_CLK | MUX_PAD_CTRL(NO_PAD_CTRL), - - MX6_PAD_RGMII_TXC__RGMII_TXC | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_TD0__RGMII_TD0 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_TD1__RGMII_TD1 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_TD2__RGMII_TD2 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_TD3__RGMII_TD3 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL), - - MX6_PAD_RGMII_RXC__RGMII_RXC | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_RD0__RGMII_RD0 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_RD1__RGMII_RD1 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_RD2__RGMII_RD2 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_RD3__RGMII_RD3 | MUX_PAD_CTRL(ENET_PAD_CTRL), - MX6_PAD_RGMII_RX_CTL__RGMII_RX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL), - /*INT#_GBE*/ - MX6_PAD_ENET_TX_EN__GPIO1_IO28 | MUX_PAD_CTRL(NO_PAD_CTRL), -}; - -static void setup_iomux_enet(void) +/* + * Do not overwrite the console + * Always use serial for U-Boot console + */ +int overwrite_console(void) { - SETUP_IOMUX_PADS(enet_pads); - gpio_direction_input(IMX_GPIO_NR(1, 28)); /*INT#_GBE*/ + return 1; } -static int setup_mac_from_fuse(void) +#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) +int ft_board_setup(void *blob, bd_t *bd) { - unsigned char enetaddr[6]; - int ret; - - ret = eth_env_get_enetaddr("ethaddr", enetaddr); - if (ret) /* ethaddr is already set */ - return 0; - - imx_get_mac_from_fuse(0, enetaddr); - - if (is_valid_ethaddr(enetaddr)) { - eth_env_set_enetaddr("ethaddr", enetaddr); - return 0; - } - + fdt_fixup_ethernet(blob); return 0; } +#endif -int board_eth_init(bd_t *bd) +int board_phy_config(struct phy_device *phydev) { - struct phy_device *phydev; - struct mii_dev *bus; - int ret; - - setup_iomux_enet(); - - iomuxc_set_rgmii_io_voltage(DDR_SEL_1P5V_IO); - - ret = enable_fec_anatop_clock(0, ENET_125MHZ); - if (ret) - return ret; - - setup_mac_from_fuse(); - - bus = fec_get_miibus(IMX_FEC_BASE, -1); - if (!bus) - return -ENODEV; - - /* - * We use here the "rgmii-id" mode of operation and allow M88E1512 - * PHY to use its internally callibrated RX/TX delays - */ - phydev = phy_find_by_mask(bus, 0xffffffff /* (0xf << 4) */, - PHY_INTERFACE_MODE_RGMII_ID); - if (!phydev) { - ret = -ENODEV; - goto err_phy; - } - /* display5 due to PCB routing can only work with 100 Mbps */ phydev->advertising &= ~(ADVERTISED_1000baseX_Half | ADVERTISED_1000baseX_Full | SUPPORTED_1000baseT_Half | SUPPORTED_1000baseT_Full); - ret = fec_probe(bd, -1, IMX_FEC_BASE, bus, phydev); - if (ret) - goto err_sw; - - return 0; - -err_sw: - free(phydev); -err_phy: - mdio_unregister(bus); - free(bus); - return ret; -} -#endif /* CONFIG_FEC_MXC */ - -/* - * Do not overwrite the console - * Always use serial for U-Boot console - */ -int overwrite_console(void) -{ - return 1; -} + if (phydev->drv->config) + return phydev->drv->config(phydev); -#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) -int ft_board_setup(void *blob, bd_t *bd) -{ - fdt_fixup_ethernet(blob); return 0; } -#endif int board_init(void) { + struct gpio_desc phy_int_gbe; + int ret; + debug("board init\n"); /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; @@ -288,6 +200,7 @@ int board_init(void) displ5_setup_ecspi(); + /* Setup misc (application specific) stuff */ SETUP_IOMUX_PADS(misc_pads); get_board_id(gpio_table_sw_ids, &gpio_table_sw_ids_names[0], @@ -303,6 +216,19 @@ int board_init(void) udelay(25); + /* Setup low level FEC (ETH) */ + ret = dm_gpio_lookup_name("GPIO1_28", &phy_int_gbe); + if (ret) { + printf("Cannot get GPIO1_28\n"); + } else { + ret = dm_gpio_request(&phy_int_gbe, "INT_GBE"); + if (!ret) + dm_gpio_set_dir_flags(&phy_int_gbe, GPIOD_IS_IN); + } + + iomuxc_set_rgmii_io_voltage(DDR_SEL_1P5V_IO); + enable_fec_anatop_clock(0, ENET_125MHZ); + return 0; } diff --git a/include/configs/display5.h b/include/configs/display5.h index 2a039c24288f..15027f153341 100644 --- a/include/configs/display5.h +++ b/include/configs/display5.h @@ -59,14 +59,6 @@ /* I2C Configs */ #define CONFIG_I2C_MULTI_BUS -/* Ethernet */ -#ifdef CONFIG_FEC_MXC -#define IMX_FEC_BASE ENET_BASE_ADDR -#define CONFIG_FEC_XCV_TYPE RGMII -#define CONFIG_ETHPRIME "FEC" -#define CONFIG_FEC_MXC_PHYADDR 0 -#endif - /* MMC Configs */ #define CONFIG_SYS_FSL_ESDHC_ADDR 0 #define CONFIG_SYS_FSL_USDHC_NUM 2 From patchwork Tue Sep 3 14:38:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157051 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8pP1Vv5z9sDB for ; Wed, 4 Sep 2019 00:43:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D21F2C21E1B; Tue, 3 Sep 2019 14:41:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 27BCEC21E26; Tue, 3 Sep 2019 14:41:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 40436C21DFA; Tue, 3 Sep 2019 14:39:24 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id AD54BC21E0F for ; Tue, 3 Sep 2019 14:39:21 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jP3d2Mz1rLlZ; Tue, 3 Sep 2019 16:39:21 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jP2LPrz1qqkP; Tue, 3 Sep 2019 16:39:21 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id QIumt9X8Cwwq; Tue, 3 Sep 2019 16:39:19 +0200 (CEST) X-Auth-Info: sHjmr9R74cAExGJPZHdbHKolyCynETLjEP1YPxUA6b4= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:19 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:43 +0200 Message-Id: <20190903143850.9824-8-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Marek Vasut , Fabio Berton , Parthiban Nallathambi , Otavio Salvador , Martyn Welch , "NXP i.MX U-Boot Team" Subject: [U-Boot] [PATCH v2 07/14] DM: SPI: Convert display5 to use SPI with DM/DTS (but no in SPL) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The DM/DTS support for SPI is disabled on purpose for SPL, as it is not supported as of time of this conversion. Signed-off-by: Lukasz Majewski --- Changes in v2: - Use dm_gpio_* instead of legacy gpio_* functions arch/arm/mach-imx/mx6/Kconfig | 1 + board/liebherr/display5/common.c | 18 ------------------ board/liebherr/display5/common.h | 1 - board/liebherr/display5/display5.c | 37 ++++++++++++------------------------- configs/display5_defconfig | 3 +++ include/configs/display5.h | 7 +++++-- 6 files changed, 21 insertions(+), 46 deletions(-) diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig index aef18726702b..f0786b5ffb40 100644 --- a/arch/arm/mach-imx/mx6/Kconfig +++ b/arch/arm/mach-imx/mx6/Kconfig @@ -190,6 +190,7 @@ config TARGET_DISPLAY5 select DM_ETH select DM_I2C select DM_MMC + select DM_SPI select DM_GPIO select DM_SERIAL select SUPPORT_SPL diff --git a/board/liebherr/display5/common.c b/board/liebherr/display5/common.c index 754c442427f8..d2d174beaa0d 100644 --- a/board/liebherr/display5/common.c +++ b/board/liebherr/display5/common.c @@ -45,18 +45,6 @@ void displ5_set_iomux_misc_spl(void) } #ifdef CONFIG_MXC_SPI -iomux_v3_cfg_t const ecspi_pads[] = { - /* SPI3 */ - MX6_PAD_DISP0_DAT2__ECSPI3_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL), - MX6_PAD_DISP0_DAT1__ECSPI3_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL), - MX6_PAD_DISP0_DAT0__ECSPI3_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL), - MX6_PAD_DISP0_DAT3__ECSPI3_SS0 | MUX_PAD_CTRL(NO_PAD_CTRL), - MX6_PAD_DISP0_DAT4__ECSPI3_SS1 | MUX_PAD_CTRL(NO_PAD_CTRL), - MX6_PAD_DISP0_DAT5__ECSPI3_SS2 | MUX_PAD_CTRL(NO_PAD_CTRL), - MX6_PAD_DISP0_DAT6__ECSPI3_SS3 | MUX_PAD_CTRL(NO_PAD_CTRL), - MX6_PAD_DISP0_DAT7__ECSPI3_RDY | MUX_PAD_CTRL(NO_PAD_CTRL), -}; - iomux_v3_cfg_t const ecspi2_pads[] = { /* SPI2, NOR Flash nWP, CS0 */ MX6_PAD_CSI0_DAT10__ECSPI2_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL), @@ -79,14 +67,8 @@ void displ5_set_iomux_ecspi_spl(void) SETUP_IOMUX_PADS(ecspi2_pads); } -void displ5_set_iomux_ecspi(void) -{ - SETUP_IOMUX_PADS(ecspi_pads); -} - #else void displ5_set_iomux_ecspi_spl(void) {} -void displ5_set_iomux_ecspi(void) {} #endif #ifdef CONFIG_FSL_ESDHC_IMX diff --git a/board/liebherr/display5/common.h b/board/liebherr/display5/common.h index 231cefc96009..2bbd934e7a70 100644 --- a/board/liebherr/display5/common.h +++ b/board/liebherr/display5/common.h @@ -34,7 +34,6 @@ void displ5_set_iomux_uart_spl(void); void displ5_set_iomux_uart(void); void displ5_set_iomux_ecspi_spl(void); -void displ5_set_iomux_ecspi(void); void displ5_set_iomux_usdhc_spl(void); void displ5_set_iomux_misc_spl(void); diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index e008ea9a3fb8..541e3e94a5eb 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -28,11 +27,6 @@ #include #include -#ifndef CONFIG_MXC_SPI -#error "CONFIG_SPI must be set for this board" -#error "Please check your config file" -#endif - #include "common.h" DECLARE_GLOBAL_DATA_PTR; @@ -140,21 +134,6 @@ iomux_v3_cfg_t const misc_pads[] = { MX6_PAD_EIM_D29__GPIO3_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL), }; -static void displ5_setup_ecspi(void) -{ - int ret; - - displ5_set_iomux_ecspi(); - - ret = gpio_request(IMX_GPIO_NR(5, 29), "spi2_cs0"); - if (!ret) - gpio_direction_output(IMX_GPIO_NR(5, 29), 1); - - ret = gpio_request(IMX_GPIO_NR(7, 0), "spi2_#wp"); - if (!ret) - gpio_direction_output(IMX_GPIO_NR(7, 0), 1); -} - /* * Do not overwrite the console * Always use serial for U-Boot console @@ -188,7 +167,7 @@ int board_phy_config(struct phy_device *phydev) int board_init(void) { - struct gpio_desc phy_int_gbe; + struct gpio_desc phy_int_gbe, spi2_wp; int ret; debug("board init\n"); @@ -197,9 +176,6 @@ int board_init(void) /* Setup iomux for non console UARTS */ displ5_set_iomux_uart(); - - displ5_setup_ecspi(); - /* Setup misc (application specific) stuff */ SETUP_IOMUX_PADS(misc_pads); @@ -229,6 +205,17 @@ int board_init(void) iomuxc_set_rgmii_io_voltage(DDR_SEL_1P5V_IO); enable_fec_anatop_clock(0, ENET_125MHZ); + /* Setup #WP for SPI-NOR memory */ + ret = dm_gpio_lookup_name("GPIO7_0", &spi2_wp); + if (ret) { + printf("Cannot get GPIO7_0\n"); + } else { + ret = dm_gpio_request(&spi2_wp, "spi2_#wp"); + if (!ret) + dm_gpio_set_dir_flags(&spi2_wp, GPIOD_IS_OUT | + GPIOD_IS_OUT_ACTIVE); + } + return 0; } diff --git a/configs/display5_defconfig b/configs/display5_defconfig index 6c80a4d46678..3719eb40d5ea 100644 --- a/configs/display5_defconfig +++ b/configs/display5_defconfig @@ -85,12 +85,15 @@ CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y CONFIG_MTD_DEVICE=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SF_DEFAULT_BUS=1 CONFIG_SF_DEFAULT_MODE=0 CONFIG_SF_DEFAULT_SPEED=50000000 +CONFIG_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_MTD=y CONFIG_PHYLIB=y CONFIG_PHY_MARVELL=y CONFIG_FEC_MXC=y diff --git a/include/configs/display5.h b/include/configs/display5.h index 15027f153341..a3cb62367c4c 100644 --- a/include/configs/display5.h +++ b/include/configs/display5.h @@ -35,8 +35,11 @@ * 0x1540000 - 0x1640000 : SPI.factory (1MiB) */ -#ifndef CONFIG_SPL_BUILD -#define CONFIG_SPI_FLASH_MTD +/* SPI Flash Configs */ +#if defined(CONFIG_SPL_BUILD) +#undef CONFIG_DM_SPI +#undef CONFIG_DM_SPI_FLASH +#undef CONFIG_SPI_FLASH_MTD #endif /* Below values are "dummy" - only to avoid build break */ From patchwork Tue Sep 3 14:38:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157052 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8q70kBLz9s7T for ; Wed, 4 Sep 2019 00:44:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 85782C21D74; Tue, 3 Sep 2019 14:42:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 8EE9AC21E13; Tue, 3 Sep 2019 14:42:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 45372C21E31; Tue, 3 Sep 2019 14:39:25 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id E6A76C21E13 for ; Tue, 3 Sep 2019 14:39:22 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jQ5ScKz1rLlr; Tue, 3 Sep 2019 16:39:22 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jQ51yXz1qqkB; Tue, 3 Sep 2019 16:39:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Y2OGy-Snt7wR; Tue, 3 Sep 2019 16:39:21 +0200 (CEST) X-Auth-Info: E7hPTuw3QNlLyA4PGZtK2EyEQvSnOgvUmY0wvvzSyWc= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:21 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:44 +0200 Message-Id: <20190903143850.9824-9-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v2 08/14] ARM: display5: Remove UART initialization code after DM/DTS conversion (non-console) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This UART is not used in U-Boot, so there is no need to initialize it. Signed-off-by: Lukasz Majewski --- Changes in v2: None board/liebherr/display5/common.c | 13 ------------- board/liebherr/display5/common.h | 1 - board/liebherr/display5/display5.c | 2 -- 3 files changed, 16 deletions(-) diff --git a/board/liebherr/display5/common.c b/board/liebherr/display5/common.c index d2d174beaa0d..5e714076a49c 100644 --- a/board/liebherr/display5/common.c +++ b/board/liebherr/display5/common.c @@ -8,14 +8,6 @@ #include #include "common.h" -iomux_v3_cfg_t const uart_pads[] = { - /* UART4 */ - MX6_PAD_CSI0_DAT12__UART4_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), - MX6_PAD_CSI0_DAT13__UART4_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), - MX6_PAD_CSI0_DAT16__UART4_RTS_B | MUX_PAD_CTRL(UART_PAD_CTRL), - MX6_PAD_CSI0_DAT17__UART4_CTS_B | MUX_PAD_CTRL(UART_PAD_CTRL), -}; - iomux_v3_cfg_t const uart_console_pads[] = { /* UART5 */ MX6_PAD_CSI0_DAT14__UART5_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), @@ -29,11 +21,6 @@ void displ5_set_iomux_uart_spl(void) SETUP_IOMUX_PADS(uart_console_pads); } -void displ5_set_iomux_uart(void) -{ - SETUP_IOMUX_PADS(uart_pads); -} - iomux_v3_cfg_t const misc_pads_spl[] = { /* Emergency recovery pin */ MX6_PAD_EIM_D29__GPIO3_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL), diff --git a/board/liebherr/display5/common.h b/board/liebherr/display5/common.h index 2bbd934e7a70..4eb70dc42fb6 100644 --- a/board/liebherr/display5/common.h +++ b/board/liebherr/display5/common.h @@ -32,7 +32,6 @@ PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) void displ5_set_iomux_uart_spl(void); -void displ5_set_iomux_uart(void); void displ5_set_iomux_ecspi_spl(void); void displ5_set_iomux_usdhc_spl(void); void displ5_set_iomux_misc_spl(void); diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index 541e3e94a5eb..5713401ed954 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -174,8 +174,6 @@ int board_init(void) /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; - /* Setup iomux for non console UARTS */ - displ5_set_iomux_uart(); /* Setup misc (application specific) stuff */ SETUP_IOMUX_PADS(misc_pads); From patchwork Tue Sep 3 14:38:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157053 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8qM1sjMz9s7T for ; Wed, 4 Sep 2019 00:44:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C3C9DC21E1E; Tue, 3 Sep 2019 14:40:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7F5CEC21D8E; Tue, 3 Sep 2019 14:40:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 71139C21DB3; Tue, 3 Sep 2019 14:39:26 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 77532C21E0B for ; Tue, 3 Sep 2019 14:39:24 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jS28wwz1rLlH; Tue, 3 Sep 2019 16:39:24 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jS1YHKz1qqkB; Tue, 3 Sep 2019 16:39:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 38bJaB7KFXCF; Tue, 3 Sep 2019 16:39:22 +0200 (CEST) X-Auth-Info: BxgvPSuCtOROxQSPLxb93JwNvds5/C1kLCUArdwCBAs= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:22 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:45 +0200 Message-Id: <20190903143850.9824-10-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: "NXP i.MX U-Boot Team" Subject: [U-Boot] [PATCH v2 09/14] DM: WDT: Convert WDT driver to use DM/DTS (including SYSRESET) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This commit enables support for CONFIG_WDT in the U-Boot proper. Moreover, the SYSRESET_WATCHDOG driver is used to support 'reset' command. As SPL is not yet ready for DM conversion, the CONFIG_HW_WATCHDOG is enabled for it. This allows the legacy SPL code to work properly. Signed-off-by: Lukasz Majewski --- Changes in v2: None arch/arm/dts/imx6q-display5-u-boot.dtsi | 5 +++++ configs/display5_defconfig | 3 +++ include/configs/display5.h | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/imx6q-display5-u-boot.dtsi b/arch/arm/dts/imx6q-display5-u-boot.dtsi index b942218b7ab8..aa660b5aeb65 100644 --- a/arch/arm/dts/imx6q-display5-u-boot.dtsi +++ b/arch/arm/dts/imx6q-display5-u-boot.dtsi @@ -31,6 +31,11 @@ chosen { stdout-path = &uart5; }; + + wdt-reboot { + compatible = "wdt-reboot"; + wdt = <&wdog1>; + }; }; &i2c3 { diff --git a/configs/display5_defconfig b/configs/display5_defconfig index 3719eb40d5ea..a3062854d89c 100644 --- a/configs/display5_defconfig +++ b/configs/display5_defconfig @@ -49,6 +49,7 @@ CONFIG_CMD_PART=y # CONFIG_CMD_PINMUX is not set CONFIG_CMD_SF=y CONFIG_CMD_SPI=y +CONFIG_CMD_WDT=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y @@ -107,5 +108,7 @@ CONFIG_DM_REGULATOR_PFUZE100=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_MXC_SPI=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_I2C_EDID=y CONFIG_IMX_WATCHDOG=y diff --git a/include/configs/display5.h b/include/configs/display5.h index a3cb62367c4c..e66bb65c21c6 100644 --- a/include/configs/display5.h +++ b/include/configs/display5.h @@ -348,7 +348,11 @@ /* Watchdog */ #define CONFIG_WATCHDOG_TIMEOUT_MSECS 15000 - +#if defined(CONFIG_SPL_BUILD) +#undef CONFIG_WDT +#undef CONFIG_WATCHDOG +#define CONFIG_HW_WATCHDOG +#endif /* ENV config */ #ifdef CONFIG_ENV_IS_IN_SPI_FLASH #define CONFIG_ENV_SIZE (SZ_64K) From patchwork Tue Sep 3 14:38:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157057 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8rQ0Qxmz9sDB for ; Wed, 4 Sep 2019 00:45:26 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B134EC21DC1; Tue, 3 Sep 2019 14:41:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9921EC21D74; Tue, 3 Sep 2019 14:41:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C1050C21DA1; Tue, 3 Sep 2019 14:39:28 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 00122C21E02 for ; Tue, 3 Sep 2019 14:39:25 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jT5jxZz1rWT6; Tue, 3 Sep 2019 16:39:25 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jT5FTXz1qqkP; Tue, 3 Sep 2019 16:39:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id YX6ynzXx312v; Tue, 3 Sep 2019 16:39:24 +0200 (CEST) X-Auth-Info: zFjDWpQ9soRNhSXXHSiuFU5+s7DjuRmrpggB7BMe9X0= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:24 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:46 +0200 Message-Id: <20190903143850.9824-11-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v2 10/14] ARM: display5: Remove common.c file (after DM/DTS U-Boot proper conversion) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The common.c file content can be safely moved to spl.c file after performing the DM/DTS conversion for the U-Boot proper. It contains the non DM/DTS setup code, which now is only used by SPL. Signed-off-by: Lukasz Majewski --- Changes in v2: None board/liebherr/display5/Makefile | 4 +- board/liebherr/display5/common.c | 83 ---------------------------------------- board/liebherr/display5/common.h | 5 --- board/liebherr/display5/spl.c | 74 +++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 90 deletions(-) delete mode 100644 board/liebherr/display5/common.c diff --git a/board/liebherr/display5/Makefile b/board/liebherr/display5/Makefile index f934672428ab..ee503add75d3 100644 --- a/board/liebherr/display5/Makefile +++ b/board/liebherr/display5/Makefile @@ -5,7 +5,7 @@ # SPDX-License-Identifier: GPL-2.0+ # ifdef CONFIG_SPL_BUILD -obj-y = common.o spl.o +obj-y = spl.o else -obj-y := common.o display5.o +obj-y := display5.o endif diff --git a/board/liebherr/display5/common.c b/board/liebherr/display5/common.c deleted file mode 100644 index 5e714076a49c..000000000000 --- a/board/liebherr/display5/common.c +++ /dev/null @@ -1,83 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2017 DENX Software Engineering - * Lukasz Majewski, DENX Software Engineering, lukma@denx.de - */ - -#include -#include -#include "common.h" - -iomux_v3_cfg_t const uart_console_pads[] = { - /* UART5 */ - MX6_PAD_CSI0_DAT14__UART5_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), - MX6_PAD_CSI0_DAT15__UART5_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), - MX6_PAD_CSI0_DAT18__UART5_RTS_B | MUX_PAD_CTRL(UART_PAD_CTRL), - MX6_PAD_CSI0_DAT19__UART5_CTS_B | MUX_PAD_CTRL(UART_PAD_CTRL), -}; - -void displ5_set_iomux_uart_spl(void) -{ - SETUP_IOMUX_PADS(uart_console_pads); -} - -iomux_v3_cfg_t const misc_pads_spl[] = { - /* Emergency recovery pin */ - MX6_PAD_EIM_D29__GPIO3_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL), -}; - -void displ5_set_iomux_misc_spl(void) -{ - SETUP_IOMUX_PADS(misc_pads_spl); -} - -#ifdef CONFIG_MXC_SPI -iomux_v3_cfg_t const ecspi2_pads[] = { - /* SPI2, NOR Flash nWP, CS0 */ - MX6_PAD_CSI0_DAT10__ECSPI2_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL), - MX6_PAD_CSI0_DAT9__ECSPI2_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL), - MX6_PAD_CSI0_DAT8__ECSPI2_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL), - MX6_PAD_CSI0_DAT11__GPIO5_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL), - MX6_PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL), -}; - -int board_spi_cs_gpio(unsigned int bus, unsigned int cs) -{ - if (bus != 1 || cs != 0) - return -EINVAL; - - return IMX_GPIO_NR(5, 29); -} - -void displ5_set_iomux_ecspi_spl(void) -{ - SETUP_IOMUX_PADS(ecspi2_pads); -} - -#else -void displ5_set_iomux_ecspi_spl(void) {} -#endif - -#ifdef CONFIG_FSL_ESDHC_IMX -iomux_v3_cfg_t const usdhc4_pads[] = { - MX6_PAD_SD4_CLK__SD4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_CMD__SD4_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_DAT0__SD4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_DAT1__SD4_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_DAT2__SD4_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_DAT3__SD4_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_DAT4__SD4_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_DAT5__SD4_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_DAT6__SD4_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_SD4_DAT7__SD4_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL), - MX6_PAD_NANDF_ALE__SD4_RESET | MUX_PAD_CTRL(USDHC_PAD_CTRL), -}; - -void displ5_set_iomux_usdhc_spl(void) -{ - SETUP_IOMUX_PADS(usdhc4_pads); -} - -#else -void displ5_set_iomux_usdhc_spl(void) {} -#endif diff --git a/board/liebherr/display5/common.h b/board/liebherr/display5/common.h index 4eb70dc42fb6..44c7470074ce 100644 --- a/board/liebherr/display5/common.h +++ b/board/liebherr/display5/common.h @@ -31,9 +31,4 @@ #define ENET_PAD_CTRL_CLK ((PAD_CTL_PUS_100K_UP & ~PAD_CTL_PKE) | \ PAD_CTL_SPEED_HIGH | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) -void displ5_set_iomux_uart_spl(void); -void displ5_set_iomux_ecspi_spl(void); -void displ5_set_iomux_usdhc_spl(void); -void displ5_set_iomux_misc_spl(void); - #endif /* __DISPL5_COMMON_H_ */ diff --git a/board/liebherr/display5/spl.c b/board/liebherr/display5/spl.c index 354b63e431f6..311edaf939cc 100644 --- a/board/liebherr/display5/spl.c +++ b/board/liebherr/display5/spl.c @@ -104,6 +104,80 @@ static const struct mx6_ddr3_cfg mt41k128m16jt_125 = { .trasmin = 3500, }; +iomux_v3_cfg_t const uart_console_pads[] = { + /* UART5 */ + MX6_PAD_CSI0_DAT14__UART5_TX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_CSI0_DAT15__UART5_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_CSI0_DAT18__UART5_RTS_B | MUX_PAD_CTRL(UART_PAD_CTRL), + MX6_PAD_CSI0_DAT19__UART5_CTS_B | MUX_PAD_CTRL(UART_PAD_CTRL), +}; + +void displ5_set_iomux_uart_spl(void) +{ + SETUP_IOMUX_PADS(uart_console_pads); +} + +iomux_v3_cfg_t const misc_pads_spl[] = { + /* Emergency recovery pin */ + MX6_PAD_EIM_D29__GPIO3_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL), +}; + +void displ5_set_iomux_misc_spl(void) +{ + SETUP_IOMUX_PADS(misc_pads_spl); +} + +#ifdef CONFIG_MXC_SPI +iomux_v3_cfg_t const ecspi2_pads[] = { + /* SPI2, NOR Flash nWP, CS0 */ + MX6_PAD_CSI0_DAT10__ECSPI2_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL), + MX6_PAD_CSI0_DAT9__ECSPI2_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL), + MX6_PAD_CSI0_DAT8__ECSPI2_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL), + MX6_PAD_CSI0_DAT11__GPIO5_IO29 | MUX_PAD_CTRL(NO_PAD_CTRL), + MX6_PAD_SD3_DAT5__GPIO7_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL), +}; + +int board_spi_cs_gpio(unsigned int bus, unsigned int cs) +{ + if (bus != 1 || cs != 0) + return -EINVAL; + + return IMX_GPIO_NR(5, 29); +} + +void displ5_set_iomux_ecspi_spl(void) +{ + SETUP_IOMUX_PADS(ecspi2_pads); +} + +#else +void displ5_set_iomux_ecspi_spl(void) {} +#endif + +#ifdef CONFIG_FSL_ESDHC_IMX +iomux_v3_cfg_t const usdhc4_pads[] = { + MX6_PAD_SD4_CLK__SD4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_CMD__SD4_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_DAT0__SD4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_DAT1__SD4_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_DAT2__SD4_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_DAT3__SD4_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_DAT4__SD4_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_DAT5__SD4_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_DAT6__SD4_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_SD4_DAT7__SD4_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL), + MX6_PAD_NANDF_ALE__SD4_RESET | MUX_PAD_CTRL(USDHC_PAD_CTRL), +}; + +void displ5_set_iomux_usdhc_spl(void) +{ + SETUP_IOMUX_PADS(usdhc4_pads); +} + +#else +void displ5_set_iomux_usdhc_spl(void) {} +#endif + static void ccgr_init(void) { struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR; From patchwork Tue Sep 3 14:38:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157054 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8qm3KFnz9s7T for ; Wed, 4 Sep 2019 00:44:52 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2B7D7C21DDC; Tue, 3 Sep 2019 14:40:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 08814C21DA6; Tue, 3 Sep 2019 14:40:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DB0CBC21C50; Tue, 3 Sep 2019 14:39:29 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 4C3ABC21D8A for ; Tue, 3 Sep 2019 14:39:27 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jW10vCz1rLlH; Tue, 3 Sep 2019 16:39:27 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jW0fMbz1qqkP; Tue, 3 Sep 2019 16:39:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id lMVtmTlatRII; Tue, 3 Sep 2019 16:39:26 +0200 (CEST) X-Auth-Info: xXBO6MW9vorgqu+d+4KWYahqLKkAZwH0CfG5AINUtFI= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:25 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:47 +0200 Message-Id: <20190903143850.9824-12-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v2 11/14] ARM: Update display5_factory_defconfig after switch to DM/DTS and uuu utility X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This commit updates the display5_factory_defconfig file after the switch to DM/DTS for this board. Moreover, the VID and PID for SPL running SDP gadget have been updated to allow seamless work with 'uuu' utility from NXP (the imx_usb doesn't work properly after embedding the u-boot proper into fitImage - problem with IVT embedding in FIT). Example to use 'uuu' session: cat << EOF > display5_recovery.lst uuu_version 1.2.135 SDP: boot -f /srv/tftp/SPL SDPU: write -f /srv/tftp/u-boot-dtb.img -addr 0x10000000 SDPU: jump -addr 0x10000000 SDPU: done EOF sudo ./uuu/uuu display5_recovery.lst Signed-off-by: Lukasz Majewski --- Changes in v2: None configs/display5_factory_defconfig | 41 ++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig index c467e8c92890..b4b030a32b76 100644 --- a/configs/display5_factory_defconfig +++ b/configs/display5_factory_defconfig @@ -4,13 +4,19 @@ CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_SPL_GPIO_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SYS_MALLOC_F_LEN=0x1000 +CONFIG_MX6_DDRCAL=y CONFIG_TARGET_DISPLAY5=y +CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y +CONFIG_SPL_SYS_MALLOC_F_LEN=0x400 CONFIG_NR_DRAM_BANKS=1 CONFIG_SPL=y CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y +CONFIG_SPL_TEXT_BASE=0x00908000 CONFIG_FIT=y +CONFIG_SPL_LOAD_FIT=y CONFIG_OF_BOARD_SETUP=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,MX6Q" CONFIG_BOOTDELAY=3 @@ -19,8 +25,6 @@ CONFIG_BOOTCOMMAND="echo SDP Display5 recovery" CONFIG_SUPPORT_RAW_INITRD=y CONFIG_MISC_INIT_R=y CONFIG_BOUNCE_BUFFER=y -CONFIG_SPL_TEXT_BASE=0x00908000 -# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set CONFIG_SPL_DMA_SUPPORT=y CONFIG_SPL_I2C_SUPPORT=y @@ -47,11 +51,14 @@ CONFIG_CMD_PART=y CONFIG_CMD_SF=y CONFIG_CMD_SPI=y CONFIG_CMD_USB_SDP=y +CONFIG_CMD_WDT=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_TIME=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y @@ -67,26 +74,52 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6q-display5" CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DFU_MMC=y CONFIG_DFU_SF=y +CONFIG_I2C_SET_DEFAULT_BUS_NUM=y +CONFIG_I2C_DEFAULT_BUS_NUMBER=0x2 +CONFIG_SYS_I2C_MXC=y +CONFIG_SYS_I2C_MXC_I2C1=y +CONFIG_SYS_I2C_MXC_I2C2=y +CONFIG_SYS_I2C_MXC_I2C3=y +CONFIG_MISC=y +CONFIG_I2C_EEPROM=y +CONFIG_SYS_I2C_EEPROM_ADDR=0x50 +CONFIG_SYS_I2C_EEPROM_BUS=2 +CONFIG_SYS_EEPROM_SIZE=32768 +CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5 +CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 CONFIG_SUPPORT_EMMC_BOOT=y CONFIG_FSL_USDHC=y CONFIG_MTD_DEVICE=y +CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH=y CONFIG_SF_DEFAULT_BUS=1 CONFIG_SF_DEFAULT_MODE=0 CONFIG_SF_DEFAULT_SPEED=50000000 +CONFIG_SPI_FLASH_SFDP_SUPPORT=y CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_MTD=y CONFIG_PHYLIB=y +CONFIG_PHY_MARVELL=y CONFIG_FEC_MXC=y CONFIG_MII=y +CONFIG_DM_PMIC=y +CONFIG_DM_PMIC_PFUZE100=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_PFUZE100=y CONFIG_MXC_UART=y CONFIG_SPI=y CONFIG_MXC_SPI=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_WATCHDOG=y CONFIG_USB=y +CONFIG_DM_USB=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_MANUFACTURER="Liebherr" -CONFIG_USB_GADGET_VENDOR_NUM=0x1b67 -CONFIG_USB_GADGET_PRODUCT_NUM=0x4000 +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_I2C_EDID=y CONFIG_IMX_WATCHDOG=y +CONFIG_PANIC_HANG=y From patchwork Tue Sep 3 14:38:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157056 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8rM4CWqz9sN1 for ; Wed, 4 Sep 2019 00:45:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4A7ABC21E5B; Tue, 3 Sep 2019 14:40:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 67DDCC21DE8; Tue, 3 Sep 2019 14:40:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1693DC21D8E; Tue, 3 Sep 2019 14:39:30 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 68A9AC21DD4 for ; Tue, 3 Sep 2019 14:39:28 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jX1ppnz1rWT6; Tue, 3 Sep 2019 16:39:28 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jX1bfRz1qqkP; Tue, 3 Sep 2019 16:39:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id rEaxhx16qGUb; Tue, 3 Sep 2019 16:39:27 +0200 (CEST) X-Auth-Info: ThUD2B3V83x56+SlRVGz1el3ELjorGeHUdo4qekAQNQ= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:27 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:48 +0200 Message-Id: <20190903143850.9824-13-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Subject: [U-Boot] [PATCH v2 12/14] cosmetic: Cleanup display5_defconfig with make savedefconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Fix the structure of configs/display5_defconfig file by using th make savedefconfig. Signed-off-by: Lukasz Majewski --- Changes in v2: None configs/display5_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/display5_defconfig b/configs/display5_defconfig index a3062854d89c..46bcdaffc835 100644 --- a/configs/display5_defconfig +++ b/configs/display5_defconfig @@ -16,6 +16,7 @@ CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y CONFIG_SYS_BOOTCOUNT_ADDR=0x020CC068 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y +CONFIG_SPL_TEXT_BASE=0x00908000 CONFIG_FIT=y CONFIG_SPL_LOAD_FIT=y CONFIG_OF_BOARD_SETUP=y @@ -23,7 +24,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,MX6Q" CONFIG_SUPPORT_RAW_INITRD=y CONFIG_MISC_INIT_R=y CONFIG_BOUNCE_BUFFER=y -CONFIG_SPL_TEXT_BASE=0x00908000 CONFIG_SPL_BOOTCOUNT_LIMIT=y # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set CONFIG_SPL_DMA_SUPPORT=y From patchwork Tue Sep 3 14:38:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157048 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8nd3Fhzz9s7T for ; Wed, 4 Sep 2019 00:43:01 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0A771C21E1B; Tue, 3 Sep 2019 14:40:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A20C2C21DB3; Tue, 3 Sep 2019 14:39:58 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9FA0CC21D8E; Tue, 3 Sep 2019 14:39:31 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lists.denx.de (Postfix) with ESMTPS id 7166BC21E02 for ; Tue, 3 Sep 2019 14:39:29 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jY23wDz1rWTJ; Tue, 3 Sep 2019 16:39:29 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jY1rltz1qqkP; Tue, 3 Sep 2019 16:39:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id A7Kb9linSQBO; Tue, 3 Sep 2019 16:39:28 +0200 (CEST) X-Auth-Info: oXc6ELsgqYioF+/ImmyZ8MM93ArWHO75KJ76Ht/sLwM= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:28 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:49 +0200 Message-Id: <20190903143850.9824-14-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Subject: [U-Boot] [PATCH v2 13/14] imx: Convert emergency pad of display5 to use dm_gpio* functions X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" After this change the display5's emergency gpio use dm_gpio* functions instead of legacy ones (gpio*) to read its state. Signed-off-by: Lukasz Majewski --- Changes in v2: None board/liebherr/display5/display5.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index 5713401ed954..b8dcd03fd9b6 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -36,7 +36,6 @@ static bool sw_ids_valid; static u32 cpu_id; static u32 unit_id; -#define EM_PAD IMX_GPIO_NR(3, 29) #define SW0 IMX_GPIO_NR(2, 4) #define SW1 IMX_GPIO_NR(2, 5) #define SW2 IMX_GPIO_NR(2, 6) @@ -236,21 +235,24 @@ static inline void setup_boot_modes(void) {} int misc_init_r(void) { + struct gpio_desc em_pad; int ret; setup_boot_modes(); - ret = gpio_request(EM_PAD, "Emergency_PAD"); + ret = dm_gpio_lookup_name("GPIO3_29", &em_pad); if (ret) { - printf("Can't request emergency PAD gpio\n"); + printf("Can't find emergency PAD gpio\n"); return ret; } - ret = gpio_direction_input(EM_PAD); + ret = dm_gpio_request(&em_pad, "Emergency_PAD"); if (ret) { - printf("Can't set emergency PAD direction\n"); + printf("Can't request emergency PAD gpio\n"); return ret; } + dm_gpio_set_dir_flags(&em_pad, GPIOD_IS_IN); + return 0; } From patchwork Tue Sep 3 14:38:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1157049 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46N8nt2PyBz9s7T for ; Wed, 4 Sep 2019 00:43:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id CEB89C21E3B; Tue, 3 Sep 2019 14:41:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id EF7B3C21C50; Tue, 3 Sep 2019 14:41:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F162AC21E0F; Tue, 3 Sep 2019 14:39:32 +0000 (UTC) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by lists.denx.de (Postfix) with ESMTPS id 99716C21D8E for ; Tue, 3 Sep 2019 14:39:30 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46N8jZ3HNyz1rLlH; Tue, 3 Sep 2019 16:39:30 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46N8jZ34Y7z1qqkP; Tue, 3 Sep 2019 16:39:30 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 2bnrDTAX28GQ; Tue, 3 Sep 2019 16:39:29 +0200 (CEST) X-Auth-Info: m7cB5ElSq8a3nR2p+OIU6OSiUUc5wnFs4KvuDgZNVLk= Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 3 Sep 2019 16:39:29 +0200 (CEST) From: Lukasz Majewski To: u-boot@lists.denx.de, Stefano Babic Date: Tue, 3 Sep 2019 16:38:50 +0200 Message-Id: <20190903143850.9824-15-lukma@denx.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190903143850.9824-1-lukma@denx.de> References: <20190903143850.9824-1-lukma@denx.de> Subject: [U-Boot] [PATCH v2 14/14] imx: Rewrite display5 get_board_id() function to use dm_gpio_* API X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The get_board_id() function was using the old gpio_* compatibility layer to read HW and SW ID numbers encoded on the PCB board. After this change the new dm_gpio* API is used for this purpose. Signed-off-by: Lukasz Majewski --- Changes in v2: None board/liebherr/display5/display5.c | 53 +++++++++++++++----------------------- 1 file changed, 21 insertions(+), 32 deletions(-) diff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c index b8dcd03fd9b6..85ca777c1d22 100644 --- a/board/liebherr/display5/display5.c +++ b/board/liebherr/display5/display5.c @@ -36,60 +36,49 @@ static bool sw_ids_valid; static u32 cpu_id; static u32 unit_id; -#define SW0 IMX_GPIO_NR(2, 4) -#define SW1 IMX_GPIO_NR(2, 5) -#define SW2 IMX_GPIO_NR(2, 6) -#define SW3 IMX_GPIO_NR(2, 7) -#define HW0 IMX_GPIO_NR(6, 7) -#define HW1 IMX_GPIO_NR(6, 9) -#define HW2 IMX_GPIO_NR(6, 10) -#define HW3 IMX_GPIO_NR(6, 11) -#define HW4 IMX_GPIO_NR(4, 7) -#define HW5 IMX_GPIO_NR(4, 11) -#define HW6 IMX_GPIO_NR(4, 13) -#define HW7 IMX_GPIO_NR(4, 15) - -int gpio_table_sw_ids[] = { - SW0, SW1, SW2, SW3 +const char *gpio_table_sw_names[] = { + "GPIO2_4", "GPIO2_5", "GPIO2_6", "GPIO2_7" }; const char *gpio_table_sw_ids_names[] = { "sw0", "sw1", "sw2", "sw3" }; -int gpio_table_hw_ids[] = { - HW0, HW1, HW2, HW3, HW4, HW5, HW6, HW7 +const char *gpio_table_hw_names[] = { + "GPIO6_7", "GPIO6_9", "GPIO6_10", "GPIO6_11", + "GPIO4_7", "GPIO4_11", "GPIO4_13", "GPIO4_15" }; const char *gpio_table_hw_ids_names[] = { "hw0", "hw1", "hw2", "hw3", "hw4", "hw5", "hw6", "hw7" }; -static int get_board_id(int *ids, const char **c, int size, - bool *valid, u32 *id) +static int get_board_id(const char **pin_names, const char **ids_names, + int size, bool *valid, u32 *id) { + struct gpio_desc desc; int i, ret, val; *valid = false; for (i = 0; i < size; i++) { - ret = gpio_request(ids[i], c[i]); + memset(&desc, 0, sizeof(desc)); + + ret = dm_gpio_lookup_name(pin_names[i], &desc); if (ret) { - printf("Can't request SWx gpios\n"); + printf("Can't lookup request SWx gpios\n"); return ret; } - } - for (i = 0; i < size; i++) { - ret = gpio_direction_input(ids[i]); + ret = dm_gpio_request(&desc, ids_names[i]); if (ret) { - printf("Can't set SWx gpios direction\n"); + printf("Can't lookup request SWx gpios\n"); return ret; } - } - for (i = 0; i < size; i++) { - val = gpio_get_value(ids[i]); + dm_gpio_set_dir_flags(&desc, GPIOD_IS_IN); + + val = dm_gpio_get_value(&desc); if (val < 0) { printf("Can't get SW%d ID\n", i); *id = 0; @@ -176,12 +165,12 @@ int board_init(void) /* Setup misc (application specific) stuff */ SETUP_IOMUX_PADS(misc_pads); - get_board_id(gpio_table_sw_ids, &gpio_table_sw_ids_names[0], - ARRAY_SIZE(gpio_table_sw_ids), &sw_ids_valid, &unit_id); + get_board_id(gpio_table_sw_names, &gpio_table_sw_ids_names[0], + ARRAY_SIZE(gpio_table_sw_names), &sw_ids_valid, &unit_id); debug("SWx unit_id 0x%x\n", unit_id); - get_board_id(gpio_table_hw_ids, &gpio_table_hw_ids_names[0], - ARRAY_SIZE(gpio_table_hw_ids), &hw_ids_valid, &cpu_id); + get_board_id(gpio_table_hw_names, &gpio_table_hw_ids_names[0], + ARRAY_SIZE(gpio_table_hw_names), &hw_ids_valid, &cpu_id); debug("HWx cpu_id 0x%x\n", cpu_id); if (hw_ids_valid && sw_ids_valid)