Re: [linux-sunxi] Latest kernel does not find SD card

2017-11-24 Thread Chris Obbard
Hi,


>
> > Mmh, I guess it's related to:
> > commit 1396007286b1e2fd5dd10ae6a5ccaaaed51ab762
> > Author: Maxime Ripard 
> > Date:   Mon Oct 9 22:53:39 2017 +0200
> >
> > pinctrl: sunxi: Enforce the strict mode by default
> >
> > This is probably due to the fact that we reference PF6 twice:
> >
> > arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts:
> >>  {
> >> pinctrl-names = "default";
> >> pinctrl-0 = <_pins_a>, <_cd_pin>;
> >
> > Once here:^^
> >
>
> Drop this one.
>
> >> vmmc-supply = <_vcc3v3>;
> >> bus-width = <4>;
> >> cd-gpios = < 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
> >
> > And then again here:  
> >
>
> And keep this one.
>
> ChenYu
>
>
Awesome, removing that line and recompiling sorted it.

-- 
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] Latest kernel does not find SD card

2017-11-24 Thread Chen-Yu Tsai
On Fri, Nov 24, 2017 at 8:24 PM, Andre Przywara  wrote:
> Hi,
>
> adding Maxime.
>
> On 24/11/17 12:15, Chris Obbard wrote:
>> Hi andre,
>>
>> I used the orange pi pc2 dt  from mainline. Which hasn’t changed a while...
>>
>> I’ll try to find the commit I used that found the sd  card from last
>> week when I’m home
>
> Mmh, I guess it's related to:
> commit 1396007286b1e2fd5dd10ae6a5ccaaaed51ab762
> Author: Maxime Ripard 
> Date:   Mon Oct 9 22:53:39 2017 +0200
>
> pinctrl: sunxi: Enforce the strict mode by default
>
> This is probably due to the fact that we reference PF6 twice:
>
> arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts:
>>  {
>> pinctrl-names = "default";
>> pinctrl-0 = <_pins_a>, <_cd_pin>;
>
> Once here:^^
>

Drop this one.

>> vmmc-supply = <_vcc3v3>;
>> bus-width = <4>;
>> cd-gpios = < 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
>
> And then again here:  
>

And keep this one.

ChenYu

>> status = "okay";
>> };
>
> Maxime, can you say which one should stay?
>
> Cheers,
> Andre.
>
>> On Fri, 24 Nov 2017 at 12:13, Andre Przywara > > wrote:
>>
>> Hi,
>>
>> On 24/11/17 11:58, Chris Obbard wrote:
>> > [2.982523] sun50i-h5-pinctrl 1c20800.pinctrl: pin PF6 already
>> > requested by 1c0f000.mmc; cannot claim for 1c20800.pinctrl:166
>> > [2.993845] sun50i-h5-pinctrl 1c20800.pinctrl: pin-166
>> > (1c20800.pinctrl:166) status -22
>> > [3.002001] sunxi-mmc: probe of 1c0f000.mmc failed with error -22
>>
>> Did you change anything in the DT?
>> Which DT do you actually use? Can you dump it here as well?
>>
>> I will try it later tonight at home.
>>
>> Cheers,
>> Andre.
>>

-- 
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] Latest kernel does not find SD card

2017-11-24 Thread Andre Przywara
Hi,

adding Maxime.

On 24/11/17 12:15, Chris Obbard wrote:
> Hi andre,
> 
> I used the orange pi pc2 dt  from mainline. Which hasn’t changed a while...
> 
> I’ll try to find the commit I used that found the sd  card from last
> week when I’m home

Mmh, I guess it's related to:
commit 1396007286b1e2fd5dd10ae6a5ccaaaed51ab762
Author: Maxime Ripard 
Date:   Mon Oct 9 22:53:39 2017 +0200

pinctrl: sunxi: Enforce the strict mode by default

This is probably due to the fact that we reference PF6 twice:

arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts:
>  {
> pinctrl-names = "default";
> pinctrl-0 = <_pins_a>, <_cd_pin>;

Once here:^^

> vmmc-supply = <_vcc3v3>;
> bus-width = <4>;
> cd-gpios = < 5 6 GPIO_ACTIVE_LOW>; /* PF6 */

And then again here:  

> status = "okay";
> };

Maxime, can you say which one should stay?

Cheers,
Andre.

