034-ARM-BCM5301X-Add-DT-for-D-Link-DIR-885L.patch 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. From 3ea03a9d512ca19d59315492230e954a1653ff6e Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
  3. Date: Tue, 26 Jan 2016 23:35:16 +0100
  4. Subject: [PATCH] ARM: BCM5301X: Add DT for D-Link DIR-885L
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. It's device based on BCM47094 which is quite similar to BCM4709 except
  9. for higher CPU frequency. This device has 2 flash memories, it boots
  10. from serial one and stores firmware on NAND. Other than that we define
  11. standard stuff like LEDs, buttons and UART.
  12. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  13. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
  14. ---
  15. --- a/arch/arm/boot/dts/Makefile
  16. +++ b/arch/arm/boot/dts/Makefile
  17. @@ -76,6 +76,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
  18. bcm4709-buffalo-wxr-1900dhp.dtb \
  19. bcm4709-netgear-r7000.dtb \
  20. bcm4709-netgear-r8000.dtb \
  21. + bcm47094-dlink-dir-885l.dtb \
  22. bcm94708.dtb \
  23. bcm94709.dtb \
  24. bcm953012k.dtb
  25. --- /dev/null
  26. +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
  27. @@ -0,0 +1,111 @@
  28. +/*
  29. + * Broadcom BCM470X / BCM5301X ARM platform code.
  30. + * DTS for D-Link DIR-885L
  31. + *
  32. + * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com>
  33. + *
  34. + * Licensed under the GNU/GPL. See COPYING for details.
  35. + */
  36. +
  37. +/dts-v1/;
  38. +
  39. +#include "bcm4708.dtsi"
  40. +#include "bcm5301x-nand-cs0-bch8.dtsi"
  41. +
  42. +/ {
  43. + compatible = "dlink,dir-885l", "brcm,bcm47094", "brcm,bcm4708";
  44. + model = "D-Link DIR-885L";
  45. +
  46. + chosen {
  47. + bootargs = "console=ttyS0,115200";
  48. + };
  49. +
  50. + memory {
  51. + reg = <0x00000000 0x08000000>;
  52. + };
  53. +
  54. + nand: nand@18028000 {
  55. + nandcs@0 {
  56. + partition@0 {
  57. + label = "firmware";
  58. + reg = <0x00000000 0x08000000>;
  59. + };
  60. + };
  61. + };
  62. +
  63. + leds {
  64. + compatible = "gpio-leds";
  65. +
  66. + power-white {
  67. + label = "bcm53xx:white:power";
  68. + gpios = <&chipcommon 0 GPIO_ACTIVE_LOW>;
  69. + linux,default-trigger = "default-on";
  70. + };
  71. +
  72. + wan-white {
  73. + label = "bcm53xx:white:wan";
  74. + gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
  75. + linux,default-trigger = "default-off";
  76. + };
  77. +
  78. + power-amber {
  79. + label = "bcm53xx:amber:power";
  80. + gpios = <&chipcommon 2 GPIO_ACTIVE_LOW>;
  81. + linux,default-trigger = "default-off";
  82. + };
  83. +
  84. + wan-amber {
  85. + label = "bcm53xx:amber:wan";
  86. + gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
  87. + linux,default-trigger = "default-off";
  88. + };
  89. +
  90. + usb3-white {
  91. + label = "bcm53xx:white:usb3";
  92. + gpios = <&chipcommon 8 GPIO_ACTIVE_LOW>;
  93. + linux,default-trigger = "default-off";
  94. + };
  95. +
  96. + 2ghz {
  97. + label = "bcm53xx:white:2ghz";
  98. + gpios = <&chipcommon 13 GPIO_ACTIVE_LOW>;
  99. + linux,default-trigger = "default-off";
  100. + };
  101. +
  102. + 5ghz {
  103. + label = "bcm53xx:white:5ghz";
  104. + gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
  105. + linux,default-trigger = "default-off";
  106. + };
  107. + };
  108. +
  109. + gpio-keys {
  110. + compatible = "gpio-keys";
  111. + #address-cells = <1>;
  112. + #size-cells = <0>;
  113. +
  114. + wps {
  115. + label = "WPS";
  116. + linux,code = <KEY_WPS_BUTTON>;
  117. + gpios = <&chipcommon 7 GPIO_ACTIVE_LOW>;
  118. + };
  119. +
  120. + /* Switch: router / extender */
  121. + extender {
  122. + label = "Extender";
  123. + linux,code = <BTN_0>;
  124. + gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
  125. + };
  126. +
  127. + restart {
  128. + label = "Reset";
  129. + linux,code = <KEY_RESTART>;
  130. + gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
  131. + };
  132. + };
  133. +};
  134. +
  135. +&uart0 {
  136. + status = "okay";
  137. + clock-frequency = <125000000>;
  138. +};