From patchwork Tue Jun 30 14:09:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 11634169 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 71F09912 for ; Tue, 30 Jun 2020 14:09:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 58B9920759 for ; Tue, 30 Jun 2020 14:09:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oUfUydbJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388632AbgF3OJg (ORCPT ); Tue, 30 Jun 2020 10:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730339AbgF3OJe (ORCPT ); Tue, 30 Jun 2020 10:09:34 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3A16C061755; Tue, 30 Jun 2020 07:09:33 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id a1so20775947ejg.12; Tue, 30 Jun 2020 07:09:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oEIesOIh2eEPyGIcocRpHywZ3RCRJufVPViTP+ZtDmQ=; b=oUfUydbJvn80XfAt4xB0253AhcIFR0rzDDHBHnGqNgSJJeCNp8utgIbixVou1AnICx Ao7UjLmjeCdrIlucwmpUmVIkAXOgWn4jeM4pH+683Ud90e6+Ps0VEqYJGb3rGBGdVi7E Ld+56O46f6DuEY1lcHGqN9pz1XHzRyj1PCR1LKGXnunSeArQ9jDNbhLI8FsMBQw+OwIJ DtfmvNEBADn1HE7jrr0TAZHJeI66rDThQmigSpV6Hgo3Z6eJHpOtEXlBokERutYnEFnY jHKnCeKwKhe4Bwgy8UiHZwUaWt/GmJSLtiwQCJMEpbOQ9fVHkEWHjw38biqC/cz9ZcEo Srmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oEIesOIh2eEPyGIcocRpHywZ3RCRJufVPViTP+ZtDmQ=; b=A3C1ANijYobTNP/JvVA81jqX2fWeSJJVvD1MwDsBkxJW4D5JpJbExLZoOH5uJBRXXe /8tPtlW+Mkib7ORJv2DctIy8rT1JBBeM1Ch6GwusyGh1A1L2SxuQ7n/xPwe0yYcfvNlr fP4ioAP5+9ndQud3M91r9VVPFQo9JGNdSgDhKxaSCZWt43OSEiuPnq0OFN04HoTBKsqo bdGM/nCyqNKdL6aaCnWtZxrHHroS6dgMLo+DaaFwAPDiFKfhmagr7ChgMLBgKZb3Psov UXOFPNacM0WwveHi2SUi+kpWnWaHtvR959uW1c+ISB52QkG5LqKt+IxJVRWSN4oZQHJr kCWQ== X-Gm-Message-State: AOAM533IvivXhSaKgYxzGcl9nzcfbjeMW6suenbJ8ypjEKuzTgejYx/L a9DsR56GPhbKoRcTr3KHdKg= X-Google-Smtp-Source: ABdhPJyrcx0lP72w+PUYC/gRd9qIp40weTnteBiasf0hsJwZdonmgfDC04OEt+smFoWFC1HL6uYxTQ== X-Received: by 2002:a17:906:194b:: with SMTP id b11mr12484199eje.28.1593526172627; Tue, 30 Jun 2020 07:09:32 -0700 (PDT) Received: from localhost ([213.191.183.145]) by smtp.gmail.com with ESMTPSA id lv17sm2146098ejb.56.2020.06.30.07.09.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 07:09:32 -0700 (PDT) From: Iskren Chernev To: Rob Herring Cc: Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, Iskren Chernev Subject: [PATCH 1/7] ARM: dts: qcom: msm8974-klte: Merge pinctrl nodes Date: Tue, 30 Jun 2020 17:09:06 +0300 Message-Id: <20200630140912.260294-2-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630140912.260294-1-iskren.chernev@gmail.com> References: <20200630140912.260294-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org commit cd13c72c1853 ("ARM: dts: qcom: msm8974-klte: Add max77826 pmic node") and commit 8bf7a360a92c ("ARM: dts: qcom: msm8974-klte: Add sdhci1 node") both added pinctrl node. This patch merges the two nodes. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) -- 2.27.0 diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index d4dc98214225a..9520c6e7910ce 100644 --- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts @@ -258,6 +258,16 @@ cmd-data { bias-pull-up; }; }; + + i2c6_pins: i2c6 { + mux { + pins = "gpio29", "gpio30"; + function = "blsp_i2c6"; + + drive-strength = <2>; + bias-disable; + }; + }; }; sdhci@f9824900 { @@ -298,18 +308,6 @@ phy@a { }; }; - pinctrl@fd510000 { - i2c6_pins: i2c6 { - mux { - pins = "gpio29", "gpio30"; - function = "blsp_i2c6"; - - drive-strength = <2>; - bias-disable; - }; - }; - }; - i2c@f9928000 { status = "okay"; From patchwork Tue Jun 30 14:09:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 11634171 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84D00912 for ; Tue, 30 Jun 2020 14:09:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 680382072D for ; Tue, 30 Jun 2020 14:09:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SfHGeyk6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388661AbgF3OJj (ORCPT ); Tue, 30 Jun 2020 10:09:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388638AbgF3OJg (ORCPT ); Tue, 30 Jun 2020 10:09:36 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D644C03E979; Tue, 30 Jun 2020 07:09:36 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id d18so10715489edv.6; Tue, 30 Jun 2020 07:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bVQQTJXU6hJpQRkzdM4lyDkk+cMKxAXFIqG0ygvRxok=; b=SfHGeyk6zmICdMn/GLsq7lSISJo9s3/S8rwrpOzB13OFCF0I6r5KZMet6mQsHyFz+I NzFMOnN8/ORWPd8s8LLIORnOlrlIiKm/+kjhPCmAh9KOZe6uGZd8AF94cl3sxYxaYi4o xbPRX46EC1MwRZi01MMC3aTCofKys6gaNZoy4Z1BbWIDBrVIyWCeWe92RpxXB4E4mCag HNJzAT12Gug/lQ1PrJptiYKhjuViP1pG0jiP4gpX1TjMlI5iBz7HsLTQAXfG3E4VTuXR RZh0Svd26sYt/6znK6nTqdfWzKsHYxsKFC21TzrAcL71koJu5ueQxISKnmofOUIpotFJ MR/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bVQQTJXU6hJpQRkzdM4lyDkk+cMKxAXFIqG0ygvRxok=; b=Jf1meEnvjrITefjbD/ploR2wozRYZjX1ZhMIb8tKwHDpR1CBcnxitxPoMWorcSCp1+ 5vk1/2qTIfxr4LstzeodJOWMERcDv8VVowix7O3HNOYNaSsuTv9L9w32E+PXLLO5m8pH ADiiLtL/2cxBd/t7xmbr5W8/RNbiahcAzaT+YqxD2i376qhH70jk8DzdIvki2AOZVzU4 oTwLjDvlDuOtiqL/TYSTi/oOtDqvQcAGwg3Pc8Jue8cmiaElaSLVxYlqO7o79dJ6Ts8B eIsosxrY9JSO2giiuEh4tkREP0pN890SWPrVy+k6KTQIGgBaaDH60q+UpvVq69lNadst mS4A== X-Gm-Message-State: AOAM532pWJxG0+aBwCK0pgVHn520Nd4r8SSvWK++4VC+K+J1ij8iSjhJ Vt21qA8h8toMDzaF7emZOPk= X-Google-Smtp-Source: ABdhPJyz0OMfOW/Xa88VFynWcMy1NSyPgY8PeKveBacdGW+P36+12SjlNLo9CurpHIz7wWhMzVn5gw== X-Received: by 2002:a50:cd53:: with SMTP id d19mr23730475edj.300.1593526175005; Tue, 30 Jun 2020 07:09:35 -0700 (PDT) Received: from localhost ([213.191.183.145]) by smtp.gmail.com with ESMTPSA id se16sm2093611ejb.93.2020.06.30.07.09.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 07:09:34 -0700 (PDT) From: Iskren Chernev To: Rob Herring Cc: Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, Iskren Chernev Subject: [PATCH 2/7] ARM: dts: qcom: msm8974-klte: Add support for touchkey Date: Tue, 30 Jun 2020 17:09:07 +0300 Message-Id: <20200630140912.260294-3-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630140912.260294-1-iskren.chernev@gmail.com> References: <20200630140912.260294-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for the touchkey found on the Samsung Galaxy S5. The touchkey is responsible for handling the application and back buttons found around the home button. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index 9520c6e7910ce..750e2f261139a 100644 --- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts @@ -145,7 +145,7 @@ pma8084_l18: l18 { }; pma8084_l19: l19 { - regulator-min-microvolt = <2900000>; + regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; }; @@ -203,6 +203,31 @@ pma8084_l27: l27 { }; }; + i2c-gpio-touchkey { + compatible = "i2c-gpio"; + #address-cells = <1>; + #size-cells = <0>; + sda-gpios = <&msmgpio 95 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&msmgpio 96 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_touchkey_pins>; + + touchkey@20 { + compatible = "cypress,tm2-touchkey"; + reg = <0x20>; + + interrupt-parent = <&pma8084_gpios>; + interrupts = <6 IRQ_TYPE_EDGE_FALLING>; + pinctrl-names = "default"; + pinctrl-0 = <&touchkey_pin>; + + vcc-supply = <&max77826_ldo15>; + vdd-supply = <&pma8084_l19>; + + linux,keycodes = ; + }; + }; + /delete-node/ vreg-boost; }; @@ -268,6 +293,15 @@ mux { bias-disable; }; }; + + i2c_touchkey_pins: i2c-touchkey { + mux { + pins = "gpio95", "gpio96"; + function = "gpio"; + input-enable; + bias-pull-up; + }; + }; }; sdhci@f9824900 { @@ -418,6 +452,14 @@ gpio_keys_pin_a: gpio-keys-active { bias-pull-up; power-source = ; }; + + touchkey_pin: touchkey-int-pin { + pins = "gpio6"; + function = "normal"; + bias-disable; + input-enable; + power-source = ; + }; }; }; }; From patchwork Tue Jun 30 14:09:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 11634181 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86D2192A for ; Tue, 30 Jun 2020 14:10:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E1162074F for ; Tue, 30 Jun 2020 14:10:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GQg6Mbdt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388729AbgF3OKH (ORCPT ); Tue, 30 Jun 2020 10:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388654AbgF3OJi (ORCPT ); Tue, 30 Jun 2020 10:09:38 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED84C061755; Tue, 30 Jun 2020 07:09:38 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id ga4so20749001ejb.11; Tue, 30 Jun 2020 07:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H/evTaw/z01ZGDeG0L9HG7odwSXvoYGd70EVEtMJgyw=; b=GQg6MbdtC7O/JksYFnsXCQUa7VM8GqRFaJ7o8tcCki5SbVvNanFklIHngwm1SCsdqC TiCNmopPL1Snjo7Fdp4DTuoud9uG2t5ZbHcB+yD2UD+nJPL6amp/HOxMecS6EZs6Ds3V cEGwKV7X36jt39dHe/Lhe7DxJtDdcoSS3BM1ufWuJhYrCUwaWl0kamfYurWYaGbaPLXs vVdxw3V1aSUlRPXyqc2mtIZ7pI7aaK2Z1ru9CkXNoq7zo7hJAAMzwv55RCLXIJbH9/SB TPhpEXceHaEjSDLRP/rNok1EhUfP8FXZnsD9Pqg0ZAxb+y9elKXyFHc4UeI/Lt8GYk/E X8XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H/evTaw/z01ZGDeG0L9HG7odwSXvoYGd70EVEtMJgyw=; b=qKEmkcxd6EBBHDiigRWtySxHT+cID03D8BeAVH8oqusKDoQ3WWg15XW3nOkqt+gfbp lpBl3ogqtNKDDbWRVICyNbD66LBxXuVTZ0X/uBBP6M0Io8kjZm+DUmF+40BfjRGPAyyk LTSrqVKB/usRa6//tcND1sgTFtYVSaU1C3NXLZhvQiEW3hYwVr1pu9Og4A0SiQHLNZ+w kBaLI9blgu59MTV/55i1glQB3413u9qbkB9r2+dHbIFuYVDw7yx7VZmeShzzR/g+N+Fl cGBv0WDV1lcj0VJPKjAGSXvUjERCAnZvMCDIWGNAW7gH2WOBHG65G4XLOMDSVWDDMBIM JWIg== X-Gm-Message-State: AOAM530U7CCpOsMhN7YdCYkP3Yu7zdP3Tl0ixgBl3IUA/+WMM6bUA4t3 L+BH9HBoInWmKeQu/nkO58Y= X-Google-Smtp-Source: ABdhPJxbREhkDAOSI8igfNmrRTf/zORHDkDfanfv8ux3Hn4L44dxoCoo9pmVHaHGHVli3Hb61tBPpQ== X-Received: by 2002:a17:906:970a:: with SMTP id k10mr19194276ejx.236.1593526177178; Tue, 30 Jun 2020 07:09:37 -0700 (PDT) Received: from localhost ([213.191.183.145]) by smtp.gmail.com with ESMTPSA id n5sm2132704eja.70.2020.06.30.07.09.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 07:09:36 -0700 (PDT) From: Iskren Chernev To: Rob Herring Cc: Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, Iskren Chernev Subject: [PATCH 3/7] ARM: dts: qcom: msm8974-klte: Add support for touchscreen Date: Tue, 30 Jun 2020 17:09:08 +0300 Message-Id: <20200630140912.260294-4-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630140912.260294-1-iskren.chernev@gmail.com> References: <20200630140912.260294-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for the touchscreen found on the Samsung Galaxy S5. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index 750e2f261139a..085636f182d01 100644 --- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts @@ -284,6 +284,16 @@ cmd-data { }; }; + i2c2_pins: i2c2 { + mux { + pins = "gpio6", "gpio7"; + function = "blsp_i2c2"; + + drive-strength = <2>; + bias-disable; + }; + }; + i2c6_pins: i2c6 { mux { pins = "gpio29", "gpio30"; @@ -342,6 +352,42 @@ phy@a { }; }; + i2c@f9924000 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins>; + + touchscreen@20 { + compatible = "syna,rmi4-i2c"; + reg = <0x20>; + + interrupt-parent = <&pma8084_gpios>; + interrupts = <8 IRQ_TYPE_EDGE_FALLING>; + + vdd-supply = <&max77826_ldo13>; + vio-supply = <&pma8084_lvs2>; + + pinctrl-names = "default"; + pinctrl-0 = <&touch_pin>; + + syna,startup-delay-ms = <100>; + + #address-cells = <1>; + #size-cells = <0>; + + rmi4-f01@1 { + reg = <0x1>; + syna,nosleep-mode = <1>; + }; + + rmi4-f12@12 { + reg = <0x12>; + syna,sensor-type = <1>; + }; + }; + }; + i2c@f9928000 { status = "okay"; @@ -460,6 +506,14 @@ touchkey_pin: touchkey-int-pin { input-enable; power-source = ; }; + + touch_pin: touchscreen-int-pin { + pins = "gpio8"; + function = "normal"; + bias-disable; + input-enable; + power-source = ; + }; }; }; }; From patchwork Tue Jun 30 14:09:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 11634173 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D508992A for ; Tue, 30 Jun 2020 14:09:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB5B62074F for ; Tue, 30 Jun 2020 14:09:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CgFsxulL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388713AbgF3OJp (ORCPT ); Tue, 30 Jun 2020 10:09:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388702AbgF3OJl (ORCPT ); Tue, 30 Jun 2020 10:09:41 -0400 Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E994CC061755; Tue, 30 Jun 2020 07:09:40 -0700 (PDT) Received: by mail-ed1-x544.google.com with SMTP id b15so16357354edy.7; Tue, 30 Jun 2020 07:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=H4LGdvk0FVAQdM2GrebNjyfNyEq8Tyh1403AEfTeuTk=; b=CgFsxulLT0QQqHs4gyD5P8rHQCAJk17YgCsWjk+6SgJCzjvgFW3ByQtPLmLiqXnV+y gE32V9IZqQp75Iz3wioCM+HwDnRw0I5kkq2xT8MqyLc1zbb9UeoJcqTwtGT47RPaBCbC 6LZejaYMIkv9156vCdZi/konj55KEyIUpD80Y5xIEGvys1u9kyOkXC+Zlu1Jbczk0q0r +k+CS2PTkYwz9TiBGb9yInY+M/QJYV0Oe4kKuRzYB2691aRBvBwCl/JFEhCGdJWEz4hq C7EPzu5zeVx3YD6oVTjpdf8dHMBb/3KSrujZlk5/Yt6V7J1azELw5AjNZNRlQxOHblse rwVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H4LGdvk0FVAQdM2GrebNjyfNyEq8Tyh1403AEfTeuTk=; b=WcSs68ZczFRVyKtZmuFIKGZRTdyk94wlQ7EzrddFuaZu56ajE8vy2enNEw0zOLd3qb vqlsR1hgccXv8cT3XHZs5qxxqj7zT5hM8tFkW1fa87AIBo/eZVqmDqogGCBV0ij6M+YF vcF2d/Qet83cJfv621gyuZb+iN8V8gOOcCmLwUD/4qhrQZt3A63TAsHGNXK2AFi+tWzE CnbTVYpIFFzOsOkLmz+Xv+UTMPFtIhFedx/rpaQueRIHgsaSTimm57myYzxO2wdzFBme nIq+fcr3oRVmqHKooMfqcYiVmzKwWxtjtTkxlAN1G9d/IDVWHEnyQwmvWgTc8OeIWH5D Ig2Q== X-Gm-Message-State: AOAM532eLQ37TyjVSWJah3u6OmpHygAbRP/fjNqzu28vESw0V4x5X3jH /8shDhffxP6DYzk3fI8uB4Q= X-Google-Smtp-Source: ABdhPJwT2VUnfj3SZl74nR2WzGYIkpyKPP1BljDzQ4r+Kh5w2A0iN4qN9Uc95LlIfhtiQG8HuZcwXQ== X-Received: by 2002:aa7:c614:: with SMTP id h20mr23233979edq.29.1593526179698; Tue, 30 Jun 2020 07:09:39 -0700 (PDT) Received: from localhost ([213.191.183.145]) by smtp.gmail.com with ESMTPSA id y7sm2844372edq.25.2020.06.30.07.09.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 07:09:39 -0700 (PDT) From: Iskren Chernev To: Rob Herring Cc: Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, Iskren Chernev Subject: [PATCH 4/7] ARM: dts: qcom: msm8974-klte: Add support for led Date: Tue, 30 Jun 2020 17:09:09 +0300 Message-Id: <20200630140912.260294-5-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630140912.260294-1-iskren.chernev@gmail.com> References: <20200630140912.260294-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The klte uses a Panasonic AN30259A LED controller for it's indicator led. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index 085636f182d01..7b398da9b75ed 100644 --- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts @@ -4,6 +4,7 @@ #include #include #include +#include / { model = "Samsung Galaxy S5"; @@ -228,6 +229,44 @@ touchkey@20 { }; }; + i2c-gpio-led { + compatible = "i2c-gpio"; + #address-cells = <1>; + #size-cells = <0>; + scl-gpios = <&msmgpio 121 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&msmgpio 120 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_led_pins>; + + i2c-gpio,delay-us = <2>; + + led-controller@30 { + compatible = "panasonic,an30259a"; + reg = <0x30>; + + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led@2 { + reg = <2>; + function = LED_FUNCTION_STATUS; + color = ; + }; + + led@3 { + reg = <3>; + function = LED_FUNCTION_STATUS; + color = ; + }; + }; + }; + /delete-node/ vreg-boost; }; @@ -312,6 +351,15 @@ mux { bias-pull-up; }; }; + + i2c_led_pins: i2c-led { + mux { + pins = "gpio120", "gpio121"; + function = "gpio"; + input-enable; + bias-pull-down; + }; + }; }; sdhci@f9824900 { From patchwork Tue Jun 30 14:09:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 11634175 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AF8EB912 for ; Tue, 30 Jun 2020 14:09:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95F5C20780 for ; Tue, 30 Jun 2020 14:09:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="e5jyJSNB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388732AbgF3OJu (ORCPT ); Tue, 30 Jun 2020 10:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388638AbgF3OJo (ORCPT ); Tue, 30 Jun 2020 10:09:44 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE044C061755; Tue, 30 Jun 2020 07:09:43 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id o18so16349067eje.7; Tue, 30 Jun 2020 07:09:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tl9JWQ8+j2DoVhTG+CwFOZrvxvIZ9+gVkhBo8fcxQrc=; b=e5jyJSNB6SHcJf/l2KeBi2t0RLs72qjp8/4xOzi1WV4pX8DpnqNXNv0BFP4Njv359K Whl6slgbEf9Ftlxow+ziSVVGQnSEqmzfWiTvFhnBN3ntlOk0amVPqy9gmqu4UeS61quA tQ7LlDsoIJQPoS2jNzn4kZSdpCv7EK2NaDLD0JOComaW2C308hLkXIynlAoeNgBk7/+i WF9ySiIvh6bxVgfFqOCsBOYhMsERt05i65lzKkqj6zeCDlEpgVRO5DMtAQ+aXs+6JTQb S3/TFk4w1sDNsRoz2gNk6LLxTVeMxLky64dqq6u7c3iYWFgj6ljFLsCI7IysYw/LPmdk g3mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tl9JWQ8+j2DoVhTG+CwFOZrvxvIZ9+gVkhBo8fcxQrc=; b=qkaB894MLnhGtt0d0tGhRcrV45XYmyZzlLYSAbuFS8ssBMT414eZm2PksYwVCw7wrr Oh+Pmja2Tc6zS+26dB+jwmJdU0QCwLMhsvnTFLo9umyWXIeMh86WMPffVJ4z/W5wzI84 Pq3FNlk84vyPYZs7Re6pEPU1Efoq87h2ZyQuWdHRaRlKP7p+bDCa0naBbR2es3WV2Zo/ fZclSB/tcbjaXaP9rWwB2cWrQ12ebmZ/uJpDT3Ouj5hoWLnu65WKp8AXArdwuZukKKhr BGH/lZJjarlntm+xpDqq367Jiuhlf+w0xE1NBgZPNxV32qRCXsPQjEliQ1ELnUcjnf70 xzow== X-Gm-Message-State: AOAM533Wdd0gV63tKsChKo69/BchzyegsahxjcvPo7POgmI/uIciRD2t +kFBDUI4y2MfvHRuj021SnfQsVpUnjc= X-Google-Smtp-Source: ABdhPJzjzUnn8P5o+WV/Ymhan4pwv340Mg/Uk2F+BT4HxAwWEYY81Ndd3rkmEhEc3zIBmtQ1BPNKrA== X-Received: by 2002:a17:906:8595:: with SMTP id v21mr19027398ejx.333.1593526182563; Tue, 30 Jun 2020 07:09:42 -0700 (PDT) Received: from localhost ([213.191.183.145]) by smtp.gmail.com with ESMTPSA id i10sm2833738edx.42.2020.06.30.07.09.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 07:09:41 -0700 (PDT) From: Iskren Chernev To: Rob Herring Cc: Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, Iskren Chernev Subject: [PATCH 5/7] ARM: dts: qcom: msm8974-klte: Add gpio expander chip Date: Tue, 30 Jun 2020 17:09:10 +0300 Message-Id: <20200630140912.260294-6-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630140912.260294-1-iskren.chernev@gmail.com> References: <20200630140912.260294-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Samsung Galaxy S5 has a GPIO Expander chip, the PCAL6416A with 16 ports on a i2c bus. These pins are used for WiFi, NFC, IR among other things. Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index 7b398da9b75ed..29099b83b231d 100644 --- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts @@ -236,10 +236,25 @@ i2c-gpio-led { scl-gpios = <&msmgpio 121 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; sda-gpios = <&msmgpio 120 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; pinctrl-names = "default"; - pinctrl-0 = <&i2c_led_pins>; + pinctrl-0 = <&i2c_led_gpioex_pins>; i2c-gpio,delay-us = <2>; + gpio_expander: gpio@20 { + compatible = "nxp,pcal6416"; + reg = <0x20>; + + gpio-controller; + #gpio-cells = <2>; + + vcc-supply = <&pma8084_s4>; + + pinctrl-names = "default"; + pinctrl-0 = <&gpioex_pin>; + + reset-gpios = <&msmgpio 145 GPIO_ACTIVE_LOW>; + }; + led-controller@30 { compatible = "panasonic,an30259a"; reg = <0x30>; @@ -352,7 +367,7 @@ mux { }; }; - i2c_led_pins: i2c-led { + i2c_led_gpioex_pins: i2c-led-gpioex { mux { pins = "gpio120", "gpio121"; function = "gpio"; @@ -360,6 +375,16 @@ mux { bias-pull-down; }; }; + + gpioex_pin: gpioex { + res { + pins = "gpio145"; + function = "gpio"; + + bias-pull-up; + drive-strength = <2>; + }; + }; }; sdhci@f9824900 { From patchwork Tue Jun 30 14:09:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 11634177 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41C16912 for ; Tue, 30 Jun 2020 14:10:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2137520774 for ; Tue, 30 Jun 2020 14:10:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mxQHsQlN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388726AbgF3OJu (ORCPT ); Tue, 30 Jun 2020 10:09:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388719AbgF3OJr (ORCPT ); Tue, 30 Jun 2020 10:09:47 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D28C6C061755; Tue, 30 Jun 2020 07:09:46 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id dp18so20793780ejc.8; Tue, 30 Jun 2020 07:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HCUkrsg5LqccPCpsSq8O97JgHCbLCI4g5FUt6XwYrsw=; b=mxQHsQlNnWhfJi1RiB2BKfC3ZhKzcWvlbho7Xx2zOPkND28P/EzJH6WfiaSrqzzSt9 R/TSbs4OqcOAqMNOEuLzJxmEcs010al6hnwe9BulCPRw6wHPolD8DR6Yz/8u4lWiCRoH Dp57rAX9A+VJ1FsB0ZG1OaL01mR/UoETU/YibAwyE76fWkXwNduTinJwiUL1CfV2PoGs 22nJZUtytJdn1ZzYjOLIZbgZaNZ6P3R+mMOZebB5XVvUUY9O/F6EIRlgOBx11ToVLLg4 jfixu6YsqmaLzak23fmcqWJMsg0YZT1m5D1BxY31BfXZ7bXvTbdclcMzuFl0VVZq1qBd 7jXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HCUkrsg5LqccPCpsSq8O97JgHCbLCI4g5FUt6XwYrsw=; b=HGXOxTJEYN5RXFzau6Au6+Xd4mT8CZK8mNVvSj1H6RLjRuL0drqp8v+ZvJsD6NQc8C vNHTz8qwlARfAhL2EECI8VJVOS/9SfqCp4ueFWM9lJd/d/oSW6i0n+wQrV29Hf9fq71z Xk6rqUDkH5vSLipS5IaZuc5zoTTIcAq3X88zT7LyY1lFSqSkAqOREaH/9yCL2Z8wCAJv STTGqaSXw+9lMfd3Lfak9RueZ2OKf4xtwtaW51AHuVm39mQnda5hTfRXXvVD4g/CKU5I Ji9DR3zP5saRRwxXxHxnSmCeHtgAqj64j8aHbLJZObsFkwh2RaCFGQLQVEp9SCrWRLtj fN5Q== X-Gm-Message-State: AOAM533R8BC+0ardlxUWvMQNCmL3BT1F04iQLlPeYvyCJLxoipYM4v98 uKeaa6Ljr1HXrDPJtU/sfbc= X-Google-Smtp-Source: ABdhPJyiO7e3E5Q74z3QoxaMEb21ZfZSq4Uq8oxNstIfJ/lOp5jl8c6ZKXKTAxMLd5PUQGC32IF60Q== X-Received: by 2002:a17:906:5502:: with SMTP id r2mr16652452ejp.316.1593526185586; Tue, 30 Jun 2020 07:09:45 -0700 (PDT) Received: from localhost ([213.191.183.145]) by smtp.gmail.com with ESMTPSA id ch2sm2943381edb.87.2020.06.30.07.09.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 07:09:44 -0700 (PDT) From: Iskren Chernev To: Rob Herring Cc: Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, Iskren Chernev Subject: [PATCH 6/7] ARM: dts: qcom: msm8974-klte: Add support for wifi Date: Tue, 30 Jun 2020 17:09:11 +0300 Message-Id: <20200630140912.260294-7-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630140912.260294-1-iskren.chernev@gmail.com> References: <20200630140912.260294-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Samsung Galaxy S5 (klte), uses a Broadcom 4354 Chip connected on the SDIO bus. The chip also requires a corresponding firmware + txt file[1]. [1] https://gitlab.com/postmarketOS/pmaports/-/blob/master/firmware/firmware-samsung-klte/APKBUILD Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index 29099b83b231d..989447beb4319 100644 --- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts @@ -282,6 +282,17 @@ led@3 { }; }; + vreg_wlan: wlan-regulator { + compatible = "regulator-fixed"; + + regulator-name = "wl-reg"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&gpio_expander 8 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + /delete-node/ vreg-boost; }; @@ -338,6 +349,20 @@ cmd-data { }; }; + sdhc3_pin_a: sdhc3-pin-active { + clk { + pins = "sdc2_clk"; + drive-strength = <6>; + bias-disable; + }; + + cmd-data { + pins = "sdc2_cmd", "sdc2_data"; + drive-strength = <6>; + bias-pull-up; + }; + }; + i2c2_pins: i2c2 { mux { pins = "gpio6", "gpio7"; @@ -385,6 +410,16 @@ res { drive-strength = <2>; }; }; + + wifi_pin: wifi { + int { + pins = "gpio92"; + function = "gpio"; + + input-enable; + bias-pull-down; + }; + }; }; sdhci@f9824900 { @@ -400,6 +435,36 @@ sdhci@f9824900 { pinctrl-0 = <&sdhc1_pin_a>; }; + sdhci@f98a4900 { + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + max-frequency = <100000000>; + + pinctrl-names = "default"; + pinctrl-0 = <&sdhc3_pin_a>; + + vmmc-supply = <&vreg_wlan>; + vqmmc-supply = <&pma8084_s4>; + + bus-width = <4>; + non-removable; + + wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + + interrupt-parent = <&msmgpio>; + interrupts = <92 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "host-wake"; + + pinctrl-names = "default"; + pinctrl-0 = <&wlan_sleep_clk_pin &wifi_pin>; + }; + }; + usb@f9a55000 { status = "ok"; @@ -587,6 +652,15 @@ touch_pin: touchscreen-int-pin { input-enable; power-source = ; }; + + wlan_sleep_clk_pin: wlan-sleep-clk-pin { + pins = "gpio16"; + function = "func2"; + + output-high; + power-source = ; + qcom,drive-strength = ; + }; }; }; }; From patchwork Tue Jun 30 14:09:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iskren Chernev X-Patchwork-Id: 11634179 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EABE92A for ; Tue, 30 Jun 2020 14:10:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2F34F207E8 for ; Tue, 30 Jun 2020 14:10:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tv8C/UYY" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388764AbgF3OKA (ORCPT ); Tue, 30 Jun 2020 10:10:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388729AbgF3OJu (ORCPT ); Tue, 30 Jun 2020 10:09:50 -0400 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4B5BC061755; Tue, 30 Jun 2020 07:09:49 -0700 (PDT) Received: by mail-ed1-x542.google.com with SMTP id b15so16357922edy.7; Tue, 30 Jun 2020 07:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fZ6EA5FNrJjXMrMBZwxAfBnL6L5p1y0KiK8AwGx10HQ=; b=tv8C/UYYGPn7oGsWntvdusvYlJg7c33gM2oBNJAgGEDWQ/mDXtwVH4M8u8sDE5hMEh yc1ESDsG95rSCqFCRJ68ggKSyVuLB6/7HB2FAh3Us74P4DUKItUas7un7ve2NPdQ0snD xjfLeraiBmdHFpO4ZdeqzZroe8/BVFTqSas6MZLGuBg/8FjfY+mhu9YbL20BxOMYm39q MxQaMM7vGHddChXTRz6fq2CfiDy/jvqxSNdDD74w6Ti8V2T3OrYt5LRZUN+FinTx/igc p9GDSAjkWgkbZjN9GtiuMZsAqXDP0vQpfXyiv55SQCQ1hCP5fn9SBra4IGRodO3PuJ5X Y/NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fZ6EA5FNrJjXMrMBZwxAfBnL6L5p1y0KiK8AwGx10HQ=; b=fanM4ZZhAERBwvEj1XNBqjJcDnHATHk7ajxgG5IYsBfkuSikCYpEQ9qIR2i/J8WrsG Oo+JTJabXeX3kLHT1cCUTiA7Nq9piY3lPzeMIC0GKh0oS0XeH140jrKS5jDt9MXdhabO T++Q5Ky2QwnFB8pGC06us9Zj65MKZq3GFwO8VPHn0VJBOIEk5NXgTT4ttV4EYediuhuG l91qoXwFQ2QQZBTonne77eam8gw86cHQ6Afjk5796hZZNuJkbmGbxwPJh116FiJFlT77 3rx6fgWXJvRkoimBS4WRFlmoiTCU9ajAFI7fMXZzrPe6Ag1MV5Y+bOr0nTZ5JTnKfLGD lEhg== X-Gm-Message-State: AOAM530OjIhduC2bB6yQUVgW9HW3JYn7ijt9z7kx+tfRmNlsKOxCs78h vOHNBWib8Aw2LlVhUtnaG8w= X-Google-Smtp-Source: ABdhPJzUc/AlPUjCu8xEJyv2O/B2cKzBvviK5uXiBogcMciemzbbhXPpqbyrUBv3NJ+NxHkAdd6Gvw== X-Received: by 2002:a05:6402:1597:: with SMTP id c23mr22301422edv.243.1593526188104; Tue, 30 Jun 2020 07:09:48 -0700 (PDT) Received: from localhost ([213.191.183.145]) by smtp.gmail.com with ESMTPSA id d24sm2564876edp.83.2020.06.30.07.09.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 07:09:47 -0700 (PDT) From: Iskren Chernev To: Rob Herring Cc: Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, Iskren Chernev Subject: [PATCH 7/7] ARM: dts: qcom: msm8974-klte: Add support for SD card Date: Tue, 30 Jun 2020 17:09:12 +0300 Message-Id: <20200630140912.260294-8-iskren.chernev@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200630140912.260294-1-iskren.chernev@gmail.com> References: <20200630140912.260294-1-iskren.chernev@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Samsung Galaxy S5 (klte), has 3 SDHCI nodes used for internal storage, WiFi, external SD card slot. The external SD card slot is similar to the internal storage. The device has support for CD (card detect), but if enabled, the card is not initialized properly if present during startup. That is why CD is disabled and polling is used instead. Related thread [1] [1] https://lore.kernel.org/linux-mmc/491cfef4-4a97-b6e8-0f41-d44e1c73eea4@gmail.com/ Signed-off-by: Iskren Chernev --- .../boot/dts/qcom-msm8974-samsung-klte.dts | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) -- 2.27.0 diff --git a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts index 989447beb4319..b0899107f3ced 100644 --- a/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +++ b/arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts @@ -12,6 +12,8 @@ / { aliases { serial0 = &blsp1_uart1; + sdhc1 = &sdhc_1; /* SDC1 eMMC slot */ + sdhc2 = &sdhc_2; /* SDC2 SD card slot */ }; chosen { @@ -161,6 +163,9 @@ pma8084_l20: l20 { pma8084_l21: l21 { regulator-min-microvolt = <2950000>; regulator-max-microvolt = <2950000>; + + regulator-allow-set-load; + regulator-system-load = <200000>; }; pma8084_l22: l22 { @@ -349,6 +354,24 @@ cmd-data { }; }; + sdhc2_pin_a: sdhc2-pin-active { + clk-cmd-data { + pins = "gpio35", "gpio36", "gpio37", "gpio38", + "gpio39", "gpio40"; + function = "sdc3"; + drive-strength = <8>; + bias-disable; + }; + }; + + sdhc2_cd_pin: sdhc2-cd { + pins = "gpio62"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + sdhc3_pin_a: sdhc3-pin-active { clk { pins = "sdc2_clk"; @@ -422,7 +445,7 @@ int { }; }; - sdhci@f9824900 { + sdhc_1: sdhci@f9824900 { status = "ok"; vmmc-supply = <&pma8084_l20>; @@ -435,6 +458,25 @@ sdhci@f9824900 { pinctrl-0 = <&sdhc1_pin_a>; }; + sdhc_2: sdhci@f9864900 { + status = "ok"; + + max-frequency = <100000000>; + + vmmc-supply = <&pma8084_l21>; + vqmmc-supply = <&pma8084_l13>; + + bus-width = <4>; + + /* cd-gpio is intentionally disabled. If enabled, an SD card + * present during boot is not initialized correctly. Without + * cd-gpios the driver resorts to polling, so hotplug works. + */ + pinctrl-names = "default"; + pinctrl-0 = <&sdhc2_pin_a /* &sdhc2_cd_pin */>; + // cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>; + }; + sdhci@f98a4900 { status = "okay";