【迅为iMX6Q】开发板 Linux 5.15.71 RTL8211E 以太网驱动适配

news2025/1/13 14:06:48

相关参考

【迅为iMX6Q】开发板 u-boot 2022.04 SD卡 启动

【迅为iMX6Q】开发板 u-boot 2020.04 RTL8211E 以太网驱动适配

【迅为iMX6Q】开发板 Linux 5.15.71 SD卡 启动

开发环境

  • win10 64位

  • VMware Workstation Pro 16

  • ubuntu 22.04

-【迅为imx6q】开发板, 2G DDR

  • TF 16G SD卡,用于迅为imx6q SD 卡启动

RTL8211E

  • 通过迅为imx6q 开发板原理图了解到,网卡 PHY 芯片是 RTL8211E,

在这里插入图片描述

  • 在 u-boot 2020.04 上,通过使能 CONFIG_PHY_REALTEK 配置,使能 RTL8211E 网络 PHY 芯片的支持,再配置设备树,增加PHY 复位延时,u-boot 下的网络就正常工作了。

  • 这里有个选项:#define CONFIG_FEC_MXC_PHYADDR 0,也就是 迅为imx6q 开发板上的 RTL8211E 网络 PHY 地址是 0。

适配方法

一、Linux 上开启 REALTEK

  • 使用 menuconfig 图形配置,使能 [*] Realtek devices

在这里插入图片描述

.config - Linux/arm 5.15.71 Kernel Configuration
 > Device Drivers 
 	> Network device support 
 		> Ethernet driver support
 			> [*]   Realtek devices
			<*>     RealTek RTL-8139 C+ PCI Fast Ethernet Adapter support
			<*>     RealTek RTL-8129/8130/8139 PCI Fast Ethernet Adapter support
			[ ]       Use PIO instead of MMIO
			[ ]       Support for uncommon RTL-8139 rev. K (automatic channel equalization)    
			[ ]       Support for older RTL-8129/8130 boards
			[ ]       Use older RX-reset method
			<*>     Realtek 8169/8168/8101/8125 ethernet support
  • RTL8211E 与其他的 PHY 类似,所以可以同时使能其他的PHY 芯片的支持,当前 RTL8211E 还需要在设备树文件中定义一些参数。

二、修改设备树

  • 设备树文件,可以自己复制一份

  • $ cp arch/arm/boot/dts/imx6q-sabresd.dts arch/arm/boot/dts/imx6q-topeet.dts

  • $ cp arch/arm/boot/dts/imx6qdl-sabresd.dtsi arch/arm/boot/dts/imx6qdl-topeet.dtsi

  • 修改 arch/arm/boot/dts/Makefile,增加 生成 imx6q-topeet.dtb

  • 修改 arch/arm/boot/dts/imx6qdl-topeet.dtsi ,改动点有两处:

    • (1)是 reg = <0>;,因为 迅为imx6q 开发板 PHY 地址是 0
    • (2)增加PHY 复位的延时 reset-assert-us = <10000>;reset-deassert-us = <150000>;
&fec {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_enet>;
	phy-mode = "rgmii-id";
	phy-handle = <&phy>;
	fsl,magic-packet;
	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		phy: ethernet-phy@0 {
			reg = <0>;
			qca,clk-out-frequency = <125000000>;
			reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
			reset-assert-us = <10000>;
			reset-deassert-us = <150000>;
		};
	};
};

在这里插入图片描述

调试经验

  • 开始只改了 PHY 支持与 增加 PHY 芯片的复位时间,发现工作不正常,提示信息如下
[    1.826654] mdio_bus 2188000.ethernet-1: MDIO device at address 1 is missing.
[    1.834410] fec 2188000.ethernet eth0: registered PHC device 0
  • mdio_bus 2188000.ethernet-1: MDIO device at address 1 is missing. 这个信息不能忽略,通过搜索Linux 内核代码,找到了这个信息的位置,初步认为是 PHY 地址有问题,通过增加LOG继续排查,发现从设备树读取的PHY 地址是 1,而 u-boot 下 PHY 地址设置的是 0。

在这里插入图片描述

  • 文件 drivers/net/mdio/of_mdio.c of_mdiobus_register 函数中
