Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /dts-v1/;
0003 #include "bcm2837.dtsi"
0004 #include "bcm2836-rpi.dtsi"
0005 #include "bcm283x-rpi-usb-host.dtsi"
0006 #include "bcm283x-rpi-wifi-bt.dtsi"
0007 
0008 / {
0009         compatible = "raspberrypi,3-model-a-plus", "brcm,bcm2837";
0010         model = "Raspberry Pi 3 Model A+";
0011 
0012         chosen {
0013                 /* 8250 auxiliary UART instead of pl011 */
0014                 stdout-path = "serial1:115200n8";
0015         };
0016 
0017         memory@0 {
0018                 device_type = "memory";
0019                 reg = <0 0x20000000>;
0020         };
0021 
0022         leds {
0023                 led-act {
0024                         gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
0025                 };
0026 
0027                 led-pwr {
0028                         label = "PWR";
0029                         gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
0030                         default-state = "keep";
0031                         linux,default-trigger = "default-on";
0032                 };
0033         };
0034 };
0035 
0036 &firmware {
0037         expgpio: gpio {
0038                 compatible = "raspberrypi,firmware-gpio";
0039                 gpio-controller;
0040                 #gpio-cells = <2>;
0041                 gpio-line-names = "",
0042                                   "BT_WL_ON",
0043                                   "STATUS_LED_R",
0044                                   "",
0045                                   "",
0046                                   "CAM_GPIO0",
0047                                   "CAM_GPIO1",
0048                                   "";
0049                 status = "okay";
0050         };
0051 };
0052 
0053 &gpio {
0054         /*
0055          * This is mostly based on the official GPU firmware DT blob.
0056          *
0057          * Legend:
0058          * "FOO" = GPIO line named "FOO" on the schematic
0059          * "FOO_N" = GPIO line named "FOO" on schematic, active low
0060          */
0061         gpio-line-names = "ID_SDA",
0062                           "ID_SCL",
0063                           "SDA1",
0064                           "SCL1",
0065                           "GPIO_GCLK",
0066                           "GPIO5",
0067                           "GPIO6",
0068                           "SPI_CE1_N",
0069                           "SPI_CE0_N",
0070                           "SPI_MISO",
0071                           "SPI_MOSI",
0072                           "SPI_SCLK",
0073                           "GPIO12",
0074                           "GPIO13",
0075                           /* Serial port */
0076                           "TXD1",
0077                           "RXD1",
0078                           "GPIO16",
0079                           "GPIO17",
0080                           "GPIO18",
0081                           "GPIO19",
0082                           "GPIO20",
0083                           "GPIO21",
0084                           "GPIO22",
0085                           "GPIO23",
0086                           "GPIO24",
0087                           "GPIO25",
0088                           "GPIO26",
0089                           "GPIO27",
0090                           "HDMI_HPD_N",
0091                           "STATUS_LED_G",
0092                           /* Used by BT module */
0093                           "CTS0",
0094                           "RTS0",
0095                           "TXD0",
0096                           "RXD0",
0097                           /* Used by Wifi */
0098                           "SD1_CLK",
0099                           "SD1_CMD",
0100                           "SD1_DATA0",
0101                           "SD1_DATA1",
0102                           "SD1_DATA2",
0103                           "SD1_DATA3",
0104                           "PWM0_OUT",
0105                           "PWM1_OUT",
0106                           "", /* GPIO42 */
0107                           "WIFI_CLK",
0108                           "SDA0",
0109                           "SCL0",
0110                           "SMPS_SCL",
0111                           "SMPS_SDA",
0112                           /* Used by SD Card */
0113                           "SD_CLK_R",
0114                           "SD_CMD_R",
0115                           "SD_DATA0_R",
0116                           "SD_DATA1_R",
0117                           "SD_DATA2_R",
0118                           "SD_DATA3_R";
0119 };
0120 
0121 &hdmi {
0122         hpd-gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
0123         power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
0124         status = "okay";
0125 };
0126 
0127 &pwm {
0128         pinctrl-names = "default";
0129         pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio41>;
0130         status = "okay";
0131 };
0132 
0133 /* SDHOST is used to drive the SD card */
0134 &sdhost {
0135         pinctrl-names = "default";
0136         pinctrl-0 = <&sdhost_gpio48>;
0137         status = "okay";
0138         bus-width = <4>;
0139 };
0140 
0141 /* uart0 communicates with the BT module
0142  *
0143  * WL_REG_ON and BT_REG_ON of the CYW43455 Wifi/BT module are driven
0144  * by a single GPIO. We can't give GPIO control to one of the drivers,
0145  * otherwise the other part would get unexpectedly disturbed.
0146  */
0147 &uart0 {
0148         pinctrl-names = "default";
0149         pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32 &gpclk2_gpio43>;
0150 };
0151 
0152 /* uart1 is mapped to the pin header */
0153 &uart1 {
0154         pinctrl-names = "default";
0155         pinctrl-0 = <&uart1_gpio14>;
0156         status = "okay";
0157 };