Como habilitar o USB com o linux-socfpga?

1

Eu uso o linux-socfpga do repositório github da Altera (o branch master que foi atualizado recentemente) com o meu FPGA DE2-115. A saída da configuração do jtag é:

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

Gostaria de saber se é possível encontrar uma memória USB que eu anexei? Quando eu executo o lsusb nada aparece. Talvez seja o design do FPGA que está errado?

# 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

Saída do 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.
# 

O design do FPGA.

Emmenuconfigeutenhoasseguintesconfigurações.

    
por Niklas Rosencrantz 23.04.2017 / 05:49

1 resposta

1

Resposta parcial:

O Manual do usuário mostra na página 9 que duas portas USB estão conectados ao Philips ISP 1362 Host / O chip do dispositivo / OTG e uma porta estão conectados a um FTDI FT245 .

O log de inicialização mostra que você está carregando os drivers de host EHCI e OHCI genéricos (compatíveis com Intel) e um fotg210_hcd (na ordem errada). Então, isso não funciona, você não tem nenhum driver para acessar suas portas USB.

As associações de árvore de dispositivos USB não possuem arquivos óbvios para esses chips, no entanto, e googling um pouco diz que o ISP 1362 pode ser preterido.

Então (1) descubra quais são os chips USB atuais na sua placa olhando para a placa, e (2) encontre drivers compatíveis para eles, se necessário, olhando ou grep ing o código fonte da árvore Linux você instalou em algum lugar.

    
por 23.04.2017 / 09:23