Firefly开源社区

[Android] rk3566 jd4 android 11 ,自己底板使用gmac1 的m0组gpio出现eth0无法使用,如何解决

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361
发表于 2022-10-24 14:35:39     


我的phy 是 100MB,
1|:/ # ifconfig  eth0 up                                                      
ifconfig: ioctl 8914: No such device


[   73.820111] [dhd] CFG80211-ERROR) wl_cfg80211_netdev_notifier_call : wdev null. Do nothing
[   73.820184] rk_gmac-dwmac fe010000.ethernet eth0: Could not attach to PHY
[   73.820194] rk_gmac-dwmac fe010000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)



dts配置如下
rk3568-pinctrl-dtsi 无修改

rk3566-firefly-aiojd4.dtsi
&gmac1 {
    status = "okay";
    phy-mode = "rmii";
    clock_in_out = "input";

    snps,reset-gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
    snps,reset-active-low;
    /* Reset time is 20ms, 100ms for rtl8211f */
    // snps,reset-delays-us = <0 20000 100000>;

    // phy
    snps,reset-delays-us = <0 10000 50000>;

    assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
    assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;

    pinctrl-names = "default";
    pinctrl-0 = <&gmac1m0_miim
             &gmac1m0_tx_bus2
             &gmac1m0_rx_bus2
             &gmac1m0_rgmii_clk
             &gmac1m0_rgmii_bus
             &gmac1m0_clkinout>;

    tx_delay = <0x49>;
    rx_delay = <0x2d>;

    phy-handle = <&rgmii_phy1>;
    // status = "okay";
};



rk3568.dtsi 没修改
    combphy1_usq: phy@fe830000 {
        compatible = "rockchip,rk3568-naneng-combphy";
        reg = <0x0 0xfe830000 0x0 0x100>;
        #phy-cells = <1>;
        clocks = <&pmucru CLK_PCIEPHY1_REF>, <&cru PCLK_PIPEPHY1>,
             <&cru PCLK_PIPE>;
        clock-names = "refclk", "apbclk", "pipe_clk";
        assigned-clocks = <&pmucru CLK_PCIEPHY1_REF>;
        assigned-clock-rates = <100000000>;
        resets = <&cru SRST_P_PIPEPHY1>, <&cru SRST_PIPEPHY1>;
        reset-names = "combphy-apb", "combphy";
        rockchip,pipe-grf = <&pipegrf>;
        rockchip,pipe-phy-grf = <&pipe_phy_grf1>;
        status = "disabled";
    };

    combphy2_psq: phy@fe840000 {
        compatible = "rockchip,rk3568-naneng-combphy";
        reg = <0x0 0xfe840000 0x0 0x100>;
        #phy-cells = <1>;
        clocks = <&pmucru CLK_PCIEPHY2_REF>, <&cru PCLK_PIPEPHY2>,
             <&cru PCLK_PIPE>;
        clock-names = "refclk", "apbclk", "pipe_clk";
        assigned-clocks = <&pmucru CLK_PCIEPHY2_REF>;
        assigned-clock-rates = <100000000>;
        resets = <&cru SRST_P_PIPEPHY2>, <&cru SRST_PIPEPHY2>;
        reset-names = "combphy-apb", "combphy";
        rockchip,pipe-grf = <&pipegrf>;
        rockchip,pipe-phy-grf = <&pipe_phy_grf2>;
        status = "disabled";
    };




回复

使用道具 举报

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361
发表于 2022-10-24 16:53:40     
本帖最后由 zhu944567126 于 2022-10-24 16:55 编辑
abcxyztt 发表于 2022-10-24 16:39
硬件有问题吧,要么看看复用

您好,现在报错这个,dmesg |grep 'stmmac_open'                                                      <
[   16.778718] rk_gmac-dwmac fe010000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
rk3566_firefly_aiojd4:/ $


我的phy是100MB的,我看到的你们默认配置是1000MB,这个怎么搞呢



dmesg  |grep 'gmac'                                                            <
[    0.255032] rk_gmac-dwmac fe010000.ethernet: no regulator found
[    0.255057] rk_gmac-dwmac fe010000.ethernet: clock input or output? (input).
[    0.255068] rk_gmac-dwmac fe010000.ethernet: Can not read property: tx_delay.
[    0.255076] rk_gmac-dwmac fe010000.ethernet: set tx_delay to 0xffffffff
[    0.255084] rk_gmac-dwmac fe010000.ethernet: Can not read property: rx_delay.
[    0.255090] rk_gmac-dwmac fe010000.ethernet: set rx_delay to 0xffffffff
[    0.255101] rk_gmac-dwmac fe010000.ethernet: integrated PHY? (no).
[    0.255142] rk_gmac-dwmac fe010000.ethernet: cannot get clock clk_mac_ref
[    0.255164] rk_gmac-dwmac fe010000.ethernet: clock input from PHY
[    0.260187] rk_gmac-dwmac fe010000.ethernet: init for RMII
[    0.260243] rk_gmac-dwmac fe010000.ethernet: [stmmac_dvr_probe-4362]led_status_value = 0x6940
[    0.260444] rk_gmac-dwmac fe010000.ethernet: User ID: 0x30, Synopsys ID: 0x51
[    0.260461] rk_gmac-dwmac fe010000.ethernet:         DWMAC4/5
[    0.260476] rk_gmac-dwmac fe010000.ethernet: DMA HW capability register supported
[    0.260490] rk_gmac-dwmac fe010000.ethernet: RX Checksum Offload Engine supported
[    0.260502] rk_gmac-dwmac fe010000.ethernet: TX Checksum insertion supported
[    0.260514] rk_gmac-dwmac fe010000.ethernet: Wake-Up On Lan supported
[    0.260556] rk_gmac-dwmac fe010000.ethernet: TSO supported
[    0.260571] rk_gmac-dwmac fe010000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    0.260587] rk_gmac-dwmac fe010000.ethernet: TSO feature enabled
[   17.038656] rk_gmac-dwmac fe010000.ethernet eth0: Could not attach to PHY
[   17.038679] rk_gmac-dwmac fe010000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)


回复

使用道具 举报

51

积分

0

威望

0

贡献

技术小白

积分
51
发表于 2023-5-29 08:50:55     
楼主这个问题解决了嘛,可以指点一下嘛,我也遇到同样的问题了。
回复

使用道具 举报

361

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
361
发表于 2023-5-31 13:53:14     
数据驱动世界 发表于 2023-5-29 08:50
楼主这个问题解决了嘛,可以指点一下嘛,我也遇到同样的问题了。

解决了
回复

使用道具 举报

51

积分

0

威望

0

贡献

技术小白

积分
51
发表于 2023-6-7 20:08:12     
指点一下,是什么问题导致的呢
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表