Hi all!
I’m working on a project porting petalinux 2018.3 to the snickerdoodle black + pismasher configuration. I have had decent success getting most things to work, but I’ve noticed that the USB Hub has trouble enumerating and working on some boots of the petalinux flavor I’m using.
Just a note, I am running a Pre-emptive Real-Time patched 4.14 Kernel and this issue of the USB Hub is present in builds with and without it, I honestly thought maybe the RT patch would even help the issue.
I currently have Dual Ethernet, WiFi(Not in this build, but its been tested), and GPIO working fine, but USB seems to be random. I have been researching whether it’s an i2c bus problem or a usb hub reset problem. I have tried setting the USB Reset MIO pin to MIO 16 properly in the Zynq processing system in Vivado(this actually seems like it caused the hub initialization to initialize less, is this a GPIO conflict or something? Should I let the device-tree take care of it?) I also pulled the device tree from the Ubuntu builds for the initial time trying it, and it seemed to work great for a while. It was weird though, I have a few snickerdoodle black+ pismashers in inventory and have tested my petalinux build on 2 different devices and one of them initializes the USB Hub almost every boot(like 90%), whilst the other is probably closer to like 40%. It is also using the same MicroSD card in both black devices and yes they are both snickerdoodle blacks.
My gut tells me its the device-tree, but I’m using the same info I found from the Ubuntu and Pynq builds, so that brings me to i2c. Am I missing pinctrl or something in the device tree, I remember reading that somewhere. Also what is pinctrl for and where is it initialized? This circle just continues forever, so if anyone has some insight please let me know.
Below is my kernel log and device tree aka system_user.dtsi
system_user.dtsi:/include/ “system-conf.dtsi”
/ {chosen {
bootargs = "console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait ";
stdout-path = “serial0:115200n8”;
};aliases{
eth0 = &gem0;
eth1 = &gem1;
mmc1 = &sdhci1;
i2c1 = &i2c1;
};power_en_reg: fixed-regulator-powen {
compatible = “regulator-fixed”;
regulator-name = “power-en-regulator”;
gpio = <&gpio0 20 4>;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
startup-delay-us = <70000>;
regulator-always-on;
enable-active-high;
};usb_phy0: phy0 {
compatible = “usb-nop-xceiv”;
#phy-cells = <0>;
view-port = <0x170>;
drv-vbus;
};};
&i2c1 {
compatible = “cdns,i2c-r1p10”;
status = “okay”;
clocks = <0x1 0x27>;
interrupt-parent = <0x4>;
interrupts = <0x0 0x30 0x4>;
reg = <0xe0005000 0x1000>;
#address-cells = <0x1>;
#size-cells = <0x0>;
#clock-frequency = <0x186a0>;
clock-frequency = <100000>;
linux,phandle = <0x23>;usb2514b@2c {
compatible = “microchip,usb2514b”;
reg = <0x2c>;
reset-gpios = <&gpio0 16 1>;
};tlv320aic3x: tlv320aic3x@1b {
compatible = “ti,tlv320aic3x”;
reg = <0x1b>;
reset-gpios = <&gpio0 17 1>;
};
};&usb0 {
compatible = “xlnx,zynq-usb-2.20a”, “chipidea,usb2”;
status = “okay”;
clocks = <0x00000001 0x000000ba>;
interrupt-parent = <0x00000003>;
interrupts = <0x00000000 0x00000008 0x00000003>;
reg = <0xe0002000 0x000003c4>;
phy_type = “ulpi”;
dr_mode = “host”;
usb-phy = <&usb_phy0>;};
&gem0 {
compatible = “cdns,zynq-gem”, “cdns,gem”;
reg = <0xe000b000 0x1000>;
status = “okay”;
interrupts = <0x0 0x16 0x4>;
clocks = <0x1 0x1e 0x1 0x1e 0x1 0xd>;
clock-names = “pclk”, “hclk”, “tx_clk”;
#address-cells = <0x1>;
#size-cells = <0x0>;
phy-mode = “rgmii-id”;
reset-gpios = <&gpio0 19 1>;
linux,phandle = <0x2f>;
phandle = <0x2f>;ethernet-phy@0 {
reg = <0x0>;
device_type = “ethernet-phy”;
linux,phandle = <0x6>;
phandle = <0x6>;
};gmiitorgmii@8 {
compatible = “xlnx,gmii-to-rgmii-1.0”;
reg = <0x8>;
phy-handle = <0x6>;
linux,phandle = <0x30>;
phandle = <0x30>;
};
};&gem1 {
compatible = “cdns,zynq-gem”, “cdns,gem”;
reg = <0xe000c000 0x1000>;
status = “okay”;
interrupts = <0x0 0x2d 0x4>;
clocks = <0x1 0x1f 0x1 0x1f 0x1 0xe>;
clock-names = “pclk”, “hclk”, “tx_clk”;
#address-cells = <0x1>;
#size-cells = <0x0>;
phy-mode = “rgmii-id”;
reset-gpios = <&gpio0 17 1>;
linux,phandle = <0x31>;
phandle = <0x31>;ethernet-phy@1 {
reg = <0x0>;
device_type = “ethernet-phy”;
linux,phandle = <0x7>;
phandle = <0x7>;
};gmiitorgmii@9 {
compatible = “xlnx,gmii-to-rgmii-1.0”;
reg = <0x9>;
phy-handle = <0x7>;
linux,phandle = <0x32>;
phandle = <0x32>;
};
};Kernel on boot:
Zynq> boot
Device: mmc@e0100000
Manufacturer ID: 2
OEM: 544d
Name: SE04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
4056092 bytes read in 235 ms (16.5 MiB/s)
Device: mmc@e0100000
Manufacturer ID: 2
OEM: 544d
Name: SE04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading system.dtb
15899 bytes read in 14 ms (1.1 MiB/s)Loading kernel from FIT Image at 10000000 …
Using ‘conf@system-top.dtb’ configuration
Verifying Hash Integrity … OK
Trying ‘kernel@1’ kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x10000104
Data Size: 4038283 Bytes = 3.9 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: sha1
Hash value: 52b72f979ce1a67d3bec7682d82390f528c64be5
Verifying Hash Integrity … sha1+ OKFlattened Device Tree blob at 23fff000
Booting using the fdt blob at 0x23fff000
Uncompressing Kernel Image … OK
Loading Device Tree to 07ff9000, end 07fffe1a … OKStarting kernel …
Booting Linux on physical CPU 0x0
Linux version 4.14.0-rt1-xilinx-v2018.3 (oe-user@oe-host) (gcc version 7.3.0 (G1
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: xlnx,zynq-7000
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x3f000000
percpu: Embedded 17 pages/cpu @ef7cb000 s36960 r8192 d24480 u69632
Built 1 zonelists, mobility grouping on. Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rw r
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1012292K/1048576K available (6144K kernel code, 262K rwdata, 1612K roda)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0700000 (7136 kB)
.init : 0xc0900000 - 0xc0a00000 (1024 kB)
.data : 0xc0a00000 - 0xc0a41a80 ( 263 kB)
.bss : 0xc0a41a80 - 0xc0a739ec ( 200 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Preemptible hierarchical RCU implementation.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU priority boosting: priority 1 delay 500 ms.
No expedited grace period (rcu_normal_after_boot).
Tasks RCU enabled.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
efuse mapped to f0801000
slcr mapped to f0803000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at f0803100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce048b54s
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537s
timer #0 at f080b000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs …
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (1333.32 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 191s
futex hash table entries: 512 (order: 3, 32768 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
irq: type mismatch, failed to map hwirq-40 for /amba/interrupt-controller@f8f01!
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 26, base_baud = 3124968) is as
`��k˽���[ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new inter
driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
usb_phy_generic phy0: phy0 supply vcc not found, using dummy regulator
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
fpga-region fpga-full: FPGA Region probed
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 5, 229376 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 3, 32768 bytes)
UDP-Lite hash table entries: 512 (order: 3, 32768 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
workingset: timestamp_bits=30 max_order=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
gpio-mockup: probe of gpio-mockup failed with error -22
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Eve6
brd: module loaded
loop: module loaded
m25p80 spi0.0: found n25q128a11, expected n25q512a
m25p80 spi0.0: n25q128a11 (16384 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on “spi0.0”:
0x000000000000-0x000000500000 : “boot”
0x000000500000-0x000000520000 : “bootenv”
0x000000520000-0x000000fa0000 : “kernel”
0x000000fa0000-0x000001000000 : “spare”
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 29 (0)
Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E)
macb e000c000.ethernet: invalid hw address, using random
libphy: MACB_mii_bus: probed
macb e000c000.ethernet eth1: Cadence GEM rev 0x00020118 at 0xe000c000 irq 30 (5)
Marvell 88E1510 e000c000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
sky2: driver version 1.30
ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver usb_debug
usbserial: USB Serial support registered for debug
usbserial: USB Serial support registered for xhci_dbc
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver usb_serial_simple
usbserial: USB Serial support registered for carelink
usbserial: USB Serial support registered for zio
usbserial: USB Serial support registered for funsoft
usbserial: USB Serial support registered for flashloader
usbserial: USB Serial support registered for google
usbserial: USB Serial support registered for vivopay
usbserial: USB Serial support registered for moto_modem
usbserial: USB Serial support registered for novatel_gps
usbserial: USB Serial support registered for hp4x
usbserial: USB Serial support registered for suunto
usbserial: USB Serial support registered for siemens_mpi
of_clk_src_onecell_get: invalid clock index 186
chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regr
ci_hdrc ci_hdrc.0: missing IRQ
i2c /dev entries driver
cdns-i2c e0005000.i2c: 100 kHz mmio e0005000 irq 23
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f098e000 with timeout 10s
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
mmc1: SDHCI controller on e0101000.mmc [e0101000.mmc] using ADMA
usbcore: registered new interface driver usbhid
sdhci-arasan e0101000.mmc: card claims to support voltages below defined range
usbhid: USB HID core driver
mmc1: new high speed SDIO card at address 0001
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
mmc0: new high speed SDHC card at address cb6a
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
ALSA device list:
No soundcards found.
mmcblk0: mmc0:cb6a SE04G 3.64 GiB
mmcblk0: p1 p2
EXT4-fs (mmcblk0p2): couldn’t mount as ext3 due to feature incompatibilities
EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
INIT: version 2.88 booting
Starting udev
udevd[897]: starting version 3.2.2
udevd[898]: starting eudev-3.2.2
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt.
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
hwclock: can’t open ‘/dev/misc/rtc’: No such file or directory
Tue Dec 7 18:59:40 UTC 2021
hwclock: can’t open ‘/dev/misc/rtc’: No such file or directory
Starting internet superserver: inetd.
INIT: Entering runlevel: 5
Configuring network interfaces… IPv6: ADDRCONF(NETDEV_UP): eth0: link is not y
IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
done.
Starting system message bus: dbus.
Starting Xserver
Starting Dropbear SSH server:
dropbear.
Starting rpcbind daemon…done.X.Org X Server 1.19.3
Release Date: 2017-03-15
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.10.0-327.el7.x86_64 x86_64
Current Operating System: Linux petalinuxsnickerdoodlep 4.14.0-rt1-xilinx-vl
Kernel command line: console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rw r
Build Date: 03 December 2018 09:37:05PMCurrent version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: “/var/log/Xorg.0.log”, Time: Tue Dec 7 18:59:41 2021
(==) Using system config directory “/usr/share/X11/xorg.conf.d”
starting DNS forwarder and DHCP server: dnsmasq… (EE)
Fatal server error:
(EE) no screens found(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at “/var/log/Xorg.0.log” for additional inf.
(EE)
(EE) Server terminated with error (1). Closing log file.
done.
hwclock: can’t open ‘/dev/misc/rtc’: No such file or directory
Starting syslogd/klogd: done
Starting tcf-agent: OK