028-arm64-dts-mcbin-singleshot-add-heartbeat-LED.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From da57203dc7fd556fbb3f0ec7d7d7c0b0e893b386 Mon Sep 17 00:00:00 2001
  2. From: Tomasz Maciej Nowak <[email protected]>
  3. Date: Tue, 10 Nov 2020 16:38:31 +0100
  4. Subject: [PATCH] arm64: dts: mcbin-singleshot: add heartbeat LED
  5. With board revision 1.3, SolidRun moved the power LED to the middle of
  6. the board. In old place of power LED a GPIO controllable heartbeat LED
  7. was added. This commit only touches Single Shot variant, since only this
  8. variant is all revision 1.3.
  9. Note:
  10. This is slightly modified patch. Some boards could be placed in an
  11. enclosure, so the LED18 is enabled by default, since that'll be the only
  12. visible indicator that the board is operating.
  13. Reported-by: Alexandra Alth <[email protected]>
  14. Signed-off-by: Tomasz Maciej Nowak <[email protected]>
  15. Signed-off-by: Gregory CLEMENT <[email protected]>
  16. ---
  17. .../marvell/armada-8040-mcbin-singleshot.dts | 22 +++++++++++++++++++
  18. 1 file changed, 22 insertions(+)
  19. --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
  20. +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts
  21. @@ -5,6 +5,8 @@
  22. * Device Tree file for MACCHIATOBin Armada 8040 community board platform
  23. */
  24. +#include <dt-bindings/leds/common.h>
  25. +
  26. #include "armada-8040-mcbin.dtsi"
  27. / {
  28. @@ -12,6 +14,20 @@
  29. compatible = "marvell,armada8040-mcbin-singleshot",
  30. "marvell,armada8040-mcbin", "marvell,armada8040",
  31. "marvell,armada-ap806-quad", "marvell,armada-ap806";
  32. +
  33. + leds {
  34. + compatible = "gpio-leds";
  35. + pinctrl-0 = <&cp0_led18_pins>;
  36. + pinctrl-names = "default";
  37. +
  38. + led18 {
  39. + gpios = <&cp0_gpio2 1 GPIO_ACTIVE_LOW>;
  40. + function = LED_FUNCTION_HEARTBEAT;
  41. + color = <LED_COLOR_ID_GREEN>;
  42. + linux,default-trigger = "heartbeat";
  43. + default-state = "on";
  44. + };
  45. + };
  46. };
  47. &cp0_eth0 {
  48. @@ -27,3 +43,10 @@
  49. managed = "in-band-status";
  50. sfp = <&sfp_eth1>;
  51. };
  52. +
  53. +&cp0_pinctrl {
  54. + cp0_led18_pins: led18-pins {
  55. + marvell,pins = "mpp33";
  56. + marvell,function = "gpio";
  57. + };
  58. +};