diff mbox

[4/4] ARM: DTS: Add NTC thermistor nodes as child nodes to ADC

Message ID 1403612356-23685-5-git-send-email-ch.naveen@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Naveen Krishna Chatradhi June 24, 2014, 12:19 p.m. UTC
Exynos5420 based Peach PIT and Exynos5800 based PI boards have
4 NTC thermistors to measure temperatures at various points on the
board.

IIO based ADC becomes the parent and NTC thermistors are the childs,
via the HWMON interface.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Cc: Doug Anderson <dianders@chromium.org>
---
This patch needs
1. MAX77802 PMIC device tree nodes (for ldo9)
   https://www.mail-archive.com/devicetree@vger.kernel.org/msg31430.html
2. Uses the DT documentation for NTC thermistors updated with vendor-prefix

 arch/arm/boot/dts/exynos5420-peach-pit.dts |   32 ++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

Doug Anderson June 24, 2014, 9:54 p.m. UTC | #1
Naveen,

On Tue, Jun 24, 2014 at 5:19 AM, Naveen Krishna Chatradhi
<ch.naveen@samsung.com> wrote:
> Exynos5420 based Peach PIT and Exynos5800 based PI boards have
> 4 NTC thermistors to measure temperatures at various points on the
> board.
>
> IIO based ADC becomes the parent and NTC thermistors are the childs,
> via the HWMON interface.
>
> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> Cc: Doug Anderson <dianders@chromium.org>
> ---
> This patch needs
> 1. MAX77802 PMIC device tree nodes (for ldo9)
>    https://www.mail-archive.com/devicetree@vger.kernel.org/msg31430.html
> 2. Uses the DT documentation for NTC thermistors updated with vendor-prefix
>
>  arch/arm/boot/dts/exynos5420-peach-pit.dts |   32 ++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)

* You forgot: status="okay" for the ADC.  One might question how this
patch was tested.

* Please also include this change for pi.

* We just got through the painful process of sorting this .dts file.
Please sort "&adc" alphabetically.  Kukjin: please confirm that you
will keep an eye on patches and make sure that they are sorted OK.


Other than those problems this seems to work fine to me.

-Doug
Naveen Krishna Ch June 25, 2014, 5:04 a.m. UTC | #2
Doug,

On 25 June 2014 03:24, Doug Anderson <dianders@chromium.org> wrote:
> Naveen,
>
> On Tue, Jun 24, 2014 at 5:19 AM, Naveen Krishna Chatradhi
> <ch.naveen@samsung.com> wrote:
>> Exynos5420 based Peach PIT and Exynos5800 based PI boards have
>> 4 NTC thermistors to measure temperatures at various points on the
>> board.
>>
>> IIO based ADC becomes the parent and NTC thermistors are the childs,
>> via the HWMON interface.
>>
>> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>> Cc: Doug Anderson <dianders@chromium.org>
>> ---
>> This patch needs
>> 1. MAX77802 PMIC device tree nodes (for ldo9)
>>    https://www.mail-archive.com/devicetree@vger.kernel.org/msg31430.html
>> 2. Uses the DT documentation for NTC thermistors updated with vendor-prefix
>>
>>  arch/arm/boot/dts/exynos5420-peach-pit.dts |   32 ++++++++++++++++++++++++++++
>>  1 file changed, 32 insertions(+)
>
> * You forgot: status="okay" for the ADC.  One might question how this
> patch was tested.

Will correct it.

>
> * Please also include this change for pi.

MAX77802 device node was not added for Peach_PI (exynos5800-peach-pi.dts).
I guess, Javier have a plan to send.

I will edit the commit message to remove Peach_PI for now.

Also, we have few similar nodes on Peach PI  and Peach PIT.
Any plans or discussion on merging the common nodes ?

>
> * We just got through the painful process of sorting this .dts file.
> Please sort "&adc" alphabetically.  Kukjin: please confirm that you
> will keep an eye on patches and make sure that they are sorted OK.
>
>
> Other than those problems this seems to work fine to me.
>
> -Doug

Thanks for the Review.
Javier Martinez Canillas June 25, 2014, 7:37 a.m. UTC | #3
Hello Naveen,

