diff mbox

[v3,10/13] ARM: dts: rockchip: add saradc support for rv1108

Message ID 1502423211-31216-1-git-send-email-andy.yan@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Yan Aug. 11, 2017, 3:46 a.m. UTC
Add saradc device tree node for rv1108 soc

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>

---

Changes in v3: None
Changes in v2:
- add compatible string "rockchip,rv1108-saradc"

 arch/arm/boot/dts/rv1108.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Heiko Stuebner Aug. 13, 2017, 12:13 p.m. UTC | #1
Hi Andy,

Am Freitag, 11. August 2017, 11:46:51 CEST schrieb Andy Yan:
> Add saradc device tree node for rv1108 soc
> 
> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
> 

> +	adc: adc@1038c000 {
> +		compatible = "rockchip,rv1108-saradc", "rockchip,rk3399-saradc";
> +		reg = <0x1038c000 0x100>;
> +		interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
> +		#io-channel-cells = <1>;
> +		io-channel-ranges;

What do you need the io-channel-ranges for?
I.e. according to the documenation it is meant for when the adc is also
a "bus node" and has children that should inherit channels from it.

In all saradc uses so far we only have separate nodes referencing the
adc controller (like adc-keys etc), so this does not look like it is needed?


Heiko
Andy Yan Aug. 14, 2017, 1:42 a.m. UTC | #2
Hi Heiko:


On 2017年08月13日 20:13, Heiko Stuebner wrote:
> Hi Andy,
>
> Am Freitag, 11. August 2017, 11:46:51 CEST schrieb Andy Yan:
>> Add saradc device tree node for rv1108 soc
>>
>> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
>>
>> +	adc: adc@1038c000 {
>> +		compatible = "rockchip,rv1108-saradc", "rockchip,rk3399-saradc";
>> +		reg = <0x1038c000 0x100>;
>> +		interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
>> +		#io-channel-cells = <1>;
>> +		io-channel-ranges;
> What do you need the io-channel-ranges for?
> I.e. according to the documenation it is meant for when the adc is also
> a "bus node" and has children that should inherit channels from it.
>
> In all saradc uses so far we only have separate nodes referencing the
> adc controller (like adc-keys etc), so this does not look like it is needed?

     Sorry, I just copied it from the downstream dts. After checked with 
David, he suggested that we could remove it.
>
>
> Heiko
>
>
>
>
diff mbox

Patch

diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi
index 75a0b1e..92b6005 100644
--- a/arch/arm/boot/dts/rv1108.dtsi
+++ b/arch/arm/boot/dts/rv1108.dtsi
@@ -275,6 +275,18 @@ 
 		status = "disabled";
 	};
 
+	adc: adc@1038c000 {
+		compatible = "rockchip,rv1108-saradc", "rockchip,rk3399-saradc";
+		reg = <0x1038c000 0x100>;
+		interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
+		#io-channel-cells = <1>;
+		io-channel-ranges;
+		clock-frequency = <1000000>;
+		clocks = <&cru SCLK_SARADC>, <&cru PCLK_SARADC>;
+		clock-names = "saradc", "apb_pclk";
+		status = "disabled";
+	};
+
 	i2c0: i2c@20000000 {
 		compatible = "rockchip,rv1108-i2c";
 		reg = <0x20000000 0x1000>;