From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/6] ARM: i.MX8MP: skov: assert switch reset early
Date: Mon, 14 Apr 2025 08:50:06 +0200 [thread overview]
Message-ID: <20250414065009.2770749-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250414065009.2770749-1-a.fatoum@pengutronix.de>
Switch reset is pulled up, so it's asserted when its rail is powered up.
This happens in parallel to the rail being powered on, which violates
the power sequencing. Workaround this, by moving the switch into reset
as early as possible to avoid erratic behavior until the driver is ready
to take it out of reset.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/boards/skov-imx8mp/lowlevel.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boards/skov-imx8mp/lowlevel.c b/arch/arm/boards/skov-imx8mp/lowlevel.c
index 692482f43580..637fc50b3f30 100644
--- a/arch/arm/boards/skov-imx8mp/lowlevel.c
+++ b/arch/arm/boards/skov-imx8mp/lowlevel.c
@@ -16,6 +16,7 @@
#include <pbl/i2c.h>
#include <pbl/pmic.h>
#include <soc/imx8m/ddr.h>
+#include <mach/imx/imx-gpio.h>
extern char __dtb_z_imx8mp_skov_start[];
@@ -70,6 +71,12 @@ static void power_init_board(void)
{
struct pbl_i2c *i2c;
+ /* Assert switch reset early to avoid erratic behavior due to
+ * violating power sequencing
+ */
+ imx8mp_setup_pad(MX8MP_PAD_SAI3_TXD__GPIO5_IO01);
+ imx8m_gpio_direction_output(IOMEM(MX8MP_GPIO5_BASE_ADDR), 1, 0);
+
imx8mp_setup_pad(MX8MP_PAD_I2C1_SCL__I2C1_SCL | I2C_PAD_CTRL);
imx8mp_setup_pad(MX8MP_PAD_I2C1_SDA__I2C1_SDA | I2C_PAD_CTRL);
--
2.39.5
next prev parent reply other threads:[~2025-04-14 6:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 6:50 [PATCH 1/6] ARM: dts: i.MX8MP: drop now upstream imx8mp-nominal.dtsi Ahmad Fatoum
2025-04-14 6:50 ` [PATCH 2/6] ARM: i.MX8MP: skov: decrease VDD_SOC to 850mV Ahmad Fatoum
2025-04-14 6:50 ` Ahmad Fatoum [this message]
2025-04-14 6:50 ` [PATCH 4/6] ARM: i.MX8MP: skov: halt startup until power is good Ahmad Fatoum
2025-04-14 8:40 ` Marco Felsch
2025-04-14 8:46 ` Ahmad Fatoum
2025-04-14 9:21 ` Marco Felsch
2025-04-14 9:36 ` Ahmad Fatoum
2025-04-14 10:56 ` Marco Felsch
2025-04-14 11:11 ` Ahmad Fatoum
2025-04-14 6:50 ` [PATCH 5/6] ARM: skov-imx8mp: print initial > on every boot Ahmad Fatoum
2025-04-14 6:50 ` [PATCH 6/6] ARM: i.MX8MP: skov: add new 7" g07017 variant support Ahmad Fatoum
2025-04-14 8:37 ` [PATCH 1/6] ARM: dts: i.MX8MP: drop now upstream imx8mp-nominal.dtsi Sascha Hauer
2025-04-14 8:46 ` Ahmad Fatoum
2025-04-14 9:19 ` Sascha Hauer
2025-04-15 6:48 ` Sascha Hauer
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=20250414065009.2770749-3-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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