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 <[email protected]>
---
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
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 <[email protected]>
---
.../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 @@
};
®_aldo1 {
- regulator-min-microvolt = <2800000>;
- regulator-max-microvolt = <2800000>;
- regulator-name = "vcc-csi";
+ regulator-name = "vcc-pe";
};
®_aldo2 {
@@ -267,12 +265,6 @@
regulator-name = "vcc-edp";
};
-®_dldo3 {
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "avdd-csi";
-};
-
®_dldo4 {
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@@ -286,12 +278,6 @@
regulator-name = "cpvdd";
};
-®_eldo3 {
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-name = "vdd-1v8-csi";
-};
-
®_fldo1 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
--
2.23.0
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 <[email protected]>
---
.../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 = <®_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;
+ };
+
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
--
2.23.0
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 <[email protected]>
---
.../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 = <®_eldo1>;
+ vcc-pd-supply = <®_dcdc1>;
+ vcc-pe-supply = <®_aldo1>;
+ vcc-pg-supply = <®_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 = <®_aldo2>;
+ */
+};
+
&r_rsb {
status = "okay";
--
2.23.0
On Sun, Jan 19, 2020 at 10:30:56AM -0600, Samuel Holland wrote:
> 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 <[email protected]>
Applied, thanks!
Maxime
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 <[email protected]>
> ---
> .../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 @@
> };
>
> ®_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?
Maxime
On Sun, Jan 19, 2020 at 10:31:02AM -0600, Samuel Holland wrote:
> 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 <[email protected]>
Applied, thanks!
Maxime
On Sun, Jan 19, 2020 at 10:31:03AM -0600, Samuel Holland wrote:
> 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 <[email protected]>
Applied, thanks!
Maxime
On Tue, Jan 21, 2020 at 1:05 AM Maxime Ripard <[email protected]> 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 <[email protected]>
> > ---
> > .../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 @@
> > };
> >
> > ®_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
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
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 <[email protected]>
>> ---
>> .../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 @@
>> };
>>
>> ®_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
On Tue, Jan 21, 2020 at 09:14:02PM -0600, Samuel Holland wrote:
> 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 <[email protected]>
> >> ---
> >> .../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 @@
> >> };
> >>
> >> ®_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'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?
Maxime
On Fri, Jan 24, 2020 at 8:36 AM Maxime Ripard <[email protected]> wrote:
>
> On Tue, Jan 21, 2020 at 09:14:02PM -0600, Samuel Holland wrote:
> > 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 <[email protected]>
> > >> ---
> > >> .../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 @@
> > >> };
> > >>
> > >> ®_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'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
>
> Maxime
>
> _______________________________________________
> linux-arm-kernel mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
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 <[email protected]>
Applied, thanks!
Maxime