Skip to contentSkip to conversation

ARM: dts: porter: Add missing PMIC nodes

PATCH New Marek Vasut 3 participants 7 messages Feb 17, 2018 – Feb 26, 2018 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: porter: Add missing PMIC nodes

Add PMIC nodes to Porter and connect CPU DVFS supply. There is one DA9063 and one DA9210 on Porter, the only difference from the other boards is that DA9063 is at I2C address 0x5a rather than 0x58 .

Cc Geert Uytterhoeven <[email protected]>
Cc Kuninori Morimoto <[email protected]>
Cc Simon Horman <[email protected]>
Cc Wolfram Sang <[email protected]>
---
 arch/arm/boot/dts/r8a7791-porter.dts | 37 ++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
arch/arm/boot/dts/r8a7791-porter.dts +37 -0
index a098d66292fb..116f30f54e04 100644
@@ -354,10 +354,47 @@
 	clock-frequency = <400000>;
 };
 
+&i2c6 {
+	status = "okay";
+	clock-frequency = <100000>;
+
+	pmic at 5a {
+		compatible = "dlg,da9063";
+		reg = <0x5a>;
+		interrupt-parent = <&irqc0>;
+		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-controller;
+
+		rtc {
+			compatible = "dlg,da9063-rtc";
+		};
+
+		wdt {
+			compatible = "dlg,da9063-watchdog";
+		};
+	};
+
+	vdd_dvfs: regulator at 68 {
+		compatible = "dlg,da9210";
+		reg = <0x68>;
+		interrupt-parent = <&irqc0>;
+		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+
+		regulator-min-microvolt = <1000000>;
+		regulator-max-microvolt = <1000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+};
+
 &sata0 {
 	status = "okay";
 };
 
+&cpu0 {
+	cpu0-supply = <&vdd_dvfs>;
+};
+
 /* composite video input */
 &vin0 {
 	status = "okay";
Signature · 1 line
2.15.1
#1 lore raw

PATCH 1/1 ARM: dts: porter: Add missing PMIC nodes

Hi Marek,

CC Steve Twiss

Quoted 6 lines · Marek Vasut

Add PMIC nodes to Porter and connect CPU DVFS supply. There is one DA9063 and one DA9210 on Porter, the only difference from the other boards is that DA9063 is at I2C address 0x5a rather than 0x58 .

Thanks for your patch!

arch/arm/boot/dts/r8a7791-porter.dts line 362

Quoted 12 lines
arch/arm/boot/dts/r8a7791-porter.dts +6 -0
@@ -354,10 +354,47 @@
        clock-frequency = <400000>;
 };
 
+&i2c6 {
+       status = "okay";
+       clock-frequency = <100000>;
+
+       pmic at 5a {
+               compatible = "dlg,da9063";

Does it matter that this is a DA9063L ("Variant 6B")?
Do we need a new compatible value, or can this be detected at runtime?

Quoted 28 lines
arch/arm/boot/dts/r8a7791-porter.dts +27 -0
+               reg = <0x5a>;
+               interrupt-parent = <&irqc0>;
+               interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-controller;
+
+               rtc {
+                       compatible = "dlg,da9063-rtc";
+               };
+
+               wdt {
+                       compatible = "dlg,da9063-watchdog";
+               };
+       };
+
+       vdd_dvfs: regulator at 68 {
+               compatible = "dlg,da9210";
+               reg = <0x68>;
+               interrupt-parent = <&irqc0>;
+               interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+
+               regulator-min-microvolt = <1000000>;
+               regulator-max-microvolt = <1000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+};
+
 &sata0 {

arch/arm/boot/dts/r8a7791-porter.dts line 400

Quoted 10 lines
arch/arm/boot/dts/r8a7791-porter.dts +4 -0
        status = "okay";
 };
 
+&cpu0 {
+       cpu0-supply = <&vdd_dvfs>;
+};
+
 /* composite video input */
 &vin0 {
        status = "okay";

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw

PATCH 1/1 ARM: dts: porter: Add missing PMIC nodes

Quoted 20 lines · Geert Uytterhoeven

Hi Marek,

CC Steve Twiss

Quoted 6 lines · Marek Vasut

Add PMIC nodes to Porter and connect CPU DVFS supply. There is one DA9063 and one DA9210 on Porter, the only difference from the other boards is that DA9063 is at I2C address 0x5a rather than 0x58 .

Thanks for your patch!

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +0 -0
@@ -354,10 +354,47 @@
        clock-frequency = <400000>;
 };
 
Quoted 9 lines

arch/arm/boot/dts/r8a7791-porter.dts line 362

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +6 -0
+&i2c6 {
+       status = "okay";
+       clock-frequency = <100000>;
+
+       pmic at 5a {
+               compatible = "dlg,da9063";

Does it matter that this is a DA9063L ("Variant 6B")?
Do we need a new compatible value, or can this be detected at runtime?

Hi Marek,

could you follow up on this?

Quoted 50 lines
Quoted 28 lines
arch/arm/boot/dts/r8a7791-porter.dts +27 -0
+               reg = <0x5a>;
+               interrupt-parent = <&irqc0>;
+               interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+               interrupt-controller;
+
+               rtc {
+                       compatible = "dlg,da9063-rtc";
+               };
+
+               wdt {
+                       compatible = "dlg,da9063-watchdog";
+               };
+       };
+
+       vdd_dvfs: regulator at 68 {
+               compatible = "dlg,da9210";
+               reg = <0x68>;
+               interrupt-parent = <&irqc0>;
+               interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+
+               regulator-min-microvolt = <1000000>;
+               regulator-max-microvolt = <1000000>;
+               regulator-boot-on;
+               regulator-always-on;
+       };
+};
+
 &sata0 {

arch/arm/boot/dts/r8a7791-porter.dts line 400

Quoted 10 lines
arch/arm/boot/dts/r8a7791-porter.dts +4 -0
        status = "okay";
 };
 
+&cpu0 {
+       cpu0-supply = <&vdd_dvfs>;
+};
+
 /* composite video input */
 &vin0 {
        status = "okay";

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

PATCH 1/1 ARM: dts: porter: Add missing PMIC nodes

Quoted 31 lines · Simon Horman
Quoted 20 lines · Geert Uytterhoeven

Hi Marek,

CC Steve Twiss

Quoted 6 lines · Marek Vasut

Add PMIC nodes to Porter and connect CPU DVFS supply. There is one DA9063 and one DA9210 on Porter, the only difference from the other boards is that DA9063 is at I2C address 0x5a rather than 0x58 .

Thanks for your patch!

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +0 -0
@@ -354,10 +354,47 @@
        clock-frequency = <400000>;
 };
 
Quoted 9 lines

arch/arm/boot/dts/r8a7791-porter.dts line 362

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +6 -0
+&i2c6 {
+       status = "okay";
+       clock-frequency = <100000>;
+
+       pmic at 5a {
+               compatible = "dlg,da9063";

Does it matter that this is a DA9063L ("Variant 6B")?
Do we need a new compatible value, or can this be detected at runtime?

Quoted 3 lines

Hi Marek,

could you follow up on this?

Yes, ASAP, once I'm back in the office, currently I'm stuck at the airport.

Signature · 2 lines
Best regards,
Marek Vasut
#4 lore raw

PATCH 1/1 ARM: dts: porter: Add missing PMIC nodes

In reply to Geert Uytterhoeven
Quoted 1 line · Geert Uytterhoeven

Hi Marek,

Hi,

Quoted 18 lines

CC Steve Twiss

Quoted 6 lines · Marek Vasut

Add PMIC nodes to Porter and connect CPU DVFS supply. There is one DA9063 and one DA9210 on Porter, the only difference from the other boards is that DA9063 is at I2C address 0x5a rather than 0x58 .

Thanks for your patch!

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +0 -0
@@ -354,10 +354,47 @@
        clock-frequency = <400000>;
 };
 
Quoted 9 lines

arch/arm/boot/dts/r8a7791-porter.dts line 362

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +6 -0
+&i2c6 {
+       status = "okay";
+       clock-frequency = <100000>;
+
+       pmic at 5a {
+               compatible = "dlg,da9063";

Does it matter that this is a DA9063L ("Variant 6B")?
Do we need a new compatible value, or can this be detected at runtime?

The driver detects it

da9063 6-005a: Device detected (chip-ID: 0x61, var-ID: 0x63)

Comparing the datasheets makes it obvious that 9063L is just a cut-down version of 9063, with less LDOs and one less ADC. So I think we should have extra compatible and have the driver restrict which LDOs can be used with this smaller PMIC.

Signature · 2 lines
Best regards,
Marek Vasut
#5 lore raw

PATCH 1/1 ARM: dts: porter: Add missing PMIC nodes

Quoted 33 lines · Marek Vasut
Quoted 1 line · Geert Uytterhoeven

Hi Marek,

Hi,

Quoted 18 lines

CC Steve Twiss

Quoted 6 lines · Marek Vasut

Add PMIC nodes to Porter and connect CPU DVFS supply. There is one DA9063 and one DA9210 on Porter, the only difference from the other boards is that DA9063 is at I2C address 0x5a rather than 0x58 .

Thanks for your patch!

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +0 -0
@@ -354,10 +354,47 @@
        clock-frequency = <400000>;
 };
 
Quoted 9 lines

arch/arm/boot/dts/r8a7791-porter.dts line 362

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +6 -0
+&i2c6 {
+       status = "okay";
+       clock-frequency = <100000>;
+
+       pmic at 5a {
+               compatible = "dlg,da9063";

Does it matter that this is a DA9063L ("Variant 6B")?
Do we need a new compatible value, or can this be detected at runtime?

Quoted 8 lines

The driver detects it

da9063 6-005a: Device detected (chip-ID: 0x61, var-ID: 0x63)

Comparing the datasheets makes it obvious that 9063L is just a cut-down version of 9063, with less LDOs and one less ADC. So I think we should have extra compatible and have the driver restrict which LDOs can be used with this smaller PMIC.

Thanks, and sorry to ping yo about this while you were in transit.

It sounds like this patch should be updated. Accordingly I'm marking it as "Changes Requested".

#6 lore raw

PATCH 1/1 ARM: dts: porter: Add missing PMIC nodes

Quoted 43 lines · Simon Horman
Quoted 33 lines · Marek Vasut
Quoted 1 line · Geert Uytterhoeven

Hi Marek,

Hi,

Quoted 18 lines

CC Steve Twiss

Quoted 6 lines · Marek Vasut

Add PMIC nodes to Porter and connect CPU DVFS supply. There is one DA9063 and one DA9210 on Porter, the only difference from the other boards is that DA9063 is at I2C address 0x5a rather than 0x58 .

Thanks for your patch!

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +0 -0
@@ -354,10 +354,47 @@
        clock-frequency = <400000>;
 };
 
Quoted 9 lines

arch/arm/boot/dts/r8a7791-porter.dts line 362

Quoted 6 lines
arch/arm/boot/dts/r8a7791-porter.dts +6 -0
+&i2c6 {
+       status = "okay";
+       clock-frequency = <100000>;
+
+       pmic at 5a {
+               compatible = "dlg,da9063";

Does it matter that this is a DA9063L ("Variant 6B")?
Do we need a new compatible value, or can this be detected at runtime?

Quoted 8 lines

The driver detects it

da9063 6-005a: Device detected (chip-ID: 0x61, var-ID: 0x63)

Comparing the datasheets makes it obvious that 9063L is just a cut-down version of 9063, with less LDOs and one less ADC. So I think we should have extra compatible and have the driver restrict which LDOs can be used with this smaller PMIC.

Quoted 4 lines

Thanks, and sorry to ping yo about this while you were in transit.

It sounds like this patch should be updated. Accordingly I'm marking it as "Changes Requested".

Correct

Signature · 2 lines
Best regards,
Marek Vasut