Message ID | 20240721170840.15569-4-five231003@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ti: davinci, keystone: txt to yaml | expand |
On 21/07/2024 18:28, Kousik Sanagavarapu wrote: > Using "wdt" instead of "watchdog" for watchdog timer nodes doesn't allow > for validation with the corresponding dtschema and gives errors > > $ make CHECK_DTBS=y DT_SCHEMA_FILES=ti,davinci-wdt.yaml \ > ti/keystone/keystone-k2g-ice.dtb > > DTC_CHK arch/arm/boot/dts/ti/keystone/keystone-k2g-ice.dtb > arch/arm/boot/dts/ti/keystone/keystone-k2g-ice.dtb: > wdt@02250000: $nodename:0: 'wdt@02250000' does not match > '^(timer|watchdog)(@.*|-([0-9]|[1-9][0-9]+))?$' > from schema $id: > http://devicetree.org/schemas/watchdog/ti,davinci-wdt.yaml# > > Therefore change "wdt@" to "watchdog@". > > While at it, remove "ti,davinci-wdt" compatible from the keystone dts > code. That's entirely unrelated patch. Don't mix simple cleanups with patches affecting ABI and users. Also, explain why. > > Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> > --- Best regards, Krzysztof
On Mon, Jul 22, 2024 at 10:13:59AM +0200, Krzysztof Kozlowski wrote: > On 21/07/2024 18:28, Kousik Sanagavarapu wrote: > > Using "wdt" instead of "watchdog" for watchdog timer nodes doesn't allow > > for validation with the corresponding dtschema and gives errors > > > > [...] > > > That's entirely unrelated patch. Don't mix simple cleanups with patches > affecting ABI and users. Also, explain why. Got it. Will submit v2 as a seperate patch, outside of this series. Thanks
On 22/07/2024 15:21, Kousik Sanagavarapu wrote: > On Mon, Jul 22, 2024 at 10:13:59AM +0200, Krzysztof Kozlowski wrote: >> On 21/07/2024 18:28, Kousik Sanagavarapu wrote: >>> Using "wdt" instead of "watchdog" for watchdog timer nodes doesn't allow >>> for validation with the corresponding dtschema and gives errors >>> >>> [...] >>> >> That's entirely unrelated patch. Don't mix simple cleanups with patches >> affecting ABI and users. Also, explain why. > > Got it. Will submit v2 as a seperate patch, outside of this series. ... and carefully re-think why. I am 99% sure your patch breaks the users. Better if you test your changes. Conversion of the bindings is a task which requires to know how DTS works. Best regards, Krzysztof
diff --git a/arch/arm/boot/dts/ti/davinci/da850.dtsi b/arch/arm/boot/dts/ti/davinci/da850.dtsi index 1d3fb5397ce3..89055ab87256 100644 --- a/arch/arm/boot/dts/ti/davinci/da850.dtsi +++ b/arch/arm/boot/dts/ti/davinci/da850.dtsi @@ -525,7 +525,7 @@ clocksource: timer@20000 { interrupt-names = "tint12", "tint34"; clocks = <&pll0_auxclk>; }; - wdt: wdt@21000 { + wdt: watchdog@21000 { compatible = "ti,davinci-wdt"; reg = <0x21000 0x1000>; clocks = <&pll0_auxclk>; diff --git a/arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi b/arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi index dafe485dfe19..884402a5fe4a 100644 --- a/arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi +++ b/arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi @@ -610,8 +610,8 @@ spi3: spi@21806000 { clocks = <&k2g_clks 0x0013 0>; }; - wdt: wdt@02250000 { - compatible = "ti,keystone-wdt", "ti,davinci-wdt"; + wdt: watchdog@02250000 { + compatible = "ti,keystone-wdt"; reg = <0x02250000 0x80>; power-domains = <&k2g_pds 0x22>; clocks = <&k2g_clks 0x22 0>; diff --git a/arch/arm/boot/dts/ti/keystone/keystone.dtsi b/arch/arm/boot/dts/ti/keystone/keystone.dtsi index ff16428860a9..f697f27edcfc 100644 --- a/arch/arm/boot/dts/ti/keystone/keystone.dtsi +++ b/arch/arm/boot/dts/ti/keystone/keystone.dtsi @@ -225,8 +225,8 @@ usb0: usb@2690000 { }; }; - wdt: wdt@22f0080 { - compatible = "ti,keystone-wdt","ti,davinci-wdt"; + wdt: watchdog@22f0080 { + compatible = "ti,keystone-wdt"; reg = <0x022f0080 0x80>; clocks = <&clkwdtimer0>; };
Using "wdt" instead of "watchdog" for watchdog timer nodes doesn't allow for validation with the corresponding dtschema and gives errors $ make CHECK_DTBS=y DT_SCHEMA_FILES=ti,davinci-wdt.yaml \ ti/keystone/keystone-k2g-ice.dtb DTC_CHK arch/arm/boot/dts/ti/keystone/keystone-k2g-ice.dtb arch/arm/boot/dts/ti/keystone/keystone-k2g-ice.dtb: wdt@02250000: $nodename:0: 'wdt@02250000' does not match '^(timer|watchdog)(@.*|-([0-9]|[1-9][0-9]+))?$' from schema $id: http://devicetree.org/schemas/watchdog/ti,davinci-wdt.yaml# Therefore change "wdt@" to "watchdog@". While at it, remove "ti,davinci-wdt" compatible from the keystone dts code. Signed-off-by: Kousik Sanagavarapu <five231003@gmail.com> --- Question: Should "wdt@" be changed everywhere in the dts code or is it only a requirement of validation against dtschema? Also, I'm not sure about removing "ti,davinci-wdt" from the keystone dts code. I'm thinking it is only there so that the driver code can get information from keystone nodes too, because it seems that there is no code for ti,keystone-wdt. So question, - Is WDT Controller driver for keystone not written yet? Or - Does the WDT Controller driver for keystone have the same functionality as one on davinci - hence leading us to simply do .compatible = "ti,keystone-wdt" ? arch/arm/boot/dts/ti/davinci/da850.dtsi | 2 +- arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi | 4 ++-- arch/arm/boot/dts/ti/keystone/keystone.dtsi | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)