when board_eth_init does it get called for custom board?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

when board_eth_init does it get called for custom board?

ソリューションへジャンプ
1,577件の閲覧回数
yocto_newbee
Contributor I

I am trying to do port KSZ9031 for the custom board. 

During board initialization, I don't see board_eth_init() get called.

Just wonder when does it get called? from the doc I found following. 

Is it due to fail to eth_initialize()? or do I need to force to invoke the function call during custom board initialization?

Please let me know. 

 

vi doc/driver-model/ethernet.rst

.. code-block:: c

        board_init()

                eth_initialize()

                        board_eth_init() / cpu_eth_init()

                                driver_register()

                                        initialize eth_device

                                        eth_register()

                                        initialize eth_device

                                        eth_register()

 

And I have one other q. I realized there are two dtb file has been generated one from uboot and one form kernel. I have been checking the dtb file by loading with fdt command from uboot. but I am not sure am I updating properly or not. Is there way to check it under u-boot command. so far I am able to get following from u-boot, but I don't see mdio info at all. When I check mdio list, it returned "No MDIO bus found" I am not sure why it failed to initialize or does it failed to properly read dtb file. How can I verify this? Please let me know as well.


=> fdt addr 0x3f56cc98
=> fdt print /soc/aips-bus@02100000/ethernet@02188000
ethernet@02188000 {
compatible = "fsl,imx6q-fec";
reg = <0x02188000 0x00004000>;
interrupts-extended = <0x00000001 0x00000000 0x00000076 0x00000004 0x00000001 0x00000000 0x00000077 0x00000004>;
clocks = <0x00000002 0x00000075 0x00000002 0x00000075 0x00000002 0x000000be>;
clock-names = "ipg", "ahb", "ptp";
stop-mode = <0x00000004 0x00000034 0x0000001b>;
fsl,wakeup_irq = <0x00000000>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <0x0000002d>;
phy-mode = "rgmii";
};

 

=> mdio list
No MDIO bus found

 

&fec {
phy-handle = <&ethphy>;
phy-mode = "rgmii";
phy-reset-gpios = GP_ENET_PHY_RESET;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
rxc-skew-ps = <3000>;
rxd0-skew-ps = <0>;
rxd1-skew-ps = <0>;
rxd2-skew-ps = <0>;
rxd3-skew-ps = <0>;
rxdv-skew-ps = <0>;
status = "okay";
txc-skew-ps = <3000>;
txd0-skew-ps = <0>;
txd1-skew-ps = <0>;
txd2-skew-ps = <0>;
txd3-skew-ps = <0>;
txen-skew-ps = <0>;

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

ethphy: ethernet-phy@1 {
interrupts-extended = GPIRQ_ENET_PHY;
};
};
};

 

 

0 件の賞賛
返信
1 解決策
1,516件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @yocto_newbee,

I hope you are doing well.
 
For the first question, please find the below information.
In the document you are referring doc/develop/driver-model/ethernet.rst, it is mentioned that this process is for Legacy network drivers registration. The Ethernet drivers don't need to be implemented this way only.
 
For your other question related to mdio, The "no mdio bus found" error occurs if the ENET_MDIO pads are not configured correctly or PHY is not correctly connected. 
 
I hope this information helps you.
 
Thanks & Regards,
Dhruvit Vasavada

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,555件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport
 
I hope you are doing well
 
For the information related to the porting of KSZ9031 PHY with i.MX, kindly refer to the below document.
 
I hope this information helps you.
 
Thanks & Regards,
Dhruvit Vasavada
0 件の賞賛
返信
1,543件の閲覧回数
yocto_newbee
Contributor I

Yes I was already following these sites. but I still have issue so I started having above Q. 

Could you please help me to understand?

thank you.

0 件の賞賛
返信
1,517件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @yocto_newbee,

I hope you are doing well.
 
For the first question, please find the below information.
In the document you are referring doc/develop/driver-model/ethernet.rst, it is mentioned that this process is for Legacy network drivers registration. The Ethernet drivers don't need to be implemented this way only.
 
For your other question related to mdio, The "no mdio bus found" error occurs if the ENET_MDIO pads are not configured correctly or PHY is not correctly connected. 
 
I hope this information helps you.
 
Thanks & Regards,
Dhruvit Vasavada

0 件の賞賛
返信