414-ARM-dts-armada388-clearfog-add-SFP-module-support.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. From 74fa68669c88f73bceff523cb764297b7d1e132b Mon Sep 17 00:00:00 2001
  2. From: Russell King <rmk+kernel@arm.linux.org.uk>
  3. Date: Tue, 29 Nov 2016 10:13:44 +0000
  4. Subject: ARM: dts: armada388-clearfog: add SFP module support
  5. Add SFP module support for Clearfog using the SFP phylink support.
  6. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  7. ---
  8. arch/arm/boot/dts/armada-388-clearfog.dtsi | 44 ++++++++----------------------
  9. 1 file changed, 11 insertions(+), 33 deletions(-)
  10. --- a/arch/arm/boot/dts/armada-388-clearfog.dtsi
  11. +++ b/arch/arm/boot/dts/armada-388-clearfog.dtsi
  12. @@ -117,6 +117,15 @@
  13. };
  14. };
  15. };
  16. +
  17. + sfp: sfp {
  18. + compatible = "sff,sfp";
  19. + i2c-bus = <&i2c1>;
  20. + los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
  21. + mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
  22. + tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
  23. + tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
  24. + };
  25. };
  26. &eth1 {
  27. @@ -133,13 +142,10 @@
  28. bm,pool-long = <3>;
  29. bm,pool-short = <1>;
  30. buffer-manager = <&bm>;
  31. + managed = "in-band-status";
  32. phy-mode = "sgmii";
  33. + sfp = <&sfp>;
  34. status = "okay";
  35. -
  36. - fixed-link {
  37. - speed = <1000>;
  38. - full-duplex;
  39. - };
  40. };
  41. &i2c0 {
  42. @@ -208,34 +214,6 @@
  43. output-low;
  44. line-name = "m.2 devslp";
  45. };
  46. - sfp_los {
  47. - /* SFP loss of signal */
  48. - gpio-hog;
  49. - gpios = <12 GPIO_ACTIVE_HIGH>;
  50. - input;
  51. - line-name = "sfp-los";
  52. - };
  53. - sfp_tx_fault {
  54. - /* SFP laser fault */
  55. - gpio-hog;
  56. - gpios = <13 GPIO_ACTIVE_HIGH>;
  57. - input;
  58. - line-name = "sfp-tx-fault";
  59. - };
  60. - sfp_tx_disable {
  61. - /* SFP transmit disable */
  62. - gpio-hog;
  63. - gpios = <14 GPIO_ACTIVE_HIGH>;
  64. - output-low;
  65. - line-name = "sfp-tx-disable";
  66. - };
  67. - sfp_mod_def0 {
  68. - /* SFP module present */
  69. - gpio-hog;
  70. - gpios = <15 GPIO_ACTIVE_LOW>;
  71. - input;
  72. - line-name = "sfp-mod-def0";
  73. - };
  74. };
  75. /* The MCP3021 supports standard and fast modes */