Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-11 Thread Jagan Teki
On Fri, Jan 11, 2019 at 8:41 PM Zoltan HERPAI  wrote:
>
> Hi,
>
> Jagan Teki wrote:
> >>> A20, can boot as it is, it doesn't effect mmc node on DT, since DM_MMC
> >>> is not available.
> >>>
> That's interesting, the Linksprite_pcDuino3_defconfig does have DM_MMC
> set, and after applying your patch (thanks for working it out), it does
> fix this A20 board as well. A quick spot-check showed that this is the
> only A20/sun7i board where DM_MMC is enabled (since
> 3936514b82e8a00115c56bf58e8745f73bfb119f) - not sure if in light of
> this, could the rest of the A20 boards have this option enabled.

DM_MMC is not default on all A20, we are planning to enable it in
coming release.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-11 Thread Zoltan HERPAI

Hi,

Jagan Teki wrote:

A20, can boot as it is, it doesn't effect mmc node on DT, since DM_MMC
is not available.
  
That's interesting, the Linksprite_pcDuino3_defconfig does have DM_MMC 
set, and after applying your patch (thanks for working it out), it does 
fix this A20 board as well. A quick spot-check showed that this is the 
only A20/sun7i board where DM_MMC is enabled (since 
3936514b82e8a00115c56bf58e8745f73bfb119f) - not sure if in light of 
this, could the rest of the A20 boards have this option enabled.


Thanks,
Zoltan H

--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-09 Thread Marek Kraus
Hi Jagan,

After applying your patch on v2019.1-rc3 and defining CONFIG_DM_MMC, u-boot 
finally initialize MMC and boots kernel without any problems on 
A10-OLinuXino-Lime. :)

Thank you for your fix.
Marek Kraus

