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