diff mbox

ARM: dts: exynos: Add ADCs on 4412 and 5422 based odroid boards.

Message ID 1cb894be-469a-714f-cfb8-6a1feac47e87@fivetechno.de (mailing list archive)
State Changes Requested
Headers show

Commit Message

Markus Reichl Nov. 17, 2016, 3:09 p.m. UTC
Odroid-X, -X2, -XU3 and -XU4 have SOC-ADC routed to an external connector.
Enable the ADC for use as iio-device.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
---
Tested on X, XU3 and XU4.
---
 arch/arm/boot/dts/exynos4412-odroid-common.dtsi    |  5 +++++
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 11 +++++++++++
 2 files changed, 16 insertions(+)

Comments

Marek Szyprowski Nov. 18, 2016, 7:01 a.m. UTC | #1
Hi Markus,


On 2016-11-17 16:09, Markus Reichl wrote:
> Odroid-X, -X2, -XU3 and -XU4 have SOC-ADC routed to an external connector.
> Enable the ADC for use as iio-device.
>
> Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
> ---
> Tested on X, XU3 and XU4.
> ---
>   arch/arm/boot/dts/exynos4412-odroid-common.dtsi    |  5 +++++
>   arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 11 +++++++++++

exynos4412-odroid-common.dtsi is also used on Odroid U3, which doesn't have
ADC pins on the external connector, so please move ADC node to
exynos4412-odroidx.dts, which is used on X and X2.

>   2 files changed, 16 insertions(+)
>
> diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> index 8aa19ba..6f26b3d 100644
> --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> @@ -478,6 +478,11 @@
>   	};
>   };
>   
> +&adc {
> +	vdd-supply = <&ldo10_reg>;
> +	status = "okay";
> +};
> +
>   &i2c_1 {
>   	status = "okay";
>   	max98090: max98090@10 {
> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> index 246d298..a8e1986 100644
> --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
> @@ -147,6 +147,11 @@
>   	};
>   };
>   
> +&adc {
> +	vdd-supply = <&ldo4_reg>;
> +	status = "okay";
> +};
> +
>   &bus_wcore {
>   	devfreq-events = <&nocp_mem0_0>, <&nocp_mem0_1>,
>   			<&nocp_mem1_0>, <&nocp_mem1_1>;
> @@ -293,6 +298,12 @@
>   				regulator-max-microvolt = <1800000>;
>   			};
>   
> +			ldo4_reg: LDO4 {
> +				regulator-name = "vdd_adc";
> +				regulator-min-microvolt = <1800000>;
> +				regulator-max-microvolt = <1800000>;
> +			};
> +
>   			ldo5_reg: LDO5 {
>   				regulator-name = "vdd_ldo5";
>   				regulator-min-microvolt = <1800000>;

Best regards
Markus Reichl Nov. 18, 2016, 9:15 a.m. UTC | #2
Hi Marek,

Am 18.11.2016 um 08:01 schrieb Marek Szyprowski:
> Hi Markus,
> 
> 
> On 2016-11-17 16:09, Markus Reichl wrote:
>> Odroid-X, -X2, -XU3 and -XU4 have SOC-ADC routed to an external connector.
>> Enable the ADC for use as iio-device.
>>
>> Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
>> ---
>> Tested on X, XU3 and XU4.
>> ---
>>   arch/arm/boot/dts/exynos4412-odroid-common.dtsi    |  5 +++++
>>   arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 11 +++++++++++
> 
> exynos4412-odroid-common.dtsi is also used on Odroid U3, which doesn't have
> ADC pins on the external connector, so please move ADC node to
> exynos4412-odroidx.dts, which is used on X and X2.
> 

Yes, will send V2.

>>   2 files changed, 16 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
>> index 8aa19ba..6f26b3d 100644
>> --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
>> +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
>> @@ -478,6 +478,11 @@
>>       };
>>   };
>>   +&adc {
>> +    vdd-supply = <&ldo10_reg>;
>> +    status = "okay";
>> +};
>> +
>>   &i2c_1 {
>>       status = "okay";
>>       max98090: max98090@10 {
>> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>> index 246d298..a8e1986 100644
>> --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
>> @@ -147,6 +147,11 @@
>>       };
>>   };
>>   +&adc {
>> +    vdd-supply = <&ldo4_reg>;
>> +    status = "okay";
>> +};
>> +
>>   &bus_wcore {
>>       devfreq-events = <&nocp_mem0_0>, <&nocp_mem0_1>,
>>               <&nocp_mem1_0>, <&nocp_mem1_1>;
>> @@ -293,6 +298,12 @@
>>                   regulator-max-microvolt = <1800000>;
>>               };
>>   +            ldo4_reg: LDO4 {
>> +                regulator-name = "vdd_adc";
>> +                regulator-min-microvolt = <1800000>;
>> +                regulator-max-microvolt = <1800000>;
>> +            };
>> +
>>               ldo5_reg: LDO5 {
>>                   regulator-name = "vdd_ldo5";
>>                   regulator-min-microvolt = <1800000>;
> 
> Best regards

Thanks for looking at,
--
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
index 8aa19ba..6f26b3d 100644
--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
@@ -478,6 +478,11 @@ 
 	};
 };
 
+&adc {
+	vdd-supply = <&ldo10_reg>;
+	status = "okay";
+};
+
 &i2c_1 {
 	status = "okay";
 	max98090: max98090@10 {
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index 246d298..a8e1986 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -147,6 +147,11 @@ 
 	};
 };
 
+&adc {
+	vdd-supply = <&ldo4_reg>;
+	status = "okay";
+};
+
 &bus_wcore {
 	devfreq-events = <&nocp_mem0_0>, <&nocp_mem0_1>,
 			<&nocp_mem1_0>, <&nocp_mem1_1>;
@@ -293,6 +298,12 @@ 
 				regulator-max-microvolt = <1800000>;
 			};
 
+			ldo4_reg: LDO4 {
+				regulator-name = "vdd_adc";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+			};
+
 			ldo5_reg: LDO5 {
 				regulator-name = "vdd_ldo5";
 				regulator-min-microvolt = <1800000>;