linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators
@ 2018-02-14 14:10 Philipp Rossak
  2018-02-14 14:10 ` [PATCH v2 1/2] arm: dts: sun6i: a31s: bpi-m2: improve pmic properties Philipp Rossak
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Philipp Rossak @ 2018-02-14 14:10 UTC (permalink / raw)
  To: linux-arm-kernel

This patchseries fixes the bananapi m1 devicetree, to be able to boot again.
The first two patches update/improve the devicetree and the last patch adds
all missing regulators.

Regards,
Philipp

Changes since v1:
	* squashed commit 1 and 3
	* fix wrong mmc regulator

Philipp Rossak (2):
  arm: dts: sun6i: a31s: bpi-m2: improve pmic properties
  arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators

 arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 63 ++++++++++++++++++++++--
 1 file changed, 60 insertions(+), 3 deletions(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 1/2] arm: dts: sun6i: a31s: bpi-m2: improve pmic properties
  2018-02-14 14:10 [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators Philipp Rossak
@ 2018-02-14 14:10 ` Philipp Rossak
  2018-02-14 14:10 ` [PATCH v2 2/2] arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators Philipp Rossak
  2018-02-15  9:08 ` [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators Maxime Ripard
  2 siblings, 0 replies; 5+ messages in thread
From: Philipp Rossak @ 2018-02-14 14:10 UTC (permalink / raw)
  To: linux-arm-kernel

The eldoin is supplied from the dcdc1 regulator. The N_VBUSEN pin is
connected to an external power regulator (SY6280AAC).
With this commit we update the pmic binding properties to support
those features.

Fixes: 7daa21370075 ("ARM: dts: sunxi: Add regulators for Sinovoip
BPI-M2")

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
index 51e6f1d21c32..fb34f32502cf 100644
--- a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
@@ -163,6 +163,8 @@
 		reg = <0x68>;
 		interrupt-parent = <&nmi_intc>;
 		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+		eldoin-supply = <&reg_dcdc1>;
+		x-powers,drive-vbus-en;
 	};
 };
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators
  2018-02-14 14:10 [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators Philipp Rossak
  2018-02-14 14:10 ` [PATCH v2 1/2] arm: dts: sun6i: a31s: bpi-m2: improve pmic properties Philipp Rossak
@ 2018-02-14 14:10 ` Philipp Rossak
  2018-02-15  9:08 ` [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators Maxime Ripard
  2 siblings, 0 replies; 5+ messages in thread
From: Philipp Rossak @ 2018-02-14 14:10 UTC (permalink / raw)
  To: linux-arm-kernel

This patch fixes a bootproblem with the Bananapi M2 board. Since there
are some regulators missing we add them right now. Those values come
from the schematic, below you can find a small overview:

* reg_aldo1:  3,3V, powers the wifi
* reg_aldo2:  2,5V, powers the IO of the RTL8211E
* reg_aldo3:  3,3V, powers the audio

* reg_dldo1:  3,0V, powers the RTL8211E
* reg_dldo2:  2,8V, powers the analog part of the csi
* reg_dldo3:  3,3V, powers misc
* reg_eldo1:  1,8V, powers the csi
* reg_ldo_io1:1,8V, powers the gpio

* reg_dc5ldo: needs to be always on

This patch updates also the vmmc-supply properties on the mmc0 and mmc2
node to use the allready existent regulators.
We can now remove the sunxi-common-regulators.dtsi include since we
don't need it anymore.

Fixes: 7daa21370075 ("ARM: dts: sunxi: Add regulators for Sinovoip
BPI-M2")

Signed-off-by: Philipp Rossak <embed3d@gmail.com>
---
 arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 61 ++++++++++++++++++++++--
 1 file changed, 58 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
index fb34f32502cf..b2758dd8ce43 100644
--- a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
@@ -42,7 +42,6 @@
 
 /dts-v1/;
 #include "sun6i-a31s.dtsi"
-#include "sunxi-common-regulators.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 
 / {
@@ -99,6 +98,7 @@
 	pinctrl-0 = <&gmac_pins_rgmii_a>, <&gmac_phy_reset_pin_bpi_m2>;
 	phy = <&phy1>;
 	phy-mode = "rgmii";
+	phy-supply = <&reg_dldo1>;
 	snps,reset-gpio = <&pio 0 21 GPIO_ACTIVE_HIGH>; /* PA21 */
 	snps,reset-active-low;
 	snps,reset-delays-us = <0 10000 30000>;
@@ -118,7 +118,7 @@
 &mmc0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bpi_m2>;
-	vmmc-supply = <&reg_vcc3v0>;
+	vmmc-supply = <&reg_dcdc1>;
 	bus-width = <4>;
 	cd-gpios = <&pio 0 4 GPIO_ACTIVE_HIGH>; /* PA4 */
 	cd-inverted;
@@ -132,7 +132,7 @@
 &mmc2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc2_pins_a>;
-	vmmc-supply = <&reg_vcc3v0>;
+	vmmc-supply = <&reg_aldo1>;
 	mmc-pwrseq = <&mmc2_pwrseq>;
 	bus-width = <4>;
 	non-removable;
@@ -195,7 +195,28 @@
 
 #include "axp22x.dtsi"
 
+&reg_aldo1 {
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-wifi";
+};
+
+&reg_aldo2 {
+	regulator-always-on;
+	regulator-min-microvolt = <2500000>;
+	regulator-max-microvolt = <2500000>;
+	regulator-name = "vcc-gmac";
+};
+
+&reg_aldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "avcc";
+};
+
 &reg_dc5ldo {
+	regulator-always-on;
 	regulator-min-microvolt = <700000>;
 	regulator-max-microvolt = <1320000>;
 	regulator-name = "vdd-cpus";
@@ -235,6 +256,40 @@
 	regulator-name = "vcc-dram";
 };
 
+&reg_dldo1 {
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-name = "vcc-mac";
+};
+
+&reg_dldo2 {
+	regulator-min-microvolt = <2800000>;
+	regulator-max-microvolt = <2800000>;
+	regulator-name = "avdd-csi";
+};
+
+&reg_dldo3 {
+	regulator-always-on;
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+	regulator-name = "vcc-pb";
+};
+
+&reg_eldo1 {
+	regulator-min-microvolt = <1800000>;
+	regulator-max-microvolt = <1800000>;
+	regulator-name = "vdd-csi";
+	status = "okay";
+};
+
+&reg_ldo_io1 {
+	regulator-always-on;
+	regulator-min-microvolt = <1800000>;
+	regulator-max-microvolt = <1800000>;
+	regulator-name = "vcc-pm-cpus";
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pins_a>;
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators
  2018-02-14 14:10 [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators Philipp Rossak
  2018-02-14 14:10 ` [PATCH v2 1/2] arm: dts: sun6i: a31s: bpi-m2: improve pmic properties Philipp Rossak
  2018-02-14 14:10 ` [PATCH v2 2/2] arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators Philipp Rossak
@ 2018-02-15  9:08 ` Maxime Ripard
  2018-02-15 11:19   ` Philipp Rossak
  2 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2018-02-15  9:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 14, 2018 at 03:10:23PM +0100, Philipp Rossak wrote:
> This patchseries fixes the bananapi m1 devicetree, to be able to boot again.
> The first two patches update/improve the devicetree and the last patch adds
> all missing regulators.
> 
> Regards,
> Philipp
> 
> Changes since v1:
> 	* squashed commit 1 and 3
> 	* fix wrong mmc regulator
> 
> Philipp Rossak (2):
>   arm: dts: sun6i: a31s: bpi-m2: improve pmic properties
>   arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators

Applied both.

I had to make a couple of changes though, in the commit title arm
should be uppercase, and the fix isn't needed.

I also added stable in Cc, since these patches have been there for
quite some time.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180215/6bebb158/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators
  2018-02-15  9:08 ` [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators Maxime Ripard
@ 2018-02-15 11:19   ` Philipp Rossak
  0 siblings, 0 replies; 5+ messages in thread
From: Philipp Rossak @ 2018-02-15 11:19 UTC (permalink / raw)
  To: linux-arm-kernel



On 15.02.2018 10:08, Maxime Ripard wrote:
> On Wed, Feb 14, 2018 at 03:10:23PM +0100, Philipp Rossak wrote:
>> This patchseries fixes the bananapi m1 devicetree, to be able to boot again.
>> The first two patches update/improve the devicetree and the last patch adds
>> all missing regulators.
>>
>> Regards,
>> Philipp
>>
>> Changes since v1:
>> 	* squashed commit 1 and 3
>> 	* fix wrong mmc regulator
>>
>> Philipp Rossak (2):
>>    arm: dts: sun6i: a31s: bpi-m2: improve pmic properties
>>    arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators
> 
> Applied both.
> 
> I had to make a couple of changes though, in the commit title arm
> should be uppercase, and the fix isn't needed.
> 
> I also added stable in Cc, since these patches have been there for
> quite some time.
> 
> Maxime
> 

Thanks!

Philipp

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-15 11:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 14:10 [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators Philipp Rossak
2018-02-14 14:10 ` [PATCH v2 1/2] arm: dts: sun6i: a31s: bpi-m2: improve pmic properties Philipp Rossak
2018-02-14 14:10 ` [PATCH v2 2/2] arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators Philipp Rossak
2018-02-15  9:08 ` [PATCH v2 0/2] Fix broken bananapi m2 devicetree/regulators Maxime Ripard
2018-02-15 11:19   ` Philipp Rossak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).