Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 2 | /dts-v1/; |
| 3 | #include "bcm2837.dtsi" |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 4 | #include "bcm2836-rpi.dtsi" |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 5 | #include "bcm283x-rpi-smsc9514.dtsi" |
Alexander Graf | 377c534 | 2017-10-04 14:39:16 +0200 | [diff] [blame] | 6 | #include "bcm283x-rpi-usb-host.dtsi" |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 7 | |
| 8 | / { |
| 9 | compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; |
| 10 | model = "Raspberry Pi 3 Model B"; |
| 11 | |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 12 | chosen { |
| 13 | /* 8250 auxiliary UART instead of pl011 */ |
| 14 | stdout-path = "serial1:115200n8"; |
| 15 | }; |
| 16 | |
| 17 | memory@0 { |
Simon Glass | 0ca7009 | 2021-12-16 20:59:13 -0700 | [diff] [blame] | 18 | device_type = "memory"; |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 19 | reg = <0 0x40000000>; |
| 20 | }; |
| 21 | |
| 22 | leds { |
Simon Glass | 0ca7009 | 2021-12-16 20:59:13 -0700 | [diff] [blame] | 23 | led-act { |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 24 | gpios = <&expgpio 2 GPIO_ACTIVE_HIGH>; |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 25 | }; |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 26 | }; |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 27 | |
| 28 | wifi_pwrseq: wifi-pwrseq { |
| 29 | compatible = "mmc-pwrseq-simple"; |
| 30 | reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; |
| 31 | }; |
| 32 | }; |
| 33 | |
| 34 | &firmware { |
| 35 | expgpio: gpio { |
| 36 | compatible = "raspberrypi,firmware-gpio"; |
| 37 | gpio-controller; |
| 38 | #gpio-cells = <2>; |
| 39 | gpio-line-names = "BT_ON", |
| 40 | "WL_ON", |
| 41 | "STATUS_LED", |
| 42 | "LAN_RUN", |
| 43 | "HDMI_HPD_N", |
| 44 | "CAM_GPIO0", |
| 45 | "CAM_GPIO1", |
| 46 | "PWR_LOW_N"; |
| 47 | status = "okay"; |
| 48 | }; |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 49 | }; |
| 50 | |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 51 | &gpio { |
| 52 | /* |
| 53 | * Taken from rpi_SCH_3b_1p2_reduced.pdf and |
| 54 | * the official GPU firmware DT blob. |
| 55 | * |
| 56 | * Legend: |
| 57 | * "NC" = not connected (no rail from the SoC) |
| 58 | * "FOO" = GPIO line named "FOO" on the schematic |
| 59 | * "FOO_N" = GPIO line named "FOO" on schematic, active low |
| 60 | */ |
| 61 | gpio-line-names = "ID_SDA", |
| 62 | "ID_SCL", |
| 63 | "SDA1", |
| 64 | "SCL1", |
| 65 | "GPIO_GCLK", |
| 66 | "GPIO5", |
| 67 | "GPIO6", |
| 68 | "SPI_CE1_N", |
| 69 | "SPI_CE0_N", |
| 70 | "SPI_MISO", |
| 71 | "SPI_MOSI", |
| 72 | "SPI_SCLK", |
| 73 | "GPIO12", |
| 74 | "GPIO13", |
| 75 | /* Serial port */ |
| 76 | "TXD1", |
| 77 | "RXD1", |
| 78 | "GPIO16", |
| 79 | "GPIO17", |
| 80 | "GPIO18", |
| 81 | "GPIO19", |
| 82 | "GPIO20", |
| 83 | "GPIO21", |
| 84 | "GPIO22", |
| 85 | "GPIO23", |
| 86 | "GPIO24", |
| 87 | "GPIO25", |
| 88 | "GPIO26", |
| 89 | "GPIO27", |
| 90 | "", /* GPIO 28 */ |
| 91 | "LAN_RUN_BOOT", |
| 92 | /* Used by BT module */ |
| 93 | "CTS0", |
| 94 | "RTS0", |
| 95 | "TXD0", |
| 96 | "RXD0", |
| 97 | /* Used by Wifi */ |
| 98 | "SD1_CLK", |
| 99 | "SD1_CMD", |
| 100 | "SD1_DATA0", |
| 101 | "SD1_DATA1", |
| 102 | "SD1_DATA2", |
| 103 | "SD1_DATA3", |
| 104 | "PWM0_OUT", |
| 105 | "PWM1_OUT", |
| 106 | "ETHCLK", |
| 107 | "WIFI_CLK", |
| 108 | "SDA0", |
| 109 | "SCL0", |
| 110 | "SMPS_SCL", |
| 111 | "SMPS_SDA", |
| 112 | /* Used by SD Card */ |
| 113 | "SD_CLK_R", |
| 114 | "SD_CMD_R", |
| 115 | "SD_DATA0_R", |
| 116 | "SD_DATA1_R", |
| 117 | "SD_DATA2_R", |
| 118 | "SD_DATA3_R"; |
| 119 | }; |
| 120 | |
| 121 | &pwm { |
| 122 | pinctrl-names = "default"; |
| 123 | pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>; |
| 124 | status = "okay"; |
| 125 | }; |
| 126 | |
| 127 | &hdmi { |
| 128 | hpd-gpios = <&expgpio 4 GPIO_ACTIVE_LOW>; |
Simon Glass | 0ca7009 | 2021-12-16 20:59:13 -0700 | [diff] [blame] | 129 | power-domains = <&power RPI_POWER_DOMAIN_HDMI>; |
| 130 | status = "okay"; |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 131 | }; |
| 132 | |
Alexander Graf | 377c534 | 2017-10-04 14:39:16 +0200 | [diff] [blame] | 133 | /* uart0 communicates with the BT module */ |
| 134 | &uart0 { |
| 135 | pinctrl-names = "default"; |
| 136 | pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; |
| 137 | status = "okay"; |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 138 | |
| 139 | bluetooth { |
| 140 | compatible = "brcm,bcm43438-bt"; |
| 141 | max-speed = <2000000>; |
| 142 | shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; |
| 143 | }; |
Alexander Graf | 377c534 | 2017-10-04 14:39:16 +0200 | [diff] [blame] | 144 | }; |
| 145 | |
| 146 | /* uart1 is mapped to the pin header */ |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 147 | &uart1 { |
Alexander Graf | 377c534 | 2017-10-04 14:39:16 +0200 | [diff] [blame] | 148 | pinctrl-names = "default"; |
| 149 | pinctrl-0 = <&uart1_gpio14>; |
| 150 | status = "okay"; |
| 151 | }; |
| 152 | |
| 153 | /* SDHCI is used to control the SDIO for wireless */ |
| 154 | &sdhci { |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 155 | #address-cells = <1>; |
| 156 | #size-cells = <0>; |
Alexander Graf | 377c534 | 2017-10-04 14:39:16 +0200 | [diff] [blame] | 157 | pinctrl-names = "default"; |
| 158 | pinctrl-0 = <&emmc_gpio34>; |
| 159 | status = "okay"; |
| 160 | bus-width = <4>; |
| 161 | non-removable; |
Heinrich Schuchardt | be12fb9 | 2019-04-28 06:46:57 +0200 | [diff] [blame] | 162 | mmc-pwrseq = <&wifi_pwrseq>; |
| 163 | |
| 164 | brcmf: wifi@1 { |
| 165 | reg = <1>; |
| 166 | compatible = "brcm,bcm4329-fmac"; |
| 167 | }; |
Alexander Graf | 377c534 | 2017-10-04 14:39:16 +0200 | [diff] [blame] | 168 | }; |
| 169 | |
| 170 | /* SDHOST is used to drive the SD card */ |
| 171 | &sdhost { |
| 172 | pinctrl-names = "default"; |
| 173 | pinctrl-0 = <&sdhost_gpio48>; |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 174 | status = "okay"; |
Alexander Graf | 377c534 | 2017-10-04 14:39:16 +0200 | [diff] [blame] | 175 | bus-width = <4>; |
Fabian Vogt | 7ad2aa0 | 2016-09-26 14:26:47 +0200 | [diff] [blame] | 176 | }; |