On Wed, Jun 25, 2014 at 7:04 AM, Naveen Krishna Ch
<naveenkrishna.ch@gmail.com> wrote:
> Doug,
>
> On 25 June 2014 03:24, Doug Anderson <dianders@chromium.org> wrote:
>> Naveen,
>>
>> On Tue, Jun 24, 2014 at 5:19 AM, Naveen Krishna Chatradhi
>> <ch.naveen@samsung.com> wrote:
>>> Exynos5420 based Peach PIT and Exynos5800 based PI boards have
>>> 4 NTC thermistors to measure temperatures at various points on the
>>> board.
>>>
>>> IIO based ADC becomes the parent and NTC thermistors are the childs,
>>> via the HWMON interface.
>>>
>>> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
>>> Cc: Doug Anderson <dianders@chromium.org>
>>> ---
>>> This patch needs
>>> 1. MAX77802 PMIC device tree nodes (for ldo9)
>>>    https://www.mail-archive.com/devicetree@vger.kernel.org/msg31430.html
>>> 2. Uses the DT documentation for NTC thermistors updated with vendor-prefix
>>>
>>>  arch/arm/boot/dts/exynos5420-peach-pit.dts |   32 ++++++++++++++++++++++++++++
>>>  1 file changed, 32 insertions(+)
>>
>> * You forgot: status="okay" for the ADC.  One might question how this
>> patch was tested.
>
> Will correct it.
>
>>
>> * Please also include this change for pi.
>
> MAX77802 device node was not added for Peach_PI (exynos5800-peach-pi.dts).
> I guess, Javier have a plan to send.
>

That's correct. I didn't include the changes to Peach Pi since I only
have a Pit to test but I'll add it on the next version so you can have
that patch as a dependency and use the MAX77802 LD9 regulator.

> I will edit the commit message to remove Peach_PI for now.
>
> Also, we have few similar nodes on Peach PI  and Peach PIT.
> Any plans or discussion on merging the common nodes ?
>
>>
>> * We just got through the painful process of sorting this .dts file.
>> Please sort "&adc" alphabetically.  Kukjin: please confirm that you
>> will keep an eye on patches and make sure that they are sorted OK.
>>
>>
>> Other than those problems this seems to work fine to me.
>>
>> -Doug
>
> Thanks for the Review.
>
>
> --
> Shine bright,
> (: Nav :)

Best regards,
Javier
Doug Anderson June 25, 2014, 5 p.m. UTC | #4
Naveen,

On Tue, Jun 24, 2014 at 10:04 PM, Naveen Krishna Ch
<naveenkrishna.ch@gmail.com> wrote:
> Also, we have few similar nodes on Peach PI  and Peach PIT.
> Any plans or discussion on merging the common nodes ?

There was some discussion about this in another thread with Javier.
We were thinking of doing more "config fragments" like I did for the
keyboard.  See <https://lkml.org/lkml/2014/6/24/337> for context.

If someone wants to try to break some config fragments out feel free
to send up patches.  Until that is done let's at least keep pit and pi
as close to the same as possible (try to add features to both and try
to make sure that "diff" between the two looks good).

-Doug
diff mbox

Patch

diff --git a/arch/arm/boot/dts/exynos5420-peach-pit.dts b/arch/arm/boot/dts/exynos5420-peach-pit.dts
index b96a66a..852a220 100644
--- a/arch/arm/boot/dts/exynos5420-peach-pit.dts
+++ b/arch/arm/boot/dts/exynos5420-peach-pit.dts
@@ -751,4 +751,36 @@ 
 	timeout-sec = <32>;
 };
 
+&adc {
+	vdd-supply = <&ldo9_reg>;
+	ncp15wb473@3 {
+		compatible = "murata,ncp15wb473";
+		pullup-uv = <1800000>;
+		pullup-ohm = <47000>;
+		pulldown-ohm = <0>;
+		io-channels = <&adc 3>;
+	};
+	ncp15wb473@4 {
+		compatible = "murata,ncp15wb473";
+		pullup-uv = <1800000>;
+		pullup-ohm = <47000>;
+		pulldown-ohm = <0>;
+		io-channels = <&adc 4>;
+	};
+	ncp15wb473@5 {
+		compatible = "murata,ncp15wb473";
+		pullup-uv = <1800000>;
+		pullup-ohm = <47000>;
+		pulldown-ohm = <0>;
+		io-channels = <&adc 5>;
+	};
+	ncp15wb473@6 {
+		compatible = "murata,ncp15wb473";
+		pullup-uv = <1800000>;
+		pullup-ohm = <47000>;
+		pulldown-ohm = <0>;
+		io-channels = <&adc 6>;
+	};
+};
+
 #include "cros-ec-keyboard.dtsi"