0056-ramips-add-button-support-and-make-LEDs-known-to-userspace-for-DIR-860L-B1.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 30 Jun 2016 15:18:03 +0200
  3. Subject: ramips: add button support and make LEDs known to userspace for DIR-860L B1
  4. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  5. diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
  6. index 5327d00..5fb28a5 100755
  7. --- a/target/linux/ramips/base-files/etc/board.d/01_leds
  8. +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
  9. @@ -114,6 +114,9 @@ case $board in
  10. esr-9753)
  11. set_wifi_led "rt2800pci-phy0::radio"
  12. ;;
  13. + dir-860l-b1)
  14. + ucidef_set_led_netdev "wan" "wan" "d-link:green:net" "eth0.2"
  15. + ;;
  16. ex2700)
  17. ucidef_set_led_default "power_r" "POWER (red)" "ex2700:red:power" "0"
  18. set_wifi_led "ex2700:green:router"
  19. diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
  20. index 6474ebd..37360a4 100644
  21. --- a/target/linux/ramips/base-files/etc/diag.sh
  22. +++ b/target/linux/ramips/base-files/etc/diag.sh
  23. @@ -54,6 +54,9 @@ get_status_led() {
  24. dir-645)
  25. status_led="d-link:green:wps"
  26. ;;
  27. + dir-860l-b1)
  28. + status_led="d-link:green:power"
  29. + ;;
  30. dap-1350)
  31. status_led="d-link:blue:power"
  32. ;;
  33. diff --git a/target/linux/ramips/dts/DIR-860L-B1.dts b/target/linux/ramips/dts/DIR-860L-B1.dts
  34. index 2582b3d..c0bcc86 100644
  35. --- a/target/linux/ramips/dts/DIR-860L-B1.dts
  36. +++ b/target/linux/ramips/dts/DIR-860L-B1.dts
  37. @@ -124,5 +124,17 @@
  38. #address-cells = <1>;
  39. #size-cells = <0>;
  40. poll-interval = <20>;
  41. +
  42. + reset {
  43. + label = "reset";
  44. + gpios = <&gpio0 7 1>;
  45. + linux,code = <0x198>;
  46. + };
  47. +
  48. + wps {
  49. + label = "wps";
  50. + gpios = <&gpio0 18 1>;
  51. + linux,code = <0x211>;
  52. + };
  53. };
  54. };