1

I use linux-socfpga from Altera's github repository (the master branch which is recently updated) with my DE2-115 FPGA. The output from jtag configuration is:

$ jtagconfig1) USB-Blaster [2-2]
  020F70DD   EP3C120/EP4CE115

I wonder if it can find a USB memory that I attached? When I run lsusb nothing appears. Maybe it is the FPGA design that is wrong?

# Linux version 4.11.0-rc7-00113-g94836ec (developer@1604) (gcc version 6.2.0 (Sourcery CodeBench Lite 2016.11-32) ) #24 Sun Apr 23 05:44:19 CEST 207
bootconsole [early0] enabled
early_console initialized at 0xe8001400
ERROR: Nios II DIV different for kernel and DTS
Warning: icache size configuration mismatch (0x8000 vs 0x1000) of CONFIG_NIOS2_ICACHE_SIZE vs device tree icache-size
Warning: dcache size configuration mismatch (0x8000 vs 0x800) of CONFIG_NIOS2_DCACHE_SIZE vs device tree dcache-size
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c0e8a31c, node_mem_map c0eaab80
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32768 pages, LIFO batch:7
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyAL0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Sorting __ex_table...
Memory: 114896K/131072K available (4366K kernel code, 114K rwdata, 1272K rodata, 9132K init, 113K bss, 16176K reserved, 0K cma-reserved)
NR_IRQS:64 nr_irqs:64 0
clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 38225208935 ns
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
devtmpfs: initialized
cpu cpu0: Error -2 creating of_node link
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
random: fast init done
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
FPGA manager framework
clocksource: Switched to clocksource nios2-clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 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.
random: crng init done
workingset: timestamp_bits=30 max_order=15 bucket_order=0
jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
8001400.serial: ttyAL0 at MMIO 0x8001400 (irq = 3, base_baud = 3125000) is a Altera UART
console [ttyAL0] enabled
console [ttyAL0] enabled
bootconsole [early0] disabled
bootconsole [early0] disabled
8001440.serial: ttyJ0 at MMIO 0x8001440 (irq = 2, base_baud = 0) is a Altera JTAG UART
loop: module loaded
libphy: Fixed MDIO Bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform: EHCI generic platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-platform: OHCI generic platform driver
fotg210_hcd: FOTG210 Host Controller (EHCI) Driver
Warning! fotg210_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
usbcore: registered new interface driver usbtmc
usbcore: registered new interface driver mdc800
mdc800: v0.7.5 (30/10/2000):USB Driver for Mustek MDC800 Digital Camera
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver adutux
usbcore: registered new interface driver appledisplay
usbcore: registered new interface driver cypress_cy7c63
usbcore: registered new interface driver cytherm
usbcore: registered new interface driver emi26 - firmware loader
usbcore: registered new interface driver emi62 - firmware loader
ftdi_elan: driver ftdi-elan
usbcore: registered new interface driver ftdi-elan
usbcore: registered new interface driver idmouse
usbcore: registered new interface driver iowarrior
usbcore: registered new interface driver isight_firmware
usbcore: registered new interface driver usblcd
usbcore: registered new interface driver ldusb
usbcore: registered new interface driver legousbtower
usbcore: registered new interface driver rio500
usbcore: registered new interface driver usbtest
usbcore: registered new interface driver usb_ehset_test
usbcore: registered new interface driver trancevibrator
usbcore: registered new interface driver usbsevseg
usbcore: registered new interface driver yurex
usbcore: registered new interface driver sisusb
usbcore: registered new interface driver lvs
usbip_core: usbip_core_init:766: USB/IP Core v1.0.0
usbcore: registered new device driver usbip-host
usbip_host: usbip_host_init:302: USB/IP Host Driver v1.0.0
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
Freeing unused kernel memory: 9132K
This architecture does not have kernel memory protection.
INIT: version 2.88 booting
INIT: Entering runlevel: 3
Starting logging: OK
Initializing random number generator... done.
Starting system message bus: done
Starting network: OK

Output from dmesg