Dňa streda, 9. januára 2019 12:28:37 UTC+1 Jagan Teki napísal(-a):
>
> On Wed, Jan 9, 2019 at 1:08 AM Priit Laes > 
> wrote: 
> > 
> > On Tue, Jan 08, 2019 at 11:54:32PM +0530, Jagan Teki wrote: 
> > > On Thu, Jan 3, 2019 at 9:33 PM Zoltan HERPAI  > wrote: 
> > > > 
> > > > Hi Jagan, Adam, 
> > > > 
> > > > On Thu, 3 Jan 2019, Jagan Teki wrote: 
> > > > 
> > > > > On Thu, Jan 3, 2019 at 6:57 PM Zoltan HERPAI  > wrote: 
> > > > >> 
> > > > >> Hi all, 
> > > > >> 
> > > > >> The DTS resync between 2018.09 and 2018.11 seems to have broken 
> the MMC 
> > > > >> support for the Linksprite pcDuino (A10) and pcDuino v3 (A20) 
> boards. 
> > > > >> The resync happened in b9d59d0 [1] and 3c92cca [2], after which 
> u-boot 
> > > > >> doesn't recognize the MMC controller and freezes the board 
> (exactly the 
> > > > >> same happens on the v3 board). 
> > > > >> 
> > > > >>  CUT HERE  
> > > > >> U-Boot SPL 2018.11 (Dec 31 2018 - 14:36:52 +) 
> > > > >> DRAM: 1024 MiB 
> > > > >> CPU: 100800Hz, AXI/AHB/APB: 3/2/2 
> > > > >> Trying to boot from MMC1 
> > > > >> 
> > > > >> 
> > > > >> U-Boot 2018.11 (Dec 31 2018 - 14:36:52 +) Allwinner 
> Technology 
> > > > >> 
> > > > >> CPU:   Allwinner A10 (SUN4I) 
> > > > >> Model: LinkSprite pcDuino 
> > > > >> I2C:   ready 
> > > > >> DRAM:  1 GiB 
> > > > >> MMC: 
> > > > >>  CUT HERE  
> > > > >> 
> > > > >> Reverting these commits solve the problem and the boards boot 
> correctly. 
> > > > >> Initially I thought this might be due to removing the 
> > > > >> mmc0_cd_pin_reference_design (syncing that from the kernel into 
> u-boot), 
> > > > >> which was discussed here [3] and was considered as a move that 
> might 
> > > > >> break MMC on some boards, but re-adding that reference pin only 
> in the 
> > > > >> pcduino DTSes did not resolve the freeze. 
> > > > >> 
> > > > >> Questions: 
> > > > >>  - A similar board - where the reference pin is used for CD - is 
> the 
> > > > >> Cubieboard 2. Can someone test 2018.11 on it to see if it freezes 
> as 
> > > > >> well? Out of A20, I have a Bananapro, but that's using a 
> non-reference 
> > > > >> pin for CD, and boots fine. 
> > > > > 
> > > > > A10, enable DM_MMC so it can effect DT. or enable 
> CONFIG_MMC0_CD_PIN="PH1" 
> > > > > 
> > > > > Added Adam, (who actually tested DM_MMC on A10) 
> > > > 
> > > > I tested with "either" and "both", neither worked - see below. Along 
> with 
> > > > CONFIG_DM_MMC, I've also enabled CONFIG_DM_DEBUG to see what's 
> happening - 
> > > > here is the output: 
> > > > 
> > > > [...] 
> > > > MMC:   uclass_find_device_by_seq: 0 0 
> > > > - -1 -1 'mmc@1c0f000' 
> > > > - not found 
> > > > uclass_find_device_by_seq: 1 0 
> > > > - -1 -1 'mmc@1c0f000' 
> > > > - not found 
> > > > uclass_find_device_by_seq: 0 -1 
> > > > uclass_find_device_by_seq: 0 0 
> > > > - -1 -1 'mmc@1c0f000' 
> > > > - not found 
> > > > Entering sunxi_mmc_probe 
> > > > ofnode_read_u32: bus-width: 0x4 (4) 
> > > > sunxi_mmc: priv->reg: 1c0f000 
> > > > sunxi_mmc: priv->mclkreg: 1c2 
> > > 
> > > I'm looking for gate and clk register values, print at the end of 
> probe 
> > > 1c2 + 0x60 
> > > 1c2 + 0x88 
> > 
> > With current master: 
> > sunxi_mmc_probe: gate_reg: 0x4141 
> > sunxi_mmc_probe: clk_reg: 0x0 
>
> Please check this gist [1] 
>
> [1] https://gist.github.com/openedev/e76ef26f75f133883f295225efb5b4bd 
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-09 Thread Jagan Teki
On Wed, Jan 9, 2019 at 1:08 AM Priit Laes  wrote:
>
> On Tue, Jan 08, 2019 at 11:54:32PM +0530, Jagan Teki wrote:
> > On Thu, Jan 3, 2019 at 9:33 PM Zoltan HERPAI  wrote:
> > >
> > > Hi Jagan, Adam,
> > >
> > > On Thu, 3 Jan 2019, Jagan Teki wrote:
> > >
> > > > On Thu, Jan 3, 2019 at 6:57 PM Zoltan HERPAI  wrote:
> > > >>
> > > >> Hi all,
> > > >>
> > > >> The DTS resync between 2018.09 and 2018.11 seems to have broken the MMC
> > > >> support for the Linksprite pcDuino (A10) and pcDuino v3 (A20) boards.
> > > >> The resync happened in b9d59d0 [1] and 3c92cca [2], after which u-boot
> > > >> doesn't recognize the MMC controller and freezes the board (exactly the
> > > >> same happens on the v3 board).
> > > >>
> > > >>  CUT HERE 
> > > >> U-Boot SPL 2018.11 (Dec 31 2018 - 14:36:52 +)
> > > >> DRAM: 1024 MiB
> > > >> CPU: 100800Hz, AXI/AHB/APB: 3/2/2
> > > >> Trying to boot from MMC1
> > > >>
> > > >>
> > > >> U-Boot 2018.11 (Dec 31 2018 - 14:36:52 +) Allwinner Technology
> > > >>
> > > >> CPU:   Allwinner A10 (SUN4I)
> > > >> Model: LinkSprite pcDuino
> > > >> I2C:   ready
> > > >> DRAM:  1 GiB
> > > >> MMC:
> > > >>  CUT HERE 
> > > >>
> > > >> Reverting these commits solve the problem and the boards boot 
> > > >> correctly.
> > > >> Initially I thought this might be due to removing the
> > > >> mmc0_cd_pin_reference_design (syncing that from the kernel into 
> > > >> u-boot),
> > > >> which was discussed here [3] and was considered as a move that might
> > > >> break MMC on some boards, but re-adding that reference pin only in the
> > > >> pcduino DTSes did not resolve the freeze.
> > > >>
> > > >> Questions:
> > > >>  - A similar board - where the reference pin is used for CD - is the
> > > >> Cubieboard 2. Can someone test 2018.11 on it to see if it freezes as
> > > >> well? Out of A20, I have a Bananapro, but that's using a non-reference
> > > >> pin for CD, and boots fine.
> > > >
> > > > A10, enable DM_MMC so it can effect DT. or enable 
> > > > CONFIG_MMC0_CD_PIN="PH1"
> > > >
> > > > Added Adam, (who actually tested DM_MMC on A10)
> > >
> > > I tested with "either" and "both", neither worked - see below. Along with
> > > CONFIG_DM_MMC, I've also enabled CONFIG_DM_DEBUG to see what's happening -
> > > here is the output:
> > >
> > > [...]
> > > MMC:   uclass_find_device_by_seq: 0 0
> > > - -1 -1 'mmc@1c0f000'
> > > - not found
> > > uclass_find_device_by_seq: 1 0
> > > - -1 -1 'mmc@1c0f000'
> > > - not found
> > > uclass_find_device_by_seq: 0 -1
> > > uclass_find_device_by_seq: 0 0
> > > - -1 -1 'mmc@1c0f000'
> > > - not found
> > > Entering sunxi_mmc_probe
> > > ofnode_read_u32: bus-width: 0x4 (4)
> > > sunxi_mmc: priv->reg: 1c0f000
> > > sunxi_mmc: priv->mclkreg: 1c2
> >
> > I'm looking for gate and clk register values, print at the end of probe
> > 1c2 + 0x60
> > 1c2 + 0x88
>
> With current master:
> sunxi_mmc_probe: gate_reg: 0x4141
> sunxi_mmc_probe: clk_reg: 0x0

