0160-BCM270X_DT-Add-Pi3-support.patch 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. From 4ef209cd78c9e9eac87838309c727bc90e46abe7 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Thu, 21 Jan 2016 17:57:49 +0000
  4. Subject: [PATCH] BCM270X_DT: Add Pi3 support
  5. ---
  6. arch/arm/boot/dts/Makefile | 1 +
  7. arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 192 ++++++++++++++++++++++++++++++++++
  8. arch/arm/boot/dts/bcm2710.dtsi | 102 ++++++++++++++++++
  9. 3 files changed, 295 insertions(+)
  10. create mode 100644 arch/arm/boot/dts/bcm2710-rpi-3-b.dts
  11. create mode 100644 arch/arm/boot/dts/bcm2710.dtsi
  12. --- a/arch/arm/boot/dts/Makefile
  13. +++ b/arch/arm/boot/dts/Makefile
  14. @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rp
  15. dtb-$(CONFIG_ARCH_BCM2708) += bcm2708-rpi-cm.dtb
  16. dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-cm.dtb
  17. dtb-$(CONFIG_ARCH_BCM2709) += bcm2709-rpi-2-b.dtb
  18. +dtb-$(CONFIG_ARCH_BCM2709) += bcm2710-rpi-3-b.dtb
  19. # Raspberry Pi
  20. ifeq ($(CONFIG_ARCH_BCM2708),y)
  21. --- /dev/null
  22. +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts
  23. @@ -0,0 +1,192 @@
  24. +/dts-v1/;
  25. +
  26. +#include "bcm2710.dtsi"
  27. +
  28. +/ {
  29. + compatible = "brcm,bcm2710","brcm,bcm2709";
  30. + model = "Raspberry Pi 3 Model B";
  31. +};
  32. +
  33. +&gpio {
  34. + sdhost_pins: sdhost_pins {
  35. + brcm,pins = <48 49 50 51 52 53>;
  36. + brcm,function = <4>; /* alt0 */
  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. + sdio_pins: sdio_pins {
  65. + brcm,pins = <34 35 36 37 38 39>;
  66. + brcm,function = <7>; // alt3 = SD1
  67. + brcm,pull = <0 2 2 2 2 2>;
  68. + };
  69. +
  70. + bt_pins: bt_pins {
  71. + brcm,pins = <28 29 30 31 43>;
  72. + brcm,function = <6 6 6 6 4>; /* alt2:PCM alt0:GPCLK2 */
  73. + brcm,pull = <0 0 0 0 0>;
  74. + };
  75. +
  76. + uart0_pins: uart0_pins {
  77. + brcm,pins = <32 33>;
  78. + brcm,function = <7>; /* alt3=UART0 */
  79. + brcm,pull = <0 0>;
  80. + };
  81. +
  82. + uart1_pins: uart1_pins {
  83. + brcm,pins = <14 15>;
  84. + brcm,function = <2>; /* alt5=UART1 */
  85. + brcm,pull = <0 0>;
  86. + };
  87. +};
  88. +
  89. +&sdhost {
  90. + pinctrl-names = "default";
  91. + pinctrl-0 = <&sdhost_pins>;
  92. + bus-width = <4>;
  93. + status = "okay";
  94. +};
  95. +
  96. +&mmc {
  97. + pinctrl-names = "default";
  98. + pinctrl-0 = <&sdio_pins>;
  99. + non-removable;
  100. + bus-width = <4>;
  101. + status = "okay";
  102. + brcm,overclock-50 = <0>;
  103. +};
  104. +
  105. +&soc {
  106. + virtgpio: virtgpio {
  107. + compatible = "brcm,bcm2835-virtgpio";
  108. + gpio-controller;
  109. + #gpio-cells = <2>;
  110. + firmware = <&firmware>;
  111. + status = "okay";
  112. + };
  113. +};
  114. +
  115. +&fb {
  116. + status = "okay";
  117. +};
  118. +
  119. +&uart0 {
  120. + pinctrl-names = "default";
  121. + pinctrl-0 = <&uart0_pins &bt_pins>;
  122. + status = "okay";
  123. +};
  124. +
  125. +&uart1 {
  126. + pinctrl-names = "default";
  127. + pinctrl-0 = <&uart1_pins>;
  128. + status = "okay";
  129. +};
  130. +
  131. +&spi0 {
  132. + pinctrl-names = "default";
  133. + pinctrl-0 = <&spi0_pins &spi0_cs_pins>;
  134. + cs-gpios = <&gpio 8 1>, <&gpio 7 1>;
  135. +
  136. + spidev@0{
  137. + compatible = "spidev";
  138. + reg = <0>; /* CE0 */
  139. + #address-cells = <1>;
  140. + #size-cells = <0>;
  141. + spi-max-frequency = <500000>;
  142. + };
  143. +
  144. + spidev@1{
  145. + compatible = "spidev";
  146. + reg = <1>; /* CE1 */
  147. + #address-cells = <1>;
  148. + #size-cells = <0>;
  149. + spi-max-frequency = <500000>;
  150. + };
  151. +};
  152. +
  153. +&i2c0 {
  154. + pinctrl-names = "default";
  155. + pinctrl-0 = <&i2c0_pins>;
  156. + clock-frequency = <100000>;
  157. +};
  158. +
  159. +&i2c1 {
  160. + pinctrl-names = "default";
  161. + pinctrl-0 = <&i2c1_pins>;
  162. + clock-frequency = <100000>;
  163. +};
  164. +
  165. +&i2c2 {
  166. + clock-frequency = <100000>;
  167. +};
  168. +
  169. +&i2s {
  170. + #sound-dai-cells = <0>;
  171. + pinctrl-names = "default";
  172. + pinctrl-0 = <&i2s_pins>;
  173. +};
  174. +
  175. +&random {
  176. + status = "okay";
  177. +};
  178. +
  179. +&leds {
  180. + act_led: act {
  181. + label = "led0";
  182. + linux,default-trigger = "mmc0";
  183. + gpios = <&virtgpio 0 0>;
  184. + };
  185. +};
  186. +
  187. +/ {
  188. + chosen {
  189. + bootargs = "8250.nr_uarts=1";
  190. + };
  191. +};
  192. +
  193. +/ {
  194. + __overrides__ {
  195. + uart0 = <&uart0>,"status";
  196. + uart0_clkrate = <&clk_uart0>,"clock-frequency:0";
  197. + i2s = <&i2s>,"status";
  198. + spi = <&spi0>,"status";
  199. + i2c0 = <&i2c0>,"status";
  200. + i2c1 = <&i2c1>,"status";
  201. + i2c2_iknowwhatimdoing = <&i2c2>,"status";
  202. + i2c0_baudrate = <&i2c0>,"clock-frequency:0";
  203. + i2c1_baudrate = <&i2c1>,"clock-frequency:0";
  204. + i2c2_baudrate = <&i2c2>,"clock-frequency:0";
  205. + core_freq = <&clk_core>,"clock-frequency:0";
  206. +
  207. + act_led_gpio = <&act_led>,"gpios:4";
  208. + act_led_activelow = <&act_led>,"gpios:8";
  209. + act_led_trigger = <&act_led>,"linux,default-trigger";
  210. +
  211. + audio = <&audio>,"status";
  212. + watchdog = <&watchdog>,"status";
  213. + random = <&random>,"status";
  214. + };
  215. +};
  216. --- /dev/null
  217. +++ b/arch/arm/boot/dts/bcm2710.dtsi
  218. @@ -0,0 +1,102 @@
  219. +#include "bcm2708_common.dtsi"
  220. +
  221. +/ {
  222. + compatible = "brcm,bcm2710","brcm,bcm2709";
  223. + model = "BCM2710";
  224. +
  225. + chosen {
  226. + /* No padding required - the boot loader can do that. */
  227. + bootargs = "";
  228. + };
  229. +
  230. + soc {
  231. + ranges = <0x7e000000 0x3f000000 0x01000000>,
  232. + <0x40000000 0x40000000 0x00040000>;
  233. +
  234. + local_intc: local_intc {
  235. + compatible = "brcm,bcm2836-l1-intc";
  236. + reg = <0x40000000 0x100>;
  237. + interrupt-controller;
  238. + #interrupt-cells = <1>;
  239. + interrupt-parent = <&local_intc>;
  240. + };
  241. +
  242. + arm-pmu {
  243. + compatible = "arm,cortex-a7-pmu";
  244. + interrupt-parent = <&local_intc>;
  245. + interrupts = <9>;
  246. + };
  247. +
  248. + gpiomem {
  249. + compatible = "brcm,bcm2835-gpiomem";
  250. + reg = <0x7e200000 0x1000>;
  251. + status = "okay";
  252. + };
  253. +
  254. + timer {
  255. + compatible = "arm,armv7-timer";
  256. + clock-frequency = <19200000>;
  257. + interrupt-parent = <&local_intc>;
  258. + interrupts = <0>, // PHYS_SECURE_PPI
  259. + <1>, // PHYS_NONSECURE_PPI
  260. + <3>, // VIRT_PPI
  261. + <2>; // HYP_PPI
  262. + always-on;
  263. + };
  264. +
  265. + syscon@40000000 {
  266. + compatible = "brcm,bcm2836-arm-local", "syscon";
  267. + reg = <0x40000000 0x100>;
  268. + };
  269. + };
  270. +
  271. + cpus: cpus {
  272. + #address-cells = <1>;
  273. + #size-cells = <0>;
  274. +
  275. + v7_cpu0: cpu@0 {
  276. + device_type = "cpu";
  277. + compatible = "arm,cortex-a7";
  278. + reg = <0x000>;
  279. + clock-frequency = <800000000>;
  280. + };
  281. +
  282. + v7_cpu1: cpu@1 {
  283. + device_type = "cpu";
  284. + compatible = "arm,cortex-a7";
  285. + reg = <0x001>;
  286. + clock-frequency = <800000000>;
  287. + };
  288. +
  289. + v7_cpu2: cpu@2 {
  290. + device_type = "cpu";
  291. + compatible = "arm,cortex-a7";
  292. + reg = <0x002>;
  293. + clock-frequency = <800000000>;
  294. + };
  295. +
  296. + v7_cpu3: cpu@3 {
  297. + device_type = "cpu";
  298. + compatible = "arm,cortex-a7";
  299. + reg = <0x003>;
  300. + clock-frequency = <800000000>;
  301. + };
  302. + };
  303. +
  304. + __overrides__ {
  305. + arm_freq = <&v7_cpu0>, "clock-frequency:0",
  306. + <&v7_cpu1>, "clock-frequency:0",
  307. + <&v7_cpu2>, "clock-frequency:0",
  308. + <&v7_cpu3>, "clock-frequency:0";
  309. + };
  310. +};
  311. +
  312. +&watchdog {
  313. + status = "okay";
  314. +};
  315. +
  316. +&intc {
  317. + compatible = "brcm,bcm2836-armctrl-ic";
  318. + interrupt-parent = <&local_intc>;
  319. + interrupts = <8>;
  320. +};