imx6ull lan8720A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6ull lan8720A

Jump to solution
3,168 Views
2548903578
Contributor III

Hello, I am currently configuring the network driver of the Linux kernel, the kernel version is 5.4.47, refer to the imx6ull-14x14-evk board. The network chip was changed to LAN8720A. uboot has been set up successfully, and now it is found that it cannot be used when configuring the kernel network. I want to ask what should I do.The screenshot is the modified part.9@8FAA3$L07RG24)@[$0(YA.png微信截图_20210623142934.png微信截图_20210623142946.png微信截图_20210623143000.png微信截图_20210623143034.png微信截图_20210623143050.png微信截图_20210623143112.png微信截图_20210623143126.png微信截图_20210623143144.png微信截图_20210623143245.png微信截图_20210623143255.png

0 Kudos
1 Solution
3,060 Views
2548903578
Contributor III

Hi,igo

     I have solved this problem, and now both networks are able to work normally. The final solution is to set CONFIG_FEC_ENET_DEV to 1 in uboot. After setting to 0, only one of the two networks can be used in the kernel. I want to ask why is this? Also, in uboot, I set the #define CONFIG_ETHPRIME macro of network 1 to "eth0" or "eth1", and finally the information after starting the board remains unchanged. The ethernet@020b4000 in the screenshot corresponds to eth1, ethernet. @02188000 corresponds to eth0. Also, the random mac addresses generated by the two networks in uboot are reversed in the kernel. Looking forward to your reply.

 

QQ截图20210708153010.pngQQ截图20210708153115.pngQQ截图20210708153130.pngQQ截图20210708154344.pngQQ截图20210708154706.png

View solution in original post

0 Kudos
10 Replies
3,166 Views
2548903578
Contributor III

linux log:

          Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.4.47-lts-lf-5.4.y+g88b2efd7d692 (oe-user@oe-host) (gcc version 9.2.0 (GCC)) #1 SMP PREEMPT Wed Mar 31 01:56:06 UTC 2021 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Freescale i.MX6 ULL 14x14 EVK Board [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] Reserved memory: created CMA memory pool at 0x96000000, size 160 MiB [ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool [ 0.000000] percpu: Embedded 15 pages/cpu s32076 r8192 d21172 u61440 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048 [ 0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/nfs ip=192.168.0.200:192.168.0.104:192.168.0.1:255.255.255.0::eth1:off nfsroot=192.168.0.104:/nfsroot,v3,tcp [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 336836K/524288K available (11264K kernel code, 748K rwdata, 4168K rodata, 1024K init, 432K bss, 23612K reserved, 163840K cma-reserved, 0K highmem) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1. [ 0.000000] Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x2c8/0x46c with crng_init=0 [ 0.000000] Switching to timer-based delay loop, resolution 41ns [ 0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns [ 0.000054] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.002980] Console: colour dummy device 80x30 [ 0.003052] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.003085] pid_max: default: 32768 minimum: 301 [ 0.003397] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.003433] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.004951] CPU: Testing write buffer coherency: ok [ 0.005631] CPU0: update cpu_capacity 1024 [ 0.005662] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.060589] Setting up static identity map for 0x80100000 - 0x80100060 [ 0.080567] rcu: Hierarchical SRCU implementation. [ 0.120739] smp: Bringing up secondary CPUs ... [ 0.120773] smp: Brought up 1 node, 1 CPU [ 0.120795] SMP: Total of 1 processors activated (48.00 BogoMIPS). [ 0.120811] CPU: All CPU(s) started in SVC mode. [ 0.121664] devtmpfs: initialized [ 0.136252] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.137206] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.137262] futex hash table entries: 256 (order: 2, 16384 bytes, linear) [ 0.149647] pinctrl core: initialized pinctrl subsystem [ 0.152131] NET: Registered protocol family 16 [ 0.176944] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.179551] cpuidle: using governor menu [ 0.196642] vdd3p0: supplied by regulator-dummy [ 0.197959] cpu: supplied by regulator-dummy [ 0.199274] vddsoc: supplied by regulator-dummy [ 0.223211] No ATAGs? [ 0.223346] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.223384] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.227654] imx6ul-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver [ 0.228323] imx6ul-pinctrl 2290000.iomuxc-snvs: no groups defined in /soc/aips-bus@2200000/iomuxc-snvs@2290000 [ 0.228359] imx6ul-pinctrl 2290000.iomuxc-snvs: initialized IMX pinctrl driver [ 0.230947] imx mu driver is registered. [ 0.232124] imx rpmsg driver is registered. [ 0.317009] vgaarb: loaded [ 0.318836] SCSI subsystem initialized [ 0.323286] usbcore: registered new interface driver usbfs [ 0.323427] usbcore: registered new interface driver hub [ 0.323646] usbcore: registered new device driver usb [ 0.326905] i2c i2c-0: IMX I2C adapter registered [ 0.328949] i2c i2c-1: IMX I2C adapter registered [ 0.329867] mc: Linux media interface: v0.10 [ 0.329980] videodev: Linux video capture interface: v2.00 [ 0.330121] pps_core: LinuxPPS API ver. 1 registered [ 0.330139] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 0.330191] PTP clock support registered [ 0.333210] MIPI CSI2 driver module loaded [ 0.333346] Advanced Linux Sound Architecture Driver Initialized. [ 0.335144] Bluetooth: Core ver 2.22 [ 0.335291] NET: Registered protocol family 31 [ 0.335313] Bluetooth: HCI device and connection manager initialized [ 0.335350] Bluetooth: HCI socket layer initialized [ 0.335377] Bluetooth: L2CAP socket layer initialized [ 0.335430] Bluetooth: SCO socket layer initialized [ 0.336605] clocksource: Switched to clocksource mxc_timer1 [ 0.336931] VFS: Disk quotas dquot_6.6.0 [ 0.337081] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) [ 0.359110] thermal_sys: Registered thermal governor 'step_wise' [ 0.359721] NET: Registered protocol family 2 [ 0.361052] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 0.361132] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear) [ 0.361239] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.361396] TCP: Hash tables configured (established 4096 bind 4096) [ 0.361593] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.361659] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.362035] NET: Registered protocol family 1 [ 0.393524] RPC: Registered named UNIX socket transport module. [ 0.393557] RPC: Registered udp transport module. [ 0.393574] RPC: Registered tcp transport module. [ 0.393590] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 0.405003] PCI: CLS 0 bytes, default 64 [ 0.406446] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available [ 0.410176] Bus freq driver module loaded [ 0.412478] Initialise system trusted keyrings [ 0.413042] workingset: timestamp_bits=30 max_order=17 bucket_order=0 [ 0.437638] NFS: Registering the id_resolver key type [ 0.437732] Key type id_resolver registered [ 0.437751] Key type id_legacy registered [ 0.437850] jffs2: version 2.2. (NAND) 2001-2006 Red Hat, Inc. [ 0.438974] fuse: init (API version 7.31) [ 0.526192] Key type asymmetric registered [ 0.526227] Asymmetric key parser 'x509' registered [ 0.526294] io scheduler mq-deadline registered [ 0.526313] io scheduler kyber registered [ 0.534301] pwm-backlight backlight-display: backlight-display supply power not found, using dummy regulator [ 0.542591] mxsfb 21c8000.lcdif: 21c8000.lcdif supply lcd not found, using dummy regulator [ 0.652710] sii902x bound to mxs-lcdif from 21c8000.lcdif [ 0.656871] Console: switching to colour frame buffer device 60x34 [ 0.753461] mxsfb 21c8000.lcdif: initialized [ 0.763354] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2 [ 0.763396] imx-sdma 20ec000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin [ 0.767914] mxs-dma 1804000.dma-apbh: initialized [ 0.774694] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 21, base_baud = 5000000) is a IMX [ 1.500192] printk: console [ttymxc0] enabled [ 1.507055] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 67, base_baud = 5000000) is a IMX [ 1.551182] imx_rngc 2284000.rng: Freescale RNGC registered. [ 1.557685] imx sema4 driver is registered. [ 1.598422] brd: module loaded [ 1.621497] loop: module loaded [ 1.627565] imx ahci driver is registered. [ 1.639838] spi-nor spi4.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff [ 1.652708] libphy: Fixed MDIO Bus: probed [ 1.658310] CAN device driver interface [ 1.877456] pps pps0: new PPS source ptp0 [ 1.884634] libphy: fec_enet_mii_bus: probed [ 1.889336] mdio_bus 20b4000.ethernet-1: MDIO device at address 0 is missing. [ 1.909851] fec 20b4000.ethernet eth0: registered PHC device 0 [ 2.137419] pps pps1: new PPS source ptp1 [ 2.145812] fec 2188000.ethernet eth1: registered PHC device 1 [ 2.153684] usbcore: registered new interface driver r8152 [ 2.159457] usbcore: registered new interface driver lan78xx [ 2.165279] usbcore: registered new interface driver asix [ 2.170870] usbcore: registered new interface driver ax88179_178a [ 2.177141] usbcore: registered new interface driver cdc_ether [ 2.183114] usbcore: registered new interface driver smsc95xx [ 2.189046] usbcore: registered new interface driver net1080 [ 2.194822] usbcore: registered new interface driver cdc_subset [ 2.200907] usbcore: registered new interface driver zaurus [ 2.206646] usbcore: registered new interface driver MOSCHIP usb-ethernet driver [ 2.214204] usbcore: registered new interface driver cdc_ncm [ 2.219940] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.226493] ehci-pci: EHCI PCI platform driver [ 2.231090] ehci-mxc: Freescale On-Chip EHCI Host driver [ 2.237370] usbcore: registered new interface driver usb-storage [ 2.247774] imx_usb 2184000.usb: No over current polarity defined [ 2.254053] imx_usb 2184000.usb: 2184000.usb supply vbus not found, using dummy regulator [ 2.559494] imx_usb 2184200.usb: 2184200.usb supply vbus not found, using dummy regulator [ 2.572480] ci_hdrc ci_hdrc.1: EHCI Host Controller [ 2.577551] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1 [ 2.616717] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00 [ 2.622680] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04 [ 2.631066] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 2.638367] usb usb1: Product: EHCI Host Controller [ 2.643278] usb usb1: Manufacturer: Linux 5.4.47-lts-lf-5.4.y+g88b2efd7d692 ehci_hcd [ 2.651085] usb usb1: SerialNumber: ci_hdrc.1 [ 2.657162] hub 1-0:1.0: USB hub found [ 2.661075] hub 1-0:1.0: 1 port detected [ 2.681134] input: 20cc000.snvs:snvs-powerkey as /devices/soc0/soc/2000000.aips-bus/20cc000.snvs/20cc000.snvs:snvs-powerkey/input/input0 [ 2.697389] input: iMX6UL Touchscreen Controller as /devices/soc0/soc/2000000.aips-bus/2040000.tsc/input/input1 [ 2.710966] read sensor who am i (0x0)error ! [ 2.715418] fxls8471: probe of 0-001e failed with error -22 [ 2.726349] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0 [ 2.732965] i2c /dev entries driver [ 2.740359] pxp-v4l2 pxp_v4l2: initialized [ 2.747627] mag3110 0-000e: 0-000e supply vdd not found, using dummy regulator [ 2.755115] mag3110 0-000e: 0-000e supply vddio not found, using dummy regulator [ 2.762911] mag3110 0-000e: check mag3110 chip ID [ 2.768387] mag3110 0-000e: read chip ID 0xfffffffa is not equal to 0xc4! [ 2.775517] mag3110: probe of 0-000e failed with error -22 [ 2.784369] imx2-wdt 20bc000.wdog: timeout 60 sec (nowayout=0) [ 2.792089] Bluetooth: HCI UART driver ver 2.3 [ 2.796822] Bluetooth: HCI UART protocol H4 registered [ 2.801993] Bluetooth: HCI UART protocol BCSP registered [ 2.807553] Bluetooth: HCI UART protocol LL registered [ 2.812787] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 2.819234] Bluetooth: HCI UART protocol Marvell registered [ 2.824987] usbcore: registered new interface driver btusb [ 2.830553] random: fast init done [ 2.835812] sdhci: Secure Digital Host Controller Interface driver [ 2.842129] sdhci: Copyright(c) Pierre Ossman [ 2.846513] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.855304] sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO [ 2.904953] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA [ 2.956941] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA [ 2.968751] caam-snvs 20cc000.caam-snvs: can't get snvs clock [ 2.974927] caam-snvs 20cc000.caam-snvs: violation handlers armed - init state [ 2.989173] usbcore: registered new interface driver usbhid [ 2.994794] usbhid: USB HID core driver [ 3.026014] fsl-sai 202c000.sai: failed to get mclk0 clock: -2 [ 3.032246] usb 1-1: new high-speed USB device number 2 using ci_hdrc [ 3.049887] debugfs: Directory '202c000.sai' with parent 'wm8960-audio' already present! [ 3.060111] imx-wm8960 sound-wm8960: wm8960-hifi <-> 202c000.sai mapping ok [ 3.072709] imx-wm8960 sound-wm8960: snd-soc-dummy-dai <-> 2034000.asrc mapping ok [ 3.080899] imx-wm8960 sound-wm8960: wm8960-hifi <-> 202c000.sai mapping ok [ 3.111799] mmc1: new HS200 MMC card at address 0001 [ 3.128490] mmcblk1: mmc1:0001 8GTF4R 7.28 GiB [ 3.133685] mmcblk1boot0: mmc1:0001 8GTF4R partition 1 4.00 MiB [ 3.140492] mmcblk1boot1: mmc1:0001 8GTF4R partition 2 4.00 MiB [ 3.147064] mmcblk1rpmb: mmc1:0001 8GTF4R partition 3 512 KiB, chardev (244:0) [ 3.167575] mmcblk1: p1 p2 [ 3.225009] NET: Registered protocol family 26 [ 3.231322] NET: Registered protocol family 10 [ 3.249045] Segment Routing with IPv6 [ 3.253132] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 3.259324] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=85.36 [ 3.269243] NET: Registered protocol family 17 [ 3.273766] can: controller area network core (rev 20170425 abi 9) [ 3.280144] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 3.287577] NET: Registered protocol family 29 [ 3.292065] can: raw protocol (rev 20170425) [ 3.296361] can: broadcast manager protocol (rev 20170425 t) [ 3.302140] usb 1-1: Product: USB2.0 Hub [ 3.307142] can: netlink gateway (rev 20190810) max_hops=1 [ 3.313197] hub 1-1:1.0: USB hub found [ 3.317841] Bluetooth: RFCOMM TTY layer initialized [ 3.322928] hub 1-1:1.0: 4 ports detected [ 3.327194] Bluetooth: RFCOMM socket layer initialized [ 3.332517] Bluetooth: RFCOMM ver 1.11 [ 3.336333] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 3.341834] Bluetooth: BNEP filters: protocol multicast [ 3.347331] Bluetooth: BNEP socket layer initialized [ 3.353190] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 3.359404] Bluetooth: HIDP socket layer initialized [ 3.364628] lib80211: common routines for IEEE802.11 drivers [ 3.370624] Key type dns_resolver registered [ 3.399914] Registering SWP/SWPB emulation handler [ 3.405923] Loading compiled-in X.509 certificates [ 3.441385] regulator-can-3v3 GPIO handle specifies active low - ignored [ 3.454502] imx_thermal tempmon: Industrial CPU temperature grade - max:105C critical:100C passive:95C [ 3.465301] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-04T20:01:30 UTC (331290) [ 3.478532] fec 2188000.ethernet eth1: Unable to connect to phy [ 3.486311] IP-Config: Failed to open eth1 [ 3.490677] IP-Config: Device `eth1' not found [ 3.495372] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 3.507185] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 3.513948] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 3.522843] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db [ 3.530971] ALSA device list: [ 3.533964] #0: wm8960-audio

0 Kudos
3,144 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos
3,059 Views
2548903578
Contributor III

Hi,igo

 https://community.nxp.com/t5/i-MX-Processors/One-of-Ethernet-interfaces-can-t-find-PHY-until-reboot/...  

 This is a post I am looking for and it should be the same as mine. I also think this is a software problem.

0 Kudos
3,061 Views
2548903578
Contributor III

Hi,igo

     I have solved this problem, and now both networks are able to work normally. The final solution is to set CONFIG_FEC_ENET_DEV to 1 in uboot. After setting to 0, only one of the two networks can be used in the kernel. I want to ask why is this? Also, in uboot, I set the #define CONFIG_ETHPRIME macro of network 1 to "eth0" or "eth1", and finally the information after starting the board remains unchanged. The ethernet@020b4000 in the screenshot corresponds to eth1, ethernet. @02188000 corresponds to eth0. Also, the random mac addresses generated by the two networks in uboot are reversed in the kernel. Looking forward to your reply.

 

QQ截图20210708153010.pngQQ截图20210708153115.pngQQ截图20210708153130.pngQQ截图20210708154344.pngQQ截图20210708154706.png

0 Kudos
3,090 Views
2548903578
Contributor III

Hi,igo

 After further investigation, I think it is because the mdio interface is unsuccessful to read the id number on the network 1. Does it mean that the mdio interface has a problem on the network 1? Looking forward to your reply. QQ截图20210701212157.png

0 Kudos
3,088 Views
2548903578
Contributor III

QQ截图20210701212335.png

0 Kudos
3,087 Views
2548903578
Contributor III

QQ截图20210701212951.png

uboot can recognize this network.

0 Kudos
3,104 Views
2548903578
Contributor III

Hi igo,

I read the link you gave me, and I think this post is different in my situation. My network 1 did not read the correct phy id at all. So my board network 1 could not work normally.

0 Kudos
3,105 Views
2548903578
Contributor III

Hi igo,

Thank you very much for your reply! I found out that the phy_id number of network 1 was wrong by printing log, only the phy_id of network 2 was correct, so network 1 could not work normally, and network 2 could work normally. What is causing this? I have been debugging for a long time and hope to get your reply.

QQ截图20210630184801.pngQQ截图20210630185003.png

0 Kudos
1,222 Views
xiaobinwang
Contributor I

Hi,

   Excuse me, did you finally find the cause of your problem? I have the same problem you have now

0 Kudos