Discussion:
[PATCH 1/3] arm: dts: sun6i: a31s: bpi-m2: update mmc supply nodes
(too old to reply)
Philipp Rossak
2018-02-09 17:52:34 UTC
Permalink
This patch updates 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.

Signed-off-by: Philipp Rossak <***@gmail.com>
---
arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 5 ++---
1 file changed, 2 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 51e6f1d21c32..a8d86211c8f3 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>

/ {
@@ -118,7 +117,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 +131,7 @@
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_pins_a>;
- vmmc-supply = <&reg_vcc3v0>;
+ vmmc-supply = <&reg_dcdc1>;
mmc-pwrseq = <&mmc2_pwrseq>;
bus-width = <4>;
non-removable;
--
2.11.0
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philipp Rossak
2018-02-09 17:52:35 UTC
Permalink
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.

Signed-off-by: Philipp Rossak <***@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 a8d86211c8f3..556528386858 100644
--- a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
@@ -162,6 +162,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
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philipp Rossak
2018-02-09 17:52:36 UTC
Permalink
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

Signed-off-by: Philipp Rossak <***@gmail.com>
---
arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 56 ++++++++++++++++++++++++
1 file changed, 56 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..01fcfe0649ad 100644
--- a/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
+++ b/arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts
@@ -99,6 +99,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>;
@@ -193,7 +194,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";
@@ -233,6 +255,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
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philipp Rossak
2018-02-10 21:01:30 UTC
Permalink
Hey Sergey,

Thanks for mentioning, but I think the problem has nothing to do with
those patches. I tested them with the v4.15.0 Kernel since this is the
last stable release and we are right now in the merging window.

I tested the latest mainline, without those patches and the kernel is
not booting (I can't see any uart output).

Thanks,
Philipp
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
   arm: dts: sun6i: a31s: bpi-m2: update mmc supply nodes
   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 | 70
+++++++++++++++++++++++-
  1 file changed, 67 insertions(+), 3 deletions(-)
patches are not working
Thanks
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philipp Rossak
2018-02-10 22:07:01 UTC
Permalink
Post by Philipp Rossak
Hey Sergey,
Thanks for mentioning, but I think the problem has nothing to do with
those patches. I tested them with the v4.15.0 Kernel since this is the
last stable release and we are right now in the merging window.
I tested the latest mainline, without those patches and the kernel is
not booting (I can't see any uart output).
Thanks,
Philipp
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
   arm: dts: sun6i: a31s: bpi-m2: update mmc supply nodes
   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 | 70
+++++++++++++++++++++++-
  1 file changed, 67 insertions(+), 3 deletions(-)
patches are not working
Thanks
same problem, but after applying the patches my device is till hanging.
Can you please share a bootlog? Here is mine [1]. As you can see I'm
able to boot.
I build it with this branch [2]. For testing you should replace the dtb
and the uImage/zImage

Philipp


[1]: https://pastebin.com/mVjv3LDf
[2]: https://github.com/embed-3d/linux/tree/testing/bpi-m2-regulator-test-2
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philipp Rossak
2018-02-11 11:30:31 UTC
Permalink
Post by Philipp Rossak
Post by Philipp Rossak
Hey Sergey,
Thanks for mentioning, but I think the problem has nothing to
do 
with those patches. I tested them with the v4.15.0 Kernel since
this 
is the last stable release and we are right now in the merging
window.
I tested the latest mainline, without those patches and the
kernel 
is not booting (I can't see any uart output).
Thanks,
Philipp
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
   arm: dts: sun6i: a31s: bpi-m2: update mmc supply nodes
   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 | 70 
+++++++++++++++++++++++-
  1 file changed, 67 insertions(+), 3 deletions(-)
patches are not working
Thanks
same problem, but after applying the patches my device is till hanging.
Can you please share a bootlog? Here is mine [1]. As you can see
I'm 
able to boot.
I build it with this branch [2]. For testing you should replace
the 
dtb and the uImage/zImage
Philipp
[1]: https://pastebin.com/mVjv3LDf
[2]: 
https://github.com/embed-3d/linux/tree/testing/bpi-m2-regulator-tes
t-2
My dmesg is very similar to yours unless it hangs on the last line
[1]. 
For this test I used kernel from tag v4.15 with no additional
patching.
[1] https://pastebin.com/3a6bk5Dk
For me it looks like you have a different kernel and also an different
dtb that you patch! And you are applying also a fixup script.
These patches should be applied on top of linux mainline.

fixup script:
Applying kernel provided DT fixup script (sun6i-a31s-fixup.scr)


Linux versions:
4.15.0-00003-g1bbe5edde691 vs 4.15.0-sunxi-dirty

In addition to that you are also booting into fb/hdmi.

If you use my branch (uImage and dtb) and replace the current boot.cmd
with this (to get the boot.scr you need to use mkimage) it should work:

setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
panic=10
load mmc 0:1 0x43000000 ${fdtfile} || load mmc 0:1 0x43000000
boot/${fdtfile}
load mmc 0:1 0x42000000 uImage || load mmc 0:1 0x42000000 boot/uImage
bootm 0x42000000 - 0x43000000
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philipp Rossak
2018-02-11 22:15:02 UTC
Permalink
Post by Philipp Rossak
This patch updates 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.
---
 arch/arm/boot/dts/sun6i-a31s-sinovoip-bpi-m2.dts | 5 ++---
 1 file changed, 2 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 51e6f1d21c32..a8d86211c8f3 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>
 
 / {
@@ -118,7 +117,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 +131,7 @@
 &mmc2 {
  pinctrl-names = "default";
  pinctrl-0 = <&mmc2_pins_a>;
- vmmc-supply = <&reg_vcc3v0>;
+ vmmc-supply = <&reg_dcdc1>;
^^
this here is wrong! this should be &reg_aldo1
Post by Philipp Rossak
  mmc-pwrseq = <&mmc2_pwrseq>;
  bus-width = <4>;
  non-removable;
Philipp
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...