# dmesg
Linux version 4.11.0-rc7-00113-g94836ec (developer@1604) (gcc version 6.2.0 (Sourcery CodeBench Lite 2016.11-32) ) #24 Sun Apr 23 05:44:19 CEST 2017
bootconsole [early0] enabled
early_console initialized at 0xe8001400
ERROR: Nios II DIV different for kernel and DTS
Warning: icache size configuration mismatch (0x8000 vs 0x1000) of CONFIG_NIOS2_ICACHE_SIZE vs device tree icache-size
Warning: dcache size configuration mismatch (0x8000 vs 0x800) of CONFIG_NIOS2_DCACHE_SIZE vs device tree dcache-size
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c0e8a31c, node_mem_map c0eaab80
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32768 pages, LIFO batch:7
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyAL0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Sorting __ex_table...
Memory: 114896K/131072K available (4366K kernel code, 114K rwdata, 1272K rodata, 9132K init, 113K bss, 16176K reserved, 0K cma-reserved)
NR_IRQS:64 nr_irqs:64 0
clocksource: nios2-clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 38225208935 ns
Calibrating delay loop (skipped), value calculated using timer frequency.. 100.00 BogoMIPS (lpj=50000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
devtmpfs: initialized
cpu cpu0: Error -2 creating of_node link
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
random: fast init done
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
FPGA manager framework
clocksource: Switched to clocksource nios2-clksrc
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 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.
random: crng init done
workingset: timestamp_bits=30 max_order=15 bucket_order=0
jffs2: version 2.2. (NAND) �© 2001-2006 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
8001400.serial: ttyAL0 at MMIO 0x8001400 (irq = 3, base_baud = 3125000) is a Altera UART
console [ttyAL0] enabled
bootconsole [early0] disabled
8001440.serial: ttyJ0 at MMIO 0x8001440 (irq = 2, base_baud = 0) is a Altera JTAG UART
loop: module loaded
libphy: Fixed MDIO Bus: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform: EHCI generic platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-platform: OHCI generic platform driver
fotg210_hcd: FOTG210 Host Controller (EHCI) Driver
Warning! fotg210_hcd should always be loaded before uhci_hcd and ohci_hcd, not after
usbcore: registered new interface driver usbtmc
usbcore: registered new interface driver mdc800
mdc800: v0.7.5 (30/10/2000):USB Driver for Mustek MDC800 Digital Camera
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver adutux
usbcore: registered new interface driver appledisplay
usbcore: registered new interface driver cypress_cy7c63
usbcore: registered new interface driver cytherm
usbcore: registered new interface driver emi26 - firmware loader
usbcore: registered new interface driver emi62 - firmware loader
ftdi_elan: driver ftdi-elan
usbcore: registered new interface driver ftdi-elan
usbcore: registered new interface driver idmouse
usbcore: registered new interface driver iowarrior
usbcore: registered new interface driver isight_firmware
usbcore: registered new interface driver usblcd
usbcore: registered new interface driver ldusb
usbcore: registered new interface driver legousbtower
usbcore: registered new interface driver rio500
usbcore: registered new interface driver usbtest
usbcore: registered new interface driver usb_ehset_test
usbcore: registered new interface driver trancevibrator
usbcore: registered new interface driver usbsevseg
usbcore: registered new interface driver yurex
usbcore: registered new interface driver sisusb
usbcore: registered new interface driver lvs
usbip_core: usbip_core_init:766: USB/IP Core v1.0.0
usbcore: registered new device driver usbip-host
usbip_host: usbip_host_init:302: USB/IP Host Driver v1.0.0
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 17
Freeing unused kernel memory: 9132K
This architecture does not have kernel memory protection.
# 

The FPGA design.

enter image description here

In menuconfig I have the following settings.

enter image description here

1

Partial answer:

The User Manual shows on page 9 that two USB ports are connected to the Philips ISP 1362 Host/Device/OTG chip, and one port is connected to an FTDI FT245.

The boot log shows you are loading the generic (Intel-compatible) EHCI and OHCI host drivers, and a fotg210_hcd (in the wrong order). So this cannot work, you don't have any driver to access your USB ports.

The USB device tree bindings have no obvious files for these chips, however, and googling a bit says the ISP 1362 may be deprecated.

So (1) find out what actual USB chips are on your board by looking at the board, and (2) find compatible drivers for them, if necessary by looking through or greping the source code of the Linux tree you have installed somewhere.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.