Please check this gist [1]

[1] https://gist.github.com/openedev/e76ef26f75f133883f295225efb5b4bd

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-08 Thread Priit Laes
On Tue, Jan 08, 2019 at 11:54:32PM +0530, Jagan Teki wrote:
> On Thu, Jan 3, 2019 at 9:33 PM Zoltan HERPAI  wrote:
> >
> > Hi Jagan, Adam,
> >
> > On Thu, 3 Jan 2019, Jagan Teki wrote:
> >
> > > On Thu, Jan 3, 2019 at 6:57 PM Zoltan HERPAI  wrote:
> > >>
> > >> Hi all,
> > >>
> > >> The DTS resync between 2018.09 and 2018.11 seems to have broken the MMC
> > >> support for the Linksprite pcDuino (A10) and pcDuino v3 (A20) boards.
> > >> The resync happened in b9d59d0 [1] and 3c92cca [2], after which u-boot
> > >> doesn't recognize the MMC controller and freezes the board (exactly the
> > >> same happens on the v3 board).
> > >>
> > >>  CUT HERE 
> > >> U-Boot SPL 2018.11 (Dec 31 2018 - 14:36:52 +)
> > >> DRAM: 1024 MiB
> > >> CPU: 100800Hz, AXI/AHB/APB: 3/2/2
> > >> Trying to boot from MMC1
> > >>
> > >>
> > >> U-Boot 2018.11 (Dec 31 2018 - 14:36:52 +) Allwinner Technology
> > >>
> > >> CPU:   Allwinner A10 (SUN4I)
> > >> Model: LinkSprite pcDuino
> > >> I2C:   ready
> > >> DRAM:  1 GiB
> > >> MMC:
> > >>  CUT HERE 
> > >>
> > >> Reverting these commits solve the problem and the boards boot correctly.
> > >> Initially I thought this might be due to removing the
> > >> mmc0_cd_pin_reference_design (syncing that from the kernel into u-boot),
> > >> which was discussed here [3] and was considered as a move that might
> > >> break MMC on some boards, but re-adding that reference pin only in the
> > >> pcduino DTSes did not resolve the freeze.
> > >>
> > >> Questions:
> > >>  - A similar board - where the reference pin is used for CD - is the
> > >> Cubieboard 2. Can someone test 2018.11 on it to see if it freezes as
> > >> well? Out of A20, I have a Bananapro, but that's using a non-reference
> > >> pin for CD, and boots fine.
> > >
> > > A10, enable DM_MMC so it can effect DT. or enable CONFIG_MMC0_CD_PIN="PH1"
> > >
> > > Added Adam, (who actually tested DM_MMC on A10)
> >
> > I tested with "either" and "both", neither worked - see below. Along with
> > CONFIG_DM_MMC, I've also enabled CONFIG_DM_DEBUG to see what's happening -
> > here is the output:
> >
> > [...]
> > MMC:   uclass_find_device_by_seq: 0 0
> > - -1 -1 'mmc@1c0f000'
> > - not found
> > uclass_find_device_by_seq: 1 0
> > - -1 -1 'mmc@1c0f000'
> > - not found
> > uclass_find_device_by_seq: 0 -1
> > uclass_find_device_by_seq: 0 0
> > - -1 -1 'mmc@1c0f000'
> > - not found
> > Entering sunxi_mmc_probe
> > ofnode_read_u32: bus-width: 0x4 (4)
> > sunxi_mmc: priv->reg: 1c0f000
> > sunxi_mmc: priv->mclkreg: 1c2
> 
> I'm looking for gate and clk register values, print at the end of probe
> 1c2 + 0x60
> 1c2 + 0x88

