0069-Fix-the-activity-LED-in-DT-mode.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. From 31b85ba13aa394c98f2d6955b55f3f9a0623c14d Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Tue, 6 Jan 2015 12:06:55 +0000
  4. Subject: [PATCH 069/114] Fix the activity LED in DT mode
  5. Add a "leds" node to the base DTBs, and a subnode for the activity
  6. LED. You can change the LED function like this:
  7. dtparam=act_led_trigger=heartbeat
  8. Add aliases for the other main nodes (soc, intc).
  9. Issue: linux #757
  10. ---
  11. arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 18 ++++++++++++++----
  12. arch/arm/boot/dts/bcm2708-rpi-b.dts | 18 ++++++++++++++----
  13. arch/arm/boot/dts/bcm2708.dtsi | 11 ++++++++++-
  14. 3 files changed, 38 insertions(+), 9 deletions(-)
  15. --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
  16. +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
  17. @@ -7,11 +7,14 @@
  18. model = "Raspberry Pi Model B+";
  19. aliases {
  20. + soc = &soc;
  21. spi0 = &spi0;
  22. i2c0 = &i2c0;
  23. i2c1 = &i2c1;
  24. i2s = &i2s;
  25. gpio = &gpio;
  26. + intc = &intc;
  27. + leds = &leds;
  28. sound = &sound;
  29. };
  30. @@ -80,12 +83,19 @@
  31. pinctrl-0 = <&i2s_pins>;
  32. };
  33. +&act_led {
  34. + gpios = <&gpio 47 0>;
  35. +};
  36. / {
  37. __overrides__ {
  38. - i2s = <&i2s>,"status";
  39. - spi = <&spi0>,"status";
  40. - i2c0 = <&i2c0>,"status";
  41. - i2c1 = <&i2c1>,"status";
  42. + i2s = <&i2s>,"status";
  43. + spi = <&spi0>,"status";
  44. + i2c0 = <&i2c0>,"status";
  45. + i2c1 = <&i2c1>,"status";
  46. +
  47. + act_led_gpio = <&act_led>,"gpios:4";
  48. + act_led_activelow = <&act_led>,"gpios:8";
  49. + act_led_trigger = <&act_led>,"linux,default-trigger";
  50. };
  51. };
  52. --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
  53. +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
  54. @@ -7,11 +7,14 @@
  55. model = "Raspberry Pi Model B";
  56. aliases {
  57. + soc = &soc;
  58. spi0 = &spi0;
  59. i2c0 = &i2c0;
  60. i2c1 = &i2c1;
  61. i2s = &i2s;
  62. gpio = &gpio;
  63. + intc = &intc;
  64. + leds = &leds;
  65. sound = &sound;
  66. };
  67. @@ -80,12 +83,19 @@
  68. pinctrl-0 = <&i2s_pins>;
  69. };
  70. +&act_led {
  71. + gpios = <&gpio 16 1>;
  72. +};
  73. / {
  74. __overrides__ {
  75. - i2s = <&i2s>,"status";
  76. - spi = <&spi0>,"status";
  77. - i2c0 = <&i2c0>,"status";
  78. - i2c1 = <&i2c1>,"status";
  79. + i2s = <&i2s>,"status";
  80. + spi = <&spi0>,"status";
  81. + i2c0 = <&i2c0>,"status";
  82. + i2c1 = <&i2c1>,"status";
  83. +
  84. + act_led_gpio = <&act_led>,"gpios:4";
  85. + act_led_activelow = <&act_led>,"gpios:8";
  86. + act_led_trigger = <&act_led>,"linux,default-trigger";
  87. };
  88. };
  89. --- a/arch/arm/boot/dts/bcm2708.dtsi
  90. +++ b/arch/arm/boot/dts/bcm2708.dtsi
  91. @@ -11,7 +11,7 @@
  92. bootargs = "";
  93. };
  94. - soc {
  95. + soc: soc {
  96. compatible = "simple-bus";
  97. #address-cells = <1>;
  98. #size-cells = <1>;
  99. @@ -76,6 +76,15 @@
  100. #size-cells = <0>;
  101. status = "disabled";
  102. };
  103. +
  104. + leds: leds {
  105. + compatible = "gpio-leds";
  106. +
  107. + act_led: act {
  108. + label = "ACT";
  109. + linux,default-trigger = "mmc0";
  110. + };
  111. + };
  112. };
  113. clocks {