meson-saradc: add support for the Meson8m2 SoC
Subsystems (3)
Martin Blumenstingl
reviewercover meson-saradc: add support for the Meson8m2 SoC
This is a trivial series which adds Meson8m2 support to the Meson SAR ADC driver.
A separate compatible string is required because typically Meson8m2 inherits all IP blocks from Meson8. The ADC part of the SAR ADC is indeed compatible, but the temperature calibration logic (not supported yet, but I am working on this) is incompatible with the Meson8 implementation (instead it uses the same variant as Meson8m2).
Martin Blumenstingl (2):
dt-bindings: iio: adc: add Meson8m2 support
iio: adc: meson-saradc: add support for the Meson8m2 SoCs
.../devicetree/bindings/iio/adc/amlogic,meson-saradc.txt | 1 + drivers/iio/adc/meson_saradc.c | 9 +++++++++ 2 files changed, 10 insertions(+)
Signature · 1 line
2.18.0
Martin Blumenstingl
reviewerPATCH 1/2 dt-bindings: iio: adc: add Meson8m2 support
The Amlogic Meson SAR ADC implementation on the Meson8m2 SoC is identical to the Meson8b variant. Add a compatible string to indicate that we support the SAR ADC on the Meson8m2 SoC.
--- .../devicetree/bindings/iio/adc/amlogic,meson-saradc.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt +1 -0
@@ -4,6 +4,7 @@ Required properties: - compatible: depending on the SoC this should be one of: - "amlogic,meson8-saradc" for Meson8 - "amlogic,meson8b-saradc" for Meson8b + - "amlogic,meson8m2-saradc" for Meson8m2 - "amlogic,meson-gxbb-saradc" for GXBB - "amlogic,meson-gxl-saradc" for GXL - "amlogic,meson-gxm-saradc" for GXM
Signature · 1 line
2.18.0
Jonathan Cameron
maintainerPATCH 1/2 dt-bindings: iio: adc: add Meson8m2 support
Quoted 5 lines · On Sat, 21 Jul 2018 21:40:48 +0200 Martin Blumenstingl…
The Amlogic Meson SAR ADC implementation on the Meson8m2 SoC is identical to the Meson8b variant. Add a compatible string to indicate that we support the SAR ADC on the Meson8m2 SoC.
Signed-off-by Martin Blumenstingl <[email protected]>
Applied to the togreg branch of iio.git and pushed out as testing for the autobuilder to ignore it.
Thanks,
Jonathan
Quoted 16 lines
--- .../devicetree/bindings/iio/adc/amlogic,meson-saradc.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/iio/adc/amlogic,meson-saradc.txt +1
-0@@ -4,6 +4,7 @@ Required properties: - compatible: depending on the SoC this should be one of: - "amlogic,meson8-saradc" for Meson8 - "amlogic,meson8b-saradc" for Meson8b + - "amlogic,meson8m2-saradc" for Meson8m2 - "amlogic,meson-gxbb-saradc" for GXBB - "amlogic,meson-gxl-saradc" for GXL - "amlogic,meson-gxm-saradc" for GXM
Martin Blumenstingl
reviewerPATCH 2/2 iio: adc: meson-saradc: add support for the Meson8m2 SoCs
In reply to Martin BlumenstinglThe SAR ADC on Meson8m2 behaves identical to the one found in the Meson8b SoCs. Add a separate compatible string because the temperature sensor logic (not supported yet) differs between Meson8 and Meson8m2 (however, it's the same for Meson8b and Meson8m2).
--- drivers/iio/adc/meson_saradc.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/iio/adc/meson_saradc.c +9 -0
@@ -922,6 +922,11 @@ static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = { .name = "meson-meson8b-saradc", }; +static const struct meson_sar_adc_data meson_sar_adc_meson8m2_data = { + .param = &meson_sar_adc_meson8_param, + .name ="meson-meson8m2-saradc" , +}; +static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = { .param = &meson_sar_adc_gxbb_param, .name ="meson-gxbb-saradc" ,
@@ -951,6 +956,10 @@ static const struct of_device_id meson_sar_adc_of_match[] = { .compatible = "amlogic,meson8b-saradc", .data = &meson_sar_adc_meson8b_data, }, + { + .compatible = "amlogic,meson8m2-saradc", + .data = &meson_sar_adc_meson8m2_data, + }, { .compatible = "amlogic,meson-gxbb-saradc", .data = &meson_sar_adc_gxbb_data,
Signature · 1 line
2.18.0
PATCH 2/2 iio: adc: meson-saradc: add support for the Meson8m2 SoCs
Quoted 6 lines · On Sat, 21 Jul 2018 21:40:49 +0200 Martin Blumenstingl…
The SAR ADC on Meson8m2 behaves identical to the one found in the Meson8b SoCs. Add a separate compatible string because the temperature sensor logic (not supported yet) differs between Meson8 and Meson8m2 (however, it's the same for Meson8b and Meson8m2).
Signed-off-by Martin Blumenstingl <[email protected]>
Applied, thanks
Jonathan
Quoted 31 lines
--- drivers/iio/adc/meson_saradc.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/iio/adc/meson_saradc.c +9
-0@@ -922,6 +922,11 @@ static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = { .name = "meson-meson8b-saradc", }; +static const struct meson_sar_adc_data meson_sar_adc_meson8m2_data = { + .param = &meson_sar_adc_meson8_param, + .name ="meson-meson8m2-saradc" , +}; +static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = { .param = &meson_sar_adc_gxbb_param, .name ="meson-gxbb-saradc" ,@@ -951,6 +956,10 @@ static const struct of_device_id meson_sar_adc_of_match[] = { .compatible = "amlogic,meson8b-saradc", .data = &meson_sar_adc_meson8b_data, }, + { + .compatible = "amlogic,meson8m2-saradc", + .data = &meson_sar_adc_meson8m2_data, + }, { .compatible = "amlogic,meson-gxbb-saradc", .data = &meson_sar_adc_gxbb_data,