From patchwork Thu Jan 5 12:32:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39515 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp284998wrt; Thu, 5 Jan 2023 04:54:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXtwLZln2ObE3DZbBSbaGnkvyKJjm/nV0EeAJuMuI8+hJNSyodc8tAbPwFTxDwbgKW9JO8am X-Received: by 2002:a17:903:230c:b0:192:64a9:62f5 with SMTP id d12-20020a170903230c00b0019264a962f5mr64280708plh.29.1672923267524; Thu, 05 Jan 2023 04:54:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923267; cv=none; d=google.com; s=arc-20160816; b=yca2V/g5H11ivhSSZDaClNe+BF7ZmEJdOnth7JssRVup8cc+7vQFWVsCKk8sQFrn5V m5JsbPS3Ke1hAQ/phOiXTENoed7ENVSPRm+q8MXHADw9h6x2OHd6ZC4E1gG7j0czqxDk 6z9V6/YYiqTGyPs3eNJtAktVY8ZV9mbC/ABdK/lUKBYFSTmXYy5HGLkAHJFngxHEz3cV uzd8jrDXNjLtnYIl5jHo2tvTqvdZ5HxLG2PGMTKjplwWtPMNISMtX2HkCBQ26QyXnw/I 2FtdfI8ca7QSV6e1vJEKubDDIsWkePACpuK6jxPcQupw2OguerSNqUFql+iT0He5hqAw tTZw== 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=83FquTRokVnTP71iD11cDdSLP2uOZyC0cBrOwzBxDA0=; b=hQt0I+Bch7iOk1tBesGOmxIi6f36YljOycixBN726Wb7Pfhq4vvzBKIKzgiCWwZ9c5 clMTWIcy/EpclbZIkZ92hr1z0lo5Be+9q4YRtNO/AVxoWOyHiKsnAPOXU2uvc97stSMM isWiXPbKZlfLO6Jzt5/PKD9OiEU5XaYzyguRGN8NIEYvczFJitvZJcfZXoG5iwK5Y9Vt sSIwdYUDQOOBHIQijd1OhnicqVtBiNwhda+d+KVOqkO5cf/JcqAun+/JPzLVyJN+ygn3 2m1c/TPnbteEhqmWAu8hdYy/HbII2O2oj8pXU2j6teJzRTt9LQWfYWwDCjSqh4oe22Zr 4+Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=B3TJdvGO; 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=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a170902f55000b001926fcc7389si30813487plf.424.2023.01.05.04.54.14; Thu, 05 Jan 2023 04:54:27 -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=pass header.i=@trvn.ru header.s=mail header.b=B3TJdvGO; 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=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233392AbjAEMvx (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233328AbjAEMv2 (ORCPT ); Thu, 5 Jan 2023 07:51:28 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D2B54C713; Thu, 5 Jan 2023 04:51:26 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 6B094420BF; Thu, 5 Jan 2023 17:33:55 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922035; bh=o3SCIwB57u07TGO8NaHF0ZGaBCw07mfya4J9zUVafwA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B3TJdvGOF6JjP5ilD+522NW/BVSSI0hd9Y06yWNtu2fkVmt1t+eeBewVOP5w54+YG sL657ZZg2qFGqV1qSGaJ7vCGmcNr1FWsb7r8pYwRbvzX3J7v24q0qNmxO125V8OQqQ XWhqSKYtnGgkIHPok9qgULY2iK3iXjfdjK3C79QTDQ7zlYtQLTmAd6veFGe3I/4WHC LCxG7KpfyMsgqFNjCu8pn2R/mzjE5Nn2CaKOmhZj58eUzJj4Zz8P+U9LWcZWEGaJh9 DUiwI8LmHwmteRpglBpdMiO6vHxu7jeXpZWhNDTzTvIk0PCWrCEQ6Ok/VSen8n92yK bcXFyYMWP1A2Q== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 1/8] dt-bindings: qcom: Document samsung,gt58 and gt510 Date: Thu, 5 Jan 2023 17:32:33 +0500 Message-Id: <20230105123240.1089375-2-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> 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,SPF_HELO_PASS,SPF_PASS 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?1754187187787995920?= X-GMAIL-MSGID: =?utf-8?q?1754187187787995920?= gt58 and gt510 are Samsung Galaxy Tab A 8.0/9.7 (2015) tablets. Document their compatibles. Signed-off-by: Nikita Travkin Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml index 65ef7e442da0..6231df1cc14c 100644 --- a/Documentation/devicetree/bindings/arm/qcom.yaml +++ b/Documentation/devicetree/bindings/arm/qcom.yaml @@ -207,6 +207,8 @@ properties: - samsung,e5 - samsung,e7 - samsung,grandmax + - samsung,gt510 + - samsung,gt58 - samsung,j5 - samsung,serranove - wingtech,wt88047 From patchwork Thu Jan 5 12:32:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39509 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp284626wrt; Thu, 5 Jan 2023 04:53:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuYA8dw00MWgF/ZsH2uYyNcCt66yW1pVWxq6XbWW6CsQ6wRlFR4cbyUXIiUClsHkwGndd3H X-Received: by 2002:a17:90a:4401:b0:21d:6327:ab6 with SMTP id s1-20020a17090a440100b0021d63270ab6mr53099646pjg.1.1672923192014; Thu, 05 Jan 2023 04:53:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923191; cv=none; d=google.com; s=arc-20160816; b=vokh7/vPpP+fKk/UfO+i6KmU7V+TOgcsMKlTfBEjrwgdNfoqmNcdtcWuw9/ePqnREV M/96hyEd8B7a29bpXtMQFx6ClBJM7bHp5q3pJi//ss4Sl1DlgiQ9gTK/48K6a43FeH6+ s3RHO9lkQ/X6mi6X7sjUIe1AstciFXEBjjMB4CyEqZASPOLVsk2I6bkrI33f+kbut/MG gTL4Zwqh/TnOKhpw00UQdJYdRrQd0kclZh1+0fcxgjxznqLIsp9bQ9MswJX4GsLIAnDD 8nbI9KH1fJJeB3K6tiNi78twA3/hwtTzkmxVgLR5F1lZD7RyK8zfjU48FzxekJSq8LKd UXog== 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=XgN3f5kwcXHN7q2ZApfOg8AWUE9gfQFZlWkn0qrOFgQ=; b=hTqWpyXn6US1QGGKnsIpKuo1DF0/DWUyqhDjpDpsIOn1EZkyAX4TM2t462K1KglHoK MvHIOpFAazHL6Ih+SsL717PBVtD5XwiXj+orVP0vhwllmHUCAjNIshIcbEmxMy/subZI lQbyrXxWl2wOX4Qbh/JojQrKo+GFk1QbrzafJTUFEo4NEWQCxCQa1SBCPYv4Zpt/oqaR ylmhGO89hSkkt/XolrujuMkkbKRirRFB98qcPHbM/Q33A7O1OtoYDVChya0JdBLWMBqp rN1ydFZBGwN0TXZZfDSPzwTujUkhbE0Upi8pyeEQBFSemEv4EJ0ABMVRBVKnAEGH2bAV 9Gww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=1onlXCH2; 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=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nn9-20020a17090b38c900b00221621362d7si2047376pjb.17.2023.01.05.04.52.58; Thu, 05 Jan 2023 04:53:11 -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=pass header.i=@trvn.ru header.s=mail header.b=1onlXCH2; 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=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232465AbjAEMv3 (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232298AbjAEMvY (ORCPT ); Thu, 5 Jan 2023 07:51:24 -0500 X-Greylist: delayed 1043 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 05 Jan 2023 04:51:22 PST Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91AD948CD7; Thu, 5 Jan 2023 04:51:22 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 19899420CD; Thu, 5 Jan 2023 17:33:56 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922036; bh=oPZ1t+DpMVviHoMdVYbzlv1d7V7KYP6byecE4ht5AYA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1onlXCH2a88j7Kp/Yx0oDp82WiXbP40Se/FpM7OWMX/4VdchZorGFybOsjv3hZLcc nhL0yQ+3VRC4nsxd05KhxijG83jRclOVK+Ef8TJEfTOzumbdi+URpStyP59q/uyMao mQ5wN9zJJvtOFQtdC9m9VtmpqENCUKDpaqAVfjPZHGRibj1C2NrSC0fzwxszdLtj2K 6lKpkLf+gDoBfgjx52/0A+ztL8LWgPYfLi73JTlLN4IZSkskCXlUq2PuFKmS2/7tqF n1HI8zBX3Xt+77qeeGcZrdN6mmbDoZn45Ggw1SqBulJLQDrH4SyKZn4e+9v9dQmPc9 gHc7psBhjDseA== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Siddharth Manthan , Nikita Travkin Subject: [PATCH 2/8] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A (2015) Date: Thu, 5 Jan 2023 17:32:34 +0500 Message-Id: <20230105123240.1089375-3-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> 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,SPF_HELO_PASS,SPF_PASS 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?1754187109229021329?= X-GMAIL-MSGID: =?utf-8?q?1754187109229021329?= From: Jasper Korten This dts adds support for wifi and lte variants of Samsung Galaxy Tab A tablets released in 2015. (with both 8.0 and 9.7 inch displays) Add a device tree for gt58 and gt510 with initial support for: - SDHCI (internal and external storage) - USB Device Mode - UART - Regulators - WCNSS (WiFi/BT) - GPIO keys Most of the device tree is separated into msm8916-samsung-gt5-common.dtsi as these devices share a lot of hardware with each other. Signed-off-by: Jasper Korten Co-developed-by: Siddharth Manthan Signed-off-by: Siddharth Manthan Co-developed-by: Nikita Travkin Signed-off-by: Nikita Travkin --- arch/arm64/boot/dts/qcom/Makefile | 2 + .../dts/qcom/msm8916-samsung-gt5-common.dtsi | 236 ++++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-gt510.dts | 11 + .../boot/dts/qcom/msm8916-samsung-gt58.dts | 11 + 4 files changed, 260 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts create mode 100644 arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index b42362c7be1b..062561db33f1 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -19,6 +19,8 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-a5u-eur.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e5.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-e7.dtb dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-grandmax.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt510.dtb +dtb-$(CONFIG_ARCH_QCOM) += msm8916-samsung-gt58.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 diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi new file mode 100644 index 000000000000..9cdb33247691 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -0,0 +1,236 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-pm8916.dtsi" +#include +#include +#include + +/ { + aliases { + serial0 = &blsp1_uart2; + }; + + chosen { + stdout-path = "serial0"; + }; + + reserved-memory { + /* Additional memory used by Samsung firmware modifications */ + tz-apps@85500000 { + reg = <0x0 0x85500000 0x0 0xb00000>; + no-map; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-0 = <&gpio_keys_default>; + pinctrl-names = "default"; + + label = "GPIO Buttons"; + + volume-up-button { + label = "Volume Up"; + gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + home-button { + label = "Home"; + gpios = <&msmgpio 109 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio-hall-sensor { + compatible = "gpio-keys"; + + pinctrl-0 = <&gpio_hall_sensor_default>; + pinctrl-names = "default"; + + label = "GPIO Hall Effect Sensor"; + + hall-sensor-switch { + label = "Hall Effect Sensor"; + gpios = <&msmgpio 52 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + linux,can-disable; + }; + }; +}; + +&blsp1_uart2 { + status = "okay"; +}; + +&pm8916_resin { + linux,code = ; + status = "okay"; +}; + +/* FIXME: Replace with MAX77849 MUIC when driver is available */ +&pm8916_usbin { + status = "okay"; +}; + +&pronto { + status = "okay"; + + iris { + compatible = "qcom,wcn3660b"; + }; +}; + +&sdhc_1 { + pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>; + pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>; + pinctrl-names = "default", "sleep"; + + status = "okay"; +}; + +&sdhc_2 { + 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>; + pinctrl-names = "default", "sleep"; + + cd-gpios = <&msmgpio 38 GPIO_ACTIVE_LOW>; + + status = "okay"; +}; + +&usb { + dr_mode = "peripheral"; + extcon = <&pm8916_usbin>; + + status = "okay"; +}; + +&usb_hs_phy { + extcon = <&pm8916_usbin>; +}; + +&smd_rpm_regulators { + vdd_l1_l2_l3-supply = <&pm8916_s3>; + vdd_l4_l5_l6-supply = <&pm8916_s4>; + vdd_l7-supply = <&pm8916_s4>; + + s3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1300000>; + }; + + s4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2100000>; + }; + + l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + l4 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + l8 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2900000>; + }; + + l9 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + l10 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2800000>; + }; + + l11 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + regulator-system-load = <200000>; + }; + + l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + l13 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + l15 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + l16 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + l18 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; +}; + +&msmgpio { + gpio_keys_default: gpio-keys-default-state { + pins = "gpio107", "gpio109"; + function = "gpio"; + + drive-strength = <2>; + bias-pull-up; + }; + + gpio_hall_sensor_default: gpio-hall-sensor-default-state { + pins = "gpio52"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts new file mode 100644 index 000000000000..e9916199e5a3 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-gt5-common.dtsi" + +/ { + model = "Samsung Galaxy Tab A 9.7 (2015)"; + compatible = "samsung,gt510", "qcom,msm8916"; + chassis-type = "tablet"; +}; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts new file mode 100644 index 000000000000..688e9be590ba --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/dts-v1/; + +#include "msm8916-samsung-gt5-common.dtsi" + +/ { + model = "Samsung Galaxy Tab A 8.0 (2015)"; + compatible = "samsung,gt58", "qcom,msm8916"; + chassis-type = "tablet"; +}; From patchwork Thu Jan 5 12:32:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp284935wrt; Thu, 5 Jan 2023 04:54:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuJvAnvTVunuFXfzgVUB0Pd1ycSiO4IWYQ0P5Oq1yzw23tE14N0mTBoe047xu+rCPjTSo6w X-Received: by 2002:a05:6402:f02:b0:46f:a2c2:405b with SMTP id i2-20020a0564020f0200b0046fa2c2405bmr54349494eda.37.1672923252128; Thu, 05 Jan 2023 04:54:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923252; cv=none; d=google.com; s=arc-20160816; b=Ux66NZHBD89CcpN3RKL1PUbsWsqP7kRS2bQJHqE+0NaT5fO+geqj1zRj1sALGfJL2k f5saY7YkT4A/9Dnv3eWIPNfvmh/vyeZN0UekbFotfpqnCXZmubhSmOSGu1jlSYMyD/+p NZcitqzrZG+4iCQnxGHmgkBXDNrmREDrPrhxYGsRnTT32aw6g+2WnDbv4nBLGGmtRG8O UNqbV9r/SKolcHtEDwCUIVzsPsykDWuyEVNocpwuHTJnbCebb6AugXOrzG+XjtO0Qmxm 4FTCUMEb2eZXNdL+YQvRISx6MEJGOFWu3pa1F3bu9kdRnlqEmL1vpAGOzFmPvxVCo+e5 q6PA== 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=ZZh035rx7oMN02/eaB1kEyqycXmmDffqbcy5TzITxd0=; b=jKbwckZo3y/4XXpvxZ0DlVc+BB2Vw9TJGTK3HW1xDECgMETH2P1ROE65phA9c5nq4I h3Gj/ByueM/bPhnEj1Tj7astx71V9KM8qyV/8304e1kuAk0uQ1SmCWQPfrHR7rBXvd/t TRXoo5QTiBrZt7jsdUR3tRvdYXRFwtA7TLcfCme6DSi06FXwKCzfQz1NKAplcdQj/2AY FprvTKSGA8z5XIcXjWAWC7C1Ey3mMBxYr0MIhJ2QDN2VN6ZQhGZJirkyOe05BmZnfcTv ABdLNx1N7zVyKC+EUGZDLAcfFbfpVFK0W9lwt+0FvgwLijHbImS1+ee+6X1NMH69ch// wsGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b="c/MzpmVw"; 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=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x5-20020aa7d385000000b004844fcb5435si25836168edq.313.2023.01.05.04.53.48; Thu, 05 Jan 2023 04:54:12 -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=pass header.i=@trvn.ru header.s=mail header.b="c/MzpmVw"; 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=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233416AbjAEMvm (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233231AbjAEMvZ (ORCPT ); Thu, 5 Jan 2023 07:51:25 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 921914C72E; Thu, 5 Jan 2023 04:51:22 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id BF980420CF; Thu, 5 Jan 2023 17:33:56 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922037; bh=hh4JNQz29tUUJcJOb3jkHgRe0Gpymsou/pdkJ3B9+30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c/MzpmVwjlNi9C36AuedP+/78tiPnHi2V2JxPt5m+9OQSftZAOKWO9x3qPztaHFEY P/s9txObvGo7uNmE6YgcxCzCUuE7cglCpZ2KbaytAHYbHTBJxxrFaiLnDLNBRBkQZr yRBL86Yn/pfjGuDTi8pelVlVg73DdUFJc1yN95atyn8VQmyhkBcJ9TzpBk3MUfsNAW YdbjqqUwr/oHUBkVuvUKjlcCHGgz/mXgNtXXOv+pCUuNPVYVm9YZWg4enPr75gBy6d KnMepgqxGR5Z7uZYGBKcQtAhyoNn9ClTQVZDztknKDDVsDlOyv6+41IFNIlVuTDl7Y zzQQYLMWw4NIQ== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 3/8] arm64: dts: qcom: msm8916-samsung-gt58: Add Vibrator Date: Thu, 5 Jan 2023 17:32:35 +0500 Message-Id: <20230105123240.1089375-4-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> 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,SPF_HELO_PASS,SPF_PASS 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?1754187171744626678?= X-GMAIL-MSGID: =?utf-8?q?1754187171744626678?= From: Siddharth Manthan Motor is powered by VPH_PWR (aka Vbat) and controlled by GPIO. Signed-off-by: Siddharth Manthan Signed-off-by: Nikita Travkin --- .../boot/dts/qcom/msm8916-samsung-gt58.dts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts index 688e9be590ba..37140d041a22 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts @@ -8,4 +8,22 @@ / { model = "Samsung Galaxy Tab A 8.0 (2015)"; compatible = "samsung,gt58", "qcom,msm8916"; chassis-type = "tablet"; + + vibrator { + compatible = "gpio-vibrator"; + enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&vibrator_en_default>; + pinctrl-names = "default"; + }; +}; + +&msmgpio { + vibrator_en_default: vibrator-en-default-state { + pins = "gpio76"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; }; From patchwork Thu Jan 5 12:32:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39514 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp284993wrt; Thu, 5 Jan 2023 04:54:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXu9S6SP2W9uiFruWAn3TmibBhftiQqNpNg+sjzoMgOsGdMMwnn+7C/0WjqQhNiDC9e2+xb9 X-Received: by 2002:a17:903:2341:b0:192:5e53:15f3 with SMTP id c1-20020a170903234100b001925e5315f3mr68886510plh.48.1672923266521; Thu, 05 Jan 2023 04:54:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923266; cv=none; d=google.com; s=arc-20160816; b=aBdpKAQ0WFG/Ky+jUFJZQhVcR6skSFt9lFnxHyVG9f5luv7s7wtpj/65VYxBopW1LJ EKSWAxNhzbXNEw3WwqeFBsdL0ctTnB4oNc7T1KyyX5akAeImDpA0Ew0OxUrBubHKk0vT HkXu42PcITP/SsqokMmyO7FoavyUH8vOqVm/gjuzMDtGEUDkWjFUGGYntbLKpHiz1zKo M5m+K/9LX3PB8NESvz0j45IfO7w9xAWcgE3+Ge/eyYjZq2b0fA8sUfrnx6mA2Fxm6ds3 7XERvOAAKDs6nSSXkQbnVBzTFWRx5h2J+OtNhNaajYWeitdOzObfpQPUhudu69hUxwGG HpjQ== 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=MqETbJSIiTzlradT3q/BrlmGOw1Pg87KslHM3cPg3/g=; b=Q1ZfaXnqaEeFE+wutM8/gN26gjjI5+8O2xeGr5cZWfGsibXVsdMPWOTWqnZl5It+fQ S7ReRFe8Hft0GSKkIRjRYPdaXwI4M1dHewMeSMTmZzQai3M+1MhRRlSyFdiHcP2RM3lc 5oGAv4s4zJMFI6xejefSx5QHyaHTpu+FfokQV5KMRwFMUEpDvsLLYULgqrGTTRHh7yC2 y4QRwK7G57agwfPfCyU4F1GTDiMJLUQGM4d+UHQlKgW3+yc8E5SPX7D3wig2IPQwcPNY A9cYD0izv+39BMPF38SbeHiZrF7zivO6oFItK537jQbG+Gfzg1aETeozF4dWT8Twv12I coeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=O6qIpXLl; 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=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a170902f78a00b001913c5fc052si37663494pln.505.2023.01.05.04.54.14; Thu, 05 Jan 2023 04:54:26 -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=pass header.i=@trvn.ru header.s=mail header.b=O6qIpXLl; 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=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232154AbjAEMvu (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233342AbjAEMv2 (ORCPT ); Thu, 5 Jan 2023 07:51:28 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56F0E4BD68; Thu, 5 Jan 2023 04:51:26 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 6873E420D1; Thu, 5 Jan 2023 17:33:57 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922038; bh=Q9PyOYwHzV6hYDK9dXXB+GuVnQwRSCoeQeyi78nz73I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O6qIpXLl4UvqKGU1e3SF8yjsLQYthoP8q8EapvOKZSM7nkD1VV+GG6iMn2PPXeMkP bTRwHohiJ/XM27qqxd3Axfak4HF9oWRzg27uCoqd1QrIEUDYi1Q/RBv77QlroS/40w 2Gt6NjuKBLYk7oKXV5lmkdATKd81sIWWO4vMYnthjg7LvXiNMaWTq/L+1E1D9/8J3c yfZWxBTuE0hEZtPzlFQG/7IV7pyH75115Ndydc+yo9BTw/sAqC76UHpEca2WyZO9NR 7fmAbYFMR2ZtVwT/5grR2YqS2YfX0MsUZ+44Ah129iO5j8LMxF/IPa5kg0Wj3rXiDF kYWBHR5uQojVw== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 4/8] arm64: dts: qcom: msm8916-samsung-gt510: Add Vibrator Date: Thu, 5 Jan 2023 17:32:36 +0500 Message-Id: <20230105123240.1089375-5-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> 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,SPF_HELO_PASS,SPF_PASS 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?1754187187069622199?= X-GMAIL-MSGID: =?utf-8?q?1754187187069622199?= gt510 uses a PWM controllable vibrator, that uses a general purpose clock output for it's control. Set up the pwm, supply and the vibrator. Signed-off-by: Nikita Travkin --- .../boot/dts/qcom/msm8916-samsung-gt510.dts | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts index e9916199e5a3..44d527b3f1f6 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts @@ -8,4 +8,51 @@ / { model = "Samsung Galaxy Tab A 9.7 (2015)"; compatible = "samsung,gt510", "qcom,msm8916"; chassis-type = "tablet"; + + clk_pwm: pwm { + compatible = "clk-pwm"; + #pwm-cells = <2>; + + clocks = <&gcc GCC_GP2_CLK>; + + pinctrl-0 = <&motor_pwm_default>; + pinctrl-names = "default"; + }; + + reg_motor_vdd: regulator-motor-vdd { + compatible = "regulator-fixed"; + regulator-name = "motor_vdd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + + gpio = <&msmgpio 76 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&motor_en_default>; + pinctrl-names = "default"; + }; + + vibrator { + compatible = "pwm-vibrator"; + + pwms = <&clk_pwm 0 100000>; + pwm-names = "enable"; + + vcc-supply = <®_motor_vdd>; + }; +}; + +&msmgpio { + motor_en_default: motor-en-default-state { + pins = "gpio76"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + motor_pwm_default: motor-pwm-default-state { + pins = "gpio50"; + function = "gcc_gp2_clk_a"; + }; }; From patchwork Thu Jan 5 12:32:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39510 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp284761wrt; Thu, 5 Jan 2023 04:53:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXvf6sBTlhkUoX5FYgP+FSntxePTRYhoAZAhr0r93WfbQDGJiIwPGbiIbygTNbpUhp7JW0GA X-Received: by 2002:aa7:8286:0:b0:57e:c106:d50c with SMTP id s6-20020aa78286000000b0057ec106d50cmr57180363pfm.17.1672923215908; Thu, 05 Jan 2023 04:53:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923215; cv=none; d=google.com; s=arc-20160816; b=xwzopkyqY8Q4zAQzI2A2MbsKnMeaYulYdcfoLAt+te+B1NpXQXlFeEJ2C7pBOhjEwZ ffAooel9bJaUKl+uaOpB7hVkbrhb29USqP0iIkz81BscOYbmTrzihAK9i/c6Ah6+dhoU 20gIsUIQOsomb40cmocf2zYjhmTOglT7PVkI08TMuk7GP2VTj7rvR/a1ocMg9ikNDnXL JlAIE5U/t8yOxfmpSX8DScmtkUapnNA5Oee7tnIZ7Vht8LTcEmS+1fu3XGICSUkej8UE kzwuA0UE5qw0o6FnUW5QcT3+Ua7iM2FqKy9GwYFhYWSAVanA8o/koFY+z0HnecXfZ/6t EoLQ== 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=7mDQwgoszJ+Dmqs24Wq4j+/+Tkdj01NEsilECEdF+ZE=; b=rHTzWjMl5+//jXGh1xXhD7pkSCI1tJIcAdFPIhXm1D8C3ch6QaHKx2BpxsT0DMWux/ rAoyC9t5gqhN/GmSGMml1TR4xRMnfNBdO0GLRf6l/BX/anVSDLGOp8flzjNelpKlhb2v 7GPy7awWV92s3D3UzENIfoXieIZLTVNdopqSs28qvRK8RYmN7q+bt6xGjSbzMKNt/K95 IeCOEZ9CP64U8stb1IfqBLma0D3x/E9zO/i9BFjw6jvV72Z246jvL9xvJNV32D9IMr1k kHO7DD3d/kfFUuiO66JBPOGaMl6OQWEOrg4MvB+avlkNwAV3ZWxIjwLACEPvATf+8CJz 8IDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=JiWwwwdE; 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=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 128-20020a621886000000b005786897552esi37097718pfy.33.2023.01.05.04.53.22; Thu, 05 Jan 2023 04:53:35 -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=pass header.i=@trvn.ru header.s=mail header.b=JiWwwwdE; 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=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233349AbjAEMvd (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233214AbjAEMvY (ORCPT ); Thu, 5 Jan 2023 07:51:24 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 920214C71E; Thu, 5 Jan 2023 04:51:22 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 3B5D9420D7; Thu, 5 Jan 2023 17:33:59 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922039; bh=XDs2gflTOLUlUTnTexb8dZ34bV0BRZklNYRXJ5foqD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JiWwwwdEBMnAvotjd62WdrCZOa1HbPZOAuoDax58cUnfKW9q7K1o/7ePPS3n3LJtW vUe1FNimJJw8co3p2LVgkuuBvFRnvnkr1G4tVjQCU8HJROrDMal41rAo0bbkZjs0sS cnLPvC1LDWKD+DlktV2Busi7cApRn2deL0BwllpliKWdiGk6JxfcN9DEMaAiyTqfWJ uwQSWB+STdHX7Mtmh4g41iIO35R9hYznHzjgOe+7m3p2+ukYr1OEgXvSLqFLLTp6zB D6zdp12w8zDFGW3tv6ZFDKw4MYs1lvt7qcnsWHiZbRRb2U7h5DIacNBYhiA9o43U5v hn+HyDl2WP3xg== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 5/8] arm64: dts: qcom: msm8916-samsung-gt510: Add touchscreen Date: Thu, 5 Jan 2023 17:32:37 +0500 Message-Id: <20230105123240.1089375-6-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> 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,SPF_HELO_PASS,SPF_PASS 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?1754187134051429766?= X-GMAIL-MSGID: =?utf-8?q?1754187134051429766?= From: Jasper Korten gt510 uses maXTouch mXT1664T3 touch controller. Add it and regulators that supply it. Signed-off-by: Jasper Korten Co-developed-by: Nikita Travkin Signed-off-by: Nikita Travkin --- .../boot/dts/qcom/msm8916-samsung-gt510.dts | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts index 44d527b3f1f6..6331166d9067 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts @@ -32,6 +32,29 @@ reg_motor_vdd: regulator-motor-vdd { pinctrl-names = "default"; }; + reg_tsp_1p8v: regulator-tsp-1p8v { + compatible = "regulator-fixed"; + regulator-name = "tsp_1p8v"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&tsp_en_default>; + pinctrl-names = "default"; + }; + + reg_tsp_3p3v: regulator-tsp-3p3v { + compatible = "regulator-fixed"; + regulator-name = "tsp_3p3v"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + vibrator { compatible = "pwm-vibrator"; @@ -42,6 +65,25 @@ vibrator { }; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + interrupt-parent = <&msmgpio>; + interrupts = <13 IRQ_TYPE_LEVEL_LOW>; + + vdd-supply = <®_tsp_1p8v>; + vdda-supply = <®_tsp_3p3v>; + + reset-gpios = <&msmgpio 114 GPIO_ACTIVE_LOW>; + + pinctrl-0 = <&tsp_int_rst_default>; + pinctrl-names = "default"; + }; +}; + &msmgpio { motor_en_default: motor-en-default-state { pins = "gpio76"; @@ -55,4 +97,20 @@ motor_pwm_default: motor-pwm-default-state { pins = "gpio50"; function = "gcc_gp2_clk_a"; }; + + tsp_en_default: tsp-en-default-state { + pins = "gpio73"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + tsp_int_rst_default: tsp-int-rst-default-state { + pins = "gpio13", "gpio114"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; }; From patchwork Thu Jan 5 12:32:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp284884wrt; Thu, 5 Jan 2023 04:54:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXv8PY0P5xZJhA1+chbTnEWCEIlhToLXAkScrh7e/UT7/73gA859Kxnz+/yDwEpTmdL9Iq8a X-Received: by 2002:a17:906:a290:b0:7c1:9eb:845b with SMTP id i16-20020a170906a29000b007c109eb845bmr47855521ejz.16.1672923242483; Thu, 05 Jan 2023 04:54:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923242; cv=none; d=google.com; s=arc-20160816; b=KTNwRoWUjI61MmlcXXTxF3blgxH4tIUrijFJ4G25ry9TaWgj3JVnoSbL2cZFrvBx8/ cjv2BF5jHu2XtZ4i+rrVFVg/uLNSHZ/28fM6nVCE9B2FJ0T39St9ZNfNAH0IKAaGOwa9 81SrZIQfIswLS4QYmApf7nikKRdJ3pm27FxOYU754SxDqfSaVu1tcvQ8OGSV6VDc5gHu 7MG/gMFRZcuS/dRggN7Yatjrqr8hNDDs9imjQ995Kr4kTnIqE6bOf6ADnzc2hy2qlvYv WCSuC5H9AMaVCevI8uS1DVLqnAawM8R5hosdSO2RC3CS0fS6wzXVir20ZECFCs7sABZb seSA== 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=T2QiXkY/PA03IeJ053fCwrett0fmbThhwDZmzvaIfvc=; b=MEpQhP4Xz8WmzSBBNktZtQ8bkwZXCOG+/E91lleLkOxAjE8gkNuGolUTGsoruMEeBz u1ZMgf+F61yo3QYKIfAX9VRyebmjGcWBB6VCaTgS7qmEBZBMIVYWTN+teLEzBcg0StHJ 8Elhl3fk3reBmJZKC7LBddmICXvcDOoU9J7kkk0AXMVZWaeU9HInT6uyAXI0m8nicprj 4YoDieB3hryRsMUme+5nx/HCBccBSOHwlslCOWJgPR9CYy0wLGFD6o+uJE/AQfAMbo9j Qw415hvVm4UFOpzqWaklhN7o5F4naMFs5R4MR5Crt2L/hmhXBAd90VoK2A5c8+arvHEl 9m/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=rrBvPTL3; 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=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae10-20020a17090725ca00b0084c855e9b5bsi21465717ejc.97.2023.01.05.04.53.38; Thu, 05 Jan 2023 04:54:02 -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=pass header.i=@trvn.ru header.s=mail header.b=rrBvPTL3; 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=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233371AbjAEMvi (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233195AbjAEMvY (ORCPT ); Thu, 5 Jan 2023 07:51:24 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91DDB4C713; Thu, 5 Jan 2023 04:51:22 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 3D75C420E6; Thu, 5 Jan 2023 17:34:00 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922040; bh=nx/GvWswnauPtlRcTkUzfp1KQCpIEjRYLHbnYq0pPzQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rrBvPTL3SF0mjKJ694okNvj8K9aJlZmxxxaw/cKN2M1U07CDDExVKTbV1KRWKS3VQ QbPLkGInisouQ2yGKseO7PJLWQjMvcF1B1z2L13JaLXsRgZImuBlzWyObEAIPCUPDU EoPlG2PIvgpwDomaIRh2LylZzJAGlbyhh2LmGifngKkY8H+Lne3D2bsNNrQFzjK5ba nQBxd6HpG0GyKN8BKYt8Dcn+fjbgc+5OCwKvU0BW2otgRoBwpM2R80/28+q8w03Hpw UQe+seZaXlo8Y2AxIgGJkYq+FTGIXh67QHRkD4PDrOL4SsmGBmBDxVg1PJdpFrVyJa NRZ5XkfaUEv9A== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 6/8] arm64: dts: qcom: msm8916-samsung-gt58: Add touchscreen Date: Thu, 5 Jan 2023 17:32:38 +0500 Message-Id: <20230105123240.1089375-7-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> 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,SPF_HELO_PASS,SPF_PASS 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?1754187161566899395?= X-GMAIL-MSGID: =?utf-8?q?1754187161566899395?= From: Siddharth Manthan gt58 uses Zinitix bt532 touch controller. Add it to device tree. Signed-off-by: Siddharth Manthan Signed-off-by: Nikita Travkin --- .../boot/dts/qcom/msm8916-samsung-gt58.dts | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts index 37140d041a22..fcf516888739 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts @@ -9,6 +9,19 @@ / { compatible = "samsung,gt58", "qcom,msm8916"; chassis-type = "tablet"; + reg_vdd_tsp: regulator-vdd-tsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <®_tsp_en_default>; + pinctrl-names = "default"; + }; + vibrator { compatible = "gpio-vibrator"; enable-gpios = <&msmgpio 76 GPIO_ACTIVE_HIGH>; @@ -18,7 +31,43 @@ vibrator { }; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen@20 { + compatible = "zinitix,bt532"; + reg = <0x20>; + interrupt-parent = <&msmgpio>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <768>; + touchscreen-size-y = <1024>; + + vcca-supply = <®_vdd_tsp>; + vdd-supply = <&pm8916_l6>; + + pinctrl-0 = <&tsp_int_default>; + pinctrl-names = "default"; + }; +}; + &msmgpio { + reg_tsp_en_default: reg-tsp-en-default-state { + pins = "gpio73"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + tsp_int_default: tsp-int-default-state { + pins = "gpio13"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + vibrator_en_default: vibrator-en-default-state { pins = "gpio76"; function = "gpio"; From patchwork Thu Jan 5 12:32:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39513 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp284981wrt; Thu, 5 Jan 2023 04:54:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXulyVM7N9MpXp3SQ4VT78ff+r1ezwyMaPU+mbpCzSC/HiTivTwyq/HRrYt8rUvk8ft5pXYp X-Received: by 2002:a17:906:99d6:b0:7c1:7c3a:5c65 with SMTP id s22-20020a17090699d600b007c17c3a5c65mr43935848ejn.4.1672923260770; Thu, 05 Jan 2023 04:54:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923260; cv=none; d=google.com; s=arc-20160816; b=fzZ70KA1xxj3DOEqizsng/IDNAfeuTjwd1zP7l0uhVkWNgzZe2H/17gOLSyltsZr2g T2KFkyRg5PhjPPwsFary0d13UNmTsUTbrDDpy2kI8yQwIWMw2gQ5cv6JnDPN+XiZyxJ+ MPj0cAwCKUwdctI4IAi+DT9QP5Gm09gxSEyeZWkE2FPoonusZ3vgd6c/Uj+bYw5h5QwO trixsjDdwvwN6ow71/jfKRIdnmTk5xu7Tazquvv34s5O6tl0pcXFBSfAhkzDajaCWgu8 r2Mdx8g9+cWWq1DRb7y2uleHtsmHKNeM8dUKC6wu0V8lAV9iH4Q493cXLk6VeggHAGCd mJtw== 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=bY/3o3zn+Pudlf2qbvhNM9aDFnw+OcwLEfR6izS8ZKA=; b=CZWhEHEpai7uRsZzWgEGz7UuyuIgtgZgcBm0H3pIxLYOscx1wySXX8VrCtHPH07BWh v3CuXnEpS5+oc/YGCxc7MyO3CZE6s/VZ5xOvoDZrgzP4Wl9nokS/txJugsr/1XDVIA1v lk0fUGouhy45vrA32YBv75O+2bQXCVwhV7wJ9t7MP5PmbNJ5fMCWgSUb6FCTRTdzuGUd 4PwzfysC4B7XOaRNMjrcrp5T+ncrgm/2gjmWakApdtp9atibmy6msr4E586Nbka04Q7I +DUy4oCaK028JbAaSjOizNu9z1+UzNeEHAJ5dQfd1jxf8upB+rD8hseNOLMxNXKz9VDK +UJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=KdHPXCU4; 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=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae1-20020a17090725c100b00824f19f0717si30471789ejc.650.2023.01.05.04.53.56; Thu, 05 Jan 2023 04:54:20 -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=pass header.i=@trvn.ru header.s=mail header.b=KdHPXCU4; 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=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233422AbjAEMvq (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232920AbjAEMv1 (ORCPT ); Thu, 5 Jan 2023 07:51:27 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4ACDB48CD7; Thu, 5 Jan 2023 04:51:26 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 509D2420E9; Thu, 5 Jan 2023 17:34:01 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922041; bh=X/5AJksXQf17kf4+orqMNYWY3Pk7OE2P5lNRHc4uMus=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KdHPXCU4DmUQaohQf+3WmjH7BUzIgX+SeiCg2HmlHBhw4WZq9VvvSDXGE4XMzo+vm 4vEIUckbcXq8uMCFngzqQXcCowhltz/K1Hj0nJIjJ/S5ETaOCSt2KiDs4oHyfSxOTw Vp7vBXUAvKI+l7Y622KE0NN5omDtPrhwB+YzNYKAH6hxkeFBzjfWfzlIW63KXI6ipW FtalGJwwl9ld+pfu5OTA8oSVcNYAhO1FdPVLQJEEDKI/D8VhLU1hGcGnA4JBnD2BJz v6sxoELVq5QdkRgw70tTpNvq1EKK6Wrizrnb4AoOkCxmLdJ+HbxVjg+j8FkTWAHgxH UwwVxNfMfdtDQ== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 7/8] arm64: dts: qcom: msm8916-samsung-gt5-common: Add fuelgauge Date: Thu, 5 Jan 2023 17:32:39 +0500 Message-Id: <20230105123240.1089375-8-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> 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,SPF_HELO_PASS,SPF_PASS 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?1754187181064175976?= X-GMAIL-MSGID: =?utf-8?q?1754187181064175976?= gt5 devices use additional MAX77849 MFD to handle battery, charging and usb switching. Fuel-gauge from this MFD has a separate i2c line. Signed-off-by: Nikita Travkin --- .../dts/qcom/msm8916-samsung-gt5-common.dtsi | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi index 9cdb33247691..9f97a8129278 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -63,6 +63,25 @@ hall-sensor-switch { }; }; +&blsp_i2c4 { + status = "okay"; + + fuelgauge@36 { + compatible = "maxim,max77849-battery"; + reg = <0x36>; + + maxim,rsns-microohm = <10000>; + maxim,over-heat-temp = <600>; + maxim,over-volt = <4400>; + + interrupt-parent = <&msmgpio>; + interrupts = <121 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-0 = <&fuelgauge_int_default>; + pinctrl-names = "default"; + }; +}; + &blsp1_uart2 { status = "okay"; }; @@ -218,6 +237,14 @@ l18 { }; &msmgpio { + fuelgauge_int_default: fuelgauge-int-default-state { + pins = "gpio121"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gpio_keys_default: gpio-keys-default-state { pins = "gpio107", "gpio109"; function = "gpio"; From patchwork Thu Jan 5 12:32:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 39516 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp285094wrt; Thu, 5 Jan 2023 04:54:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXsdBIOz94BggarV73Eb4SYJ7oiH1TXF8y/yTwdaoer51orcZKNNpwmDJ48fONGM5eTzwLvl X-Received: by 2002:a17:903:1cd:b0:192:b52f:33bb with SMTP id e13-20020a17090301cd00b00192b52f33bbmr31341856plh.45.1672923283279; Thu, 05 Jan 2023 04:54:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672923283; cv=none; d=google.com; s=arc-20160816; b=rDrYZ+0mzuK5mMaYIjspYF9GRScr96yJbrwOqPShzuSneCxKM/tgy5t5lJ+pY0YBcR CF73ecKBNcdtBgF5mMTPWO3maWUYqMVg4L2UukCVSuhMpTTjRiBwrmJm251Iwp6rlC64 gDYeNhj3c0ITXnjtcpr+MQT/WbPU0mUwmnVDqIdAUIuPvws70IlA+TnceYKSslUFo7CW t5oMnZn4auoSwrE2zseiPwZUKP9dSdQ6H2iTGL4ZrOMTaEMH/x6UPorGrKpA/k8Q30Us MMU83eBPooyt2O2BxdGXza2gkUsVD+UompZ1oPDZF1d1JbDfkuRD8L5f5EEtV6AuKoOv 4MjQ== 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=94/6vwLb7uysNERDnoeeaiFk+pNsqIgAQpSNg4X0xaM=; b=SRCcBsP+aIvV+NwE3s8X/d7sHD/I8InAplhMQ8Dhte6ZtPOwMETofVL9AhumPOwly2 amzoDMqjp6VNV81lfmQRMNmqIGvf7Hyz04dwAxiuzo58Gge4VEU+ud6RjloPmKjOAbIw YcEONc59/wFt9kH9uXLDGlnqcS3EVAHUEwmZW9QEX9Daq7tOTs67EPrN3kySqq3qkEjL H8ljzq872uc3x9h7h7h/X65983lfrOAIlb3WaRNfcId+9ZgjM7D+pIgmoccfnVDJEFIC f8Rr3nSVvxpnMc4DBkwPAzi3JrlC+7XFK0CPcvUeXTT+hJRd41ofzV37Y9il4SUjexLG QD/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=pxAl392H; 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=trvn.ru Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p14-20020a170902ebce00b001926cc639ecsi30522046plg.487.2023.01.05.04.54.30; Thu, 05 Jan 2023 04:54:43 -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=pass header.i=@trvn.ru header.s=mail header.b=pxAl392H; 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=trvn.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233398AbjAEMv4 (ORCPT + 99 others); Thu, 5 Jan 2023 07:51:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233327AbjAEMv2 (ORCPT ); Thu, 5 Jan 2023 07:51:28 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 439D8485A6; Thu, 5 Jan 2023 04:51:26 -0800 (PST) Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id F1E90420EA; Thu, 5 Jan 2023 17:34:01 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1672922042; bh=AfmbF3JjmXKU9T2jtly2Mo3ig2mVtRaWbIeULclrM7M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pxAl392HXkVVnPLj+qaVI87DjLtaphJO4FmU0L84V6CdB/k4zVhciI7XNqB5YpIBD Y56OJ9kQ8PT9s0Bk8voY46XNSRj8yTZta+7eHx39zF00d5KqMbevNpLp1sj3iV9ayg GoI6jWi13kvBtZP+f63LrKKl1YY1WFGQWjGvBa5SdbPpaNhTFJkElkWxIwgH3CP0wV DrtPO4CFP5VWBUx6h0mlVeWtK6MrhrXlxnheQC7Vi4sAco57hwh62sx9NGwWlaQBSo nVcDvescddiD5ARDSOh+F2uxAusOXYxmtQ0dQKE1Y6W7OWQFQwhlW6JZn6fMkyLUnb a8TBFI+AEFaNA== From: Nikita Travkin To: Andy Gross , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Konrad Dybcio , Siddharth Manthan , Jasper Korten , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin Subject: [PATCH 8/8] arm64: dts: qcom: msm8916-samsung-gt5-common: add sensors Date: Thu, 5 Jan 2023 17:32:40 +0500 Message-Id: <20230105123240.1089375-9-nikita@trvn.ru> In-Reply-To: <20230105123240.1089375-1-nikita@trvn.ru> References: <20230105123240.1089375-1-nikita@trvn.ru> 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,SPF_HELO_PASS,SPF_PASS 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?1754187204454415520?= X-GMAIL-MSGID: =?utf-8?q?1754187204454415520?= From: Siddharth Manthan This device has ST LIS2HH12 accelerometer and Capella CM3323 light sensor. Add support for it. Signed-off-by: Siddharth Manthan Signed-off-by: Nikita Travkin --- .../dts/qcom/msm8916-samsung-gt5-common.dtsi | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi index 9f97a8129278..bb1b1e814d8a 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -82,6 +82,35 @@ fuelgauge@36 { }; }; +&blsp_i2c2 { + status = "okay"; + + accelerometer@1d { + compatible = "st,lis2hh12"; + reg = <0x1d>; + + vdd-supply = <&pm8916_l17>; + vddio-supply = <&pm8916_l5>; + + interrupt-parent = <&msmgpio>; + interrupts = <115 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "INT1"; + + st,drdy-int-pin = <1>; + mount-matrix = "0", "1", "0", + "-1", "0", "0", + "0", "0", "1"; + + pinctrl-0 = <&accel_int_default>; + pinctrl-names = "default"; + }; + + light-sensor@10 { + compatible = "capella,cm3323"; + reg = <0x10>; + }; +}; + &blsp1_uart2 { status = "okay"; }; @@ -237,6 +266,14 @@ l18 { }; &msmgpio { + accel_int_default: accel-int-default-state { + pins = "gpio115"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + fuelgauge_int_default: fuelgauge-int-default-state { pins = "gpio121"; function = "gpio";