[PATCH 2/9] arm64: dts: allwinner: pinebook: Remove unused vcc3v3 regulator

53 vues
Accéder directement au premier message non lu

Samuel Holland

non lue,
19 janv. 2020, 11:31:0919/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
This fixed regulator has no consumers, GPIOs, or other connections.
Remove it.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 7 -------
1 file changed, 7 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 3d894b208901..ff32ca1a495e 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -63,13 +63,6 @@
};
};

- reg_vcc3v3: vcc3v3 {
- compatible = "regulator-fixed";
- regulator-name = "vcc3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- };
-
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
--
2.23.0

Samuel Holland

non lue,
19 janv. 2020, 11:31:0919/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
The Orange Pi PC2 features a GPIO button. As the button is connected to
Port L (pin PL3), it can be used as a wakeup source. Enable this.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
index 70b5f0998421..c4f89c312f42 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
@@ -61,6 +61,7 @@
label = "sw4";
linux,code = <BTN_0>;
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+ wakeup-source;
};
};

--
2.23.0

Samuel Holland

non lue,
19 janv. 2020, 11:31:0919/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
The Pinebook does not use the CSI bus on the A64. In fact it does not
use GPIO port E for anything at all. Thus the following regulators are
not used and do not need voltages set:

- ALDO1: Connected to VCC-PE only
- DLDO3: Not connected
- ELDO3: Not connected

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
.../boot/dts/allwinner/sun50i-a64-pinebook.dts | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index ff32ca1a495e..8e7ce6ad28dd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -202,9 +202,7 @@
};

&reg_aldo1 {
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-name = "vcc-csi";
+ regulator-name = "vcc-pe";
};

&reg_aldo2 {
@@ -267,12 +265,6 @@
regulator-name = "vcc-edp";
};

-&reg_dldo3 {
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "avdd-csi";
-};
-
&reg_dldo4 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@@ -286,12 +278,6 @@
regulator-name = "cpvdd";
};

-&reg_eldo3 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-name = "vdd-1v8-csi";
-};
-
&reg_fldo1 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
--
2.23.0

Samuel Holland

non lue,
19 janv. 2020, 11:31:1019/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
Boards generally reference the simplefb nodes from the SoC dtsi by
label, not by full path. simplefb_hdmi is already like this in the
Pinebook DTS. Update simplefb_lcd to match.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
.../arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 97e412fc4e4b..af902b565b0a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -41,12 +41,6 @@

chosen {
stdout-path = "serial0:115200n8";
-
- framebuffer-lcd {
- panel-supply = <&reg_dc1sw>;
- dvdd25-supply = <&reg_dldo2>;
- dvdd12-supply = <&reg_fldo1>;
- };
};

gpio_keys {
@@ -302,6 +296,12 @@
regulator-name = "vcc-rtc";
};

+&simplefb_lcd {
+ panel-supply = <&reg_dc1sw>;
+ dvdd25-supply = <&reg_dldo2>;
+ dvdd12-supply = <&reg_fldo1>;
+};
+
&simplefb_hdmi {
vcc-hdmi-supply = <&reg_dldo1>;
};
--
2.23.0

Samuel Holland

non lue,
19 janv. 2020, 11:31:1019/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
The r_i2c node should come before r_rsb, and in any case should not
separate the axp803 node from its subnodes.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
.../boot/dts/allwinner/sun50i-a64-pinebook.dts | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 8e7ce6ad28dd..97e412fc4e4b 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -172,6 +172,14 @@
status = "okay";
};

+/* The ANX6345 eDP-bridge is on r_i2c */
+&r_i2c {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&r_i2c_pl89_pins>;
+ status = "okay";
+};
+
&r_rsb {
status = "okay";

@@ -183,14 +191,6 @@
};
};

-/* The ANX6345 eDP-bridge is on r_i2c */
-&r_i2c {
- clock-frequency = <100000>;
- pinctrl-names = "default";
- pinctrl-0 = <&r_i2c_pl89_pins>;
- status = "okay";
-};
-
#include "axp803.dtsi"

&ac_power_supply {
--
2.23.0

Samuel Holland

non lue,
19 janv. 2020, 11:31:1019/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL.

VCC-PC and VCC-PG are supplied by ELDO1 at 1.8v.
VCC-PD is supplied by DCDC1 (VCC-IO) at 3.3v.
VCC-PE is supplied by ALDO1, and is unused.

VCC-PL creates a circular dependency, so it is omitted for now.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
.../boot/dts/allwinner/sun50i-a64-pinebook.dts | 17 +++++++++++++++++
1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 7c6a3d204dba..3e762f93671a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -162,6 +162,13 @@
status = "okay";
};

