Linux Audio

Check our new training course

Linux kernel drivers training

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