AnsweredAssumed Answered

How to configurate kernel and devicetree for g_serial?

Question asked by ByongKwan Kim on Apr 20, 2016

I am now in use the ls1021a-iot board. I wanted to use USB G_serial, modified the kernel and devicetree. But it had stopped during booting. Wondering take being done in order to use the g_serial?

 

     <kernel include Serial Gadget>

     <Devicetree>

 

U-Boot 2015.01+ls1+g3281947 (Apr 19 2016 - 14:59:34)

 

 

CPU:   Freescale LayerScape LS1021E, Version: 2.0, (0x87081120)

Clock Configuration:

       CPU0(ARMV7):1000 MHz,

       Bus:300  MHz, DDR:800  MHz (1600 MT/s data rate),

Reset Configuration Word (RCW):

       00000000: 0608000a 00000000 00000000 00000000

       00000010: 20000000 08407900 60025a00 21046000

       00000020: 00000000 00000000 00000000 20038000

       00000030: 20024800 881b1340 00000000 00000000

Board: LS1021AIOT

CPLD:  V2.3

I2C:   ready

DRAM:  1 GiB

Using SERDES1 Protocol: 32 (0x20)

MMC:   FSL_SDHC: 0

EEPROM: NXID v1

PCIe1: Root Complex no link, regs @ 0x3400000

PCIe2: Root Complex no link, regs @ 0x3500000

In:    serial

Out:   serial

Err:   serial

SEC0: RNG instantiated

SATA link 0 timeout.

AHCI 0001.0300 1 slots 1 ports ? Gbps 0x1 impl SATA mode

flags: 64bit ncq pm clo only pmp fbss pio slum part ccc

scanning bus for devices...

Found 0 device(s).

SCSI:  Net:   eTSEC1 is in sgmii mode.

eTSEC2 is in sgmii mode.

Phy 4 not found

PHY reset timed out

eTSEC1 [PRIME], eTSEC2, eTSEC3

Hit any key to stop autoboot:  0

=>

=>

=>

=>

=>

=>

=>

=>

=>

=>

=> pri

baudrate=115200

bootargs=console=ttyLP0,115200 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait

bootcmd=mmc rescan

bootdelay=3

eth1addr=00:04:9F:03:61:98

eth2addr=00:04:9F:03:61:99

ethact=eTSEC1

ethaddr=00:04:9F:03:61:97

ethprime=eTSEC1

fdt_high=0xffffffff

filesize=5620

initrd_high=0xffffffff

ipaddr=192.168.100.30

load_dtb=ext2load mmc :1 8f00000 boot/ls1021a-iot.dtb

load_kernel=ext2load mmc :1 82000000 boot/uImage

load_rootfs=ext2load mmc :1 88000000 rootfs_1_3

scsidevs=0

sdroot=setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait;setenv

 

 

bootcmd mmc rescan; run load_kernel load_dtb; bootm 82000000 - 8f000000

serverip=192.168.100.70

stderr=serial

stdin=serial

stdout=serial

 

 

Environment size: 752/131068 bytes

=> setenv load_dtb ext2load mmc :1 8f000000 boot/ls1021a-iot.dtb

=> setenv sdroot 'setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext4

 

 

rootwait;setenv bootcmd mmc rescan; run load_kernel load_dtb; bootm 82000000 - 8f000000'

=> saveenv

Saving Environment to MMC...

Writing to MMC(0)... done

=> run sdroot

4263832 bytes read in 292 ms (13.9 MiB/s)

21187 bytes read in 96 ms (214.8 KiB/s)

## Booting kernel from Legacy Image at 82000000 ...

   Image Name:   Linux-3.12.37-rt51+ls1+gaaa395f

   Image Type:   ARM Linux Kernel Image (uncompressed)

   Data Size:    4263768 Bytes = 4.1 MiB

   Load Address: 80008000

   Entry Point:  80008000

   Verifying Checksum ... OK

## Flattened Device Tree blob at 8f000000

   Booting using the fdt blob at 0x8f000000

   Loading Kernel Image ... OK

   Using Device Tree in place at 8f000000, end 8f0082c2

 

 

Starting kernel ...

 

 

