brintos

brintos / linux-shallow public Read only

0
0
Text · 3.9 KiB · 90611b5 Raw
144 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/net/sff,sfp.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Small Form Factor (SFF) Committee Small Form-factor Pluggable (SFP)8  Transceiver9 10maintainers:11  - Russell King <linux@armlinux.org.uk>12 13properties:14  compatible:15    enum:16      - sff,sfp  # for SFP modules17      - sff,sff  # for soldered down SFF modules18 19  i2c-bus:20    $ref: /schemas/types.yaml#/definitions/phandle21    description:22      phandle of an I2C bus controller for the SFP two wire serial23 24  maximum-power-milliwatt:25    minimum: 100026    default: 100027    description:28      Maximum module power consumption Specifies the maximum power consumption29      allowable by a module in the slot, in milli-Watts. Presently, modules can30      be up to 1W, 1.5W or 2W.31 32  mod-def0-gpios:33    maxItems: 134    description:35      GPIO phandle and a specifier of the MOD-DEF0 (AKA Mod_ABS) module36      presence input gpio signal, active (module absent) high. Must not be37      present for SFF modules38 39  los-gpios:40    maxItems: 141    description:42      GPIO phandle and a specifier of the Receiver Loss of Signal Indication43      input gpio signal, active (signal lost) high44 45  tx-fault-gpios:46    maxItems: 147    description:48      GPIO phandle and a specifier of the Module Transmitter Fault input gpio49      signal, active (fault condition) high50 51  tx-disable-gpios:52    maxItems: 153    description:54      GPIO phandle and a specifier of the Transmitter Disable output gpio55      signal, active (Tx disable) high56 57  rate-select0-gpios:58    maxItems: 159    description:60      GPIO phandle and a specifier of the Rx Signaling Rate Select (AKA RS0)61      output gpio signal, low - low Rx rate, high - high Rx rate Must not be62      present for SFF modules63 64  rate-select1-gpios:65    maxItems: 166    description:67      GPIO phandle and a specifier of the Tx Signaling Rate Select (AKA RS1)68      output gpio signal (SFP+ only), low - low Tx rate, high - high Tx rate. Must69      not be present for SFF modules70 71allOf:72  - if:73      properties:74        compatible:75          contains:76            const: sff,sff77    then:78      properties:79        mod-def0-gpios: false80        rate-select0-gpios: false81        rate-select1-gpios: false82 83required:84  - compatible85  - i2c-bus86 87additionalProperties: false88 89examples:90  - | # Direct serdes to SFP connection91    #include <dt-bindings/gpio/gpio.h>92 93    sfp1: sfp {94      compatible = "sff,sfp";95      i2c-bus = <&sfp_1g_i2c>;96      los-gpios = <&cpm_gpio2 22 GPIO_ACTIVE_HIGH>;97      mod-def0-gpios = <&cpm_gpio2 21 GPIO_ACTIVE_LOW>;98      maximum-power-milliwatt = <1000>;99      pinctrl-names = "default";100      pinctrl-0 = <&cpm_sfp_1g_pins &cps_sfp_1g_pins>;101      tx-disable-gpios = <&cps_gpio1 24 GPIO_ACTIVE_HIGH>;102      tx-fault-gpios = <&cpm_gpio2 19 GPIO_ACTIVE_HIGH>;103    };104 105    ethernet {106      phy-names = "comphy";107      phys = <&cps_comphy5 0>;108      sfp = <&sfp1>;109    };110 111  - | # Serdes to PHY to SFP connection112    #include <dt-bindings/gpio/gpio.h>113    #include <dt-bindings/interrupt-controller/arm-gic.h>114 115    sfp2: sfp {116      compatible = "sff,sfp";117      i2c-bus = <&sfp_i2c>;118      los-gpios = <&cps_gpio1 28 GPIO_ACTIVE_HIGH>;119      mod-def0-gpios = <&cps_gpio1 27 GPIO_ACTIVE_LOW>;120      pinctrl-names = "default";121      pinctrl-0 = <&cps_sfpp0_pins>;122      tx-disable-gpios = <&cps_gpio1 29 GPIO_ACTIVE_HIGH>;123      tx-fault-gpios = <&cps_gpio1 26 GPIO_ACTIVE_HIGH>;124    };125 126    mdio {127      #address-cells = <1>;128      #size-cells = <0>;129 130      phy: ethernet-phy@0 {131        compatible = "ethernet-phy-ieee802.3-c45";132        pinctrl-names = "default";133        pinctrl-0 = <&cpm_phy0_pins &cps_phy0_pins>;134        reg = <0>;135        interrupt = <&cpm_gpio2 18 IRQ_TYPE_EDGE_FALLING>;136        sfp = <&sfp2>;137      };138    };139 140    ethernet {141      phy = <&phy>;142      phy-mode = "10gbase-kr";143    };144