From patchwork Sun Apr 26 14:06:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 11510645 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 4519146DC for ; Sun, 26 Apr 2020 14:08:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26E222078E for ; Sun, 26 Apr 2020 14:08:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="p/egE2Nh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726140AbgDZOId (ORCPT ); Sun, 26 Apr 2020 10:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726142AbgDZOIc (ORCPT ); Sun, 26 Apr 2020 10:08:32 -0400 Received: from mo6-p01-ob.smtp.rzone.de (mo6-p01-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5301::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15051C09B051; Sun, 26 Apr 2020 07:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1587910109; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=X6s9ev0ZnHJUC2UaGsaWn1aQO321edVLr0jMEEcsidA=; b=p/egE2NhubchTCEOMIn6O3umhHR727pVbKRtq/tydKtNBrMr6UM8fxCyBlk/wRBsxN TvhmOj2Ax1iqg5t2hY8M+OlzzAtDTVV2qCIpacgo/ru4ISV9blPUvaeigqGIv5zbwr4X KHfdvRkYiX0PiVYC6+TWsVdRtBDfP7yfEqeV0X+CsKaQPvvnHTO3/OO9nsSRclksAH6C O+gFW7gmejgP4w3i5Em12u1PU6CFHN5terJnI7ggnEqOukn24V/MQmjia4nETRgiSVnU btfyKaVYH1x0cIQ3CjwWd4IywGtIY/kQbaLPyS1ETiQy4qmTRrJ8ElVoTdl1DaE5g5JD ZI6A== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxB4G6Nf3AC" X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain by smtp.strato.de (RZmta 46.6.2 DYNA|AUTH) with ESMTPSA id 60b02dw3QE8PNFK (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 26 Apr 2020 16:08:25 +0200 (CEST) From: Stephan Gerhold To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold Subject: [PATCH 1/4] arm64: dts: qcom: msm8916: Add blsp_i2c1 Date: Sun, 26 Apr 2020 16:06:39 +0200 Message-Id: <20200426140642.204395-2-stephan@gerhold.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200426140642.204395-1-stephan@gerhold.net> References: <20200426140642.204395-1-stephan@gerhold.net> 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 MSM8916 has another I2C QUP controller that can be enabled on GPIO 2 and 3. Add blsp_i2c1 to msm8916.dtsi and disable it by default. Signed-off-by: Stephan Gerhold Reviewed-by: Bjorn Andersson --- On samsung-a2015 there is an external TFA9895 speaker amplifier connected to blsp_i2c1. There isn't a proper mainline driver for it (yet?), but it's nice to have the I2C bus in mainline at least. --- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 24 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 15 ++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi index 242aaea68804..b45fd12856ea 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-pins.dtsi @@ -262,6 +262,30 @@ pinconf { }; }; + i2c1_default: i2c1_default { + pinmux { + function = "blsp_i2c1"; + pins = "gpio2", "gpio3"; + }; + pinconf { + pins = "gpio2", "gpio3"; + drive-strength = <2>; + bias-disable; + }; + }; + + i2c1_sleep: i2c1_sleep { + pinmux { + function = "gpio"; + pins = "gpio2", "gpio3"; + }; + pinconf { + pins = "gpio2", "gpio3"; + drive-strength = <2>; + bias-disable; + }; + }; + i2c2_default: i2c2_default { pinmux { function = "blsp_i2c2"; diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 8b429954ea29..6ab7cabde370 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -612,6 +612,21 @@ blsp_spi6: spi@78ba000 { status = "disabled"; }; + blsp_i2c1: i2c@78b5000 { + compatible = "qcom,i2c-qup-v2.2.1"; + reg = <0x078b5000 0x500>; + interrupts = ; + clocks = <&gcc GCC_BLSP1_AHB_CLK>, + <&gcc GCC_BLSP1_QUP1_I2C_APPS_CLK>; + clock-names = "iface", "core"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c1_default>; + pinctrl-1 = <&i2c1_sleep>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + blsp_i2c2: i2c@78b6000 { compatible = "qcom,i2c-qup-v2.2.1"; reg = <0x078b6000 0x500>; From patchwork Sun Apr 26 14:06:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 11510639 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 C2E3815AB for ; Sun, 26 Apr 2020 14:08:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DC4C208FE for ; Sun, 26 Apr 2020 14:08:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="Bm8ZEXPi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725974AbgDZOId (ORCPT ); Sun, 26 Apr 2020 10:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgDZOIc (ORCPT ); Sun, 26 Apr 2020 10:08:32 -0400 Received: from mo6-p02-ob.smtp.rzone.de (mo6-p02-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5302::12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27008C09B053; Sun, 26 Apr 2020 07:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1587910110; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=jcdI1GCqmlTQ2XhZ9zCkAzlSz2grGdQX6g0Xsqpa9Xo=; b=Bm8ZEXPiUws/3XCrP5L8bI3MtWV1BPowo0REUys2AHU5B49HpBXFeHh+cfA9EDYtaf zGhNDUxILinqelNTX4z3BgZWiJItwdj3cRRqeC1AjQPHUgKd7l8XsA4AxITK9HsW3WNG 3qoFX6kidbfVoIo93fgIi5+IC6yOUqO1/RQzTBb80KRS8jU2VJ6FFKRwHWhOhEFwQHks afGhdvUm+B0HG2ILBWc1zBUAGD905t3mA+ss1g6QZwCjFQTZ1hCZ33v8hrYFz6U10TDk eGXbvAWxWetveAKfOoTTIUbZaE4wWvmhm8s+S6pW8KaoH4fu/UxOCwAl6+r+iAFLCBn8 6gZg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxB4G6Nf3AC" X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain by smtp.strato.de (RZmta 46.6.2 DYNA|AUTH) with ESMTPSA id 60b02dw3QE8QNFM (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 26 Apr 2020 16:08:26 +0200 (CEST) From: Stephan Gerhold To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold , Michael Srba Subject: [PATCH 3/4] arm64: dts: qcom: msm8916-samsung-a2015: Add touchscreen regulator Date: Sun, 26 Apr 2020 16:06:41 +0200 Message-Id: <20200426140642.204395-4-stephan@gerhold.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200426140642.204395-1-stephan@gerhold.net> References: <20200426140642.204395-1-stephan@gerhold.net> 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 A3U and A5U both use an extra touchscreen LDO regulator that provides 3.3V for the touch screen controller. Add it as fixed regulator to the common include. Cc: Michael Srba Signed-off-by: Stephan Gerhold --- .../qcom/msm8916-samsung-a2015-common.dtsi | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 43c5e0f882f1..67a286422a13 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -138,6 +138,19 @@ hall-sensor { }; }; + 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-names = "default"; + pinctrl-0 = <&tsp_en_default>; + }; + i2c-muic { compatible = "i2c-gpio"; sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; @@ -195,6 +208,18 @@ pinconf { bias-disable; }; }; + + tsp_en_default: tsp_en_default { + pinmux { + function = "gpio"; + pins = "gpio73"; + }; + pinconf { + pins = "gpio73"; + drive-strength = <2>; + bias-disable; + }; + }; }; &smd_rpm_regulators { From patchwork Sun Apr 26 14:06:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 11510643 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 2521D18E8 for ; Sun, 26 Apr 2020 14:08:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0053821D79 for ; Sun, 26 Apr 2020 14:08:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gerhold.net header.i=@gerhold.net header.b="B5YfTG5V" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726142AbgDZOId (ORCPT ); Sun, 26 Apr 2020 10:08:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726143AbgDZOIc (ORCPT ); Sun, 26 Apr 2020 10:08:32 -0400 Received: from mo6-p02-ob.smtp.rzone.de (mo6-p02-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5302::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BC80C09B052; Sun, 26 Apr 2020 07:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1587910110; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=VRrCcdTijQc1LuH1q5iBm9hifRAlB2p1XKY8J4Jb5v0=; b=B5YfTG5VAI/SbCmgULQigUvHhMxt7/0BxB/VE+ygrZOGNlgnMXHOTyPg72bsuCDms4 /IAsXq76DLUSDGh/AEaDBpQNe91XXUcxn0+Y5anWX5HJ914Ahw9hJYWGIEj722NnELzy xSiBKdR21DVmeM4bk3W9kWNBG6NH4C2TCX53+Llm38c1JQGmFc06LwjAYWCwoNC4BoEC xkhSyJuYoRMrtCvAa1kXxxAyUl5VDHOBQi7/0VBldpmvYr+QrPTjw0pEoynkow6CW1Eb 3nLJLj61cSumpRm+F82iQOsKBEnh7U7lZCm62s1NCKKQE9N2MFfRA9PjoSb1LEtPkEmw JdHA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXS7IYBkLahKxB4G6Nf3AC" X-RZG-CLASS-ID: mo00 Received: from localhost.localdomain by smtp.strato.de (RZmta 46.6.2 DYNA|AUTH) with ESMTPSA id 60b02dw3QE8RNFN (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 26 Apr 2020 16:08:27 +0200 (CEST) From: Stephan Gerhold To: Andy Gross , Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Stephan Gerhold Subject: [PATCH 4/4] arm64: dts: qcom: msm8916-samsung-a5u: Add touchscreen Date: Sun, 26 Apr 2020 16:06:42 +0200 Message-Id: <20200426140642.204395-5-stephan@gerhold.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200426140642.204395-1-stephan@gerhold.net> References: <20200426140642.204395-1-stephan@gerhold.net> 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 A5U uses a Melfas MMS345L touchscreen that is connected to blsp_i2c5. Add it to the device tree. Signed-off-by: Stephan Gerhold --- Note: For the touchscreen to work this patch depends on https://lore.kernel.org/linux-input/20200423102431.2715-1-stephan@gerhold.net/ which was just applied to linux-next. --- .../boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts index 6629a621139c..295a0f969914 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts @@ -9,8 +9,43 @@ / { compatible = "samsung,a5u-eur", "qcom,msm8916"; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen@48 { + compatible = "melfas,mms345l"; + + reg = <0x48>; + interrupt-parent = <&msmgpio>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <720>; + touchscreen-size-y = <1280>; + + avdd-supply = <®_vdd_tsp>; + vdd-supply = <&pm8916_l6>; + + pinctrl-names = "default"; + pinctrl-0 = <&ts_int_default>; + }; +}; + &pronto { iris { compatible = "qcom,wcn3680"; }; }; + +&msmgpio { + ts_int_default: ts_int_default { + pinmux { + function = "gpio"; + pins = "gpio13"; + }; + pinconf { + pins = "gpio13"; + drive-strength = <2>; + bias-disable; + }; + }; +};