bcm2711-rpi-4-b.dts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. // SPDX-License-Identifier: GPL-2.0
  2. /dts-v1/;
  3. #include "bcm2711.dtsi"
  4. #include "bcm2711-rpi.dtsi"
  5. #include "bcm283x-rpi-usb-peripheral.dtsi"
  6. #include "bcm283x-rpi-wifi-bt.dtsi"
  7. / {
  8. compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
  9. model = "Raspberry Pi 4 Model B";
  10. chosen {
  11. /* 8250 auxiliary UART instead of pl011 */
  12. stdout-path = "serial1:115200n8";
  13. };
  14. leds {
  15. led-act {
  16. gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
  17. };
  18. led-pwr {
  19. label = "PWR";
  20. gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
  21. default-state = "keep";
  22. linux,default-trigger = "default-on";
  23. };
  24. };
  25. sd_io_1v8_reg: sd_io_1v8_reg {
  26. compatible = "regulator-gpio";
  27. regulator-name = "vdd-sd-io";
  28. regulator-min-microvolt = <1800000>;
  29. regulator-max-microvolt = <3300000>;
  30. regulator-boot-on;
  31. regulator-always-on;
  32. regulator-settling-time-us = <5000>;
  33. gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>;
  34. states = <1800000 0x1>,
  35. <3300000 0x0>;
  36. status = "okay";
  37. };
  38. sd_vcc_reg: sd_vcc_reg {
  39. compatible = "regulator-fixed";
  40. regulator-name = "vcc-sd";
  41. regulator-min-microvolt = <3300000>;
  42. regulator-max-microvolt = <3300000>;
  43. regulator-boot-on;
  44. enable-active-high;
  45. gpio = <&expgpio 6 GPIO_ACTIVE_HIGH>;
  46. };
  47. };
  48. &bt {
  49. shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>;
  50. };
  51. &ddc0 {
  52. status = "okay";
  53. };
  54. &ddc1 {
  55. status = "okay";
  56. };
  57. &expgpio {
  58. gpio-line-names = "BT_ON", /* 0 */
  59. "WL_ON",
  60. "PWR_LED_OFF",
  61. "GLOBAL_RESET",
  62. "VDD_SD_IO_SEL",
  63. "CAM_GPIO", /* 5 */
  64. "SD_PWR_ON",
  65. "";
  66. };
  67. &gpio {
  68. /*
  69. * Parts taken from rpi_SCH_4b_4p0_reduced.pdf and
  70. * the official GPU firmware DT blob.
  71. *
  72. * Legend:
  73. * "FOO" = GPIO line named "FOO" on the schematic
  74. * "FOO_N" = GPIO line named "FOO" on schematic, active low
  75. */
  76. gpio-line-names = "ID_SDA", /* 0 */
  77. "ID_SCL",
  78. "SDA1",
  79. "SCL1",
  80. "GPIO_GCLK",
  81. "GPIO5", /* 5 */
  82. "GPIO6",
  83. "SPI_CE1_N",
  84. "SPI_CE0_N",
  85. "SPI_MISO",
  86. "SPI_MOSI", /* 10 */
  87. "SPI_SCLK",
  88. "GPIO12",
  89. "GPIO13",
  90. /* Serial port */
  91. "TXD1",
  92. "RXD1", /* 15 */
  93. "GPIO16",
  94. "GPIO17",
  95. "GPIO18",
  96. "GPIO19",
  97. "GPIO20", /* 20 */
  98. "GPIO21",
  99. "GPIO22",
  100. "GPIO23",
  101. "GPIO24",
  102. "GPIO25", /* 25 */
  103. "GPIO26",
  104. "GPIO27",
  105. "RGMII_MDIO",
  106. "RGMIO_MDC",
  107. /* Used by BT module */
  108. "CTS0", /* 30 */
  109. "RTS0",
  110. "TXD0",
  111. "RXD0",
  112. /* Used by Wifi */
  113. "SD1_CLK",
  114. "SD1_CMD", /* 35 */
  115. "SD1_DATA0",
  116. "SD1_DATA1",
  117. "SD1_DATA2",
  118. "SD1_DATA3",
  119. /* Shared with SPI flash */
  120. "PWM0_MISO", /* 40 */
  121. "PWM1_MOSI",
  122. "STATUS_LED_G_CLK",
  123. "SPIFLASH_CE_N",
  124. "SDA0",
  125. "SCL0", /* 45 */
  126. "RGMII_RXCLK",
  127. "RGMII_RXCTL",
  128. "RGMII_RXD0",
  129. "RGMII_RXD1",
  130. "RGMII_RXD2", /* 50 */
  131. "RGMII_RXD3",
  132. "RGMII_TXCLK",
  133. "RGMII_TXCTL",
  134. "RGMII_TXD0",
  135. "RGMII_TXD1", /* 55 */
  136. "RGMII_TXD2",
  137. "RGMII_TXD3";
  138. };
  139. &hdmi0 {
  140. status = "okay";
  141. };
  142. &hdmi1 {
  143. status = "okay";
  144. };
  145. &pixelvalve0 {
  146. status = "okay";
  147. };
  148. &pixelvalve1 {
  149. status = "okay";
  150. };
  151. &pixelvalve2 {
  152. status = "okay";
  153. };
  154. &pixelvalve4 {
  155. status = "okay";
  156. };
  157. &pwm1 {
  158. pinctrl-names = "default";
  159. pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
  160. status = "okay";
  161. };
  162. /* EMMC2 is used to drive the SD card */
  163. &emmc2 {
  164. vqmmc-supply = <&sd_io_1v8_reg>;
  165. vmmc-supply = <&sd_vcc_reg>;
  166. broken-cd;
  167. status = "okay";
  168. };
  169. &genet {
  170. phy-handle = <&phy1>;
  171. phy-mode = "rgmii-rxid";
  172. status = "okay";
  173. };
  174. &genet_mdio {
  175. phy1: ethernet-phy@1 {
  176. /* No PHY interrupt */
  177. reg = <0x1>;
  178. };
  179. };
  180. &pcie0 {
  181. pci@0,0 {
  182. device_type = "pci";
  183. #address-cells = <3>;
  184. #size-cells = <2>;
  185. ranges;
  186. reg = <0 0 0 0 0>;
  187. usb@0,0 {
  188. reg = <0 0 0 0 0>;
  189. resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
  190. };
  191. };
  192. };
  193. /* uart0 communicates with the BT module */
  194. &uart0 {
  195. pinctrl-names = "default";
  196. pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>;
  197. uart-has-rtscts;
  198. };
  199. /* uart1 is mapped to the pin header */
  200. &uart1 {
  201. pinctrl-names = "default";
  202. pinctrl-0 = <&uart1_gpio14>;
  203. status = "okay";
  204. };
  205. &vc4 {
  206. status = "okay";
  207. };
  208. &vec {
  209. status = "disabled";
  210. };
  211. &wifi_pwrseq {
  212. reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>;
  213. };