diff mbox

[3/6] ARM: dts: Create cros-tps65090 fragment

Message ID 1407861868-20097-4-git-send-email-javier.martinez@collabora.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Javier Martinez Canillas Aug. 12, 2014, 4:44 p.m. UTC
The tps65090 PMU is a component used in many ChromeOS devices
so instead of having the same device tree definitions in many
files, create a .dtsi fragment that can be included in DTS.

This fragment is based on the DT definitions for Peach boards.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 arch/arm/boot/dts/cros-tps65090.dtsi | 81 ++++++++++++++++++++++++++++++++++++
 1 file changed, 81 insertions(+)
 create mode 100644 arch/arm/boot/dts/cros-tps65090.dtsi

Comments

Doug Anderson Aug. 12, 2014, 5:26 p.m. UTC | #1
Javier,

On Tue, Aug 12, 2014 at 9:44 AM, Javier Martinez Canillas
<javier.martinez@collabora.co.uk> wrote:
> The tps65090 PMU is a component used in many ChromeOS devices
> so instead of having the same device tree definitions in many
> files, create a .dtsi fragment that can be included in DTS.
>
> This fragment is based on the DT definitions for Peach boards.
>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
> ---
>  arch/arm/boot/dts/cros-tps65090.dtsi | 81 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 81 insertions(+)
>  create mode 100644 arch/arm/boot/dts/cros-tps65090.dtsi

I'd probably skip this patch (just have duplication in pit vs. pi), or
make it "peach" specific (like exynos-peach-tps65090.dtsi?).  This is
really board-specific info and trying to guess what the various FETs
are going to be for for all peach variants doesn't seem great.

-Doug
Javier Martinez Canillas Aug. 12, 2014, 6:58 p.m. UTC | #2
Hello Doug,

Thanks for your feedback.

On 08/12/2014 07:26 PM, Doug Anderson wrote:
> Javier,
> 
> On Tue, Aug 12, 2014 at 9:44 AM, Javier Martinez Canillas
> <javier.martinez@collabora.co.uk> wrote:
>> The tps65090 PMU is a component used in many ChromeOS devices
>> so instead of having the same device tree definitions in many
>> files, create a .dtsi fragment that can be included in DTS.
>>
>> This fragment is based on the DT definitions for Peach boards.
>>
>> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
>> ---
>>  arch/arm/boot/dts/cros-tps65090.dtsi | 81 ++++++++++++++++++++++++++++++++++++
>>  1 file changed, 81 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/cros-tps65090.dtsi
> 
> I'd probably skip this patch (just have duplication in pit vs. pi), or
> make it "peach" specific (like exynos-peach-tps65090.dtsi?).  This is
> really board-specific info and trying to guess what the various FETs
> are going to be for for all peach variants doesn't seem great.
>

Yes, I guess I went to far on the refactoring with this patch. Most likely I'll
drop the whole series anyway and just add the voltage constraints and parent
supplies to the board DTS, now that Mark explained to me that this refactoring
is actually doing more harm than good.

> -Doug
> 

Best regards,
Javier
diff mbox

Patch

diff --git a/arch/arm/boot/dts/cros-tps65090.dtsi b/arch/arm/boot/dts/cros-tps65090.dtsi
new file mode 100644
index 0000000..99df15e
--- /dev/null
+++ b/arch/arm/boot/dts/cros-tps65090.dtsi
@@ -0,0 +1,81 @@ 
+/*
+ * Copyright (C) 2014 Google, Inc
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/*
+ * Common file for tps65090 PMU on Chromebooks
+ */
+/ {
+	vbat: fixed-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vbat-supply";
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
+&tps {
+	/*
+	 * Config irq to disable internal pulls
+	 * even though we run in polling mode.
+	 */
+	pinctrl-names = "default";
+	pinctrl-0 = <&tps65090_irq>;
+
+	vsys1-supply = <&vbat>;
+	vsys2-supply = <&vbat>;
+	vsys3-supply = <&vbat>;
+	infet1-supply = <&vbat>;
+	infet2-supply = <&vbat>;
+	infet3-supply = <&vbat>;
+	infet4-supply = <&vbat>;
+	infet5-supply = <&vbat>;
+	infet6-supply = <&vbat>;
+	infet7-supply = <&vbat>;
+	vsys-l1-supply = <&vbat>;
+	vsys-l2-supply = <&vbat>;
+};
+
+&tps65090_dcdc1 {
+	ti,enable-ext-control;
+};
+
+&tps65090_dcdc2 {
+	ti,enable-ext-control;
+};
+
+&tps65090_dcdc3 {
+	ti,enable-ext-control;
+};
+
+&tps65090_fet1 {
+	regulator-name = "vcd_led";
+};
+
+&tps65090_fet2 {
+	regulator-name = "video_mid";
+};
+
+&tps65090_fet3 {
+	regulator-name = "wwan_r";
+};
+
+&tps65090_fet4 {
+	regulator-name = "sdcard";
+};
+
+&tps65090_fet5 {
+	regulator-name = "camout";
+};
+
+&tps65090_fet6 {
+	regulator-name = "lcd_vdd";
+};
+
+&tps65090_fet7 {
+	regulator-name = "video_mid_1a";
+};