Pine64+ 2GB and RPI3 (A64 examples): Any general idea on what/when to expect for the return of USB support to head?

Henri Hennebert hlh at restart.be
Thu Aug 3 09:57:18 UTC 2017


On 08/02/2017 21:06, Emmanuel Vadot wrote:
> On Tue, 1 Aug 2017 14:03:23 -0700
> Mark Millard <markmi at dsl-only.net> wrote:
> 
>> [I historically use a ufs USB SSD for a (head) root file
>> system on a Pine64+ 2GB and a RPI3. Thus the question
>> below.]
>>
>> Context for question (note the "USB not working for now"
>> in the Log Message):
>>
>>> Revision 320612
>>>
>>> Author:
>>> manu
>>> Date:
>>> Mon Jul 3 19:30:03 2017 UTC (4 weeks, 1 day ago)
>>> Changed paths:
>>> 5
>>> Log Message:
>>> allwinner: Add A64 ccung support
>>>
>>> Upstream DTS for A64 SoC doesn't provide a /clocks node as Linux switched
>>> to ccu-ng
>>> This commit adds the necessary bits to boot on pine64 with latest DTS from
>>> upstream.
>>> USB is not working for now and some node aren't present in the DTS (like the
>>> PMU, Power Management Unit).
>>>
>>> Tested on: Pine64
>>>
>>> Changed paths
>>> Path
>>> Details
>>> head/sys/arm/allwinner/a10_mmc.c
>>> modified , text changed
>>> head/sys/arm/allwinner/clkng/aw_ccung.c
>>> modified , text changed
>>> head/sys/arm/allwinner/clkng/ccu_a64.c
>>> added
>>> head/sys/arm/allwinner/clkng/ccu_a64.h
>>> added
>>> head/sys/conf/files.arm64
>>> modified , text changed
>>
>> /head/sys/arm/allwinner/clkng/ccu_a64.c shows an
>> empty "USBPHY clk sel" section:
>>
>> 553	/* USBPHY clk sel */
>> 554	
>> 555	/* DRAM needs update bit */
>>
>> tending to confirm the log message.
> 
>   This is unrelated, this was a comment I've put during developement to
> remind me to add the gate bits for usb.
>   I'll remove it.
> 
>>
>> The questions:
>>
>> Does anyone have a general idea that they can report for
>> what/when to expect for the return of USB support for
>> Pine64+ 2GB, RPI3, and the like A64 based contexts?
> 
>   I'm the only one who could have an idea (for Pine64) and I don't know.

Today I build GENERIC-NODEBUG r321776. I install it on the mmcsd and reboot:

[root at norquay ~]# shutdown -r now
Shutdown NOW!
shutdown: [pid 13227]
[root at norquay ~]# 

*** FINAL System shutdown message from root at norquay.restart.bel *** 


System going down IMMEDIATELY 


 

--- clip ---

