From patchwork Sat Jan 7 14:19:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 40405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1319971wrt; Sat, 7 Jan 2023 06:22:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXteUT1TyXyBBkIhMi2Bf8oDoXrPYsMrq60DR8wnCYmb84LYM9+FfepRXkVEHK2vXemQSMc5 X-Received: by 2002:a17:907:a784:b0:78d:f454:ba4c with SMTP id vx4-20020a170907a78400b0078df454ba4cmr51747675ejc.75.1673101361938; Sat, 07 Jan 2023 06:22:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673101361; cv=none; d=google.com; s=arc-20160816; b=Y8xaNMCE/81yZc3W33YajTatnaU0XHSD8DW9T4sR3/qTjeo9bdNnN/o3NMiVY5x1VA mCeP77ntygIZ6kj774L2SJLXvZoVyqfGdmr138c+k6wcOn0g+gC5gcZGhbjepWZlm5kE 4CAkArJ7B/e8Cw4Xr7PTrxUG8JT/sabP+CQnEFVwpqja4u/Wo6I5Qpif1itxZtKLReQd dAzMTJYYBttZthHjy9hHtU3csYKaBqduGdGb54D3NGypbr1y5Gh3eT9wboxrU3j9c310 rZAp93mMk+1lHrE0SqM3T5TCabOSpncbp2Ih95Dc7rGdoBF7oT4G/0pi5aaaBD2CXgNc yquw== 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=YO+TryEdwF4mIDa5lcbkCPsSkPE7OyG5sqQ+lec0qCs=; b=atwzgBnFql/zD+CIDMhoQOQvlxcz0gMBrI+nNx4n6lrVH2x3ReAYH0bZIjwA4T3n9J emGsONhh/Ds9XIe7h+CHhQxtus95YBjsl+irpLIRkACng4nGnLkbCsMApn3snWxxjyWs +4Ko0ViLgEWsb7f/rfRowv414/kPew48qgWLSG+p0fGaasLl9Z7xwzdF0dZ+gEcb0Z8R RaqMlImL4ziu7d9PMlqslnktXsX9w1nDK6GaYpFcxHRrHVsD2YisCGvYo0a5qU96aM08 8wJv0xlbUee9hiinx1Vo8moDNNK0brUfbINlRYVr13BnWFxZW2Ji8X2OlHK8f7v4ZJOt OSgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=MwOfTqQC; 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 xj4-20020a170906db0400b007c1691c5296si3537602ejb.385.2023.01.07.06.22.18; Sat, 07 Jan 2023 06:22:41 -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=MwOfTqQC; 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 S232740AbjAGOUA (ORCPT + 99 others); Sat, 7 Jan 2023 09:20:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232585AbjAGOTb (ORCPT ); Sat, 7 Jan 2023 09:19:31 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62E3E4F11D; Sat, 7 Jan 2023 06:19:25 -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 1E8F641902; Sat, 7 Jan 2023 19:19:18 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1673101159; bh=J1rwNSTAV2Z74KvS/GNeSzwAwO8X99k4o12JpwgbUAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MwOfTqQCLZ9QZZut31r5ouSn0v93/IZ9hj9KaD7oWBS2khY5tdKSBXRws9azJAQhB KUb2zvtFsNgDMTs4zFXxj1PDLWM7+oyGfGtEyM1ioQNS+YGlBUCUG3Gs8z1M+DUAex 74lZ4xPyWhVg+GSv+H/e80rPM0V0Dn8eikfhOL4f0OGEL7fT5Odeksl7nV6wRL8Gtp yQIozSPHrIM/lojFGLxiFEvN+xlct7Th8W+KEvdyKCwgcTK0FYtLWgQp8mvT26yFZo +Kfnv4SAK5+YF+QmT7uboT66YebRSMmwb4Ld8NEI2zwYtxnGHTNUNEciEeauThYmmQ 87lvAI2o6x2rg== 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 , Krzysztof Kozlowski Subject: [PATCH v3 1/3] dt-bindings: qcom: Document samsung,gt58 and gt510 Date: Sat, 7 Jan 2023 19:19:09 +0500 Message-Id: <20230107141911.47229-2-nikita@trvn.ru> In-Reply-To: <20230107141911.47229-1-nikita@trvn.ru> References: <20230107141911.47229-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?1754373933670749873?= X-GMAIL-MSGID: =?utf-8?q?1754373933670749873?= gt58 and gt510 are Samsung Galaxy Tab A 8.0/9.7 (2015) tablets. Document their compatibles. Acked-by: Krzysztof Kozlowski Signed-off-by: Nikita Travkin --- 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 Sat Jan 7 14:19:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 40407 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1328520wrt; Sat, 7 Jan 2023 06:46:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXtoc9f83KTdOVebEGSb7WelIbE6zqS45Vi6kikDXuPwXXTXhnji7rC7SYUpVjcPrCsZjRL+ X-Received: by 2002:a05:6402:e9b:b0:479:8313:3008 with SMTP id h27-20020a0564020e9b00b0047983133008mr43529162eda.0.1673102813038; Sat, 07 Jan 2023 06:46:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673102813; cv=none; d=google.com; s=arc-20160816; b=ArhfDhg4xpUPOmGINn1YIvtsNKoroRkzYIHTznPTG+8+C7ssZg9VBHg6N01uBA6BPl W5Kz7E7WZVs4eIM6qz+zLKW/k2TLgeVRf5KxNF1HjMIe6GhLfwPbsT+YLiKv+rk1BhSH UPGKSa/5hFb6KdDZhig4rz1ACngD9e8VvEJaZ0Mj/kAOWGa8tidP5McmZDSIgFi8atq7 nXMW7u1JYEtk1qZUtsA587BkN46DnjrhsQxL2Lm2CIzx4Koyht+4cZzqewuQr0e3Oda7 s6YrYOdVzosKAuYMY+pZP87tIcMw48DKad/SWjaEfjW9pTx9iHoCTGX4Q41Ri002CG49 KocA== 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=UA/YqXtOEC0IgSqHOLktIcjrXYvX4E/sUIPuiUISh44=; b=FSSXBMvLRBH7xpaSRqmgI3UfKBGMwnNQO5i+QiPu79LrKMjp4K0Xy5Dujl8gkjREmq 8J4yhYSf9SoLPIcYdJO+ODAWXSgL83u9et6wKDBNcSHPdc25oatpTeFvUHH6Wm6++n3Z hB5QWN6r9morKB0mW+bE+Ciinuf6YiYviRDQShGRSeAtn8cXni4rlp3FMkME/awb3pV8 It3sqxhvStlfDVS56Iba6NSG1kPsjtbuiihU/URDPIBlnKk7Yp9KEZ8WWg9XqhF/XSNY 6SceBuNfOfDgOXAHWiEEhqOTWExVxrWfGrcVRDiShyBTe+vyluwIb2THjWOvH04uk1MH 3E2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=I8Fi+BJR; 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 b16-20020a056402279000b004619867344csi5227111ede.0.2023.01.07.06.46.19; Sat, 07 Jan 2023 06:46:53 -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=I8Fi+BJR; 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 S232859AbjAGOUH (ORCPT + 99 others); Sat, 7 Jan 2023 09:20:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232743AbjAGOTc (ORCPT ); Sat, 7 Jan 2023 09:19:32 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3C6B4ECAC; Sat, 7 Jan 2023 06:19: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 CA0C6420D2; Sat, 7 Jan 2023 19:19:19 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1673101160; bh=wof4fgqPiEpvf5PTbXWjQ8PMVh6W5qvzhiX/kwadRNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I8Fi+BJRwICcw84dwCz92ReFZYlkvBz33up9ZwBSJWZXJgjZjHgSeQnuIKUJXvrf6 1p/y7CDLJzUYVHXl3xCRREu7Uw/MuYTebXfj1XlK35EsHzSr0B5yNZ0GDC1NOvoi6b AjqCrcj3ssA1b+Qv1fiEch5C6wahQ7zScQV3Jtu3mqDOoaJ4RukcNRELHkgY2dgXhm ghFG5Hf/My7Cxw1ldCaQYnp4a3/RD6XrZdpoRhpSpj9ejINHRWp3op+av0xrhCyN3c czYIu+e9ufgZfXVmIIzzyD4LYKBrrKTWRQb78sCJ2Iy2zwWv0Lt2b/SOTikgdQo9Kh QJ2X+JQKsHiDg== 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 v3 2/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) Date: Sat, 7 Jan 2023 19:19:10 +0500 Message-Id: <20230107141911.47229-3-nikita@trvn.ru> In-Reply-To: <20230107141911.47229-1-nikita@trvn.ru> References: <20230107141911.47229-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?1754375455069375636?= X-GMAIL-MSGID: =?utf-8?q?1754375455069375636?= From: Jasper Korten The Galaxy Tab A 9.7 (2015) is a Snapdragon 410 based tablet. This commit introduces basic support for the tablet including the following features: - SDHCI (internal and external storage) - USB Device Mode - UART - Regulators - WCNSS (WiFi/BT) - GPIO keys - Fuel gauge - Touchscreen - Accelerometer Part of the DT is split out into a common dtsi since the tablet shares majority of the design with another variant having a different screen size. 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 Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/msm8916-samsung-gt5-common.dtsi | 296 ++++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-gt510.dts | 113 +++++++ 3 files changed, 410 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 diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile index b42362c7be1b..70e3b109aeff 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -19,6 +19,7 @@ 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-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..d920b7247d82 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -0,0 +1,296 @@ +// 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; + }; + }; +}; + +&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"; + }; +}; + +&blsp_i2c2 { + status = "okay"; + + light-sensor@10 { + compatible = "capella,cm3323"; + reg = <0x10>; + }; + + 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"; + }; +}; + +&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-system-load = <200000>; + regulator-allow-set-load; + }; + + 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 { + 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"; + drive-strength = <2>; + bias-disable; + }; + + 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..607a5dc8a534 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts @@ -0,0 +1,113 @@ +// 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"; + + 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"; + }; + + 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"; + + pwms = <&clk_pwm 0 100000>; + pwm-names = "enable"; + + vcc-supply = <®_motor_vdd>; + }; +}; + +&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"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + 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 Sat Jan 7 14:19:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 40406 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1320081wrt; Sat, 7 Jan 2023 06:23:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXswIGDVRHVSlaQa9Lj6BuXzAthfhYNmIX6L4XGJUBYoPtyAq36+OiRny7SVs/JnRlB1keD+ X-Received: by 2002:a17:907:3ea1:b0:7c1:7f84:10ac with SMTP id hs33-20020a1709073ea100b007c17f8410acmr84785319ejc.33.1673101383338; Sat, 07 Jan 2023 06:23:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673101383; cv=none; d=google.com; s=arc-20160816; b=AWnrxxpHQusszjTtEJjgSWPHtGwyoSR5RLD1zEPRmc6ES0FLuRk1YYv45YOdtY+lIZ vtRLlJ0UNBF8SLOi/6/itNL6dWZ5IHmgYFCSNFtHVNbnMdqDFxD1ByW6VykRo027pedj 6SXSimBdTB/rhDs9mBDExyKYIKyQqb4derUnJjOuoilFE+uvdqPA8Yr1adwJEIfbGBuO fopFF7yqjWulD/mzl68DlRwMYctCWpeqzWdq3w1rgN7Ha3PC0+J/14LMLecwfVNgN7lS c0I+ErIc+9Fls2/2c1766eFv3zrM0xwTA4brJpuB546/35dDVPFtNLEuIVIG92ZHcoXf rdqw== 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=Cxz9ZNILMpXKjvaBZM1bqG+gzI7xu8mhZ4lsqYXuz2Q=; b=EOgfghGf3mvPGF4RjpHD50ILoxrftqYfbg5ZDmSiTMKxtTrv8U8aSxw6muoKBkr9GW rPcrpKdiQQdg1pAhmVis8Itlj0C/Nny2MGVpPvgKPq5WNKK46zy7j7lj5SdBRsHF8l2Z txbappSg28vzI9dpHYtfJP+c/3xsN7ZCAiubNUEMM2yB/0Iqqt22OT7Ne9cTTrcDRrV1 EcRpIiPxL+RAJ6mIybFnhOqHoVBFTRvgA5U0sfWWgFFLolRFx/hkPaRbfIrB9Ppk6vUq LC5Rzds70ngGmiMdN0qSPUPPH0gSWDJWllWu0746Y8xx4tuF/ITBnMd0Ws0yLVbhyGcL Pc3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=feEc1IHT; 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 qf11-20020a1709077f0b00b007bd6264c2dbsi4386529ejc.28.2023.01.07.06.22.40; Sat, 07 Jan 2023 06:23: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=pass header.i=@trvn.ru header.s=mail header.b=feEc1IHT; 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 S232830AbjAGOUE (ORCPT + 99 others); Sat, 7 Jan 2023 09:20:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232750AbjAGOTc (ORCPT ); Sat, 7 Jan 2023 09:19:32 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C640D4D4B6; Sat, 7 Jan 2023 06:19:27 -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 BB1054BF42; Sat, 7 Jan 2023 19:19:20 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1673101161; bh=98yN+f2gbc0QP8iZEQUmpTCgZk/fJzPj6sESd2fvICU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=feEc1IHTz6shvxyG9chz4pYm2EfEJZst/iv7un6D4UKntYxv2zUSHmulAb+psKcaL 74zhTqu2WTGFgV1FSBaGPZVOaDLUVULKeGX9tKgLve+awfh6wJctFl04U5TyIMCJum tYUIepSrldRtQaXRl/uttlu23KrsLMc6eo7d7jViLqNWsMKGRoYkxwRfVIyu+MYrXh AI1W8E9y1Bdm1eXysIB+o0Z+6y/DgRCRuJHLV4ibECtXz7zbErdhNAtW2HA/Zrh7vp 8Y+nQeGSeKTU5A+yypt0V+W3J1/BV1I85S7Ooms4wH7owyGphmrJrRvaCF8B0JJO8K mWinzZl0SRYOw== 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 v3 3/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) Date: Sat, 7 Jan 2023 19:19:11 +0500 Message-Id: <20230107141911.47229-4-nikita@trvn.ru> In-Reply-To: <20230107141911.47229-1-nikita@trvn.ru> References: <20230107141911.47229-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?1754373956362306617?= X-GMAIL-MSGID: =?utf-8?q?1754373956362306617?= From: Siddharth Manthan Galaxy Tab A 8.0 is a tablet, very similar to Tab A 9.7 with major differences being the display and touchscreen. Add it's devicetree reusing a common dtsi from gt510. Signed-off-by: Siddharth Manthan [Squashed multiple commits] Reviewed-by: Konrad Dybcio Signed-off-by: Nikita Travkin --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/msm8916-samsung-gt58.dts | 75 +++++++++++++++++++ 2 files changed, 76 insertions(+) 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 70e3b109aeff..062561db33f1 100644 --- a/arch/arm64/boot/dts/qcom/Makefile +++ b/arch/arm64/boot/dts/qcom/Makefile @@ -20,6 +20,7 @@ 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-gt58.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts new file mode 100644 index 000000000000..5d6f8383306b --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts @@ -0,0 +1,75 @@ +// 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"; + + 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>; + + pinctrl-0 = <&vibrator_en_default>; + pinctrl-names = "default"; + }; +}; + +&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"; + drive-strength = <2>; + bias-disable; + }; +};