+&pio {
+ vcc-pc-supply = <&reg_eldo1>;
+ vcc-pd-supply = <&reg_dcdc1>;
+ vcc-pe-supply = <&reg_aldo1>;
+ vcc-pg-supply = <&reg_eldo1>;
+};
+
&pwm {
status = "okay";
};
@@ -174,6 +181,16 @@
status = "okay";
};

+&r_pio {
+ /*
+ * FIXME: We can't add that supply for now since it would
+ * create a circular dependency between pinctrl, the regulator
+ * and the RSB Bus.
+ *
+ * vcc-pl-supply = <&reg_aldo2>;
+ */
+};
+
&r_rsb {
status = "okay";

--
2.23.0

Samuel Holland

non lue,
19 janv. 2020, 11:31:1119/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
Normally GPIO pin references are followed by a comment giving the pin
name for searchability. Add the comment here where it was missing.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index af902b565b0a..7c6a3d204dba 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -119,7 +119,7 @@
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
vmmc-supply = <&reg_dcdc1>;
- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
disable-wp;
bus-width = <4>;

Samuel Holland

non lue,
19 janv. 2020, 11:31:1119/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
The output from the backlight regulator is labeled as "VBKLT" in the
schematic. Using the equation and resistor values from the schematic,
the output is approximately 18V, not 3.3V. Since the regulator in use
(SS6640STR) is a boost regulator powered by PS (battery or AC input),
which are both >3.3V, the output could not be 3.3V anyway.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
.../dts/allwinner/sun50i-a64-pinebook.dts | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 3e762f93671a..96434fdeb5c0 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -21,22 +21,13 @@
ethernet0 = &rtl8723cs;
};

- vdd_bl: regulator@0 {
- compatible = "regulator-fixed";
- regulator-name = "bl-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
- enable-active-high;
- };
-
backlight: backlight {
compatible = "pwm-backlight";
pwms = <&pwm 0 50000 0>;
brightness-levels = <0 5 10 15 20 30 40 55 70 85 100>;
default-brightness-level = <2>;
enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
- power-supply = <&vdd_bl>;
+ power-supply = <&reg_vbklt>;
};

chosen {
@@ -57,6 +48,15 @@
};
};

+ reg_vbklt: vbklt {
+ compatible = "regulator-fixed";
+ regulator-name = "vbklt";
+ regulator-min-microvolt = <18000000>;
+ regulator-max-microvolt = <18000000>;
+ gpio = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+ enable-active-high;
+ };
+

Samuel Holland

non lue,
19 janv. 2020, 11:31:1119/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com,Samuel Holland
Now that AXP803 GPIO support is available, we can properly model
the hardware. Replace the use of GPIO0-LDO with a fixed regulator
controlled by GPIO0. This boost regulator is used to power the
(internal and external) USB ports, as well as the speakers.

Signed-off-by: Samuel Holland <sam...@sholland.org>
---
.../dts/allwinner/sun50i-a64-pinebook.dts | 27 +++++++++----------
1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
index 96434fdeb5c0..12e513ba8f50 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
@@ -57,6 +57,15 @@
enable-active-high;
};

+ reg_vcc5v0: vcc5v0 {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&axp_gpio 0 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
@@ -64,12 +73,7 @@

speaker_amp: audio-amplifier {
compatible = "simple-audio-amplifier";
- /*
- * TODO This is actually a fixed regulator controlled by
- * the GPIO line on the PMIC. This should be corrected
- * once GPIO support is added for this PMIC.
- */
- VCC-supply = <&reg_ldo_io0>;
+ VCC-supply = <&reg_vcc5v0>;
enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
sound-name-prefix = "Speaker Amp";
};
@@ -302,13 +306,6 @@
regulator-name = "vdd-cpus";
};

-&reg_ldo_io0 {
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc-usb";
- status = "okay";
-};
-
&reg_rtc_ldo {
regulator-name = "vcc-rtc";
};
@@ -357,7 +354,7 @@
};