With current master:
sunxi_mmc_probe: gate_reg: 0x4141
sunxi_mmc_probe: clk_reg: 0x0

With 3c92cca3cda0d72c11c41bc0b07edcff127cf194 reverted:
sunxi_mmc_probe: gate_reg: 0x4141
sunxi_mmc_probe: clk_reg: 0x8000


> 
> > ofnode_read_bool: cd-inverted: false
> > 
> >
> >
> > > A20, can boot as it is, it doesn't effect mmc node on DT, since DM_MMC
> > > is not available.
> > >
> > >>  - There are some clock-related changes in this DTS resync, however I
> > >> have less than optimal experience with clocks. Can someone help check if
> > >> these changes might cause the issue?
> > >
> > > OK, better dump the clock reg value at the end of sunxi_mmc_probe
> >
> > For A20 it looks like this:
> >
> > 
> > MMC:   Entering sunxi_mmc_probe
> > sunxi_mmc: priv->reg: 1c0f000
> > sunxi_mmc: priv->mclkreg: 1c2
> 
> Same for here?
> 
> -- 
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-08 Thread Jagan Teki
On Thu, Jan 3, 2019 at 9:33 PM Zoltan HERPAI  wrote:
>
> Hi Jagan, Adam,
>
> On Thu, 3 Jan 2019, Jagan Teki wrote:
>
> > On Thu, Jan 3, 2019 at 6:57 PM Zoltan HERPAI  wrote:
> >>
> >> Hi all,
> >>
> >> The DTS resync between 2018.09 and 2018.11 seems to have broken the MMC
> >> support for the Linksprite pcDuino (A10) and pcDuino v3 (A20) boards.
> >> The resync happened in b9d59d0 [1] and 3c92cca [2], after which u-boot
> >> doesn't recognize the MMC controller and freezes the board (exactly the
> >> same happens on the v3 board).
> >>
> >>  CUT HERE 
> >> U-Boot SPL 2018.11 (Dec 31 2018 - 14:36:52 +)
> >> DRAM: 1024 MiB
> >> CPU: 100800Hz, AXI/AHB/APB: 3/2/2
> >> Trying to boot from MMC1
> >>
> >>
> >> U-Boot 2018.11 (Dec 31 2018 - 14:36:52 +) Allwinner Technology
> >>
> >> CPU:   Allwinner A10 (SUN4I)
> >> Model: LinkSprite pcDuino
> >> I2C:   ready
> >> DRAM:  1 GiB
> >> MMC:
> >>  CUT HERE 
> >>
> >> Reverting these commits solve the problem and the boards boot correctly.
> >> Initially I thought this might be due to removing the
> >> mmc0_cd_pin_reference_design (syncing that from the kernel into u-boot),
> >> which was discussed here [3] and was considered as a move that might
> >> break MMC on some boards, but re-adding that reference pin only in the
> >> pcduino DTSes did not resolve the freeze.
> >>
> >> Questions:
> >>  - A similar board - where the reference pin is used for CD - is the
> >> Cubieboard 2. Can someone test 2018.11 on it to see if it freezes as
> >> well? Out of A20, I have a Bananapro, but that's using a non-reference
> >> pin for CD, and boots fine.
> >
> > A10, enable DM_MMC so it can effect DT. or enable CONFIG_MMC0_CD_PIN="PH1"
> >
> > Added Adam, (who actually tested DM_MMC on A10)
>
> I tested with "either" and "both", neither worked - see below. Along with
> CONFIG_DM_MMC, I've also enabled CONFIG_DM_DEBUG to see what's happening -
> here is the output:
>
> [...]
> MMC:   uclass_find_device_by_seq: 0 0
> - -1 -1 'mmc@1c0f000'
> - not found
> uclass_find_device_by_seq: 1 0
> - -1 -1 'mmc@1c0f000'
> - not found
> uclass_find_device_by_seq: 0 -1
> uclass_find_device_by_seq: 0 0
> - -1 -1 'mmc@1c0f000'
> - not found
> Entering sunxi_mmc_probe
> ofnode_read_u32: bus-width: 0x4 (4)
> sunxi_mmc: priv->reg: 1c0f000
> sunxi_mmc: priv->mclkreg: 1c2