[    0.000000] Booting Linux on physical CPU 0xf00

[    0.000000] Linux version 3.12.37-rt51+ls1+gaaa395f (kst@kst) (gcc version 4.8.3 20140401

 

 

(prerelease) (Linaro GCC 4.8-2014.04) ) #2 SMP Tue Apr 19 19:04:07 KST 2016

[    0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=30c73c7d

[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[    0.000000] Machine: Freescale LS1021A, model: LS1021A IOT Board

[    0.000000] Memory policy: ECC disabled, Data cache writealloc

[    0.000000] PERCPU: Embedded 8 pages/cpu @8107a000 s9344 r8192 d15232 u32768

[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260096

[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext4

 

 

rootwait

[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)

[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

[    0.000000] Memory: 1029272K/1048576K available (6017K kernel code, 306K rwdata, 1796K

 

 

rodata, 249K init, 210K bss, 19304K reserved, 0K highmem)

[    0.000000] Virtual kernel memory layout:

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

[    0.000000]     vmalloc : 0xc0800000 - 0xff000000   (1000 MB)

[    0.000000]     lowmem  : 0x80000000 - 0xc0000000   (1024 MB)

[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)

[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)

[    0.000000]       .text : 0x80008000 - 0x807a99a8   (7815 kB)

[    0.000000]       .init : 0x807aa000 - 0x807e8480   ( 250 kB)

[    0.000000]       .data : 0x807ea000 - 0x808368e0   ( 307 kB)

[    0.000000]        .bss : 0x808368e8 - 0x8086b250   ( 211 kB)

[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1

[    0.000000] Hierarchical RCU implementation.

[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.

[    0.000000] NR_IRQS:16 nr_irqs:16 16

[    0.000000] Architected cp15 timer(s) running at 12.50MHz (phys).

[    0.000000] Switching to timer-based delay loop

[    0.000000] sched_clock: ARM arch timer >56 bits at 12500kHz, resolution 80ns

[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms

[    0.000000] Console: colour dummy device 80x30

[   57.505300] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00

 

 

BogoMIPS (lpj=125000)

[   57.505312] pid_max: default: 32768 minimum: 301

[   57.505501] Mount-cache hash table entries: 512

[   57.509851] CPU: Testing write buffer coherency: ok

[   57.510103] CPU0: update cpu_power 1024

[   57.510114] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00

[   57.510271] Setting up static identity map for 0x805b4b08 - 0x805b4b74

[   57.511202] CPU1: Booted secondary processor

[   57.511228] CPU1: update cpu_power 1024

[   57.511233] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01

[   57.511326] Brought up 2 CPUs

[   57.511345] SMP: Total of 2 processors activated (50.00 BogoMIPS).

[   57.511351] CPU: All CPU(s) started in HYP mode.

[   57.511357] CPU: Virtualization extensions available.

[   57.511969] devtmpfs: initialized

[   57.517727] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5

[   57.518100] regulator-dummy: no parameters

[   57.518344] NET: Registered protocol family 16

[   57.518821] DMA: preallocated 256 KiB pool for atomic coherent allocations

[   57.519133] cpuidle: using governor ladder

[   57.519141] cpuidle: using governor menu

[   57.519986] syscon 1570000.scfg: regmap [mem 0x01570000-0x0157ffff] registered

[   57.520689] irq: no irq domain found for /soc/uqe@2400000/qeic@80 !

[   57.520766] irq: no irq domain found for /soc/uqe@2400000/qeic@80 !

[   57.524162] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.

[   57.524171] hw-breakpoint: maximum watchpoint size is 8 bytes.

[   57.530234] bio: create slab <bio-0> at 0

[   57.532829] 3P3V: 3300 mV

[   57.533001] 2P5V: 2500 mV

[   57.533213] vgaarb: loaded

[   57.533462] SCSI subsystem initialized

[   57.533818] usbcore: registered new interface driver usbfs

[   57.533867] usbcore: registered new interface driver hub

[   57.533939] usbcore: registered new device driver usb

[   57.535744] i2c i2c-0: IMX I2C adapter registered

[   57.535931] pps_core: LinuxPPS API ver. 1 registered

[   57.535939] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti

 

 

<giometti@linux.it>

[   57.535959] PTP clock support registered

[   57.536393] Advanced Linux Sound Architecture Driver Initialized.

[   57.537915] Switched to clocksource arch_sys_counter

[   57.537925] cfg80211: Calling CRDA to update world regulatory domain

[   57.537972] cfg80211: World regulatory domain updated:

[   57.537980] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)

[   57.537988] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (2000 mBi, 0 mBm)

[   57.537996] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (2000 mBi, 0 mBm)

[   57.538004] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (2000 mBi, 0 mBm)

[   57.538013] cfg80211:   (5170000 KHz - 5250000 KHz @ 160000 KHz), (2000 mBi, 0 mBm)

[   57.538021] cfg80211:   (5250000 KHz - 5330000 KHz @ 160000 KHz), (2000 mBi, 0 mBm)

[   57.538029] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (2000 mBi, 0 mBm)

[   57.538037] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (2000 mBi, 0 mBm)

[   57.538044] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)

[   57.543739] NET: Registered protocol family 2

[   57.544543] TCP established hash table entries: 8192 (order: 4, 65536 bytes)

[   57.544670] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)

[   57.544791] TCP: Hash tables configured (established 8192 bind 8192)

[   57.544888] TCP: reno registered

[   57.544900] UDP hash table entries: 512 (order: 2, 16384 bytes)

[   57.544945] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)

[   57.545209] NET: Registered protocol family 1

[   57.545432] RPC: Registered named UNIX socket transport module.

[   57.545442] RPC: Registered udp transport module.

[   57.545447] RPC: Registered tcp transport module.

[   57.545453] RPC: Registered tcp NFSv4.1 backchannel transport module.

[   57.545782] hw perfevents: enabled with ARMv7 Cortex-A7 PMU driver, 5 counters available

[   57.681813] NFS: Registering the id_resolver key type

[   57.681875] Key type id_resolver registered

[   57.681882] Key type id_legacy registered

[   57.681914] jffs2: version 2.2. (NAND) ⓒ 2001-2006 Red Hat, Inc.

[   57.682261] SGI XFS with security attributes, large block/inode numbers, no debug enabled

[   57.683460] msgmni has been set to 2010

[   57.684338] io scheduler noop registered

[   57.684348] io scheduler deadline registered

[   57.684377] io scheduler cfq registered (default)

[   57.884986] layerscape-pcie 3400000.pcie: phy link never came up

[   57.885114] layerscape-pcie 3400000.pcie: PCI host bridge to bus 0000:00

[   57.885128] pci_bus 0000:00: root bus resource [io  0x1000-0xffff]

[   57.885142] pci_bus 0000:00: root bus resource [mem 0x4040000000-0x407fffffff] (bus address

 

 

[0x40000000-0x7fffffff])

[   57.885154] pci_bus 0000:00: root bus resource [bus 00-ff]

[   57.885465] PCI: bus0: Fast back to back transfers disabled

[   57.885553] PCI: bus1: Fast back to back transfers enabled

[   57.885629] pci 0000:00:00.0: BAR 1: assigned [mem 0x4040000000-0x4043ffffff]

[   57.885645] pci 0000:00:00.0: BAR 0: assigned [mem 0x4044000000-0x4044ffffff]

[   57.885659] pci 0000:00:00.0: BAR 6: assigned [mem 0x4045000000-0x4045ffffff pref]

[   57.885670] pci 0000:00:00.0: PCI bridge to [bus 01]

[   58.085991] layerscape-pcie 3500000.pcie: phy link never came up

[   58.086091] layerscape-pcie 3500000.pcie: PCI host bridge to bus 0001:00

[   58.086105] pci_bus 0001:00: root bus resource [io  0x10000-0x1ffff] (bus address [0x0000-

 

 

0xffff])

[   58.086119] pci_bus 0001:00: root bus resource [mem 0x4840000000-0x487fffffff] (bus address

 

 

[0x40000000-0x7fffffff])

[   58.086130] pci_bus 0001:00: root bus resource [bus 00-ff]

[   58.086409] PCI: bus0: Fast back to back transfers disabled

[   58.086496] PCI: bus1: Fast back to back transfers enabled

[   58.086561] pci 0001:00:00.0: BAR 1: assigned [mem 0x4840000000-0x4843ffffff]

[   58.086576] pci 0001:00:00.0: BAR 0: assigned [mem 0x4844000000-0x4844ffffff]

[   58.086590] pci 0001:00:00.0: BAR 6: assigned [mem 0x4845000000-0x4845ffffff pref]

[   58.086600] pci 0001:00:00.0: PCI bridge to [bus 01]

[   58.086770] sii902x: probe of 0-0039 failed with error -1

[   58.086997] syscon 1570000.scfg: Failed to create debugfs directory

[   58.096553] Console: switching to colour frame buffer device 80x30

[   58.103117] fb0: fb device registered successfully.

[   58.103281] fb1: fb device registered successfully.

[   58.103427] fb2: fb device registered successfully.

[   58.103590] fb3: fb device registered successfully.

[   58.137328] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

[   58.138710] 21c0500.serial: ttyS0 at MMIO 0x21c0500 (irq = 118, base_baud = 9375000) is a

 

 

16550A_FSL64

[   58.955566] console [ttyS0] enabled

[   58.959282] of_serial 2402200.ucc: clk or clock-frequency not defined

[   58.965694] of_serial: probe of 2402200.ucc failed with error -2

[   58.971955] serial: Freescale lpuart driver

[   58.976228] 2950000.serial: ttyLP0 at MMIO 0x2950000 (irq = 112, base_baud = 6250000) is a

 

 

FSL_LPUART

[   58.988588] brd: module loaded

[   58.994593] loop: module loaded

[   58.998076] ahci 3200000.sata: AHCI 0001.0300 1 slots 1 ports ? Gbps 0x1 impl platform mode

[   59.006390] ahci 3200000.sata: flags: 64bit ncq sntf pm clo only pmp fbs pio slum part ccc

[   59.014718] ahci 3200000.sata: port 0 is not capable of FBS

[   59.020791] scsi0 : ahci_platform

[   59.024274] ata1: SATA max UDMA/133 mmio [mem 0x03200000-0x0320ffff] port 0x100 irq 133

[   59.034654] CAN device driver interface

[   59.039108] flexcan 2a70000.can: device registered (reg_base=c0834000, irq=158)

[   59.046818] flexcan 2a80000.can: device registered (reg_base=c0836000, irq=159)

[   59.054545] flexcan 2a90000.can: device registered (reg_base=c0838000, irq=160)

[   59.062268] flexcan 2aa0000.can: device registered (reg_base=c083a000, irq=161)

[   59.070155] libphy: Freescale PowerQUICC MII Bus: probed

[   59.075551] mdio_bus mdio@2d24000: cannot get PHY at address 0

[   59.081385] genirq: Setting trigger mode 8 for irq 197 failed (gic_set_type+0x0/0xfc)

[   59.089970] genirq: Setting trigger mode 8 for irq 197 failed (gic_set_type+0x0/0xfc)

[   59.098752] fsl-gianfar ethernet.4: enabled errata workarounds, flags: 0x4

[   59.116300] fsl-gianfar ethernet.4 eth0: mac: 00:04:9f:03:61:97

[   59.122204] fsl-gianfar ethernet.4 eth0: Running with NAPI enabled

[   59.128360] fsl-gianfar ethernet.4 eth0: RX BD ring size for Q[0]: 256

[   59.134852] fsl-gianfar ethernet.4 eth0: RX BD ring size for Q[1]: 256

[   59.141352] fsl-gianfar ethernet.4 eth0: TX BD ring size for Q[0]: 256

[   59.147845] fsl-gianfar ethernet.4 eth0: TX BD ring size for Q[1]: 256

[   59.154483] fsl-gianfar ethernet.5: enabled errata workarounds, flags: 0x4

[   59.171994] fsl-gianfar ethernet.5 eth1: mac: 00:04:9f:03:61:98

[   59.177884] fsl-gianfar ethernet.5 eth1: Running with NAPI enabled

[   59.184042] fsl-gianfar ethernet.5 eth1: RX BD ring size for Q[0]: 256

[   59.190542] fsl-gianfar ethernet.5 eth1: RX BD ring size for Q[1]: 256

[   59.197036] fsl-gianfar ethernet.5 eth1: TX BD ring size for Q[0]: 256

[   59.203538] fsl-gianfar ethernet.5 eth1: TX BD ring size for Q[1]: 256

[   59.210186] fsl-gianfar ethernet.6: enabled errata workarounds, flags: 0x4

[   59.227690] fsl-gianfar ethernet.6 eth2: mac: 00:04:9f:03:61:99

[   59.233595] fsl-gianfar ethernet.6 eth2: Running with NAPI enabled

[   59.239753] fsl-gianfar ethernet.6 eth2: RX BD ring size for Q[0]: 256

[   59.246246] fsl-gianfar ethernet.6 eth2: RX BD ring size for Q[1]: 256

[   59.252748] fsl-gianfar ethernet.6 eth2: TX BD ring size for Q[0]: 256

[   59.259253] fsl-gianfar ethernet.6 eth2: TX BD ring size for Q[1]: 256

[   59.265972] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI

[   59.272996] e1000: Copyright (c) 1999-2006 Intel Corporation.

[   59.278796] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k

[   59.284594] e1000e: Copyright(c) 1999 - 2013 Intel Corporation.

[   59.290538] PPP generic driver version 2.4.2

[   59.294915] PPP BSD Compression module registered

[   59.299612] PPP Deflate Compression module registered

[   59.304672] PPP MPPE Compression module registered

[   59.309450] NET: Registered protocol family 24

[   59.313904] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).

[   59.320990] usbcore: registered new interface driver rtl8150

[   59.326668] usbcore: registered new interface driver asix

[   59.332077] usbcore: registered new interface driver ax88179_178a

[   59.338174] usbcore: registered new interface driver cdc_ether

[   59.344002] usbcore: registered new interface driver r815x

[   59.349499] usbcore: registered new interface driver net1080

[   59.355156] usbcore: registered new interface driver cdc_subset

[   59.361079] usbcore: registered new interface driver zaurus

[   59.366700] usbcore: registered new interface driver cdc_ncm

[   59.377938] ata1: SATA link down (SStatus 0 SControl 300)

[   59.572847] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller

[   59.578349] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1

[   59.586138] xhci-hcd xhci-hcd.0.auto: irq 125, io mem 0x03100000

[   59.592258] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

[   59.599027] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[   59.606211] usb usb1: Product: xHCI Host Controller

[   59.611071] usb usb1: Manufacturer: Linux 3.12.37-rt51+ls1+gaaa395f xhci-hcd

[   59.618090] usb usb1: SerialNumber: xhci-hcd.0.auto

[   59.623360] hub 1-0:1.0: USB hub found

[   59.627111] hub 1-0:1.0: 1 port detected

[   59.631201] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller

[   59.636665] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2

[   59.644427] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003

[   59.651196] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[   59.658386] usb usb2: Product: xHCI Host Controller

[   59.663237] usb usb2: Manufacturer: Linux 3.12.37-rt51+ls1+gaaa395f xhci-hcd

[   59.670254] usb usb2: SerialNumber: xhci-hcd.0.auto

[   59.675468] hub 2-0:1.0: USB hub found

[   59.679236] hub 2-0:1.0: 1 port detected

[   59.683613] usbcore: registered new interface driver cdc_acm

[   59.689253] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

[   59.697302] usbcore: registered new interface driver usb-storage

[   59.703459] usbcore: registered new interface driver usbserial

[   59.709311] usbcore: registered new interface driver usbserial_generic

[   59.715830] usbserial: USB Serial support registered for generic

[   59.721856] usbcore: registered new interface driver ftdi_sio

[   59.727596] usbserial: USB Serial support registered for FTDI USB Serial Device

[   59.735044] usbcore: registered new interface driver option

[   59.740624] usbserial: USB Serial support registered for GSM modem (1-port)

[   59.747656] usbcore: registered new interface driver zte_ev

[   59.753243] usbserial: USB Serial support registered for zte_ev

 

and freezing...

Outcomes