From patchwork Mon Mar 25 12:51:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joris OFFOUGA X-Patchwork-Id: 1064290 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="LQYP+QSC"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44SZ2C0fZdz9sS3 for ; Mon, 25 Mar 2019 23:53:38 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 9DAC5C21FB5; Mon, 25 Mar 2019 12:52:37 +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=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID 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 E7EFFC21F98; Mon, 25 Mar 2019 12:52:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 66639C21F75; Mon, 25 Mar 2019 12:52:16 +0000 (UTC) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by lists.denx.de (Postfix) with ESMTPS id 3C534C21F67 for ; Mon, 25 Mar 2019 12:52:13 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id k17so2041455wrx.10 for ; Mon, 25 Mar 2019 05:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B4D/p8jbLww4kB8zBjF6nKm/k20qT0NxXKm0XWd1/cw=; b=LQYP+QSCSaSt67I/1j1sSmToy5ZAU6tQ5gR7v+LJAxi8+EvZjD3fWjWlBpfflFvsww 3IHNIst9UPUwNWAGU9Y6S5f2NPeWPHG2VbiCTb/kXHmx5OpQ2/PLXjdL9ZAuJm+xQgqL 67MdwY6YHCDb1MzkG3D1CXTf3rlWs2rBsP8h/pHk2o3fIJ0DuFeRdcPz2K1ktMDv0i7y eIxncGjTYWKaIl0zc4Wq+satUMlX5UhdxLL3eBPDP2vYHQ4DKW2fnDjDENuhKe8++tMg h4BmfqSkIy0kikUc4eNVNO5oYz/67Ntg/xQ3x7s8EcU54j/Ji2WDsbemKeMrfHwS78JZ z/tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B4D/p8jbLww4kB8zBjF6nKm/k20qT0NxXKm0XWd1/cw=; b=C9aAw2VFtvsmPH3TQIjlfhy4aRb9YD0VJwKOvDIHnjzma5hod6IavFbLNjbUfqvBXB n+6pJb1YwRVdVJm65ZYjw8Bj6CuIfey4mzSQLA+70eMZsWVaLEnLyVqaKd0wibT4Qv0l YJVNaqX4u1IYBPYib3be6s/czz05lS74lJ/FQh3vKz5TnhN7PM/lDiHnSLxswsKOY8DD nG7wrFqN2PcMIAMD/63aCjoeTU4fkN+SeURpNTAR+/iGIS1gVg55pO7ujTQ2tb25VVe6 zoMzWr6I3LGp/zvpEYYoybKIF7TiAfCeNZnXDaowmUsOtY7EhWmPOhYdlbKtb2XWNuYz 7oFw== X-Gm-Message-State: APjAAAW9d46Jl/sjY2yl6cSB6B8nyfOmIu11tvBdOEtchOEezmV4SRuA 1bwwqnsmqaV1lqd5V/pFi1OITDhBmIM= X-Google-Smtp-Source: APXvYqxqBwpj11vZU9Zk8rsa5Pa//Y2vmPlf7VUN1Zfm67Y2uo0IynbkFxsgDMNg34fAJSL6MThZzQ== X-Received: by 2002:a5d:6a4f:: with SMTP id t15mr15624150wrw.156.1553518332638; Mon, 25 Mar 2019 05:52:12 -0700 (PDT) Received: from joffouga-VirtualBox.zeus.local ([37.58.205.20]) by smtp.gmail.com with ESMTPSA id r9sm3636013wrv.82.2019.03.25.05.52.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Mar 2019 05:52:12 -0700 (PDT) From: Joris Offouga To: u-boot@lists.denx.de Date: Mon, 25 Mar 2019 13:51:56 +0100 Message-Id: <20190325125158.12457-4-offougajoris@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190325125158.12457-1-offougajoris@gmail.com> References: <20190325125158.12457-1-offougajoris@gmail.com> Cc: otavio.salvador@ossystems.com.br Subject: [U-Boot] [PATCH 3/5] pico-imx7d: defconfig Enable DM gpio pinctrl and pinctrl_imx7 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 patch is necessary for convert this board to dm driver model DM GPIO requires gpio_request() to be called explicitly before doing any gpio operation Signed-off-by: Joris Offouga Tested-by: Fabio Estevam --- board/technexion/pico-imx7d/pico-imx7d.c | 4 +++- configs/pico-hobbit-imx7d_defconfig | 3 +++ configs/pico-imx7d_defconfig | 3 +++ configs/pico-pi-imx7d_defconfig | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 767d13dfe5..3b9be45587 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -165,7 +165,7 @@ static iomux_v3_cfg_t const fec1_pads[] = { static void setup_iomux_fec(void) { imx_iomux_v3_setup_multiple_pads(fec1_pads, ARRAY_SIZE(fec1_pads)); - + gpio_request(FEC1_RST_GPIO, "phy_rst"); gpio_direction_output(FEC1_RST_GPIO, 0); udelay(500); gpio_set_value(FEC1_RST_GPIO, 1); @@ -291,6 +291,8 @@ static iomux_v3_cfg_t const lcd_pads[] = { void setup_lcd(void) { imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads)); + gpio_request(IMX_GPIO_NR(1, 11), "lcd_brightness"); + gpio_request(IMX_GPIO_NR(1, 6), "lcd_enable"); /* Set Brightness to high */ gpio_direction_output(IMX_GPIO_NR(1, 11) , 1); /* Set LCD enable to high */ diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig index 75eab28aba..a830aa85a2 100644 --- a/configs/pico-hobbit-imx7d_defconfig +++ b/configs/pico-hobbit-imx7d_defconfig @@ -27,6 +27,9 @@ CONFIG_SPL_USB_SDP_SUPPORT=y CONFIG_CMD_BOOTMENU=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_XIMG is not set +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX7=y +CONFIG_DM_GPIO=y CONFIG_CMD_SPL=y CONFIG_CMD_SPL_WRITE_SIZE=0x20000 CONFIG_CMD_DFU=y diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig index 13704941cf..54d7da8768 100644 --- a/configs/pico-imx7d_defconfig +++ b/configs/pico-imx7d_defconfig @@ -27,6 +27,9 @@ CONFIG_SPL_USB_SDP_SUPPORT=y CONFIG_CMD_BOOTMENU=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_XIMG is not set +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX7=y +CONFIG_DM_GPIO=y CONFIG_CMD_SPL=y CONFIG_CMD_SPL_WRITE_SIZE=0x20000 CONFIG_CMD_DFU=y diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig index 05d5fe5175..662492aae1 100644 --- a/configs/pico-pi-imx7d_defconfig +++ b/configs/pico-pi-imx7d_defconfig @@ -27,6 +27,9 @@ CONFIG_SPL_USB_SDP_SUPPORT=y CONFIG_CMD_BOOTMENU=y # CONFIG_CMD_IMI is not set # CONFIG_CMD_XIMG is not set +CONFIG_PINCTRL=y +CONFIG_PINCTRL_IMX7=y +CONFIG_DM_GPIO=y CONFIG_CMD_SPL=y CONFIG_CMD_SPL_WRITE_SIZE=0x20000 CONFIG_CMD_DFU=y