0472-Add-cm3-dts-file.patch 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. From 06ccc9945b198d9d1daeda7a7c09825c084ad6f1 Mon Sep 17 00:00:00 2001
  2. From: James Adams <james@raspberrypi.org>
  3. Date: Fri, 12 Aug 2016 14:35:00 +0100
  4. Subject: [PATCH] Add cm3 dts file
  5. ---
  6. arch/arm/boot/dts/Makefile | 1 +
  7. arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 176 ++++++++++++++++++++++++++++++++++
  8. 2 files changed, 177 insertions(+)
  9. create mode 100644 arch/arm/boot/dts/bcm2710-rpi-cm3.dts
  10. --- a/arch/arm/boot/dts/Makefile
  11. +++ b/arch/arm/boot/dts/Makefile
  12. @@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rp
  13. dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-cm.dtb
  14. dtb-$(CONFIG_ARCH_BCM2709) += bcm2709-rpi-2-b.dtb
  15. dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb
  16. +dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-cm3.dtb
  17. # Raspberry Pi
  18. ifeq ($(CONFIG_ARCH_BCM2708),y)
  19. --- /dev/null
  20. +++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts
  21. @@ -0,0 +1,176 @@
  22. +/dts-v1/;
  23. +
  24. +#include "bcm2710.dtsi"
  25. +
  26. +/ {
  27. + compatible = "brcm,bcm2710","brcm,bcm2709";
  28. + model = "Raspberry Pi Compute Module 3";
  29. +};
  30. +
  31. +&gpio {
  32. +
  33. + mmc_pins: mmc_pins {
  34. + brcm,pins = <48 49 50 51 52 53>;
  35. + brcm,function = <7>; /* alt3 */
  36. + brcm,pull = <0 2 2 2 2 2>;
  37. + };
  38. +
  39. + spi0_pins: spi0_pins {
  40. + brcm,pins = <9 10 11>;
  41. + brcm,function = <4>; /* alt0 */
  42. + };
  43. +
  44. + spi0_cs_pins: spi0_cs_pins {
  45. + brcm,pins = <8 7>;
  46. + brcm,function = <1>; /* output */
  47. + };
  48. +
  49. + i2c0_pins: i2c0 {
  50. + brcm,pins = <0 1>;
  51. + brcm,function = <4>;
  52. + };
  53. +
  54. + i2c1_pins: i2c1 {
  55. + brcm,pins = <2 3>;
  56. + brcm,function = <4>;
  57. + };
  58. +
  59. + i2s_pins: i2s {
  60. + brcm,pins = <18 19 20 21>;
  61. + brcm,function = <4>; /* alt0 */
  62. + };
  63. +
  64. + uart0_pins: uart0_pins {
  65. + brcm,pins;
  66. + brcm,function;
  67. + brcm,pull = <0 2>;
  68. + };
  69. +
  70. + audio_pins: audio_pins {
  71. + brcm,pins;
  72. + brcm,function;
  73. + };
  74. +};
  75. +
  76. +&mmc {
  77. + pinctrl-names = "default";
  78. + pinctrl-0 = <&mmc_pins>;
  79. + non-removable;
  80. + bus-width = <4>;
  81. + status = "okay";
  82. + brcm,overclock-50 = <0>;
  83. +};
  84. +
  85. +&soc {
  86. + virtgpio: virtgpio {
  87. + compatible = "brcm,bcm2835-virtgpio";
  88. + gpio-controller;
  89. + #gpio-cells = <2>;
  90. + firmware = <&firmware>;
  91. + status = "okay";
  92. + };
  93. +};
  94. +
  95. +&fb {
  96. + status = "okay";
  97. +};
  98. +
  99. +&uart0 {
  100. + pinctrl-names = "default";
  101. + pinctrl-0 = <&uart0_pins>;
  102. + status = "okay";
  103. +};
  104. +
  105. +&spi0 {
  106. + pinctrl-names = "default";
  107. + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
  108. + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
  109. +
  110. + spidev0: spidev@0{
  111. + compatible = "spidev";
  112. + reg = <0>; /* CE0 */
  113. + #address-cells = <1>;
  114. + #size-cells = <0>;
  115. + spi-max-frequency = <500000>;
  116. + };
  117. +
  118. + spidev1: spidev@1{
  119. + compatible = "spidev";
  120. + reg = <1>; /* CE1 */
  121. + #address-cells = <1>;
  122. + #size-cells = <0>;
  123. + spi-max-frequency = <500000>;
  124. + };
  125. +};
  126. +
  127. +&i2c0 {
  128. + pinctrl-names = "default";
  129. + pinctrl-0 = <&i2c0_pins>;
  130. + clock-frequency = <100000>;
  131. +};
  132. +
  133. +&i2c1 {
  134. + pinctrl-names = "default";
  135. + pinctrl-0 = <&i2c1_pins>;
  136. + clock-frequency = <100000>;
  137. +};
  138. +
  139. +&i2c2 {
  140. + clock-frequency = <100000>;
  141. +};
  142. +
  143. +&i2s {
  144. + #sound-dai-cells = <0>;
  145. + pinctrl-names = "default";
  146. + pinctrl-0 = <&i2s_pins>;
  147. +};
  148. +
  149. +&random {
  150. + status = "okay";
  151. +};
  152. +
  153. +&leds {
  154. + act_led: act {
  155. + label = "led0";
  156. + linux,default-trigger = "mmc0";
  157. + gpios = <&virtgpio 0 0>;
  158. + };
  159. +};
  160. +
  161. +&hdmi {
  162. + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
  163. +};
  164. +
  165. +&audio {
  166. + pinctrl-names = "default";
  167. + pinctrl-0 = <&audio_pins>;
  168. +};
  169. +
  170. +/ {
  171. + __overrides__ {
  172. + uart0 = <&uart0>,"status";
  173. + uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
  174. + uart1 = <&uart1>,"status";
  175. + i2s = <&i2s>,"status";
  176. + spi = <&spi0>,"status";
  177. + i2c0 = <&i2c0>,"status";
  178. + i2c1 = <&i2c1>,"status";
  179. + i2c2_iknowwhatimdoing = <&i2c2>,"status";
  180. + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
  181. + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
  182. + i2c2_baudrate = <&i2c2>,"clock-frequency:0";
  183. + core_freq = <&clk_core>,"clock-frequency:0";
  184. +
  185. + act_led_gpio = <&act_led>,"gpios:4";
  186. + act_led_activelow = <&act_led>,"gpios:8";
  187. + act_led_trigger = <&act_led>,"linux,default-trigger";
  188. +
  189. + audio = <&audio>,"status";
  190. + watchdog = <&watchdog>,"status";
  191. + random = <&random>,"status";
  192. + sd_overclock = <&sdhost>,"brcm,overclock-50:0";
  193. + sd_force_pio = <&sdhost>,"brcm,force-pio?";
  194. + sd_pio_limit = <&sdhost>,"brcm,pio-limit:0";
  195. + sd_debug = <&sdhost>,"brcm,debug";
  196. + };
  197. +};