Skip to contentSkip to conversation

arm64: dts: mt8173-evb: Add PMIC support

PATCH In review Henry Chen 3 participants 5 messages Jun 22, 2015 – Jul 7, 2015

Subsystems (2)
lore
Share & tools
lore

Henry Chen

author
#0 lore raw

PATCH 1/1 arm64: dts: mt8173-evb: Add PMIC support

From: Eddie Huang <[email protected]>

The MT8173 eval board contains a MT6397 PMIC. This adds the corresponding device node to the dts file.

---
Base on 4.1-rc1 and commit as following,
ARM64: dts: Mediatek: MT8173 updates [1] and
clk: Add common clock support for Mediatek MT8135 and MT8173 [2] patch

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/344751.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-April/338763.html

---
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 174 ++++++++++++++++++++++++++++
 1 file changed, 174 insertions(+)
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +174 -0
index 43d5401..b967914 100644
@@ -33,6 +33,180 @@
 	chosen { };
 };
 
+&pwrap {
+	pmic: mt6397 {
+		compatible = "mediatek,mt6397";
+		interrupt-parent = <&pio>;
+		interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+
+		mt6397regulator: mt6397regulator {
+			compatible = "mediatek,mt6397-regulator";
+			mt6397_vpca15_reg: buck_vpca15 {
+				regulator-compatible = "buck_vpca15";
+				regulator-name = "vpca15";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+			};
+			mt6397_vpca7_reg: buck_vpca7 {
+				regulator-compatible = "buck_vpca7";
+				regulator-name = "vpca7";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-enable-ramp-delay = <115>;
+			};
+			mt6397_vsramca15_reg: buck_vsramca15 {
+				regulator-compatible = "buck_vsramca15";
+				regulator-name = "vsramca15";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+			};
+			mt6397_vsramca7_reg: buck_vsramca7 {
+				regulator-compatible = "buck_vsramca7";
+				regulator-name = "vsramca7";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+			};
+			mt6397_vcore_reg: buck_vcore {
+				regulator-compatible = "buck_vcore";
+				regulator-name = "vcore";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+			};
+			mt6397_vgpu_reg: buck_vgpu {
+				regulator-compatible = "buck_vgpu";
+				regulator-name = "vgpu";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-enable-ramp-delay = <115>;
+			};
+			mt6397_vdrm_reg: buck_vdrm {
+				regulator-compatible = "buck_vdrm";
+				regulator-name = "vdrm";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1400000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+			};
+			mt6397_vio18_reg: buck_vio18 {
+				regulator-compatible = "buck_vio18";
+				regulator-name = "vio18";
+				regulator-min-microvolt = <1620000>;
+				regulator-max-microvolt = <1980000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;
+			};
+			mt6397_vtcxo_reg: ldo_vtcxo {
+				regulator-compatible = "ldo_vtcxo";
+				regulator-name = "vtcxo";
+				regulator-always-on;
+			};
+			mt6397_va28_reg: ldo_va28 {
+				regulator-compatible = "ldo_va28";
+				regulator-name = "va28";
+				regulator-always-on;
+			};
+			mt6397_vcama_reg: ldo_vcama {
+				regulator-compatible = "ldo_vcama";
+				regulator-name = "vcama";
+				regulator-min-microvolt = <1500000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vio28_reg: ldo_vio28 {
+				regulator-compatible = "ldo_vio28";
+				regulator-name = "vio28";
+				regulator-always-on;
+			};
+			mt6397_vusb_reg: ldo_vusb {
+				regulator-compatible = "ldo_vusb";
+				regulator-name = "vusb";
+			};
+			mt6397_vmc_reg: ldo_vmc {
+				regulator-compatible = "ldo_vmc";
+				regulator-name = "vmc";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vmch_reg: ldo_vmch {
+				regulator-compatible = "ldo_vmch";
+				regulator-name = "vmch";
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vemc_3v3_reg: ldo_vemc3v3 {
+				regulator-compatible = "ldo_vemc3v3";
+				regulator-name = "vemc_3v3";
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vgp1_reg: ldo_vgp1 {
+				regulator-compatible = "ldo_vgp1";
+				regulator-name = "vcamd";
+				regulator-min-microvolt = <1220000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <240>;
+			};
+			mt6397_vgp2_reg: ldo_vgp2 {
+				regulator-compatible = "ldo_vgp2";
+				regulator-name = "vcamio";
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vgp3_reg: ldo_vgp3 {
+				regulator-compatible = "ldo_vgp3";
+				regulator-name = "vcamaf";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vgp4_reg: ldo_vgp4 {
+				regulator-compatible = "ldo_vgp4";
+				regulator-name = "vgp4";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vgp5_reg: ldo_vgp5 {
+				regulator-compatible = "ldo_vgp5";
+				regulator-name = "vgp5";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3000000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vgp6_reg: ldo_vgp6 {
+				regulator-compatible = "ldo_vgp6";
+				regulator-name = "vgp6";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+			mt6397_vibr_reg: ldo_vibr {
+				regulator-compatible = "ldo_vibr";
+				regulator-name = "vibr";
+				regulator-min-microvolt = <1300000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-enable-ramp-delay = <218>;
+			};
+		};
+	};
+};
+
 &uart0 {
 	status = "okay";
 };
Signature · 1 line
1.8.1.1.dirty
#1 lore raw

Hi Matthias,

Quoted 33 lines · Henry Chen

From: Eddie Huang <[email protected]>

The MT8173 eval board contains a MT6397 PMIC. This adds the corresponding device node to the dts file.

---
Base on 4.1-rc1 and commit as following,
ARM64: dts: Mediatek: MT8173 updates [1] and
clk: Add common clock support for Mediatek MT8135 and MT8173 [2] patch

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/344751.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-April/338763.html

---
 arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 174 ++++++++++++++++++++++++++++
 1 file changed, 174 insertions(+)
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +7 -0
index 43d5401..b967914 100644
@@ -33,6 +33,180 @@
 	chosen { };
 };
 
+&pwrap {
+	pmic: mt6397 {
+		compatible = "mediatek,mt6397";
+		interrupt-parent = <&pio>;
+		interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <2>;

arch/arm64/boot/dts/mediatek/mt8173-evb.dts line 52

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +10 -0
+
+		mt6397regulator: mt6397regulator {
+			compatible = "mediatek,mt6397-regulator";
+			mt6397_vpca15_reg: buck_vpca15 {
+				regulator-compatible = "buck_vpca15";
+				regulator-name = "vpca15";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;

I see you pull da9211 regulator dts patch, but not this one. How about this patch ?

Thanks
Eddie

maintainer
#2 lore raw
Quoted 47 lines · Eddie Huang

Hi Matthias,

Quoted 44 lines · Henry Chen

From: Eddie Huang <[email protected]>

The MT8173 eval board contains a MT6397 PMIC. This adds the corresponding device node to the dts file.

---
Base on 4.1-rc1 and commit as following,
ARM64: dts: Mediatek: MT8173 updates [1] and
clk: Add common clock support for Mediatek MT8135 and MT8173 [2] patch

[1]
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/344751.htm
l [2]
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-April/338763.h
tml ---

 arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 174

++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+)

(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts index 43d5401..b967914 100644

arch/arm64/boot/dts/mediatek/mt8173-evb.dts +12 -0
@@ -33,6 +33,180 @@
 
 	chosen { };
 
 };
 
+&pwrap {
+	pmic: mt6397 {
+		compatible = "mediatek,mt6397";
+		interrupt-parent = <&pio>;
+		interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+
+		mt6397regulator: mt6397regulator {
+			compatible = "mediatek,mt6397-regulator";
+			mt6397_vpca15_reg: buck_vpca15 {
+				regulator-compatible = "buck_vpca15";
Quoted 8 lines

arch/arm64/boot/dts/mediatek/mt8173-evb.dts line 52

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +5 -0
+				regulator-name = "vpca15";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;

I see you pull da9211 regulator dts patch, but not this one. How about this patch ?

I inserted some new-lines and added it to v4.2-next/arm64

Thanks,
Matthias

#3 lore raw
Quoted 4 lines · Matthias Brugger
Quoted 3 lines · Eddie Huang
Quoted 2 lines · Henry Chen

From: Eddie Huang <[email protected]>

[...]

Quoted 32 lines
Quoted 23 lines
Quoted 23 lines
(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts index 43d5401..b967914 100644

arch/arm64/boot/dts/mediatek/mt8173-evb.dts +12 -0
@@ -33,6 +33,180 @@
 
 	chosen { };
 
 };
 
+&pwrap {
+	pmic: mt6397 {
+		compatible = "mediatek,mt6397";
+		interrupt-parent = <&pio>;
+		interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+
+		mt6397regulator: mt6397regulator {
+			compatible = "mediatek,mt6397-regulator";
+			mt6397_vpca15_reg: buck_vpca15 {
+				regulator-compatible = "buck_vpca15";
Quoted 8 lines

arch/arm64/boot/dts/mediatek/mt8173-evb.dts line 52

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +5 -0
+				regulator-name = "vpca15";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;

I see you pull da9211 regulator dts patch, but not this one. How about this patch ?

Quoted 2 lines

I inserted some new-lines and added it to v4.2-next/arm64

Thanks the pull. Normally we put alias node in alphabetical order, make later merge more easily. I think you can do the modification and squeeze into the same commit.

Thanks
Eddie

maintainer
#4 lore raw
Quoted 39 lines · Eddie Huang
Quoted 3 lines · Matthias Brugger
Quoted 2 lines · Eddie Huang
Quoted 1 line · Henry Chen

From: Eddie Huang <[email protected]>

[...]

Quoted 32 lines
Quoted 31 lines
Quoted 18 lines
(quoted diff) +0 -0

b/arch/arm64/boot/dts/mediatek/mt8173-evb.dts index 43d5401..b967914 100644

arch/arm64/boot/dts/mediatek/mt8173-evb.dts +7 -0
@@ -33,6 +33,180 @@
 
 	chosen { };
 
 };
 
+&pwrap {
+	pmic: mt6397 {
+		compatible = "mediatek,mt6397";
+		interrupt-parent = <&pio>;
+		interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <2>;

arch/arm64/boot/dts/mediatek/mt8173-evb.dts line 54

Quoted 10 lines
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +10 -0
+
+		mt6397regulator: mt6397regulator {
+			compatible = "mediatek,mt6397-regulator";
+			mt6397_vpca15_reg: buck_vpca15 {
+				regulator-compatible = "buck_vpca15";
+				regulator-name = "vpca15";
+				regulator-min-microvolt = < 700000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-ramp-delay = <12500>;
+				regulator-always-on;

I see you pull da9211 regulator dts patch, but not this one. How about this patch ?

Quoted 6 lines
Quoted 1 line

I inserted some new-lines and added it to v4.2-next/arm64

Thanks the pull. Normally we put alias node in alphabetical order, make later merge more easily. I think you can do the modification and squeeze into the same commit.

I used the order of the dtsi file, but I think your approach is more straight forward. I will change that.

Thanks for your comment.
Matthias