0325-BCM270X_DT-Move-vc4-node-contents-to-bcm2708_common..patch 6.9 KB

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