int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
{
	struct device_node *child;
	bool scanphys = false;
	int addr, rc;

	if (!np)
		return mdiobus_register(mdio);

	/* Do not continue if the node is disabled */
	if (!of_device_is_available(np))
		return -ENODEV;

	/* Mask out all PHYs from auto probing.  Instead the PHYs listed in
	 * the device tree are populated after the bus has been registered */
	mdio->phy_mask = ~0;

	device_set_node(&mdio->dev, of_fwnode_handle(np));

	/* Get bus level PHY reset GPIO details */
	mdio->reset_delay_us = DEFAULT_GPIO_RESET_DELAY;
	of_property_read_u32(np, "reset-delay-us", &mdio->reset_delay_us);
	mdio->reset_post_delay_us = 0;
	of_property_read_u32(np, "reset-post-delay-us", &mdio->reset_post_delay_us);

	/* Register the MDIO bus */
	rc = mdiobus_register(mdio);
	if (rc)
		return rc;

	/* Loop over the child nodes and register a phy_device for each phy */
	for_each_available_child_of_node(np, child) {
		addr = of_mdio_parse_addr(&mdio->dev, child);       /* #### 这里地址加了LOG,读取为 1  */
		if (addr < 0) {
			scanphys = true;
			continue;
		}

		if (of_mdiobus_child_is_phy(child))
			rc = of_mdiobus_register_phy(mdio, child, addr);
		else
			rc = of_mdiobus_register_device(mdio, child, addr);

		if (rc == -ENODEV)    /* #### 这里应该是没有找到设备  */
			dev_err(&mdio->dev,
				"MDIO device at address %d is missing.\n",
				addr);
		else if (rc)
			goto unregister;
	}
  • 解决方法就是修改设备树,把 reg = <1>; 改为 reg = <0>;

其他修改

  • 开发板的默认配置,编译烧写到 SD卡后,发现不断提示 触摸屏 读取错误,应该是触摸屏芯片驱动不匹配造成的,可以关闭触摸屏,后续在适配LCD 时一起适配好

在这里插入图片描述

烧写运行

  • 这里使用 SD 卡启动,编译生成的产物为 :
arch/arm/boot/zImage
arch/arm/boot/dts/imx6q-topeet.dtb
  • 烧写的方法,参考前面 文章 【迅为iMX6Q】开发板 Linux 5.15.71 SD卡 启动,其实就是复制到 SD 卡的 某个分区,然后设置 u-boot bootcmd,加载 内核 zImage 与 设备树 dtb 文件,然后 bootz 启动
/* 设置  bootargs,注意根文件系统 放置的分区, mmcblk1p3, blk1 表示 sd 卡设备号 1, 3代表 第三个分区 */
setenv bootargs 'console=ttymxc0,115200 root=/dev/mmcblk1p3 rootwait rw'

/* 设置  bootcmd ,注意linux zImage 与 设备树 dtb 存放的分区 mmc 1:1  */
setenv bootcmd 'ext4load mmc 1:1 0x18000000 imx6q-topeet.dtb; ext4load mmc 1:1  0x12000000 zImage; bootz 0x12000000 - 0x18000000'

/* 保存 env */
saveenv

/* 重启 */
reset

运行信息

U-Boot 2022.04-gd80220a2ff-dirty (Jan 08 2023 - 17:51:15 +0800)

CPU:   i.MX6Q rev1.3 996 MHz (running at 792 MHz)
CPU:   Extended Commercial temperature grade (-20C to 105C) at 19C
Reset cause: POR
Model: i.MX6 Quad Topeet Smart Device Board
DRAM:  2 GiB
Core:  81 devices, 20 uclasses, devicetree: separate
MMC:   FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 3
Loading Environment from MMC... OK
No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
switch to partitions #0, OK
mmc1 is current device
flash target is MMC:1
Net:   eth0: ethernet@2188000 [PRIME]
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0
53442 bytes read in 5 ms (10.2 MiB/s)
9496680 bytes read in 458 ms (19.8 MiB/s)
Kernel image @ 0x12000000 [ 0x000000 - 0x90e868 ]
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
   Using Device Tree in place at 18000000, end 180100c1

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.15.71-g7a2936559146 (zhangsz@zhangsz-virtual-machine) (arm-none-linux-gnueabihf-gcc (GNU Toolchain for                                                                      the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU Toolchain for the A-profile Architecture 9.2-2019.12                                                                      (arm-9.10)) 2.33.1.20191209) #1 SMP PREEMPT Wed Jan 11 00:17:17 CST 2023
[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Freescale i.MX6 Quad Topeet Smart Device Board
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Reserved memory: created CMA memory pool at 0x6c000000, size 320 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000010000000-0x000000007fffffff]
[    0.000000]   HighMem  [mem 0x0000000080000000-0x000000008fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000010000000-0x000000008fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000010000000-0x000000008fffffff]
[    0.000000] percpu: Embedded 12 pages/cpu s17164 r8192 d23796 u49152
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 520256
[    0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk1p3 rootwait rw
[    0.000000] Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1728212K/2097152K available (12288K kernel code, 1337K rwdata, 4408K rodata, 1024K init, 433K bss, 41260K rese                                                                     rved, 327680K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C-310 errata 752271 769419 enabled
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 16 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 1024 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x76470001
[    0.000000] Switching to timer-based delay loop, resolution 333ns
[    0.000001] sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 715827882841ns
[    0.000032] clocksource: mxc_timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 637086815595 ns
[    0.001616] Console: colour dummy device 80x30
[    0.001667] Calibrating delay loop (skipped), value calculated using timer frequency.. 6.00 BogoMIPS (lpj=30000)
[    0.001689] pid_max: default: 32768 minimum: 301
[    0.001932] Mount-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.001972] Mountpoint-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.002785] CPU: Testing write buffer coherency: ok
[    0.002837] CPU0: Spectre v2: using BPIALL workaround
[    0.003104] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004164] Setting up static identity map for 0x10100000 - 0x10100060
[    0.004340] rcu: Hierarchical SRCU implementation.
[    0.004975] smp: Bringing up secondary CPUs ...
[    0.005799] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.005814] CPU1: Spectre v2: using BPIALL workaround
[    0.006710] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.006726] CPU2: Spectre v2: using BPIALL workaround
[    0.007601] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.007615] CPU3: Spectre v2: using BPIALL workaround
[    0.007734] smp: Brought up 1 node, 4 CPUs
[    0.007753] SMP: Total of 4 processors activated (24.00 BogoMIPS).
[    0.007768] CPU: All CPU(s) started in SVC mode.
[    0.008281] devtmpfs: initialized
[    0.017539] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.017785] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.017818] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.037233] pinctrl core: initialized pinctrl subsystem
[    0.039000] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.047678] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.048814] thermal_sys: Registered thermal governor 'step_wise'
[    0.049110] cpuidle: using governor menu
[    0.049319] CPU identified as i.MX6Q, silicon rev 1.5
[    0.067097] vdd3p0: supplied by regulator-dummy
[    0.068582] mxs_phy 20c9000.usbphy: supply phy-3p0 not found, using dummy regulator
[    0.069169] mxs_phy 20ca000.usbphy: supply phy-3p0 not found, using dummy regulator
[    0.080225] platform 21dc000.mipi: Fixing up cyclic dependency with 20e0000.iomuxc-gpr:ipu2_csi1_mux
[    0.080311] platform 21dc000.mipi: Fixing up cyclic dependency with 20e0000.iomuxc-gpr:ipu1_csi0_mux
[    0.081610] platform 2400000.ipu: Fixing up cyclic dependency with ldb
[    0.081699] platform 2400000.ipu: Fixing up cyclic dependency with 21e0000.mipi
[    0.081777] platform 2400000.ipu: Fixing up cyclic dependency with 21dc000.mipi
[    0.081855] platform 2400000.ipu: Fixing up cyclic dependency with 20e0000.iomuxc-gpr:ipu1_csi0_mux
[    0.084060] platform 2800000.ipu: Fixing up cyclic dependency with ldb
[    0.084154] platform 2800000.ipu: Fixing up cyclic dependency with 21e0000.mipi
[    0.084242] platform 2800000.ipu: Fixing up cyclic dependency with 20e0000.iomuxc-gpr:ipu2_csi1_mux
[    0.084322] platform 2800000.ipu: Fixing up cyclic dependency with 21dc000.mipi
[    0.090590] No ATAGs?
[    0.090740] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.090758] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.091747] imx6q-pinctrl 20e0000.pinctrl: initialized IMX pinctrl driver
[    0.094546] imx mu driver is registered.
[    0.095046] imx rpmsg driver is registered.
[    0.109548] Kprobes globally optimized
[    0.128460] vgaarb: loaded
[    0.129356] SCSI subsystem initialized
[    0.129862] usbcore: registered new interface driver usbfs
[    0.129919] usbcore: registered new interface driver hub
[    0.129978] usbcore: registered new device driver usb
[    0.130112] usb_phy_generic usbphynop1: supply vcc not found, using dummy regulator
[    0.130264] usb_phy_generic usbphynop1: dummy supplies not allowed for exclusive requests
[    0.130418] usb_phy_generic usbphynop2: supply vcc not found, using dummy regulator
[    0.130548] usb_phy_generic usbphynop2: dummy supplies not allowed for exclusive requests
[    0.131715] gpio-155 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    0.132827] i2c i2c-0: IMX I2C adapter registered
[    0.133604] gpio-108 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    0.135490] i2c i2c-1: IMX I2C adapter registered
[    0.136150] gpio-3 (scl): enforced open drain please flag it properly in DT/ACPI DSDT/board file
[    0.137286] i2c i2c-2: IMX I2C adapter registered
[    0.138030] mc: Linux media interface: v0.10
[    0.138094] videodev: Linux video capture interface: v2.00
[    0.138193] pps_core: LinuxPPS API ver. 1 registered
[    0.138205] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.138232] PTP clock support registered
[    0.167680] imx-ipuv3 2400000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[    0.197672] imx-ipuv3 2800000.ipu: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
[    0.199295] mxc_vdoa 21e4000.vdoa: i.MX Video Data Order Adapter(VDOA) driver probed
[    0.200047] mxc_mipi_csi2 21dc000.mipi: i.MX MIPI CSI2 driver probed
[    0.200064] mxc_mipi_csi2 21dc000.mipi: i.MX MIPI CSI2 dphy version is 0x3130302a
[    0.200648] MIPI CSI2 driver module loaded
[    0.200701] Advanced Linux Sound Architecture Driver Initialized.
[    0.201916] Bluetooth: Core ver 2.22
[    0.201965] NET: Registered PF_BLUETOOTH protocol family
[    0.201977] Bluetooth: HCI device and connection manager initialized
[    0.201996] Bluetooth: HCI socket layer initialized
[    0.202010] Bluetooth: L2CAP socket layer initialized
[    0.202033] Bluetooth: SCO socket layer initialized
[    0.202619] clocksource: Switched to clocksource mxc_timer1
[    0.202816] VFS: Disk quotas dquot_6.6.0
[    0.202907] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.211547] NET: Registered PF_INET protocol family
[    0.212235] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.214180] tcp_listen_portaddr_hash hash table entries: 1024 (order: 1, 12288 bytes, linear)
[    0.214286] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.214312] TCP established hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.214479] TCP bind hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.214782] TCP: Hash tables configured (established 16384 bind 16384)
[    0.215019] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.215111] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.215372] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.216061] RPC: Registered named UNIX socket transport module.
[    0.216079] RPC: Registered udp transport module.
[    0.216090] RPC: Registered tcp transport module.
[    0.216102] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.217064] PCI: CLS 0 bytes, default 64
[    0.217420] armv7-pmu pmu: hw perfevents: no interrupt-affinity property, guessing.
[    0.217666] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.220269] Bus freq driver module loaded
[    0.221270] Initialise system trusted keyrings
[    0.221607] workingset: timestamp_bits=14 max_order=19 bucket_order=5
[    0.227174] NFS: Registering the id_resolver key type
[    0.227227] Key type id_resolver registered
[    0.227240] Key type id_legacy registered
[    0.227325] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.227340] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.227382] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.227885] fuse: init (API version 7.34)
[    0.327717] Key type asymmetric registered
[    0.327737] Asymmetric key parser 'x509' registered
[    0.327837] bounce: pool size: 64 pages
[    0.327874] io scheduler mq-deadline registered
[    0.327889] io scheduler kyber registered
[    0.333154] pwm-backlight backlight-lvds: supply power not found, using dummy regulator
[    0.337706] mxc_mipi_dsi 21e0000.mipi: i.MX MIPI DSI driver probed
[    0.339639] mxc_hdmi 20e0000.hdmi_video: supply HDMI not found, using dummy regulator
[    0.342171] mxc_sdc_fb fb@0: registered mxc display driver ldb
[    0.372698] imx-ipuv3 2800000.ipu: IPU DMFC DP HIGH RESOLUTION: 1(0,1), 5B(2~5), 5F(6,7)
[    0.440299] Console: switching to colour frame buffer device 128x48
[    0.476818] mxc_hdmi 20e0000.hdmi_video: Detected HDMI controller 0x13:0xa:0xa0:0xc1
[    0.476872] fbcvt: 1920x1080@60: CVT Name - 2.073M9
[    0.476979] mxc_sdc_fb fb@1: registered mxc display driver hdmi
[    0.518247] mxc_sdc_fb fb@2: registered mxc display driver lcd
[    0.518267] mxc_sdc_fb fb@2: ipu0-di0 already in use
[    0.518283] mxc_sdc_fb: probe of fb@2 failed with error -16
[    0.518356] mxc_sdc_fb fb@3: registered mxc display driver ldb
[    0.532659] imx-sdma 20ec000.sdma: Direct firmware load for imx/sdma/sdma-imx6q.bin failed with error -2
[    0.532683] imx-sdma 20ec000.sdma: Falling back to sysfs fallback for: imx/sdma/sdma-imx6q.bin
[    0.534309] mxs-dma 110000.dma-apbh: initialized
[    0.538097] pfuze100-regulator 1-0008: unrecognized pfuze chip ID!
[    0.539734] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 31, base_baud = 5000000) is a IMX
[    1.637288] printk: console [ttymxc0] enabled
[    1.643621] imx sema4 driver is registered.
[    1.662776] brd: module loaded
[    1.673811] loop: module loaded
[    1.678543] ahci-imx 2200000.sata: fsl,transmit-level-mV not specified, using 00000024
[    1.686520] ahci-imx 2200000.sata: fsl,transmit-boost-mdB not specified, using 00000480
[    1.694552] ahci-imx 2200000.sata: fsl,transmit-atten-16ths not specified, using 00002000
[    1.702753] ahci-imx 2200000.sata: fsl,receive-eq-mdB not specified, using 05000000
[    1.710494] ahci-imx 2200000.sata: supply ahci not found, using dummy regulator
[    1.717995] ahci-imx 2200000.sata: supply phy not found, using dummy regulator
[    1.725308] ahci-imx 2200000.sata: supply target not found, using dummy regulator
[    1.737206] ahci-imx 2200000.sata: SSS flag set, parallel bus scan disabled
[    1.744226] ahci-imx 2200000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[    1.753053] ahci-imx 2200000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst
[    1.763911] scsi host0: ahci-imx
[    1.767459] ata1: SATA max UDMA/133 mmio [mem 0x02200000-0x02203fff] port 0x100 irq 85
[    1.775631] imx ahci driver is registered.
[    1.783788] spi-nor spi0.0: found w25q32, expected m25p32
[    1.789215] spi-nor spi0.0: w25q32 (4096 Kbytes)
[    1.797300] tun: Universal TUN/TAP device driver, 1.6
[    1.802547] CAN device driver interface
[    1.808534] pps pps0: new PPS source ptp0
[    2.104117] ata1: SATA link down (SStatus 0 SControl 300)
[    2.109572] ahci-imx 2200000.sata: no device found, disabling link.
[    2.115875] ahci-imx 2200000.sata: pass ahci_imx..hotplug=1 to enable hotplug
[    2.173353] fec 2188000.ethernet eth0: registered PHC device 0
[    2.180413] usbcore: registered new interface driver r8152
[    2.185983] usbcore: registered new interface driver lan78xx
[    2.191688] usbcore: registered new interface driver asix
[    2.197147] usbcore: registered new interface driver ax88179_178a
[    2.203294] usbcore: registered new interface driver cdc_ether
[    2.209187] usbcore: registered new interface driver smsc95xx
[    2.214994] usbcore: registered new interface driver net1080
[    2.220689] usbcore: registered new interface driver cdc_subset
[    2.226661] usbcore: registered new interface driver zaurus
[    2.232269] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    2.239757] usbcore: registered new interface driver cdc_ncm
[    2.245477] usbcore: registered new interface driver r8153_ecm
[    2.251315] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.257863] ehci-pci: EHCI PCI platform driver
[    2.262395] usbcore: registered new interface driver usb-storage
[    2.271673] SPI driver ads7846 has no spi_device_id for ti,tsc2046
[    2.277885] SPI driver ads7846 has no spi_device_id for ti,ads7843
[    2.284097] SPI driver ads7846 has no spi_device_id for ti,ads7845
[    2.290283] SPI driver ads7846 has no spi_device_id for ti,ads7873
[    2.297407] egalax_ts 1-0004: Failed to switch to I2C interface
[    2.303804] egalax_ts 2-0004: Failed to switch to I2C interface
[    2.312957] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
[    2.319080] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:00:00 UTC (0)
[    2.328258] i2c_dev: i2c /dev entries driver
[    2.334558] mxc_v4l2_output v4l2_out: V4L2 device registered as video16
[    2.341313] mxc_v4l2_output v4l2_out: V4L2 device registered as video17
[    2.348102] mxc_v4l2_output v4l2_out: V4L2 device registered as video18
[    2.354881] mxc_v4l2_output v4l2_out: V4L2 device registered as video19
[    2.361638] mxc_v4l2_output v4l2_out: V4L2 device registered as video20
[    2.371509] Bluetooth: HCI UART driver ver 2.3
[    2.375989] Bluetooth: HCI UART protocol H4 registered
[    2.381136] Bluetooth: HCI UART protocol BCSP registered
[    2.386507] Bluetooth: HCI UART protocol LL registered
[    2.391674] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    2.397993] Bluetooth: HCI UART protocol Marvell registered
[    2.403638] usbcore: registered new interface driver btusb
[    2.410187] sdhci: Secure Digital Host Controller Interface driver
[    2.416405] sdhci: Copyright(c) Pierre Ossman
[    2.420766] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.427742] sdhci-esdhc-imx 2194000.mmc: Got CD GPIO
[    2.428089] sdhci-esdhc-imx 2198000.mmc: Got CD GPIO
[    2.429135] usbcore: registered new interface driver usbhid
[    2.429143] usbhid: USB HID core driver
[    2.434548] isl29018 2-0044: No cache defaults, reading back from HW
[    2.437872] sdhci-esdhc-imx 2198000.mmc: Got WP GPIO
[    2.444169] isl29018 2-0044: Failed to read 1: -6
[    2.463263] isl29018 2-0044: regmap initialization fails: -6
[    2.474400] mxc_hdmi_cec soc:hdmi_cec@120000: HDMI CEC initialized
[    2.475178] mmc3: SDHCI controller on 219c000.mmc [219c000.mmc] using ADMA
[    2.483356] mmc1: SDHCI controller on 2194000.mmc [2194000.mmc] using ADMA
[    2.488358] wm8962 0-001a: Failed to read ID register
[    2.499650] mmc2: SDHCI controller on 2198000.mmc [2198000.mmc] using ADMA
[    2.504095] fsl-ssi-dai 202c000.ssi: No cache defaults, reading back from HW
[    2.522717] NET: Registered PF_LLC protocol family
[    2.528099] NET: Registered PF_INET6 protocol family
[    2.528409] mmc1: host does not support reading read-only switch, assuming write-enable
[    2.534250] Segment Routing with IPv6
[    2.544244] mmc1: new high speed SDHC card at address aaaa
[    2.544843] In-situ OAM (IOAM) with IPv6
[    2.551138] mmcblk1: mmc1:aaaa SD32G 29.7 GiB
[    2.554345] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    2.555220] mmc3: new DDR MMC card at address 0001
[    2.559547] mmcblk3: mmc3:0001 AJTD4R 14.6 GiB
[    2.565363] NET: Registered PF_PACKET protocol family
[    2.569869]  mmcblk1: p1 p2 p3 p4
[    2.574047] can: controller area network core
[    2.580693]  mmcblk3: p1 p2
[    2.582586] NET: Registered PF_CAN protocol family
[    2.587707] mmcblk3boot0: mmc3:0001 AJTD4R 4.00 MiB
[    2.589579] can: raw protocol
[    2.596718] mmcblk3boot1: mmc3:0001 AJTD4R 4.00 MiB
[    2.599362] can: broadcast manager protocol
[    2.604303] mmcblk3rpmb: mmc3:0001 AJTD4R 4.00 MiB, chardev (240:0)
[    2.607315] can: netlink gateway - max_hops=1
[    2.622492] Bluetooth: RFCOMM TTY layer initialized
[    2.627437] Bluetooth: RFCOMM socket layer initialized
[    2.632602] Bluetooth: RFCOMM ver 1.11
[    2.636422] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    2.641742] Bluetooth: BNEP filters: protocol multicast
[    2.646996] Bluetooth: BNEP socket layer initialized
[    2.651967] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    2.657908] Bluetooth: HIDP socket layer initialized
[    2.663113] lib80211: common routines for IEEE802.11 drivers
[    2.668872] Key type dns_resolver registered
[    2.674122] Registering SWP/SWPB emulation handler
[    2.679161] Loading compiled-in X.509 certificates
[    2.722526] galcore 130000.gpu: deferred probe timeout, ignoring dependency
[    2.729612] galcore: probe of 130000.gpu failed with error -110
[    2.736190] mxc_vpu 2040000.vpu_fsl: deferred probe timeout, ignoring dependency
[    2.743671] mxc_vpu: probe of 2040000.vpu_fsl failed with error -110
[    2.753749] gpio-keys gpio-keys: failed to get gpio: -16
[    2.759076] gpio-keys: probe of gpio-keys failed with error -16
[    2.765637] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    2.777167] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    2.783836] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    2.792460] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[    2.792945] ALSA device list:
[    2.803205]   #0: imx-hdmi-soc
[    2.836947] EXT4-fs (mmcblk1p3): recovery complete
[    2.842748] EXT4-fs (mmcblk1p3): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[    2.852555] VFS: Mounted root (ext4 filesystem) on device 179:3.
[    2.860124] devtmpfs: mounted
[    2.865714] Freeing unused kernel image (initmem) memory: 1024K
[    2.913101] Run /sbin/init as init process

Please press Enter to activate this console.
/ # ifconfig
/ # ifconfig -a
eth0      Link encap:Ethernet  HWaddr 0E:B4:00:52:24:0E
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          LOOPBACK  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

sit0      Link encap:IPv6-in-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

/ #
/ # ifconfig eth0 192.168.1.1
[   42.633032] RTL8211E Gigabit Ethernet 2188000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=2188000.ethernet-1:00, irq=POLL                                                                     )
/ #
/ # ifconfig
eth0      Link encap:Ethernet  HWaddr 0E:B4:00:52:24:0E
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

/ #

连接路由器

  • 需要通过网线,连接到路由器,或者交叉网线连接到 电脑

  • 设置 网络 参数,网卡设备默认为 eth0,使用 ifconfig 命令配置

ifconfig eth0 down
ifconfig eth0 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.1

在这里插入图片描述

/ # ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 0E:B4:00:52:24:0E
          inet addr:192.168.1.10  Bcast:192.168.1.1  Mask:255.255.255.0
          inet6 addr: fe80::cb4:ff:fe52:240e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:906 (906.0 B)

/ # ifconfig eth0 down
/ # ifconfig eth0 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.1
[ 3114.153029] RTL8211E Gigabit Ethernet 2188000.ethernet-1:00: attached PHY driver (mii_bus:phy_addr=2188000.ethernet-1:00, irq=POLL)
/ # [ 3116.233066] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 3116.240938] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

/ #
/ #
/ # ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=0.423 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=0.217 ms
64 bytes from 192.168.1.1: seq=2 ttl=64 time=0.197 ms
64 bytes from 192.168.1.1: seq=3 ttl=64 time=0.187 ms
64 bytes from 192.168.1.1: seq=4 ttl=64 time=0.189 ms
^C
--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.187/0.242/0.423 ms
/ #
/ #
/ # ifconfig
eth0      Link encap:Ethernet  HWaddr 0E:B4:00:52:24:0E
          inet addr:192.168.1.10  Bcast:192.168.1.1  Mask:255.255.255.0
          inet6 addr: fe80::cb4:ff:fe52:240e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:586 (586.0 B)  TX bytes:2094 (2.0 KiB)
  • 通过以上信息,【迅为iMX6Q】开发板 Linux 5.15.71 RTL8211E 以太网驱动适配 成功了

小结

  • 注意遇到问题,可以通过查看代码,定位到问题,这样更能找到解决问题的方法,如上面找不到设备,最终是 PHY 地址默认不正确导致的。

  • Linux 5.15.71 适配RTL8211E 以太网驱动,还是相对比较的容易,只需要简单的配置一下,修改设备树文件即可。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/156389.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【学习笔记】【Pytorch】三、常用的Transforms

【学习笔记】【Pytorch】三、常用的Transforms学习地址主要内容一、Transforms模块介绍二、transforms.ToTensor类的使用1.使用说明2.代码实现三、transforms.Normalize类的使用1.使用说明2.代码实现四、transforms.Resize类的使用1.使用说明2.代码实现五、transforms.Compose类…

IIC协议初识及OLED写入指令、数据和显示的代码实现

目录 一、IIC协议概述 二、IIC协议起始和终止信号 三、应答信号 四、数据发送的时序 五、OLED写入指令和数据 六、OLED显示一个点的思路 七、OLED显示一个点的代码 八、OLED列地址 九、OLED显示图片 一、IIC协议概述 1、IIC概述 IIC&#xff08;集成电路总线&#…

UI设计师与UE设计师有什么区别?

设计在我们的生活中扮演着重要的角色&#xff0c;但是面对越来越多的专业术语和相近的岗位职责&#xff0c;人们总是困惑&#xff1a;明明是差不多的岗位&#xff0c;为什么要整那么多的词&#xff1f;其实&#xff0c;在它们神似的外表下&#xff0c;潜藏着巨大的差异&#xf…

虹科分享 | 实时操作系统INtime RTOS第7版功能更新介绍

INtime简介 INtime是专为基于PC的嵌入式解决方案而设计的可扩展实时操作系统&#xff0c;功能包括动态控制多个主机上多个节点&#xff08;核心&#xff09;上的进程&#xff0c;以及系统所有节点之间的丰富进程间通信&#xff0c;可应用于多核x86兼容处理器的非对称多处理(AM…

【阶段三】Python机器学习17篇:机器学习项目实战:随机森林回归模型

本篇的思维导图: 项目实战(随机森林回归模型) 项目背景 作为国家的支柱产业,房地产的稳定发展关乎国际民生。近几年,房地产价格飞速上涨,连创新高。在这种情况下研究房价的影响因素,具有重要的理论和现实意义。弄清影响房价的主要经济因素,探究我国房地产投资是…

calc()方法的使用

calc实现css中动态计算 环境 根据元素高度的变化,动态控制padding值 <marquee:name"up index"behavior"scroll"scrolldelay"30"direction"up"v-else-if"item.scrollPocition 3 ? true : false":style"{--positi…

核心乐理---五线谱基础

音符 音符的长度 音符的长度都是相对的定义 一般来说讲全音符设为一拍&#xff0c;但如果将二分音符设为一拍的话&#xff0c;全音符就是两拍 附点音符 可以在音符后跟上一个小点来改变音符的长度&#xff0c;如果一个音符后面跟了n个原点&#xff0c;它的长度就会变为原来的…

【学习记录】阿里云服务器+宝塔

环境&#xff1a;阿里云服务器&#xff0c;linux Centos系统 一、安装宝塔 参考链接&#xff1a;阿里云 ECS 服务器入门使用宝塔安装使用 1、进入云服务器控制台&#xff0c;打开远程连接 2、初次使用&#xff0c;可重置登录密码和连接密码 这是远程连接时需要输入的密码 这…

测试开发基础 | 计算机网络篇(二):物理层与数据链路层

计算机网络知识是自动化测试等技术基础&#xff0c;也是测试面试必考题目。霍格沃兹测试学院特别策划了本系列文章&#xff0c;将带大家一步步夯实计算机网络的基础知识。一、物理层由于物理层知识在互联网软件研发工作中用到的并不多&#xff0c;所以可以仅做一个简单的了解。…

Prompt: No !!!

Prompt is Not Good. Prompt 这个方法实际上并不是很好 Prompt 可以是in-context learning的一种。prompt-based learning has taken NLP by storm!! prompt-based的方法在NLP中引起风暴。但&#xff0c;Prompt-based的方法实际上不太行&#xff1a; 1. Inefficiency: The pro…

基于python的企业编码生成系统 (完整的代码+项目说明)

《企业编码生成系统》程序使用说明 在PyCharm中运行《企业编码生成系统》即可进入如图1所示的系统主界面。在该界面中可以选择要使用功能对应的菜单进行不同的操作。在选择功能菜单时&#xff0c;只需要输入对应的数字即可。 图1 系统主界面 具体的操作步骤如下&#xff1a;…

匿名内部类的理解(java + Android)

是不是有同学跟我一样学了知识&#xff0c;不使用&#xff0c;一段时间就忘了&#xff1f; 今天说说java的匿名内部类这个东西&#xff0c;今天就因为这个东西被程序媛欺负了&#xff0c;我心里难受啊。 匿名内部类的官方说法特别不容易理解&#xff0c;是从"有没有名字…

全网惟一面向软件测试人员的Python基础教程-在Python中如何把列表当成队列来进行使用?

全网惟一面向软件测试人员的Python基础教程 起点&#xff1a;《python软件测试实战宝典》介绍 第一章 为什么软件测试人员要学习Python 第二章 学Python之前要搞懂的道理 第三章 你知道Python代码是怎样运行的吗&#xff1f; 第四章 Python数据类型中有那些故事呢&#xff1f;…

Linux的SOCKET编程详解(转载)

Linux的SOCKET编程详解1. 网络中进程之间如何通信进 程通信的概念最初来源于单机系统。由于每个进程都在自己的地址范围内运行&#xff0c;为保证两个相互通信的进程之间既互不干扰又协调一致工作&#xff0c;操作系统为进程通信提供了相应设施&#xff0c;如UNIX BSD有&#x…

大漠插件最新版7.2302

工具名称:大漠插件最新版7.2302工具简介:/大漠插件v7.2302更新时间2023年1月9日更新内容1. 驱动支持win10(19045)和win11(22621)2. 综合工具增加功能,在定义文字输入框激活时,按下alt会输入最后一次输入的文字/【插件特色】1. 文字识别 领域&#xff0c;目前插件界&#xff0c;…

B. Gardener and the Array(贪心)

传送门题意&#xff1a;给你n个数&#xff0c;问你是否存在不同的两个子区间&#xff0c;使这两个子区间的或结果相同。注&#xff1a;因为数据范围太大&#xff0c;所以每个数都由他的二进制数表示&#xff1a;每一行第一个数m表示有几个二进制数&#xff0c;后面m个数代表2的…

陪诊小程序开发,谁更需要陪诊服务

我们去过医院的都很清楚&#xff0c;医院的看病流程是很繁琐&#xff0c;医院不仅大&#xff0c;科室还划分的又细又多。对于一些在外打拼整天忙的顾不得看病就医的打工人&#xff0c;还有一些跟随子女去异地生活养老就医的老年人&#xff0c;还有一些没人陪伴独居生活的年轻人…

89、【栈与队列】leetcode ——101. 对称二叉树:先序递归与非递归+层次遍历(C++版本)

题目描述 原题链接&#xff1a;101. 对称二叉树 解题思路 一、先序遍历 1、递归 设置两个指针进行遍历对比&#xff0c;分别指向互相对称位置&#xff1a;左子树的左孩子与右子树的右孩子互对称&#xff0c;左子树的右孩子与右子树的左孩子互对称。 每次遍历前先判定对称位…

【源码解析】Springboot整合ElasticSearch客户端的源码解析

Springboot整合ElasticSearch客户端的源码解析 ElasticSearch版本 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-elasticsearch</artifactId><version>2.2.5.RELEASE</version>&…

[蓝桥杯 2022 国 A] 环境治理(C++,Floyd,二分法)

题目描述 LQ 国拥有 nnn 个城市&#xff0c;从 000 到 n−1n - 1n−1 编号&#xff0c;这 nnn 个城市两两之间都有且仅有一条双向道路连接&#xff0c;这意味着任意两个城市之间都是可达的。每条道路都有一个属性 DDD&#xff0c;表示这条道路的灰尘度。当从一个城市 A 前往另…