你好 Shine Zhang。
配置单网口为RMII模式,遇到下面的问题,请帮忙看看是哪里配置的有问题,谢谢。
cpu是am3352,phy芯片是dp83620,需要配置成百兆的RMII模式,片外晶振提供时钟,硬件配置phy地址位5,我配置的设备树如下:
cpsw_default: cpsw_default [
pinctrl-single,pins = <
/* Slave 1 */
AM33XX_IOPAD(0x90C, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */
AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */
AM33XX_IOPAD(0x914, PIN_OUTPUT | MUX_MODE1) /* mii1_txen.rmii1_txen */
AM33XX_IOPAD(0x924, PIN_OUTPUT | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */
AM33XX_IOPAD(0x928, PIN_OUTPUT | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */
AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_refclk.rmii1_refclk */
AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */
AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */
>;
];
cpsw_sleep: cpsw_sleep [
pinctrl-single,pins = <
/* Slave 1 reset value */
AM33XX_IOPAD(0x90C, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
];
davinci_mdio_default: davinci_mdio_default [
pinctrl-single,pins = <
/* MDIO */
AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
>;
];
davinci_mdio_sleep: davinci_mdio_sleep [
pinctrl-single,pins = <
/* MDIO reset value */
AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
];
&mac [
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
status = "okay";
];
&davinci_mdio [
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
];
&cpsw_emac0 [
phy_id = <&davinci_mdio>, <5>;
phy-mode = "rmii";
];
&phy_sel [
rmii-clock-ext;
];
目前我的单板启动过程中会提示没有找到phy:
[ 1.401063] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[ 1.408472] [drm] Initialized
[ 1.446133] brd: module loaded
[ 1.466036] loop: module loaded
[ 1.475613] libphy: Fixed MDIO Bus: probed
[ 1.556382] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 1.562893] davinci_mdio 4a101000.mdio: no live phy, scanning all
[ 1.569968] davinci_mdio: probe of 4a101000.mdio failed with error -5
[ 1.578211] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property
[ 1.587126] cpsw 4a100000.ethernet: Detected MACID = 98:5d:ad:b6:29:04
[ 1.594314] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.606503] mousedev: PS/2 mouse device common for all mice
[ 1.613590] i2c /dev entries driver
……
[ 8.642974] net eth0: initializing cpsw version 1.12 (0)
[ 8.648628] net eth0: initialized cpsw ale version 1.4
[ 8.654023] net eth0: ALE Table size 1024
[ 8.661486] libphy: PHY 4a101000.mdio:05 not found
[ 8.666535] net eth0: phy "4a101000.mdio:05" not found on slave 0, err -19
[ 8.673760] libphy: PHY not found
[ 8.677344] net eth0: phy "" not found on slave 1, err -19
[ 8.694482] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
烦请帮忙看看是否哪里配置有问题,谢谢。
你好 Shine Zhang。
配置单网口为RMII模式,遇到下面的问题,请帮忙看看是哪里配置的有问题,谢谢。
cpu是am3352,phy芯片是dp83620,需要配置成百兆的RMII模式,片外晶振提供时钟,硬件配置phy地址位5,我配置的设备树如下:
cpsw_default: cpsw_default [
pinctrl-single,pins = <
/* Slave 1 */
AM33XX_IOPAD(0x90C, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_crs.rmii1_crs_dv */
AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxerr.rmii1_rxerr */
AM33XX_IOPAD(0x914, PIN_OUTPUT | MUX_MODE1) /* mii1_txen.rmii1_txen */
AM33XX_IOPAD(0x924, PIN_OUTPUT | MUX_MODE1) /* mii1_txd1.rmii1_txd1 */
AM33XX_IOPAD(0x928, PIN_OUTPUT | MUX_MODE1) /* mii1_txd0.rmii1_txd0 */
AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_refclk.rmii1_refclk */
AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd1.rmii1_rxd1 */
AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE1) /* mii1_rxd0.rmii1_rxd0 */
>;
];
cpsw_sleep: cpsw_sleep [
pinctrl-single,pins = <
/* Slave 1 reset value */
AM33XX_IOPAD(0x90C, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
];
davinci_mdio_default: davinci_mdio_default [
pinctrl-single,pins = <
/* MDIO */
AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
>;
];
davinci_mdio_sleep: davinci_mdio_sleep [
pinctrl-single,pins = <
/* MDIO reset value */
AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
];
&mac [
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
status = "okay";
];
&davinci_mdio [
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
];
&cpsw_emac0 [
phy_id = <&davinci_mdio>, <5>;
phy-mode = "rmii";
];
&phy_sel [
rmii-clock-ext;
];
目前我的单板启动过程中会提示没有找到phy:
[ 1.401063] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
[ 1.408472] [drm] Initialized
[ 1.446133] brd: module loaded
[ 1.466036] loop: module loaded
[ 1.475613] libphy: Fixed MDIO Bus: probed
[ 1.556382] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 1.562893] davinci_mdio 4a101000.mdio: no live phy, scanning all
[ 1.569968] davinci_mdio: probe of 4a101000.mdio failed with error -5
[ 1.578211] cpsw 4a100000.ethernet: No slave[1] phy_id, phy-handle, or fixed-link property
[ 1.587126] cpsw 4a100000.ethernet: Detected MACID = 98:5d:ad:b6:29:04
[ 1.594314] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
[ 1.606503] mousedev: PS/2 mouse device common for all mice
[ 1.613590] i2c /dev entries driver
……
[ 8.642974] net eth0: initializing cpsw version 1.12 (0)
[ 8.648628] net eth0: initialized cpsw ale version 1.4
[ 8.654023] net eth0: ALE Table size 1024
[ 8.661486] libphy: PHY 4a101000.mdio:05 not found
[ 8.666535] net eth0: phy "4a101000.mdio:05" not found on slave 0, err -19
[ 8.673760] libphy: PHY not found
[ 8.677344] net eth0: phy "" not found on slave 1, err -19
[ 8.694482] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
烦请帮忙看看是否哪里配置有问题,谢谢。
举报