Add RTC for MStar SSD20xD SoCs
Subsystems (2)
cover Add RTC for MStar SSD20xD SoCs
This patches series adds a new driver for the RTC found in the Mstar SSD20xD SoCs. It adds a basic rtc driver, the corresponding devicetree bindings and its documentation.
The rtctest (from selftests) has been passed on this driver, with the following output:
# rtctest TAP version 13 1..8 # Starting 8 tests from 1 test cases. # RUN rtc.date_read ... # rtctest.c:52:date_read:Current RTC date/time is 17/05/2023 15:58:12. # OK rtc.date_read ok 1 rtc.date_read # RUN rtc.date_read_loop ... # rtctest.c:95:date_read_loop:Continuously reading RTC time for 30s (with 11ms breaks after every read). # rtctest.c:122:date_read_loop:Performed 888 RTC time reads. # OK rtc.date_read_loop ok 2 rtc.date_read_loop # RUN rtc.uie_read ... # rtctest.c:137:uie_read:skip update IRQs not supported. # OK rtc.uie_read ok 3 rtc.uie_read # RUN rtc.uie_select ... # rtctest.c:166:uie_select:skip update IRQs not supported. # OK rtc.uie_select ok 4 rtc.uie_select # RUN rtc.alarm_alm_set ... # rtctest.c:214:alarm_alm_set:skip alarms are not supported. # OK rtc.alarm_alm_set ok 5 rtc.alarm_alm_set # RUN rtc.alarm_wkalm_set ... # rtctest.c:274:alarm_wkalm_set:skip alarms are not supported. # OK rtc.alarm_wkalm_set ok 6 rtc.alarm_wkalm_set # RUN rtc.alarm_alm_set_minute ... # rtctest.c:324:alarm_alm_set_minute:skip alarms are not supported. # OK rtc.alarm_alm_set_minute ok 7 rtc.alarm_alm_set_minute # RUN rtc.alarm_wkalm_set_minute ... # rtctest.c:384:alarm_wkalm_set_minute:skip alarms are not supported. # OK rtc.alarm_wkalm_set_minute ok 8 rtc.alarm_wkalm_set_minute # PASSED: 8 / 8 tests passed. # Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0
Romain Perier (3):
rtc: Add support for the SSD20xD RTC
dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings
documentation
ARM: dts: mstar: Enable rtc for SSD20xD
.../bindings/rtc/mstar,ssd20xd-rtc.yaml | 37 +++ arch/arm/boot/dts/mstar-infinity2m.dtsi | 5 + drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ssd20xd.c | 249 ++++++++++++++++++ 5 files changed, 303 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml create mode 100644 drivers/rtc/rtc-ssd20xd.c
Signature · 1 line
2.39.2
PATCH 1/3 rtc: Add support for the SSD20xD RTC
Newer SigmaStar SSD20xD SoCs contain a really low power RTC (300uA claimed), capable of running while the system is sleeping (battery powered), this is not the case with the other RTC on older SoCs. This adds basic support for this RTC block.
--- drivers/rtc/Kconfig | 11 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ssd20xd.c | 249 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 261 insertions(+) create mode 100644 drivers/rtc/rtc-ssd20xd.c
drivers/rtc/Kconfig +11 -0
@@ -1978,4 +1978,15 @@ config RTC_DRV_POLARFIRE_SOC This driver can also be built as a module, if so, the module will be called "rtc-mpfs". +config RTC_DRV_SSD20XD + tristate "SigmaStar SSD20XD RTC" + depends on ARCH_MSTARV7 || COMPILE_TEST + default ARCH_MSTARV7 + help + If you say yes here you get support for the SigmaStar SSD20XD On-Chip + Real Time Clock. + + This driver can also be built as a module, if so, the module + will be called "rtc-ssd20xd". + endif # RTC_CLASS
drivers/rtc/Makefile +1 -0
@@ -103,6 +103,7 @@ obj-$(CONFIG_RTC_DRV_MESON) += rtc-meson.o obj-$(CONFIG_RTC_DRV_MOXART) += rtc-moxart.o obj-$(CONFIG_RTC_DRV_MPC5121) += rtc-mpc5121.o obj-$(CONFIG_RTC_DRV_MSC313) += rtc-msc313.o +obj-$(CONFIG_RTC_DRV_SSD20XD) += rtc-ssd20xd.o obj-$(CONFIG_RTC_DRV_MSM6242) += rtc-msm6242.o obj-$(CONFIG_RTC_DRV_MT2712) += rtc-mt2712.o obj-$(CONFIG_RTC_DRV_MT6397) += rtc-mt6397.o
drivers/rtc/rtc-ssd20xd.c new file +249 -0
249 lines not on this page · raw message
Signature · 1 line
2.39.2
Alexandre Belloni
maintainerRe: [PATCH 1/3] rtc: Add support for the SSD20xD RTC
Hello,
Quoted 1 line · Romain Perier
Newer SigmaStar SSD20xD SoCs contain a really low power RTC (300uA claimed),
The low power RTCs are more on the side of a few tenth of nA. RV3028 consumes 40nA, including the crystal. AB1805 consumes 14nA with an RC oscillator. It is funny how SoC vendors think they are low power ;)
Quoted 9 lines
drivers/rtc/rtc-ssd20xd.c new file +9
-0+static int ssd20xd_rtc_isoctrl (struct ssd20xd_rtc *priv) +{ +static const unsigned int sequence[] = {0x0 ,0x1 ,0x3 ,0x7 ,0x5 ,0x1 ,0x0 }; +unsigned int val; +struct device *dev = &priv->rtc_dev->dev; +int i, ret; + +/* +* This gates iso_en by writing a special sequence of bytes to iso_ctrl
drivers/rtc/rtc-ssd20xd.c line 79
Quoted 10 lines
drivers/rtc/rtc-ssd20xd.c new file +10
-0+* and ensuring that it has been correctly applied by reading iso_ctrl_ack +*/ +for (i =0 ; i <ARRAY_SIZE (sequence); i++) { +writeb (sequence[i] &ISO_CTRL_MASK , priv->base +REG_ISO_CTRL ); + + ret =read_poll_timeout (read_iso_ctrl_ack, val, val == (i %2 ),100 , +20 *100 , true, priv->base); +if (ret) { +dev_err (dev,"Timeout waiting for ack byte %i (%x) of sequence\n" , i, + sequence[i]);
This is a user visible message but there is no action for the user to take apart from retrying. You should drop this.
drivers/rtc/rtc-ssd20xd.c line 89
Quoted 10 lines
drivers/rtc/rtc-ssd20xd.c new file +10
-0+return ret; + } + } + +/* +* At this point iso_en should be raised for 1ms +*/ + ret =read_poll_timeout (read_iso_en, val, val,100 ,22 *100 , true, priv->base); +if (ret) +dev_err (dev,"Timeout waiting for iso_en\n" );
Ditto.
Quoted 4 lines
drivers/rtc/rtc-ssd20xd.c new file +4
-0+mdelay (2 ); +return 0 ; +} +
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [PATCH 1/3] rtc: Add support for the SSD20xD RTC
Hi Alexandre,
Quoted 9 lines · Alexandre Belloni
Hello,
Quoted 1 line · Romain Perier
Newer SigmaStar SSD20xD SoCs contain a really low power RTC (300uA claimed),
The low power RTCs are more on the side of a few tenth of nA. RV3028 consumes 40nA, including the crystal. AB1805 consumes 14nA with an RC oscillator. It is funny how SoC vendors think they are low power ;)
To be fair to them I think the 300uA claim is for the whole SoC in RTC-only deep sleep.
Whatever logic is powered on alongside the RTC to trigger wake up will be part of that number I guess.
Cheers,
Daniel
PATCH 2/3 dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
In reply to Romain PerierThis adds the documentation for the devicetree bindings of the Mstar SSD20xD RTC driver.
--- .../bindings/rtc/mstar,ssd20xd-rtc.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +37 -0
@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/mstar,ssd20xd-rtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mstar SSD20xD RTC + +allOf: + - $ref: rtc.yaml# + +maintainers: + - Daniel Palmer <[email protected]> + - Romain Perier <[email protected]> + +properties: + compatible: + enum: + - mstar,ssd20xd-rtc + reg: + maxItems: 1 + + start-year: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + rtc@6800 { + compatible = "mstar,ssd20xd-rtc"; + reg = <0x6800 0x200>; + }; +...
Signature · 1 line
2.39.2
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
Hey Romain,
Quoted 2 lines · Romain Perier
This adds the documentation for the devicetree bindings of the Mstar SSD20xD RTC driver.
Bindings describe hardware, not the driver ;)
Quoted 22 lines
Signed-off-by Romain Perier <[email protected]>--- .../bindings/rtc/mstar,ssd20xd-rtc.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yamlDocumentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +9
-0@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/mstar,ssd20xd-rtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mstar SSD20xD RTC + +allOf:
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 19
Quoted 10 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +10
-0+ - $ref: rtc.yaml# + +maintainers: + - Daniel Palmer <[email protected]> + - Romain Perier <[email protected]> + +properties: + compatible: + enum: + - mstar,ssd20xd-rtc
Is this x a wildcard?
In general, having a specific compatible is preferred, and if there are other models that are compatible we can list several "fall back" to the most specific one implemented in a driver.
Thanks,
Conor.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
Quoted 8 lines · Conor Dooley
Hey Romain,
Quoted 2 lines · Romain Perier
This adds the documentation for the devicetree bindings of the Mstar SSD20xD RTC driver.
Bindings describe hardware, not the driver ;)
Hi,
Yep, I just copied and pasted the message of a previous merged-commit, I will fix it.
Quoted 30 lines
Quoted 30 lines
Signed-off-by Romain Perier <[email protected]>--- .../bindings/rtc/mstar,ssd20xd-rtc.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yamlDocumentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +16
-0@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/mstar,ssd20xd-rtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mstar SSD20xD RTC + +allOf: + - $ref: rtc.yaml# + +maintainers: + - Daniel Palmer <[email protected]> + - Romain Perier <[email protected]> + +properties:
Quoted 8 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 19
Quoted 3 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +3
-0+ compatible: + enum: + - mstar,ssd20xd-rtcIs this x a wildcard?
In general, having a specific compatible is preferred, and if there are other models that are compatible we can list several "fall back" to the most specific one implemented in a driver.
The first SoC being concerned is SSD202D, so "mstar,ssd202d-rtc" ?
Thanks,
Romain
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
Quoted 7 lines · Romain Perier
Quoted 5 lines · Conor Dooley
Quoted 4 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +4
-0+properties: + compatible: + enum: + - mstar,ssd20xd-rtc
Quoted 7 lines
Quoted 4 lines
Is this x a wildcard?
In general, having a specific compatible is preferred, and if there are other models that are compatible we can list several "fall back" to the most specific one implemented in a driver.The first SoC being concerned is SSD202D, so "mstar,ssd202d-rtc" ?
Sounds good to me, thanks.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
In reply to Romain PerierQuoted 3 lines · Romain Perier
This adds the documentation for the devicetree bindings of the Mstar SSD20xD RTC driver.
Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.
A nit, subject: drop second/last, redundant "devicetree bindings documentation". The "dt-bindings" prefix is already stating that these are bindings. You actually repeated everything...
Quoted 12 lines
Signed-off-by Romain Perier <[email protected]>--- .../bindings/rtc/mstar,ssd20xd-rtc.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yamlDocumentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +0
-0
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 10
Quoted 10 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +10
-0@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/mstar,ssd20xd-rtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mstar SSD20xD RTC + +allOf: + - $ref: rtc.yaml#
This goes just above properties:
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 19
Quoted 9 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +9
-0+ +maintainers: + - Daniel Palmer <[email protected]> + - Romain Perier <[email protected]> + +properties: + compatible: + enum: + - mstar,ssd20xd-rtc
Why rtc suffix? Can it be anything else?
Missing blank line
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 23
Quoted 4 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +4
-0+ reg: + maxItems: 1 + + start-year: true
Drop
What about interrupt line?
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 29
Quoted 6 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +6
-0+ +required: + - compatible + - reg + +additionalProperties: false
instead
unevaluatedProperties: false
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 37
Quoted 8 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +8
-0+ +examples: + - | + rtc@6800 { + compatible = "mstar,ssd20xd-rtc"; + reg = <0x6800 0x200>; + }; +...
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
Quoted 10 lines · Krzysztof Kozlowski
Quoted 3 lines · Romain Perier
This adds the documentation for the devicetree bindings of the Mstar SSD20xD RTC driver.
Please use
scripts/get_maintainers.plto get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel.
Hi,
This is usually what I do for all patches series, but possible I have missed some person
Quoted 4 lines
A nit, subject: drop second/last, redundant "devicetree bindings documentation". The "dt-bindings" prefix is already stating that these are bindings. You actually repeated everything...
Originally, it was just to write a simple sentence with words... it gives context, you know...
Like here: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=7647204c2e81b28b4a7c4eec7d539f998d48eaf0 or here: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=dd49cbedde8a0f1e0d09698f9cad791d37a8e03e
But honestly, I don't want to debate about this, yes I can remove redundant "devicetree bindings documentation" ^^
Quoted 17 lines
Quoted 17 lines
Signed-off-by Romain Perier <[email protected]>--- .../bindings/rtc/mstar,ssd20xd-rtc.yaml | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yamlDocumentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +4
-0@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/mstar,ssd20xd-rtc.yaml#
Quoted 9 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 10
Quoted 6 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +6
-0+$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mstar SSD20xD RTC + +allOf: + - $ref: rtc.yaml#This goes just above properties:
ack
Quoted 11 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 19
Quoted 9 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +9
-0+ +maintainers: + - Daniel Palmer <[email protected]> + - Romain Perier <[email protected]> + +properties: + compatible: + enum: + - mstar,ssd20xd-rtcWhy rtc suffix? Can it be anything else?
Well, it is the dt-bindings for an RTC block ? suppose tomorrow we have an ethernet block specific to the SoC SSD202D, it should be "mstar,ssd202d-ethernet" , how do you make
the difference if you just put "mstar,sd202d" ? Plus a lot of rtc dt-bindings have this suffix (when it is not an IP name). This is exactly the case for rtc-msc313e and it was not an issue.
Quoted 2 lines
Missing blank line
ack
Quoted 9 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 23
Quoted 5 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +4
-0+ reg: + maxItems: 1 + + start-year: trueDrop
What about interrupt line?
There is currently no interrupt right now, we have not yet the irqchip code for handling the alarm irq of this rtc block.
Quoted 10 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml line 29
Quoted 7 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +6
-0+ +required: + - compatible + - reg + +additionalProperties: falseinstead
unevaluatedProperties: false
ack
Thanks,
Romain
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
Quoted 5 lines · Romain Perier
Quoted 5 lines
Quoted 4 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +4
-0+properties: + compatible: + enum: + - mstar,ssd20xd-rtc
Quoted 7 lines
Quoted 1 line
Why rtc suffix? Can it be anything else?
Well, it is the dt-bindings for an RTC block ? suppose tomorrow we have an ethernet block specific to the SoC SSD202D, it should be "mstar,ssd202d-ethernet" , how do you make
the difference if you just put "mstar,sd202d" ? Plus a lot of rtc dt-bindings have this suffix (when it is not an IP name).
There are a lot of bad design choices or bugs - are you going to implement the same mistakes because someone did it?
Quoted 2 lines
This is
exactly the case for rtc-msc313e and it was not an issue.
So that was my question - can it be anything else? There is literally no description of the hardware... Neither in commit msg nor in description:
field in bindings.
What is SSD202D? SoC? RTC?
Quoted 12 lines
Quoted 3 lines
Missing blank line
ack
Quoted 6 lines
Quoted 5 lines
Documentation/devicetree/bindings/rtc/mstar,ssd20xd-rtc.yaml new file +4
-0+ reg: + maxItems: 1 + + start-year: true
Quoted 6 lines
Quoted 3 lines
Drop
What about interrupt line?
There is currently no interrupt right now, we have not yet the irqchip code for handling the alarm irq of this rtc block.
So you are going to change the hardware and add the interrupt line? We do not talk about drivers, but hardware. Whether your driver handles it or not, matters less.
Describe the hardware, not the current implementation of one driver.
Best regards,
Krzysztof
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
Hi Krzysztof,
Quoted 6 lines · Krzysztof Kozlowski
Quoted 2 lines
This is
exactly the case for rtc-msc313e and it was not an issue.So that was my question - can it be anything else? There is literally no description of the hardware... Neither in commit msg nor in description:
field in bindings.
This RTC block is a block inside of the SSD201/SSD202D (they are the same die with different memory attached) and is only found there. The documentation we have for this is literally one page in a PDF that says "RTC registers".
It could be an IP block licensed from somewhere and technically have a better name but right now all we know is this RTC block is the one in that chip and that chip is the first known instance of it.
Say we manage to get the ethernet mainlined at some point: That's a lot easier as we know already it's a hacked up version of the cadence macb so the compatible can be "macb something".
Quoted 10 lines
Quoted 4 lines
Quoted 1 line
What about interrupt line?
There is currently no interrupt right now, we have not yet the irqchip code for handling the alarm irq of this rtc block.
So you are going to change the hardware and add the interrupt line? We do not talk about drivers, but hardware. Whether your driver handles it or not, matters less.
Describe the hardware, not the current implementation of one driver.
We don't really know how the interrupt is wired up in the hardware properly yet.
Cheers,
Daniel
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
Quoted 11 lines · Daniel Palmer
Hi Krzysztof,
Quoted 6 lines · Krzysztof Kozlowski
Quoted 2 lines
This is
exactly the case for rtc-msc313e and it was not an issue.So that was my question - can it be anything else? There is literally no description of the hardware... Neither in commit msg nor in description:
field in bindings.This RTC block is a block inside of the SSD201/SSD202D (they are the
But what is SSD201?
Quoted 16 lines
same die with different memory attached) and is only found there. The documentation we have for this is literally one page in a PDF that says "RTC registers".
It could be an IP block licensed from somewhere and technically have a better name but right now all we know is this RTC block is the one in that chip and that chip is the first known instance of it.Say we manage to get the ethernet mainlined at some point: That's a lot easier as we know already it's a hacked up version of the cadence macb so the compatible can be "macb something".
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
What about interrupt line?
There is currently no interrupt right now, we have not yet the irqchip code for handling the alarm irq of this rtc block.
Quoted 7 lines
Quoted 5 lines
So you are going to change the hardware and add the interrupt line? We do not talk about drivers, but hardware. Whether your driver handles it or not, matters less.
Describe the hardware, not the current implementation of one driver.
We don't really know how the interrupt is wired up in the hardware properly yet.
OK
Best regards,
Krzysztof
Re: [PATCH 2/3] dt-bindings: rtc: Add Mstar SSD20xD RTC devicetree bindings documentation
Hi Krzysztof,
Quoted 3 lines · Krzysztof Kozlowski
Quoted 1 line
This RTC block is a block inside of the SSD201/SSD202D (they are the
But what is SSD201?
Dual Cortex A7 SoC with integrated memory (SSD201 == 64MB, SSD202D == 128MB) that happens to have an RTC.
Cheers,
Daniel
PATCH 3/3 ARM: dts: mstar: Enable rtc for SSD20xD
In reply to Romain PerierThis adds the definition of the rtc device node. It enables RTC block for SSD20xD SoCs and newer.
--- arch/arm/boot/dts/mstar-infinity2m.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/boot/dts/mstar-infinity2m.dtsi +5 -0
@@ -32,6 +32,11 @@ cpu1: cpu@1 { }; &riu { + rtc@6800 { + compatible = "mstar,ssd20xd-rtc"; + reg = <0x6800 0x200>; + }; + smpctrl: smpctrl@204000 { reg = <0x204000 0x200>; status = "disabled";
Signature · 1 line
2.39.2