Jump to content

    

не включается SFP модуль

Добрый день! Не удается запустить SFP модуль, ядро отказывается его включать. Если притянуть TX_DISABLE модуля к земле все работает. Процессор i.MX287, ядро 5.6.2.

DTS:

	ahb@80080000 {
		mac0: ethernet@800f0000 {
			phy-mode = "rmii";
			pinctrl-names = "default";
			pinctrl-0 = <&mac0_pins_a>;
			phy-supply = <&reg_board_3v3>;
			phy-reset-gpios = <&gpio4 13 0>;
			phy-reset-duration = <100>;
			phy-handle = <&ethphy0>;
			managed = "in-band-status";
			status = "okay";
			
			mdio {	
				#address-cells = <1>;
		        #size-cells = <0>;
		
                ethphy0: ethernet-phy@3 {
                    compatible = "ethernet-phy-ieee802.3-c22";
                    reg = <3>;
                    max-speed = <100>;
                };
                
                ethphy1: ethernet-phy@1 {
                    compatible = "ethernet-phy-ieee802.3-c22";
                    reg = <1>;
                    max-speed = <100>;
                    micrel,fiber-mode;
			        sfp = <&fiber>;                    
                };
            };
		};
		
		mac1: ethernet@800f4000 {
			phy-mode = "rmii";
			pinctrl-names = "default";
			pinctrl-0 = <&mac1_pins_a>;
			phy-supply = <&reg_board_3v3>;
			phy-handle = <&ethphy1>;

			status = "okay";			
		};
	};

    fiber: fiber {
        compatible = "sff,sfp";
        i2c-bus = <&i2c0>;
        los-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
        mod-def0-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
        pinctrl-names = "default";
        pinctrl-0 = <&sfp_pins_gpio>;
        tx-disable-gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
        tx-fault-gpios  = <&gpio0 4 GPIO_ACTIVE_HIGH>;
    };

лог ядра:

.
.
[    2.875500] libphy: SFP I2C Bus: probed
[    2.879840] sfp fiber: Host maximum power 1.0W
[    2.888324] libphy: Fixed MDIO Bus: probed
[    3.005492] libphy: fec_enet_mii_bus: probed
[    3.021072] i2c /dev entries driver
.
.
[  200.551606] Micrel KSZ8081 or KSZ8091 800f0000.ethernet-1:03: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=800f0000.ethernet-1:03, irq=POLL)
[  211.842321] Micrel KSZ8041 800f0000.ethernet-1:01: attached PHY driver [Micrel KSZ8041] (mii_bus:phy_addr=800f0000.ethernet-1:01, irq=POLL)

при подключении SFP модуля

[  493.262941] sfp fiber: SM: enter empty:detached:down event tx_clear
[  493.269402] sfp fiber: SM: exit empty:detached:down
[  493.274492] sfp fiber: SM: enter empty:detached:down event insert
[  493.280751] sfp fiber: SM: exit probe:detached:down
[  493.602920] sfp fiber: SM: enter probe:detached:down event timeout
[  493.626051] sfp fiber: module D-Link           DEM-220T         rev C1   sn S9121H3000239    dc 170316
[  493.635527] sfp fiber: SM: exit waitdev:detached:down
[  507.866207] sfp fiber: SM: enter waitdev:detached:down event los_low
[  507.872739] sfp fiber: SM: exit waitdev:detached:down
[  508.803644] fec 800f4000.ethernet eth1: Link is Up - 100Mbps/Half - flow control off

отключение кабеля

[ 2035.134718] sfp fiber: SM: enter waitdev:detached:down event los_high
[ 2035.141430] sfp fiber: SM: exit waitdev:detached:down
[ 2035.587365] fec 800f4000.ethernet eth1: Link is Down

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this