&usbphy {
- usb0_vbus-supply = <&reg_ldo_io0>;
- usb1_vbus-supply = <&reg_ldo_io0>;
+ usb0_vbus-supply = <&reg_vcc5v0>;
+ usb1_vbus-supply = <&reg_vcc5v0>;

Vasily Khoruzhick

non lue,
21 janv. 2020, 13:48:5421/01/2020
à Maxime Ripard,Samuel Holland,Mark Rutland,Chen-Yu Tsai,linux-kernel,linux-sunxi,Rob Herring,arm-linux
On Tue, Jan 21, 2020 at 1:05 AM Maxime Ripard <mri...@kernel.org> wrote:
>
> On Sun, Jan 19, 2020 at 10:30:58AM -0600, Samuel Holland wrote:
> > The Pinebook does not use the CSI bus on the A64. In fact it does not
> > use GPIO port E for anything at all. Thus the following regulators are
> > not used and do not need voltages set:
> >
> > - ALDO1: Connected to VCC-PE only
> > - DLDO3: Not connected
> > - ELDO3: Not connected
> >
> > Signed-off-by: Samuel Holland <sam...@sholland.org>
> > ---
> > .../boot/dts/allwinner/sun50i-a64-pinebook.dts | 16 +---------------
> > 1 file changed, 1 insertion(+), 15 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> > index ff32ca1a495e..8e7ce6ad28dd 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
> > @@ -202,9 +202,7 @@
> > };
> >
> > &reg_aldo1 {
> > - regulator-min-microvolt = <2800000>;
> > - regulator-max-microvolt = <2800000>;
> > - regulator-name = "vcc-csi";
> > + regulator-name = "vcc-pe";
> > };
>
> If it's connected to PE, I'd expect the voltage to be at 3.3v?

Commit message says that PE is not used, so we don't need to set it at all.

> Maxime
> _______________________________________________
> linux-arm-kernel mailing list
> linux-ar...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Samuel Holland

non lue,
21 janv. 2020, 22:14:0721/01/2020
à Maxime Ripard,Chen-Yu Tsai,Rob Herring,Mark Rutland,linux-ar...@lists.infradead.org,linux-...@vger.kernel.org,linux...@googlegroups.com
On 1/21/20 3:05 AM, Maxime Ripard wrote:
> On Sun, Jan 19, 2020 at 10:30:58AM -0600, Samuel Holland wrote:
>> The Pinebook does not use the CSI bus on the A64. In fact it does not
>> use GPIO port E for anything at all. Thus the following regulators are
>> not used and do not need voltages set:
>>
>> - ALDO1: Connected to VCC-PE only
>> - DLDO3: Not connected
>> - ELDO3: Not connected
>>
>> Signed-off-by: Samuel Holland <sam...@sholland.org>
>> ---
>> .../boot/dts/allwinner/sun50i-a64-pinebook.dts | 16 +---------------
>> 1 file changed, 1 insertion(+), 15 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> index ff32ca1a495e..8e7ce6ad28dd 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
>> @@ -202,9 +202,7 @@
>> };
>>
>> &reg_aldo1 {
>> - regulator-min-microvolt = <2800000>;
>> - regulator-max-microvolt = <2800000>;
>> - regulator-name = "vcc-csi";
>> + regulator-name = "vcc-pe";
>> };
>
> If it's connected to PE, I'd expect the voltage to be at 3.3v?

If we provide voltage constraints, the regulator core will enable the regulator
and set its voltage at boot. That seems like a bit of a waste.

I don't think the voltage really matters, since nothing is plugged in to the
port. ALDO1 can't go over 3.3V anyway, so even if it does get turned on for some
reason, nothing will get damaged.

Samuel

Vasily Khoruzhick

non lue,
24 janv. 2020, 18:11:5924/01/2020
à Maxime Ripard,Samuel Holland,Mark Rutland,Chen-Yu Tsai,linux-kernel,linux-sunxi,Rob Herring,arm-linux
On Fri, Jan 24, 2020 at 8:36 AM Maxime Ripard <max...@cerno.tech> wrote:
> I'm not sure the regulator core enables them if there's neither
> regulator-boot-on nor regulator-always-on.
>
> > I don't think the voltage really matters, since nothing is plugged in to the
> > port. ALDO1 can't go over 3.3V anyway, so even if it does get turned on for some
> > reason, nothing will get damaged.
>
> Looking at the schematics, it looks like the PE pins are connected to
> the front-facing camera?

The only camera on Pinebook is UVC
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message