> On Fri, 24 Nov 2017 at 12:13, Andre Przywara  > wrote:
> 
> Hi,
> 
> On 24/11/17 11:58, Chris Obbard wrote:
> > [    2.982523] sun50i-h5-pinctrl 1c20800.pinctrl: pin PF6 already
> > requested by 1c0f000.mmc; cannot claim for 1c20800.pinctrl:166
> > [    2.993845] sun50i-h5-pinctrl 1c20800.pinctrl: pin-166
> > (1c20800.pinctrl:166) status -22
> > [    3.002001] sunxi-mmc: probe of 1c0f000.mmc failed with error -22
> 
> Did you change anything in the DT?
> Which DT do you actually use? Can you dump it here as well?
> 
> I will try it later tonight at home.
> 
> Cheers,
> Andre.
> 

-- 
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] Latest kernel does not find SD card

2017-11-24 Thread Chris Obbard
Hi andre,

I used the orange pi pc2 dt  from mainline. Which hasn’t changed a while...

I’ll try to find the commit I used that found the sd  card from last week
when I’m home

Cheers!

On Fri, 24 Nov 2017 at 12:13, Andre Przywara  wrote:

> Hi,
>
> On 24/11/17 11:58, Chris Obbard wrote:
> > [2.982523] sun50i-h5-pinctrl 1c20800.pinctrl: pin PF6 already
> > requested by 1c0f000.mmc; cannot claim for 1c20800.pinctrl:166
> > [2.993845] sun50i-h5-pinctrl 1c20800.pinctrl: pin-166
> > (1c20800.pinctrl:166) status -22
> > [3.002001] sunxi-mmc: probe of 1c0f000.mmc failed with error -22
>
> Did you change anything in the DT?
> Which DT do you actually use? Can you dump it here as well?
>
> I will try it later tonight at home.
>
> Cheers,
> Andre.
>

-- 
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] Latest kernel does not find SD card

2017-11-24 Thread Andre Przywara
Hi,

On 24/11/17 11:58, Chris Obbard wrote:
> [    2.982523] sun50i-h5-pinctrl 1c20800.pinctrl: pin PF6 already
> requested by 1c0f000.mmc; cannot claim for 1c20800.pinctrl:166
> [    2.993845] sun50i-h5-pinctrl 1c20800.pinctrl: pin-166
> (1c20800.pinctrl:166) status -22
> [    3.002001] sunxi-mmc: probe of 1c0f000.mmc failed with error -22

Did you change anything in the DT?
Which DT do you actually use? Can you dump it here as well?

I will try it later tonight at home.

Cheers,
Andre.

-- 
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] Latest kernel does not find SD card

2017-11-24 Thread Chris Obbard
Hi Andre,

Here's the whole log. I am wondering if changing the cpufreq from u-boot
has messed it up?

