This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Linux/DRA745:如何应用其他以太网 PHY?

Guru**** 2542530 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/605822/linux-dra745-how-to-apply-another-ethernet-phy

器件型号:DRA745

工具/软件:Linux

你好。

我正在尝试在客户电路板上设置另一个汽车千兆位 PHY。
目标板基于 DRA7X_EVM (VAYU 703761-1031)、没有太多差异。

EVM 板具有2个用于 CPSW 的 PHY。
PHY 器件型号为 DP83865DVH (drivers/net/phy/national)。
但实际上使用了通用 PHY 驱动程序(drivers/net/phy/phy_device.c)。

b/w EVM 和目标板之间的差异仅为第二个 PHY、已替换为 Marvell 汽车 PHY。
(连接的焊盘完全相同。 PHY 模式为 RGMII 。)
我已更改了漫威 PHY 的驱动程序。

但是、如何使 DaVinci-MDIO 在器件树中使用 Marvell 汽车 PHY 驱动程序?
是否有任何示例或参考?

dra7.dtsi

MAC:以太网@48484000{
compatible ="ti、dra7-cpsw"、"ti、cpsw";
ti、hwmods ="GMAC";
Clocks =<&GMAC_MAIN_clk>、<&GMAC_RFT_clk_mux>;
clock-names ="Fck"、 "CPT";
cpdma_channels =<8>;
ale_entries =<1024>;
bd_ram_size =<0x2000>;
mac_control =<0x20>;
从器件=<2>;
ACTIVE_SLAVE =<0>;
CPT_CLOCK _MUT =<0x784CFE14>;
CPT_CLOCK _SHIFT =<29>;
reg =<0x48484000 0x1000
0x48485200 0x2E00>;
#address-cells =<1>;
#size-cells =<1>;

//
*不允许门控 cpsw 时钟作为权变措施
*对于勘误表 i877。 使内部时钟保持禁用
*会导致器件开关特性
*随时间推移而降级,并最终无法满足
*数据手册延迟时间/偏差规格。
*/
ti、无空闲;

/*
rx_thresh_pend
* rx_pend
* tx_pend * tx_pend
* misc_pend
*/
中断= 、
、
、
;
范围;
SYSCON =<&SCM_conf>;
状态="禁用";

DaVinci_MDIO:MDIO@48485000{
兼容="ti、cpsw-mdio";
#address-cells =<1>;
#size-cells =<0>;
ti、hwmods ="Davinci_mdio";
bus_freq =<1000000>;
reg =<0x48485000 0x100>;
};

cpsw_emac0:从站@48480200{
//*用 U-Boot 填充*/
mac-address =[ 00 00 00 00 00 00 00 00 ];
};

cpsw_emac1:从器件@48480300{
//*由 U-Boot 填充*/
mac-address =[ 00 00 00 00 00 00 00 ];
};phy_SEL

:cpsw-phy-SEL@4a002554{
compatible ="ti、dra7xx-cpsw-phy-SEL";
reg=<0x4a002554 0x4>;
reg-names ="gmii-SEL";
};
};
(笑声)



在 DTS 文件
中...
&Mac{
status ="确定";
dual_emac;
};

&cpsw_emac0{
phy_id =<&Davinci_mdio>、<2>;
phy-mode ="RGMII";
dual_emac_res_vlan =<1>;
};

&cpsw_emac1{
phy_id =<&Davinci_mdio>、<3>;
phy-mode ="RGMII";
dual_emac_res_vlan =<2>;
};
(笑声) 

此致、

JeHun Kim

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    我已将您的问题转交给内核专家。

    此致、
    Yordan
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好~。

    我很抱歉。
    这是我的错误。

    未设置内核配置 CONFIG_MARVELL_PHY。
    所以、我感到困惑。

    现在、我可以给 Phy 驱动程序添加一个惊叹号。

    此致、
    Jehun