0329-BCM270X_DT-Move-vc4-node-contents-to-bcm2708_common..patch 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. From 4cb8cf8c6ce47b652c93bae2b4b480bd7ea7f940 Mon Sep 17 00:00:00 2001
  2. From: Eric Anholt <eric@anholt.net>
  3. Date: Fri, 6 May 2016 11:48:35 -0700
  4. Subject: [PATCH 329/381] BCM270X_DT: Move vc4 node contents to
  5. bcm2708_common.dtsi.
  6. This should clarify what's going on with the overlay: The hardware is
  7. always present, we're just enabling the DT node so that the vc4 driver
  8. probes.
  9. The interrupts are left in the overlay, because the firmware doesn't
  10. check node status before masking out the vc4 interrupts.
  11. By having the nodes in the common file, we'll be able to correctly
  12. connect the HDMI HPD GPIO so that we can detect whether an HDMI
  13. monitor is connected.
  14. Signed-off-by: Eric Anholt <eric@anholt.net>
  15. ---
  16. arch/arm/boot/dts/bcm2708_common.dtsi | 51 +++++++
  17. arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts | 160 ++++++++++-----------
  18. 2 files changed, 129 insertions(+), 82 deletions(-)
  19. --- a/arch/arm/boot/dts/bcm2708_common.dtsi
  20. +++ b/arch/arm/boot/dts/bcm2708_common.dtsi
  21. @@ -1,4 +1,7 @@
  22. +#include "dt-bindings/clock/bcm2835.h"
  23. #include <dt-bindings/clock/bcm2835-aux.h>
  24. +#include "dt-bindings/power/raspberrypi-power.h"
  25. +#include "dt-bindings/gpio/gpio.h"
  26. #include "skeleton.dtsi"
  27. / {
  28. @@ -170,6 +173,18 @@
  29. status = "disabled";
  30. };
  31. + pixelvalve0: pixelvalve@7e206000 {
  32. + compatible = "brcm,bcm2835-pixelvalve0";
  33. + reg = <0x7e206000 0x100>;
  34. + status = "disabled";
  35. + };
  36. +
  37. + pixelvalve1: pixelvalve@7e207000 {
  38. + compatible = "brcm,bcm2835-pixelvalve1";
  39. + reg = <0x7e207000 0x100>;
  40. + status = "disabled";
  41. + };
  42. +
  43. pwm: pwm@7e20c000 {
  44. compatible = "brcm,bcm2835-pwm";
  45. reg = <0x7e20c000 0x28>;
  46. @@ -227,6 +242,12 @@
  47. status = "disabled";
  48. };
  49. + hvs: hvs@7e400000 {
  50. + compatible = "brcm,bcm2835-hvs";
  51. + reg = <0x7e400000 0x6000>;
  52. + status = "disabled";
  53. + };
  54. +
  55. i2c1: i2c@7e804000 {
  56. compatible = "brcm,bcm2708-i2c";
  57. reg = <0x7e804000 0x1000>;
  58. @@ -261,6 +282,25 @@
  59. status = "disabled";
  60. };
  61. + pixelvalve2: pixelvalve@7e807000 {
  62. + compatible = "brcm,bcm2835-pixelvalve2";
  63. + reg = <0x7e807000 0x100>;
  64. + status = "disabled";
  65. + };
  66. +
  67. + hdmi: hdmi@7e902000 {
  68. + compatible = "brcm,bcm2835-hdmi";
  69. + reg = <0x7e902000 0x600>,
  70. + <0x7e808000 0x100>;
  71. + ddc = <&i2c2>;
  72. + hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
  73. + clocks = <&cprman BCM2835_PLLH_PIX>,
  74. + <&cprman BCM2835_CLOCK_HSM>;
  75. + clock-names = "pixel", "hdmi";
  76. + power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
  77. + status = "disabled";
  78. + };
  79. +
  80. usb: usb@7e980000 {
  81. compatible = "brcm,bcm2708-usb";
  82. reg = <0x7e980000 0x10000>,
  83. @@ -269,6 +309,12 @@
  84. <1 9>;
  85. };
  86. + v3d: v3d@7ec00000 {
  87. + compatible = "brcm,vc4-v3d";
  88. + reg = <0x7ec00000 0x1000>;
  89. + status = "disabled";
  90. + };
  91. +
  92. firmware: firmware {
  93. compatible = "raspberrypi,bcm2835-firmware";
  94. mboxes = <&mailbox>;
  95. @@ -303,6 +349,11 @@
  96. firmware = <&firmware>;
  97. };
  98. + gpu: gpu {
  99. + compatible = "brcm,bcm2835-vc4";
  100. + status = "disabled";
  101. + };
  102. +
  103. /* Onboard audio */
  104. audio: audio {
  105. compatible = "brcm,bcm2835-audio";
  106. --- a/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
  107. +++ b/arch/arm/boot/dts/overlays/vc4-kms-v3d-overlay.dts
  108. @@ -5,129 +5,125 @@
  109. /dts-v1/;
  110. /plugin/;
  111. -#include "dt-bindings/clock/bcm2835.h"
  112. -#include "dt-bindings/power/raspberrypi-power.h"
  113. -#include "dt-bindings/gpio/gpio.h"
  114. -
  115. / {
  116. compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
  117. fragment@0 {
  118. + target-path = "/chosen";
  119. + __overlay__ {
  120. + bootargs = "cma=256M@256M";
  121. + };
  122. + };
  123. +
  124. + fragment@1 {
  125. + target-path = "/chosen";
  126. + __dormant__ {
  127. + bootargs = "cma=192M@256M";
  128. + };
  129. + };
  130. +
  131. + fragment@2 {
  132. + target-path = "/chosen";
  133. + __dormant__ {
  134. + bootargs = "cma=128M@128M";
  135. + };
  136. + };
  137. +
  138. + fragment@3 {
  139. + target-path = "/chosen";
  140. + __dormant__ {
  141. + bootargs = "cma=96M@128M";
  142. + };
  143. + };
  144. +
  145. + fragment@4 {
  146. + target-path = "/chosen";
  147. + __dormant__ {
  148. + bootargs = "cma=64M@64M";
  149. + };
  150. + };
  151. +
  152. + fragment@5 {
  153. target = <&i2c2>;
  154. __overlay__ {
  155. status = "okay";
  156. };
  157. };
  158. - fragment@1 {
  159. + fragment@6 {
  160. target = <&cprman>;
  161. __overlay__ {
  162. status = "okay";
  163. };
  164. };
  165. - fragment@2 {
  166. + fragment@7 {
  167. target = <&fb>;
  168. __overlay__ {
  169. status = "disabled";
  170. };
  171. };
  172. - fragment@3 {
  173. - target = <&soc>;
  174. + fragment@8 {
  175. + target = <&pixelvalve0>;
  176. __overlay__ {
  177. - #address-cells = <1>;
  178. - #size-cells = <1>;
  179. + interrupts = <2 13>; /* pwa0 */
  180. + status = "okay";
  181. + };
  182. + };
  183. - pixelvalve@7e206000 {
  184. - compatible = "brcm,bcm2835-pixelvalve0";
  185. - reg = <0x7e206000 0x100>;
  186. - interrupts = <2 13>; /* pwa0 */
  187. - };
  188. -
  189. - pixelvalve@7e207000 {
  190. - compatible = "brcm,bcm2835-pixelvalve1";
  191. - reg = <0x7e207000 0x100>;
  192. - interrupts = <2 14>; /* pwa1 */
  193. - };
  194. -
  195. - hvs@7e400000 {
  196. - compatible = "brcm,bcm2835-hvs";
  197. - reg = <0x7e400000 0x6000>;
  198. - interrupts = <2 1>;
  199. - };
  200. -
  201. - pixelvalve@7e807000 {
  202. - compatible = "brcm,bcm2835-pixelvalve2";
  203. - reg = <0x7e807000 0x100>;
  204. - interrupts = <2 10>; /* pixelvalve */
  205. - };
  206. -
  207. - hdmi@7e902000 {
  208. - compatible = "brcm,bcm2835-hdmi";
  209. - reg = <0x7e902000 0x600>,
  210. - <0x7e808000 0x100>;
  211. - interrupts = <2 8>, <2 9>;
  212. - ddc = <&i2c2>;
  213. - hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
  214. - clocks = <&cprman BCM2835_PLLH_PIX>,
  215. - <&cprman BCM2835_CLOCK_HSM>;
  216. - clock-names = "pixel", "hdmi";
  217. - power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
  218. - };
  219. -
  220. - v3d@7ec00000 {
  221. - compatible = "brcm,vc4-v3d";
  222. - reg = <0x7ec00000 0x1000>;
  223. - interrupts = <1 10>;
  224. - };
  225. -
  226. - gpu@7e4c0000 {
  227. - compatible = "brcm,bcm2835-vc4";
  228. - };
  229. + fragment@9 {
  230. + target = <&pixelvalve1>;
  231. + __overlay__ {
  232. + interrupts = <2 14>; /* pwa1 */
  233. + status = "okay";
  234. };
  235. };
  236. - fragment@4 {
  237. - target-path = "/chosen";
  238. - __overlay__ {
  239. - bootargs = "cma=256M@256M";
  240. + fragment@10 {
  241. + target = <&pixelvalve2>;
  242. + __overlay__ {
  243. + interrupts = <2 10>; /* pixelvalve */
  244. + status = "okay";
  245. };
  246. };
  247. - fragment@5 {
  248. - target-path = "/chosen";
  249. - __dormant__ {
  250. - bootargs = "cma=192M@256M";
  251. + fragment@11 {
  252. + target = <&hvs>;
  253. + __overlay__ {
  254. + interrupts = <2 1>;
  255. + status = "okay";
  256. };
  257. };
  258. - fragment@6 {
  259. - target-path = "/chosen";
  260. - __dormant__ {
  261. - bootargs = "cma=128M@128M";
  262. + fragment@12 {
  263. + target = <&hdmi>;
  264. + __overlay__ {
  265. + interrupts = <2 8>, <2 9>;
  266. + status = "okay";
  267. };
  268. };
  269. - fragment@7 {
  270. - target-path = "/chosen";
  271. - __dormant__ {
  272. - bootargs = "cma=96M@128M";
  273. + fragment@13 {
  274. + target = <&v3d>;
  275. + __overlay__ {
  276. + interrupts = <1 10>;
  277. + status = "okay";
  278. };
  279. };
  280. - fragment@8 {
  281. - target-path = "/chosen";
  282. - __dormant__ {
  283. - bootargs = "cma=64M@64M";
  284. + fragment@14 {
  285. + target = <&gpu>;
  286. + __overlay__ {
  287. + status = "okay";
  288. };
  289. };
  290. __overrides__ {
  291. - cma-256 = <0>,"+4-5-6-7-8";
  292. - cma-192 = <0>,"-4+5-6-7-8";
  293. - cma-128 = <0>,"-4-5+6-7-8";
  294. - cma-96 = <0>,"-4-5-6+7-8";
  295. - cma-64 = <0>,"-4-5-6-7+8";
  296. + cma-256 = <0>,"+0-1-2-3-4";
  297. + cma-192 = <0>,"-0+1-2-3-4";
  298. + cma-128 = <0>,"-0-1+2-3-4";
  299. + cma-96 = <0>,"-0-1-2+3-4";
  300. + cma-64 = <0>,"-0-1-2-3+4";
  301. };
  302. };