From patchwork Fri Oct 21 14:24:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Austen X-Patchwork-Id: 6739 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp732363wrr; Fri, 21 Oct 2022 07:34:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7z5wAcwhZ9emwY4c8ML3+RPqUhIqkcn5Ew2fHunTf8PvhtPiMVaSoMgZHu7F3vgEZvKPu8 X-Received: by 2002:a05:6a00:1ad0:b0:564:a791:42dc with SMTP id f16-20020a056a001ad000b00564a79142dcmr4452589pfv.50.1666362885025; Fri, 21 Oct 2022 07:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666362885; cv=none; d=google.com; s=arc-20160816; b=yzdolsvi9whCeHbwyHFUMOAreWxACe9sksWtbkTlXaf6v26w0Ej95fDD8B0A+KrCQu nUlvUfxsnIOrfjFgg1FRIWdMaic/OV/dFRHlB1bSqzgZ9BVoaC9AryUr3P5zsdH0hP0H 0oKgIzDPvlN37L8jfO+EnCuXyQPHs+j3YG0YGQYebkgITGeFuWJmx1X6LZnyqrzUFt8A wm2u/IOiBdRN6R3tT8SLovU9ZBR5Kd01BHz9q1PRjo2Yn0MxOS2DicfAjjHWC8E6jJKr aznLzm1mt0Beyo7fNEOgyp2tgE0G2rUpVmNtfQGUbRz4VAxmfw8lRs6i+YJnNsS/HKXl J1pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=6HbkwIGZecGfgfeOffbwhdcCGhFuC87NVOujrNEln1o=; b=Q+ZEEkoEVhSe/uK67/FaMIXk1nOUMtk1IzY/OwfywfwFlrhN22uukGSxqTrrh33uEZ JpW5ju2GXQF8dJYSZV/rEelLZvI60/mX81HkQENtpOGsamWPJ27i5swQB1ZE8SOdDmVh uH5jDmQUfD1Bt7cQGiSqt//i0z0mZY8l3jgBFxDRtjbvdzYxXVNC3mUwqoakiaSlaycU 1gF2NcmAxVlqmPKYP835B42ugyKtwmSYNbJQKkl6m9AmErCGNJ9t6xo6Z3fDetZ/iRGK HxD8q03gz96t0JeJvTOza+rEApqc/ksWrpAsHq/l6NRCPMPhlFkrKPeE0Ue3Ncq+ZwDJ p14Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=iz8xJUqD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z20-20020aa78894000000b0053e7495a394si27605585pfe.141.2022.10.21.07.34.32; Fri, 21 Oct 2022 07:34:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=iz8xJUqD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbiJUOY7 (ORCPT + 99 others); Fri, 21 Oct 2022 10:24:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230430AbiJUOYu (ORCPT ); Fri, 21 Oct 2022 10:24:50 -0400 Received: from mail-0201.mail-europe.com (mail-0201.mail-europe.com [51.77.79.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 510293A494; Fri, 21 Oct 2022 07:24:48 -0700 (PDT) Date: Fri, 21 Oct 2022 14:24:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1666362282; x=1666621482; bh=6HbkwIGZecGfgfeOffbwhdcCGhFuC87NVOujrNEln1o=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=iz8xJUqDJ857zSzgAn+EQGT7Y87eDbDFLo/NHNcYr2v4p9KMd7CTl3w/JXduuLs8w mwrQhK23edISs6mghKB2sXJkKzQMhdzX30ippAKuRDHNd2pQgGPrGF2kYpb72BNs8n C6OqU4Mmum0fwYxTSYHygXyITMAz87glOsn59ckKX2veyjRZWQK6wZkD92DFtvp3NQ 1PuBAp3VNwduHarQoidkZD8KjW6dQX2BuBDymfsZSlDpYLZ8lOhoz3vr58qUqWMbQE HfPZpf91WNmne5MY4FY+qIj4YcOR8MRaVuZL5m9xbmigLgHEn30hw/SnRTj4UDlZAG EtvVrOTxNKRAA== To: Bjorn Andersson , Rob Herring , Krzysztof Kozlowski From: Harry Austen Cc: Harry Austen , Yassine Oudjana , Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [PATCH 4/4] arm64: dts: qcom: msm8996: add support for oneplus3(t) Message-ID: <20221021142242.129276-5-hpausten@protonmail.com> In-Reply-To: <20221021142242.129276-1-hpausten@protonmail.com> References: <20221021142242.129276-1-hpausten@protonmail.com> Feedback-ID: 53116287:user:proton MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747308128146853841?= X-GMAIL-MSGID: =?utf-8?q?1747308128146853841?= Add initial support for OnePlus 3 and 3T mobile phones. They are based on the MSM8996 SoC. Co-developed-by: Yassine Oudjana Signed-off-by: Yassine Oudjana Signed-off-by: Harry Austen --- arch/arm64/boot/dts/qcom/Makefile | 2 + .../boot/dts/qcom/msm8996-oneplus-common.dtsi | 794 ++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8996-oneplus3.dts | 44 + .../arm64/boot/dts/qcom/msm8996-oneplus3t.dts | 45 + 4 files changed, 885 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8996-oneplus3.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8996-oneplus3t.dts -- 2.38.1 diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index d7669a7cee9f..0380ac4fb196 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -33,6 +33,8 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8994-sony-xperia-kitakami-satsuki.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8994-sony-xperia-kitakami-sumire.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8994-sony-xperia-kitakami-suzuran.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8996-mtp.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8996-oneplus3.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8996-oneplus3t.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8996-sony-xperia-tone-dora.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8996-sony-xperia-tone-kagura.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8996-sony-xperia-tone-keyaki.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi new file mode 100644 index 000000000000..41eb6f28e9a4 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8996-oneplus-common.dtsi @@ -0,0 +1,794 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2022, The Linux Foundation. All rights reserved. + */ + +#include "msm8996.dtsi" +#include "pm8994.dtsi" +#include "pmi8994.dtsi" +#include "pmi8996.dtsi" +#include +#include +#include +#include +#include + +/ { + aliases { + serial0 = &blsp1_uart2; + serial1 = &blsp2_uart2; + }; + + battery: battery { + compatible = "simple-battery"; + + constant-charge-current-max-microamp = <3000000>; + voltage-min-design-microvolt = <3400000>; + }; + + chosen { + stdout-path = "serial1:115200n8"; + }; + + clocks { + compatible = "simple-bus"; + + divclk4: divclk4 { + compatible = "fixed-clock"; + pinctrl-names = "default"; + pinctrl-0 = <&divclk4_pin_a>; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "divclk4"; + }; + + div1_mclk: divclk1 { + compatible = "gpio-gate-clock"; + pinctrl-names = "default"; + pinctrl-0 = <&audio_mclk>; + #clock-cells = <0>; + clocks = <&rpmcc RPM_SMD_DIV_CLK1>; + enable-gpios = <&pm8994_gpios 15 GPIO_ACTIVE_HIGH>; + }; + }; + + reserved-memory { + ramoops@ac000000 { + compatible = "ramoops"; + reg = <0 0xac000000 0 0x200000>; + record-size = <0x20000>; + console-size = <0x100000>; + pmsg-size = <0x80000>; + }; + }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + regulator-always-on; + regulator-boot-on; + }; + + wlan_en: wlan-en-1-8v { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&wlan_en_gpios>; + regulator-name = "wlan-en-regulator"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + gpio = <&pm8994_gpios 8 GPIO_ACTIVE_HIGH>; + + /* WLAN card specific delay */ + startup-delay-us = <70000>; + enable-active-high; + }; +}; + +&adsp_pil { + status = "okay"; +}; + +&blsp1_i2c3 { + status = "okay"; + + tfa9890_amp: audio-codec@36 { + compatible = "nxp,tfa9890"; + reg = <0x36>; + #sound-dai-cells = <0>; + }; +}; + +&blsp1_i2c6 { + status = "okay"; + + bq27541: fuel-gauge@55 { + compatible = "ti,bq27541"; + reg = <0x55>; + }; +}; + +&blsp1_uart2 { + label = "BT-UART"; + status = "okay"; + uart-has-rtscts; + + bluetooth { + compatible = "qcom,qca6174-bt"; + pinctrl-names = "default"; + pinctrl-0 = <&bt_en_gpios>; + enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>; + clocks = <&divclk4>; + }; +}; + +&blsp2_i2c1 { + status = "okay"; +}; + +&blsp2_i2c6 { + status = "okay"; + + synaptics_rmi4_i2c: touchscreen@20 { + compatible = "syna,rmi4-i2c"; + reg = <0x20>; + #address-cells = <1>; + #size-cells = <0>; + interrupts-extended = <&tlmm 125 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&touch_default>; + pinctrl-1 = <&touch_suspend>; + vdd-supply = <&vreg_l22a_3p0>; + vio-supply = <&vreg_s4a_1p8>; + syna,reset-delay-ms = <200>; + syna,startup-delay-ms = <200>; + + rmi4-f01@1 { + reg = <0x1>; + syna,nosleep-mode = <1>; + }; + + rmi4-f12@12 { + reg = <0x12>; + syna,sensor-type = <1>; + touchscreen-x-mm = <68>; + touchscreen-y-mm = <122>; + }; + }; +}; + +&blsp2_uart2 { + status = "okay"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&blsp2_uart2_2pins_default>; + pinctrl-1 = <&blsp2_uart2_2pins_sleep>; +}; + +&camss { + vdda-supply = <&vreg_l2a_1p25>; +}; + +&dsi0 { + status = "okay"; + + vdda-supply = <&vreg_l2a_1p25>; + vcca-supply = <&vreg_l22a_3p0>; +}; + +&dsi0_out { + data-lanes = <0 1 2 3>; +}; + +&dsi0_phy { + status = "okay"; + + vdda-supply = <&vreg_l2a_1p25>; + vcca-supply = <&vreg_l28a_0p925>; +}; + +&gpu { + status = "okay"; +}; + +&hsusb_phy1 { + status = "okay"; + + vdd-supply = <&vreg_l28a_0p925>; + vdda-pll-supply = <&vreg_l12a_1p8>; + vdda-phy-dpdm-supply = <&vreg_l24a_3p075>; +}; + +&hsusb_phy2 { + status = "okay"; + + vdd-supply = <&vreg_l28a_0p925>; + vdda-pll-supply = <&vreg_l12a_1p8>; + vdda-phy-dpdm-supply = <&vreg_l24a_3p075>; +}; + +&mdp { + status = "okay"; +}; + +&mdss { + status = "okay"; +}; + +&mmcc { + vdd-gfx-supply = <&vdd_gfx>; +}; + +&mss_pil { + status = "okay"; + + pll-supply = <&vreg_l12a_1p8>; +}; + +&pcie0 { + status = "okay"; + perst-gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; + vddpe-3v3-supply = <&wlan_en>; + vdda-supply = <&vreg_l28a_0p925>; +}; + +&pcie_phy { + status = "okay"; + vdda-phy-supply = <&vreg_l28a_0p925>; + vdda-pll-supply = <&vreg_l12a_1p8>; +}; + +&pm8994_gpios { + bt_en_gpios: bt-en-gpios-state { + pins = "gpio19"; + function = PMIC_GPIO_FUNC_NORMAL; + output-low; + power-source = ; + qcom,drive-strength = ; + bias-pull-down; + }; + + wlan_en_gpios: wlan-en-gpios-state { + pins = "gpio8"; + function = PMIC_GPIO_FUNC_NORMAL; + output-low; + power-source = ; + qcom,drive-strength = ; + bias-pull-down; + }; + + audio_mclk: divclk1-state { + pins = "gpio15"; + function = PMIC_GPIO_FUNC_FUNC1; + power-source = ; + }; + + divclk4_pin_a: divclk4-state { + pins = "gpio18"; + function = PMIC_GPIO_FUNC_FUNC2; + bias-disable; + power-source = ; + }; +}; + +&pm8994_spmi_regulators { + qcom,saw-reg = <&saw3>; + + s9 { + qcom,saw-slave; + }; + + s10 { + qcom,saw-slave; + }; + + s11 { + qcom,saw-leader; + regulator-min-microvolt = <1140000>; + regulator-max-microvolt = <1140000>; + regulator-max-step-microvolt = <150000>; + regulator-always-on; + }; +}; + +&pmi8994_spmi_regulators { + vdd_gfx: s2 { + regulator-name = "vdd-gfx"; + regulator-min-microvolt = <980000>; + regulator-max-microvolt = <1230000>; + }; +}; + +&q6asmdai { + #address-cells = <1>; + #size-cells = <0>; + + dai@0 { + reg = <0>; + }; + + dai@1 { + reg = <1>; + }; + + dai@2 { + reg = <2>; + }; +}; + +&rpm_requests { + regulators { + compatible = "qcom,rpm-pm8994-regulators"; + + vreg_s3a_1p3: s3 { + regulator-name = "vreg_s3a_1p3"; + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + }; + + vreg_s4a_1p8: s4 { + regulator-name = "vreg_s4a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + vreg_s5a_2p15: s5 { + regulator-name = "vreg_s5a_2p15"; + regulator-min-microvolt = <2150000>; + regulator-max-microvolt = <2150000>; + }; + + vreg_s7a_0p8: s7 { + regulator-name = "vreg_s7a_0p8"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + }; + + vreg_l1a_1p0: l1 { + regulator-name = "vreg_l1a_1p0"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + }; + + vreg_l2a_1p25: l2 { + regulator-name = "vreg_l2a_1p25"; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; + regulator-allow-set-load; + }; + + vreg_l3a_1p1: l3 { + regulator-name = "vreg_l3a_1p1"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + }; + + vreg_l4a_1p225: l4 { + regulator-name = "vreg_l4a_1p225"; + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + vreg_l6a_1p2: l6 { + regulator-name = "vreg_l6a_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + vreg_l7a_1p8: l7 { + regulator-name = "vreg_l7a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vreg_l9a_1p8: l9 { + regulator-name = "vreg_l9a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vreg_l10a_1p8: l10 { + regulator-name = "vreg_l10a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vreg_l11a_1p15: l11 { + regulator-name = "vreg_l11a_1p15"; + regulator-min-microvolt = <1150000>; + regulator-max-microvolt = <1150000>; + }; + + vreg_l12a_1p8: l12 { + regulator-name = "vreg_l12a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-allow-set-load; + }; + + vreg_l13a_2p95: l13 { + regulator-name = "vreg_l13a_2p95"; + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + }; + + vreg_l16a_2p7: l16 { + regulator-name = "vreg_l16a_2p7"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; + + vreg_l17a_2p6: l17 { + regulator-name = "vreg_l17a_2p6"; + regulator-min-microvolt = <2600000>; + regulator-max-microvolt = <2600000>; + }; + + vreg_l18a_3p3: l18 { + regulator-name = "vreg_l18a_3p3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vreg_l19a_3p0: l19 { + regulator-name = "vreg_l19a_3p0"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + vreg_l20a_2p95: l20 { + regulator-name = "vreg_l20a_2p95"; + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + }; + + vreg_l21a_2p95: l21 { + regulator-name = "vreg_l21a_2p95"; + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + regulator-system-load = <200000>; + }; + + vreg_l22a_3p0: l22 { + regulator-name = "vreg_l22a_3p0"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + }; + + vreg_l23a_2p8: l23 { + regulator-name = "vreg_l23a_2p8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + + vreg_l24a_3p075: l24 { + regulator-name = "vreg_l24a_3p075"; + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + vreg_l25a_1p2: l25 { + regulator-name = "vreg_l25a_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-allow-set-load; + regulator-always-on; + }; + + vreg_l27a_1p2: l27 { + regulator-name = "vreg_l27a_1p2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + vreg_l28a_0p925: l28 { + regulator-name = "vreg_l28a_0p925"; + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <925000>; + regulator-allow-set-load; + }; + + vreg_l29a_2p8: l29 { + regulator-name = "vreg_l29a_2p8"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + + vreg_l30a_1p8: l30 { + regulator-name = "vreg_l30a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vreg_l32a_1p8: l32 { + regulator-name = "vreg_l32a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; +}; + +&slpi_pil { + status = "okay"; +}; + +&sound { + compatible = "qcom,apq8096-sndcard"; + model = "OnePlus3"; + audio-routing = "RX_BIAS", "MCLK", + "AMIC2", "MIC BIAS2", + "MIC BIAS2", "Headset Mic", + "AMIC4", "MIC BIAS1", + "MIC BIAS1", "Primary Mic", + "AMIC5", "MIC BIAS3", + "MIC BIAS3", "Noise Mic"; + + mm1-dai-link { + link-name = "MultiMedia1"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; + }; + }; + + mm2-dai-link { + link-name = "MultiMedia2"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; + }; + }; + + mm3-dai-link { + link-name = "MultiMedia3"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; + }; + }; + + mm4-dai-link { + link-name = "MultiMedia4"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>; + }; + }; + + mm5-dai-link { + link-name = "MultiMedia5"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA5>; + }; + }; + + mm6-dai-link { + link-name = "MultiMedia6"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA6>; + }; + }; + + mm7-dai-link { + link-name = "MultiMedia7"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA7>; + }; + }; + + mm8-dai-link { + link-name = "MultiMedia8"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA8>; + }; + }; + + mm9-dai-link { + link-name = "MultiMedia9"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA9>; + }; + }; + + mm10-dai-link { + link-name = "MultiMedia10"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA10>; + }; + }; + + mm11-dai-link { + link-name = "MultiMedia11"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA11>; + }; + }; + + mm12-dai-link { + link-name = "MultiMedia12"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA12>; + }; + }; + + mm13-dai-link { + link-name = "MultiMedia13"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA13>; + }; + }; + + mm14-dai-link { + link-name = "MultiMedia14"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA14>; + }; + }; + + mm15-dai-link { + link-name = "MultiMedia15"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA15>; + }; + }; + + mm16-dai-link { + link-name = "MultiMedia16"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA16>; + }; + }; + + slim-dai-link { + link-name = "SLIM Playback"; + + cpu { + sound-dai = <&q6afedai SLIMBUS_6_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9335 AIF4_PB>; + }; + }; + + slimcap-dai-link { + link-name = "SLIM Capture"; + + cpu { + sound-dai = <&q6afedai SLIMBUS_0_TX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9335 AIF1_CAP>; + }; + }; + + speaker-dai-link { + link-name = "Speaker"; + + cpu { + sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; + }; + + codec { + sound-dai = <&tfa9890_amp>; + }; + }; +}; + +&tlmm { + gpio-reserved-ranges = <81 4>; + + mdss_dsi_active: mdss-dsi-active-state { + pins = "gpio8"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + + mdss_dsi_suspend: mdss-dsi-suspend-state { + pins = "gpio8"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + }; + + mdss_te_active: mdss-te-active-state { + pins = "gpio10"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + mdss_te_suspend: mdss-te-suspend-state { + pins = "gpio10"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-pull-down; + }; + + touch_default: touch-default-state { + pins = "gpio89", "gpio125", "gpio49"; + function = "gpio"; + drive-strength = <16>; + bias-pull-up; + }; + + touch_suspend: touch-suspend-state { + pins = "gpio89", "gpio125", "gpio49"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; +}; + +&ufsphy { + status = "okay"; + + vdda-phy-supply = <&vreg_l28a_0p925>; + vdda-pll-supply = <&vreg_l12a_1p8>; + vddp-ref-clk-supply = <&vreg_l25a_1p2>; +}; + +&ufshc { + status = "okay"; + + vcc-supply = <&vreg_l20a_2p95>; + vccq-supply = <&vreg_l25a_1p2>; + vccq2-supply = <&vreg_s4a_1p8>; + + vcc-max-microamp = <600000>; + vccq-max-microamp = <450000>; + vccq2-max-microamp = <450000>; +}; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + phys = <&hsusb_phy1>; + phy-names = "usb2-phy"; + + maximum-speed = "high-speed"; +}; + +&venus { + status = "okay"; +}; + +&wcd9335 { + clock-names = "mclk", "slimbus"; + clocks = <&div1_mclk>, + <&rpmcc RPM_SMD_BB_CLK1>; + + vdd-buck-supply = <&vreg_s4a_1p8>; + vdd-buck-sido-supply = <&vreg_s4a_1p8>; + vdd-tx-supply = <&vreg_s4a_1p8>; + vdd-rx-supply = <&vreg_s4a_1p8>; + vdd-io-supply = <&vreg_s4a_1p8>; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8996-oneplus3.dts b/arch/arm64/boot/dts/qcom/msm8996-oneplus3.dts new file mode 100644 index 000000000000..e583ac788efd --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8996-oneplus3.dts @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2022, The Linux Foundation. All rights reserved. + */ + +/dts-v1/; + +#include "msm8996-oneplus-common.dtsi" + +/ { + model = "OnePlus 3"; + compatible = "oneplus,oneplus3", "qcom,msm8996"; + chassis-type = "handset"; + qcom,board-id = <8 0 15801 15>, <8 0 15801 16>; + qcom,msm-id = <246 0x30001>; +}; + +&adsp_pil { + firmware-name = "qcom/msm8996/oneplus3/adsp.mbn"; +}; + +&battery { + charge-full-design-microamp-hours = <3000000>; + voltage-max-design-microvolt = <4350000>; +}; + +&gpu { + zap-shader { + firmware-name = "qcom/msm8996/oneplus3/a530_zap.mbn"; + }; +}; + +&mss_pil { + firmware-name = "qcom/msm8996/oneplus3/mba.mbn", + "qcom/msm8996/oneplus3/modem.mbn"; +}; + +&slpi_pil { + firmware-name = "qcom/msm8996/oneplus3/slpi.mbn"; +}; + +&venus { + firmware-name = "qcom/msm8996/oneplus3/venus.mbn"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8996-oneplus3t.dts b/arch/arm64/boot/dts/qcom/msm8996-oneplus3t.dts new file mode 100644 index 000000000000..8903c7ea1627 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8996-oneplus3t.dts @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2022, The Linux Foundation. All rights reserved. + */ + +/dts-v1/; + +#include "msm8996-oneplus-common.dtsi" + +/ { + model = "OnePlus 3T"; + compatible = "oneplus,oneplus3t", "qcom,msm8996"; + chassis-type = "handset"; + qcom,board-id = <8 0 15811 26>, + <8 0 15811 27>, + <8 0 15811 28>; +}; + +&adsp_pil { + firmware-name = "qcom/msm8996/oneplus3t/adsp.mbn"; +}; + +&battery { + charge-full-design-microamp-hours = <3400000>; + voltage-max-design-microvolt = <4400000>; +}; + +&gpu { + zap-shader { + firmware-name = "qcom/msm8996/oneplus3t/a530_zap.mbn"; + }; +}; + +&mss_pil { + firmware-name = "qcom/msm8996/oneplus3t/mba.mbn", + "qcom/msm8996/oneplus3t/modem.mbn"; +}; + +&slpi_pil { + firmware-name = "qcom/msm8996/oneplus3t/slpi.mbn"; +}; + +&venus { + firmware-name = "qcom/msm8996/oneplus3t/venus.mbn"; +};