dts: sdm845: support the OnePlus 6 and SHIFT6mq
Add support for the OnePlus 6 and 6T devices, as well as the SHIFT6mq.
These are production devices and are based on the dragonboard845c
target. Adjust the dts Makefile to build sdm845 boards when
CONFIG_SDM845 is enabled.
These devices run u-boot as a chain-loaded bootloader and can boot Linux
via GRUB from a fat32 ESP partition.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index ec63749..8cbba92 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -604,7 +604,10 @@
dragonboard820c.dtb \
dragonboard845c.dtb \
starqltechn.dtb \
- qcs404-evb.dtb
+ qcs404-evb.dtb \
+ axolotl.dtb \
+ enchilada.dtb \
+ fajita.dtb
dtb-$(CONFIG_TARGET_STEMMY) += ste-ux500-samsung-stemmy.dtb
diff --git a/arch/arm/dts/axolotl.dts b/arch/arm/dts/axolotl.dts
new file mode 100644
index 0000000..9d6c8af
--- /dev/null
+++ b/arch/arm/dts/axolotl.dts
@@ -0,0 +1,120 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * SHIFT6mq (axolotl) board device tree source
+ *
+ * (C) Copyright 2023 Linaro
+ * Author: Caleb Connolly <caleb.connolly@linaro.org>
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/input/linux-event-codes.h>
+
+#include "sdm845.dtsi"
+#include "pm8998.dtsi"
+
+/ {
+ model = "SHIFT6mq";
+ compatible = "shift,axolotl", "qcom,sdm845", "qcom,mtp";
+
+ aliases {
+ serial0 = &uart9;
+ };
+
+ chosen {
+ stdout-path = "serial0:921600n8";
+ };
+
+ smbios {
+ compatible = "u-boot,sysinfo-smbios";
+
+ smbios {
+ system {
+ manufacturer = "SHIFT";
+ product = "SHIFT6mq";
+ };
+
+ baseboard {
+ manufacturer = "SHIFT";
+ product = "SHIFT6mq";
+ };
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key-vol-up {
+ label = "Volume Up";
+ linux,code = <KEY_UP>;
+ gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ framebuffer: framebuffer@9D400000 {
+ compatible = "simple-framebuffer";
+ reg = <0 0x9D400000 0 (2160 * 1080 * 4)>;
+ width = <1080>;
+ height = <2160>;
+ stride = <(1080 * 4)>;
+ format = "a8r8g8b8";
+ };
+};
+
+&pm8998_resin {
+ status = "okay";
+};
+
+&sdhc_2 {
+ status = "disabled";
+
+ clocks = <&gcc GCC_SDCC2_AHB_CLK>,
+ <&gcc GCC_SDCC2_APPS_CLK>;
+ clock-names = "iface", "core";
+
+ bus-width = <4>;
+ non-removable;
+};
+
+&tlmm {
+ gpio-reserved-ranges = <0 4>, <81 4>;
+};
+
+&uart9 {
+ status = "okay";
+};
+
+&ufs_mem_hc {
+ status = "okay";
+
+ reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
+};
+
+&ufs_mem_phy {
+ status = "okay";
+};
+
+&usb_1 {
+ status = "okay";
+ qcom,select-utmi-as-pipe-clk;
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+
+ /* We don't support superspeed in u-boot so remove the SSPHY */
+ phys = <&usb_1_hsphy>;
+ phy-names = "usb2-phy";
+
+ /* fastest mode for USB 2 */
+ maximum-speed = "high-speed";
+};
+
+&usb_1_hsphy {
+ /* Remove ref clk because rmphcc isn't available */
+ clocks = <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>;
+ clock-names = "cfg_ahb";
+
+ status = "okay";
+};
diff --git a/arch/arm/dts/enchilada.dts b/arch/arm/dts/enchilada.dts
new file mode 100644
index 0000000..0df9cb1
--- /dev/null
+++ b/arch/arm/dts/enchilada.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * OnePlus 6/6T (enchilada/fajita) board device tree source
+ *
+ * (C) Copyright 2023 Caleb Connolly <caleb.connolly@linaro.org>
+ *
+ */
+
+#include "sdm845-oneplus-common.dtsi"
+
+/ {
+ model = "OnePlus 6";
+ compatible = "oneplus,enchilada", "qcom,sdm845";
+};
diff --git a/arch/arm/dts/fajita.dts b/arch/arm/dts/fajita.dts
new file mode 100644
index 0000000..8125751
--- /dev/null
+++ b/arch/arm/dts/fajita.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * OnePlus 6/6T (enchilada/fajita) board device tree source
+ *
+ * (C) Copyright 2023 Caleb Connolly <caleb.connolly@linaro.org>
+ *
+ */
+
+#include "sdm845-oneplus-common.dtsi"
+
+/ {
+ model = "OnePlus 6T";
+ compatible = "oneplus,fajita", "qcom,sdm845";
+};
diff --git a/arch/arm/dts/sdm845-oneplus-common.dtsi b/arch/arm/dts/sdm845-oneplus-common.dtsi
new file mode 100644
index 0000000..2f0bd73
--- /dev/null
+++ b/arch/arm/dts/sdm845-oneplus-common.dtsi
@@ -0,0 +1,106 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * OnePlus 6/6T (enchilada/fajita) board device tree source
+ *
+ * (C) Copyright 2023 Caleb Connolly <caleb.connolly@linaro.org>
+ *
+ */
+
+/dts-v1/;
+
+#include "sdm845.dtsi"
+#include "pm8998.dtsi"
+
+/ {
+ aliases {
+ serial0 = &uart9;
+ };
+
+ chosen {
+ stdout-path = "serial0:921600n8";
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key-vol-down {
+ label = "Volume down";
+ linux,code = <KEY_VOLUMEDOWN>;
+ gpios = <&pm8998_gpios 4 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ };
+
+ key-vol-up {
+ label = "Volume up";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
+ debounce-interval = <15>;
+ };
+ };
+
+ memory@80000000 {
+ device_type = "memory";
+ reg = <0 0x80000000 0 0xffffffff
+ 1 0x80000000 0 0xfc8a0000>;
+ };
+
+ framebuffer: framebuffer@9D400000 {
+ compatible = "simple-framebuffer";
+ /*
+ * The 6T actually has a taller screen, but missing a
+ * few pixels on the bottom isn't an issue for u-boot.
+ */
+ reg = <0 0x9D400000 0 (2160 * 1080 * 4)>;
+ width = <1080>;
+ height = <2160>;
+ stride = <(1080 * 4)>;
+ format = "a8r8g8b8";
+ };
+};
+
+&pm8998_pwrkey {
+ label = "Power";
+ linux,code = <KEY_ENTER>;
+};
+
+&tlmm {
+ gpio-reserved-ranges = <0 4>, <81 4>;
+};
+
+&uart9 {
+ status = "okay";
+};
+
+&ufs_mem_hc {
+ status = "okay";
+
+ reset-gpios = <&tlmm 150 GPIO_ACTIVE_LOW>;
+};
+
+&ufs_mem_phy {
+ status = "okay";
+};
+
+&usb_1 {
+ status = "okay";
+ qcom,select-utmi-as-pipe-clk;
+};
+
+&usb_1_dwc3 {
+ dr_mode = "peripheral";
+
+ /* We don't support superspeed in u-boot so remove the SSPHY */
+ phys = <&usb_1_hsphy>;
+ phy-names = "usb2-phy";
+
+ /* fastest mode for USB 2 */
+ maximum-speed = "high-speed";
+};
+
+&usb_1_hsphy {
+ /* Remove ref clk because rmphcc isn't available */
+ clocks = <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>;
+ clock-names = "cfg_ahb";
+
+ status = "okay";
+};