All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: sbabic@denx.de, festevam@gmail.com,
	"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
	Marek Vasut <marex@denx.de>
Cc: u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 06/17] imx: imx8mm-data-modul-edm-sbc: enable pinctrl_wdog in SPL
Date: Tue,  3 May 2022 20:24:06 +0800	[thread overview]
Message-ID: <20220503122417.26953-7-peng.fan@oss.nxp.com> (raw)
In-Reply-To: <20220503122417.26953-1-peng.fan@oss.nxp.com>

From: Peng Fan <peng.fan@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@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


  parent reply	other threads:[~2022-05-03 11:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 12:24 [PATCH 00/17] imx: imx8m: clean up wdog code Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 01/17] imx: imx8mn_evk: enable pinctrl_wdog in SPL Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 02/17] imx: imx8mm_evk: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 03/17] imx: imx8mp_evk: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 04/17] imx: imx8mm_beacon: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 05/17] imx: imx8mm-cl-iot-gate: " Peng Fan (OSS)
2022-05-03 12:24 ` Peng Fan (OSS) [this message]
2022-05-03 13:51   ` [PATCH 06/17] imx: imx8mm-data-modul-edm-sbc: " Marek Vasut
2022-05-05 10:16     ` Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 07/17] imx: engicam-imx8mm: drop unused macro Peng Fan (OSS)
2022-05-03 11:49   ` Michael Nazzareno Trimarchi
2022-05-03 12:24 ` [PATCH 08/17] imx: imx8mm-mx8menlo: drop unneeded watchdog settings Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 09/17] imx: imx8mm/n/p-venice: enable pinctrl_wdog in SPL Peng Fan (OSS)
2022-05-03 16:19   ` Tim Harvey
2022-05-03 12:24 ` [PATCH 10/17] imx: imx8mn-beacon: " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 11/17] imx: imx8mn_smm_s2: clean up board watchdog code Peng Fan (OSS)
2022-05-04 19:18   ` Ariel D'Alessandro
2022-05-03 12:24 ` [PATCH 12/17] imx: imx8mn_var_som: " Peng Fan (OSS)
2022-05-04 19:10   ` Ariel D'Alessandro
2022-05-03 12:24 ` [PATCH 13/17] imx: imx8mp_rsb7320a1: enable wdog driver model in SPL Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 14/17] imx: imx8mn-kontron-n801x: enable pinctrl_wdog " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 15/17] imx: phycore_imx8mm/p: clean up board watchdog code Peng Fan (OSS)
2022-05-03 13:52   ` Teresa Remmet
2022-05-03 12:24 ` [PATCH 16/17] imx: verdin-imx8mm/p: cleanup " Peng Fan (OSS)
2022-05-03 12:24 ` [PATCH 17/17] imx: toradex/verdin-imx8mm/p: " Peng Fan (OSS)

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=20220503122417.26953-7-peng.fan@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=festevam@gmail.com \
    --cc=marex@denx.de \
    --cc=peng.fan@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.