From patchwork Wed Nov 16 14:56:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 21110 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp184692wru; Wed, 16 Nov 2022 06:58:04 -0800 (PST) X-Google-Smtp-Source: AA0mqf6OaH1eOCREFnffC86r5G7Z9fXLHn/8wesPdo7SjCFIhuEw/pFT6IkGu37bTY3RtCo8dRaS X-Received: by 2002:a17:907:8c81:b0:7ad:902c:d158 with SMTP id td1-20020a1709078c8100b007ad902cd158mr18747023ejc.121.1668610683734; Wed, 16 Nov 2022 06:58:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668610683; cv=none; d=google.com; s=arc-20160816; b=Ixlbk3nv6iZBJBCip9703xnCfmhItcmRk2KAXcZqJAU2B7vCTEhe5ztopBPVfMiO9Y 6I+s8xNx+nUbHBvF9Nvkvpaq4qkd8RyqbgMmuyhre32p6Wa58Sbr8mlZZ97o0mf49Cxi MPje1ZjhC/zaY8s4cxpMY+XZvf4chHWjXyej9NfNwpk79j7WdP9EKZck1ty5qR04Sles s7+ahZ8n+ZE8YW8Mi7EZF2J0L5Je+7G73sb0yDvKD2pMvrURNiHfgeUYncYIsddPSamV LWSxVxIohm3QBskOeMyo/TNYJ58XmG+abZ26HMgCXUcHA8ZDdLWsvEnUOy3qQjXZ8h5A DU/A== 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=GS2vbAqgZegQHCIoU3KjPFtkFHlIisVHqOD7po3XaFA=; b=mR+R4cRUXTZ7svjUI6U2sOO9heH25H1kL4i9nXjzxod2p5iqalJF57AEEFK3X9ZFC1 XfqH9PO9NDmBb+T9cLSw9ETmw/0JGqzozdXENK0HFzgFoSBpe27GRzQi/vOPFd3Co46F YuXHqKTeRIDEHnaWr0osxIsaDDz35E9DYtSR8KSRlvAcxe+pSyrUFPg5/Psf79mpffNn NGd4zON0+hqPvnJ6b/N2h8b16dTdKDW7h4oMAKvQyxU8USqgVHnm3u7hu1OJKrtb1hh8 le+qDTsgZJOI4u4UyS1lxe96QLRf5cha+4KKpk3d+xUszOhJzFRz/YecMTjueN5kUBX7 xoTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@z3ntu.xyz header.s=z3ntu header.b=VYp1xwxu; 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 i3-20020a05640242c300b0045c7611d8ddsi16165537edc.179.2022.11.16.06.57.36; Wed, 16 Nov 2022 06:58:03 -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=VYp1xwxu; 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 S234143AbiKPO5K (ORCPT + 99 others); Wed, 16 Nov 2022 09:57:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233056AbiKPO4v (ORCPT ); Wed, 16 Nov 2022 09:56:51 -0500 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 091ED6598; Wed, 16 Nov 2022 06:56:50 -0800 (PST) Received: from g550jk.arnhem.chello.nl (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 46934D0557; Wed, 16 Nov 2022 14:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1668610608; bh=EQuJ7inTJZHxBI4FVg9vF3zI0GpW7tMV+9iGtvBVnRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VYp1xwxud0WROeLcCBKIP5BFIqM4UboYEvfNPVu0trcMcuQqy2dFhzlSbUYkUWhkp rcm8Su8QVA66HW0EyfMURxi54OZm8dFCgLXXBLdU4Ri3dm6GwSWgrHe/vk9eqcgYaW TsPkXzidCvpyGF/5F+9aJNaFq+Ly7Reeshm46/eQ= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Julian Braha , 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 2/8] arm64: dts: qcom: sdm450: Add device tree for Motorola Moto G6 Date: Wed, 16 Nov 2022 15:56:03 +0100 Message-Id: <20221116145616.17884-3-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?1749665115960340856?= X-GMAIL-MSGID: =?utf-8?q?1749665115960340856?= From: Julian Braha Add device tree for the Motorola Moto G6 (ali) smartphone. This device is based on Snapdragon 450 (sdm450) SoC which is a variant of MSM8953. Signed-off-by: Julian Braha --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sdm450-motorola-ali.dts | 256 ++++++++++++++++++ 2 files changed, 257 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index d7669a7cee9f..a0b537414593 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -115,6 +115,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sc7280-crd-r3.dtb dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-crd.dtb dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-lenovo-thinkpad-x13s.dtb dtb-$(CONFIG_ARCH_QCOM) += sda660-inforce-ifc6560.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm450-motorola-ali.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-ganges-kirin.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-nile-discovery.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-nile-pioneer.dtb diff --git a/arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts b/arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts new file mode 100644 index 000000000000..62874306fc24 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sdm450-motorola-ali.dts @@ -0,0 +1,256 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + */ +/dts-v1/; + +#include "msm8953.dtsi" +#include "pm8953.dtsi" +#include "pmi8950.dtsi" + +/ { + model = "Motorola Moto G6"; + compatible = "motorola,ali", "qcom,sdm450"; + chassis-type = "handset"; + qcom,msm-id = <338 0>; + qcom,board-id = <0x41 0xb1a0>, + <0x42 0xb1a0>, + <0x43 0xc100>, + <0x42 0xb1b0>, + <0x43 0xc200>, + <0x44 0xc200>, + <0x42 0xb200>, + <0x43 0xb200>; + + gpio-keys { + compatible = "gpio-keys"; + + key-volume-up { + label = "volume_up"; + gpios = <&tlmm 85 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + reserved-memory { + /delete-node/ memory@85b00000; + memory@84300000 { + no-map; + reg = <0x0 0x84300000 0x0 0x2000000>; + }; + + ramoops@ef000000 { + compatible = "ramoops"; + reg = <0x0 0xef000000 0x0 0xC0000>; + console-size = <0x40000>; + }; + }; + + 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@38 { + compatible = "edt,edt-ft5406"; + reg = <0x38>; + interrupt-parent = <&tlmm>; + interrupts = <65 IRQ_TYPE_EDGE_FALLING>; + vcc-supply = <&pm8953_l10>; + + pinctrl-names = "default"; + pinctrl-0 = <&ts_int_active &ts_reset_active>; + + reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>; + touchscreen-size-x = <1080>; + touchscreen-size-y = <2160>; + }; +}; + +&pm8953_resin { + linux,code = ; + status = "okay"; +}; + +&pmi8950_wled { + 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 = <795000>; + regulator-max-microvolt = <1081000>; + }; + + pm8953_s3: s3 { + regulator-min-microvolt = <1224000>; + regulator-max-microvolt = <1224000>; + }; + + pm8953_s4: s4 { + regulator-min-microvolt = <1900000>; + regulator-max-microvolt = <2050000>; + }; + + 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>; + }; + + pm8953_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8953_l6: l6 { + 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 = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + 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>; + }; + + pm8953_l23: l23 { + regulator-min-microvolt = <975000>; + regulator-max-microvolt = <1225000>; + }; + }; +}; + +&sdhc_1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on &sdc1_rclk_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off &sdc1_rclk_off>; + + status = "okay"; +}; + +&sdhc_2 { + 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>; + + status = "okay"; +}; + +&tlmm { + gpio-reserved-ranges = <95 5>, <111 1>, <126 1>; + + ts_int_active: ts-int-active-state { + pins = "gpio65"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + + ts_reset_active: ts-reset-active-state { + pins = "gpio64"; + function = "gpio"; + drive-strength = <0x08>; + bias-pull-up; + }; +}; + +&usb3 { + status = "okay"; +}; + +&usb3_dwc3 { + dr_mode = "peripheral"; +};