From patchwork Wed Dec 7 18:30:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 30982 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp344568wrr; Wed, 7 Dec 2022 10:33:37 -0800 (PST) X-Google-Smtp-Source: AA0mqf7x3K2qr90k99uEaRfRsJmIx05j8WRGV2ZI3uNi84+fgbUMkJ+LSNkiT6/bxmOM0jNq3Bsu X-Received: by 2002:a17:906:114a:b0:7c0:c836:e586 with SMTP id i10-20020a170906114a00b007c0c836e586mr19541595eja.750.1670438017092; Wed, 07 Dec 2022 10:33:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670438017; cv=none; d=google.com; s=arc-20160816; b=DmtNUBDNqbMPN8Y2Q+gxkYEUxhkhJBrely+jAIZKF1RiC3n9sWC+YDII9stZxLhB5l mGDMd6CSXimpmujDlKh3rGzmGJV3LO4yjdcBkhTiMoNovfL60R3XCCsYWJQ9dUpek/Ic OZkT8tuHrrK3O9EvIoIzEYXkVYplPu33GNIt6gjC4j+NHoUEbIpTFwbV5ib24i4/hYiy pfuV7hnCHa3LTxjxS4YeolVzE761vbiR3dx22AGBhY4ceA+fB8btJGdqb+G/wyExSnt7 lMdGoTm5WUfwb74ONw9kvgrCovYIe+FE1nT1MWLaBQKaGNMRIWxJ/tyYldWFU6C2G3vA Lc3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ZYeAwd9QJx1YQVtN9KJWBBQTZs4oAqJ32qOYydrNkwU=; b=kcUHBLR/+/a+jSPFOnCImL/MwFLkR+cst2RYwpcF7JexnAQbjF7iARImhqhLrgQ/0u mylgzsykRXQ8Hzp3HLyxLbzX0qAsMXuqudpRjaqCtFqdNUUGIaEFKa0pm+Vm7V7uJG3e NyRyjN8B4QHehox8Lvc68yCToCbcAEFhCvaLRLbwmPLews0tiLqgT/uFWZnzXCANy7Kr rESJIuDmKUzHeeXtUqjjuNuQuItFYRaAByCc0TuziqpoaNPophZ1fsiQoUGiDAOcC+OK izsZ1mH8kmhdkhLmrhunchmAi7L5daJz5pV2ehJxBUtSttyASzG3mP9PS/evzKUO1FFj KJBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=eZGS4+q8; 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=fail (p=NONE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a056402070a00b0045782fcb80asi4214851edx.225.2022.12.07.10.33.14; Wed, 07 Dec 2022 10:33:37 -0800 (PST) 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=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=eZGS4+q8; 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=fail (p=NONE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229915AbiLGScH (ORCPT + 99 others); Wed, 7 Dec 2022 13:32:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbiLGSbd (ORCPT ); Wed, 7 Dec 2022 13:31:33 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B05A36E56B; Wed, 7 Dec 2022 10:31:32 -0800 (PST) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id E72ADCA471; Wed, 7 Dec 2022 18:31:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1670437861; bh=pbfn08dGG7YdLfcGfId7UXFTZ+EKF8vVg0ELk+o0V98=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=eZGS4+q8WRBBHIIgpA8+rtEvlTgFUhScX2pwqyphA4X7C8xPkxu2jkJErasVv/C1X lPJeQUs5X6pIPr2ghvlHsPzBWl7syp3j7nGIr9H8CddlqCUdQ9JxuFnZqqbzxusPia kNodx3Yfb8ZgYpgZuXPl95g4zfoboLvPP6zXclio= From: Luca Weiss Date: Wed, 07 Dec 2022 19:30:43 +0100 Subject: [PATCH v3 6/9] arm64: dts: qcom: msm8953: Add device tree for Xiaomi Redmi Note 4X MIME-Version: 1.0 Message-Id: <20221207-msm8953-6-1-next-dtbs-v3-v3-6-a64b3b0af0eb@z3ntu.xyz> References: <20221207-msm8953-6-1-next-dtbs-v3-v3-0-a64b3b0af0eb@z3ntu.xyz> In-Reply-To: <20221207-msm8953-6-1-next-dtbs-v3-v3-0-a64b3b0af0eb@z3ntu.xyz> To: Krzysztof Kozlowski , Rob Herring , Konrad Dybcio , Kees Cook , "Guilherme G. Piccoli" , Andy Gross , Bjorn Andersson , Tony Luck Cc: Gabriela David , Eugene Lepshy , linux-hardening@vger.kernel.org, Anton Bambura , Krzysztof Kozlowski , Luca Weiss , Adam Skladowski , ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, Danila Tikhonov , Gianluca Boiano , Sireesh Kodali , Vladimir Lypak , Julian Braha , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alejandro Tafalla X-Mailer: b4 0.10.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=8569; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=Q1UcI4yYtZABwNd6z7oomNy8iSPUOyOpZsvZ3v/13tM=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBjkNveeNdMbYmM6Cam7fHWqgH9+/4+o46zAKo0If7L Yz7k+GeJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCY5Db3gAKCRBy2EO4nU3XVrvMD/ 9VABY4nRxCU1hUCDfEZVO+gUgCWvSGT61+rXqMG0j6NvEdpHYfDHc6OMdWDHzztVa2TJY8M7jpB0l7 CnIRJGd67ooEJUUZdz9arJta+jBcUej6v5RYMyN11KEbE1trT6GKiNO+qnSFG+3yG8BMaHnqry28/d PqfJCcRXbpbKiN3LRjrK8iq/CHsUDsDw6yko52GfhpbTZRsw4H0zFptWknECeYizZBpxHYUzJIEwx6 5vdHL8kfEHOU1wWXxbdG22thY1dROZIwVxasOfmPVOsJLT/986Wf12YnkhZpfkrbFb4BrDTZTZOo2M ++SgSPmV3u1Xsg1pr2NjEylecesvzX+tKT99fwWCCbwAKVV3xAFQhSjOCLg8BBiEJbohjW9CNJ1TRE khp2Wki3MNhEAStH2Ttwkb9meUf5QgkbheUzaluApRxb8ziWClEUbWP6CcwtwNVSuvOabz77b0q+Qm CoTsnkgBAcFSD6JrH8F3dMX0Jy+7jjiN8AjNoxIJTYYKvPBCiNYa2YxiUKV4vETmHsgFNdjnS3GdHJ PCN9/s4SR6840b2Rjto759VFr8ghcr/mRAGeWWTj492maPh1dVuOdj5SWKw58OUCPAUOrlPmpOA2Sb UjFnN2Iqvh8oKpf+q/G8nMDszk3n+82RGEi5bgBXjO0ZEVa1fMcE+9bRMvAA== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, SPF_HELO_NONE,SPF_PASS,T_PDS_OTHER_BAD_TLD autolearn=ham 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?1751581214533331909?= X-GMAIL-MSGID: =?utf-8?q?1751581214533331909?= From: Adam Skladowski Add device tree for the Xiaomi Redmi Note 4X (mido) smartphone. This device is based on Snapdragon 625 (msm8953) SoC. Signed-off-by: Adam Skladowski Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/Makefile | 1 + arch/arm64/boot/dts/qcom/msm8953-xiaomi-mido.dts | 329 +++++++++++++++++++++++ 2 files changed, 330 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index f5976bfc5ff0..2ae3cf2522b8 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -23,6 +23,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-serranove.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-wingtech-wt88047.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8953-motorola-potter.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8953-xiaomi-daisy.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8953-xiaomi-mido.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8956-sony-xperia-loire-kugo.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8956-sony-xperia-loire-suzu.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8992-lg-bullhead-rev-10.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8953-xiaomi-mido.dts b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-mido.dts new file mode 100644 index 000000000000..ed95d09cedb1 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8953-xiaomi-mido.dts @@ -0,0 +1,329 @@ +// SPDX-License-Identifier: BSD-3-Clause +/dts-v1/; + +#include "msm8953.dtsi" +#include "pm8953.dtsi" +#include "pmi8950.dtsi" +#include + +/delete-node/ &cont_splash_mem; +/delete-node/ &qseecom_mem; + +/ { + model = "Xiaomi Redmi Note 4X"; + compatible = "xiaomi,mido", "qcom,msm8953"; + chassis-type = "handset"; + qcom,msm-id = <293 0>; + qcom,board-id = <11 0>; + + aliases { + mmc0 = &sdhc_1; + mmc1 = &sdhc_2; + }; + + speaker_amp: audio-amplifier { + compatible = "awinic,aw8738"; + mode-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; + awinic,mode = <5>; + sound-name-prefix = "Speaker Amp"; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer@90001000 { + compatible = "simple-framebuffer"; + reg = <0 0x90001000 0 (1920 * 1080 * 3)>; + + width = <1080>; + height = <1920>; + stride = <(1080 * 3)>; + format = "r8g8b8"; + + power-domains = <&gcc MDSS_GDSC>; + + clocks = <&gcc GCC_MDSS_AHB_CLK>, + <&gcc GCC_MDSS_AXI_CLK>, + <&gcc GCC_MDSS_VSYNC_CLK>, + <&gcc GCC_MDSS_MDP_CLK>, + <&gcc GCC_MDSS_BYTE0_CLK>, + <&gcc GCC_MDSS_PCLK0_CLK>, + <&gcc GCC_MDSS_ESC0_CLK>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_key_default>; + + key-volume-up { + label = "Volume Up"; + gpios = <&tlmm 85 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + reserved-memory { + qseecom_mem: qseecom@84a00000 { + reg = <0x0 0x84a00000 0x0 0x1900000>; + no-map; + }; + + cont_splash_mem: cont-splash@90001000 { + reg = <0x0 0x90001000 0x0 (1080 * 1920 * 3)>; + no-map; + }; + + ramoops@9ff00000 { + compatible = "ramoops"; + reg = <0x0 0x9ff00000 0x0 0x00100000>; + console-size = <0x100000>; + }; + }; + + 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; + }; +}; + +&hsusb_phy { + vdd-supply = <&pm8953_l3>; + vdda-pll-supply = <&pm8953_l7>; + vdda-phy-dpdm-supply = <&pm8953_l13>; + + status = "okay"; +}; + +&i2c_2 { + status = "okay"; + + led-controller@45 { + compatible = "awinic,aw2013"; + reg = <0x45>; + + vcc-supply = <&pm8953_l10>; + + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_INDICATOR; + led-max-microamp = <5000>; + }; + + led@1 { + reg = <1>; + color = ; + function = LED_FUNCTION_INDICATOR; + led-max-microamp = <5000>; + }; + + led@2 { + reg = <2>; + color = ; + function = LED_FUNCTION_INDICATOR; + led-max-microamp = <5000>; + }; + }; +}; + +&i2c_3 { + status = "okay"; + + touchscreen@38 { + compatible = "edt,edt-ft5406"; + reg = <0x38>; + + interrupt-parent = <&tlmm>; + interrupts = <65 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&ts_int_active>; + + reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>; + + vcc-supply = <&pm8953_l10>; + + touchscreen-size-x = <1080>; + touchscreen-size-y = <1920>; + }; +}; + +&pm8953_resin { + linux,code = ; + status = "okay"; +}; + +&rpm_requests { + regulators { + compatible = "qcom,rpm-pm8953-regulators"; + + vdd_s1-supply = <&vph_pwr>; + vdd_s2-supply = <&vph_pwr>; + vdd_s3-supply = <&vph_pwr>; + vdd_s4-supply = <&vph_pwr>; + vdd_s5-supply = <&vph_pwr>; + vdd_s6-supply = <&vph_pwr>; + vdd_s7-supply = <&vph_pwr>; + vdd_l1-supply = <&pm8953_s3>; + vdd_l2_l3-supply = <&pm8953_s3>; + vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>; + vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>; + vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>; + vdd_l23-supply = <&pm8953_s3>; + + pm8953_s1: s1 { + regulator-min-microvolt = <863000>; + regulator-max-microvolt = <1152000>; + }; + + pm8953_s3: s3 { + regulator-min-microvolt = <1224000>; + regulator-max-microvolt = <1224000>; + }; + + pm8953_s4: s4 { + regulator-min-microvolt = <1896000>; + regulator-max-microvolt = <2048000>; + }; + + pm8953_l1: l1 { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1100000>; + }; + + pm8953_l2: l2 { + regulator-min-microvolt = <975000>; + regulator-max-microvolt = <1225000>; + }; + + pm8953_l3: l3 { + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <925000>; + regulator-allow-set-load; + }; + + pm8953_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8953_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + pm8953_l7: l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1900000>; + }; + + pm8953_l8: l8 { + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <2900000>; + }; + + pm8953_l9: l9 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + }; + + pm8953_l10: l10 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + regulator-always-on; + }; + + pm8953_l11: l11 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + }; + + pm8953_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8953_l13: l13 { + regulator-min-microvolt = <3125000>; + regulator-max-microvolt = <3125000>; + }; + + pm8953_l16: l16 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8953_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + pm8953_l19: l19 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1350000>; + }; + + pm8953_l22: l22 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2850000>; + regulator-always-on; + }; + + pm8953_l23: l23 { + regulator-min-microvolt = <975000>; + regulator-max-microvolt = <1225000>; + }; + }; +}; + +&sdhc_1 { + vmmc-supply = <&pm8953_l8>; + vqmmc-supply = <&pm8953_l5>; + + status = "okay"; +}; + +&sdhc_2 { + vmmc-supply = <&pm8953_l11>; + vqmmc-supply = <&pm8953_l12>; + + cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; + + status = "okay"; +}; + +&tlmm { + gpio-reserved-ranges = <0 4>, <135 4>; + + ts_int_active: ts-int-active-state { + pins = "gpio65"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; +}; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + dr_mode = "peripheral"; +};