public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>,
	"NXP i . MX U-Boot Team" <uboot-imx@nxp.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Tim Harvey <tharvey@gateworks.com>
Subject: [PATCH 05/11] imx: ventana: add PMIC fix for GW54xx-G
Date: Fri, 11 Jun 2021 12:46:22 -0700	[thread overview]
Message-ID: <20210611194628.5572-5-tharvey@gateworks.com> (raw)
In-Reply-To: <20210611194628.5572-1-tharvey@gateworks.com>

Substitutions in EOL parts changes the VDD_2P5 voltage rail such that
the previously unused VGEN6 LDO is needed in place of the lower power
VGEN5 for the GW54xx-G.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/gw_ventana/common.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index 4627a156fe..9f5f20f781 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -1550,6 +1550,17 @@ void setup_pmic(void)
 	int board = read_eeprom(CONFIG_I2C_GSC, &ventana_info);
 	const int i2c_pmic = 1;
 	u32 reg;
+	char rev;
+	int i;
+
+	/* determine board revision */
+	rev = 'A';
+	for (i = sizeof(ventana_info.model) - 1; i > 0; i--) {
+		if (ventana_info.model[i] >= 'A') {
+			rev = ventana_info.model[i];
+			break;
+		}
+	}
 
 	i2c_set_bus_num(i2c_pmic);
 
@@ -1573,6 +1584,17 @@ void setup_pmic(void)
 			reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
 			reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
 			pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
+
+			if (board == GW54xx && (rev == 'G')) {
+				/* Disable VGEN5 */
+				pmic_reg_write(p, PFUZE100_VGEN5VOL, 0);
+
+				/* Set VGEN6 to 2.5V and enable */
+				pmic_reg_read(p, PFUZE100_VGEN6VOL, &reg);
+				reg &= ~(LDO_VOL_MASK);
+				reg |= (LDOB_2_50V | LDO_EN);
+				pmic_reg_write(p, PFUZE100_VGEN6VOL, reg);
+			}
 		}
 	}
 
-- 
2.17.1


  parent reply	other threads:[~2021-06-11 19:47 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 19:46 [PATCH 01/11] imx: ventana: remove USB_KEYBOARD support Tim Harvey
2021-06-11 19:46 ` [PATCH 02/11] imx: ventana: remove unneeded includes Tim Harvey
2021-07-10 15:52   ` sbabic
2021-07-10 19:35   ` sbabic
2021-06-11 19:46 ` [PATCH 03/11] imx: ventana: increase SYS_BOOTM_LEN Tim Harvey
2021-07-10 15:53   ` sbabic
2021-07-10 19:36   ` sbabic
2021-06-11 19:46 ` [PATCH 04/11] imx: ventana: add legacy uboot image support Tim Harvey
2021-07-10 15:53   ` sbabic
2021-07-10 19:36   ` sbabic
2021-06-11 19:46 ` Tim Harvey [this message]
2021-07-10 15:53   ` [PATCH 05/11] imx: ventana: add PMIC fix for GW54xx-G sbabic
2021-07-10 19:36   ` sbabic
2021-06-11 19:46 ` [PATCH 06/11] imx: ventana: put PFUZ100 regulators in continuous mode Tim Harvey
2021-07-10 15:53   ` sbabic
2021-07-10 19:36   ` sbabic
2021-06-11 19:46 ` [PATCH 07/11] imx: ventana: put LTC3676 " Tim Harvey
2021-07-10 15:54   ` sbabic
2021-07-10 19:37   ` sbabic
2021-06-11 19:46 ` [PATCH 08/11] imx: ventana: add DP83867 PHY LED configuration Tim Harvey
2021-07-10 15:52   ` sbabic
2021-07-10 19:34   ` sbabic
2021-06-11 19:46 ` [PATCH 09/11] imx: ventana: display neteowrk PHY Tim Harvey
2021-07-10 15:52   ` sbabic
2021-07-10 19:34   ` sbabic
2021-06-11 19:46 ` [PATCH 10/11] imx: ventana: add support for DLC0700XDP21LF LCD display Tim Harvey
2021-07-10 15:52   ` sbabic
2021-07-10 19:35   ` sbabic
2021-06-11 19:46 ` [PATCH 11/11] imx: ventana: display 'none' for MMC if board does not have it Tim Harvey
2021-07-10 15:54   ` sbabic
2021-07-10 19:37   ` sbabic
2021-07-10 15:53 ` [PATCH 01/11] imx: ventana: remove USB_KEYBOARD support sbabic
2021-07-10 19:35 ` sbabic

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=20210611194628.5572-5-tharvey@gateworks.com \
    --to=tharvey@gateworks.com \
    --cc=festevam@gmail.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /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