[PATCH 06/17] imx: imx8mm-data-modul-edm-sbc: enable pinctrl_wdog in SPL
Peng Fan (OSS)
peng.fan at oss.nxp.com
Tue May 3 14:24:06 CEST 2022
From: Peng Fan <peng.fan at nxp.com>
Add pinctrl_wdog.
Mark pinctrl_wdog as u-boot,dm-spl to clean up board code,
set_wdog_reset function could be handled by imx_watchdog.c driver.
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
.../dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi | 4 ++++
arch/arm/dts/imx8mm-data-modul-edm-sbc.dts | 9 +++++++++
board/data_modul/imx8mm_edm_sbc/spl.c | 17 -----------------
3 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi b/arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi
index 184c30ab4a7..32413e98118 100644
--- a/arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi
+++ b/arch/arm/dts/imx8mm-data-modul-edm-sbc-u-boot.dtsi
@@ -114,3 +114,7 @@
&wdog1 {
u-boot,dm-spl;
};
+
+&pinctrl_wdog {
+ u-boot,dm-spl;
+};
diff --git a/arch/arm/dts/imx8mm-data-modul-edm-sbc.dts b/arch/arm/dts/imx8mm-data-modul-edm-sbc.dts
index 154116d01c9..b444482be21 100644
--- a/arch/arm/dts/imx8mm-data-modul-edm-sbc.dts
+++ b/arch/arm/dts/imx8mm-data-modul-edm-sbc.dts
@@ -512,6 +512,12 @@
>;
};
+ pinctrl_wdog: wdoggrp {
+ fsl,pins = <
+ MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166
+ >;
+ };
+
pinctrl_hog_feature: hog-feature-grp {
fsl,pins = <
/* GPIO4_IO27 */
@@ -992,5 +998,8 @@
};
&wdog1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdog>;
+ fsl,ext-reset-output;
status = "okay";
};
diff --git a/board/data_modul/imx8mm_edm_sbc/spl.c b/board/data_modul/imx8mm_edm_sbc/spl.c
index f5063eb8c19..5a40bf3d682 100644
--- a/board/data_modul/imx8mm_edm_sbc/spl.c
+++ b/board/data_modul/imx8mm_edm_sbc/spl.c
@@ -28,21 +28,6 @@
DECLARE_GLOBAL_DATA_PTR;
-#define WDOG_PAD_CTRL (PAD_CTL_DSE6 | PAD_CTL_ODE | PAD_CTL_PUE | PAD_CTL_PE)
-
-static const iomux_v3_cfg_t wdog_pads[] = {
- IMX8MM_PAD_GPIO1_IO02_WDOG1_WDOG_B | MUX_PAD_CTRL(WDOG_PAD_CTRL),
-};
-
-static void data_modul_imx8mm_edm_sbc_early_init_f(void)
-{
- struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
-
- imx_iomux_v3_setup_multiple_pads(wdog_pads, ARRAY_SIZE(wdog_pads));
-
- set_wdog_reset(wdog);
-}
-
static int data_modul_imx8mm_edm_sbc_board_power_init(void)
{
struct udevice *dev;
@@ -139,8 +124,6 @@ void board_init_f(ulong dummy)
init_uart_clk(2);
- data_modul_imx8mm_edm_sbc_early_init_f();
-
/* Clear the BSS. */
memset(__bss_start, 0, __bss_end - __bss_start);
--
2.36.0
More information about the U-Boot
mailing list