U-Boot SPL 2017.09-dirty (Nov 23 2017 - 20:48:36)
> DRAM: 1024 MiB
> Trying to boot from MMC1
> NOTICE:  BL3-1: Running on H5 (1718) in SRAM A2 (@0x44000)
> NOTICE:  Configuring SPC Controller
> NOTICE:  BL3-1: v1.0(debug):91f2402
> NOTICE:  BL3-1: Built : 20:35:30, Nov 23 2017
> NOTICE:  SCPI: dummy stub handler, implementation level: 00
> INFO:BL3-1: Initializing runtime services
> INFO:BL3-1: Preparing for EL3 exit to normal world
> INFO:BL3-1: Next image address: 0x4a00, SPSR: 0x3c9
>
> U-Boot 2017.09-dirty (Nov 23 2017 - 20:48:36 +) Allwinner Technology
> CPU:   Allwinner H5 (SUN50I)
> Model: OrangePi PC 2
> DRAM:  1 GiB
> MMC:   SUNXI SD/MMC: 0
> *** Warning - bad CRC, using default environment
> In:serial
> Out:   serial
> Err:   serial
> Net:   phy interface7
> eth0: ethernet@1c3
> starting USB...
> USB0:   USB EHCI 1.00
> USB1:   USB OHCI 1.0
> scanning bus 0 for devices... 1 USB Device(s) found
>scanning usb for storage devices... 0 Storage Device(s) found
> Hit any key to stop autoboot:  0
> switch to partitions #0, OK
> mmc0 is current device
> Scanning mmc 0:1...
> Found U-Boot script /boot.scr
> 623 bytes read in 61 ms (9.8 KiB/s)
> ## Executing script at 4fc0
> This is your bootloader speaking.
> ---
> All your sunxi are belong to us.
> ---
> booting...
> 24017408 bytes read in 101840 ms (229.5 KiB/s)
> 14643 bytes read in 95 ms (150.4 KiB/s)
> ## Flattened Device Tree blob at 4fa0
>Booting using the fdt blob at 0x4fa0
>Loading Device Tree to 49ff9000, end 49fff932 ... OK
> Starting kernel ...
> [0.00] Booting Linux on physical CPU 0x00 [0x410fd034]
> [0.00] Linux version 4.14.0-g5a787756b (chris@sunxi-build) (gcc
> version 7.2.0 (Debian 7.2.0-11)) #1 SMP PREEMPT Thu Nov 23 20:25:27 GMT 2017
> [0.00] Machine model: Xunlong Orange Pi PC 2
> [0.00] efi: Getting EFI parameters from FDT:
> [0.00] efi: UEFI not found.
> [0.00] cma: Reserved 16 MiB at 0x7f00
> [0.00] NUMA: No NUMA configuration found
> [0.00] NUMA: Faking a node at [mem
> 0x-0x7fff]
> [0.00] NUMA: NODE_DATA [mem 0x7efe2080-0x7efe3b7f]
> [0.00] Zone ranges:
> [0.00]   DMA  [mem 0x4000-0x7fff]
> [0.00]   Normal   empty
> [0.00] Movable zone start for each node
> [0.00] Early memory node ranges
> [0.00]   node   0: [mem 0x4000-0x7fff]
> [0.00] Initmem setup node 0 [mem
> 0x4000-0x7fff]
> [0.00] psci: probing for conduit method from DT.
> [0.00] psci: PSCIv0.2 detected in firmware.
> [0.00] psci: Using standard PSCI v0.2 function IDs
> [0.00] psci: Trusted OS migration not required
> [0.00] random: fast init done
> [0.00] percpu: Embedded 21 pages/cpu @80003ef87000 s55960 r0
> d30056 u86016
> [0.00] Detected VIPT I-cache on CPU0
> [0.00] CPU features: enabling workaround for ARM erratum 845719
> [0.00] Built 1 zonelists, mobility grouping on.  Total pages:
> 258048
> [0.00] Policy zone: DMA
> [0.00] Kernel command line: console=ttyS0,115200 noinitrd
> root=/dev/mmcblk0p1 rootfstype=ext4 rw rootdelay=5
> [0.00] Memory: 991348K/1048576K available (15100K kernel code,
> 1566K rwdata, 5528K rodata, 1216K init, 484K bss, 40844K reserved, 16384K
> cma-reserved)
> [0.00] Virtual kernel memory layout:
> [0.00] modules : 0x - 0x0800   (
>  128 MB)
> [0.00] vmalloc : 0x0800 - 0x7dffbfff
>  (129022 GB)
> [0.00]   .text : 0x0808 - 0x08f4   (
> 15104 KB)
> [0.00] .rodata : 0x08f4 - 0x094b   (
> 5568 KB)
> [0.00]   .init : 0x094b - 0x095e   (
> 1216 KB)
> [0.00]   .data : 0x095e - 0x09767a00   (
> 1567 KB)
> [0.00].bss : 0x09767a00 - 0x097e0d80   (
>  485 KB)
> [0.00] fixed   : 0x7dfffe7fb000 - 0x7dfffec0   (
> 4116 KB)
> [0.00] PCI I/O : 0x7dfffee0 - 0x7de0   (
>   16 MB)
> [0.00] vmemmap : 0x7e00 - 0x8000   (
> 2048 GB maximum)
> [0.00]   0x7e00 - 0x7e000100   (
>   16 MB actual)
> [0.00] memory  : 0x8000 - 0x80004000   (
> 1024 MB)
> [0.00] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
> [0.00] Preemptible hierarchical RCU implementation.
> [0.00]  RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
> [0.00]  Tasks RCU enabled.
> [0.00] 

Re: [linux-sunxi] Latest kernel does not find SD card

2017-11-24 Thread Andre Przywara
Hi Chris,

On 23/11/17 20:56, Chris Obbard wrote:
> hi guys,
> 
> had a bit of time to debug this tonight. here's my environment:
> 
> u-boot v2017.09 with lower-default-cpufreq-H5.path applied.
> 
> linux mainline, modules built-in, no ramdisk
> 
> it's like it doesn't find the SD card, for whatever reason. 

