2018-02-09 17:54:48

by Philipp Rossak

[permalink] [raw]
Subject: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

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

Philipp Rossak (3):
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(-)

--
2.11.0



2018-02-09 17:53:44

by Philipp Rossak

[permalink] [raw]
Subject: [PATCH 2/3] arm: dts: sun6i: a31s: bpi-m2: improve pmic properties

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 <[email protected]>
---
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


2018-02-09 17:53:57

by Philipp Rossak

[permalink] [raw]
Subject: [PATCH 3/3] arm: dts: sun6i: a31s: fix: bpi-m2: add missing regulators

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 <[email protected]>
---
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


2018-02-09 17:55:37

by Philipp Rossak

[permalink] [raw]
Subject: [PATCH 1/3] arm: dts: sun6i: a31s: bpi-m2: update mmc supply nodes

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 <[email protected]>
---
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


2018-02-10 14:51:52

by Sergey Suloev

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

On 02/09/2018 08:52 PM, 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
>
> Philipp Rossak (3):
> 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


2018-02-10 21:02:28

by Philipp Rossak

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

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

On 10.02.2018 14:56, Sergey Suloev wrote:
> On 02/09/2018 08:52 PM, 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
>>
>> Philipp Rossak (3):
>>    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
>

2018-02-10 21:52:20

by Sergey Suloev

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

On 02/11/2018 12:01 AM, Philipp Rossak wrote:
> 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
>
> On 10.02.2018 14:56, Sergey Suloev wrote:
>> On 02/09/2018 08:52 PM, 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
>>>
>>> Philipp Rossak (3):
>>>    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.



2018-02-10 22:08:29

by Philipp Rossak

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators



On 10.02.2018 22:08, Sergey Suloev wrote:
> On 02/11/2018 12:01 AM, Philipp Rossak wrote:
>> 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
>>
>> On 10.02.2018 14:56, Sergey Suloev wrote:
>>> On 02/09/2018 08:52 PM, 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
>>>>
>>>> Philipp Rossak (3):
>>>>    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

2018-02-11 07:31:37

by Sergey Suloev

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

On 02/11/2018 01:07 AM, Philipp Rossak wrote:
>
>
> On 10.02.2018 22:08, Sergey Suloev wrote:
>> On 02/11/2018 12:01 AM, Philipp Rossak wrote:
>>> 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
>>>
>>> On 10.02.2018 14:56, Sergey Suloev wrote:
>>>> On 02/09/2018 08:52 PM, 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
>>>>>
>>>>> Philipp Rossak (3):
>>>>>    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

I am going to test it and come back with outcome

Thanks


2018-02-11 07:56:43

by Sergey Suloev

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

On 02/11/2018 01:07 AM, Philipp Rossak wrote:
>
>
> On 10.02.2018 22:08, Sergey Suloev wrote:
>> On 02/11/2018 12:01 AM, Philipp Rossak wrote:
>>> 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
>>>
>>> On 10.02.2018 14:56, Sergey Suloev wrote:
>>>> On 02/09/2018 08:52 PM, 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
>>>>>
>>>>> Philipp Rossak (3):
>>>>>    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

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



2018-02-11 11:31:41

by Philipp Rossak

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

Am Sonntag, den 11.02.2018, 10:55 +0300 schrieb Sergey Suloev:
> On 02/11/2018 01:07 AM, Philipp Rossak wrote:
> >
> >
> > On 10.02.2018 22:08, Sergey Suloev wrote:
> > > On 02/11/2018 12:01 AM, Philipp Rossak wrote:
> > > > 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
> > > >
> > > > On 10.02.2018 14:56, Sergey Suloev wrote:
> > > > > On 02/09/2018 08:52 PM, 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
> > > > > >
> > > > > > Philipp Rossak (3):
> > > > > >    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


2018-02-11 11:37:50

by Sergey Suloev

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

On 02/11/2018 02:30 PM, Philipp Rossak wrote:
> Am Sonntag, den 11.02.2018, 10:55 +0300 schrieb Sergey Suloev:
>> On 02/11/2018 01:07 AM, Philipp Rossak wrote:
>>>
>>> On 10.02.2018 22:08, Sergey Suloev wrote:
>>>> On 02/11/2018 12:01 AM, Philipp Rossak wrote:
>>>>> 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
>>>>>
>>>>> On 10.02.2018 14:56, Sergey Suloev wrote:
>>>>>> On 02/09/2018 08:52 PM, 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
>>>>>>>
>>>>>>> Philipp Rossak (3):
>>>>>>>    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
>
the script is doing nothing, it is empty. The problem is related to hdmi.

The following dts code makes it happen:

&hdmi {
        status = "okay";
};



2018-02-11 11:46:05

by Sergey Suloev

[permalink] [raw]
Subject: Re: [PATCH 0/3] Fix broken bananapi m2 devicetree/regulators

On 02/11/2018 02:30 PM, Philipp Rossak wrote:
> Am Sonntag, den 11.02.2018, 10:55 +0300 schrieb Sergey Suloev:
>> On 02/11/2018 01:07 AM, Philipp Rossak wrote:
>>>
>>> On 10.02.2018 22:08, Sergey Suloev wrote:
>>>> On 02/11/2018 12:01 AM, Philipp Rossak wrote:
>>>>> 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
>>>>>
>>>>> On 10.02.2018 14:56, Sergey Suloev wrote:
>>>>>> On 02/09/2018 08:52 PM, 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
>>>>>>>
>>>>>>> Philipp Rossak (3):
>>>>>>>    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
>
ok, I confirm that your patches are not related to the issue. It is the
problem with sun4i drm / hdmi which is not working on bpi m2.

Thanks


2018-02-11 22:16:00

by Philipp Rossak

[permalink] [raw]
Subject: Re: [PATCH 1/3] arm: dts: sun6i: a31s: bpi-m2: update mmc supply nodes

Am Freitag, den 09.02.2018, 18:52 +0100 schrieb 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.
>
> Signed-off-by: Philipp Rossak <[email protected]>
> ---
>  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
>   mmc-pwrseq = <&mmc2_pwrseq>;
>   bus-width = <4>;
>   non-removable;

Philipp