xref: /linux/Documentation/devicetree/bindings/net/sff,sfp.yaml (revision 15be4f7ce5de825d1d940ba1bb8e02d09402e133)
170991f1eSIoana Ciornei# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
270991f1eSIoana Ciornei%YAML 1.2
370991f1eSIoana Ciornei---
43079bfdbSRob Herring$id: http://devicetree.org/schemas/net/sff,sfp.yaml#
53079bfdbSRob Herring$schema: http://devicetree.org/meta-schemas/core.yaml#
670991f1eSIoana Ciornei
770991f1eSIoana Ciorneititle: Small Form Factor (SFF) Committee Small Form-factor Pluggable (SFP)
870991f1eSIoana Ciornei  Transceiver
970991f1eSIoana Ciornei
1070991f1eSIoana Ciorneimaintainers:
1170991f1eSIoana Ciornei  - Russell King <linux@armlinux.org.uk>
1270991f1eSIoana Ciornei
1370991f1eSIoana Ciorneiproperties:
1470991f1eSIoana Ciornei  compatible:
1570991f1eSIoana Ciornei    enum:
1670991f1eSIoana Ciornei      - sff,sfp  # for SFP modules
1770991f1eSIoana Ciornei      - sff,sff  # for soldered down SFF modules
1870991f1eSIoana Ciornei
1970991f1eSIoana Ciornei  i2c-bus:
2070991f1eSIoana Ciornei    $ref: /schemas/types.yaml#/definitions/phandle
2170991f1eSIoana Ciornei    description:
2270991f1eSIoana Ciornei      phandle of an I2C bus controller for the SFP two wire serial
2370991f1eSIoana Ciornei
2470991f1eSIoana Ciornei  maximum-power-milliwatt:
25a272bcb9SRussell King (Oracle)    minimum: 1000
26a272bcb9SRussell King (Oracle)    default: 1000
2770991f1eSIoana Ciornei    description:
2870991f1eSIoana Ciornei      Maximum module power consumption Specifies the maximum power consumption
2970991f1eSIoana Ciornei      allowable by a module in the slot, in milli-Watts. Presently, modules can
3070991f1eSIoana Ciornei      be up to 1W, 1.5W or 2W.
3170991f1eSIoana Ciornei
32*15be4f7cSRob Herring (Arm)  mod-def0-gpios:
3370991f1eSIoana Ciornei    maxItems: 1
3470991f1eSIoana Ciornei    description:
3570991f1eSIoana Ciornei      GPIO phandle and a specifier of the MOD-DEF0 (AKA Mod_ABS) module
3670991f1eSIoana Ciornei      presence input gpio signal, active (module absent) high. Must not be
3770991f1eSIoana Ciornei      present for SFF modules
3870991f1eSIoana Ciornei
39*15be4f7cSRob Herring (Arm)  los-gpios:
4070991f1eSIoana Ciornei    maxItems: 1
4170991f1eSIoana Ciornei    description:
4270991f1eSIoana Ciornei      GPIO phandle and a specifier of the Receiver Loss of Signal Indication
4370991f1eSIoana Ciornei      input gpio signal, active (signal lost) high
4470991f1eSIoana Ciornei
45*15be4f7cSRob Herring (Arm)  tx-fault-gpios:
4670991f1eSIoana Ciornei    maxItems: 1
4770991f1eSIoana Ciornei    description:
4870991f1eSIoana Ciornei      GPIO phandle and a specifier of the Module Transmitter Fault input gpio
4970991f1eSIoana Ciornei      signal, active (fault condition) high
5070991f1eSIoana Ciornei
51*15be4f7cSRob Herring (Arm)  tx-disable-gpios:
5270991f1eSIoana Ciornei    maxItems: 1
5370991f1eSIoana Ciornei    description:
5470991f1eSIoana Ciornei      GPIO phandle and a specifier of the Transmitter Disable output gpio
5570991f1eSIoana Ciornei      signal, active (Tx disable) high
5670991f1eSIoana Ciornei
57*15be4f7cSRob Herring (Arm)  rate-select0-gpios:
5870991f1eSIoana Ciornei    maxItems: 1
5970991f1eSIoana Ciornei    description:
6070991f1eSIoana Ciornei      GPIO phandle and a specifier of the Rx Signaling Rate Select (AKA RS0)
6170991f1eSIoana Ciornei      output gpio signal, low - low Rx rate, high - high Rx rate Must not be
6270991f1eSIoana Ciornei      present for SFF modules
6370991f1eSIoana Ciornei
64*15be4f7cSRob Herring (Arm)  rate-select1-gpios:
6570991f1eSIoana Ciornei    maxItems: 1
6670991f1eSIoana Ciornei    description:
6770991f1eSIoana Ciornei      GPIO phandle and a specifier of the Tx Signaling Rate Select (AKA RS1)
6870991f1eSIoana Ciornei      output gpio signal (SFP+ only), low - low Tx rate, high - high Tx rate. Must
6970991f1eSIoana Ciornei      not be present for SFF modules
7070991f1eSIoana Ciornei
7170991f1eSIoana CiorneiallOf:
7270991f1eSIoana Ciornei  - if:
7370991f1eSIoana Ciornei      properties:
7470991f1eSIoana Ciornei        compatible:
7570991f1eSIoana Ciornei          contains:
7670991f1eSIoana Ciornei            const: sff,sff
7770991f1eSIoana Ciornei    then:
7870991f1eSIoana Ciornei      properties:
7970991f1eSIoana Ciornei        mod-def0-gpios: false
8070991f1eSIoana Ciornei        rate-select0-gpios: false
8170991f1eSIoana Ciornei        rate-select1-gpios: false
8270991f1eSIoana Ciornei
8370991f1eSIoana Ciorneirequired:
8470991f1eSIoana Ciornei  - compatible
8570991f1eSIoana Ciornei  - i2c-bus
8670991f1eSIoana Ciornei
8770991f1eSIoana CiorneiadditionalProperties: false
8870991f1eSIoana Ciornei
8970991f1eSIoana Ciorneiexamples:
9070991f1eSIoana Ciornei  - | # Direct serdes to SFP connection
9170991f1eSIoana Ciornei    #include <dt-bindings/gpio/gpio.h>
9270991f1eSIoana Ciornei
937ff7c992SIoana Ciornei    sfp1: sfp {
9470991f1eSIoana Ciornei      compatible = "sff,sfp";
9570991f1eSIoana Ciornei      i2c-bus = <&sfp_1g_i2c>;
9670991f1eSIoana Ciornei      los-gpios = <&cpm_gpio2 22 GPIO_ACTIVE_HIGH>;
9770991f1eSIoana Ciornei      mod-def0-gpios = <&cpm_gpio2 21 GPIO_ACTIVE_LOW>;
9870991f1eSIoana Ciornei      maximum-power-milliwatt = <1000>;
9970991f1eSIoana Ciornei      pinctrl-names = "default";
10070991f1eSIoana Ciornei      pinctrl-0 = <&cpm_sfp_1g_pins &cps_sfp_1g_pins>;
10170991f1eSIoana Ciornei      tx-disable-gpios = <&cps_gpio1 24 GPIO_ACTIVE_HIGH>;
10270991f1eSIoana Ciornei      tx-fault-gpios = <&cpm_gpio2 19 GPIO_ACTIVE_HIGH>;
10370991f1eSIoana Ciornei    };
10470991f1eSIoana Ciornei
1057ff7c992SIoana Ciornei    ethernet {
10670991f1eSIoana Ciornei      phy-names = "comphy";
10770991f1eSIoana Ciornei      phys = <&cps_comphy5 0>;
1087ff7c992SIoana Ciornei      sfp = <&sfp1>;
10970991f1eSIoana Ciornei    };
11070991f1eSIoana Ciornei
11170991f1eSIoana Ciornei  - | # Serdes to PHY to SFP connection
11270991f1eSIoana Ciornei    #include <dt-bindings/gpio/gpio.h>
11370991f1eSIoana Ciornei    #include <dt-bindings/interrupt-controller/arm-gic.h>
11470991f1eSIoana Ciornei
1157ff7c992SIoana Ciornei    sfp2: sfp {
11670991f1eSIoana Ciornei      compatible = "sff,sfp";
1177ff7c992SIoana Ciornei      i2c-bus = <&sfp_i2c>;
11870991f1eSIoana Ciornei      los-gpios = <&cps_gpio1 28 GPIO_ACTIVE_HIGH>;
11970991f1eSIoana Ciornei      mod-def0-gpios = <&cps_gpio1 27 GPIO_ACTIVE_LOW>;
12070991f1eSIoana Ciornei      pinctrl-names = "default";
12170991f1eSIoana Ciornei      pinctrl-0 = <&cps_sfpp0_pins>;
12270991f1eSIoana Ciornei      tx-disable-gpios = <&cps_gpio1 29 GPIO_ACTIVE_HIGH>;
12370991f1eSIoana Ciornei      tx-fault-gpios = <&cps_gpio1 26 GPIO_ACTIVE_HIGH>;
12470991f1eSIoana Ciornei    };
12570991f1eSIoana Ciornei
12670991f1eSIoana Ciornei    mdio {
12770991f1eSIoana Ciornei      #address-cells = <1>;
12870991f1eSIoana Ciornei      #size-cells = <0>;
12970991f1eSIoana Ciornei
1307ff7c992SIoana Ciornei      phy: ethernet-phy@0 {
13170991f1eSIoana Ciornei        compatible = "ethernet-phy-ieee802.3-c45";
13270991f1eSIoana Ciornei        pinctrl-names = "default";
13370991f1eSIoana Ciornei        pinctrl-0 = <&cpm_phy0_pins &cps_phy0_pins>;
13470991f1eSIoana Ciornei        reg = <0>;
13570991f1eSIoana Ciornei        interrupt = <&cpm_gpio2 18 IRQ_TYPE_EDGE_FALLING>;
1367ff7c992SIoana Ciornei        sfp = <&sfp2>;
13770991f1eSIoana Ciornei      };
13870991f1eSIoana Ciornei    };
13970991f1eSIoana Ciornei
1407ff7c992SIoana Ciornei    ethernet {
1417ff7c992SIoana Ciornei      phy = <&phy>;
14270991f1eSIoana Ciornei      phy-mode = "10gbase-kr";
14370991f1eSIoana Ciornei    };
144