Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek...
[sfrench/cifs-2.6.git] / Documentation / devicetree / bindings / net / sff,sfp.txt
1 Small Form Factor (SFF) Committee Small Form-factor Pluggable (SFP)
2 Transceiver
3
4 Required properties:
5
6 - compatible : must be "sff,sfp"
7
8 Optional Properties:
9
10 - i2c-bus : phandle of an I2C bus controller for the SFP two wire serial
11   interface
12
13 - mod-def0-gpios : GPIO phandle and a specifier of the MOD-DEF0 (AKA Mod_ABS)
14   module presence input gpio signal, active (module absent) high
15
16 - los-gpios : GPIO phandle and a specifier of the Receiver Loss of Signal
17   Indication input gpio signal, active (signal lost) high
18
19 - tx-fault-gpios : GPIO phandle and a specifier of the Module Transmitter
20   Fault input gpio signal, active (fault condition) high
21
22 - tx-disable-gpios : GPIO phandle and a specifier of the Transmitter Disable
23   output gpio signal, active (Tx disable) high
24
25 - rate-select0-gpios : GPIO phandle and a specifier of the Rx Signaling Rate
26   Select (AKA RS0) output gpio signal, low: low Rx rate, high: high Rx rate
27
28 - rate-select1-gpios : GPIO phandle and a specifier of the Tx Signaling Rate
29   Select (AKA RS1) output gpio signal (SFP+ only), low: low Tx rate, high:
30   high Tx rate
31
32 Example #1: Direct serdes to SFP connection
33
34 sfp_eth3: sfp-eth3 {
35         compatible = "sff,sfp";
36         i2c-bus = <&sfp_1g_i2c>;
37         los-gpios = <&cpm_gpio2 22 GPIO_ACTIVE_HIGH>;
38         mod-def0-gpios = <&cpm_gpio2 21 GPIO_ACTIVE_LOW>;
39         pinctrl-names = "default";
40         pinctrl-0 = <&cpm_sfp_1g_pins &cps_sfp_1g_pins>;
41         tx-disable-gpios = <&cps_gpio1 24 GPIO_ACTIVE_HIGH>;
42         tx-fault-gpios = <&cpm_gpio2 19 GPIO_ACTIVE_HIGH>;
43 };
44
45 &cps_emac3 {
46         phy-names = "comphy";
47         phys = <&cps_comphy5 0>;
48         sfp = <&sfp_eth3>;
49 };
50
51 Example #2: Serdes to PHY to SFP connection
52
53 sfp_eth0: sfp-eth0 {
54         compatible = "sff,sfp";
55         i2c-bus = <&sfpp0_i2c>;
56         los-gpios = <&cps_gpio1 28 GPIO_ACTIVE_HIGH>;
57         mod-def0-gpios = <&cps_gpio1 27 GPIO_ACTIVE_LOW>;
58         pinctrl-names = "default";
59         pinctrl-0 = <&cps_sfpp0_pins>;
60         tx-disable-gpios = <&cps_gpio1 29 GPIO_ACTIVE_HIGH>;
61         tx-fault-gpios  = <&cps_gpio1 26 GPIO_ACTIVE_HIGH>;
62 };
63
64 p0_phy: ethernet-phy@0 {
65         compatible = "ethernet-phy-ieee802.3-c45";
66         pinctrl-names = "default";
67         pinctrl-0 = <&cpm_phy0_pins &cps_phy0_pins>;
68         reg = <0>;
69         interrupt = <&cpm_gpio2 18 IRQ_TYPE_EDGE_FALLING>;
70         sfp = <&sfp_eth0>;
71 };
72
73 &cpm_eth0 {
74         phy = <&p0_phy>;
75         phy-mode = "10gbase-kr";
76 };