0591-BCM270X_DT-Add-bcm2708-rpi-0-w.dts.patch 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. From 97425acaefeeb2bf4a704225b544cdd863bc5bc6 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Tue, 24 May 2016 16:30:05 +0100
  4. Subject: [PATCH] BCM270X_DT: Add bcm2708-rpi-0-w.dts
  5. Add DT support for the Pi Zero W. N.B. It will not be loaded
  6. automatically without a corresponding change to the firmware.
  7. Signed-off-by: Phil Elwell <phil@raspberrypi.org>
  8. ---
  9. arch/arm/boot/dts/Makefile | 1 +
  10. arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 200 ++++++++++++++++++++++++++++++++++
  11. 2 files changed, 201 insertions(+)
  12. create mode 100644 arch/arm/boot/dts/bcm2708-rpi-0-w.dts
  13. --- a/arch/arm/boot/dts/Makefile
  14. +++ b/arch/arm/boot/dts/Makefile
  15. @@ -2,6 +2,7 @@ ifeq ($(CONFIG_OF),y)
  16. dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b.dtb
  17. dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-b-plus.dtb
  18. +dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-0-w.dtb
  19. dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-cm.dtb
  20. dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-cm.dtb
  21. dtb-$(CONFIG_ARCH_BCM2709) += bcm2709-rpi-2-b.dtb
  22. --- /dev/null
  23. +++ b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts
  24. @@ -0,0 +1,200 @@
  25. +/dts-v1/;
  26. +
  27. +#include "bcm2708.dtsi"
  28. +
  29. +/ {
  30. + compatible = "brcm,bcm2708";
  31. + model = "Raspberry Pi Zero W";
  32. +};
  33. +
  34. +&gpio {
  35. + sdhost_pins: sdhost_pins {
  36. + brcm,pins = <48 49 50 51 52 53>;
  37. + brcm,function = <4>; /* alt0 */
  38. + };
  39. +
  40. + spi0_pins: spi0_pins {
  41. + brcm,pins = <9 10 11>;
  42. + brcm,function = <4>; /* alt0 */
  43. + };
  44. +
  45. + spi0_cs_pins: spi0_cs_pins {
  46. + brcm,pins = <8 7>;
  47. + brcm,function = <1>; /* output */
  48. + };
  49. +
  50. + i2c0_pins: i2c0 {
  51. + brcm,pins = <0 1>;
  52. + brcm,function = <4>;
  53. + };
  54. +
  55. + i2c1_pins: i2c1 {
  56. + brcm,pins = <2 3>;
  57. + brcm,function = <4>;
  58. + };
  59. +
  60. + i2s_pins: i2s {
  61. + brcm,pins = <18 19 20 21>;
  62. + brcm,function = <4>; /* alt0 */
  63. + };
  64. +
  65. + sdio_pins: sdio_pins {
  66. + brcm,pins = <34 35 36 37 38 39>;
  67. + brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */
  68. + brcm,pull = <0 2 2 2 2 2>;
  69. + };
  70. +
  71. + bt_pins: bt_pins {
  72. + brcm,pins = <43>;
  73. + brcm,function = <4>; /* alt0:GPCLK2 */
  74. + brcm,pull = <0>; /* none */
  75. + };
  76. +
  77. + uart0_pins: uart0_pins {
  78. + brcm,pins = <30 31 32 33>;
  79. + brcm,function = <7>; /* alt3=UART0 */
  80. + brcm,pull = <2 0 0 2>; /* up none none up */
  81. + };
  82. +
  83. + uart1_pins: uart1_pins {
  84. + brcm,pins;
  85. + brcm,function;
  86. + brcm,pull;
  87. + };
  88. +
  89. + audio_pins: audio_pins {
  90. + brcm,pins = <>;
  91. + brcm,function = <>;
  92. + };
  93. +};
  94. +
  95. +&sdhost {
  96. + pinctrl-names = "default";
  97. + pinctrl-0 = <&sdhost_pins>;
  98. + bus-width = <4>;
  99. + status = "okay";
  100. +};
  101. +
  102. +&mmc {
  103. + pinctrl-names = "default";
  104. + pinctrl-0 = <&sdio_pins>;
  105. + non-removable;
  106. + bus-width = <4>;
  107. + status = "okay";
  108. +};
  109. +
  110. +&fb {
  111. + status = "okay";
  112. +};
  113. +
  114. +&uart0 {
  115. + pinctrl-names = "default";
  116. + pinctrl-0 = <&uart0_pins &bt_pins>;
  117. + status = "okay";
  118. +};
  119. +
  120. +&uart1 {
  121. + pinctrl-names = "default";
  122. + pinctrl-0 = <&uart1_pins>;
  123. + status = "okay";
  124. +};
  125. +
  126. +&spi0 {
  127. + pinctrl-names = "default";
  128. + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
  129. + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
  130. +
  131. + spidev0: spidev@0{
  132. + compatible = "spidev";
  133. + reg = <0>; /* CE0 */
  134. + #address-cells = <1>;
  135. + #size-cells = <0>;
  136. + spi-max-frequency = <500000>;
  137. + };
  138. +
  139. + spidev1: spidev@1{
  140. + compatible = "spidev";
  141. + reg = <1>; /* CE1 */
  142. + #address-cells = <1>;
  143. + #size-cells = <0>;
  144. + spi-max-frequency = <500000>;
  145. + };
  146. +};
  147. +
  148. +&i2c0 {
  149. + pinctrl-names = "default";
  150. + pinctrl-0 = <&i2c0_pins>;
  151. + clock-frequency = <100000>;
  152. +};
  153. +
  154. +&i2c1 {
  155. + pinctrl-names = "default";
  156. + pinctrl-0 = <&i2c1_pins>;
  157. + clock-frequency = <100000>;
  158. +};
  159. +
  160. +&i2c2 {
  161. + clock-frequency = <100000>;
  162. +};
  163. +
  164. +&i2s {
  165. + #sound-dai-cells = <0>;
  166. + pinctrl-names = "default";
  167. + pinctrl-0 = <&i2s_pins>;
  168. +};
  169. +
  170. +&random {
  171. + status = "okay";
  172. +};
  173. +
  174. +&leds {
  175. + act_led: act {
  176. + label = "led0";
  177. + linux,default-trigger = "mmc0";
  178. + gpios = <&gpio 47 0>;
  179. + };
  180. +};
  181. +
  182. +&hdmi {
  183. + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
  184. +};
  185. +
  186. +&audio {
  187. + pinctrl-names = "default";
  188. + pinctrl-0 = <&audio_pins>;
  189. +};
  190. +
  191. +/ {
  192. + chosen {
  193. + bootargs = "8250.nr_uarts=1";
  194. + };
  195. +};
  196. +
  197. +/ {
  198. + __overrides__ {
  199. + uart0 = <&uart0>,"status";
  200. + uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
  201. + uart1 = <&uart1>,"status";
  202. + i2s = <&i2s>,"status";
  203. + spi = <&spi0>,"status";
  204. + i2c0 = <&i2c0>,"status";
  205. + i2c1 = <&i2c1>,"status";
  206. + i2c2_iknowwhatimdoing = <&i2c2>,"status";
  207. + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
  208. + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
  209. + i2c2_baudrate = <&i2c2>,"clock-frequency:0";
  210. + core_freq = <&clk_core>,"clock-frequency:0";
  211. +
  212. + act_led_gpio = <&act_led>,"gpios:4";
  213. + act_led_activelow = <&act_led>,"gpios:8";
  214. + act_led_trigger = <&act_led>,"linux,default-trigger";
  215. +
  216. + audio = <&audio>,"status";
  217. + watchdog = <&watchdog>,"status";
  218. + random = <&random>,"status";
  219. + sd_overclock = <&sdhost>,"brcm,overclock-50:0";
  220. + sd_force_pio = <&sdhost>,"brcm,force-pio?";
  221. + sd_pio_limit = <&sdhost>,"brcm,pio-limit:0";
  222. + sd_debug = <&sdhost>,"brcm,debug";
  223. + };
  224. +};