This RTC requires a compatible, a reg and a single interrupt,
which makes it suitable for a direct conversion into trivial-rtc.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt | 15 ---------------
Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt b/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt
deleted file mode 100644
index a87a1e9bc060..000000000000
--- a/Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-* NXP LPC32xx SoC Real Time Clock controller
-
-Required properties:
-- compatible: must be "nxp,lpc3220-rtc"
-- reg: physical base address of the controller and length of memory mapped
- region.
-- interrupts: The RTC interrupt
-
-Example:
-
- rtc@40024000 {
- compatible = "nxp,lpc3220-rtc";
- reg = <0x40024000 0x1000>;
- interrupts = <52 0>;
- };
diff --git a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
index b889b9317a41..d6ce7ac29033 100644
--- a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
@@ -55,6 +55,8 @@ properties:
- microcrystal,rv3029
# Real Time Clock
- microcrystal,rv8523
+ # NXP LPC32xx SoC Real-time Clock
+ - nxp,lpc3220-rtc
# Real-time Clock Module
- pericom,pt7c4338
# I2C bus SERIAL INTERFACE REAL-TIME CLOCK IC
--
2.40.1
On 08/04/2024 17:53, Javier Carrasco wrote: > This RTC requires a compatible, a reg and a single interrupt, > which makes it suitable for a direct conversion into trivial-rtc. > > Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> > --- > Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt | 15 --------------- > Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++ > 2 files changed, 2 insertions(+), 15 deletions(-) This one no... and if you tested DTS you would see errors, although you need to test specific lpc config, not multi_v7. It does not look like you tested the DTS against bindings. Please run `make dtbs_check W=1` (see Documentation/devicetree/bindings/writing-schema.rst or https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/ for instructions). Anyway, you *must* check all DTS before moving anything to trivial. Does it mean all other bindings were not checked against DTS at all? Best regards, Krzysztof
On 4/9/24 09:34, Krzysztof Kozlowski wrote: > On 08/04/2024 17:53, Javier Carrasco wrote: >> This RTC requires a compatible, a reg and a single interrupt, >> which makes it suitable for a direct conversion into trivial-rtc. >> >> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> >> --- >> Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt | 15 --------------- >> Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++ >> 2 files changed, 2 insertions(+), 15 deletions(-) > > This one no... and if you tested DTS you would see errors, although you > need to test specific lpc config, not multi_v7. > > It does not look like you tested the DTS against bindings. Please run > `make dtbs_check W=1` (see > Documentation/devicetree/bindings/writing-schema.rst or > https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/ > for instructions). > > Anyway, you *must* check all DTS before moving anything to trivial. > > Does it mean all other bindings were not checked against DTS at all? > > Best regards, > Krzysztof > Hi, I did check the conversion against nxp/lpc/lpc3250-phy3250.dts, which throws a message about the 'clocks' property. That property is not documented in the original binding, and even though it could be missing, I could not find any function to get a clock (i.e. any form of clk_get()) in rtc-lpc32xx.c, which is the only file where the compatible can be found. Is therefore the property not useless in the dts? My apologies if I am missing something here. Thanks and best regards, Javier Carrasco
On 09/04/2024 10:52:54+0200, Javier Carrasco wrote: > On 4/9/24 09:34, Krzysztof Kozlowski wrote: > > On 08/04/2024 17:53, Javier Carrasco wrote: > >> This RTC requires a compatible, a reg and a single interrupt, > >> which makes it suitable for a direct conversion into trivial-rtc. > >> > >> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> > >> --- > >> Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt | 15 --------------- > >> Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++ > >> 2 files changed, 2 insertions(+), 15 deletions(-) > > > > This one no... and if you tested DTS you would see errors, although you > > need to test specific lpc config, not multi_v7. > > > > It does not look like you tested the DTS against bindings. Please run > > `make dtbs_check W=1` (see > > Documentation/devicetree/bindings/writing-schema.rst or > > https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/ > > for instructions). > > > > Anyway, you *must* check all DTS before moving anything to trivial. > > > > Does it mean all other bindings were not checked against DTS at all? > > > > Best regards, > > Krzysztof > > > Hi, > > I did check the conversion against nxp/lpc/lpc3250-phy3250.dts, which > throws a message about the 'clocks' property. > > That property is not documented in the original binding, and even though > it could be missing, I could not find any function to get a clock (i.e. > any form of clk_get()) in rtc-lpc32xx.c, which is the only file where > the compatible can be found. > > Is therefore the property not useless in the dts? My apologies if I am > missing something here. The bindings doesn't document the driver but the hardware. In this case, the only input clock seems to be a 32kHz crystal. > > Thanks and best regards, > Javier Carrasco -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
On 09/04/2024 10:52, Javier Carrasco wrote: > On 4/9/24 09:34, Krzysztof Kozlowski wrote: >> On 08/04/2024 17:53, Javier Carrasco wrote: >>> This RTC requires a compatible, a reg and a single interrupt, >>> which makes it suitable for a direct conversion into trivial-rtc. >>> >>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> >>> --- >>> Documentation/devicetree/bindings/rtc/lpc32xx-rtc.txt | 15 --------------- >>> Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++ >>> 2 files changed, 2 insertions(+), 15 deletions(-) >> >> This one no... and if you tested DTS you would see errors, although you >> need to test specific lpc config, not multi_v7. >> >> It does not look like you tested the DTS against bindings. Please run >> `make dtbs_check W=1` (see >> Documentation/devicetree/bindings/writing-schema.rst or >> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/ >> for instructions). >> >> Anyway, you *must* check all DTS before moving anything to trivial. >> >> Does it mean all other bindings were not checked against DTS at all? >> >> Best regards, >> Krzysztof >> > Hi, > > I did check the conversion against nxp/lpc/lpc3250-phy3250.dts, which > throws a message about the 'clocks' property. > > That property is not documented in the original binding, and even though > it could be missing, I could not find any function to get a clock (i.e. Old bindings are not really accurate. > any form of clk_get()) in rtc-lpc32xx.c, which is the only file where > the compatible can be found. > > Is therefore the property not useless in the dts? My apologies if I am > missing something here. Useless for whom? For Linux yes. For U-Boot or out-of-tree users of DTS, I don't know. Anyway the true question is if there is a clock or there is no. If there is a clock, then it should be in the binding even if Linux driver does not use it. I propose to add it and be done with it. Best regards, Krzysztof
© 2016 - 2026 Red Hat, Inc.