From: David Jander <david@protonic.nl>
To: barebox@lists.infradead.org
Cc: David Jander <david@protonic.nl>
Subject: [PATCH 5/8] aiodev: rockchip_saradc.c: Add support for RK3576
Date: Mon, 11 Aug 2025 08:40:23 +0200 [thread overview]
Message-ID: <20250811064026.753776-6-david@protonic.nl> (raw)
In-Reply-To: <20250811064026.753776-1-david@protonic.nl>
The RK3576 has a SARADC v2 with 8 channels and 12 bit resolution.
Signed-off-by: David Jander <david@protonic.nl>
---
drivers/aiodev/Kconfig | 2 +-
drivers/aiodev/rockchip_saradc.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/aiodev/Kconfig b/drivers/aiodev/Kconfig
index e1edc25320..1c7bf16546 100644
--- a/drivers/aiodev/Kconfig
+++ b/drivers/aiodev/Kconfig
@@ -60,7 +60,7 @@ config STM32_ADC
config ROCKCHIP_SARADC
tristate "Rockchip SARADC driver"
- depends on ARCH_RK3568 || COMPILE_TEST
+ depends on ARCH_RK3568 || ARCH_RK3576 || COMPILE_TEST
depends on OFDEVICE
help
Support for Successive Approximation Register (SAR) ADC in Rockchip
diff --git a/drivers/aiodev/rockchip_saradc.c b/drivers/aiodev/rockchip_saradc.c
index 152d38ecc5..f1efab5233 100644
--- a/drivers/aiodev/rockchip_saradc.c
+++ b/drivers/aiodev/rockchip_saradc.c
@@ -263,6 +263,12 @@ static const struct rockchip_saradc_cfg rk3568_saradc_cfg = {
.read = rockchip_saradc_read_v1,
};
+static const struct rockchip_saradc_cfg rk3576_saradc_cfg = {
+ .num_bits = 12,
+ .num_channels = 8,
+ .read = rockchip_saradc_read_v2,
+};
+
static const struct rockchip_saradc_cfg rk3588_saradc_cfg = {
.num_bits = 12,
.num_channels = 8,
@@ -271,6 +277,7 @@ static const struct rockchip_saradc_cfg rk3588_saradc_cfg = {
static const struct of_device_id of_rockchip_saradc_match[] = {
{ .compatible = "rockchip,rk3568-saradc", .data = &rk3568_saradc_cfg },
+ { .compatible = "rockchip,rk3576-saradc", .data = &rk3576_saradc_cfg },
{ .compatible = "rockchip,rk3588-saradc", .data = &rk3588_saradc_cfg },
{ /* end */ }
};
--
2.47.2
next prev parent reply other threads:[~2025-08-11 6:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 6:40 [PATCH 0/8] Add Rockchip RK3576 support David Jander
2025-08-11 6:40 ` [PATCH 1/8] clk: rockchip: clk-pll.c: Fix macro name confusion David Jander
2025-08-11 6:40 ` [PATCH 2/8] clk: rockchip: Introduce rockchip_grf_type enum from kernel driver David Jander
2025-08-11 6:40 ` [PATCH 3/8] ARM: Initial support for Rockchip RK3576 David Jander
2025-08-11 6:40 ` [PATCH 4/8] arm: dts: Add barebox specific RK3576.dtsi David Jander
2025-08-11 6:40 ` David Jander [this message]
2025-08-11 6:40 ` [PATCH 6/8] gpio: gpio-rockchip.c: Add support for GPIO_TYPE_V2_2 David Jander
2025-08-11 6:40 ` [PATCH 7/8] arm: dts: rk3576.dtsi: Add gpio aliases David Jander
2025-08-11 6:40 ` [PATCH 8/8] phy: phy-rockchip-inno-usb2.c: Fix crash if phyclk isn't found David Jander
2025-08-13 5:28 ` [PATCH 0/8] Add Rockchip RK3576 support Sascha Hauer
2025-08-13 5:32 ` Sascha Hauer
2025-08-13 6:51 ` David Jander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250811064026.753776-6-david@protonic.nl \
--to=david@protonic.nl \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox