Device tree entry for Ethernet PHY interrupt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Device tree entry for Ethernet PHY interrupt

6,578 Views
rajeshtripathi
Contributor I

P2020 processor is connected to three Ethernet PHYs as

eTSEC1 - mii

eTSEC2 - sgmii

eTSEC3 - sgmii

The interrupts lines from all three PHYs are connected to IRQ[6] of P2020.

What should be the entry for PHY interrupts in device tree?

This setup is not working

mdio@520 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,gianfar-mdio";
reg = <0x520 0x20>;

phy0: ethernet-phy@0 {
interrupt-parent = <&mpic>;
interrupts = <6 1>;
compatible = "intel,lxt971";
reg = <0x0>;
};

phy2: ethernet-phy@2 {
device_type = "ethernet-phy";
interrupt-parent = <&mpic>;
interrupts = <6 1>;
reg = <0x2>;
};

phy3: ethernet-phy@3 {
device_type = "ethernet-phy";
interrupt-parent = <&mpic>;
interrupts = <6 1>;
reg = <0x3>;
};
Labels (1)
0 Kudos
5 Replies

2,883 Views
JasonWang_TW
NXP Employee
NXP Employee

looks like your setting for PHY interrupt as 6 is correct . Does your ethernet work in uboot ? is any log of the errors ?

0 Kudos

2,883 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to arch/powerpc/boot/dts/p2020ds.dtsi

mdio@24520 {

|           phy0: ethernet-phy@0 {

|               interrupts = <3 1 0 0>;

|               reg = <0x0>;

|           };

|           phy1: ethernet-phy@1 {

|               interrupts = <3 1 0 0>;

|               reg = <0x1>;

|           };

|           phy2: ethernet-phy@2 {

|               interrupts = <3 1 0 0>;

|               reg = <0x2>;

|           };

|

|           sgmii_phy1: sgmii-phy@1 {

|               interrupts = <5 1 0 0>;

|               reg = <0x1c>;

|           };

|           sgmii_phy2: sgmii-phy@2 {

|               interrupts = <5 1 0 0>;

|               reg = <0x1d>;

|           };

|

|           tbi0: tbi-phy@11 {

|               reg = <0x11>;

|               device_type = "tbi-phy";

|           };

|

|       };

0 Kudos

2,883 Views
rajeshtripathi
Contributor I

Thanks for your reply. I've already read that documentation. My question is what interrupt number should be used for IRQ[6] ? Should it be 6 or some other number.

0 Kudos

2,883 Views
lunminliang
NXP Employee
NXP Employee

Related description can be found in kernel directory hierarchy:

Documentation/devicetree/bindings/net/fsl-tsec-phy.txt

Documentation/devicetree/bindings/net/phy.txt

0 Kudos

2,883 Views
rajeshtripathi
Contributor I

Thanks for your reply. I've already read that documentation. My question is what interrupt number should be used for IRQ[6] ? Should it be 6 or some other number.

0 Kudos