Can you please dump the whole kernel log? It would be good to see what
the MMC driver has to say and whether there are other issues (pinctrl?
clocks?)

Cheers,
Andre.

-- 
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] Latest kernel does not find SD card

2017-11-23 Thread Chris Obbard
hi guys,

had a bit of time to debug this tonight. here's my environment:

u-boot v2017.09 with lower-default-cpufreq-H5.path applied.

linux mainline, modules built-in, no ramdisk

it's like it doesn't find the SD card, for whatever reason.




[8.928343] VFS: Cannot open root device "mmcblk0p1" or
> unknown-block(0,0): error -6
> [8.936096] Please append a correct "root=" boot option; here are the
> available partitions:
> [8.944461] Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(0,0)
> [8.952717] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.14.0-g5a787756b
> #1
> [8.959579] Hardware name: Xunlong Orange Pi PC 2 (DT)
> [8.964707] Call trace:
> [8.967161]  dump_backtrace+0x0/0x190
> [8.970820]  show_stack+0x14/0x20
> [8.974134]  dump_stack+0x9c/0xbc
> [8.977448]  panic+0x11c/0x290
> [8.980501]  mount_block_root+0x190/0x264
> [8.984505]  mount_root+0x11c/0x134
> [8.987989]  prepare_namespace+0x12c/0x174
> [8.992080]  kernel_init_freeable+0x200/0x224
> [8.996433]  kernel_init+0x10/0x100
> [8.19]  ret_from_fork+0x10/0x18
> [9.003493] SMP: stopping secondary CPUs
> [9.007411] Kernel Offset: disabled
> [9.010896] CPU features: 0x002004
> [9.014290] Memory Limit: none
> [9.017346] ---[ end Kernel panic - not syncing: VFS: Unable to mount
> root fs on unknown-block(0,0)





On 21 November 2017 at 08:44, Chris Obbard  wrote:

> It is most likely the switch of the mmc regulators from a fixed one
>> to the AXP regulators.
>>
>> Please ensure you have the AXP mfd and regulator drivers built-in.
>> AFAIK the RSB variant of the AXP mfd driver does not support auto
>> loading of the module.
>
>
> I should have been more specific, I am using the Orange Pi PC2 which has
> a SY8106A regulator.  This is set to 1.1V by default without any comms from
> kernel.
>
> I am unsure as to why a regulator driver change would cause my SD card to
> not be found by the Kernel? On the Orange Pi PC2 the SD card is permanently
> wired to 3v3.
>
>
> Chris
>

-- 
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] Latest kernel does not find SD card

2017-11-21 Thread Chris Obbard
>
> It is most likely the switch of the mmc regulators from a fixed one
> to the AXP regulators.
>
> Please ensure you have the AXP mfd and regulator drivers built-in.
> AFAIK the RSB variant of the AXP mfd driver does not support auto
> loading of the module.


I should have been more specific, I am using the Orange Pi PC2 which has
a SY8106A regulator.  This is set to 1.1V by default without any comms from
kernel.

I am unsure as to why a regulator driver change would cause my SD card to
not be found by the Kernel? On the Orange Pi PC2 the SD card is permanently
wired to 3v3.


Chris

-- 
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] Latest kernel does not find SD card

2017-11-20 Thread Chen-Yu Tsai
On Mon, Nov 20, 2017 at 9:17 PM, Chris Obbard  wrote:
> A change between Friday and Sunday evening to sunxi-next Kernel has caused
> my H5-based Orange Pi PC2 to not find the SD card.   Is this a known
> problem?

It is most likely the switch of the mmc regulators from a fixed one
to the AXP regulators.

Please ensure you have the AXP mfd and regulator drivers built-in.
AFAIK the RSB variant of the AXP mfd driver does not support auto
loading of the module.

ChenYu

>
>
>
> Sorry for the lack of information; I am not at that terminal.
>
> --
> 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.


[linux-sunxi] Latest kernel does not find SD card

2017-11-20 Thread Chris Obbard
A change between Friday and Sunday evening to sunxi-next Kernel has caused 
my H5-based Orange Pi PC2 to not find the SD card.   Is this a known 
problem?



Sorry for the lack of information; I am not at that terminal.

-- 
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.