Small Form Factor (SFF) Committee Small Form-factor Pluggable (SFP) Transceiver

Schema identifier ($id): "http://devicetree.org/schemas/net/sff,sfp.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Russell King <linux@armlinux.org.uk>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "sff,sfp", "sff,sff"

i2c-bus — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

phandle of an I2C bus controller for the SFP two wire serial

maximum-power-milliwatt — not listed as required here #

Minimum value (minimum): 1000

Default value (default): 1000

Maximum module power consumption Specifies the maximum power consumption allowable by a module in the slot, in milli-Watts. Presently, modules can be up to 1W, 1.5W or 2W.

mod-def0-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO phandle and a specifier of the MOD-DEF0 (AKA Mod_ABS) module presence input gpio signal, active (module absent) high. Must not be present for SFF modules

los-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO phandle and a specifier of the Receiver Loss of Signal Indication input gpio signal, active (signal lost) high

tx-fault-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO phandle and a specifier of the Module Transmitter Fault input gpio signal, active (fault condition) high

tx-disable-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO phandle and a specifier of the Transmitter Disable output gpio signal, active (Tx disable) high

rate-select0-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO phandle and a specifier of the Rx Signaling Rate Select (AKA RS0) output gpio signal, low - low Rx rate, high - high Rx rate Must not be present for SFF modules

rate-select1-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO phandle and a specifier of the Tx Signaling Rate Select (AKA RS1) output gpio signal (SFP+ only), low - low Tx rate, high - high Tx rate. Must not be present for SFF modules

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Exact value (const): "sff,sff"

When the condition matches (then) #

Properties and child nodes (properties)

mod-def0-gpios — not listed as required here

false — Not permitted by this property rule.

rate-select0-gpios — not listed as required here

false — Not permitted by this property rule.

rate-select1-gpios — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "compatible", "i2c-bus"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>

sfp1: sfp {
  compatible = "sff,sfp";
  i2c-bus = <&sfp_1g_i2c>;
  los-gpios = <&cpm_gpio2 22 GPIO_ACTIVE_HIGH>;
  mod-def0-gpios = <&cpm_gpio2 21 GPIO_ACTIVE_LOW>;
  maximum-power-milliwatt = <1000>;
  pinctrl-names = "default";
  pinctrl-0 = <&cpm_sfp_1g_pins &cps_sfp_1g_pins>;
  tx-disable-gpios = <&cps_gpio1 24 GPIO_ACTIVE_HIGH>;
  tx-fault-gpios = <&cpm_gpio2 19 GPIO_ACTIVE_HIGH>;
};

ethernet {
  phy-names = "comphy";
  phys = <&cps_comphy5 0>;
  sfp = <&sfp1>;
};
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

sfp2: sfp {
  compatible = "sff,sfp";
  i2c-bus = <&sfp_i2c>;
  los-gpios = <&cps_gpio1 28 GPIO_ACTIVE_HIGH>;
  mod-def0-gpios = <&cps_gpio1 27 GPIO_ACTIVE_LOW>;
  pinctrl-names = "default";
  pinctrl-0 = <&cps_sfpp0_pins>;
  tx-disable-gpios = <&cps_gpio1 29 GPIO_ACTIVE_HIGH>;
  tx-fault-gpios = <&cps_gpio1 26 GPIO_ACTIVE_HIGH>;
};

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

  phy: ethernet-phy@0 {
    compatible = "ethernet-phy-ieee802.3-c45";
    pinctrl-names = "default";
    pinctrl-0 = <&cpm_phy0_pins &cps_phy0_pins>;
    reg = <0>;
    interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
    sfp = <&sfp2>;
  };
};

ethernet {
  phy = <&phy>;
  phy-mode = "10gbase-kr";
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Line 16: for SFP modules

Line 17: for soldered down SFF modules

Edit this page