From patchwork Wed Nov 16 14:56:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 21111 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp184707wru; Wed, 16 Nov 2022 06:58:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf7Px1ozv8Ml49L+wPAL1LtNzYuJsAplTX3bkP2JWTH55dSwWCG16RBtiRhAX+MWbt/81ARN X-Received: by 2002:a17:907:8b8c:b0:7b2:7b45:2cd1 with SMTP id tb12-20020a1709078b8c00b007b27b452cd1mr4760062ejc.358.1668610686905; Wed, 16 Nov 2022 06:58:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668610686; cv=none; d=google.com; s=arc-20160816; b=obmF3+BUHrZs6jCHmMPn5/c/zkKOPGQ5CzNErJjL8sre5GD1t0yCKr9/FlmQqDSFn7 5bWuvBloKNr6GiSSlmqyBB2c3sCTK+SyG1iG1rmiO+iy6ldWhfcNV8GeC+4FdBNh4fLQ 25qnclW/uOHYheZy+/Wh7eoohRZWdxN16nMO19dfdyo6BdgzQzT2Tos+pwFJvBS7S4yF NYOUDcmiTA8nyEl+udT2KKz9sAVLgqpiom2kdK2FClJbG7Q/GqQctZMM+MAjogO6aI0N /Iac3Csa3cWEliOUqbLj5OLHkOBx/3cHc/a+5tLqoG08ffB9O4F/Npvt5rol/0cA3sGv uLgA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MO5x+t7m/3dt+rCA1fysCeEIfjMatc8GRD84Ysas1lM=; b=W0ugbpCaBTmFpPTeJbVHBk/a2AAEFylApwu6hWbh7u5I5xH9WFDyy+Kv/30qsR4mLX JXpPX5IiGH9HiPPoDd1GDOhowZbrIYfqMOVAk9b5ZlVeJSxtOD95sVPbeIvUqxMzTFmO PnS50f/cSxo7BdrkrXMbfBS9kPC6JwlhRFK7Mura4XqRGsQb9novQt2CQkpuWqBLWaMP c16tV3f9YDmP9gEOrLOVD1QheIXybmiWUA5kBP+oa6WlckLyirgT5LxOxsq1fCjMCceF HvPaLbmdWQrVdLd2v/GdLRpOCHKfwwh3ATakoeMQdv6NBF348Ce01FnFMymZ+ujcaUtg VMeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=ExhTDW19; 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 du1-20020a17090772c100b007317ad1f9a4si2239058ejc.310.2022.11.16.06.57.40; Wed, 16 Nov 2022 06:58:06 -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=ExhTDW19; 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 S233297AbiKPO5N (ORCPT + 99 others); Wed, 16 Nov 2022 09:57:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233058AbiKPO4w (ORCPT ); Wed, 16 Nov 2022 09:56:52 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7557C2BB39; Wed, 16 Nov 2022 06:56:51 -0800 (PST) Received: from g550jk.arnhem.chello.nl (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 9DFDAD05CC; Wed, 16 Nov 2022 14:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1668610610; bh=hywByYPav5fUKNWL3ucbqd2Cdn2PppX2w4WdprgXMUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ExhTDW19Wl8tmSZfTvCko0CFYKVZL10IA/hthV3XsN+XeWpXYhVZIzfpPEg2wZNkw x2/+wwWonbgi6GTg0i2xkjcEXwfuWsfgj/P8NpRwjSVtojLImkrWivxXHBliPobD4v KhE+rlkLW3VhhD4w1NpgQPrJmR5S6z7jyy9slqYA= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Sireesh Kodali , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: [PATCH 3/8] arm64: dts: qcom: msm8953: Add device tree for Motorola G5 Plus Date: Wed, 16 Nov 2022 15:56:04 +0100 Message-Id: <20221116145616.17884-4-luca@z3ntu.xyz> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221116145616.17884-1-luca@z3ntu.xyz> References: <20221116145616.17884-1-luca@z3ntu.xyz> MIME-Version: 1.0 X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_NONE,SPF_PASS autolearn=no 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?1749665119172808353?= X-GMAIL-MSGID: =?utf-8?q?1749665119172808353?= From: Sireesh Kodali Add device tree for the Motorola G5 Plus (potter) smartphone. This device is based on Snapdragon 625 (msm8953) SoC. Signed-off-by: Sireesh Kodali --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/msm8953-motorola-potter.dts | 306 ++++++++++++++++++ 2 files changed, 307 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8953-motorola-potter.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index a0b537414593..21a6a7b5a2cf 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -21,6 +21,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-j5.dtb 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) += msm8992-lg-bullhead-rev-10.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8992-lg-bullhead-rev-101.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8992-msft-lumia-octagon-talkman.dtb diff --git a/arch/arm64/boot/dts/qcom/msm8953-motorola-potter.dts b/arch/arm64/boot/dts/qcom/msm8953-motorola-potter.dts new file mode 100644 index 000000000000..3957dabf651e --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8953-motorola-potter.dts @@ -0,0 +1,306 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2022 The Linux Foundation. All rights reserved. + */ +/dts-v1/; + +#include "msm8953.dtsi" +#include "pm8953.dtsi" +#include "pmi8950.dtsi" + +/ { + model = "Motorola G5 Plus"; + compatible = "motorola,potter", "qcom,msm8953"; + chassis-type = "handset"; + qcom,msm-id = <293 0>; + qcom,board-id = <0x46 0x83a0>; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer@90001000 { + compatible = "simple-framebuffer"; + reg = <0 0x90001000 0 (2220 * 1920 * 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 { + /delete-node/ memory@85b00000; + + memory@84300000 { + reg = <0x0 0x84300000 0x0 0x2000000>; + no-map; + }; + + memory@90001000 { + reg = <0x0 0x90001000 0x0 (1080 * 1920 * 3)>; + no-map; + }; + + memory@aefd2000 { + reg = <0x0 0xaefd2000 0x0 0x2e000>; + no-map; + }; + + memory@eefe4000 { + reg = <0x0 0xeefe4000 0x0 0x1c000>; + no-map; + }; + + ramoops@ef000000 { + compatible = "ramoops"; + reg = <0x0 0xef000000 0x0 0x80000>; + console-size = <0x40000>; + ftrace-size = <0>; + record-size = <0x3f800>; + pmsg-size = <0x800>; + }; + }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + 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_3 { + status = "okay"; + + touchscreen@20 { + reg = <0x20>; + compatible = "syna,rmi4-i2c"; + + interrupt-parent = <&tlmm>; + interrupts = <65 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&ts_reset>; + + vdd-supply = <&pm8953_l22>; + vio-supply = <&pm8953_l6>; + + syna,reset-delay-ms = <200>; + syna,startup-delay-ms = <500>; + }; +}; + +&pm8953_resin { + linux,code = ; + status = "okay"; +}; + +&pmi8950_wled { + qcom,current-limit-microamp = <25000>; + qcom,num-strings = <3>; + qcom,external-pfet; + qcom,cabc; + + 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>; + + 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 = <1000000>; + regulator-max-microvolt = <1000000>; + }; + + pm8953_l3: l3 { + regulator-min-microvolt = <925000>; + regulator-max-microvolt = <925000>; + regulator-allow-set-load; + }; + + pm8953_l5: l5 { + /* May fix sdcard detection */ + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8953_l6: l6 { + regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + 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 = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8953_l11: l11 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <3000000>; + }; + + pm8953_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + }; + + pm8953_l13: l13 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3125000>; + }; + + pm8953_l15: l15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8953_l16: l16 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8953_l17: l17 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <3000000>; + }; + + pm8953_l19: l19 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1350000>; + }; + + pm8953_l22: l22 { + regulator-always-on; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2850000>; + }; + + 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 { + cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_off>; + pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; + + vmmc-supply = <&pm8953_l11>; + vqmmc-supply = <&pm8953_l12>; + + status = "okay"; +}; + +&tlmm { + gpio-reserved-ranges = <1 2>, <96 4>, <111 1>, <126 1>; + + ts_reset: ts-reset-state { + pins = "gpio64"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; +}; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + dr_mode = "peripheral"; +};