From patchwork Fri Jan 6 12:25:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 40111 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp794292wrt; Fri, 6 Jan 2023 04:27:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXvFpm0Sw/AIcz52oX9rlvGMOqabNmFI/PfE1t2+rUx97jctCew636VPaEG/qXBg5yXpHl8B X-Received: by 2002:a17:902:d50e:b0:192:e1ef:2f2f with SMTP id b14-20020a170902d50e00b00192e1ef2f2fmr14788720plg.38.1673008050179; Fri, 06 Jan 2023 04:27:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673008050; cv=none; d=google.com; s=arc-20160816; b=RZGCJQ/itsHbAxJbyv/GkU8bzSm6cnALfk/2ei3XnbICeLXcbGcD44a+y1ZGwlhNoe ES29BYwfq+SxyTI1Xg2FE/tndwX93+bSmW5+Eb4C0UvYXY32mHOTVgcwPz1nQzkVPRDr pQLvc7MLST53KC5tMf5Vlwng73MlPQ4UD3JJ6wqwZsxu0U9HYDWE9tJOxKMlnbx4W82X E/cAbPsKFDcy3LC16UueQ/aBSEzC7QZTC8o8DL3Ag+Je/uFPhwslDU0fycKC43LdlZtY E4A7X69h7+S2+JUZPhQPyCwlNRGTPrQFzxZAxCszj3TtNnS16J2rMKD82lnvGiCWGJTi bRTw== 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=J/W6PNo43QAIk0FuuJNwf2RhKuUBVMGUaKIbq0txHZ+hsRjv5HMVfQ1OaOzFL5+Uzh 8ovkDHfl+em9wLdMESeyVDGebB6c7KN+cZd3F6rbD6nW7pqcV7r0PSAPYHc8F6qAHN6I ay3EVI/EBYJwhzD1NDvJg9BBNrJkk8aEVCe2gaFAFUGmFxgbuZTUcejZXnF28csSxKoo mUae8N4iAPuIH/zoQHI+Wx90yfxGO4dVMYU97PsenHQ2SSF/nuNUBX1Os4lHB65uI2az neQoSFBFxlv0ViSyLOidsUj3c/zlsfAbJOoc+ahtX0n4g0OlcMoI+cTktR+hEF3Ykgig 0CTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=KboYuJtc; 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 c2-20020a170902aa4200b00189b048c9e4si783590plr.500.2023.01.06.04.27.17; Fri, 06 Jan 2023 04:27:30 -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=KboYuJtc; 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 S232676AbjAFM02 (ORCPT + 99 others); Fri, 6 Jan 2023 07:26:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbjAFM0R (ORCPT ); Fri, 6 Jan 2023 07:26:17 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04B506369; Fri, 6 Jan 2023 04:26:12 -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 C84CB41B60; Fri, 6 Jan 2023 17:26:08 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1673007969; bh=J1rwNSTAV2Z74KvS/GNeSzwAwO8X99k4o12JpwgbUAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KboYuJtcukSbl85gOttHdBbM6DNjJB8YTakwn2q59mjrEEUCjvv/AeLyi0+kblZIn sr+TOZsJyKCqU4PUUbvCg+7wvZb/AXWEzwJXzd+dg7tNGTGA7TTNa/oRM14rhUlJO6 wadBDCK8/mgA0m+Xyfrp8TBmiTq3VOb68zcf9pXXxE4cG0LPp98ZhdltbANTag5ARa 3yUTXq01BcMl4IkEwdNo1kAoG4RDYzHEr+iPRxhFREmGAsPIrJq6+Wh98V8gFP2HZb Hb6/x/fi23kvKF9srR8XtScIwoqy91Jfz54RZ8Y6tEvyaF+WYf7antngRMZxgkaLl+ 6+T5cR1NU3YAA== 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 v2 1/3] dt-bindings: qcom: Document samsung,gt58 and gt510 Date: Fri, 6 Jan 2023 17:25:30 +0500 Message-Id: <20230106122532.3310265-2-nikita@trvn.ru> In-Reply-To: <20230106122532.3310265-1-nikita@trvn.ru> References: <20230106122532.3310265-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?1754276089040964088?= X-GMAIL-MSGID: =?utf-8?q?1754276089040964088?= 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 Fri Jan 6 12:25:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 40110 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp794071wrt; Fri, 6 Jan 2023 04:27:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXs6NQsrPfA0+CNaLUATvHnlnbNCaBjd3bq4sjT/nQQEGcfNen3pxQCPI8m2k6VQg0utzIzA X-Received: by 2002:a17:90b:4f42:b0:219:d1eb:b8af with SMTP id pj2-20020a17090b4f4200b00219d1ebb8afmr73672468pjb.17.1673008019587; Fri, 06 Jan 2023 04:26:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673008019; cv=none; d=google.com; s=arc-20160816; b=ZlFLenkutJotl953XHikcZQS0bM29AB0zamCsGs/iJ21YWqCe4N9ZY+jKjY2i+qoEP 6XEvfJv/e/oPYDq9ihZjsKzMOX1igmV0TuklQo0zdX+N8PleDc2i6RulFmqTks41hlXW xyshAF8QzT8vXkTdE4AMejOagS/hw0vwrlNFfzX42ZgkDXZeyZLOPSkGTsL5F+nnKoiB kpfWeey+vG4O5bKDAjT6I0DlM7542HCOdiOcc1TFOffDDs2r0uvfC3AG9xY1Nq4vcOYd 8RPg81Stt9GvG0+qvxjKVQtDUEIi3buDA30koDTzaCJOorNmKZPe0P3eklys7J6XDx2d seJQ== 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=iQar6Wf1ZwzZ1bXZwwZ7sHkNyaAgYuu0o1305aArFAw=; b=gko5cKKBraBI020A+hJNu9t3UoJ2w9e0osbOLEzDmdlm5KGPXoh7tDcW6rFbCjI8oB qxnoVOaKjvJkvxKY42WH2hX43C0kvo2oOt93OHCKYm4C+9GBAAHOb1MN96ddW7f3nKAK C2MImOJkYorvs0cWsP8Zo2yRH5GCRfCk3eCQaP3igo/RK0SsHT1pPnDulwNCmL3L8Y6+ VGm7lKF0kOxt/UogK+DFC+tYJ2SiISUtKi06gkdZxcRZjiEgmV+1t8ZPyeDUtjR0kTwM aYSQkpWbwbCY//zy7QsrdbtgGjke58yeo1VPoAzH903ed7+h+jm9GiS4/B1ijtxNW2Au l2Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=qttKCKS4; 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 lk4-20020a17090b33c400b0022625a11bd3si5384702pjb.167.2023.01.06.04.26.45; Fri, 06 Jan 2023 04:26:59 -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=qttKCKS4; 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 S232149AbjAFM0V (ORCPT + 99 others); Fri, 6 Jan 2023 07:26:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbjAFM0R (ORCPT ); Fri, 6 Jan 2023 07:26:17 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61ABA8FC7; Fri, 6 Jan 2023 04:26:12 -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 73EC0420D5; Fri, 6 Jan 2023 17:26:09 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1673007969; bh=Jpt6+9ylUTbjX1bIo8Vh4n0SCobWCOgl4JCInPGT7oE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qttKCKS4aSUuK+ple2ILJL6naAHy+Ev0ZU95DfOBvLm02BIcZzdgOXU40Cte4jCMr PQYiM28mkvK9ND/3Adx9us0vTqLW1DCrroRFdu/NJpbK1jH+N5MRapEJCYiXBs5ddn OMUza57yRLaz+4cmQNPytPInnl9ZOhJ98M+h6me4yJXdjSY5LRSvTRowjvVjLIQCXC vtgcabJMm5cmX6W7aRbZNwAfa2KZgJihupkl9qp/6wtIv8EIQI5TlWlCA2X8nEIK/4 521OF9au+cjTNq2qct57HmTvNj0agbSrEaokP1Jx6iX4vnSB88mKXY9yzi4jL6CY5B eJRWjS+JW86VQ== 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 v2 2/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 9.7 (2015) Date: Fri, 6 Jan 2023 17:25:31 +0500 Message-Id: <20230106122532.3310265-3-nikita@trvn.ru> In-Reply-To: <20230106122532.3310265-1-nikita@trvn.ru> References: <20230106122532.3310265-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?1754276057108921479?= X-GMAIL-MSGID: =?utf-8?q?1754276057108921479?= 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 --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/msm8916-samsung-gt5-common.dtsi | 300 ++++++++++++++++++ .../boot/dts/qcom/msm8916-samsung-gt510.dts | 116 +++++++ 3 files changed, 417 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..bb1b1e814d8a --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -0,0 +1,300 @@ +// 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"; + + 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"; +}; + +&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 { + 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..6331166d9067 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts @@ -0,0 +1,116 @@ +// 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 Fri Jan 6 12:25:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 40112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp794381wrt; Fri, 6 Jan 2023 04:27:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXuyNnOTHXrXODhKv5dONPtGEHhK32/u4iZvEKmo3DWHXueL9jHmXRFRLrPZDop1Q3vfm65P X-Received: by 2002:a17:902:e84d:b0:192:8824:e516 with SMTP id t13-20020a170902e84d00b001928824e516mr50523687plg.51.1673008062302; Fri, 06 Jan 2023 04:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673008062; cv=none; d=google.com; s=arc-20160816; b=OF014lFZm0tP4ZUjDIiuxv05FfRFxNJzy/DQzKfzBZGI8CDnxq0oT4FFeHgOMXBp+I nUamC0kDOJIbLE5iIcID+lp2MfIzcF15Mxv8eYrQHDcLM9b/rzXZwg59QndRIDvVmAtw XgqYkatZvuzHfv3mYxWliAWKmmLkg5htNmbEYkcsxKwYifJnSZoyJwlW8WkGBGCpkRv/ Ok1EEySKwGazsE5bOAqoXg+cHd2PjisswXLkokS0JNf92H5JoxkCvuSiVnA7242cx7Jz C2UtV+i/ugrwUX92slDLhVI1yjja55mSa8Vrwpbi0rGcyb/knBBeNa+7S+bRAMBo3p2Q wskA== 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=cP9jlDQFsK0DxtB0tAV3WIvjL+aBPPQsvFqXyNBMLcc=; b=wZnpUbVDXb7sx+1dPdmTqEW/r7p9v+vJXtsPywWlV23rzd3Ys3/MS8QlwrXdqxEqTa V2BgGkTiJgiC5wtcx+uLKa9mJCloxM42AtauGwcjCk4CfHJpbnzirJzVxagC9Yyz/7FS 5yJ0mmC80AxyOz/r+dCcsbYdaEUv2Gp61YcdW3OruebIfarSHpIyQDfpELyzNsPDbgZN +F+WlyArJDmrQCb9r6Tgq/iE+JMrqD7Mptz7q8M3RdGOHU/u0zn5nbB9M9ybXPz5S4xT qYnS8ZbbT6wvw6bZy2ujsY3MY8LWP+V/dOJ16g5cIQ/D+9TlbhUkwj4DqtJ8yGHITHJV tmHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@trvn.ru header.s=mail header.b=usIRpBPN; 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 o17-20020a639211000000b004a3492595dcsi1389376pgd.248.2023.01.06.04.27.29; Fri, 06 Jan 2023 04:27:42 -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=usIRpBPN; 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 S232784AbjAFM0d (ORCPT + 99 others); Fri, 6 Jan 2023 07:26:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbjAFM0S (ORCPT ); Fri, 6 Jan 2023 07:26:18 -0500 Received: from box.trvn.ru (box.trvn.ru [194.87.146.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1060EB4A5; Fri, 6 Jan 2023 04:26:13 -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 71033420DB; Fri, 6 Jan 2023 17:26:10 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1673007970; bh=wg8JNpq9AvwF4/UE4LxIWsEbYMZOmEvMwfA6fBrhr+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=usIRpBPNoPC15w9jBF0CLlXcEPzEq+xnAPCSd4lb5m498cZjauqetoStPO9wEFOLY CcfUMPWqgrb++X7QvpklNAJZqbQRSfHil8e6CCa4KqJOEUQZdShzD1Rc4igDQszpzd 72+EytJq9+HhpQ25GOIsFuvaH8GMF8yg17QO+nLzKXl6zfAIL8CYPjgBNfe7KzrnxO etYRilelYKL/rTGq1iCJrPCVBup5Q2kqG12MwfzUTVWFWPtKglUfmZZYOY8tOLGjfJ v+DkaYxNtDieYDElLa9zOE0g557bWGHjxZr0mvdaJ7UUi1Tf1eCHd/4MabLQwjxAmL yCgwzKH238x7A== 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 v2 3/3] arm64: dts: qcom: Add device tree for Samsung Galaxy Tab A 8.0 (2015) Date: Fri, 6 Jan 2023 17:25:32 +0500 Message-Id: <20230106122532.3310265-4-nikita@trvn.ru> In-Reply-To: <20230106122532.3310265-1-nikita@trvn.ru> References: <20230106122532.3310265-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?1754276102068680043?= X-GMAIL-MSGID: =?utf-8?q?1754276102068680043?= 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] Signed-off-by: Nikita Travkin Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/msm8916-samsung-gt58.dts | 78 +++++++++++++++++++ 2 files changed, 79 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..fcf516888739 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts @@ -0,0 +1,78 @@ +// 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; + }; +};