I'm looking for gate and clk register values, print at the end of probe
1c2 + 0x60
1c2 + 0x88

> ofnode_read_bool: cd-inverted: false
> 
>
>
> > A20, can boot as it is, it doesn't effect mmc node on DT, since DM_MMC
> > is not available.
> >
> >>  - There are some clock-related changes in this DTS resync, however I
> >> have less than optimal experience with clocks. Can someone help check if
> >> these changes might cause the issue?
> >
> > OK, better dump the clock reg value at the end of sunxi_mmc_probe
>
> For A20 it looks like this:
>
> 
> MMC:   Entering sunxi_mmc_probe
> sunxi_mmc: priv->reg: 1c0f000
> sunxi_mmc: priv->mclkreg: 1c2

Same for here?

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-07 Thread Priit Laes
On Thu, Jan 03, 2019 at 05:03:13PM +0100, Zoltan HERPAI wrote:
> Hi Jagan, Adam,
> 
> On Thu, 3 Jan 2019, Jagan Teki wrote:
> 
> > On Thu, Jan 3, 2019 at 6:57 PM Zoltan HERPAI  wrote:
> > > 
> > > Hi all,
> > > 
> > > The DTS resync between 2018.09 and 2018.11 seems to have broken the MMC
> > > support for the Linksprite pcDuino (A10) and pcDuino v3 (A20) boards.
> > > The resync happened in b9d59d0 [1] and 3c92cca [2], after which u-boot
> > > doesn't recognize the MMC controller and freezes the board (exactly the
> > > same happens on the v3 board).
...
> > A10, enable DM_MMC so it can effect DT. or enable CONFIG_MMC0_CD_PIN="PH1"
> > 
> > Added Adam, (who actually tested DM_MMC on A10)
> 
> I tested with "either" and "both", neither worked - see below. Along with
> CONFIG_DM_MMC, I've also enabled CONFIG_DM_DEBUG to see what's happening -
> here is the output:

