2020-10-09 10:49:36

by Anson Huang

[permalink] [raw]
Subject: [PATCH 1/3] arm64: dts: imx8mm: Correct WDOG_B pin configuration

Different revision of i.MX8MM EVK boards may have different external
pull up registor design, some are enabled while some are NOT, to make
sure the WDOG_B pin works properly, better to enable internal pull up
resistor. Since enabling internal pull up resistor is NOT harmful and
having benefit of flexibility on different board design, just enable
it for all i.MX8MM boards.

Signed-off-by: Anson Huang <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi | 2 +-
arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 2 +-
arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
index 6de86a4..a941301 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
@@ -398,7 +398,7 @@

pinctrl_wdog: wdoggrp {
fsl,pins = <
- MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
+ MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166
>;
};

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
index f305a53..469d570 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
@@ -468,7 +468,7 @@

pinctrl_wdog: wdoggrp {
fsl,pins = <
- MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
+ MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166
>;
};
};
diff --git a/arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi
index 4107fe9..38e879d 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi
@@ -555,7 +555,7 @@

pinctrl_wdog: wdoggrp {
fsl,pins = <
- MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
+ MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166
>;
};
};
--
2.7.4


2020-10-09 10:49:40

by Anson Huang

[permalink] [raw]
Subject: [PATCH 2/3] arm64: dts: imx8mn: Correct WDOG_B pin configuration

Different revision of i.MX8MN EVK boards may have different external
pull up registor design, some are enabled while some are NOT, to make
sure the WDOG_B pin works properly, better to enable internal pull up
resistor. Since enabling internal pull up resistor is NOT harmful and
having benefit of flexibility on different board design, just enable
it for all i.MX8MN boards.

Signed-off-by: Anson Huang <[email protected]>
---
arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 2 +-
arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
index 4aa0dbd..fda8905 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
@@ -340,7 +340,7 @@

pinctrl_wdog: wdoggrp {
fsl,pins = <
- MX8MN_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
+ MX8MN_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166
>;
};
};
diff --git a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
index a2d0190..dde01da 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi
@@ -545,7 +545,7 @@

pinctrl_wdog: wdoggrp {
fsl,pins = <
- MX8MN_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
+ MX8MN_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166
>;
};
};
--
2.7.4

2020-10-12 06:54:39

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] arm64: dts: imx8mm: Correct WDOG_B pin configuration

On Fri, 9 Oct 2020 at 09:52, Anson Huang <[email protected]> wrote:
>
> Different revision of i.MX8MM EVK boards may have different external
> pull up registor design, some are enabled while some are NOT, to make
> sure the WDOG_B pin works properly, better to enable internal pull up
> resistor. Since enabling internal pull up resistor is NOT harmful and
> having benefit of flexibility on different board design, just enable
> it for all i.MX8MM boards.
>
> Signed-off-by: Anson Huang <[email protected]>
> ---
> arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi | 2 +-
> arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 2 +-
> arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
> index 6de86a4..a941301 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
> @@ -398,7 +398,7 @@
>
> pinctrl_wdog: wdoggrp {
> fsl,pins = <
> - MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
> + MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166

Enabling pull up makes sense but you change other bits - disable
Schmitt input and enable open drain. This change is not documented /
explained in commit msg.

Best regards,
Krzysztof

2020-10-12 06:56:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] arm64: dts: imx8mn: Correct WDOG_B pin configuration

On Fri, 9 Oct 2020 at 09:52, Anson Huang <[email protected]> wrote:
>
> Different revision of i.MX8MN EVK boards may have different external
> pull up registor design, some are enabled while some are NOT, to make
> sure the WDOG_B pin works properly, better to enable internal pull up
> resistor. Since enabling internal pull up resistor is NOT harmful and
> having benefit of flexibility on different board design, just enable
> it for all i.MX8MN boards.
>
> Signed-off-by: Anson Huang <[email protected]>
> ---
> arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 2 +-
> arch/arm64/boot/dts/freescale/imx8mn-var-som.dtsi | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)

The same as patch #1 - you do more than just enable pull up.

Best regards,
Krzysztof

2020-10-12 13:21:42

by Anson Huang

[permalink] [raw]
Subject: RE: [PATCH 1/3] arm64: dts: imx8mm: Correct WDOG_B pin configuration

Hi, Krzysztof

> Subject: Re: [PATCH 1/3] arm64: dts: imx8mm: Correct WDOG_B pin
> configuration
>
> On Fri, 9 Oct 2020 at 09:52, Anson Huang <[email protected]> wrote:
> >
> > Different revision of i.MX8MM EVK boards may have different external
> > pull up registor design, some are enabled while some are NOT, to make
> > sure the WDOG_B pin works properly, better to enable internal pull up
> > resistor. Since enabling internal pull up resistor is NOT harmful and
> > having benefit of flexibility on different board design, just enable
> > it for all i.MX8MM boards.
> >
> > Signed-off-by: Anson Huang <[email protected]>
> > ---
> > arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi | 2 +-
> > arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 2 +-
> > arch/arm64/boot/dts/freescale/imx8mm-var-som.dtsi | 2 +-
> > 3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
> > index 6de86a4..a941301 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-som.dtsi
> > @@ -398,7 +398,7 @@
> >
> > pinctrl_wdog: wdoggrp {
> > fsl,pins = <
> > -
> MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
> > +
> MX8MM_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x166
>
> Enabling pull up makes sense but you change other bits - disable Schmitt input
> and enable open drain. This change is not documented / explained in commit
> msg.

The Schmitt input is NOT necessary for WDOG_B pin which is for output ONLY.
The open drain is to let pull up voltage to decide the actual output voltage,
so it is NOT harmful for WDOG_B pin, hence we set it together.
I will send a V2 patch to add these info in commit msg.

Thanks,
Anson