a5169d3
From 383c32f69af61774ff3414f98c9bc29f28dca8fa Mon Sep 17 00:00:00 2001
a5169d3
From: Peter Robinson <pbrobinson@gmail.com>
a5169d3
Date: Mon, 19 Mar 2018 09:26:57 +0000
a5169d3
Subject: [PATCH] rpi: initial support for the 3+
a5169d3
a5169d3
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
a5169d3
---
a5169d3
 arch/arm/boot/dts/Makefile                         |  1 +
a5169d3
 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts         | 62 ++++++++++++++++++++++
a5169d3
 arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi         | 36 +++++++++++++
a5169d3
 arch/arm64/boot/dts/broadcom/Makefile              |  4 +-
a5169d3
 .../boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts     |  2 +
a5169d3
 5 files changed, 104 insertions(+), 1 deletion(-)
a5169d3
 create mode 100644 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
a5169d3
 create mode 100644 arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
a5169d3
 create mode 100644 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts
a5169d3
a5169d3
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
a5169d3
index ade7a38543dc..05b49935d84b 100644
a5169d3
--- a/arch/arm/boot/dts/Makefile
a5169d3
+++ b/arch/arm/boot/dts/Makefile
a5169d3
@@ -75,6 +75,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
a5169d3
 	bcm2835-rpi-a-plus.dtb \
a5169d3
 	bcm2836-rpi-2-b.dtb \
a5169d3
 	bcm2837-rpi-3-b.dtb \
a5169d3
+	bcm2837-rpi-3-b-plus.dtb \
a5169d3
 	bcm2835-rpi-zero.dtb \
a5169d3
 	bcm2835-rpi-zero-w.dtb
a5169d3
 dtb-$(CONFIG_ARCH_BCM_5301X) += \
a5169d3
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
a5169d3
new file mode 100644
a5169d3
index 000000000000..63ff6bc56e36
a5169d3
--- /dev/null
a5169d3
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
a5169d3
@@ -0,0 +1,62 @@
a5169d3
+// SPDX-License-Identifier: GPL-2.0
a5169d3
+/dts-v1/;
a5169d3
+#include "bcm2837.dtsi"
a5169d3
+#include "bcm2835-rpi.dtsi"
a5169d3
+#include "bcm283x-rpi-lan7515.dtsi"
a5169d3
+#include "bcm283x-rpi-usb-host.dtsi"
a5169d3
+
a5169d3
+/ {
a5169d3
+	compatible = "raspberrypi,3-model-b-plus", "brcm,bcm2837";
a5169d3
+	model = "Raspberry Pi 3 Model B+";
a5169d3
+
a5169d3
+	chosen {
a5169d3
+		/* 8250 auxiliary UART instead of pl011 */
a5169d3
+		stdout-path = "serial1:115200n8";
a5169d3
+	};
a5169d3
+
a5169d3
+	memory {
a5169d3
+		reg = <0 0x40000000>;
a5169d3
+	};
a5169d3
+
a5169d3
+	leds {
a5169d3
+		act {
a5169d3
+			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
a5169d3
+		};
a5169d3
+	};
a5169d3
+};
a5169d3
+
a5169d3
+/* uart0 communicates with the BT module */
a5169d3
+&uart0 {
a5169d3
+	pinctrl-names = "default";
a5169d3
+	pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>;
a5169d3
+	status = "okay";
a5169d3
+
a5169d3
+	bluetooth {
a5169d3
+		compatible = "brcm,bcm43438-bt";
a5169d3
+		max-speed = <2000000>;
a5169d3
+	};
a5169d3
+};
a5169d3
+
a5169d3
+/* uart1 is mapped to the pin header */
a5169d3
+&uart1 {
a5169d3
+	pinctrl-names = "default";
a5169d3
+	pinctrl-0 = <&uart1_gpio14>;
a5169d3
+	status = "okay";
a5169d3
+};
a5169d3
+
a5169d3
+/* SDHCI is used to control the SDIO for wireless */
a5169d3
+&sdhci {
a5169d3
+	pinctrl-names = "default";
a5169d3
+	pinctrl-0 = <&emmc_gpio34>;
a5169d3
+	status = "okay";
a5169d3
+	bus-width = <4>;
a5169d3
+	non-removable;
a5169d3
+};
a5169d3
+
a5169d3
+/* SDHOST is used to drive the SD card */
a5169d3
+&sdhost {
a5169d3
+	pinctrl-names = "default";
a5169d3
+	pinctrl-0 = <&sdhost_gpio48>;
a5169d3
+	status = "okay";
a5169d3
+	bus-width = <4>;
a5169d3
+};
a5169d3
diff --git a/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
a5169d3
new file mode 100644
a5169d3
index 000000000000..1b1075d4aa5c
a5169d3
--- /dev/null
a5169d3
+++ b/arch/arm/boot/dts/bcm283x-rpi-lan7515.dtsi
a5169d3
@@ -0,0 +1,36 @@
a5169d3
+/ {
a5169d3
+	aliases {
a5169d3
+		ethernet0 = &ethernet;
a5169d3
+	};
a5169d3
+};
a5169d3
+
a5169d3
+&usb {
a5169d3
+	usb1@1 {
a5169d3
+		compatible = "usb424,2514";
a5169d3
+		reg = <1>;
a5169d3
+		#address-cells = <1>;
a5169d3
+		#size-cells = <0>;
a5169d3
+
a5169d3
+		usb1_1@1 {
a5169d3
+			compatible = "usb424,2514";
a5169d3
+			reg = <1>;
a5169d3
+			#address-cells = <1>;
a5169d3
+			#size-cells = <0>;
a5169d3
+
a5169d3
+			ethernet: usbether@1 {
a5169d3
+				compatible = "usb424,7800";
a5169d3
+				reg = <1>;
a5169d3
+				microchip,eee-enabled;
a5169d3
+				microchip,tx-lpi-timer = <600>; /* non-aggressive*/
a5169d3
+			};
a5169d3
+		};
a5169d3
+	};
a5169d3
+};
a5169d3
+
a5169d3
+
a5169d3
+/ {
a5169d3
+	__overrides__ {
a5169d3
+		eee = <&ethernet>,"microchip,eee-enabled?";
a5169d3
+		tx_lpi_timer = <&ethernet>,"microchip,tx-lpi-timer:0";
a5169d3
+	};
a5169d3
+};
a5169d3
diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
a5169d3
index 2a2591ef1fee..6b5b70542dad 100644
a5169d3
--- a/arch/arm64/boot/dts/broadcom/Makefile
a5169d3
+++ b/arch/arm64/boot/dts/broadcom/Makefile
a5169d3
@@ -1,5 +1,7 @@
a5169d3
 # SPDX-License-Identifier: GPL-2.0