Also broken on Gemei G9 A10 tablet with similar symptoms.

Anything else we could try?


Priit

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-03 Thread Zoltan HERPAI

Hi Jagan, Adam,

On Thu, 3 Jan 2019, Jagan Teki wrote:


On Thu, Jan 3, 2019 at 6:57 PM Zoltan HERPAI  wrote:


Hi all,

The DTS resync between 2018.09 and 2018.11 seems to have broken the MMC
support for the Linksprite pcDuino (A10) and pcDuino v3 (A20) boards.
The resync happened in b9d59d0 [1] and 3c92cca [2], after which u-boot
doesn't recognize the MMC controller and freezes the board (exactly the
same happens on the v3 board).

 CUT HERE 
U-Boot SPL 2018.11 (Dec 31 2018 - 14:36:52 +)
DRAM: 1024 MiB
CPU: 100800Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1


U-Boot 2018.11 (Dec 31 2018 - 14:36:52 +) Allwinner Technology

CPU:   Allwinner A10 (SUN4I)
Model: LinkSprite pcDuino
I2C:   ready
DRAM:  1 GiB
MMC:
 CUT HERE 

Reverting these commits solve the problem and the boards boot correctly.
Initially I thought this might be due to removing the
mmc0_cd_pin_reference_design (syncing that from the kernel into u-boot),
which was discussed here [3] and was considered as a move that might
break MMC on some boards, but re-adding that reference pin only in the
pcduino DTSes did not resolve the freeze.

Questions:
 - A similar board - where the reference pin is used for CD - is the
Cubieboard 2. Can someone test 2018.11 on it to see if it freezes as
well? Out of A20, I have a Bananapro, but that's using a non-reference
pin for CD, and boots fine.


A10, enable DM_MMC so it can effect DT. or enable CONFIG_MMC0_CD_PIN="PH1"

Added Adam, (who actually tested DM_MMC on A10)


I tested with "either" and "both", neither worked - see below. Along with 
CONFIG_DM_MMC, I've also enabled CONFIG_DM_DEBUG to see what's happening - 
here is the output:


[...]
MMC:   uclass_find_device_by_seq: 0 0
   - -1 -1 'mmc@1c0f000'
   - not found
uclass_find_device_by_seq: 1 0
   - -1 -1 'mmc@1c0f000'
   - not found
uclass_find_device_by_seq: 0 -1
uclass_find_device_by_seq: 0 0
   - -1 -1 'mmc@1c0f000'
   - not found
Entering sunxi_mmc_probe
ofnode_read_u32: bus-width: 0x4 (4)
sunxi_mmc: priv->reg: 1c0f000
sunxi_mmc: priv->mclkreg: 1c2
ofnode_read_bool: cd-inverted: false




A20, can boot as it is, it doesn't effect mmc node on DT, since DM_MMC
is not available.


 - There are some clock-related changes in this DTS resync, however I
have less than optimal experience with clocks. Can someone help check if
these changes might cause the issue?


OK, better dump the clock reg value at the end of sunxi_mmc_probe


For A20 it looks like this:


MMC:   Entering sunxi_mmc_probe
sunxi_mmc: priv->reg: 1c0f000
sunxi_mmc: priv->mclkreg: 1c2


EDIT: on the second run, I've added some debug around the reset call, 
and it seems to die there:


+printf("sunxi_mmc: before reset\n");
 /* Reset controller */
 writel(SUNXI_MMC_GCTRL_RESET, >reg->gctrl);
 udelay(1000);
+printf("sunxi_mmc: after reset\n");


MMC:   Entering sunxi_mmc_probe
sunxi_mmc: priv->reg: 1c0f000
sunxi_mmc: priv->mclkreg: 1c2
sunxi_mmc: before reset


Thanks,
Zoltan H


