From: afaerber@suse.de (Andreas Färber)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 4/4] ARM64: dts: meson: meson-gx: add the SAR ADC
Date: Sat, 21 Jan 2017 14:28:48 +0100 [thread overview]
Message-ID: <a1c759fb-691c-50a7-f1c4-fd51ad27fa52@suse.de> (raw)
In-Reply-To: <20170119145822.26239-5-martin.blumenstingl@googlemail.com>
Am 19.01.2017 um 15:58 schrieb Martin Blumenstingl:
> Add the SAR ADC to meson-gxbb.dtsi and meson-gxl.dtsi. GXBB provides a
> 10-bit ADC while GXL (and GXM, which uses the same ADC as GXL) provides
> a 12-bit ADC.
> Some boards use resistor ladder buttons connected through one of the ADC
> channels. On newer devices (GXL and GXM) some boards use pull-ups/downs
> to change the resistance (and thus the ADC value) on of the ADC channels
"on one of"?
> to indicate the board revision.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Tested-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 8 ++++++++
> arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 10 ++++++++++
> arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 10 ++++++++++
> 3 files changed, 28 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> index 99e6a8d5cb9e..55abfb74aab2 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
> @@ -255,6 +255,14 @@
> status = "disabled";
> };
>
> + saradc: adc at 8680 {
> + compatible = "amlogic,meson-saradc";
> + #io-channel-cells = <1>;
Personally I think it makes more sense to keep reg after compatible for
consistency (same in example) and any #... "output" properties last.
> + status = "disabled";
> + reg = <0x0 0x8680 0x0 0x34>;
> + interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
> + };
> +
> pwm_ef: pwm at 86c0 {
> compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm";
> reg = <0x0 0x086c0 0x0 0x10>;
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> index 39a774ad83ce..04b3324bc132 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
> @@ -490,6 +490,16 @@
> clocks = <&clkc CLKID_I2C>;
> };
>
> +&saradc {
> + compatible = "amlogic,meson-gxbb-saradc", "amlogic,meson-saradc";
> + clocks = <&xtal>,
> + <&clkc CLKID_SAR_ADC>,
> + <&clkc CLKID_SANA>,
> + <&clkc CLKID_SAR_ADC_CLK>,
> + <&clkc CLKID_SAR_ADC_SEL>;
> + clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel";
> +};
> +
> &sd_emmc_a {
> clocks = <&clkc CLKID_SD_EMMC_A>,
> <&xtal>,
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> index bdf2305a2e25..7c72dbcef1ba 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
> @@ -340,6 +340,16 @@
> clocks = <&clkc CLKID_I2C>;
> };
>
> +&saradc {
> + compatible = "amlogic,meson-gxl-saradc", "amlogic,meson-saradc";
> + clocks = <&xtal>,
> + <&clkc CLKID_SAR_ADC>,
> + <&clkc CLKID_SANA>,
> + <&clkc CLKID_SAR_ADC_CLK>,
> + <&clkc CLKID_SAR_ADC_SEL>;
> + clock-names = "clkin", "core", "sana", "adc_clk", "adc_sel";
> +};
> +
> &sd_emmc_a {
> clocks = <&clkc CLKID_SD_EMMC_A>,
> <&xtal>,
Anyway, saradc before sd_emmc_a looks fine,
Reviewed-by: Andreas F?rber <afaerber@suse.de>
Regards,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
next prev parent reply other threads:[~2017-01-21 13:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 17:43 [PATCH 0/4] Amlogic Meson SAR ADC support Martin Blumenstingl
2017-01-11 17:43 ` [PATCH 1/4] Documentation: dt-bindings: add the Amlogic Meson SAR ADC documentation Martin Blumenstingl
2017-01-11 17:43 ` [PATCH 2/4] clk: gxbb: add the SAR ADC clocks and expose them Martin Blumenstingl
2017-01-11 17:43 ` [PATCH 3/4] iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs Martin Blumenstingl
2017-01-14 14:46 ` Jonathan Cameron
2017-01-14 17:44 ` Martin Blumenstingl
2017-01-15 13:08 ` Jonathan Cameron
2017-01-15 12:26 ` Lars-Peter Clausen
2017-01-15 13:09 ` Jonathan Cameron
2017-01-11 17:43 ` [PATCH 4/4] ARM64: dts: meson: meson-gx: add the SAR ADC Martin Blumenstingl
2017-01-15 22:42 ` [PATCH v2 0/4] Amlogic Meson SAR ADC support Martin Blumenstingl
2017-01-15 22:42 ` [PATCH v2 1/4] Documentation: dt-bindings: add the Amlogic Meson SAR ADC documentation Martin Blumenstingl
2017-01-15 22:42 ` [PATCH v2 2/4] clk: gxbb: add the SAR ADC clocks and expose them Martin Blumenstingl
2017-01-15 22:42 ` [PATCH v2 3/4] iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs Martin Blumenstingl
2017-01-15 22:42 ` [PATCH v2 4/4] ARM64: dts: meson: meson-gx: add the SAR ADC Martin Blumenstingl
2017-01-16 10:18 ` [PATCH v2 0/4] Amlogic Meson SAR ADC support Neil Armstrong
2017-01-19 14:58 ` [PATCH v3 " Martin Blumenstingl
2017-01-19 14:58 ` [PATCH v3 1/4] Documentation: dt-bindings: add the Amlogic Meson SAR ADC documentation Martin Blumenstingl
2017-01-21 12:39 ` Jonathan Cameron
2017-01-21 13:21 ` Andreas Färber
2017-01-21 20:56 ` Rob Herring
2017-01-21 23:10 ` Martin Blumenstingl
2017-01-22 12:30 ` Jonathan Cameron
2017-01-19 14:58 ` [PATCH v3 2/4] clk: gxbb: add the SAR ADC clocks and expose them Martin Blumenstingl
2017-01-19 19:13 ` Stephen Boyd
2017-01-20 15:46 ` Kevin Hilman
2017-01-19 14:58 ` [PATCH v3 3/4] iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs Martin Blumenstingl
2017-01-21 12:52 ` Jonathan Cameron
2017-01-19 14:58 ` [PATCH v3 4/4] ARM64: dts: meson: meson-gx: add the SAR ADC Martin Blumenstingl
2017-01-21 13:28 ` Andreas Färber [this message]
2017-01-21 12:37 ` [PATCH v3 0/4] Amlogic Meson SAR ADC support Jonathan Cameron
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=a1c759fb-691c-50a7-f1c4-fd51ad27fa52@suse.de \
--to=afaerber@suse.de \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).