Waiting (max 60 seconds) for system process `vnlru' to stop... done
Waiting (max 60 seconds) for system process `bufdaemon' to stop... done
Waiting (max 60 seconds) for system process `syncer' to stop...
Syncing disks, vnodes remaining... 0 0 0 0 0 0 done
All buffers synced.
Uptime: 20h44m6s
GEOM_MIRROR: Device swap: provider destroyed.
GEOM_MIRROR: Device swap destroyed.
HELLO! BOOT0 is starting!
boot0 commit : 045061a8bb2580cb3fa02e301f52a015040c158f

boot0 version : 4.0.0
set pll start
set pll end
rtc[0] value = 0x00000000
rtc[1] value = 0x00000000
rtc[2] value = 0x00000000
rtc[3] value = 0x00000000
rtc[4] value = 0x00000000
rtc[5] value = 0x00000000
DRAM driver version: V1.1
rsb_send_initseq: rsb clk 400Khz -> 3Mhz
PMU: AXP81X
ddr voltage = 1500 mv
DRAM Type = 3 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
DRAM clk = 672 MHz
DRAM zq value: 003b3bbb
DRAM single rank full DQ OK
DRAM size = 2048 MB
DRAM init ok
dram size =2048
card boot number = 0, boot0 copy = 0
card no is 0
sdcard 0 line count 4
[mmc]: mmc driver ver 2015-05-08 20:06
[mmc]: sdc0 spd mode error, 2
[mmc]: Wrong media type 0x00000000
[mmc]: ***Try SD card 0***
[mmc]: HSSDR52/SDR25 4 bit
[mmc]: 50000000 Hz
[mmc]: 15193 MB
[mmc]: ***SD/MMC 0 init OK!!!***
sdcard 0 init ok
The size of uboot is 0007a000.
sum=27054d7f
src_sum=27054d7f
Succeed in loading uboot from sdmmc flash.
boot0: start load other image
boot0: Loading BL3-1
Loading file 0 at address 0x40000000,size 0x0005ec00 success
boot0: Loading scp
Loading file 2 at address 0x00040000,size 0x00019a00 success
set arisc reset to de-assert state
Ready to disable icache.
Jump to secend Boot.
INFO:    Configuring SPC Controller
NOTICE:  BL3-1: v1.0(debug):
NOTICE:  BL3-1: Built : 20:53:17, Jan 12 2017
NOTICE:  BL3-1 commit: 8
INFO:    BL3-1: Initializing runtime services
INFO:    BL3-1: arisc probe
[SCP] :sunxi-arisc driver begin startup 2
[SCP] :arisc_para size:1a8
[SCP] :arisc version: [v0.1.76]
[SCP] :sunxi-arisc driver v1.10 is starting

 >> FreeBSD EFI boot block
    Loader path: /boot/loader.efi

    Initializing modules: ZFS UFS
    Probing 3 block devices.....* done
     ZFS found no pools
     UFS found 1 partition
Consoles: EFI console
Command line arguments: loader.efi
Image base: 0xb8dc5000
EFI version: 2.05
EFI Firmware: Das U-boot (rev 0.00)

FreeBSD/arm64 EFI loader, Revision 1.1
(Tue Jul 25 03:58:20 CEST 2017 root at norquay.restart.bel)
EFI boot environment
Loading /boot/defaults/loader.conf
/boot/kernel/kernel text=0x7c33a0 data=0xa2980+0x39d0de 
syms=[0x8+0x106a88+0x8+0xfb330]
/boot/entropy size=0x1000
/boot/kernel/zfs.ko text=0x7a418 text=0xdc3b0 data=0x11528+0x9e970 
syms=[0x8+0x1ddd8+0x8+0x18d38]
/boot/kernel/opensolaris.ko text=0x1358 text=0xd90 data=0x10160+0x125d0 
syms=[0x8+0x1020+0x8+0x8ca]

Hit [Enter] to boot immediately, or any other key for command prompt.


Type '?' for a list of commands, 'help' for more detailed help.
OK unload
OK load /boot/kernel/kernel
/boot/kernel/kernel text=0x7c33a0 data=0xa2980+0x39d0de 
syms=[0x8+0x106a88+0x8+0xfb330]
OK boot -s
Booting...
Using DTB provided by EFI at 0x49000000.
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2017 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-CURRENT #0 r321776M: Thu Aug  3 10:40:36 CEST 2017
     root at norquay.restart.bel:/usr/obj/usr/src/sys/GENERIC-NODEBUG arm64
FreeBSD clang version 5.0.0 (trunk 308421) (based on LLVM 5.0.0svn)
VT: init without driver.
Starting CPU 1 (1)
Starting CPU 2 (2)
Starting CPU 3 (3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
arc4random: no preloaded entropy cache
random: entropy device external interface
kbd0 at kbdmux0
ofwbus0: <Open Firmware Device Tree>
aw_ccu0: <Allwinner Clock Control Unit> on ofwbus0
clk_fixed0: <Fixed clock> on aw_ccu0
clk_fixed1: <Fixed clock> on aw_ccu0
aw_pll0: <Allwinner PLL Clock> mem 0x1c20000-0x1c20003 on aw_ccu0
aw_pll1: <Allwinner PLL Clock> mem 0x1c20028-0x1c2002b on aw_ccu0
clk_fixed2: <Fixed factor clock> on aw_ccu0
aw_pll2: <Allwinner PLL Clock> mem 0x1c2002c-0x1c2002f on aw_ccu0
aw_cpuclk0: <Allwinner CPU Clock> mem 0x1c20050-0x1c20053 on aw_ccu0
aw_axiclk0: <Allwinner AXI Clock> mem 0x1c20050-0x1c20053 on aw_ccu0
aw_ahbclk0: <Allwinner AHB Clock> mem 0x1c20054-0x1c20057 on aw_ccu0
aw_ahbclk1: <Allwinner AHB Clock> mem 0x1c2005c-0x1c2005f on aw_ccu0
aw_apbclk0: <Allwinner APB Clock> mem 0x1c20054-0x1c20057 on aw_ccu0
aw_apbclk1: <Allwinner APB Clock> mem 0x1c20058-0x1c2005b on aw_ccu0
aw_gate0: <Allwinner Multi Bus Clock Gates> mem 0x1c20060-0x1c20073 on 
aw_ccu0
aw_modclk0: <Allwinner Module Clock> mem 0x1c20088-0x1c2008b on aw_ccu0
aw_modclk1: <Allwinner Module Clock> mem 0x1c2008c-0x1c2008f on aw_ccu0
aw_modclk2: <Allwinner Module Clock> mem 0x1c20090-0x1c20093 on aw_ccu0
aw_pll3: <Allwinner PLL Clock> mem 0x1c20044-0x1c20047 on aw_ccu0
aw_usbclk0: <Allwinner USB Clocks> mem 0x1c200cc-0x1c200cf on aw_ccu0
aw_thsclk0: <Allwinner THS Clock> mem 0x1c20074-0x1c20077 on aw_ccu0
simplebus0: <Flattened device tree simple bus> on ofwbus0
aw_reset0: <Allwinner Module Resets> mem 0x1c202c0-0x1c202cb on simplebus0
aw_reset1: <Allwinner Module Resets> mem 0x1c202d0-0x1c202d3 on simplebus0
aw_reset2: <Allwinner Module Resets> mem 0x1c202d8-0x1c202db on simplebus0
iichb0: <Allwinner Integrated I2C Bus Controller> mem 
0x1c2b000-0x1c2b3ff irq 19 on simplebus0
iicbus0: <OFW I2C bus> on iichb0
regfix0: <Fixed Regulator> on simplebus0
psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0
aw_sid0: <Allwinner Secure ID Controller> mem 0x1c14000-0x1c143ff on 
simplebus0
iichb1: <Allwinner RSB> mem 0x1f03400-0x1f037ff irq 24 on simplebus0
iicbus1: <OFW I2C bus> on iichb1
awusbphy0: <Allwinner USB PHY> mem 
0x1c19400-0x1c19423,0x1c1a800-0x1c1a803,0x1c1b800-0x1c1b803 on simplebus0
gic0: <ARM Generic Interrupt Controller> mem 
0x1c81000-0x1c81fff,0x1c82000-0x1c83fff,0x1c84000-0x1c85fff,0x1c86000-0x1c87fff 
irq 0 0
gic0: pn 0x2, arch 0x2, rev 0x1, implementer 0x43b irqs 224
gpio0: <Allwinner GPIO/Pinmux controller> mem 0x1c20800-0x1c20bff irq 
8,9,10 on simplebus0
gpiobus0: <OFW GPIO bus> on gpio0
aw_nmi0: <Allwinner NMI Controller> mem 0x1f00c0c-0x1f00c43 irq 23 on 
simplebus0
axp81x_pmu0: <X-Powers AXP81x Power Management Unit> at addr 0x746 irq 
30 on iicbus1
gpiobus1: <OFW GPIO bus> on axp81x_pmu0
generic_timer0: <ARMv8 Generic Timer> irq 1,2,3,4 on ofwbus0
Timecounter "ARM MPCore Timecounter" frequency 24000000 Hz quality 1000
Event timer "ARM MPCore Eventtimer" frequency 24000000 Hz quality 1000
rtc0: <Allwinner RTC> mem 0x1f00000-0x1f00053 irq 16,17 on simplebus0
rtc0: registered as a time-of-day clock, resolution 1.000000s
cpulist0: <Open Firmware CPU Group> on ofwbus0
cpu0: <Open Firmware CPU> on cpulist0
cpufreq_dt0: <Generic cpufreq driver> on cpu0
cpu1: <Open Firmware CPU> on cpulist0
cpu2: <Open Firmware CPU> on cpulist0
cpu3: <Open Firmware CPU> on cpulist0
a10_mmc0: <Allwinner Integrated MMC/SD controller> mem 
0x1c0f000-0x1c0ffff irq 5 on simplebus0
mmc0: <MMC/SD bus> on a10_mmc0
gpioc0: <GPIO controller> on gpio0
uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 11 on simplebus0
uart0: console (115384,n,8,1)
iic0: <I2C generic I/O> on iicbus0
awg0: <Allwinner Gigabit Ethernet> mem 
0x1c30000-0x1c300ff,0x1c00030-0x1c00033 irq 21 on simplebus0
miibus0: <MII bus> on awg0
rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 0 on miibus0
rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 
100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, w
rgephy1: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
rgephy1:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 
100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, w
awg0: Ethernet address: 02:ba:4c:17:07:8b
aw_wdog0: <Allwinner A31 Watchdog> mem 0x1c20ca0-0x1c20cbf irq 22 on 
simplebus0
gpioc1: <GPIO controller> on axp81x_pmu0
iic1: <I2C generic I/O> on iicbus1
aw_thermal0: <Allwinner Thermal Sensor Controller> mem 
0x1c25000-0x1c253ff irq 25 on simplebus0
ohci0: <Generic OHCI Controller> mem 0x1c1a400-0x1c1a4ff irq 26 on 
simplebus0
usbus0 on ohci0
ehci0: <Allwinner Integrated USB 2.0 controller> mem 0x1c1a000-0x1c1a0ff 
irq 27 on simplebus0
usbus1: EHCI version 1.0
usbus1 on ehci0
ohci1: <Generic OHCI Controller> mem 0x1c1b400-0x1c1b4ff irq 28 on 
simplebus0
usbus2 on ohci1
ehci1: <Allwinner Integrated USB 2.0 controller> mem 0x1c1b000-0x1c1b0ff 
irq 29 on simplebus0
usbus3: EHCI version 1.0
usbus3 on ehci1
cryptosoft0: <software crypto>
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 480Mbps High Speed USB v2.0
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 480Mbps High Speed USB v2.0
ugen0.1: <Generic OHCI root HUB> at usbus0
uhub0: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Allwinner EHCI root HUB> at usbus1
uhub1: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
ugen2.1: <Generic OHCI root HUB> at usbus2
uhub2: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <Allwinner EHCI root HUB> at usbus3
uhub3: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus3
mmcsd0: 16GB <SDHC SL16G 8.0 SN A9A41D45 MFG 03/2017 by 3 SD> at mmc0 
50.0MHz/4bit/65535-block
Release APs
CPU  0: ARM Cortex-A53 r0p4 affinity:  0
  Instruction Set Attributes 0 = <AES+PMULL,SHA1,SHA2,CRC32>
  Instruction Set Attributes 1 = <0>
          Processor Features 0 = <AdvSIMD,Float,EL3 32,EL2 32,EL1 32,EL0 32>
          Processor Features 1 = <0>
       Memory Model Features 0 = <4k Granule,64k 
Granule,MixedEndian,S/NS Mem,16bit ASID,1TB PA>
       Memory Model Features 1 = <>
              Debug Features 0 = <2 CTX Breakpoints,4 Watchpoints,6 
Breakpoints,PMUv3,Debug v8>
              Debug Features 1 = <0>
          Auxiliary Features 0 = <0>
          Auxiliary Features 1 = <0>
CPU  1: ARM Cortex-A53 r0p4 affinity:  1
CPU  2: ARM Cortex-A53 r0p4 affinity:  2
CPU  3: ARM Cortex-A53 r0p4 affinity:  3
arc4random: no preloaded entropy cache
Trying to mount root from zfs:rpool/ROOT/default [rw,noatime]...
Mounting from zfs:rpool/ROOT/default failed with error 2: unknown file 
system.
uhub0: 1 port with 1 removable, self powered
uhub2: 1 port with 1 removable, self powered
Root mount waiting for: usbus3 usbus1
uhub1: 1 port with 1 removable, self powered
uhub3: 1 port with 1 removable, self powered
ugen3.2: <VIA Labs, Inc. USB2.0 Hub> at usbus3
uhub4 on uhub3
uhub4: <VIA Labs, Inc. USB2.0 Hub, class 9/0, rev 2.10/b.e0, addr 2> on 
usbus3
Root mount waiting for: usbus3
uhub4: 4 ports with 4 removable, self powered
Root mount waiting for: usbus3
Root mount waiting for: usbus3
ugen3.3: <Western Digital Elements 25A2> at usbus3
umass0 on uhub4
umass0: <Western Digital Elements 25A2, class 0/0, rev 2.10/10.14, addr 
3> on usbus3
umass0:  SCSI over Bulk-Only; quirks = 0x8100
umass0:0:0: Attached to scbus0
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <WD Elements 25A2 1014> Fixed Direct Access SPC-4 SCSI device
da0: Serial Number 57583831453636343533344D
da0: 40.000MB/s transfers
da0: 476908MB (976707584 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
ugen3.4: <Western Digital Elements 25A2> at usbus3
umass1 on uhub4
umass1: <Western Digital Elements 25A2, class 0/0, rev 2.10/10.14, addr 
4> on usbus3
umass1:  SCSI over Bulk-Only; quirks = 0x8100
umass1:1:1: Attached to scbus1
da1 at umass-sim1 bus 1 scbus1 target 0 lun 0
da1: <WD Elements 25A2 1014> Fixed Direct Access SPC-4 SCSI device
da1: Serial Number 575857314141364346534839
da1: 40.000MB/s transfers
da1: 476908MB (976707584 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE> 

(da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 3a 37 5f ff 00 00 01 00 

(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error 

(da0:umass-sim0:0:0:0): Retrying command 

 

Loader variables: 

   vfs.root.mountfrom=zfs:rpool/ROOT/default 

   vfs.root.mountfrom.options=rw,noatime 

 

Manual root filesystem specification: 

   <fstype>:<device> [options] 

       Mount <device> using filesystem <fstype> 

       and with the specified (optional) option list. 

 

     eg. ufs:/dev/da0s1a 

         zfs:tank 

         cd9660:/dev/cd0 ro 

           (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) 

 

   ?               List valid disk boot devices
   .               Yield 1 second (for background tasks)
   <empty line>    Abort manual input

mountroot> ufs:/dev/mmcsd0s2
Trying to mount root from ufs:/dev/mmcsd0s2 []...
random: unblocking device.
arc4random: no preloaded entropy cache
arc4random: no preloaded entropy cache
Enter full pathname of shell or RETURN for /bin/sh:
#

So USB is working but the 'CCB request completed with an error' prevent 
the access to zfs.

Henri

PS

- this error crop up from time to time even with r320599.

- I switch off and on the PINE64+ and GENERIC-NODEBUG encounter the
   APs not started error multiple times.

> 
>> Should I just ignore updating the Pine64+ 2GB and RPI3 for
>> a few months more? (Because I do self-hosted builds on them
>> I want the USB file system to be used for such activity.)
> 
>   You can do whatever you want, either ignore or help.
> 


More information about the freebsd-arm mailing list