Re: [linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-03 Thread Jagan Teki
On Thu, Jan 3, 2019 at 6:57 PM Zoltan HERPAI  wrote:
>
> Hi all,
>
> The DTS resync between 2018.09 and 2018.11 seems to have broken the MMC
> support for the Linksprite pcDuino (A10) and pcDuino v3 (A20) boards.
> The resync happened in b9d59d0 [1] and 3c92cca [2], after which u-boot
> doesn't recognize the MMC controller and freezes the board (exactly the
> same happens on the v3 board).
>
>  CUT HERE 
> U-Boot SPL 2018.11 (Dec 31 2018 - 14:36:52 +)
> DRAM: 1024 MiB
> CPU: 100800Hz, AXI/AHB/APB: 3/2/2
> Trying to boot from MMC1
>
>
> U-Boot 2018.11 (Dec 31 2018 - 14:36:52 +) Allwinner Technology
>
> CPU:   Allwinner A10 (SUN4I)
> Model: LinkSprite pcDuino
> I2C:   ready
> DRAM:  1 GiB
> MMC:
>  CUT HERE 
>
> Reverting these commits solve the problem and the boards boot correctly.
> Initially I thought this might be due to removing the
> mmc0_cd_pin_reference_design (syncing that from the kernel into u-boot),
> which was discussed here [3] and was considered as a move that might
> break MMC on some boards, but re-adding that reference pin only in the
> pcduino DTSes did not resolve the freeze.
>
> Questions:
>  - A similar board - where the reference pin is used for CD - is the
> Cubieboard 2. Can someone test 2018.11 on it to see if it freezes as
> well? Out of A20, I have a Bananapro, but that's using a non-reference
> pin for CD, and boots fine.

A10, enable DM_MMC so it can effect DT. or enable CONFIG_MMC0_CD_PIN="PH1"

Added Adam, (who actually tested DM_MMC on A10)

A20, can boot as it is, it doesn't effect mmc node on DT, since DM_MMC
is not available.

>  - There are some clock-related changes in this DTS resync, however I
> have less than optimal experience with clocks. Can someone help check if
> these changes might cause the issue?

OK, better dump the clock reg value at the end of sunxi_mmc_probe

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] u-boot: MMC broken on Linksprite A10/A20 boards in 2018.11

2019-01-03 Thread Zoltan HERPAI

Hi all,

The DTS resync between 2018.09 and 2018.11 seems to have broken the MMC 
support for the Linksprite pcDuino (A10) and pcDuino v3 (A20) boards. 
The resync happened in b9d59d0 [1] and 3c92cca [2], after which u-boot 
doesn't recognize the MMC controller and freezes the board (exactly the 
same happens on the v3 board).


 CUT HERE 
U-Boot SPL 2018.11 (Dec 31 2018 - 14:36:52 +)
DRAM: 1024 MiB
CPU: 100800Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1


U-Boot 2018.11 (Dec 31 2018 - 14:36:52 +) Allwinner Technology

CPU:   Allwinner A10 (SUN4I)
Model: LinkSprite pcDuino
I2C:   ready
DRAM:  1 GiB
MMC:
 CUT HERE 

Reverting these commits solve the problem and the boards boot correctly. 
Initially I thought this might be due to removing the 
mmc0_cd_pin_reference_design (syncing that from the kernel into u-boot), 
which was discussed here [3] and was considered as a move that might 
break MMC on some boards, but re-adding that reference pin only in the 
pcduino DTSes did not resolve the freeze.


Questions:
- A similar board - where the reference pin is used for CD - is the 
Cubieboard 2. Can someone test 2018.11 on it to see if it freezes as 
well? Out of A20, I have a Bananapro, but that's using a non-reference 
pin for CD, and boots fine.
- There are some clock-related changes in this DTS resync, however I 
have less than optimal experience with clocks. Can someone help check if 
these changes might cause the issue?


Thanks,
Zoltan H


[1] 
http://git.denx.de/?p=u-boot.git;a=commit;h=b9d59d08a6c7362a9558dd5f67cdf85cc3a1b7c8
[2] 
http://git.denx.de/?p=u-boot.git;a=commit;h=3c92cca3cda0d72c11c41bc0b07edcff127cf194

[3] https://lkml.org/lkml/2017/4/19/631

--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.