public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Joris Offouga <offougajoris@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 3/5] pico-imx7d: defconfig Enable DM gpio pinctrl and pinctrl_imx7
Date: Thu,  4 Apr 2019 14:00:54 +0200	[thread overview]
Message-ID: <1554379256-24701-4-git-send-email-offougajoris@gmail.com> (raw)
In-Reply-To: <1554379256-24701-1-git-send-email-offougajoris@gmail.com>

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 <offougajoris@gmail.com>
---
 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 767d13d..3b9be45 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 75eab28..a830aa8 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 beee839..ec7faf9 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 05d5fe5..662492a 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
-- 
2.7.4

  parent reply	other threads:[~2019-04-04 12:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 12:00 [U-Boot] [PATCH V2 0/5] Convert Pico i.MX7 to DM Joris Offouga
2019-04-04 12:00 ` [U-Boot] [PATCH V2 1/5] Arm: imx7d-pico: Import all Linux device tree for Pico i.MX7D SOM Joris Offouga
2019-04-26  9:37   ` [U-Boot] [U-Boot, V2, " sbabic at denx.de
2019-04-04 12:00 ` [U-Boot] [PATCH V2 2/5] pico-imx7d: defconfig: Add DT file hooks Joris Offouga
2019-04-25  9:00   ` Stefano Babic
2019-04-25  9:09     ` Joris OFFOUGA
2019-04-25  9:12     ` Stefano Babic
2019-04-25  9:18       ` Joris OFFOUGA
2019-04-25  9:26         ` Stefano Babic
2019-04-25  9:57           ` Joris Offouga
2019-04-25 10:28             ` Stefano Babic
2019-04-25 10:35               ` Joris Offouga
2019-04-25 10:38               ` Fabio Estevam
2019-04-26  9:38   ` [U-Boot] [U-Boot,V2,2/5] " sbabic at denx.de
2019-04-04 12:00 ` Joris Offouga [this message]
2019-04-26  9:38   ` [U-Boot] [U-Boot, V2, 3/5] pico-imx7d: defconfig Enable DM gpio pinctrl and pinctrl_imx7 sbabic at denx.de
2019-04-04 12:00 ` [U-Boot] [PATCH V2 4/5] pico-imx7d: Convert DM MMC Joris Offouga
2019-04-26  9:45   ` [U-Boot] [U-Boot,V2,4/5] " sbabic at denx.de
2019-04-04 12:00 ` [U-Boot] [PATCH V2 5/5] pico-imx7d: Increase u-boot size for dfu request Joris Offouga
2019-04-26  9:37   ` [U-Boot] [U-Boot, V2, " sbabic at denx.de
2019-04-05 13:07 ` [U-Boot] [PATCH V2 0/5] Convert Pico i.MX7 to DM Fabio Estevam
2019-04-05 13:28   ` Joris OFFOUGA
2019-04-15  8:02     ` jorisoffouga
2019-04-15  8:16       ` Stefano Babic
2019-04-24 10:18         ` Fabio Estevam
2019-04-24 10:26           ` Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554379256-24701-4-git-send-email-offougajoris@gmail.com \
    --to=offougajoris@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox