完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
核心板:okmx6ul-c2,内存nand256m。
内核:linux.3.14.38 配置双网口时,报错如下: ifdown: inte**ce eth0 not configured ifdown: inte**ce eth1 not configured [ 16.598548] fec 20b4000.ethernet eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1) [ 16.648665] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 16.838556] fec 2188000.ethernet eth1: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=20b4000.ethernet:02, irq=-1) [ 16.888678] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready 操作过程如下: 1、修改设备树文件“vi ./arch/arm/boot/dts/imx6ul-14x14-evk-emmc-c2-7-1024x600.dts” 2、修改内容,屏蔽fec1中的mdio: &fec1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet1>; phy-mode = "rmii"; phy-handle = <ðphy0>; status = "okay"; /* mdio { #address-cells = <1>; #size-cells = <0>; ethphy0: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <1>; }; ethphy1: ethernet-phy@2 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <2>; }; }; */ }; 3、在fec2写mdio: &fec2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_enet2>; phy-mode = "rmii"; phy-handle = <ðphy1>; status = "okay"; mdio { #address-cells = <1>; #size-cells = <0>; ethphy0: ethernet-phy@2 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <2>; }; ethphy1: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <1>; }; }; }; 4、修改引脚复用,屏蔽网口2GPIO imx6ul-evk { pinctrl_hog_1: hoggrp-1 { fsl,pins = < MX6UL_PAD_LCD_RESET__WDOG1_WDOG_ANY 0x30b0 MX6UL_PAD_UART1_RTS_B__GPIO1_IO19 0x17059 /* SD1 CD */ MX6UL_PAD_GPIO1_IO05__USDHC1_VSELECT 0x17059 /* SD1 VSELECT */ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x17059 /* SD1 RESET */ MX6UL_PAD_UART1_CTS_B__GPIO1_IO18 0x3008 //MX6UL_PAD_UART2_TX_DATA__GPIO1_IO20 0x3008 //MX6UL_PAD_UART2_RX_DATA__GPIO1_IO21 0x3008 MX6UL_PAD_UART2_CTS_B__GPIO1_IO22 0x3008 MX6UL_PAD_UART2_RTS_B__GPIO1_IO23 0x3008 //MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x3008 //MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x3008 MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x3008 MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x3008 //MX6UL_PAD_UART4_TX_DATA__GPIO1_IO28 0x3008 //MX6UL_PAD_UART4_RX_DATA__GPIO1_IO29 0x3008 //MX6UL_PAD_UART5_TX_DATA__GPIO1_IO30 0x3008 //MX6UL_PAD_UART5_RX_DATA__GPIO1_IO31 0x3008 //MX6UL_PAD_ENET2_RX_DATA1__GPIO2_IO09 0x3008 //MX6UL_PAD_ENET2_RX_EN__GPIO2_IO10 0x3008 //MX6UL_PAD_ENET2_TX_DATA0__GPIO2_IO11 0x3008 //MX6UL_PAD_ENET2_TX_DATA1__GPIO2_IO12 0x3008 //MX6UL_PAD_ENET2_TX_EN__GPIO2_IO13 0x3008 //MX6UL_PAD_ENET2_TX_CLK__GPIO2_IO14 0x3008 //MX6UL_PAD_ENET2_RX_ER__GPIO2_IO15 0x3008 MX6UL_PAD_LCD_DATA16__GPIO3_IO21 0x3008 MX6UL_PAD_LCD_DATA17__GPIO3_IO22 0x3008 5、屏蔽网口1MDIO,使能网口2MDIO pinctrl_enet1: enet1grp { fsl,pins = < //MX6UL_PAD_GPIO1_IO07__ENET1_MDC 0x1b0b0 //MX6UL_PAD_GPIO1_IO06__ENET1_MDIO 0x1b0b0 MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN 0x1b0b0 MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER 0x1b0b0 MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0 MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0 MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN 0x1b0b0 MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0 MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0 MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x4001b031 >; }; pinctrl_enet2: enet2grp { fsl,pins = < MX6UL_PAD_GPIO1_IO07__ENET2_MDC 0x1b0b0 MX6UL_PAD_GPIO1_IO06__ENET2_MDIO 0x1b0b0 MX6UL_PAD_ENET2_RX_EN__ENET2_RX_EN 0x1b0b0 MX6UL_PAD_ENET2_RX_ER__ENET2_RX_ER 0x1b0b0 MX6UL_PAD_ENET2_RX_DATA0__ENET2_RDATA00 0x1b0b0 MX6UL_PAD_ENET2_RX_DATA1__ENET2_RDATA01 0x1b0b0 MX6UL_PAD_ENET2_TX_EN__ENET2_TX_EN 0x1b0b0 MX6UL_PAD_ENET2_TX_DATA0__ENET2_TDATA00 0x1b0b0 MX6UL_PAD_ENET2_TX_DATA1__ENET2_TDATA01 0x1b0b0 MX6UL_PAD_ENET2_TX_CLK__ENET2_REF_CLK2 0x4001b031 6、保存并编译设备树,生成三个dtb文件: root@ubuntu:/home/weitao/Downloads/linux-3.14.38# make dtbs DTC arch/arm/boot/dts/imx6ul-14x14-evk-emmc-c2-7-1024x600.dtb DTC arch/arm/boot/dts/imx6ul-14x14-evk-gpmi-c2-256m-7-1024x600.dtb DTC arch/arm/boot/dts/imx6ul-14x14-evk-gpmi-c2-1g-7-1024x600.dtb 7,将dtb文件,拷贝至目录”G:飞凌linuxOKMX6UL-C2(eMMC&Nand版)用户资料-20190709Linux工具OTGmfgtoolsProfilesLinuxOS Firmwarefileslinuxdtb“ 8,拨码开关8OFF,其他ON,重启核心板,使用mfgtools脚本更新程序 9、运行后,在超级终端中,可看到两个网口,但ping不通 Copyright (C) 2006-2016 Forlinx Embedded Technology Co., Ltd All Rights Reserved www.forlinx.com freescale login: root root@freescale ~$ ifconfig eth0 Link encap:Ethernet HWaddr 3E:FD:B7:B5:59:F6 inet addr:192.168.0.232 Bcast:192.168.0.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) eth1 Link encap:Ethernet HWaddr 6E:D5:70:47:CC:17 inet addr:192.168.1.232 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) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@freescale ~$ 10,若只配置网口1,网口2disable,网口1可正常使用。 11、自制的底板,网口PHYAD与资料的反过来了,自制底板的网口1的PHYAD0=0, PHYAD1=1,网口2PHYAD0=1, PHYAD1=0,的网口部分见附件: 12、PHYAD物理接线的改变,在设备树中分别修改MDIO如下,均不起作用 ethphy0: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <1>; }; ethphy1: ethernet-phy@2 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <2>; }; 或者: ethphy0: ethernet-phy@2 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <2>; }; ethphy1: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <1>; }; 求助:请问,okmx6ul-c2,nand256m,如何配置双网口?在资料”OKMX6UL-C2(eMMC&Nand版)用户资料-20190709“中,未看到相关说明。 |
|
相关推荐
2个回答
|
|
您可以参考6ul-c底板网络硬件设计,烧写6ul-c设备树试试
|
|
|
|
谢谢提醒!烧写了6UL-C的设备树,网口能ping通了。虽然还是提示link is not ready 但是还是ping通了。
以下为debug打印信息 [ 33.613083] fec 20b4000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet:01, irq=-1) [ 33.662870] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 33.853091] fec 2188000.ethernet eth1: Freescale FEC PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=20b4000.ethernet:02, irq=-1) [ 33.902876] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready RTNETLINK answers: File exists done. alsactl: load_state:1625: No soundcards found... Copyright (C) 2006-2016 Forlinx Embedded Technology Co., Ltd All Rights Reserved www.forlinx.com freescale login: [ 38.613111] libphy: 20b4000.ethernet:01 - Link is Up - 100/Full [ 38.619152] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 38.853205] libphy: 20b4000.ethernet:02 - Link is Up - 100/Full [ 38.859244] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready [ 39.142375] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead. |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
533 浏览 0 评论
803 浏览 1 评论
700 浏览 1 评论
1926 浏览 1 评论
3171 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 16:19 , Processed in 0.553551 second(s), Total 42, Slave 36 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号