xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/net/sff,sfp.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSmall Form Factor (SFF) Committee Small Form-factor Pluggable (SFP)
2*4882a593SmuzhiyunTransceiver
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunRequired properties:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun- compatible : must be one of
7*4882a593Smuzhiyun  "sff,sfp" for SFP modules
8*4882a593Smuzhiyun  "sff,sff" for soldered down SFF modules
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun- i2c-bus : phandle of an I2C bus controller for the SFP two wire serial
11*4882a593Smuzhiyun  interface
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunOptional Properties:
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun- mod-def0-gpios : GPIO phandle and a specifier of the MOD-DEF0 (AKA Mod_ABS)
16*4882a593Smuzhiyun  module presence input gpio signal, active (module absent) high. Must
17*4882a593Smuzhiyun  not be present for SFF modules
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun- los-gpios : GPIO phandle and a specifier of the Receiver Loss of Signal
20*4882a593Smuzhiyun  Indication input gpio signal, active (signal lost) high
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun- tx-fault-gpios : GPIO phandle and a specifier of the Module Transmitter
23*4882a593Smuzhiyun  Fault input gpio signal, active (fault condition) high
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun- tx-disable-gpios : GPIO phandle and a specifier of the Transmitter Disable
26*4882a593Smuzhiyun  output gpio signal, active (Tx disable) high
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun- rate-select0-gpios : GPIO phandle and a specifier of the Rx Signaling Rate
29*4882a593Smuzhiyun  Select (AKA RS0) output gpio signal, low: low Rx rate, high: high Rx rate
30*4882a593Smuzhiyun  Must not be present for SFF modules
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun- rate-select1-gpios : GPIO phandle and a specifier of the Tx Signaling Rate
33*4882a593Smuzhiyun  Select (AKA RS1) output gpio signal (SFP+ only), low: low Tx rate, high:
34*4882a593Smuzhiyun  high Tx rate. Must not be present for SFF modules
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun- maximum-power-milliwatt : Maximum module power consumption
37*4882a593Smuzhiyun  Specifies the maximum power consumption allowable by a module in the
38*4882a593Smuzhiyun  slot, in milli-Watts.  Presently, modules can be up to 1W, 1.5W or 2W.
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunExample #1: Direct serdes to SFP connection
41*4882a593Smuzhiyun
42*4882a593Smuzhiyunsfp_eth3: sfp-eth3 {
43*4882a593Smuzhiyun	compatible = "sff,sfp";
44*4882a593Smuzhiyun	i2c-bus = <&sfp_1g_i2c>;
45*4882a593Smuzhiyun	los-gpios = <&cpm_gpio2 22 GPIO_ACTIVE_HIGH>;
46*4882a593Smuzhiyun	mod-def0-gpios = <&cpm_gpio2 21 GPIO_ACTIVE_LOW>;
47*4882a593Smuzhiyun	maximum-power-milliwatt = <1000>;
48*4882a593Smuzhiyun	pinctrl-names = "default";
49*4882a593Smuzhiyun	pinctrl-0 = <&cpm_sfp_1g_pins &cps_sfp_1g_pins>;
50*4882a593Smuzhiyun	tx-disable-gpios = <&cps_gpio1 24 GPIO_ACTIVE_HIGH>;
51*4882a593Smuzhiyun	tx-fault-gpios = <&cpm_gpio2 19 GPIO_ACTIVE_HIGH>;
52*4882a593Smuzhiyun};
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun&cps_emac3 {
55*4882a593Smuzhiyun	phy-names = "comphy";
56*4882a593Smuzhiyun	phys = <&cps_comphy5 0>;
57*4882a593Smuzhiyun	sfp = <&sfp_eth3>;
58*4882a593Smuzhiyun};
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunExample #2: Serdes to PHY to SFP connection
61*4882a593Smuzhiyun
62*4882a593Smuzhiyunsfp_eth0: sfp-eth0 {
63*4882a593Smuzhiyun	compatible = "sff,sfp";
64*4882a593Smuzhiyun	i2c-bus = <&sfpp0_i2c>;
65*4882a593Smuzhiyun	los-gpios = <&cps_gpio1 28 GPIO_ACTIVE_HIGH>;
66*4882a593Smuzhiyun	mod-def0-gpios = <&cps_gpio1 27 GPIO_ACTIVE_LOW>;
67*4882a593Smuzhiyun	pinctrl-names = "default";
68*4882a593Smuzhiyun	pinctrl-0 = <&cps_sfpp0_pins>;
69*4882a593Smuzhiyun	tx-disable-gpios = <&cps_gpio1 29 GPIO_ACTIVE_HIGH>;
70*4882a593Smuzhiyun	tx-fault-gpios  = <&cps_gpio1 26 GPIO_ACTIVE_HIGH>;
71*4882a593Smuzhiyun};
72*4882a593Smuzhiyun
73*4882a593Smuzhiyunp0_phy: ethernet-phy@0 {
74*4882a593Smuzhiyun	compatible = "ethernet-phy-ieee802.3-c45";
75*4882a593Smuzhiyun	pinctrl-names = "default";
76*4882a593Smuzhiyun	pinctrl-0 = <&cpm_phy0_pins &cps_phy0_pins>;
77*4882a593Smuzhiyun	reg = <0>;
78*4882a593Smuzhiyun	interrupt = <&cpm_gpio2 18 IRQ_TYPE_EDGE_FALLING>;
79*4882a593Smuzhiyun	sfp = <&sfp_eth0>;
80*4882a593Smuzhiyun};
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun&cpm_eth0 {
83*4882a593Smuzhiyun	phy = <&p0_phy>;
84*4882a593Smuzhiyun	phy-mode = "10gbase-kr";
85*4882a593Smuzhiyun};
86