* [PATCH 01/25] ARM: dts: unisoc: rda8810pl: Add label to GPIO nodes
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-16 20:07 ` [PATCH 02/25] drivers: gpio: rda: Make IRQ optional Dang Huynh
` (8 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
So we can add devices to these GPIO nodes for each board.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
arch/arm/boot/dts/unisoc/rda8810pl.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/unisoc/rda8810pl.dtsi b/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
index f30d6ece49fb33d9c5c3ad9522c83bb8e4f8b488..6553fc102c6751696e75e4de614fc3428d182061 100644
--- a/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
+++ b/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
@@ -39,7 +39,7 @@ modem@10000000 {
#size-cells = <1>;
ranges = <0x0 0x10000000 0xfffffff>;
- gpioc@1a08000 {
+ gpioc: gpioc@1a08000 {
compatible = "rda,8810pl-gpio";
reg = <0x1a08000 0x1000>;
gpio-controller;
@@ -76,7 +76,7 @@ timer@10000 {
interrupt-names = "hwtimer", "ostimer";
};
- gpioa@30000 {
+ gpioa: gpioa@30000 {
compatible = "rda,8810pl-gpio";
reg = <0x30000 0x1000>;
gpio-controller;
@@ -87,7 +87,7 @@ gpioa@30000 {
interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
};
- gpiob@31000 {
+ gpiob: gpiob@31000 {
compatible = "rda,8810pl-gpio";
reg = <0x31000 0x1000>;
gpio-controller;
@@ -98,7 +98,7 @@ gpiob@31000 {
interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
};
- gpiod@32000 {
+ gpiod: gpiod@32000 {
compatible = "rda,8810pl-gpio";
reg = <0x32000 0x1000>;
gpio-controller;
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH 02/25] drivers: gpio: rda: Make IRQ optional
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
2025-09-16 20:07 ` [PATCH 01/25] ARM: dts: unisoc: rda8810pl: Add label to GPIO nodes Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-16 20:07 ` [PATCH 03/25] dt-bindings: gpio: rda: Make interrupts optional Dang Huynh
` (7 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
Not all GPIO have IRQ. When we use this driver with
GPIOC (handled by modem) we get:
rda-gpio 11a08000.gpioc: error -ENXIO: IRQ index 0 not found
Let's mark IRQ as optional so this error doesn't show up.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
drivers/gpio/gpio-rda.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-rda.c b/drivers/gpio/gpio-rda.c
index bcd85a2237a532b875df9470d972ac88b95a91cc..b4db8553a2371ae407fdb7e681d0f82c4d9f74b7 100644
--- a/drivers/gpio/gpio-rda.c
+++ b/drivers/gpio/gpio-rda.c
@@ -229,7 +229,7 @@ static int rda_gpio_probe(struct platform_device *pdev)
* RDA8810PL, GPIOC doesn't support interrupt. So we must handle
* those also.
*/
- rda_gpio->irq = platform_get_irq(pdev, 0);
+ rda_gpio->irq = platform_get_irq_optional(pdev, 0);
rda_gpio->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(rda_gpio->base))
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH 03/25] dt-bindings: gpio: rda: Make interrupts optional
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
2025-09-16 20:07 ` [PATCH 01/25] ARM: dts: unisoc: rda8810pl: Add label to GPIO nodes Dang Huynh
2025-09-16 20:07 ` [PATCH 02/25] drivers: gpio: rda: Make IRQ optional Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-17 20:47 ` Conor Dooley
2025-10-01 6:24 ` Linus Walleij
2025-09-16 20:07 ` [PATCH 04/25] rtc: Add timestamp for the end of 2127 Dang Huynh
` (6 subsequent siblings)
9 siblings, 2 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
The GPIO controller from the modem does not have an interrupt.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
Documentation/devicetree/bindings/gpio/gpio-rda.yaml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/gpio/gpio-rda.yaml b/Documentation/devicetree/bindings/gpio/gpio-rda.yaml
index 6ece555f074f84b396537917d7149d4061724dcc..dbb73b4d33ed39aa65024376b1af0c4e2fb896db 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-rda.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-rda.yaml
@@ -41,9 +41,6 @@ required:
- gpio-controller
- "#gpio-cells"
- ngpios
- - interrupt-controller
- - "#interrupt-cells"
- - interrupts
additionalProperties: false
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* Re: [PATCH 03/25] dt-bindings: gpio: rda: Make interrupts optional
2025-09-16 20:07 ` [PATCH 03/25] dt-bindings: gpio: rda: Make interrupts optional Dang Huynh
@ 2025-09-17 20:47 ` Conor Dooley
2025-10-01 6:24 ` Linus Walleij
1 sibling, 0 replies; 22+ messages in thread
From: Conor Dooley @ 2025-09-17 20:47 UTC (permalink / raw)
To: Dang Huynh
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson, linux-arm-kernel, linux-unisoc, devicetree,
linux-kernel, linux-gpio, linux-rtc, linux-clk, linux-pm,
dmaengine, linux-hardening, linux-mmc
[-- Attachment #1: Type: text/plain, Size: 52 bytes --]
Acked-by: Conor Dooley <conor.dooley@microchip.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 03/25] dt-bindings: gpio: rda: Make interrupts optional
2025-09-16 20:07 ` [PATCH 03/25] dt-bindings: gpio: rda: Make interrupts optional Dang Huynh
2025-09-17 20:47 ` Conor Dooley
@ 2025-10-01 6:24 ` Linus Walleij
1 sibling, 0 replies; 22+ messages in thread
From: Linus Walleij @ 2025-10-01 6:24 UTC (permalink / raw)
To: Dang Huynh
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bartosz Golaszewski, Alexandre Belloni,
Michael Turquette, Stephen Boyd, Philipp Zabel, Sebastian Reichel,
Vinod Koul, Kees Cook, Gustavo A. R. Silva, Ulf Hansson,
linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc
On Tue, Sep 16, 2025 at 10:09 PM Dang Huynh <dang.huynh@mainlining.org> wrote:
> The GPIO controller from the modem does not have an interrupt.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
Can you split out the GPIO patches (like the 3? of them?)
into it's own series and send them separately? They seem
to be possible to review and apply separately.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 04/25] rtc: Add timestamp for the end of 2127
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
` (2 preceding siblings ...)
2025-09-16 20:07 ` [PATCH 03/25] dt-bindings: gpio: rda: Make interrupts optional Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-16 20:07 ` [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC Dang Huynh
` (5 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
Some RTC (like MT2712 and RDA Micro) can handle until the end of
the year 2127.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
include/linux/rtc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 95da051fb155dab4c8ec72ccae7b8e12a117a7f1..ec5828ccc7449388da2ab8bc757030e6795ace30 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -175,6 +175,7 @@ struct rtc_device {
#define RTC_TIMESTAMP_END_2063 2966371199LL /* 2063-12-31 23:59:59 */
#define RTC_TIMESTAMP_END_2079 3471292799LL /* 2079-12-31 23:59:59 */
#define RTC_TIMESTAMP_END_2099 4102444799LL /* 2099-12-31 23:59:59 */
+#define RTC_TIMESTAMP_END_2127 4985971199LL /* 2127-12-31 23:59:59 */
#define RTC_TIMESTAMP_END_2199 7258118399LL /* 2199-12-31 23:59:59 */
#define RTC_TIMESTAMP_END_9999 253402300799LL /* 9999-12-31 23:59:59 */
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
` (3 preceding siblings ...)
2025-09-16 20:07 ` [PATCH 04/25] rtc: Add timestamp for the end of 2127 Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-17 20:46 ` Conor Dooley
2025-09-16 20:07 ` [PATCH 06/25] rtc: Add driver for RDA Micro SoC Dang Huynh
` (4 subsequent siblings)
9 siblings, 1 reply; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
Add documentation describing the RTC found in RDA8810PL SoC.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
.../devicetree/bindings/rtc/rda,8810pl-rtc.yaml | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..3ceae294921cc3211cd775d9b3890393196faf82
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/rda,8810pl-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RDA Micro RDA8810PL Real Time Clock
+
+maintainers:
+ - Dang Huynh <dang.huynh@mainlining.org>
+
+properties:
+ compatible:
+ const: rda,8810pl-rtc
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ rtc@1a06000 {
+ compatible = "rda,8810pl-rtc";
+ reg = <0x1a06000 0x1000>;
+ };
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* Re: [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC
2025-09-16 20:07 ` [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC Dang Huynh
@ 2025-09-17 20:46 ` Conor Dooley
2025-09-18 4:11 ` Dang Huynh
0 siblings, 1 reply; 22+ messages in thread
From: Conor Dooley @ 2025-09-17 20:46 UTC (permalink / raw)
To: Dang Huynh
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson, linux-arm-kernel, linux-unisoc, devicetree,
linux-kernel, linux-gpio, linux-rtc, linux-clk, linux-pm,
dmaengine, linux-hardening, linux-mmc
[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]
On Wed, Sep 17, 2025 at 03:07:22AM +0700, Dang Huynh wrote:
> Add documentation describing the RTC found in RDA8810PL SoC.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
> .../devicetree/bindings/rtc/rda,8810pl-rtc.yaml | 30 ++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..3ceae294921cc3211cd775d9b3890393196faf82
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> @@ -0,0 +1,30 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/rda,8810pl-rtc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RDA Micro RDA8810PL Real Time Clock
> +
> +maintainers:
> + - Dang Huynh <dang.huynh@mainlining.org>
> +
> +properties:
> + compatible:
> + const: rda,8810pl-rtc
> +
> + reg:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
Your driver implements functions that turn on an alarm irq, but there is
none mentioned here. What's going on there?
Additionally, there's no clocks property? For an onboard RTC I'd have
expected there to be a clock sourced outside of the block.
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + rtc@1a06000 {
> + compatible = "rda,8810pl-rtc";
> + reg = <0x1a06000 0x1000>;
> + };
>
> --
> 2.51.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC
2025-09-17 20:46 ` Conor Dooley
@ 2025-09-18 4:11 ` Dang Huynh
2025-09-18 15:18 ` Conor Dooley
0 siblings, 1 reply; 22+ messages in thread
From: Dang Huynh @ 2025-09-18 4:11 UTC (permalink / raw)
To: Conor Dooley
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson, linux-arm-kernel, linux-unisoc, devicetree,
linux-kernel, linux-gpio, linux-rtc, linux-clk, linux-pm,
dmaengine, linux-hardening, linux-mmc
On 2025-09-18 03:46, Conor Dooley wrote:
> On Wed, Sep 17, 2025 at 03:07:22AM +0700, Dang Huynh wrote:
>> Add documentation describing the RTC found in RDA8810PL SoC.
>>
>> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
>> ---
>> .../devicetree/bindings/rtc/rda,8810pl-rtc.yaml | 30
>> ++++++++++++++++++++++
>> 1 file changed, 30 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
>> b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
>> new file mode 100644
>> index
>> 0000000000000000000000000000000000000000..3ceae294921cc3211cd775d9b3890393196faf82
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
>> @@ -0,0 +1,30 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/rtc/rda,8810pl-rtc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: RDA Micro RDA8810PL Real Time Clock
>> +
>> +maintainers:
>> + - Dang Huynh <dang.huynh@mainlining.org>
>> +
>> +properties:
>> + compatible:
>> + const: rda,8810pl-rtc
>> +
>> + reg:
>> + maxItems: 1
>> +
>> +required:
>> + - compatible
>> + - reg
>
> Your driver implements functions that turn on an alarm irq, but there
> is
> none mentioned here. What's going on there?
The RTC doesn't seem to have an AP IRQ associated. I can't find any
reference to it on downstream kernel and the docs.
>
> Additionally, there's no clocks property? For an onboard RTC I'd have
> expected there to be a clock sourced outside of the block.
>
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + rtc@1a06000 {
>> + compatible = "rda,8810pl-rtc";
>> + reg = <0x1a06000 0x1000>;
>> + };
>>
>> --
>> 2.51.0
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC
2025-09-18 4:11 ` Dang Huynh
@ 2025-09-18 15:18 ` Conor Dooley
2025-09-20 6:49 ` Dang Huynh
0 siblings, 1 reply; 22+ messages in thread
From: Conor Dooley @ 2025-09-18 15:18 UTC (permalink / raw)
To: Dang Huynh
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson, linux-arm-kernel, linux-unisoc, devicetree,
linux-kernel, linux-gpio, linux-rtc, linux-clk, linux-pm,
dmaengine, linux-hardening, linux-mmc
[-- Attachment #1: Type: text/plain, Size: 2104 bytes --]
On Thu, Sep 18, 2025 at 11:11:10AM +0700, Dang Huynh wrote:
> On 2025-09-18 03:46, Conor Dooley wrote:
> > On Wed, Sep 17, 2025 at 03:07:22AM +0700, Dang Huynh wrote:
> > > Add documentation describing the RTC found in RDA8810PL SoC.
> > >
> > > Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> > > ---
> > > .../devicetree/bindings/rtc/rda,8810pl-rtc.yaml | 30
> > > ++++++++++++++++++++++
> > > 1 file changed, 30 insertions(+)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> > > b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> > > new file mode 100644
> > > index 0000000000000000000000000000000000000000..3ceae294921cc3211cd775d9b3890393196faf82
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> > > @@ -0,0 +1,30 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/rtc/rda,8810pl-rtc.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: RDA Micro RDA8810PL Real Time Clock
> > > +
> > > +maintainers:
> > > + - Dang Huynh <dang.huynh@mainlining.org>
> > > +
> > > +properties:
> > > + compatible:
> > > + const: rda,8810pl-rtc
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> > > +required:
> > > + - compatible
> > > + - reg
> >
> > Your driver implements functions that turn on an alarm irq, but there is
> > none mentioned here. What's going on there?
> The RTC doesn't seem to have an AP IRQ associated. I can't find any
> reference to it on downstream kernel and the docs.
>
> >
> > Additionally, there's no clocks property? For an onboard RTC I'd have
> > expected there to be a clock sourced outside of the block.
What about the clock?
> >
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > + - |
> > > + rtc@1a06000 {
> > > + compatible = "rda,8810pl-rtc";
> > > + reg = <0x1a06000 0x1000>;
> > > + };
> > >
> > > --
> > > 2.51.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC
2025-09-18 15:18 ` Conor Dooley
@ 2025-09-20 6:49 ` Dang Huynh
0 siblings, 0 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-20 6:49 UTC (permalink / raw)
To: Conor Dooley
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson, linux-arm-kernel, linux-unisoc, devicetree,
linux-kernel, linux-gpio, linux-rtc, linux-clk, linux-pm,
dmaengine, linux-hardening, linux-mmc
On Thu, Sep 18, 2025 at 04:18:25PM +0100, Conor Dooley wrote:
> On Thu, Sep 18, 2025 at 11:11:10AM +0700, Dang Huynh wrote:
> > On 2025-09-18 03:46, Conor Dooley wrote:
> > > On Wed, Sep 17, 2025 at 03:07:22AM +0700, Dang Huynh wrote:
> > > > Add documentation describing the RTC found in RDA8810PL SoC.
> > > >
> > > > Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> > > > ---
> > > > .../devicetree/bindings/rtc/rda,8810pl-rtc.yaml | 30
> > > > ++++++++++++++++++++++
> > > > 1 file changed, 30 insertions(+)
> > > >
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> > > > b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> > > > new file mode 100644
> > > > index 0000000000000000000000000000000000000000..3ceae294921cc3211cd775d9b3890393196faf82
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> > > > @@ -0,0 +1,30 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/rtc/rda,8810pl-rtc.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: RDA Micro RDA8810PL Real Time Clock
> > > > +
> > > > +maintainers:
> > > > + - Dang Huynh <dang.huynh@mainlining.org>
> > > > +
> > > > +properties:
> > > > + compatible:
> > > > + const: rda,8810pl-rtc
> > > > +
> > > > + reg:
> > > > + maxItems: 1
> > > > +
> > > > +required:
> > > > + - compatible
> > > > + - reg
> > >
> > > Your driver implements functions that turn on an alarm irq, but there is
> > > none mentioned here. What's going on there?
> > The RTC doesn't seem to have an AP IRQ associated. I can't find any
> > reference to it on downstream kernel and the docs.
> >
> > >
> > > Additionally, there's no clocks property? For an onboard RTC I'd have
> > > expected there to be a clock sourced outside of the block.
>
> What about the clock?
I'll fix this in v2.
>
> > >
> > > > +
> > > > +additionalProperties: false
> > > > +
> > > > +examples:
> > > > + - |
> > > > + rtc@1a06000 {
> > > > + compatible = "rda,8810pl-rtc";
> > > > + reg = <0x1a06000 0x1000>;
> > > > + };
> > > >
> > > > --
> > > > 2.51.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 06/25] rtc: Add driver for RDA Micro SoC
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
` (4 preceding siblings ...)
2025-09-16 20:07 ` [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-16 20:07 ` [PATCH 07/25] ARM: dts: unisoc: rda8810pl: Enable Real-Time Clock Dang Huynh
` (3 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
The RDA Micro SoC has built-in RTC, it supports read/write date
as well as alarm.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
MAINTAINERS | 6 +
drivers/rtc/Kconfig | 11 ++
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-rda.c | 356 ++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 374 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index fa7f80bd7b2f8bd2099acb9f38070498e7b1cc7e..0549b1d0657f2caaf86a723db139cf9d84d59c4a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21393,6 +21393,12 @@ S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git rcu/dev
F: tools/testing/selftests/rcutorture
+RDA MICRO REAL TIME CLOCK DRIVER
+M: Dang Huynh <dang.huynh@mainlining.org>
+S: Maintained
+F: Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
+F: drivers/rtc/rtc-rda.c
+
RDACM20 Camera Sensor
M: Jacopo Mondi <jacopo+renesas@jmondi.org>
M: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 64f6e9756aff4a1f6f6c50f9b4fc2140f66a8578..287fc3bbd474ab78a9bd3b8813e8b9d475c07198 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1471,6 +1471,17 @@ config RTC_DRV_OMAP
This driver can also be built as a module, if so, module
will be called rtc-omap.
+config RTC_DRV_RDA
+ tristate "RDA Micro RTC"
+ depends on ARCH_RDA || COMPILE_TEST
+ select REGMAP_MMIO
+ help
+ If you say yes here you get support for the built-in RTC on
+ RDA Micro SoC.
+
+ This driver can also be built as a module, if so, the module
+ will be called rtc-rda.
+
config RTC_DRV_S3C
tristate "Samsung S3C series SoC RTC"
depends on ARCH_EXYNOS || ARCH_S3C64XX || ARCH_S5PV210 || \
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index 789bddfea99d8fcd024566891c37ee73e527cf93..02f73062bb158fe4738a3043c58ee40f8a58b3c6 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -141,6 +141,7 @@ obj-$(CONFIG_RTC_DRV_PS3) += rtc-ps3.o
obj-$(CONFIG_RTC_DRV_PXA) += rtc-pxa.o
obj-$(CONFIG_RTC_DRV_R7301) += rtc-r7301.o
obj-$(CONFIG_RTC_DRV_R9701) += rtc-r9701.o
+obj-$(CONFIG_RTC_DRV_RDA) += rtc-rda.o
obj-$(CONFIG_RTC_DRV_RC5T583) += rtc-rc5t583.o
obj-$(CONFIG_RTC_DRV_RC5T619) += rtc-rc5t619.o
obj-$(CONFIG_RTC_DRV_RK808) += rtc-rk808.o
diff --git a/drivers/rtc/rtc-rda.c b/drivers/rtc/rtc-rda.c
new file mode 100644
index 0000000000000000000000000000000000000000..bb5aa25fb7d0ad538a0f7f67a80d08fe67af1c5d
--- /dev/null
+++ b/drivers/rtc/rtc-rda.c
@@ -0,0 +1,356 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * RTC driver for RDA Micro
+ *
+ * Copyright (C) 2013-2014 RDA Microelectronics Inc.
+ * Copyright (C) 2024 Dang Huynh <dang.huynh@mainlining.org>
+ */
+
+#include <linux/of.h>
+#include <linux/module.h>
+#include <linux/rtc.h>
+#include <linux/platform_device.h>
+#include <linux/pm.h>
+#include <linux/regmap.h>
+
+struct rda_rtc {
+ struct rtc_device *rtc_dev;
+ struct regmap *regmap;
+};
+
+/* RTC Registers */
+#define RDA_RTC_CTRL_REG 0x0
+#define RDA_RTC_CMD_REG 0x4
+#define RDA_RTC_STA_REG 0x8
+#define RDA_RTC_CAL_LOAD_LOW_REG 0xC
+#define RDA_RTC_CAL_LOAD_HIGH_REG 0x10
+#define RDA_RTC_CUR_LOAD_LOW_REG 0x14
+#define RDA_RTC_CUR_LOAD_HIGH_REG 0x18
+#define RDA_RTC_ALARM_LOW_REG 0x1C
+#define RDA_RTC_ALARM_HIGH_REG 0x20
+
+/* RTC Bits */
+#define RDA_RTC_CMD_CAL_LOAD BIT(0)
+#define RDA_RTC_CMD_ALARM_LOAD BIT(4)
+#define RDA_RTC_CMD_ALARM_ENABLE BIT(5)
+#define RDA_RTC_CMD_ALARM_DISABLE BIT(6)
+#define RDA_RTC_CMD_INVALID BIT(31)
+#define RDA_RTC_STA_ALARM_ENABLE BIT(20)
+#define RDA_RTC_STA_NOT_PROG BIT(31)
+
+/* RTC Masks */
+#define RDA_SEC_MASK GENMASK(7, 0)
+#define RDA_MIN_MASK GENMASK(15, 8)
+#define RDA_HRS_MASK GENMASK(23, 16)
+
+#define RDA_MDAY_MASK GENMASK(7, 0)
+#define RDA_MON_MASK GENMASK(11, 8)
+#define RDA_YEAR_MASK GENMASK(22, 16)
+#define RDA_WDAY_MASK GENMASK(26, 24)
+
+static int rda_rtc_settime(struct device *dev, struct rtc_time *tm)
+{
+ struct rda_rtc *rtc = dev_get_drvdata(dev);
+ u32 high, low;
+ int ret;
+
+ ret = rtc_valid_tm(tm);
+ if (ret < 0)
+ return ret;
+
+ /*
+ * The number of years since 1900 in kernel,
+ * but it is defined since 2000 by HW.
+ * The number of mons' range is from 0 to 11 in kernel,
+ * but it is defined from 1 to 12 by HW.
+ */
+ low = FIELD_PREP(RDA_SEC_MASK, tm->tm_sec) |
+ FIELD_PREP(RDA_MIN_MASK, tm->tm_min) |
+ FIELD_PREP(RDA_HRS_MASK, tm->tm_hour);
+
+ high = FIELD_PREP(RDA_MDAY_MASK, tm->tm_mday) |
+ FIELD_PREP(RDA_MON_MASK, tm->tm_mon + 1) |
+ FIELD_PREP(RDA_YEAR_MASK, tm->tm_year - 100) |
+ FIELD_PREP(RDA_WDAY_MASK, tm->tm_wday);
+
+ ret = regmap_write(rtc->regmap, RDA_RTC_CAL_LOAD_LOW_REG, low);
+ if (ret < 0) {
+ dev_err(dev, "Failed to update RTC low register: %d\n", ret);
+ return ret;
+ }
+
+ ret = regmap_write(rtc->regmap, RDA_RTC_CAL_LOAD_HIGH_REG, high);
+ if (ret < 0) {
+ dev_err(dev, "Failed to update RTC low register: %d\n", ret);
+ return ret;
+ }
+
+ ret = regmap_update_bits(rtc->regmap, RDA_RTC_CMD_REG, RDA_RTC_CMD_CAL_LOAD, 1);
+ if (ret < 0) {
+ dev_err(dev, "Failed to update RTC cal load register: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int rda_rtc_readtime(struct device *dev, struct rtc_time *tm)
+{
+ struct rda_rtc *rtc = dev_get_drvdata(dev);
+ unsigned int high, low;
+ int ret;
+
+ /*
+ * Check if RTC data is valid.
+ *
+ * When this bit is set, it means the data in the RTC is invalid
+ * or not configured.
+ */
+ ret = regmap_test_bits(rtc->regmap, RDA_RTC_STA_REG, RDA_RTC_STA_NOT_PROG);
+ if (ret < 0) {
+ dev_err(dev, "Failed to read RTC status: %d\n", ret);
+ return ret;
+ } else if (ret > 0)
+ return -EINVAL;
+
+ ret = regmap_read(rtc->regmap, RDA_RTC_CUR_LOAD_HIGH_REG, &high);
+ if (ret) {
+ dev_err(dev, "Failed to read RTC high reg: %d\n", ret);
+ return ret;
+ }
+
+ ret = regmap_read(rtc->regmap, RDA_RTC_CUR_LOAD_LOW_REG, &low);
+ if (ret) {
+ dev_err(dev, "Failed to read RTC low reg: %d\n", ret);
+ return ret;
+ }
+
+ tm->tm_sec = FIELD_GET(RDA_SEC_MASK, low);
+ tm->tm_min = FIELD_GET(RDA_MIN_MASK, low);
+ tm->tm_hour = FIELD_GET(RDA_HRS_MASK, low);
+ tm->tm_mday = FIELD_GET(RDA_MDAY_MASK, high);
+ tm->tm_mon = FIELD_GET(RDA_MON_MASK, high);
+ tm->tm_year = FIELD_GET(RDA_YEAR_MASK, high);
+ tm->tm_wday = FIELD_GET(RDA_WDAY_MASK, high);
+
+ /*
+ * The number of years since 1900 in kernel,
+ * but it is defined since 2000 by HW.
+ */
+ tm->tm_year += 100;
+ /*
+ * The number of mons' range is from 0 to 11 in kernel,
+ * but it is defined from 1 to 12 by HW.
+ */
+ tm->tm_mon -= 1;
+
+ return 0;
+}
+
+static int rda_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm)
+{
+ struct rda_rtc *rtc = dev_get_drvdata(dev);
+ struct rtc_time *tm = &alrm->time;
+ unsigned int high, low;
+ int ret;
+
+ ret = regmap_read(rtc->regmap, RDA_RTC_ALARM_HIGH_REG, &high);
+ if (ret) {
+ dev_err(dev, "Failed to read alarm low reg: %d\n", ret);
+ return ret;
+ }
+
+ ret = regmap_read(rtc->regmap, RDA_RTC_ALARM_LOW_REG, &low);
+ if (ret) {
+ dev_err(dev, "Failed to read alarm low reg: %d\n", ret);
+ return ret;
+ }
+
+ tm->tm_sec = FIELD_GET(RDA_SEC_MASK, low);
+ tm->tm_min = FIELD_GET(RDA_MIN_MASK, low);
+ tm->tm_hour = FIELD_GET(RDA_HRS_MASK, low);
+ tm->tm_mday = FIELD_GET(RDA_MDAY_MASK, high);
+ tm->tm_mon = FIELD_GET(RDA_MON_MASK, high);
+ tm->tm_year = FIELD_GET(RDA_YEAR_MASK, high);
+ tm->tm_wday = FIELD_GET(RDA_WDAY_MASK, high);
+
+ /*
+ * The number of years since 1900 in kernel,
+ * but it is defined since 2000 by HW.
+ */
+ tm->tm_year += 100;
+ /*
+ * The number of mons' range is from 0 to 11 in kernel,
+ * but it is defined from 1 to 12 by HW.
+ */
+ tm->tm_mon -= 1;
+
+ return 0;
+}
+
+static int rda_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
+{
+ struct rda_rtc *rtc = dev_get_drvdata(dev);
+
+ if (enabled)
+ return regmap_update_bits(rtc->regmap, RDA_RTC_CMD_REG,
+ RDA_RTC_CMD_ALARM_ENABLE, 1);
+
+ return regmap_update_bits(rtc->regmap, RDA_RTC_CMD_REG,
+ RDA_RTC_CMD_ALARM_DISABLE, 1);
+}
+
+static int rda_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
+{
+ struct rda_rtc *rtc = dev_get_drvdata(dev);
+ struct rtc_time *tm = &alrm->time;
+ u32 high, low;
+ int ret;
+
+ ret = rtc_valid_tm(tm);
+ if (ret < 0)
+ return ret;
+
+ /* TODO: Check if it's necessary to disable IRQ first */
+ rda_rtc_alarm_irq_enable(dev, 0);
+
+ /*
+ * The number of years since 1900 in kernel,
+ * but it is defined since 2000 by HW.
+ * The number of mons' range is from 0 to 11 in kernel,
+ * but it is defined from 1 to 12 by HW.
+ */
+ low = FIELD_PREP(RDA_SEC_MASK, tm->tm_sec) |
+ FIELD_PREP(RDA_MIN_MASK, tm->tm_min) |
+ FIELD_PREP(RDA_HRS_MASK, tm->tm_hour);
+
+ high = FIELD_PREP(RDA_MDAY_MASK, tm->tm_mday) |
+ FIELD_PREP(RDA_MON_MASK, tm->tm_mon + 1) |
+ FIELD_PREP(RDA_YEAR_MASK, tm->tm_year - 100) |
+ FIELD_PREP(RDA_WDAY_MASK, tm->tm_wday);
+
+
+ ret = regmap_write(rtc->regmap, RDA_RTC_ALARM_LOW_REG, low);
+ if (ret < 0) {
+ dev_err(dev, "Failed to set low alarm register: %d\n", ret);
+ return ret;
+ }
+
+ ret = regmap_write(rtc->regmap, RDA_RTC_ALARM_HIGH_REG, high);
+ if (ret < 0) {
+ dev_err(dev, "Failed to set low alarm register: %d\n", ret);
+ return ret;
+ }
+
+ ret = regmap_update_bits(rtc->regmap, RDA_RTC_CMD_REG, RDA_RTC_CMD_ALARM_LOAD, 1);
+ if (ret < 0) {
+ dev_err(dev, "Failed to set alarm register: %d\n", ret);
+ return ret;
+ }
+
+ dev_dbg(dev, "Alarm set: %4d-%02d-%02d %02d:%02d:%02d\n",
+ 2000 + (tm->tm_year - 100), tm->tm_mon + 1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
+
+ return 0;
+}
+
+static int rda_rtc_proc(struct device *dev, struct seq_file *seq)
+{
+ struct rda_rtc *rtc = dev_get_drvdata(dev);
+ int ret;
+
+ ret = regmap_test_bits(rtc->regmap, RDA_RTC_STA_REG, RDA_RTC_STA_ALARM_ENABLE);
+ if (ret < 0) {
+ dev_err(dev, "Failed to read alarm status: %d\n", ret);
+ return ret;
+ }
+
+ seq_printf(seq, "alarm enable\t: %s\n", (ret > 0) ? "yes" : "no");
+
+ return 0;
+}
+
+static const struct rtc_class_ops rda_rtc_ops = {
+ .read_time = rda_rtc_readtime,
+ .set_time = rda_rtc_settime,
+ .read_alarm = rda_rtc_readalarm,
+ .set_alarm = rda_rtc_setalarm,
+ .proc = rda_rtc_proc,
+ .alarm_irq_enable = rda_rtc_alarm_irq_enable,
+};
+
+#ifdef CONFIG_PM_SLEEP
+static int rda_rtc_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ /* TODO: Check if it's okay to turn on alarm IRQ when it's not set */
+ return rda_rtc_alarm_irq_enable(&pdev->dev, 1);
+}
+
+static int rda_rtc_resume(struct platform_device *pdev)
+{
+ /* If alarms were left, we turn them off. */
+ return rda_rtc_alarm_irq_enable(&pdev->dev, 0);
+}
+#endif
+
+static SIMPLE_DEV_PM_OPS(rda_rtc_pm_ops, rda_rtc_suspend, rda_rtc_resume);
+
+static const struct regmap_config regmap_config = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+};
+
+static int rda_rtc_probe(struct platform_device *pdev)
+{
+ struct rda_rtc *rda_rtc;
+ void __iomem *base;
+
+ rda_rtc = devm_kzalloc(&pdev->dev, sizeof(*rda_rtc), GFP_KERNEL);
+ if (!rda_rtc)
+ return -ENOMEM;
+
+ base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(base))
+ return dev_err_probe(&pdev->dev, PTR_ERR(base),
+ "failed to remap resource\n");
+
+ rda_rtc->regmap = devm_regmap_init_mmio(&pdev->dev, base, ®map_config);
+ if (!rda_rtc->regmap)
+ return dev_err_probe(&pdev->dev, PTR_ERR(rda_rtc->regmap),
+ "can't find regmap\n");
+
+ rda_rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev);
+ if (IS_ERR(rda_rtc->rtc_dev))
+ return dev_err_probe(&pdev->dev, PTR_ERR(rda_rtc->rtc_dev),
+ "failed to allocate rtc device\n");
+
+ rda_rtc->rtc_dev->ops = &rda_rtc_ops;
+ rda_rtc->rtc_dev->range_min = RTC_TIMESTAMP_BEGIN_2000;
+ rda_rtc->rtc_dev->range_max = RTC_TIMESTAMP_END_2127;
+
+ platform_set_drvdata(pdev, rda_rtc);
+
+ return devm_rtc_register_device(rda_rtc->rtc_dev);
+}
+
+static const struct of_device_id rda_rtc_id_table[] = {
+ { .compatible = "rda,8810pl-rtc", },
+ { /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, rda_rtc_id_table);
+
+static struct platform_driver rda_rtc_driver = {
+ .probe = rda_rtc_probe,
+ .driver = {
+ .name = "rtc-rda",
+ .pm = &rda_rtc_pm_ops,
+ .of_match_table = rda_rtc_id_table,
+ },
+};
+module_platform_driver(rda_rtc_driver);
+
+MODULE_AUTHOR("Dang Huynh <dang.huynh@mainlining.org>");
+MODULE_DESCRIPTION("RDA Micro RTC driver");
+MODULE_LICENSE("GPL");
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH 07/25] ARM: dts: unisoc: rda8810pl: Enable Real-Time Clock
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
` (5 preceding siblings ...)
2025-09-16 20:07 ` [PATCH 06/25] rtc: Add driver for RDA Micro SoC Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-16 20:07 ` [PATCH 08/25] ARM: dts: unisoc: rda8810pl: Enable ARM PMU Dang Huynh
` (2 subsequent siblings)
9 siblings, 0 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
The RDA8810PL has built-in RTC.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
arch/arm/boot/dts/unisoc/rda8810pl.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/unisoc/rda8810pl.dtsi b/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
index 6553fc102c6751696e75e4de614fc3428d182061..609359aa91537168435934077e736b216adf50f4 100644
--- a/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
+++ b/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
@@ -39,6 +39,11 @@ modem@10000000 {
#size-cells = <1>;
ranges = <0x0 0x10000000 0xfffffff>;
+ rtc@1a06000 {
+ compatible = "rda,8810pl-rtc";
+ reg = <0x1a06000 0x1000>;
+ };
+
gpioc: gpioc@1a08000 {
compatible = "rda,8810pl-gpio";
reg = <0x1a08000 0x1000>;
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH 08/25] ARM: dts: unisoc: rda8810pl: Enable ARM PMU
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
` (6 preceding siblings ...)
2025-09-16 20:07 ` [PATCH 07/25] ARM: dts: unisoc: rda8810pl: Enable Real-Time Clock Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-16 20:07 ` [PATCH 09/25] dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller Dang Huynh
2025-09-16 20:26 ` [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Alexandre Belloni
9 siblings, 0 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
The SoC uses a standard ARM PMU, enable it.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
arch/arm/boot/dts/unisoc/rda8810pl.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/unisoc/rda8810pl.dtsi b/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
index 609359aa91537168435934077e736b216adf50f4..45a2fd3e04cea5aac4fb6b40a6b332ce3eee4f2c 100644
--- a/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
+++ b/arch/arm/boot/dts/unisoc/rda8810pl.dtsi
@@ -6,6 +6,7 @@
* Copyright (c) 2018 Manivannan Sadhasivam
*/
+#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
@@ -25,6 +26,11 @@ cpu@0 {
};
};
+ pmu {
+ compatible = "arm,cortex-a5-pmu";
+ interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
sram@100000 {
compatible = "mmio-sram";
reg = <0x100000 0x10000>;
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* [PATCH 09/25] dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
` (7 preceding siblings ...)
2025-09-16 20:07 ` [PATCH 08/25] ARM: dts: unisoc: rda8810pl: Enable ARM PMU Dang Huynh
@ 2025-09-16 20:07 ` Dang Huynh
2025-09-17 20:40 ` Conor Dooley
2025-09-16 20:26 ` [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Alexandre Belloni
9 siblings, 1 reply; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:07 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson
Cc: linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc, Dang Huynh
Add documentation describing the RDA8810PL Clock and Reset
controller.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
.../bindings/clock/rda,8810pl-apsyscon.yaml | 44 ++++++++++++
include/dt-bindings/clock/rda,8810pl-apclk.h | 79 ++++++++++++++++++++++
2 files changed, 123 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/rda,8810pl-apsyscon.yaml b/Documentation/devicetree/bindings/clock/rda,8810pl-apsyscon.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..988b609403a96abc4964ab366daa6fec0514595c
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/rda,8810pl-apsyscon.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/rda,8810pl-apsyscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RDA Micro RDA8810PL AP Clock Controller
+
+maintainers:
+ - Dang Huynh <dang.huynh@mainlining.org>
+
+properties:
+ compatible:
+ items:
+ - const: rda,8810pl-apsyscon
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+ '#clock-cells':
+ const: 1
+
+ '#reset-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - "#clock-cells"
+ - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/rda,8810pl-apclk.h>
+
+ ap_syscon: syscon@0 {
+ compatible = "rda,8810pl-apsyscon", "syscon";
+ reg = <0x0 0x1000>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
diff --git a/include/dt-bindings/clock/rda,8810pl-apclk.h b/include/dt-bindings/clock/rda,8810pl-apclk.h
new file mode 100644
index 0000000000000000000000000000000000000000..372358e72436a28c0775519f49626c9c5f4c6046
--- /dev/null
+++ b/include/dt-bindings/clock/rda,8810pl-apclk.h
@@ -0,0 +1,79 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
+
+#ifndef _DT_BINDINGS_CLK_RDA8810_H_
+#define _DT_BINDINGS_CLK_RDA8810_H_
+
+/* soc clocks */
+#define CLK_CPU 0
+#define CLK_BUS 1
+#define CLK_MEM 2
+
+#define CLK_USB 3
+#define CLK_AXI 4
+#define CLK_GCG 5
+#define CLK_AHB1 6
+#define CLK_APB1 7
+#define CLK_APB2 8
+
+#define CLK_GPU 9
+#define CLK_VPU 10
+#define CLK_VOC 11
+#define CLK_SFLSH 12
+
+#define CLK_UART1 13
+#define CLK_UART2 14
+#define CLK_UART3 15
+
+#define CLK_VOC2 16
+#define CLK_EMMC 17
+
+#define CLK_COUNT (CLK_EMMC + 1)
+
+/* resets */
+#define RST_CPU 0
+
+#define RST_AXI_VOC 1
+#define RST_AXI_DMA 2
+#define RST_AXI_CONNECT 3
+#define RST_AXI_VPU 4
+
+#define RST_GCG_GOUDA 5
+#define RST_GCG_CAMERA 6
+#define RST_GCG_LCDC 7
+
+#define RST_AHB1_USBC 8
+#define RST_AHB1_SPIFLASH 9
+
+#define RST_APB1_TIMER 10
+#define RST_APB1_KEYPAD 11
+#define RST_APB1_GPIO 12
+#define RST_APB1_PWM 13
+#define RST_APB1_AIF 14
+#define RST_APB1_AUIFC 15
+#define RST_APB1_I2C1 16
+#define RST_APB1_I2C2 17
+#define RST_APB1_I2C3 18
+#define RST_APB1_COMREGS 19
+#define RST_APB1_DMC 20
+#define RST_APB1_DDRPHY_P 21
+
+#define RST_APB2_IFC 22
+#define RST_APB2_UART1 23
+#define RST_APB2_UART2 24
+#define RST_APB2_UART3 25
+#define RST_APB2_SPI1 26
+#define RST_APB2_SPI2 27
+#define RST_APB2_SPI3 28
+#define RST_APB2_SDMMC1 29
+#define RST_APB2_SDMMC2 30
+#define RST_APB2_SDMMC3 31
+#define RST_APB2_NAND 32
+
+#define RST_MEM_GPU 33
+#define RST_MEM_VPU 34
+#define RST_MEM_DMC 35
+#define RST_MEM_DDRPHY_P 36
+
+#define RST_COUNT (RST_MEM_DDRPHY_P + 1)
+
+#endif /* _DT_BINDINGS_CLK_RDA8810_H_ */
--
2.51.0
^ permalink raw reply related [flat|nested] 22+ messages in thread* Re: [PATCH 09/25] dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller
2025-09-16 20:07 ` [PATCH 09/25] dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller Dang Huynh
@ 2025-09-17 20:40 ` Conor Dooley
0 siblings, 0 replies; 22+ messages in thread
From: Conor Dooley @ 2025-09-17 20:40 UTC (permalink / raw)
To: Dang Huynh
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Alexandre Belloni, Michael Turquette, Stephen Boyd, Philipp Zabel,
Sebastian Reichel, Vinod Koul, Kees Cook, Gustavo A. R. Silva,
Ulf Hansson, linux-arm-kernel, linux-unisoc, devicetree,
linux-kernel, linux-gpio, linux-rtc, linux-clk, linux-pm,
dmaengine, linux-hardening, linux-mmc
[-- Attachment #1: Type: text/plain, Size: 4076 bytes --]
On Wed, Sep 17, 2025 at 03:07:26AM +0700, Dang Huynh wrote:
> Add documentation describing the RDA8810PL Clock and Reset
> controller.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
> .../bindings/clock/rda,8810pl-apsyscon.yaml | 44 ++++++++++++
> include/dt-bindings/clock/rda,8810pl-apclk.h | 79 ++++++++++++++++++++++
> 2 files changed, 123 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/clock/rda,8810pl-apsyscon.yaml b/Documentation/devicetree/bindings/clock/rda,8810pl-apsyscon.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..988b609403a96abc4964ab366daa6fec0514595c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/rda,8810pl-apsyscon.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/rda,8810pl-apsyscon.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RDA Micro RDA8810PL AP Clock Controller
> +
> +maintainers:
> + - Dang Huynh <dang.huynh@mainlining.org>
> +
> +properties:
> + compatible:
> + items:
> + - const: rda,8810pl-apsyscon
> + - const: syscon
> +
> + reg:
> + maxItems: 1
> +
> + '#clock-cells':
> + const: 1
> +
> + '#reset-cells':
> + const: 1
> +
> +required:
> + - compatible
> + - reg
> + - "#clock-cells"
> + - "#reset-cells"
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/rda,8810pl-apclk.h>
> +
> + ap_syscon: syscon@0 {
Drop the ap_syscon label, since it is unused.
> + compatible = "rda,8810pl-apsyscon", "syscon";
> + reg = <0x0 0x1000>;
> + #clock-cells = <1>;
> + #reset-cells = <1>;
> + };
> diff --git a/include/dt-bindings/clock/rda,8810pl-apclk.h b/include/dt-bindings/clock/rda,8810pl-apclk.h
> new file mode 100644
> index 0000000000000000000000000000000000000000..372358e72436a28c0775519f49626c9c5f4c6046
> --- /dev/null
> +++ b/include/dt-bindings/clock/rda,8810pl-apclk.h
> @@ -0,0 +1,79 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
> +
> +#ifndef _DT_BINDINGS_CLK_RDA8810_H_
> +#define _DT_BINDINGS_CLK_RDA8810_H_
> +
> +/* soc clocks */
> +#define CLK_CPU 0
> +#define CLK_BUS 1
> +#define CLK_MEM 2
> +
> +#define CLK_USB 3
> +#define CLK_AXI 4
> +#define CLK_GCG 5
> +#define CLK_AHB1 6
> +#define CLK_APB1 7
> +#define CLK_APB2 8
> +
> +#define CLK_GPU 9
> +#define CLK_VPU 10
> +#define CLK_VOC 11
> +#define CLK_SFLSH 12
> +
> +#define CLK_UART1 13
> +#define CLK_UART2 14
> +#define CLK_UART3 15
> +
> +#define CLK_VOC2 16
> +#define CLK_EMMC 17
> +
> +#define CLK_COUNT (CLK_EMMC + 1)
This is not permitted, if you need this define please add it to
the driver directly.
> +
> +/* resets */
> +#define RST_CPU 0
> +
> +#define RST_AXI_VOC 1
> +#define RST_AXI_DMA 2
> +#define RST_AXI_CONNECT 3
> +#define RST_AXI_VPU 4
> +
> +#define RST_GCG_GOUDA 5
> +#define RST_GCG_CAMERA 6
> +#define RST_GCG_LCDC 7
> +
> +#define RST_AHB1_USBC 8
> +#define RST_AHB1_SPIFLASH 9
> +
> +#define RST_APB1_TIMER 10
> +#define RST_APB1_KEYPAD 11
> +#define RST_APB1_GPIO 12
> +#define RST_APB1_PWM 13
> +#define RST_APB1_AIF 14
> +#define RST_APB1_AUIFC 15
> +#define RST_APB1_I2C1 16
> +#define RST_APB1_I2C2 17
> +#define RST_APB1_I2C3 18
> +#define RST_APB1_COMREGS 19
> +#define RST_APB1_DMC 20
> +#define RST_APB1_DDRPHY_P 21
> +
> +#define RST_APB2_IFC 22
> +#define RST_APB2_UART1 23
> +#define RST_APB2_UART2 24
> +#define RST_APB2_UART3 25
> +#define RST_APB2_SPI1 26
> +#define RST_APB2_SPI2 27
> +#define RST_APB2_SPI3 28
> +#define RST_APB2_SDMMC1 29
> +#define RST_APB2_SDMMC2 30
> +#define RST_APB2_SDMMC3 31
> +#define RST_APB2_NAND 32
> +
> +#define RST_MEM_GPU 33
> +#define RST_MEM_VPU 34
> +#define RST_MEM_DMC 35
> +#define RST_MEM_DDRPHY_P 36
> +
> +#define RST_COUNT (RST_MEM_DDRPHY_P + 1)
Ditto here.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver
2025-09-16 20:07 [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Dang Huynh
` (8 preceding siblings ...)
2025-09-16 20:07 ` [PATCH 09/25] dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller Dang Huynh
@ 2025-09-16 20:26 ` Alexandre Belloni
2025-09-16 20:33 ` Dang Huynh
9 siblings, 1 reply; 22+ messages in thread
From: Alexandre Belloni @ 2025-09-16 20:26 UTC (permalink / raw)
To: Dang Huynh
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Michael Turquette, Stephen Boyd, Philipp Zabel, Sebastian Reichel,
Vinod Koul, Kees Cook, Gustavo A. R. Silva, Ulf Hansson,
linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc
Hello,
On 17/09/2025 03:07:17+0700, Dang Huynh wrote:
> This patch series aims to add support for Clock/Reset, Real-Time Clock and
> SDMMC on the RDA Micro RDA8810PL platform.
>
What are the dependencies between the various drivers? Ho< do you expect
the patches to be merged?
If the RTC patches are independent, please send them separately.
> It also adds Intelligent Flow Controller (IOW, a DMA controller) which is
> important for working with this MMC IP.
>
> Tested on the Orange Pi 2G-IOT.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
> Dang Huynh (25):
> ARM: dts: unisoc: rda8810pl: Add label to GPIO nodes
> drivers: gpio: rda: Make IRQ optional
> dt-bindings: gpio: rda: Make interrupts optional
> rtc: Add timestamp for the end of 2127
> dt-bindings: rtc: Add RDA Micro RDA8810PL RTC
> rtc: Add driver for RDA Micro SoC
> ARM: dts: unisoc: rda8810pl: Enable Real-Time Clock
> ARM: dts: unisoc: rda8810pl: Enable ARM PMU
> dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller
> drivers: clk: Add Clock and Reset Driver for RDA Micro RDA8810PL SoC
> dts: unisoc: rda8810pl: Enable clock/reset driver
> dts: unisoc: rda8810pl: Add OPP for CPU and define L2 cache
> dts: unisoc: orangepi: Disable UART with no users
> dt-bindings: power: reset: Add RDA Micro Modem Reset
> power: reset: Add basic power reset driver for RDA8810PL
> dts: unisoc: rda8810pl: Enable modem reset
> drivers: gpio: rda: Make direction register unreadable
> dt-bindings: dma: Add RDA IFC DMA
> dmaengine: Add RDA IFC driver
> dts: unisoc: rda8810pl: Enable IFC
> dt-bindings: mmc: Add RDA SDMMC controller
> mmc: host: Add RDA Micro SD/MMC driver
> dts: unisoc: rda8810pl: Add SDMMC controllers
> dts: unisoc: orangepi-2g: Enable SD Card
> dts: unisoc: orangepi-i96: Enable SD Card
>
> .../bindings/clock/rda,8810pl-apsyscon.yaml | 44 ++
> Documentation/devicetree/bindings/dma/rda,ifc.yaml | 42 +
> .../devicetree/bindings/gpio/gpio-rda.yaml | 3 -
> Documentation/devicetree/bindings/mmc/rda,mmc.yaml | 91 +++
> .../bindings/power/reset/rda,md-reset.yaml | 36 +
> .../devicetree/bindings/rtc/rda,8810pl-rtc.yaml | 30 +
> MAINTAINERS | 30 +
> .../boot/dts/unisoc/rda8810pl-orangepi-2g-iot.dts | 24 +-
> .../arm/boot/dts/unisoc/rda8810pl-orangepi-i96.dts | 24 +-
> arch/arm/boot/dts/unisoc/rda8810pl.dtsi | 115 ++-
> drivers/clk/Kconfig | 1 +
> drivers/clk/Makefile | 1 +
> drivers/clk/rda/Kconfig | 14 +
> drivers/clk/rda/Makefile | 2 +
> drivers/clk/rda/clk-rda8810.c | 770 +++++++++++++++++++
> drivers/dma/Kconfig | 10 +
> drivers/dma/Makefile | 1 +
> drivers/dma/rda-ifc.c | 450 +++++++++++
> drivers/gpio/gpio-rda.c | 4 +-
> drivers/mmc/host/Kconfig | 12 +
> drivers/mmc/host/Makefile | 1 +
> drivers/mmc/host/rda-mmc.c | 853 +++++++++++++++++++++
> drivers/power/reset/Kconfig | 9 +
> drivers/power/reset/Makefile | 1 +
> drivers/power/reset/rda-reboot.c | 58 ++
> drivers/rtc/Kconfig | 11 +
> drivers/rtc/Makefile | 1 +
> drivers/rtc/rtc-rda.c | 356 +++++++++
> include/dt-bindings/clock/rda,8810pl-apclk.h | 79 ++
> include/dt-bindings/dma/rda-ifc.h | 28 +
> include/linux/rtc.h | 1 +
> 31 files changed, 3079 insertions(+), 23 deletions(-)
> ---
> base-commit: 590b221ed4256fd6c34d3dea77aa5bd6e741bbc1
> change-id: 20250916-rda8810pl-drivers-9a5271452635
>
> Best regards,
> --
> Dang Huynh <dang.huynh@mainlining.org>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 22+ messages in thread* Re: [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver
2025-09-16 20:26 ` [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver Alexandre Belloni
@ 2025-09-16 20:33 ` Dang Huynh
0 siblings, 0 replies; 22+ messages in thread
From: Dang Huynh @ 2025-09-16 20:33 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Linus Walleij, Bartosz Golaszewski,
Michael Turquette, Stephen Boyd, Philipp Zabel, Sebastian Reichel,
Vinod Koul, Kees Cook, Gustavo A. R. Silva, Ulf Hansson,
linux-arm-kernel, linux-unisoc, devicetree, linux-kernel,
linux-gpio, linux-rtc, linux-clk, linux-pm, dmaengine,
linux-hardening, linux-mmc
Hi,
On Tuesday, September 16, 2025 8:26:49 PM Coordinated Universal Time Alexandre
Belloni wrote:
> Hello,
>
> On 17/09/2025 03:07:17+0700, Dang Huynh wrote:
> > This patch series aims to add support for Clock/Reset, Real-Time Clock and
> > SDMMC on the RDA Micro RDA8810PL platform.
>
> What are the dependencies between the various drivers? Ho< do you expect
> the patches to be merged?
The MMC driver depends on the clock controller (for getting APB2 rates) and
IFC for transferring data.
>
> If the RTC patches are independent, please send them separately.
They're independent. Noted.
>
> > It also adds Intelligent Flow Controller (IOW, a DMA controller) which is
> > important for working with this MMC IP.
> >
> > Tested on the Orange Pi 2G-IOT.
> >
> > Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> > ---
> >
> > Dang Huynh (25):
> > ARM: dts: unisoc: rda8810pl: Add label to GPIO nodes
> > drivers: gpio: rda: Make IRQ optional
> > dt-bindings: gpio: rda: Make interrupts optional
> > rtc: Add timestamp for the end of 2127
> > dt-bindings: rtc: Add RDA Micro RDA8810PL RTC
> > rtc: Add driver for RDA Micro SoC
> > ARM: dts: unisoc: rda8810pl: Enable Real-Time Clock
> > ARM: dts: unisoc: rda8810pl: Enable ARM PMU
> > dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller
> > drivers: clk: Add Clock and Reset Driver for RDA Micro RDA8810PL SoC
> > dts: unisoc: rda8810pl: Enable clock/reset driver
> > dts: unisoc: rda8810pl: Add OPP for CPU and define L2 cache
> > dts: unisoc: orangepi: Disable UART with no users
> > dt-bindings: power: reset: Add RDA Micro Modem Reset
> > power: reset: Add basic power reset driver for RDA8810PL
> > dts: unisoc: rda8810pl: Enable modem reset
> > drivers: gpio: rda: Make direction register unreadable
> > dt-bindings: dma: Add RDA IFC DMA
> > dmaengine: Add RDA IFC driver
> > dts: unisoc: rda8810pl: Enable IFC
> > dt-bindings: mmc: Add RDA SDMMC controller
> > mmc: host: Add RDA Micro SD/MMC driver
> > dts: unisoc: rda8810pl: Add SDMMC controllers
> > dts: unisoc: orangepi-2g: Enable SD Card
> > dts: unisoc: orangepi-i96: Enable SD Card
> >
> > .../bindings/clock/rda,8810pl-apsyscon.yaml | 44 ++
> > Documentation/devicetree/bindings/dma/rda,ifc.yaml | 42 +
> > .../devicetree/bindings/gpio/gpio-rda.yaml | 3 -
> > Documentation/devicetree/bindings/mmc/rda,mmc.yaml | 91 +++
> > .../bindings/power/reset/rda,md-reset.yaml | 36 +
> > .../devicetree/bindings/rtc/rda,8810pl-rtc.yaml | 30 +
> > MAINTAINERS | 30 +
> > .../boot/dts/unisoc/rda8810pl-orangepi-2g-iot.dts | 24 +-
> > .../arm/boot/dts/unisoc/rda8810pl-orangepi-i96.dts | 24 +-
> > arch/arm/boot/dts/unisoc/rda8810pl.dtsi | 115 ++-
> > drivers/clk/Kconfig | 1 +
> > drivers/clk/Makefile | 1 +
> > drivers/clk/rda/Kconfig | 14 +
> > drivers/clk/rda/Makefile | 2 +
> > drivers/clk/rda/clk-rda8810.c | 770
> > +++++++++++++++++++ drivers/dma/Kconfig |
> > 10 +
> > drivers/dma/Makefile | 1 +
> > drivers/dma/rda-ifc.c | 450 +++++++++++
> > drivers/gpio/gpio-rda.c | 4 +-
> > drivers/mmc/host/Kconfig | 12 +
> > drivers/mmc/host/Makefile | 1 +
> > drivers/mmc/host/rda-mmc.c | 853
> > +++++++++++++++++++++ drivers/power/reset/Kconfig
> > | 9 +
> > drivers/power/reset/Makefile | 1 +
> > drivers/power/reset/rda-reboot.c | 58 ++
> > drivers/rtc/Kconfig | 11 +
> > drivers/rtc/Makefile | 1 +
> > drivers/rtc/rtc-rda.c | 356 +++++++++
> > include/dt-bindings/clock/rda,8810pl-apclk.h | 79 ++
> > include/dt-bindings/dma/rda-ifc.h | 28 +
> > include/linux/rtc.h | 1 +
> > 31 files changed, 3079 insertions(+), 23 deletions(-)
> >
> > ---
> > base-commit: 590b221ed4256fd6c34d3dea77aa5bd6e741bbc1
> > change-id: 20250916-rda8810pl-drivers-9a5271452635
> >
> > Best regards,
Best regards,
Dang
^ permalink raw reply [flat|nested] 22+ messages in thread