[PATCH 3/6] ARM: i.MX8MP: skov: assert switch reset early
Ahmad Fatoum
a.fatoum at pengutronix.de
Sun Apr 13 23:50:06 PDT 2025
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 at 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
More information about the barebox
mailing list