[PATCH 5/8] aiodev: rockchip_saradc.c: Add support for RK3576
David Jander
david at protonic.nl
Sun Aug 10 23:40:23 PDT 2025
The RK3576 has a SARADC v2 with 8 channels and 12 bit resolution.
Signed-off-by: David Jander <david at 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
More information about the barebox
mailing list