Bpi-R3 access ssh sfp gpon onu without plugging fiber

Hy :slight_smile:

I use a sfp gpon onu brand fs. I can access by ssh into the module sfp. But i need to plug fiber with signal.

I would like to access without beeing obliged to plug fiber.

I began by modifying the DTS :

sfp1: sfp-1 {
compatible = "sff,sfp";
i2c-bus = <&i2c_sfp1>;
los-gpios = <&pio 46 GPIO_ACTIVE_HIGH>;
mod-def0-gpios = <&pio 49 GPIO_ACTIVE_LOW>;
tx-disable-gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
    maximum-power-milliwatt = <3000>;
};

los-gpios = <&pio 46 GPIO_ACTIVE_HIGH> ====> <&pio 46 GPIO_ACTIVE_LOW>

It works. But when i plug the fiber, i lost the connexion ssh.

Is it possible to bypass or block the los gpios to low? Or any ideas :slight_smile:

you could add an dt overlay which you can load when config is needed without fiber connected and leave it when not

1 Like

Choose a gpio pin on the gpio header and set/clear it with a jumper …

1 Like

Hy. Thank you to answer me :slight_smile:

I think the problem will stay. if i keep the original number gpio, when i insert a fiber with signal, the state of the gpio change.

Hy, i tried to select a pin from the gpio header for each And change the pin in the DTS. but no jumper on the header. For example : los-gpios = <&pio 8 GPIO_ACTIVE_LOW> .

Sometine, the sfp lan works but not the sfp wan. Another time, it’s the sfp wan it works and not the sfp lan. I will try with all free pins :slight_smile:

Yes that is the purpose of the los gpio,it indicates loss of signal…if there is a los signal the interface goes down.

So los needs to be off to get interface itself working.

i change the pin for the gpio los :

 	sfp1: sfp-1 {
  		compatible = "sff,sfp";
  		i2c-bus = <&i2c_sfp1>;
 -		los-gpios = <&pio 46 GPIO_ACTIVE_HIGH>;
 +		los-gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
  		mod-def0-gpios = <&pio 49 GPIO_ACTIVE_LOW>;
  		tx-disable-gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
  		tx-fault-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
 @@ -126,7 +126,7 @@
  	sfp2: sfp-2 {
  		compatible = "sff,sfp";
  		i2c-bus = <&i2c_sfp2>;
 -		los-gpios = <&pio 31 GPIO_ACTIVE_HIGH>;
 +		los-gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
  		mod-def0-gpios = <&pio 47 GPIO_ACTIVE_LOW>;
  		tx-disable-gpios = <&pio 15 GPIO_ACTIVE_HIGH>;
  		tx-fault-gpios = <&pio 48 GPIO_ACTIVE_HIGH>;

It seems to work. I continue to test and see in the long term

have you tried simply disable the los-gpios (commenting out via //)? or adding a quirk for ignoring the los gpio…but then of course the tx is always enabled which is not the best way…but mapping los-gpio to another gpio not associated with the sfp results in same wrong behaviour

1 Like

Hy. I tried to comment the los gpios line, but it wasn’t good :frowning:

I change to use gpio pin free i won’t use and it works.

I will see in long term if everything go on working.

Thank you again