* Re: [PATCH 03/25] dt-bindings: gpio: rda: Make interrupts optional
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
In-Reply-To: <20250917-rda8810pl-drivers-v1-3-74866def1fe3@mainlining.org>
[-- 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
* Re: [PATCH 05/25] dt-bindings: rtc: Add RDA Micro RDA8810PL RTC
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
In-Reply-To: <20250917-rda8810pl-drivers-v1-5-74866def1fe3@mainlining.org>
[-- 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
* Re: [PATCH 09/25] dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller
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
In-Reply-To: <20250917-rda8810pl-drivers-v1-9-74866def1fe3@mainlining.org>
[-- 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
* [PATCH RESEND v5 2/2] clk: s2mps11: add support for S2MPG10 PMIC clock
From: André Draszik @ 2025-09-17 14:39 UTC (permalink / raw)
To: Krzysztof Kozlowski, Lee Jones, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Stephen Boyd, Russell King, Catalin Marinas, Will Deacon,
Alexandre Belloni
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-kernel, linux-samsung-soc, devicetree, linux-clk,
linux-arm-kernel, linux-rtc, André Draszik,
Krzysztof Kozlowski
In-Reply-To: <20250917-s2mpg10-v5-0-9f9c9c4a44d9@linaro.org>
Add support for Samsung's S2MPG10 PMIC clock, which is similar to the
existing PMIC clocks supported by this driver.
S2MPG10 has three clock outputs @ 32kHz: AP, peri1 and peri2.
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
drivers/clk/clk-s2mps11.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index d4e9c3577b35dec8d9ec67c489b7b5ae27211f55..ff7ce12a5da6b437b5c92b9a32dcaf9423647cde 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -11,6 +11,7 @@
#include <linux/regmap.h>
#include <linux/clk-provider.h>
#include <linux/platform_device.h>
+#include <linux/mfd/samsung/s2mpg10.h>
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s2mps13.h>
#include <linux/mfd/samsung/s2mps14.h>
@@ -140,6 +141,9 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
clk_data->num = S2MPS11_CLKS_NUM;
switch (hwid) {
+ case S2MPG10:
+ s2mps11_reg = S2MPG10_PMIC_RTCBUF;
+ break;
case S2MPS11X:
s2mps11_reg = S2MPS11_REG_RTC_CTRL;
break;
@@ -221,6 +225,7 @@ static void s2mps11_clk_remove(struct platform_device *pdev)
}
static const struct platform_device_id s2mps11_clk_id[] = {
+ { "s2mpg10-clk", S2MPG10},
{ "s2mps11-clk", S2MPS11X},
{ "s2mps13-clk", S2MPS13X},
{ "s2mps14-clk", S2MPS14X},
@@ -241,6 +246,9 @@ MODULE_DEVICE_TABLE(platform, s2mps11_clk_id);
*/
static const struct of_device_id s2mps11_dt_match[] __used = {
{
+ .compatible = "samsung,s2mpg10-clk",
+ .data = (void *)S2MPG10,
+ }, {
.compatible = "samsung,s2mps11-clk",
.data = (void *)S2MPS11X,
}, {
--
2.51.0.384.g4c02a37b29-goog
^ permalink raw reply related
* [PATCH RESEND v5 1/2] dt-bindings: clock: samsung,s2mps11: add s2mpg10
From: André Draszik @ 2025-09-17 14:39 UTC (permalink / raw)
To: Krzysztof Kozlowski, Lee Jones, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Stephen Boyd, Russell King, Catalin Marinas, Will Deacon,
Alexandre Belloni
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-kernel, linux-samsung-soc, devicetree, linux-clk,
linux-arm-kernel, linux-rtc, André Draszik
In-Reply-To: <20250917-s2mpg10-v5-0-9f9c9c4a44d9@linaro.org>
The Samsung S2MPG10 clock controller is similar to the existing clock
controllers supported by this binding. Register offsets / layout are
slightly different, so it needs its own compatible.
Acked-by: Stephen Boyd <sboyd@kernel.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml b/Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml
index d5296e6053a1881650b8e8ff2524ea01689b7395..91d455155a606a60ed2006e57709466ae8d72664 100644
--- a/Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml
+++ b/Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml
@@ -25,6 +25,7 @@ description: |
properties:
compatible:
enum:
+ - samsung,s2mpg10-clk
- samsung,s2mps11-clk
- samsung,s2mps13-clk # S2MPS13 and S2MPS15
- samsung,s2mps14-clk
--
2.51.0.384.g4c02a37b29-goog
^ permalink raw reply related
* [PATCH RESEND v5 0/2] Samsung S2MPG10 PMIC MFD-based drivers
From: André Draszik @ 2025-09-17 14:39 UTC (permalink / raw)
To: Krzysztof Kozlowski, Lee Jones, Rob Herring, Conor Dooley,
Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar, Michael Turquette,
Stephen Boyd, Russell King, Catalin Marinas, Will Deacon,
Alexandre Belloni
Cc: Peter Griffin, Tudor Ambarus, Will McVicker, kernel-team,
linux-kernel, linux-samsung-soc, devicetree, linux-clk,
linux-arm-kernel, linux-rtc, André Draszik,
Krzysztof Kozlowski
Original cover letter further down.
This is a resend of two patches from the original series that haven't
been merged yet. That series was merged except for the attached two
patches here. Other than rebasing against next-20250729 there are no
changes to them.
Lee, I think Stephen's intention was to get these two merged via the
MFD tree please.
Original cover letter:
----------------------
This series adds initial support for the Samsung S2MPG10 PMIC using the
MFD framework. This is a PMIC for mobile applications and is used on
the Google Pixel 6 and 6 Pro (oriole / raven).
*** dependency note ***
To compile, this depends on the Samsung ACPM driver in Linux next with
the following additional patches:
https://lore.kernel.org/all/20250324-acpm-atomic-v2-0-7d87746e1765@linaro.org/
https://lore.kernel.org/all/20250319-acpm-fixes-v2-0-ac2c1bcf322b@linaro.org/
https://lore.kernel.org/all/20250327-acpm-children-v1-0-0afe15ee2ff7@linaro.org/
*** dependency note end ***
+++ Kconfig update +++
There is a Kconfig symbol update in this series, because the existing
Samsung S2M driver has been split into core and transport (I2C & ACPM)
parts. CONFIG_MFD_SEC_CORE is now truly a core driver, and
the I2C code that was part of it is now enabled via CONFIG_MFD_SEC_I2C.
This was necessary because unlike the other S2M PMICs, S2MPG10 doesn't
talk via I2C, but via the Samsung ACPM firmware.
+++ Kconfig update end +++
This series must be applied in-order, due to interdependencies of some
of the patches. There are also various cleanup patches to the S2M
drivers. I've kept them ordered as:
* DT bindings (patches 1 ... 3)
* s2m mfd prep for adding S2MPG10 support (patches 4 ... 7)
* split S2M mfd driver into s2m-core and s2m-i2c, including the
kconfig symbol update (patch 8)
* S2MPG10 core driver (patch 9)
* s2m mfd driver cleanup patches (patches 10 ... 23)
* S2MPG10 clock driver (patch 24)
* s2m RTC prep for adding S2MPG10 (patch 25 ... 26)
* S2MPG10 RTC driver (patch 27)
* s2m RTC cleanup patches (patches 28 ... 31)
I realise these are many, but since some prep-work was required to be
able to add S2MPG anyway, I wanted to get the cleanup patches in as
well :-) Let me know if I should postpone them to a later date instead.
The S2MPG10 includes buck converters, various LDOs, power meters, RTC,
clock outputs, and additional GPIOs interfaces.
This series adds support in the top-level device driver, and for the
RTC and clock. Importantly, having the RTC driver allows to do a proper
reset of the system. Drivers or driver updates for the other components
will be added in future patches.
This will need a DT update for Oriole / Raven to enable this device. I
will send that out separately.
Cheers,
Andre'
Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Changes in v5:
- just a rebase & resend of the last two remaining patches
- no other changes
- Link to v4: https://lore.kernel.org/r/20250409-s2mpg10-v4-0-d66d5f39b6bf@linaro.org
Changes in v4:
- various updates to sec-acpm (patch 9, Lee)
- cache enum type in patch 25 (Krzysztof)
- collect tags
- Link to v3: https://lore.kernel.org/r/20250403-s2mpg10-v3-0-b542b3505e68@linaro.org
Changes in v3:
- Krzysztof:
- keep 'regulators' subnode required even for s2mpg10
- drop '$ref' and 'unevaluatedProperties' from pmic subnode, use
'additionalProperties' instead
- add some regulators to examples since s2mpg10 requires them as of
v3
- sec-acpm:
- use an enum for struct sec_acpm_bus_context::type
- consistent name space for all functions sec_pmic_acpm_... to be
similar to i2c and consistent in this file
- Link to v2: https://lore.kernel.org/r/20250328-s2mpg10-v2-0-b54dee33fb6b@linaro.org
Changes in v2:
- Rob:
- make PMIC node a child of ACPM, and all related changes (binding,
driver)
- Krzysztof:
- merge defconfig updates into patch changing the symbols (patch 8)
- split MODULE_AUTHOR update into a separate patch
- better alignment fix (patch 11)
- merge two s2dos05/s2mpu05 related patches into one (patch 14)
- myself:
- keep PMIC DT parsing in core, not in transport driver
- several updates in sec-acpm.c, see separate entries in patch 9
- fix typo in patch 17
- collect tags
- Link to v1: https://lore.kernel.org/r/20250323-s2mpg10-v1-0-d08943702707@linaro.org
---
André Draszik (2):
dt-bindings: clock: samsung,s2mps11: add s2mpg10
clk: s2mps11: add support for S2MPG10 PMIC clock
Documentation/devicetree/bindings/clock/samsung,s2mps11.yaml | 1 +
drivers/clk/clk-s2mps11.c | 8 ++++++++
2 files changed, 9 insertions(+)
---
base-commit: 54efec8782214652b331c50646013f8526570e8d
change-id: 20250321-s2mpg10-ef5d1ebd3043
Best regards,
--
André Draszik <andre.draszik@linaro.org>
^ permalink raw reply
* Re: [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver
From: Manivannan Sadhasivam @ 2025-09-17 10:03 UTC (permalink / raw)
To: dang.huynh
Cc: 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-0-9ca9184ca977@mainlining.org>
On Wed, Sep 17, 2025 at 03:24:57AM GMT, Dang Huynh via B4 Relay wrote:
> This patch series aims to add support for Clock/Reset, Real-Time Clock and
> SDMMC on the RDA Micro RDA8810PL platform.
>
> 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.
>
Thanks for work! Is it possible to split this patchset logically to ease
reviewing and also merging? It currently touches different subsystems and has 25
patches.
You could easily split this into different series adding Clock/Reset, RTC, IFC,
SDMMC and other misc patches in one series.
- Mani
> 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>
>
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply
* Re: [PATCH 17/25] drivers: gpio: rda: Make direction register unreadable
From: Bartosz Golaszewski @ 2025-09-17 8:00 UTC (permalink / raw)
To: dang.huynh
Cc: Dang Huynh via B4 Relay, linux-arm-kernel, linux-unisoc,
devicetree, linux-kernel, linux-gpio, linux-rtc, linux-clk,
linux-pm, dmaengine, linux-hardening, linux-mmc,
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
In-Reply-To: <20250917-rda8810pl-drivers-v1-17-9ca9184ca977@mainlining.org>
On Tue, 16 Sep 2025 22:25:14 +0200, Dang Huynh via B4 Relay
<devnull+dang.huynh.mainlining.org@kernel.org> said:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> The register doesn't like to be read, this causes the SD Card
> Card Detect GPIO to misbehaves in the OS.
>
Hi!
Sorry but this message is unintelligible, please say precisely what is going
on and why you need this and why it won't break existing users.
Also: the title should be "gpio: rda: ...".
Bartosz
> 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 b4db8553a2371ae407fdb7e681d0f82c4d9f74b7..56aaa9f33d29469dfb1bf86ed7b63c54b413c89c 100644
> --- a/drivers/gpio/gpio-rda.c
> +++ b/drivers/gpio/gpio-rda.c
> @@ -245,7 +245,7 @@ static int rda_gpio_probe(struct platform_device *pdev)
> .clr = rda_gpio->base + RDA_GPIO_CLR,
> .dirout = rda_gpio->base + RDA_GPIO_OEN_SET_OUT,
> .dirin = rda_gpio->base + RDA_GPIO_OEN_SET_IN,
> - .flags = BGPIOF_READ_OUTPUT_REG_SET,
> + .flags = BGPIOF_READ_OUTPUT_REG_SET | BGPIOF_UNREADABLE_REG_DIR,
> };
>
> ret = gpio_generic_chip_init(&rda_gpio->chip, &config);
>
> --
> 2.51.0
>
>
>
^ permalink raw reply
* Re: [PATCH v2 1/6] dt-bindings: rtc: Add ST m41t93
From: Krzysztof Kozlowski @ 2025-09-17 0:52 UTC (permalink / raw)
To: Akhilesh Patil
Cc: alexandre.belloni, krzk+dt, robh, conor+dt, skhan, linux-rtc,
devicetree, linux-kernel, akhileshpatilvnit
In-Reply-To: <20250915141951.GA3239298@bhairav-test.ee.iitb.ac.in>
On 15/09/2025 16:19, Akhilesh Patil wrote:
>>> +$id: http://devicetree.org/schemas/rtc/st,m41t93.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: ST M41T93 RTC and compatible
>>> +
>>> +maintainers:
>>> + - linux-rtc@vger.kernel.org
>>
>> Not much improved. This should be a person responsible/caring about this
>> hardware support in the kernel. Why would we want to take the binding if
>> no one cares about it?
>
> Okay. As per get_maintainer.pl, linux driver corresponding to this binding does not have a dedicated
> maintainer, hence it shows rtc subsystem maintainer (Alexandre Belloni).
And what did I express at v1?
> Looking forward for your suggestion here.
> What do you suggest to keep maintainer as Rob Herring or/and me ? as I see in
> such cases Rob is the maintainer.
No, I really doubt Rob cares about this particular hardware. Neither do
I, nor Conor.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 22/25] mmc: host: Add RDA Micro SD/MMC driver
From: Krzysztof Kozlowski @ 2025-09-17 0:48 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-22-9ca9184ca977@mainlining.org>
On 17/09/2025 22:25, Dang Huynh via B4 Relay wrote:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> RDA Micro RDA8810PL includes an SD/MMC controller. This controller
> supports SD/SDIO/MMC interface.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
> MAINTAINERS | 6 +
> drivers/mmc/host/Kconfig | 12 +
> drivers/mmc/host/Makefile | 1 +
> drivers/mmc/host/rda-mmc.c | 853 +++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 872 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 91be43782f4ba8aacb629002d357a66704f10b2b..33e04ce35dcc4cbadd715ec9199f2453237b8002 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -21417,6 +21417,12 @@ S: Maintained
> F: Documentation/devicetree/bindings/rtc/rda,8810pl-rtc.yaml
> F: drivers/rtc/rtc-rda.c
>
> +RDA MICRO SECURE DIGITAL AND MULTIMEDIA CARD DRIVER
> +M: Dang Huynh <dang.huynh@mainlining.org>
> +S: Maintained
> +F: Documentation/devicetree/bindings/mmc/rda,mmc.yaml
> +F: drivers/mmc/host/rda-mmc.c
> +
> RDACM20 Camera Sensor
> M: Jacopo Mondi <jacopo+renesas@jmondi.org>
> M: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 4afa0130779d97ca9d1c0ed2102b0babdedcaeeb..352a6eb4e30793b7311c7877c238a7fe31121123 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -1040,6 +1040,18 @@ config MMC_MTK
> This is needed if support for any SD/SDIO/MMC devices is required.
> If unsure, say N.
>
> +config MMC_RDA
> + tristate "RDA Micro SD/MMC Card Interface support"
> + depends on ARCH_RDA
Missing compile test
> + depends on COMMON_CLK
> + depends on HAS_DMA
> + help
> + This selects the RDA Micro Secure digital and Multimedia card interface. The
> + controller supports SD/SDIO/MMC interface.
> + If you have a board with RDA SoC and it uses this interface, say Y or M here.
> +
> + If unsure, say N.
...
> +};
> +MODULE_DEVICE_TABLE(of, rda_mmc_dt_ids);
> +
> +static struct platform_driver rda_mmc_driver = {
> + .probe = rda_mmc_probe,
> + .remove = rda_mmc_remove,
> + .driver = {
> + .name = "rda-mmc",
> + .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> + .of_match_table = rda_mmc_dt_ids,
> + },
> +};
> +module_platform_driver(rda_mmc_driver);
> +
> +MODULE_AUTHOR("Dang Huynh <dang.huynh@mainlining.org>");
> +MODULE_LICENSE("GPL");
> +MODULE_DESCRIPTION("MMC/SD driver for RDA platform");
> +MODULE_ALIAS("platform:rda-mmc");
You should not need MODULE_ALIAS() in normal cases. If you need it,
usually it means your device ID table is wrong (e.g. misses either
entries or MODULE_DEVICE_TABLE()). MODULE_ALIAS() is not a substitute
for incomplete ID table.
>
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 16/25] dts: unisoc: rda8810pl: Enable modem reset
From: Krzysztof Kozlowski @ 2025-09-17 0:46 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-16-9ca9184ca977@mainlining.org>
On 17/09/2025 22:25, Dang Huynh via B4 Relay wrote:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> This allows us to reboot the board from the OS.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
> arch/arm/boot/dts/unisoc/rda8810pl.dtsi | 5 +++++
> 1 file changed, 5 insertions(+)
Please don't do patch per one node. Add logical chunks, but not that
detailed. There are no dependencies here, so way you organize patches
and split them is just confusing.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 15/25] power: reset: Add basic power reset driver for RDA8810PL
From: Krzysztof Kozlowski @ 2025-09-17 0:45 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-15-9ca9184ca977@mainlining.org>
On 17/09/2025 22:25, Dang Huynh via B4 Relay wrote:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> This basic driver can only reboot, powering off requires the modem
> firmware which we don't have yet.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
> MAINTAINERS | 6 +++++
> drivers/power/reset/Kconfig | 9 +++++++
> drivers/power/reset/Makefile | 1 +
> drivers/power/reset/rda-reboot.c | 58 ++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 74 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index cbe2ab8af6dcd40dd1456d9df55673dace3c87b2..5ec24d8657bffb55c160947a930980e428c6a6b7 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -21399,6 +21399,12 @@ S: Maintained
> F: Documentation/devicetree/bindings/clock/rda,8810pl-apsyscon.yaml
> F: drivers/clk/rda/clk-rda8810.c
>
> +RDA MICRO MODEM RESET DRIVER
> +M: Dang Huynh <dang.huynh@mainlining.org>
> +S: Maintained
> +F: Documentation/devicetree/bindings/power/reset/rda,md-reset.yaml
> +F: drivers/power/reset/rda-reboot.c
> +
> RDA MICRO REAL TIME CLOCK DRIVER
> M: Dang Huynh <dang.huynh@mainlining.org>
> S: Maintained
> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> index 77ea3129c70806929f3c248667db42f05f5f1d27..de9b1afb94d14a5d23286ddb302af4107d649c12 100644
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
> @@ -205,6 +205,15 @@ config POWER_RESET_QNAP
>
> Say Y if you have a QNAP NAS.
>
> +config POWER_RESET_RDA
> + bool "RDA Micro Reset Driver"
> + depends on ARCH_RDA
|| COMPILE_TEST
everywhere, for all your drivers.
> + help
> + This driver supports soft resetting RDA Micro boards by writing
> + magic values to the modem register.
> +
> + Say Y if you have a board with RDA Micro SoC.
> +
> config POWER_RESET_REGULATOR
> bool "Regulator subsystem power-off driver"
> depends on OF && REGULATOR
> diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile
> index b7c2b5940be9971548a5527384d1931abff11c4c..14371230410dad2852489160f4fc23d8fd087d6e 100644
> --- a/drivers/power/reset/Makefile
> +++ b/drivers/power/reset/Makefile
> @@ -22,6 +22,7 @@ obj-$(CONFIG_POWER_RESET_ODROID_GO_ULTRA_POWEROFF) += odroid-go-ultra-poweroff.o
> obj-$(CONFIG_POWER_RESET_PIIX4_POWEROFF) += piix4-poweroff.o
> obj-$(CONFIG_POWER_RESET_LTC2952) += ltc2952-poweroff.o
> obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o
> +obj-$(CONFIG_POWER_RESET_RDA) += rda-reboot.o
> obj-$(CONFIG_POWER_RESET_REGULATOR) += regulator-poweroff.o
> obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o
> obj-$(CONFIG_POWER_RESET_ST) += st-poweroff.o
> diff --git a/drivers/power/reset/rda-reboot.c b/drivers/power/reset/rda-reboot.c
> new file mode 100644
> index 0000000000000000000000000000000000000000..d87b063ba67d847f8e869e50a6c01427b2866889
> --- /dev/null
> +++ b/drivers/power/reset/rda-reboot.c
> @@ -0,0 +1,58 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2025, Dang Huynh <dang.huynh@mainlining.org>
> + *
> + * Based on drivers/power/reset/msm-poweroff.c:
> + * Copyright (c) 2013, The Linux Foundation. All rights reserved.
> + */
> +
> +#include <linux/err.h>
> +#include <linux/init.h>
> +#include <linux/kernel.h>
> +#include <linux/io.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/module.h>
> +#include <linux/reboot.h>
> +#include <linux/pm.h>
> +#include <linux/mfd/syscon.h>
> +
> +static void __iomem *rda_md_sysctrl;
No, no singletons.
> +
> +static int do_rda_reboot(struct sys_off_data *data)
> +{
> + /* unprotect md registers */
> + writel(0x00A50001, rda_md_sysctrl);
> +
> + /* reset all */
> + writel(0x80000000, rda_md_sysctrl + 4);
> +
> + return NOTIFY_DONE;
> +}
> +
> +static int rda_reboot_probe(struct platform_device *pdev)
> +{
> + rda_md_sysctrl = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(rda_md_sysctrl))
> + return PTR_ERR(rda_md_sysctrl);
> +
> + devm_register_sys_off_handler(&pdev->dev, SYS_OFF_MODE_RESTART,
> + 128, do_rda_reboot, NULL);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id of_rda_reboot_match[] = {
> + { .compatible = "rda,md-reset", },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, of_rda_reboot_match);
> +
> +static struct platform_driver rda_reboot_driver = {
> + .probe = rda_reboot_probe,
> + .driver = {
> + .name = "rda-reboot",
> + .of_match_table = of_match_ptr(of_rda_reboot_match),
Drop of_match_ptr, you have warnings here.
> + },
> +};
> +builtin_platform_driver(rda_reboot_driver);
>
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 14/25] dt-bindings: power: reset: Add RDA Micro Modem Reset
From: Krzysztof Kozlowski @ 2025-09-17 0:44 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-14-9ca9184ca977@mainlining.org>
On 17/09/2025 22:25, Dang Huynh via B4 Relay wrote:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> Add documentation describing the RDA Micro modem reset controller
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
> .../bindings/power/reset/rda,md-reset.yaml | 36 ++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/power/reset/rda,md-reset.yaml b/Documentation/devicetree/bindings/power/reset/rda,md-reset.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..6d09bc8ee6b257aec9d2c4738d285490044003ea
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/power/reset/rda,md-reset.yaml
> @@ -0,0 +1,36 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/power/reset/rda,md-reset.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RDA Micro Modem Reset
What Modem? RDA created only one modem? Still wouldn't it have some
model number?
> +
> +maintainers:
> + - Dang Huynh <dang.huynh@mainlining.org>
> +
> +description:
> + The modem has a reset register that can be used to fully reset the board.
> +
> + To do that, a magic value needs to be written to unprotect the register,
> + then the soft reset register can be used.
> +
> +properties:
> + compatible:
> + const: rda,md-reset
Missing SoC compatible. Every SoC block needs one.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 09/25] dt-bindings: clock: Add RDA Micro RDA8810PL clock/reset controller
From: Krzysztof Kozlowski @ 2025-09-17 0:43 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-9-9ca9184ca977@mainlining.org>
On 17/09/2025 22:25, Dang Huynh via B4 Relay wrote:
> +
> +required:
> + - compatible
> + - reg
> + - "#clock-cells"
Use consistent quotes, either ' or "
> + - "#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)
Drop, not a binding.
> +
> +/* resets */
> +#define RST_CPU 0
Missing indentation before the values, everywhere.
> +
> +#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)
Drop, not a binding.
> +
> +#endif /* _DT_BINDINGS_CLK_RDA8810_H_ */
>
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 11/25] dts: unisoc: rda8810pl: Enable clock/reset driver
From: Krzysztof Kozlowski @ 2025-09-17 0:41 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-11-9ca9184ca977@mainlining.org>
On 17/09/2025 22:25, Dang Huynh via B4 Relay wrote:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> Enable RDA8810PL Clock and Reset driver so we can use it for various
> subsystems.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching. For bindings, the preferred subjects are
explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
You use random prefixes... This is "ARM: dts:" and the drivers ARE NOT
"drivers:".
> ---
> arch/arm/boot/dts/unisoc/rda8810pl.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 07/25] ARM: dts: unisoc: rda8810pl: Enable Real-Time Clock
From: Krzysztof Kozlowski @ 2025-09-17 0:40 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-7-9ca9184ca977@mainlining.org>
On 17/09/2025 22:25, Dang Huynh via B4 Relay wrote:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> The RDA8810PL has built-in RTC.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
DTS cannot be in the middle of patchset. Please stop creating this fake
dependencies.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 01/25] ARM: dts: unisoc: rda8810pl: Add label to GPIO nodes
From: Krzysztof Kozlowski @ 2025-09-17 0:39 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-1-9ca9184ca977@mainlining.org>
On 17/09/2025 22:24, Dang Huynh via B4 Relay wrote:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> So we can add devices to these GPIO nodes for each board.
No, it's pointless. Squash it with the user.
Also, way you organized patchset is just making things complicated. DTS
cannot be split all over it, like put randomly at the beginning, middle
and at the end.
Read DT submitting patches and maintainer soc rules.
>
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 21/25] dt-bindings: mmc: Add RDA SDMMC controller
From: Krzysztof Kozlowski @ 2025-09-17 0:00 UTC (permalink / raw)
To: dang.huynh, 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-21-9ca9184ca977@mainlining.org>
On 17/09/2025 22:25, Dang Huynh via B4 Relay wrote:
> From: Dang Huynh <dang.huynh@mainlining.org>
>
> Add documentation describing the SD/MMC controller in RDA Micro
> RDA8810PL SoC.
>
> Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
> ---
> Documentation/devicetree/bindings/mmc/rda,mmc.yaml | 91 ++++++++++++++++++++++
> 1 file changed, 91 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/rda,mmc.yaml b/Documentation/devicetree/bindings/mmc/rda,mmc.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..dfdd9c6d3044061c342519e35e39c7751874bb03
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/rda,mmc.yaml
filename based on compatible.
> @@ -0,0 +1,91 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mmc/rda,mmc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RDA Micro SD/MMC Controller
> +
> +allOf:
> + - $ref: mmc-controller.yaml
> +
> +maintainers:
> + - Dang Huynh <dang.huynh@mainlining.org>
> +
> +properties:
> + compatible:
> + const: rda,8810pl-mmc
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + const: apb
> +
> + resets:
> + maxItems: 1
> +
> + dmas:
> + minItems: 2
Drop
> + maxItems: 2
> +
> + dma-names:
> + items:
> + - const: tx
> + - const: rx
> +
> + rda,mclk-adj:
> + $ref: /schemas/types.yaml#/definitions/uint8
> + description:
> + Some board need MCLK to be adjusted for the card to work.
> + If not present, MCLK will be handled by an external PCLK.
Adjusted for what? What is the value exactly? Where is the MCLK located?
> + minimum: 0
> + maximum: 255
> +
> + rda,mclk-inv:
> + $ref: /schemas/types.yaml#/definitions/flag
> + description:
> + Some board need MCLK to be inverted for the card to work.
> + If not present, MCLK is not inverted.
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> + - resets
> + - dmas
> + - dma-names
> + - vmmc-supply
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/clock/rda,8810pl-apclk.h>
> + #include <dt-bindings/dma/rda-ifc.h>
> + mmc1: mmc@20950000 {
Drop unused label.
> + compatible = "rda,8810pl-mmc";
> + reg = <0x20950000 0x1000>;
> + interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&ap_syscon CLK_APB2>;
> + clock-names = "apb";
> + resets = <&ap_syscon RST_APB2_SDMMC1>;
> + dmas = <&ifc IFC_SDMMC1_TX>, <&ifc IFC_SDMMC1_RX>;
> + dma-names = "tx", "rx";
> + vmmc-supply = <&vdd_sdmmc>;
> + rda,mclk-adj = /bits/ 8 <1>;
> + rda,mclk-inv;
> + status = "disabled";
Cannot be disabled.
Best regards,
Krzysztof
^ permalink raw reply
* Re: (subset) [PATCH v13 0/7] spacemit: introduce P1 PMIC support
From: Mark Brown @ 2025-09-16 21:54 UTC (permalink / raw)
To: lee, lgirdwood, alexandre.belloni, robh, krzk+dt, conor+dt,
Alex Elder
Cc: mat.jonczyk, dlan, paul.walmsley, palmer, aou, alex, linux.amoon,
troymitchell988, guodong, linux-rtc, devicetree, linux-riscv,
spacemit, linux-kernel
In-Reply-To: <20250825172057.163883-1-elder@riscstar.com>
On Mon, 25 Aug 2025 12:20:49 -0500, Alex Elder wrote:
> The SpacemiT P1 is an I2C-controlled PMIC that implements 6 buck
> converters and 12 LDOs. It contains a load switch, ADC channels,
> GPIOs, a real-time clock, and a watchdog timer.
>
> This series introduces a multifunction driver for the P1 PMIC as
> well as drivers for its regulators and RTC.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[3/7] regulator: spacemit: support SpacemiT P1 regulators
commit: 8b84d712ad849172f6bbcad57534b284d942b0b5
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* Re: [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver
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
In-Reply-To: <2025091620264900a32db6@mail.local>
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
* Re: [PATCH 00/25] RDA8810PL Clock, RTC and MMC driver
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
In-Reply-To: <20250917-rda8810pl-drivers-v1-0-74866def1fe3@mainlining.org>
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
* [PATCH 25/25] dts: unisoc: orangepi-i96: Enable SD Card
From: Dang Huynh via B4 Relay @ 2025-09-16 20:25 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-0-9ca9184ca977@mainlining.org>
From: Dang Huynh <dang.huynh@mainlining.org>
Since we have a SDMMC controller, we can use the SD card slot on the
Orange Pi i96.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
arch/arm/boot/dts/unisoc/rda8810pl-orangepi-i96.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/unisoc/rda8810pl-orangepi-i96.dts b/arch/arm/boot/dts/unisoc/rda8810pl-orangepi-i96.dts
index a1d61ef138d12bb3ecb4b24513cc1a7dfbac3107..fbb7b5be62051627e80d940cb5e5ccff9047c13c 100644
--- a/arch/arm/boot/dts/unisoc/rda8810pl-orangepi-i96.dts
+++ b/arch/arm/boot/dts/unisoc/rda8810pl-orangepi-i96.dts
@@ -6,6 +6,7 @@
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include "rda8810pl.dtsi"
/ {
@@ -27,6 +28,13 @@ memory@80000000 {
reg = <0x80000000 0x10000000>;
};
+ vdd_sdmmc: regulator-fixed {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_sdmmc";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
uart_clk: uart-clk {
compatible = "fixed-clock";
clock-frequency = <921600>;
@@ -34,6 +42,18 @@ uart_clk: uart-clk {
};
};
+&mmc1 {
+ status = "okay";
+ no-sdio;
+ no-mmc;
+ bus-width = <4>;
+ max-frequency = <30000000>;
+ cd-gpios = <&gpiob 4 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <&vdd_sdmmc>;
+ rda,mclk-adj = /bits/ 8 <1>;
+ rda,mclk-inv;
+};
+
&uart3 {
status = "okay";
clocks = <&uart_clk>;
--
2.51.0
^ permalink raw reply related
* [PATCH 24/25] dts: unisoc: orangepi-2g: Enable SD Card
From: Dang Huynh via B4 Relay @ 2025-09-16 20:25 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-0-9ca9184ca977@mainlining.org>
From: Dang Huynh <dang.huynh@mainlining.org>
Since we have a SDMMC controller, we can use the SD card slot on the
Orange Pi 2G-IOT.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
.../boot/dts/unisoc/rda8810pl-orangepi-2g-iot.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/unisoc/rda8810pl-orangepi-2g-iot.dts b/arch/arm/boot/dts/unisoc/rda8810pl-orangepi-2g-iot.dts
index 46ccb9ad510c0df142b845d6fc5633b69c2298dd..f6b1a1485645f5714cdf14447cbee50e28e3c076 100644
--- a/arch/arm/boot/dts/unisoc/rda8810pl-orangepi-2g-iot.dts
+++ b/arch/arm/boot/dts/unisoc/rda8810pl-orangepi-2g-iot.dts
@@ -6,6 +6,7 @@
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include "rda8810pl.dtsi"
/ {
@@ -27,6 +28,13 @@ memory@80000000 {
reg = <0x80000000 0x10000000>;
};
+ vdd_sdmmc: regulator-fixed {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_sdmmc";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ };
+
uart_clk: uart-clk {
compatible = "fixed-clock";
clock-frequency = <921600>;
@@ -34,6 +42,18 @@ uart_clk: uart-clk {
};
};
+&mmc1 {
+ status = "okay";
+ no-sdio;
+ no-mmc;
+ bus-width = <4>;
+ max-frequency = <30000000>;
+ cd-gpios = <&gpiob 4 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <&vdd_sdmmc>;
+ rda,mclk-adj = /bits/ 8 <1>;
+ rda,mclk-inv;
+};
+
&uart3 {
status = "okay";
clocks = <&uart_clk>;
--
2.51.0
^ permalink raw reply related
* [PATCH 21/25] dt-bindings: mmc: Add RDA SDMMC controller
From: Dang Huynh via B4 Relay @ 2025-09-16 20:25 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-0-9ca9184ca977@mainlining.org>
From: Dang Huynh <dang.huynh@mainlining.org>
Add documentation describing the SD/MMC controller in RDA Micro
RDA8810PL SoC.
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
Documentation/devicetree/bindings/mmc/rda,mmc.yaml | 91 ++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/rda,mmc.yaml b/Documentation/devicetree/bindings/mmc/rda,mmc.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..dfdd9c6d3044061c342519e35e39c7751874bb03
--- /dev/null
+++ b/Documentation/devicetree/bindings/mmc/rda,mmc.yaml
@@ -0,0 +1,91 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/rda,mmc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RDA Micro SD/MMC Controller
+
+allOf:
+ - $ref: mmc-controller.yaml
+
+maintainers:
+ - Dang Huynh <dang.huynh@mainlining.org>
+
+properties:
+ compatible:
+ const: rda,8810pl-mmc
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: apb
+
+ resets:
+ maxItems: 1
+
+ dmas:
+ minItems: 2
+ maxItems: 2
+
+ dma-names:
+ items:
+ - const: tx
+ - const: rx
+
+ rda,mclk-adj:
+ $ref: /schemas/types.yaml#/definitions/uint8
+ description:
+ Some board need MCLK to be adjusted for the card to work.
+ If not present, MCLK will be handled by an external PCLK.
+ minimum: 0
+ maximum: 255
+
+ rda,mclk-inv:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Some board need MCLK to be inverted for the card to work.
+ If not present, MCLK is not inverted.
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - resets
+ - dmas
+ - dma-names
+ - vmmc-supply
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/clock/rda,8810pl-apclk.h>
+ #include <dt-bindings/dma/rda-ifc.h>
+ mmc1: mmc@20950000 {
+ compatible = "rda,8810pl-mmc";
+ reg = <0x20950000 0x1000>;
+ interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ap_syscon CLK_APB2>;
+ clock-names = "apb";
+ resets = <&ap_syscon RST_APB2_SDMMC1>;
+ dmas = <&ifc IFC_SDMMC1_TX>, <&ifc IFC_SDMMC1_RX>;
+ dma-names = "tx", "rx";
+ vmmc-supply = <&vdd_sdmmc>;
+ rda,mclk-adj = /bits/ 8 <1>;
+ rda,mclk-inv;
+ status = "disabled";
+ };
+
+...
--
2.51.0
^ permalink raw reply related
* [PATCH 14/25] dt-bindings: power: reset: Add RDA Micro Modem Reset
From: Dang Huynh via B4 Relay @ 2025-09-16 20:25 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
In-Reply-To: <20250917-rda8810pl-drivers-v1-0-9ca9184ca977@mainlining.org>
From: Dang Huynh <dang.huynh@mainlining.org>
Add documentation describing the RDA Micro modem reset controller
Signed-off-by: Dang Huynh <dang.huynh@mainlining.org>
---
.../bindings/power/reset/rda,md-reset.yaml | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/reset/rda,md-reset.yaml b/Documentation/devicetree/bindings/power/reset/rda,md-reset.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..6d09bc8ee6b257aec9d2c4738d285490044003ea
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/rda,md-reset.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/reset/rda,md-reset.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RDA Micro Modem Reset
+
+maintainers:
+ - Dang Huynh <dang.huynh@mainlining.org>
+
+description:
+ The modem has a reset register that can be used to fully reset the board.
+
+ To do that, a magic value needs to be written to unprotect the register,
+ then the soft reset register can be used.
+
+properties:
+ compatible:
+ const: rda,md-reset
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ reset-controller@1a00000 {
+ compatible = "rda,md-reset";
+ reg = <0x1a00000 0x4>;
+ };
--
2.51.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox