* Re: [PATCH 00/43] ep93xx device tree conversion
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
@ 2023-04-24 11:31 ` Arnd Bergmann
[not found] ` <20230424152933.48b2ede1@kernel.org>
2023-04-24 12:34 ` [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx Nikita Shubin
` (9 subsequent siblings)
10 siblings, 1 reply; 30+ messages in thread
From: Arnd Bergmann @ 2023-04-24 11:31 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
David S . Miller, Jonathan Neuschäfer, Russell King,
Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
Alexandre Belloni, Andy Shevchenko, Bartosz Golaszewski,
Brian Norris, Chuanhong Guo, Conor.Dooley, Damien Le Moal,
Daniel Lezcano, Dmitry Torokhov, Emil Renner Berthing,
Eric Dumazet, Florian Fainelli, Guenter Roeck, Hartley Sweeten,
Heiko Stübner, Hitomi Hasegawa, Jakub Kicinski,
Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
Krzysztof Kozlowski, Damien Le Moal, Liam Girdwood, Liang Yang,
Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
Masahiro Yamada, Michael Turquette, Miquel Raynal,
Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
linux-arm-kernel, linux-clk, open list:GPIO SUBSYSTEM, linux-ide,
linux-input, linux-kernel, linux-mtd, linux-pm, linux-pwm,
linux-rtc, linux-spi, linux-watchdog, Netdev, soc
On Mon, Apr 24, 2023, at 14:34, Nikita Shubin wrote:
> This series aims to convert ep93xx from platform to full device tree support.
>
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
>
> Thank you Linus and Arnd for your support, review and comments, sorry
> if i missed something -
> these series are quite big for me.
>
> Big thanks to Alexander Sverdlin for his testing, support, review,
> fixes and patches.
Thanks a lot for your continued work. I can't merge any of this at
the moment since the upstream merge window just opened, but I'm
happy to take this all through the soc tree for 6.5, provided we
get the sufficient Acks from the subsystem maintainers. Merging
it through each individual tree would take a lot longer, so I
hope we can avoid that.
Arnd
^ permalink raw reply [flat|nested] 30+ messages in thread* [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
2023-04-24 11:31 ` Arnd Bergmann
@ 2023-04-24 12:34 ` Nikita Shubin
2023-04-24 10:08 ` Alexandre Belloni
2023-04-25 9:28 ` Krzysztof Kozlowski
2023-04-24 12:34 ` [PATCH 08/43] rtc: ep93xx: add DT support " Nikita Shubin
` (8 subsequent siblings)
10 siblings, 2 replies; 30+ messages in thread
From: Nikita Shubin @ 2023-04-24 12:34 UTC (permalink / raw)
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, Hartley Sweeten, linux-rtc, devicetree,
linux-kernel
This adds device tree bindings for the Cirrus Logic EP93xx
RTC block used in these SoCs.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
.../bindings/rtc/cirrus,ep93xx-rtc.yaml | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
diff --git a/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
new file mode 100644
index 000000000000..d4774e984e7b
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
@@ -0,0 +1,32 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/cirrus,ep93xx-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus EP93xx Real Time Clock controller
+
+maintainers:
+ - Hartley Sweeten <hsweeten@visionengravers.com>
+ - Alexander Sverdlin <alexander.sverdlin@gmail.com>
+
+properties:
+ compatible:
+ const: cirrus,ep9301-rtc
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ rtc0: rtc@80920000 {
+ compatible = "cirrus,ep9301-rtc";
+ reg = <0x80920000 0x100>;
+ };
+
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread* Re: [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx
2023-04-24 12:34 ` [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx Nikita Shubin
@ 2023-04-24 10:08 ` Alexandre Belloni
2023-04-25 9:28 ` Krzysztof Kozlowski
1 sibling, 0 replies; 30+ messages in thread
From: Alexandre Belloni @ 2023-04-24 10:08 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Rob Herring, Krzysztof Kozlowski,
Hartley Sweeten, linux-rtc, devicetree, linux-kernel
On 24/04/2023 15:34:23+0300, Nikita Shubin wrote:
> This adds device tree bindings for the Cirrus Logic EP93xx
> RTC block used in these SoCs.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
> .../bindings/rtc/cirrus,ep93xx-rtc.yaml | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
>
> diff --git a/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
> new file mode 100644
> index 000000000000..d4774e984e7b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
I guess this one should go in .Documentation/devicetree/bindings/rtc/trivial-rtc.yaml?
> @@ -0,0 +1,32 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/cirrus,ep93xx-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus EP93xx Real Time Clock controller
> +
> +maintainers:
> + - Hartley Sweeten <hsweeten@visionengravers.com>
> + - Alexander Sverdlin <alexander.sverdlin@gmail.com>
> +
> +properties:
> + compatible:
> + const: cirrus,ep9301-rtc
> +
> + reg:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + rtc0: rtc@80920000 {
> + compatible = "cirrus,ep9301-rtc";
> + reg = <0x80920000 0x100>;
> + };
> +
> --
> 2.39.2
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 30+ messages in thread* Re: [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx
2023-04-24 12:34 ` [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx Nikita Shubin
2023-04-24 10:08 ` Alexandre Belloni
@ 2023-04-25 9:28 ` Krzysztof Kozlowski
2023-04-28 14:35 ` Nikita Shubin
1 sibling, 1 reply; 30+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-25 9:28 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, Hartley Sweeten, linux-rtc, devicetree,
linux-kernel
On 24/04/2023 14:34, Nikita Shubin wrote:
> This adds device tree bindings for the Cirrus Logic EP93xx
> RTC block used in these SoCs.
Thank you for your patch. There is something to discuss/improve.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
> .../bindings/rtc/cirrus,ep93xx-rtc.yaml | 32 +++++++++++++++++++
> 1 file changed, 32 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
>
> diff --git a/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
> new file mode 100644
> index 000000000000..d4774e984e7b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
> @@ -0,0 +1,32 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/cirrus,ep93xx-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus EP93xx Real Time Clock controller
> +
> +maintainers:
> + - Hartley Sweeten <hsweeten@visionengravers.com>
> + - Alexander Sverdlin <alexander.sverdlin@gmail.com>
> +
> +properties:
> + compatible:
> + const: cirrus,ep9301-rtc
Why only one compatible? What about ep9307 and ep9312? The same question
for your previous patch - timer.
Anyway, if you want to keep it like that, then filename should match
compatible. Or merge it into trivial-rtc like Alexandre suggested.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx
2023-04-25 9:28 ` Krzysztof Kozlowski
@ 2023-04-28 14:35 ` Nikita Shubin
2023-04-28 12:21 ` Krzysztof Kozlowski
0 siblings, 1 reply; 30+ messages in thread
From: Nikita Shubin @ 2023-04-28 14:35 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, Rob Herring, Hartley Sweeten,
linux-rtc, devicetree, linux-kernel
On Tue, 2023-04-25 at 11:28 +0200, Krzysztof Kozlowski wrote:
> On 24/04/2023 14:34, Nikita Shubin wrote:
> > This adds device tree bindings for the Cirrus Logic EP93xx
> > RTC block used in these SoCs.
>
> Thank you for your patch. There is something to discuss/improve.
>
> >
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> > .../bindings/rtc/cirrus,ep93xx-rtc.yaml | 32
> > +++++++++++++++++++
> > 1 file changed, 32 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-
> > rtc.yaml b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-
> > rtc.yaml
> > new file mode 100644
> > index 000000000000..d4774e984e7b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
> > @@ -0,0 +1,32 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/rtc/cirrus,ep93xx-rtc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Cirrus EP93xx Real Time Clock controller
> > +
> > +maintainers:
> > + - Hartley Sweeten <hsweeten@visionengravers.com>
> > + - Alexander Sverdlin <alexander.sverdlin@gmail.com>
> > +
> > +properties:
> > + compatible:
> > + const: cirrus,ep9301-rtc
>
> Why only one compatible? What about ep9307 and ep9312? The same
> question
> for your previous patch - timer.
>
> Anyway, if you want to keep it like that, then filename should match
> compatible. Or merge it into trivial-rtc like Alexandre suggested.
I think i should move it to trivial-rtc - there is no need for a
separate file.
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx
2023-04-28 14:35 ` Nikita Shubin
@ 2023-04-28 12:21 ` Krzysztof Kozlowski
0 siblings, 0 replies; 30+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-28 12:21 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, Rob Herring, Hartley Sweeten,
linux-rtc, devicetree, linux-kernel
On 28/04/2023 16:35, Nikita Shubin wrote:
> On Tue, 2023-04-25 at 11:28 +0200, Krzysztof Kozlowski wrote:
>> On 24/04/2023 14:34, Nikita Shubin wrote:
>>> This adds device tree bindings for the Cirrus Logic EP93xx
>>> RTC block used in these SoCs.
>>
>> Thank you for your patch. There is something to discuss/improve.
>>
>>>
>>> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
>>> ---
>>> .../bindings/rtc/cirrus,ep93xx-rtc.yaml | 32
>>> +++++++++++++++++++
>>> 1 file changed, 32 insertions(+)
>>> create mode 100644
>>> Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
>>>
>>> diff --git a/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-
>>> rtc.yaml b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-
>>> rtc.yaml
>>> new file mode 100644
>>> index 000000000000..d4774e984e7b
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
>>> @@ -0,0 +1,32 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/rtc/cirrus,ep93xx-rtc.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Cirrus EP93xx Real Time Clock controller
>>> +
>>> +maintainers:
>>> + - Hartley Sweeten <hsweeten@visionengravers.com>
>>> + - Alexander Sverdlin <alexander.sverdlin@gmail.com>
>>> +
>>> +properties:
>>> + compatible:
>>> + const: cirrus,ep9301-rtc
>>
>> Why only one compatible? What about ep9307 and ep9312? The same
>> question
>> for your previous patch - timer.
>>
>> Anyway, if you want to keep it like that, then filename should match
>> compatible. Or merge it into trivial-rtc like Alexandre suggested.
>
> I think i should move it to trivial-rtc - there is no need for a
> separate file.
If you add missing compatibles, you won't be able to move it easily to
trivial-rtc.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 08/43] rtc: ep93xx: add DT support for Cirrus EP93xx
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
2023-04-24 11:31 ` Arnd Bergmann
2023-04-24 12:34 ` [PATCH 07/43] dt-bindings: rtc: add DT bindings for Cirrus EP93xx Nikita Shubin
@ 2023-04-24 12:34 ` Nikita Shubin
2023-04-24 15:56 ` Rob Herring
2023-04-24 12:34 ` [PATCH 28/43] dt-bindings: rtc: Add DT binding m48t86 rtc Nikita Shubin
` (7 subsequent siblings)
10 siblings, 1 reply; 30+ messages in thread
From: Nikita Shubin @ 2023-04-24 12:34 UTC (permalink / raw)
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, linux-rtc, linux-kernel
- Find register range from the device tree.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
Arnd Bergmann:
- wildcards ep93xx to something meaningful, i.e. ep9301
- drop wrappers
drivers/rtc/rtc-ep93xx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index acae7f16808f..8bda20a4940a 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -8,6 +8,7 @@
#include <linux/module.h>
#include <linux/rtc.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/gfp.h>
@@ -148,9 +149,16 @@ static int ep93xx_rtc_probe(struct platform_device *pdev)
return devm_rtc_register_device(ep93xx_rtc->rtc);
}
+static const struct of_device_id ep93xx_rtc_of_ids[] = {
+ { .compatible = "cirrus,ep9301-rtc" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, ep93xx_rtc_of_ids);
+
static struct platform_driver ep93xx_rtc_driver = {
.driver = {
.name = "ep93xx-rtc",
+ .of_match_table = ep93xx_rtc_of_ids,
},
.probe = ep93xx_rtc_probe,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread* Re: [PATCH 08/43] rtc: ep93xx: add DT support for Cirrus EP93xx
2023-04-24 12:34 ` [PATCH 08/43] rtc: ep93xx: add DT support " Nikita Shubin
@ 2023-04-24 15:56 ` Rob Herring
0 siblings, 0 replies; 30+ messages in thread
From: Rob Herring @ 2023-04-24 15:56 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, linux-rtc, linux-kernel
On Mon, Apr 24, 2023 at 03:34:24PM +0300, Nikita Shubin wrote:
> - Find register range from the device tree.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>
> Notes:
> Arnd Bergmann:
> - wildcards ep93xx to something meaningful, i.e. ep9301
> - drop wrappers
>
> drivers/rtc/rtc-ep93xx.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
> index acae7f16808f..8bda20a4940a 100644
> --- a/drivers/rtc/rtc-ep93xx.c
> +++ b/drivers/rtc/rtc-ep93xx.c
> @@ -8,6 +8,7 @@
>
> #include <linux/module.h>
> #include <linux/rtc.h>
> +#include <linux/of.h>
linux/mod_devicetable.h is the actual header you depend on.
> #include <linux/platform_device.h>
> #include <linux/io.h>
> #include <linux/gfp.h>
> @@ -148,9 +149,16 @@ static int ep93xx_rtc_probe(struct platform_device *pdev)
> return devm_rtc_register_device(ep93xx_rtc->rtc);
> }
>
> +static const struct of_device_id ep93xx_rtc_of_ids[] = {
> + { .compatible = "cirrus,ep9301-rtc" },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, ep93xx_rtc_of_ids);
> +
> static struct platform_driver ep93xx_rtc_driver = {
> .driver = {
> .name = "ep93xx-rtc",
> + .of_match_table = ep93xx_rtc_of_ids,
> },
> .probe = ep93xx_rtc_probe,
> };
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 28/43] dt-bindings: rtc: Add DT binding m48t86 rtc
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (2 preceding siblings ...)
2023-04-24 12:34 ` [PATCH 08/43] rtc: ep93xx: add DT support " Nikita Shubin
@ 2023-04-24 12:34 ` Nikita Shubin
2023-04-24 16:25 ` Rob Herring
2023-04-24 12:34 ` [PATCH 29/43] rtc: m48t86: add DT support for m48t86 Nikita Shubin
` (6 subsequent siblings)
10 siblings, 1 reply; 30+ messages in thread
From: Nikita Shubin @ 2023-04-24 12:34 UTC (permalink / raw)
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, linux-rtc, devicetree, linux-kernel
Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
.../bindings/rtc/dallas,rtc-m48t86.yaml | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
diff --git a/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
new file mode 100644
index 000000000000..51f98bdbc385
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/dallas,rtc-m48t86.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST M48T86 / Dallas DS12887 RTC bindings
+
+maintainers:
+ - Alessandro Zummo <a.zummo@towertech.it>
+
+properties:
+ compatible:
+ const: dallas,rtc-m48t86
+
+ reg:
+ maxItems: 2
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ rtc1: rtc@10800000 {
+ compatible = "dallas,rtc-m48t86";
+ reg = <0x10800000 0x1>, <0x11700000 0x1>;
+ };
+
+...
+
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread* Re: [PATCH 28/43] dt-bindings: rtc: Add DT binding m48t86 rtc
2023-04-24 12:34 ` [PATCH 28/43] dt-bindings: rtc: Add DT binding m48t86 rtc Nikita Shubin
@ 2023-04-24 16:25 ` Rob Herring
2023-04-24 16:40 ` Alexandre Belloni
0 siblings, 1 reply; 30+ messages in thread
From: Rob Herring @ 2023-04-24 16:25 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, Krzysztof Kozlowski,
linux-rtc, devicetree, linux-kernel
On Mon, Apr 24, 2023 at 03:34:44PM +0300, Nikita Shubin wrote:
> Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
> .../bindings/rtc/dallas,rtc-m48t86.yaml | 33 +++++++++++++++++++
> 1 file changed, 33 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
>
> diff --git a/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> new file mode 100644
> index 000000000000..51f98bdbc385
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> @@ -0,0 +1,33 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/dallas,rtc-m48t86.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ST M48T86 / Dallas DS12887 RTC bindings
> +
> +maintainers:
> + - Alessandro Zummo <a.zummo@towertech.it>
> +
> +properties:
> + compatible:
> + const: dallas,rtc-m48t86
'rtc-' is redundant. And haven't you mixed up the vendor and part
number? It should be dallas,ds12887 and/or st,m48t86?
This can probably go in the trivial rtc binding.
> +
> + reg:
> + maxItems: 2
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + rtc1: rtc@10800000 {
Drop unused labels.
> + compatible = "dallas,rtc-m48t86";
> + reg = <0x10800000 0x1>, <0x11700000 0x1>;
> + };
> +
> +...
> +
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 30+ messages in thread* Re: [PATCH 28/43] dt-bindings: rtc: Add DT binding m48t86 rtc
2023-04-24 16:25 ` Rob Herring
@ 2023-04-24 16:40 ` Alexandre Belloni
0 siblings, 0 replies; 30+ messages in thread
From: Alexandre Belloni @ 2023-04-24 16:40 UTC (permalink / raw)
To: Rob Herring
Cc: Nikita Shubin, Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Krzysztof Kozlowski, linux-rtc, devicetree,
linux-kernel
On 24/04/2023 11:25:48-0500, Rob Herring wrote:
> On Mon, Apr 24, 2023 at 03:34:44PM +0300, Nikita Shubin wrote:
> > Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.
> >
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> > .../bindings/rtc/dallas,rtc-m48t86.yaml | 33 +++++++++++++++++++
> > 1 file changed, 33 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> > new file mode 100644
> > index 000000000000..51f98bdbc385
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
> > @@ -0,0 +1,33 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/rtc/dallas,rtc-m48t86.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ST M48T86 / Dallas DS12887 RTC bindings
> > +
> > +maintainers:
> > + - Alessandro Zummo <a.zummo@towertech.it>
> > +
> > +properties:
> > + compatible:
> > + const: dallas,rtc-m48t86
>
> 'rtc-' is redundant. And haven't you mixed up the vendor and part
> number? It should be dallas,ds12887 and/or st,m48t86?
>
> This can probably go in the trivial rtc binding.
>
I was wonderign, is this trivial, even with two regs?
> > +
> > + reg:
> > + maxItems: 2
> > +
> > +required:
> > + - compatible
> > + - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + rtc1: rtc@10800000 {
>
> Drop unused labels.
>
> > + compatible = "dallas,rtc-m48t86";
> > + reg = <0x10800000 0x1>, <0x11700000 0x1>;
> > + };
> > +
> > +...
> > +
> > --
> > 2.39.2
> >
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 29/43] rtc: m48t86: add DT support for m48t86
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (3 preceding siblings ...)
2023-04-24 12:34 ` [PATCH 28/43] dt-bindings: rtc: Add DT binding m48t86 rtc Nikita Shubin
@ 2023-04-24 12:34 ` Nikita Shubin
2023-04-24 9:47 ` Arnd Bergmann
[not found] ` <ZEkozMAM674O2r7e@surfacebook>
2023-04-26 20:56 ` [PATCH 00/43] ep93xx device tree conversion Linus Walleij
` (5 subsequent siblings)
10 siblings, 2 replies; 30+ messages in thread
From: Nikita Shubin @ 2023-04-24 12:34 UTC (permalink / raw)
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, linux-rtc, linux-kernel
- get regs from device tree
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
drivers/rtc/rtc-m48t86.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index 481c9525b1dd..d65727ac283a 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -15,6 +15,7 @@
#include <linux/platform_device.h>
#include <linux/bcd.h>
#include <linux/io.h>
+#include <linux/of.h>
#define M48T86_SEC 0x00
#define M48T86_SECALRM 0x01
@@ -269,9 +270,18 @@ static int m48t86_rtc_probe(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id m48t86_rtc_of_ids[] = {
+ { .compatible = "dallas,rtc-m48t86" },
+ { /* end of table */ },
+};
+MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids);
+#endif
+
static struct platform_driver m48t86_rtc_platform_driver = {
.driver = {
.name = "rtc-m48t86",
+ .of_match_table = of_match_ptr(m48t86_rtc_of_ids),
},
.probe = m48t86_rtc_probe,
};
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread* Re: [PATCH 29/43] rtc: m48t86: add DT support for m48t86
2023-04-24 12:34 ` [PATCH 29/43] rtc: m48t86: add DT support for m48t86 Nikita Shubin
@ 2023-04-24 9:47 ` Arnd Bergmann
[not found] ` <ZEkozMAM674O2r7e@surfacebook>
1 sibling, 0 replies; 30+ messages in thread
From: Arnd Bergmann @ 2023-04-24 9:47 UTC (permalink / raw)
To: Nikita Shubin
Cc: Linus Walleij, Alexander Sverdlin, Alessandro Zummo,
Alexandre Belloni, linux-rtc, linux-kernel
On Mon, Apr 24, 2023, at 14:34, Nikita Shubin wrote:
> - get regs from device tree
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id m48t86_rtc_of_ids[] = {
> + { .compatible = "dallas,rtc-m48t86" },
> + { /* end of table */ },
> +};
> +MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids);
> +#endif
> +
> static struct platform_driver m48t86_rtc_platform_driver = {
> .driver = {
> .name = "rtc-m48t86",
> + .of_match_table = of_match_ptr(m48t86_rtc_of_ids),
> },
> .probe = m48t86_rtc_probe,
If you end up doing another revision, I'd suggest you drop the
of_match_ptr() and the #ifdef: there is no point in saving a
few bytes of space for non-DT kernel builds if both the machines
that use this device always rquire CONFIG_OF to be enabled.
Arnd
^ permalink raw reply [flat|nested] 30+ messages in thread[parent not found: <ZEkozMAM674O2r7e@surfacebook>]
* Re: [PATCH 29/43] rtc: m48t86: add DT support for m48t86
[not found] ` <ZEkozMAM674O2r7e@surfacebook>
@ 2023-04-28 14:31 ` Nikita Shubin
0 siblings, 0 replies; 30+ messages in thread
From: Nikita Shubin @ 2023-04-28 14:31 UTC (permalink / raw)
To: andy.shevchenko
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
Alessandro Zummo, Alexandre Belloni, linux-rtc, linux-kernel
On Wed, 2023-04-26 at 16:36 +0300, andy.shevchenko@gmail.com wrote:
> Mon, Apr 24, 2023 at 03:34:45PM +0300, Nikita Shubin kirjoitti:
> > - get regs from device tree
>
> ...
>
> > +#include <linux/of.h>
>
> mod_devicetable.h and drop ugly ifdeffery along with of_match_ptr().
>
> ...
>
> > +static const struct of_device_id m48t86_rtc_of_ids[] = {
> > + { .compatible = "dallas,rtc-m48t86" },
> > + { /* end of table */ },
>
> No comma for the terminator entry
>
> > +};
>
Thanks you for all your comments and effort!
All will be fixed conforming your comments.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 00/43] ep93xx device tree conversion
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (4 preceding siblings ...)
2023-04-24 12:34 ` [PATCH 29/43] rtc: m48t86: add DT support for m48t86 Nikita Shubin
@ 2023-04-26 20:56 ` Linus Walleij
[not found] ` <b5396ef5-3fed-4e98-8f37-a9cd4473bddc@sirena.org.uk>
2023-05-16 3:47 ` Florian Fainelli
` (4 subsequent siblings)
10 siblings, 1 reply; 30+ messages in thread
From: Linus Walleij @ 2023-04-26 20:56 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, David S. Miller,
Jonathan Neuschäfer, Russell King (Oracle),
Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
Emil Renner Berthing, Eric Dumazet, Florian Fainelli,
Guenter Roeck, Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa,
Jakub Kicinski, Jaroslav Kysela, Jean Delvare, Joel Stanley,
Jonathan Cameron, Krzysztof Kozlowski, Le Moal, Liam Girdwood,
Liang Yang, Lukasz Majewski, Lv Ruyi, Mark Brown, Masahiro Yamada,
Michael Turquette, Miquel Raynal, Nathan Chancellor,
Nick Desaulniers, Nicolas Saenz Julienne, Olof Johansson,
Paolo Abeni, Qin Jian, Richard Weinberger, Rob Herring,
Robert Jarzmik, Russell King, Sebastian Reichel, Sergey Shtylyov,
Stephen Boyd, Sumanth Korikkar, Sven Peter, Takashi Iwai,
Thierry Reding, Thomas Gleixner, Ulf Hansson, Vasily Gorbik,
Vignesh Raghavendra, Vinod Koul, Walker Chen, Wim Van Sebroeck,
Yinbo Zhu, alsa-devel, devicetree, dmaengine, linux-arm-kernel,
linux-clk, linux-gpio, linux-ide, linux-input, linux-kernel,
linux-mtd, linux-pm, linux-pwm, linux-rtc, linux-spi,
linux-watchdog, netdev, soc
On Mon, Apr 24, 2023 at 11:35 AM Nikita Shubin
<nikita.shubin@maquefel.me> wrote:
> This series aims to convert ep93xx from platform to full device tree support.
>
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
Neat, I'd say let's merge this for 6.5 once the final rough edges are
off. The DT bindings should be easy to fix.
This is a big patch set and the improvement to the ARM kernel it
brings is great, so I am a bit worried about over-review stalling the
merged. If there start to be nitpicky comments I would prefer that
we merge it and let minor comments and "nice-to-haves" be
addressed in-tree during the development cycle.
I encourage you to use b4 to manage the patch series if you
have time to learn it, it could help you:
https://people.kernel.org/monsieuricon/sending-a-kernel-patch-with-b4-part-1
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 30+ messages in thread* Re: [PATCH 00/43] ep93xx device tree conversion
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (5 preceding siblings ...)
2023-04-26 20:56 ` [PATCH 00/43] ep93xx device tree conversion Linus Walleij
@ 2023-05-16 3:47 ` Florian Fainelli
2023-05-16 10:37 ` Nikita Shubin
2023-06-01 5:34 ` [PATCH v1 10/43] dt-bindings: rtc: Add Cirrus EP93xx Nikita Shubin
` (3 subsequent siblings)
10 siblings, 1 reply; 30+ messages in thread
From: Florian Fainelli @ 2023-05-16 3:47 UTC (permalink / raw)
To: Nikita Shubin
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, David S. Miller,
Jonathan Neuschäfer, Russell King (Oracle),
Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
Emil Renner Berthing, Eric Dumazet, Guenter Roeck,
Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa, Jakub Kicinski,
Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
Krzysztof Kozlowski, Le Moal, Liam Girdwood, Liang Yang,
Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
Masahiro Yamada, Michael Turquette, Miquel Raynal,
Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
linux-spi, linux-watchdog, netdev, soc
On 4/24/2023 5:34 AM, Nikita Shubin wrote:
> This series aims to convert ep93xx from platform to full device tree support.
>
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
>
> Thank you Linus and Arnd for your support, review and comments, sorry if i missed something -
> these series are quite big for me.
>
> Big thanks to Alexander Sverdlin for his testing, support, review, fixes and patches.
If anyone is interested I still have a TS-7300 board [1] that is fully
functional and could be sent out to a new home.
https://www.embeddedts.com/products/TS-7300
--
Florian
^ permalink raw reply [flat|nested] 30+ messages in thread* Re: [PATCH 00/43] ep93xx device tree conversion
2023-05-16 3:47 ` Florian Fainelli
@ 2023-05-16 10:37 ` Nikita Shubin
0 siblings, 0 replies; 30+ messages in thread
From: Nikita Shubin @ 2023-05-16 10:37 UTC (permalink / raw)
To: Florian Fainelli
Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, David S. Miller,
Jonathan Neuschäfer, Russell King (Oracle),
Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
Emil Renner Berthing, Eric Dumazet, Guenter Roeck,
Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa, Jakub Kicinski,
Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
Krzysztof Kozlowski, Le Moal, Liam Girdwood, Liang Yang,
Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
Masahiro Yamada, Michael Turquette, Miquel Raynal,
Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
linux-spi, linux-watchdog, netdev, soc
Hello Florian!
On Mon, 2023-05-15 at 20:47 -0700, Florian Fainelli wrote:
>
>
> On 4/24/2023 5:34 AM, Nikita Shubin wrote:
> > This series aims to convert ep93xx from platform to full device
> > tree support.
> >
> > Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
> >
> > Thank you Linus and Arnd for your support, review and comments,
> > sorry if i missed something -
> > these series are quite big for me.
> >
> > Big thanks to Alexander Sverdlin for his testing, support, review,
> > fixes and patches.
>
> If anyone is interested I still have a TS-7300 board [1] that is
> fully
> functional and could be sent out to a new home.
Thank you kindly, i'll keep this in mind !
>
> https://www.embeddedts.com/products/TS-7300
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v1 10/43] dt-bindings: rtc: Add Cirrus EP93xx
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (6 preceding siblings ...)
2023-05-16 3:47 ` Florian Fainelli
@ 2023-06-01 5:34 ` Nikita Shubin
2023-06-01 5:34 ` [PATCH v1 11/43] rtc: ep93xx: add DT support for " Nikita Shubin
` (2 subsequent siblings)
10 siblings, 0 replies; 30+ messages in thread
From: Nikita Shubin @ 2023-06-01 5:34 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski, Hartley Sweeten
Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-rtc,
devicetree, linux-kernel
This adds device tree bindings for the Cirrus Logic EP93xx
RTC block used in these SoCs.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
Krzysztof Kozlowski:
- removed wildcards
- use fallback compatible and list all possible compatibles
- dropped label
- fix ident
.../bindings/rtc/cirrus,ep9301-rtc.yaml | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/cirrus,ep9301-rtc.yaml
diff --git a/Documentation/devicetree/bindings/rtc/cirrus,ep9301-rtc.yaml b/Documentation/devicetree/bindings/rtc/cirrus,ep9301-rtc.yaml
new file mode 100644
index 000000000000..63572c197e92
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/cirrus,ep9301-rtc.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/cirrus,ep9301-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus EP93xx Real Time Clock controller
+
+maintainers:
+ - Hartley Sweeten <hsweeten@visionengravers.com>
+ - Alexander Sverdlin <alexander.sverdlin@gmail.com>
+
+properties:
+ compatible:
+ oneOf:
+ - const: cirrus,ep9301-rtc
+ - items:
+ - enum:
+ - cirrus,ep9302-rtc
+ - cirrus,ep9307-rtc
+ - cirrus,ep9312-rtc
+ - cirrus,ep9315-rtc
+ - const: cirrus,ep9301-rtc
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ rtc@80920000 {
+ compatible = "cirrus,ep9301-rtc";
+ reg = <0x80920000 0x100>;
+ };
+
--
2.37.4
^ permalink raw reply related [flat|nested] 30+ messages in thread* [PATCH v1 11/43] rtc: ep93xx: add DT support for Cirrus EP93xx
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (7 preceding siblings ...)
2023-06-01 5:34 ` [PATCH v1 10/43] dt-bindings: rtc: Add Cirrus EP93xx Nikita Shubin
@ 2023-06-01 5:34 ` Nikita Shubin
2023-06-03 20:13 ` andy.shevchenko
2023-06-01 5:45 ` [PATCH v1 29/43] dt-bindings: rtc: Add ST M48T86 Nikita Shubin
2023-06-01 5:45 ` [PATCH v1 30/43] rtc: m48t86: add DT support for m48t86 Nikita Shubin
10 siblings, 1 reply; 30+ messages in thread
From: Nikita Shubin @ 2023-06-01 5:34 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Alessandro Zummo, Alexandre Belloni
Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-rtc,
linux-kernel
- Find register range from the device tree.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
- fixed headers
drivers/rtc/rtc-ep93xx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index acae7f16808f..1fdd20d01560 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -7,6 +7,7 @@
*/
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/rtc.h>
#include <linux/platform_device.h>
#include <linux/io.h>
@@ -148,9 +149,16 @@ static int ep93xx_rtc_probe(struct platform_device *pdev)
return devm_rtc_register_device(ep93xx_rtc->rtc);
}
+static const struct of_device_id ep93xx_rtc_of_ids[] = {
+ { .compatible = "cirrus,ep9301-rtc" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, ep93xx_rtc_of_ids);
+
static struct platform_driver ep93xx_rtc_driver = {
.driver = {
.name = "ep93xx-rtc",
+ .of_match_table = ep93xx_rtc_of_ids,
},
.probe = ep93xx_rtc_probe,
};
--
2.37.4
^ permalink raw reply related [flat|nested] 30+ messages in thread* Re: [PATCH v1 11/43] rtc: ep93xx: add DT support for Cirrus EP93xx
2023-06-01 5:34 ` [PATCH v1 11/43] rtc: ep93xx: add DT support for " Nikita Shubin
@ 2023-06-03 20:13 ` andy.shevchenko
0 siblings, 0 replies; 30+ messages in thread
From: andy.shevchenko @ 2023-06-03 20:13 UTC (permalink / raw)
To: Nikita Shubin
Cc: Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Alessandro Zummo, Alexandre Belloni, Michael Peters, Kris Bahnsen,
linux-rtc, linux-kernel
Thu, Jun 01, 2023 at 08:34:02AM +0300, Nikita Shubin kirjoitti:
> - Find register range from the device tree.
It would be nice to be consistent with the commit messages of the same
semantics.
Nevertheless, LGTM,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>
> Notes:
> v0 -> v1:
>
> - fixed headers
>
> drivers/rtc/rtc-ep93xx.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
> index acae7f16808f..1fdd20d01560 100644
> --- a/drivers/rtc/rtc-ep93xx.c
> +++ b/drivers/rtc/rtc-ep93xx.c
> @@ -7,6 +7,7 @@
> */
>
> #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/rtc.h>
> #include <linux/platform_device.h>
> #include <linux/io.h>
> @@ -148,9 +149,16 @@ static int ep93xx_rtc_probe(struct platform_device *pdev)
> return devm_rtc_register_device(ep93xx_rtc->rtc);
> }
>
> +static const struct of_device_id ep93xx_rtc_of_ids[] = {
> + { .compatible = "cirrus,ep9301-rtc" },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, ep93xx_rtc_of_ids);
> +
> static struct platform_driver ep93xx_rtc_driver = {
> .driver = {
> .name = "ep93xx-rtc",
> + .of_match_table = ep93xx_rtc_of_ids,
> },
> .probe = ep93xx_rtc_probe,
> };
> --
> 2.37.4
>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v1 29/43] dt-bindings: rtc: Add ST M48T86
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (8 preceding siblings ...)
2023-06-01 5:34 ` [PATCH v1 11/43] rtc: ep93xx: add DT support for " Nikita Shubin
@ 2023-06-01 5:45 ` Nikita Shubin
2023-06-01 8:18 ` Krzysztof Kozlowski
2023-06-01 5:45 ` [PATCH v1 30/43] rtc: m48t86: add DT support for m48t86 Nikita Shubin
10 siblings, 1 reply; 30+ messages in thread
From: Nikita Shubin @ 2023-06-01 5:45 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski
Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-rtc,
devicetree, linux-kernel
Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
- s/dallas/st/
- description for regs
- s/additionalProperties/unevaluatedProperties/
- add ref rtc.yaml
- changed compatible to st,m48t86
- dropped label in example
- replaced Alessandro Alessandro to Alexandre Belloni
.../bindings/rtc/st,m48t86-rtc.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
diff --git a/Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml b/Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
new file mode 100644
index 000000000000..eb8e6451d7c8
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/st,m48t86-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ST M48T86 / Dallas DS12887 RTC wirh SRAM
+
+maintainers:
+ - Alexandre Belloni <alexandre.belloni@bootlin.com>
+
+properties:
+ compatible:
+ enum:
+ - st,m48t86
+
+ reg:
+ items:
+ - description: index register
+ - description: data register
+
+allOf:
+ - $ref: rtc.yaml
+
+unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+
+examples:
+ - |
+ rtc@10800000 {
+ compatible = "st,m48t86";
+ reg = <0x10800000 0x1>, <0x11700000 0x1>;
+ };
+
+...
--
2.37.4
^ permalink raw reply related [flat|nested] 30+ messages in thread* Re: [PATCH v1 29/43] dt-bindings: rtc: Add ST M48T86
2023-06-01 5:45 ` [PATCH v1 29/43] dt-bindings: rtc: Add ST M48T86 Nikita Shubin
@ 2023-06-01 8:18 ` Krzysztof Kozlowski
2023-06-20 7:30 ` Nikita Shubin
0 siblings, 1 reply; 30+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-01 8:18 UTC (permalink / raw)
To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski
Cc: Michael Peters, Kris Bahnsen, linux-rtc, devicetree, linux-kernel
On 01/06/2023 07:45, Nikita Shubin wrote:
> Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>
> Notes:
> v0 -> v1:
>
> - s/dallas/st/
> - description for regs
> - s/additionalProperties/unevaluatedProperties/
> - add ref rtc.yaml
> - changed compatible to st,m48t86
> - dropped label in example
> - replaced Alessandro Alessandro to Alexandre Belloni
>
> .../bindings/rtc/st,m48t86-rtc.yaml | 38 +++++++++++++++++++
> 1 file changed, 38 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
>
> diff --git a/Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml b/Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
> new file mode 100644
> index 000000000000..eb8e6451d7c8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
Filename based on compatible, so drop "rtc".
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/st,m48t86-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ST M48T86 / Dallas DS12887 RTC wirh SRAM
typo: with
> +
> +maintainers:
> + - Alexandre Belloni <alexandre.belloni@bootlin.com>
> +
> +properties:
> + compatible:
> + enum:
> + - st,m48t86
> +
> + reg:
> + items:
> + - description: index register
> + - description: data register
> +
> +allOf:
> + - $ref: rtc.yaml
> +
> +unevaluatedProperties: false
> +
> +required:
> + - compatible
> + - reg
required goes after properties:
Keep the same order in all your patches.
> +
> +examples:
> + - |
> + rtc@10800000 {
> + compatible = "st,m48t86";
> + reg = <0x10800000 0x1>, <0x11700000 0x1>;
One byte long? Not a word?
> + };
> +
> +...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 30+ messages in thread* Re: [PATCH v1 29/43] dt-bindings: rtc: Add ST M48T86
2023-06-01 8:18 ` Krzysztof Kozlowski
@ 2023-06-20 7:30 ` Nikita Shubin
0 siblings, 0 replies; 30+ messages in thread
From: Nikita Shubin @ 2023-06-20 7:30 UTC (permalink / raw)
To: Krzysztof Kozlowski, Alexander Sverdlin, Arnd Bergmann,
Linus Walleij, Alessandro Zummo, Alexandre Belloni, Rob Herring,
Krzysztof Kozlowski
Cc: Michael Peters, Kris Bahnsen, linux-rtc, devicetree, linux-kernel
Hello Krzysztof!
On Thu, 2023-06-01 at 10:18 +0200, Krzysztof Kozlowski wrote:
> On 01/06/2023 07:45, Nikita Shubin wrote:
> > Add YAML bindings for ST M48T86 / Dallas DS12887 RTC.
> >
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> >
> > Notes:
> > v0 -> v1:
> >
> > - s/dallas/st/
> > - description for regs
> > - s/additionalProperties/unevaluatedProperties/
> > - add ref rtc.yaml
> > - changed compatible to st,m48t86
> > - dropped label in example
> > - replaced Alessandro Alessandro to Alexandre Belloni
> >
> > .../bindings/rtc/st,m48t86-rtc.yaml | 38
> > +++++++++++++++++++
> > 1 file changed, 38 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/rtc/st,m48t86-
> > rtc.yaml b/Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
> > new file mode 100644
> > index 000000000000..eb8e6451d7c8
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/st,m48t86-rtc.yaml
>
> Filename based on compatible, so drop "rtc".
>
> > @@ -0,0 +1,38 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/rtc/st,m48t86-rtc.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: ST M48T86 / Dallas DS12887 RTC wirh SRAM
>
> typo: with
>
> > +
> > +maintainers:
> > + - Alexandre Belloni <alexandre.belloni@bootlin.com>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - st,m48t86
> > +
> > + reg:
> > + items:
> > + - description: index register
> > + - description: data register
> > +
> > +allOf:
> > + - $ref: rtc.yaml
> > +
> > +unevaluatedProperties: false
> > +
> > +required:
> > + - compatible
> > + - reg
>
> required goes after properties:
>
> Keep the same order in all your patches.
>
> > +
> > +examples:
> > + - |
> > + rtc@10800000 {
> > + compatible = "st,m48t86";
> > + reg = <0x10800000 0x1>, <0x11700000 0x1>;
>
> One byte long? Not a word?
They are indeed one byte long:
https://elixir.bootlin.com/linux/v6.4-rc7/source/drivers/rtc/rtc-m48t86.c#L46
>
> > + };
> > +
> > +...
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH v1 30/43] rtc: m48t86: add DT support for m48t86
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
` (9 preceding siblings ...)
2023-06-01 5:45 ` [PATCH v1 29/43] dt-bindings: rtc: Add ST M48T86 Nikita Shubin
@ 2023-06-01 5:45 ` Nikita Shubin
2023-06-02 7:28 ` Linus Walleij
2023-06-03 20:10 ` andy.shevchenko
10 siblings, 2 replies; 30+ messages in thread
From: Nikita Shubin @ 2023-06-01 5:45 UTC (permalink / raw)
To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Alessandro Zummo, Alexandre Belloni
Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-rtc,
linux-kernel
- get regs from device tree
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
Notes:
v0 -> v1:
- dropped CONFIG_OF, of_match_ptr
- dropped coma in id table
- changed compatible from "dallas,rtc-m48t86" to "st,m48t86"
drivers/rtc/rtc-m48t86.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index 481c9525b1dd..b114796d4326 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -15,6 +15,7 @@
#include <linux/platform_device.h>
#include <linux/bcd.h>
#include <linux/io.h>
+#include <linux/of.h>
#define M48T86_SEC 0x00
#define M48T86_SECALRM 0x01
@@ -269,9 +270,16 @@ static int m48t86_rtc_probe(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id m48t86_rtc_of_ids[] = {
+ { .compatible = "st,m48t86" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, m48t86_rtc_of_ids);
+
static struct platform_driver m48t86_rtc_platform_driver = {
.driver = {
.name = "rtc-m48t86",
+ .of_match_table = m48t86_rtc_of_ids,
},
.probe = m48t86_rtc_probe,
};
--
2.37.4
^ permalink raw reply related [flat|nested] 30+ messages in thread* Re: [PATCH v1 30/43] rtc: m48t86: add DT support for m48t86
2023-06-01 5:45 ` [PATCH v1 30/43] rtc: m48t86: add DT support for m48t86 Nikita Shubin
@ 2023-06-02 7:28 ` Linus Walleij
2023-06-03 20:10 ` andy.shevchenko
1 sibling, 0 replies; 30+ messages in thread
From: Linus Walleij @ 2023-06-02 7:28 UTC (permalink / raw)
To: Nikita Shubin
Cc: Alexander Sverdlin, Arnd Bergmann, Alessandro Zummo,
Alexandre Belloni, Michael Peters, Kris Bahnsen, linux-rtc,
linux-kernel
On Thu, Jun 1, 2023 at 7:46 AM Nikita Shubin <nikita.shubin@maquefel.me> wrote:
> - get regs from device tree
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH v1 30/43] rtc: m48t86: add DT support for m48t86
2023-06-01 5:45 ` [PATCH v1 30/43] rtc: m48t86: add DT support for m48t86 Nikita Shubin
2023-06-02 7:28 ` Linus Walleij
@ 2023-06-03 20:10 ` andy.shevchenko
1 sibling, 0 replies; 30+ messages in thread
From: andy.shevchenko @ 2023-06-03 20:10 UTC (permalink / raw)
To: Nikita Shubin
Cc: Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
Alessandro Zummo, Alexandre Belloni, Michael Peters, Kris Bahnsen,
linux-rtc, linux-kernel
Thu, Jun 01, 2023 at 08:45:35AM +0300, Nikita Shubin kirjoitti:
> - get regs from device tree
...
> +#include <linux/of.h>
This is wrong header. Should be mod_devicetable.h.
Please, as I mentioned before, change this in *all* patches in your series
where just an ID table is added.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 30+ messages in thread