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