[PATCH v3 2/4] mips: dts: ralink: mt7621: add phandle to system controller node for watchdog

Sergio Paracuellos posted 4 patches 2 years, 7 months ago
There is a newer version of this series
[PATCH v3 2/4] mips: dts: ralink: mt7621: add phandle to system controller node for watchdog
Posted by Sergio Paracuellos 2 years, 7 months ago
To allow to access system controller registers from watchdog driver code
add a phandle in the watchdog 'wdt' node. This avoid using arch dependent
operations in driver code.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 arch/mips/boot/dts/ralink/mt7621.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
index 5ca40fd21..764916eaf 100644
--- a/arch/mips/boot/dts/ralink/mt7621.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
@@ -73,6 +73,7 @@ sysc: syscon@0 {
 		wdt: wdt@100 {
 			compatible = "mediatek,mt7621-wdt";
 			reg = <0x100 0x100>;
+			mediatek,sysctl = <&sysc>;
 		};
 
 		gpio: gpio@600 {
-- 
2.25.1
Re: [PATCH v3 2/4] mips: dts: ralink: mt7621: add phandle to system controller node for watchdog
Posted by Arınç ÜNAL 2 years, 7 months ago
Could you also change the node name to watchdog@100? make dtbs_check 
points it out:

wdt@100: $nodename:0: 'wdt@100' does not match '^watchdog(@.*|-[0-9a-f])?$'

Thanks.
Arınç

On 10.02.2023 20:38, Sergio Paracuellos wrote:
> To allow to access system controller registers from watchdog driver code
> add a phandle in the watchdog 'wdt' node. This avoid using arch dependent
> operations in driver code.
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> ---
>   arch/mips/boot/dts/ralink/mt7621.dtsi | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
> index 5ca40fd21..764916eaf 100644
> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
> @@ -73,6 +73,7 @@ sysc: syscon@0 {
>   		wdt: wdt@100 {
>   			compatible = "mediatek,mt7621-wdt";
>   			reg = <0x100 0x100>;
> +			mediatek,sysctl = <&sysc>;
>   		};
>   
>   		gpio: gpio@600 {
Re: [PATCH v3 2/4] mips: dts: ralink: mt7621: add phandle to system controller node for watchdog
Posted by Sergio Paracuellos 2 years, 7 months ago
Hi Arınç,

On Fri, Feb 10, 2023 at 6:47 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> Could you also change the node name to watchdog@100? make dtbs_check
> points it out:
>
> wdt@100: $nodename:0: 'wdt@100' does not match '^watchdog(@.*|-[0-9a-f])?$'

Sure, let me add a small patch fixing this warning in the series.

>
> Thanks.
> Arınç

Best regards,
    Sergio Paracuellos

>
> On 10.02.2023 20:38, Sergio Paracuellos wrote:
> > To allow to access system controller registers from watchdog driver code
> > add a phandle in the watchdog 'wdt' node. This avoid using arch dependent
> > operations in driver code.
> >
> > Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
> > ---
> >   arch/mips/boot/dts/ralink/mt7621.dtsi | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
> > index 5ca40fd21..764916eaf 100644
> > --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
> > +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
> > @@ -73,6 +73,7 @@ sysc: syscon@0 {
> >               wdt: wdt@100 {
> >                       compatible = "mediatek,mt7621-wdt";
> >                       reg = <0x100 0x100>;
> > +                     mediatek,sysctl = <&sysc>;
> >               };
> >
> >               gpio: gpio@600 {