a5169d3
-dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb
a5169d3
+dtb-$(CONFIG_ARCH_BCM2835) += \
a5169d3
+	bcm2837-rpi-3-b.dtb \
a5169d3
+	bcm2837-rpi-3-b-plus.dtb
a5169d3
 
a5169d3
 subdir-y	+= northstar2
a5169d3
 subdir-y	+= stingray
a5169d3
diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts
a5169d3
new file mode 100644
a5169d3
index 000000000000..46ad2023cccf
a5169d3
--- /dev/null
a5169d3
+++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b-plus.dts
a5169d3
@@ -0,0 +1,2 @@
a5169d3
+// SPDX-License-Identifier: GPL-2.0
a5169d3
+#include "arm/bcm2837-rpi-3-b-plus.dts"
a5169d3
-- 
a5169d3
2.16.2
1cf4277
From patchwork Tue Feb 20 12:19:35 2018
1cf4277
Content-Type: text/plain; charset="utf-8"
1cf4277
MIME-Version: 1.0
1cf4277
Content-Transfer-Encoding: 7bit
1cf4277
Subject: [v5,5/5] ARM: dts: bcm2837-rpi-3-b: add GPIO expander
1cf4277
From: Baruch Siach <baruch@tkos.co.il>
1cf4277
X-Patchwork-Id: 10229995
1cf4277
Message-Id: <a6d59692dc4847e0b1639a26542e28c95ad5240f.1519128054.git.baruch@tkos.co.il>
1cf4277
To: Linus Walleij <linus.walleij@linaro.org>,
1cf4277
 Dave Stevenson <dave.stevenson@raspberrypi.org>,
1cf4277
 Eric Anholt <eric@anholt.net>, Stefan Wahren <stefan.wahren@i2se.com>
1cf4277
Cc: devicetree@vger.kernel.org, Baruch Siach <baruch@tkos.co.il>,
1cf4277
 linux-gpio@vger.kernel.org, Michael Zoran <mzoran@crowfest.net>,
1cf4277
 Rob Herring <robh+dt@kernel.org>, linux-rpi-kernel@lists.infradead.org,
1cf4277
 Frank Rowand <frowand.list@gmail.com>, linux-arm-kernel@lists.infradead.org
1cf4277
Date: Tue, 20 Feb 2018 14:19:35 +0200
1cf4277
1cf4277
Add a description of the RPi3 GPIO expander that the VC4 firmware controls.
1cf4277
1cf4277
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
1cf4277
---
1cf4277
 arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 17 +++++++++++++++++
1cf4277
 1 file changed, 17 insertions(+)
1cf4277
1cf4277
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
1cf4277
index 3e4ed7c5b0b3..0b31d995a066 100644
1cf4277
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
1cf4277
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
1cf4277
@@ -25,6 +25,23 @@
1cf4277
 	};
1cf4277
 };
1cf4277
 
1cf4277
+&firmware {
1cf4277
+	expgpio: gpio {
1cf4277
+		compatible = "raspberrypi,firmware-gpio";
1cf4277
+		gpio-controller;
1cf4277
+		#gpio-cells = <2>;
1cf4277
+		gpio-line-names = "BT_ON",
1cf4277
+				  "WL_ON",
1cf4277
+				  "STATUS_LED",
1cf4277
+				  "LAN_RUN",
1cf4277
+				  "HPD_N",
1cf4277
+				  "CAM_GPIO0",
1cf4277
+				  "CAM_GPIO1",
1cf4277
+				  "PWR_LOW_N";
1cf4277
+		status = "okay";
1cf4277
+	};
1cf4277
+};
1cf4277
+
1cf4277
 /* uart0 communicates with the BT module */
1cf4277
 &uart0 {
1cf4277
 	pinctrl-names = "default";
a5169d3