* [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible [not found] <20220307143421.1106209-1-andre.przywara@arm.com> @ 2022-03-07 14:34 ` Andre Przywara 2022-03-08 16:08 ` Rob Herring ` (2 more replies) 2022-03-07 14:34 ` [PATCH 02/14] ARM: dts: suniv: F1C100: fix watchdog compatible Andre Przywara 1 sibling, 3 replies; 7+ messages in thread From: Andre Przywara @ 2022-03-07 14:34 UTC (permalink / raw) To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland Cc: Rob Herring, Mesih Kilinc, Icenowy Zheng, Jesse Taube, Giulio Benetti, George Hilliard, devicetree, linux-arm-kernel, linux-sunxi, Wim Van Sebroeck, Guenter Roeck, linux-watchdog The F1C100 series actually features a newer generation watchdog IP, so the compatible string was wrong. Signed-off-by: Andre Przywara <andre.przywara@arm.com> --- .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml index 43afa24513b9..d90655418d0e 100644 --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml @@ -29,7 +29,7 @@ properties: - const: allwinner,sun6i-a31-wdt - items: - const: allwinner,suniv-f1c100s-wdt - - const: allwinner,sun4i-a10-wdt + - const: allwinner,sun6i-a31-wdt - const: allwinner,sun20i-d1-wdt - items: - const: allwinner,sun20i-d1-wdt-reset -- 2.25.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible 2022-03-07 14:34 ` [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible Andre Przywara @ 2022-03-08 16:08 ` Rob Herring 2022-03-09 23:02 ` Guenter Roeck 2022-03-10 0:46 ` Samuel Holland 2 siblings, 0 replies; 7+ messages in thread From: Rob Herring @ 2022-03-08 16:08 UTC (permalink / raw) To: Andre Przywara Cc: Jernej Skrabec, Chen-Yu Tsai, Giulio Benetti, Guenter Roeck, Maxime Ripard, Wim Van Sebroeck, Icenowy Zheng, Jesse Taube, George Hilliard, linux-sunxi, linux-watchdog, linux-arm-kernel, Mesih Kilinc, devicetree, Rob Herring, Samuel Holland On Mon, 07 Mar 2022 14:34:08 +0000, Andre Przywara wrote: > The F1C100 series actually features a newer generation watchdog IP, so > the compatible string was wrong. > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible 2022-03-07 14:34 ` [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible Andre Przywara 2022-03-08 16:08 ` Rob Herring @ 2022-03-09 23:02 ` Guenter Roeck 2022-03-10 0:46 ` Samuel Holland 2 siblings, 0 replies; 7+ messages in thread From: Guenter Roeck @ 2022-03-09 23:02 UTC (permalink / raw) To: Andre Przywara Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring, Mesih Kilinc, Icenowy Zheng, Jesse Taube, Giulio Benetti, George Hilliard, devicetree, linux-arm-kernel, linux-sunxi, Wim Van Sebroeck, linux-watchdog On Mon, Mar 07, 2022 at 02:34:08PM +0000, Andre Przywara wrote: > The F1C100 series actually features a newer generation watchdog IP, so > the compatible string was wrong. > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net> > --- > .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > index 43afa24513b9..d90655418d0e 100644 > --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > @@ -29,7 +29,7 @@ properties: > - const: allwinner,sun6i-a31-wdt > - items: > - const: allwinner,suniv-f1c100s-wdt > - - const: allwinner,sun4i-a10-wdt > + - const: allwinner,sun6i-a31-wdt > - const: allwinner,sun20i-d1-wdt > - items: > - const: allwinner,sun20i-d1-wdt-reset ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible 2022-03-07 14:34 ` [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible Andre Przywara 2022-03-08 16:08 ` Rob Herring 2022-03-09 23:02 ` Guenter Roeck @ 2022-03-10 0:46 ` Samuel Holland 2022-03-14 17:39 ` Andre Przywara 2 siblings, 1 reply; 7+ messages in thread From: Samuel Holland @ 2022-03-10 0:46 UTC (permalink / raw) To: Andre Przywara, Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec Cc: Rob Herring, Mesih Kilinc, Icenowy Zheng, Jesse Taube, Giulio Benetti, George Hilliard, devicetree, linux-arm-kernel, linux-sunxi, Wim Van Sebroeck, Guenter Roeck, linux-watchdog Hi Andre, On 3/7/22 8:34 AM, Andre Przywara wrote: > The F1C100 series actually features a newer generation watchdog IP, so > the compatible string was wrong. The F1C100s watchdog seems to be unique in that it uses LOSC/osc32k as its only clock source instead of HOSC/osc24M. The current binding requires that the first clock is "hosc", so it seems that the binding needs to be relaxed to allow for this case. As long as there's only one clock source available, we don't really care where it comes from. They are both divided to be approximately 32 kHz. So I don't think this difference prevents using A31 as a fallback compatible. > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > index 43afa24513b9..d90655418d0e 100644 > --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > @@ -29,7 +29,7 @@ properties: > - const: allwinner,sun6i-a31-wdt > - items: > - const: allwinner,suniv-f1c100s-wdt > - - const: allwinner,sun4i-a10-wdt > + - const: allwinner,sun6i-a31-wdt This can be combined with the enum of other compatibles that fall back to allwinner,sun6i-a31-wdt (earlier in the file). Regards, Samuel > - const: allwinner,sun20i-d1-wdt > - items: > - const: allwinner,sun20i-d1-wdt-reset > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible 2022-03-10 0:46 ` Samuel Holland @ 2022-03-14 17:39 ` Andre Przywara 0 siblings, 0 replies; 7+ messages in thread From: Andre Przywara @ 2022-03-14 17:39 UTC (permalink / raw) To: Samuel Holland Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Rob Herring, Mesih Kilinc, Icenowy Zheng, Jesse Taube, Giulio Benetti, George Hilliard, devicetree, linux-arm-kernel, linux-sunxi, Wim Van Sebroeck, Guenter Roeck, linux-watchdog On Wed, 9 Mar 2022 18:46:46 -0600 Samuel Holland <samuel@sholland.org> wrote: > Hi Andre, > > On 3/7/22 8:34 AM, Andre Przywara wrote: > > The F1C100 series actually features a newer generation watchdog IP, so > > the compatible string was wrong. > > The F1C100s watchdog seems to be unique in that it uses LOSC/osc32k as its only > clock source instead of HOSC/osc24M. The current binding requires that the first > clock is "hosc", so it seems that the binding needs to be relaxed to allow for > this case. > > As long as there's only one clock source available, we don't really care where > it comes from. They are both divided to be approximately 32 kHz. So I don't > think this difference prevents using A31 as a fallback compatible. Right, these were roughly my findings as well, but I should have written them down, at least in the commit message. So shall the binding be explicit: 1) Most SoCs required exactly one clock, the 24 MHz HOSC. 2) The F1C100s requires exactly one clock, the 32KHz LOSC. 3) R329/D1 require two clocks with clock-names? Or do you want to collapse 1) and 2) into one relaxed case? Still not entirely sure what "LOSC / 32 KHz" means for the F1C100 (32768 or 32000 Hz), or where it really comes from, but it does not seem to matter. FreeBSD, Xen and U-Boot don't care about clocks at all, and Linux always uses the first clock and just enables it, so we should be good either way. > > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > > --- > > .../devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > > index 43afa24513b9..d90655418d0e 100644 > > --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > > +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml > > @@ -29,7 +29,7 @@ properties: > > - const: allwinner,sun6i-a31-wdt > > - items: > > - const: allwinner,suniv-f1c100s-wdt > > - - const: allwinner,sun4i-a10-wdt > > + - const: allwinner,sun6i-a31-wdt > > This can be combined with the enum of other compatibles that fall back to > allwinner,sun6i-a31-wdt (earlier in the file). Oh, right, I missed that. Cheers, Andre > > Regards, > Samuel > > > - const: allwinner,sun20i-d1-wdt > > - items: > > - const: allwinner,sun20i-d1-wdt-reset > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 02/14] ARM: dts: suniv: F1C100: fix watchdog compatible [not found] <20220307143421.1106209-1-andre.przywara@arm.com> 2022-03-07 14:34 ` [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible Andre Przywara @ 2022-03-07 14:34 ` Andre Przywara 2022-03-09 23:03 ` Guenter Roeck 1 sibling, 1 reply; 7+ messages in thread From: Andre Przywara @ 2022-03-07 14:34 UTC (permalink / raw) To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland Cc: Rob Herring, Mesih Kilinc, Icenowy Zheng, Jesse Taube, Giulio Benetti, George Hilliard, devicetree, linux-arm-kernel, linux-sunxi, Wim Van Sebroeck, Guenter Roeck, linux-watchdog The F1C100 series of SoCs actually have their watchdog IP being compatible with the newer Allwinner generation, not the older one. The currently described sun4i-a10-wdt actually does not work, neither the watchdog functionality (just never fires), nor the reset part (reboot hangs). Replace the compatible string with the one used by the newer generation. Verified to work with both the watchdog and reboot functionality on a LicheePi Nano. Also add the missing interrupt line and clock source, to make it binding compliant. Fixes: 4ba16d17efdd ("ARM: dts: suniv: add initial DTSI file for F1C100s") Signed-off-by: Andre Przywara <andre.przywara@arm.com> --- arch/arm/boot/dts/suniv-f1c100s.dtsi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/suniv-f1c100s.dtsi b/arch/arm/boot/dts/suniv-f1c100s.dtsi index 6100d3b75f61..def830101448 100644 --- a/arch/arm/boot/dts/suniv-f1c100s.dtsi +++ b/arch/arm/boot/dts/suniv-f1c100s.dtsi @@ -104,8 +104,10 @@ timer@1c20c00 { wdt: watchdog@1c20ca0 { compatible = "allwinner,suniv-f1c100s-wdt", - "allwinner,sun4i-a10-wdt"; + "allwinner,sun6i-a31-wdt"; reg = <0x01c20ca0 0x20>; + interrupts = <16>; + clocks = <&osc32k>; }; uart0: serial@1c25000 { -- 2.25.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 02/14] ARM: dts: suniv: F1C100: fix watchdog compatible 2022-03-07 14:34 ` [PATCH 02/14] ARM: dts: suniv: F1C100: fix watchdog compatible Andre Przywara @ 2022-03-09 23:03 ` Guenter Roeck 0 siblings, 0 replies; 7+ messages in thread From: Guenter Roeck @ 2022-03-09 23:03 UTC (permalink / raw) To: Andre Przywara Cc: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rob Herring, Mesih Kilinc, Icenowy Zheng, Jesse Taube, Giulio Benetti, George Hilliard, devicetree, linux-arm-kernel, linux-sunxi, Wim Van Sebroeck, linux-watchdog On Mon, Mar 07, 2022 at 02:34:09PM +0000, Andre Przywara wrote: > The F1C100 series of SoCs actually have their watchdog IP being > compatible with the newer Allwinner generation, not the older one. > > The currently described sun4i-a10-wdt actually does not work, neither > the watchdog functionality (just never fires), nor the reset part > (reboot hangs). > > Replace the compatible string with the one used by the newer generation. > Verified to work with both the watchdog and reboot functionality on a > LicheePi Nano. > > Also add the missing interrupt line and clock source, to make it binding > compliant. > > Fixes: 4ba16d17efdd ("ARM: dts: suniv: add initial DTSI file for F1C100s") > Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Guenter Roeck <linux@roeck-us.net> > --- > arch/arm/boot/dts/suniv-f1c100s.dtsi | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/suniv-f1c100s.dtsi b/arch/arm/boot/dts/suniv-f1c100s.dtsi > index 6100d3b75f61..def830101448 100644 > --- a/arch/arm/boot/dts/suniv-f1c100s.dtsi > +++ b/arch/arm/boot/dts/suniv-f1c100s.dtsi > @@ -104,8 +104,10 @@ timer@1c20c00 { > > wdt: watchdog@1c20ca0 { > compatible = "allwinner,suniv-f1c100s-wdt", > - "allwinner,sun4i-a10-wdt"; > + "allwinner,sun6i-a31-wdt"; > reg = <0x01c20ca0 0x20>; > + interrupts = <16>; > + clocks = <&osc32k>; > }; > > uart0: serial@1c25000 { ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-14 17:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220307143421.1106209-1-andre.przywara@arm.com>
2022-03-07 14:34 ` [PATCH 01/14] dt-bindings: watchdog: sunxi: fix F1C100s compatible Andre Przywara
2022-03-08 16:08 ` Rob Herring
2022-03-09 23:02 ` Guenter Roeck
2022-03-10 0:46 ` Samuel Holland
2022-03-14 17:39 ` Andre Przywara
2022-03-07 14:34 ` [PATCH 02/14] ARM: dts: suniv: F1C100: fix watchdog compatible Andre Przywara
2022-03-09 23:03 ` Guenter Roeck
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).