From patchwork Tue Sep 13 13:28:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12974804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5032C54EE9 for ; Tue, 13 Sep 2022 13:29:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232259AbiIMN3I (ORCPT ); Tue, 13 Sep 2022 09:29:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232262AbiIMN24 (ORCPT ); Tue, 13 Sep 2022 09:28:56 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2A08192B3 for ; Tue, 13 Sep 2022 06:28:53 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id i26so20086076lfp.11 for ; Tue, 13 Sep 2022 06:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=AYTfQ/8q3iOQdS6L9K3xlP1uJArjxjNbvxSZu1MZ7EM=; b=DE4iKxqoTDPejTExePSFXK/2OfDip3djKHppXwKk4uZ2MWwXGAJxCf4J+1+xjTNern m6ljgWfq+cMgGItjL1md4hqC557+KVFAyBFZcdh1w9XE6PvYY7QY4M2oYhhpPjSl7jdV W/jA1HO+dRrbkwi6ssaoOkm2fGwgNO6kgCEB8eBdg84Nqitf8ubBLUk1de4uOVJIEOWm zTNxjiqP0yDGCzy3e/oQG1b1/WWy7fXH+kzdqkOetrwyN08YOXQkcfsAdiFNWy/mV1ZB YqEfCg71vDnXmfUyYU0XVFL1c78hgRsXxvgdkDq7wkQUXAm/+xt5o7vfrViEjvv9VTQ0 V3uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=AYTfQ/8q3iOQdS6L9K3xlP1uJArjxjNbvxSZu1MZ7EM=; b=vUE8YDuyRX1bm1CpZ+esFqpffmk1b7NThWnM8aNZWVd4ofhcGPkrad/K02w8oFQZ2T G9jqIsLw1m9qWP9bWmWvUwejH/FbctlIepp9+Gf1VcUbDiZibMUK1g7qUqBPQikQXpY+ bIV3z1FlQNT54XKYCXI0tz/N91jnnQr4M0vfJJPpxScLdJMSdKQhQFx3ztFePZMD4rut wZzJEUIbOe9bKOY4vKmVZboPIWogYuw0xn7I4uC4W63+THULraSGOSXmw2SXpkh0KzIs ZMW0+rVCDQGCacZ0uRwVZqobCJBQqQFIkZPXZen+XsTeyZuLMAdB0dyYxj4TV1Z4NsDm eOMA== X-Gm-Message-State: ACgBeo0VCCWVZ3pplV3duvECVlzbE3aaicbRckOcog35fTbkcg90GeLe DIEJk1AlcbPnYRKRCCs3guTlyZ2rudLkww== X-Google-Smtp-Source: AA6agR483PCG2TD8xo8Aj2d6SBmKk5wcL/H7nHpe8uYJdUFKvRXhcRRp1llXDBvuEv2aSUySXuMxgw== X-Received: by 2002:a05:6512:b08:b0:492:87ad:5f5c with SMTP id w8-20020a0565120b0800b0049287ad5f5cmr11580688lfu.293.1663075731565; Tue, 13 Sep 2022 06:28:51 -0700 (PDT) Received: from fedora.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id b15-20020a056512024f00b00498f871f33fsm1713802lfo.86.2022.09.13.06.28.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 06:28:50 -0700 (PDT) From: Linus Walleij To: linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: linux-arm-kernel@lists.infradead.org, Herman van Hazendonk , Linus Walleij Subject: [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus Date: Tue, 13 Sep 2022 15:28:44 +0200 Message-Id: <20220913132846.305716-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org GSBI1 can be used to enable an external SPI bus on e.g. the APQ8060. On the DragonBoard APQ8060 this SPI bus is used to talk to the LCD display. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/qcom-msm8660.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi index 63a501c63cf8..5640c02db852 100644 --- a/arch/arm/boot/dts/qcom-msm8660.dtsi +++ b/arch/arm/boot/dts/qcom-msm8660.dtsi @@ -131,6 +131,31 @@ gcc: clock-controller@900000 { reg = <0x900000 0x4000>; }; + gsbi1: gsbi@16000000 { + compatible = "qcom,gsbi-v1.0.0"; + cell-index = <12>; + reg = <0x16000000 0x100>; + clocks = <&gcc GSBI1_H_CLK>; + clock-names = "iface"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + status = "disabled"; + + syscon-tcsr = <&tcsr>; + + gsbi1_spi: spi@16080000 { + compatible = "qcom,spi-qup-v1.1.1"; + reg = <0x16080000 0x1000>; + interrupts = ; + clocks = <&gcc GSBI1_QUP_CLK>, <&gcc GSBI1_H_CLK>; + clock-names = "core", "iface"; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + }; + gsbi6: gsbi@16500000 { compatible = "qcom,gsbi-v1.0.0"; cell-index = <12>; From patchwork Tue Sep 13 13:28:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12974805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DB35C6FA82 for ; Tue, 13 Sep 2022 13:29:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232236AbiIMN3N (ORCPT ); Tue, 13 Sep 2022 09:29:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232297AbiIMN26 (ORCPT ); Tue, 13 Sep 2022 09:28:58 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA1B957558 for ; Tue, 13 Sep 2022 06:28:55 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id a3so8107416lfk.9 for ; Tue, 13 Sep 2022 06:28:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=DQIW4wvUgD0lYAn0kE2/YaEvgt08S3ejHQvW4rHtlsM=; b=BqQsL4vv77G226GHE44y8wumZo2NJxLP3kASbmVvQiJ1Dm7BP5kbcAp6g4MDfRdLh+ HjGGS7lv6rdgCUXbu+ntjl83/2PALC6PVx50ET0JSdIEvYqZxFR6stgE9WZa+Z8nqySi Ry8CV3WeuVAstbtMlJA6BXnVCDhkVdxeWbL4usaOEAP7eXetgNhM/azjpRZHIx7MeRks yFjv4Zie90bmQNmIejP0z006+xQYSKGzYupGDvaKRPfH49qrGDywC/kXikhSAfwFpZDP bptGA7WodoV3/OV0NgMCOX7dtZB1GMFXp+UjUfkdoPxs95bGuxIdbqDYkQTsVbDH4aHt AtSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=DQIW4wvUgD0lYAn0kE2/YaEvgt08S3ejHQvW4rHtlsM=; b=R0LVIZfpiOEX6pR7OZdg4pGdzUe9UG05KQpdHzCCjKMcc9TQ9oAlG4Od59l5Sy/iCD N3zRaDtM0PALrkM4A0ZDt/kmT2ZQ8ClNBYvoG3pcyL+kUZry//LYHGP6xmGwznaBYkMh j+y+Vc6wdZeJaDCZNcsu5UlBB8ZOCRBq7ni9YBBMApFWsnsiFBzs0GYHvM0RCkQQ0KX/ z/6gkZHmiDqM8jb6zkXJG7LbWGTZHE2hfEhCbDcGl23H/zT6qn1i/mgULtzxqEgWt2Y9 l4/89FIxDNQ0rJUTREChTvxSud0YkiL1H/mokZqJOb1n8Qq1ttgj5LNz4niXedvXGuvV XapQ== X-Gm-Message-State: ACgBeo0ODKOw+YiOCTRLYCLuhiQHB43P3/zyMuolQVJozkVMMVnXwtp/ FCLxQlAowzis86LEC6ncbj88bmWzeKrcEA== X-Google-Smtp-Source: AA6agR4w3GachcoeDopTu5wm18DDPhKT0gFmW3AsjCZpdndDoRy4xM3BEimfg2glZEQTxxxwUYh7Bg== X-Received: by 2002:a05:6512:3503:b0:496:517:5818 with SMTP id h3-20020a056512350300b0049605175818mr9820908lfs.186.1663075733610; Tue, 13 Sep 2022 06:28:53 -0700 (PDT) Received: from fedora.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id b15-20020a056512024f00b00498f871f33fsm1713802lfo.86.2022.09.13.06.28.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 06:28:52 -0700 (PDT) From: Linus Walleij To: linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: linux-arm-kernel@lists.infradead.org, Herman van Hazendonk , Linus Walleij Subject: [PATCH 2/3] ARM: dts: qcom-msm8660: Add GSBI3 I2C bus Date: Tue, 13 Sep 2022 15:28:45 +0200 Message-Id: <20220913132846.305716-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913132846.305716-1-linus.walleij@linaro.org> References: <20220913132846.305716-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org GSBI3 can be used to enable an external I2C bus on e.g. the APQ8060. On the DragonBoard APQ8060 this I2C bus is used to talk to the Cypress CY8CTMA340 CYTTSP touchscreen. Signed-off-by: Linus Walleij --- arch/arm/boot/dts/qcom-msm8660.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi index 5640c02db852..f3131bee752e 100644 --- a/arch/arm/boot/dts/qcom-msm8660.dtsi +++ b/arch/arm/boot/dts/qcom-msm8660.dtsi @@ -156,6 +156,31 @@ gsbi1_spi: spi@16080000 { }; }; + gsbi3: gsbi@16200000 { + compatible = "qcom,gsbi-v1.0.0"; + cell-index = <12>; + reg = <0x16200000 0x100>; + clocks = <&gcc GSBI3_H_CLK>; + clock-names = "iface"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + syscon-tcsr = <&tcsr>; + status = "disabled"; + + gsbi3_i2c: i2c@16280000 { + compatible = "qcom,i2c-qup-v1.1.1"; + reg = <0x16280000 0x1000>; + interrupts = ; + clocks = <&gcc GSBI3_QUP_CLK>, <&gcc GSBI3_H_CLK>; + clock-names = "core", "iface"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + }; + gsbi6: gsbi@16500000 { compatible = "qcom,gsbi-v1.0.0"; cell-index = <12>; From patchwork Tue Sep 13 13:28:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12974806 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA3AEC54EE9 for ; Tue, 13 Sep 2022 13:29:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232246AbiIMN3O (ORCPT ); Tue, 13 Sep 2022 09:29:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232301AbiIMN27 (ORCPT ); Tue, 13 Sep 2022 09:28:59 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96B8D57579 for ; Tue, 13 Sep 2022 06:28:57 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id k10so20090224lfm.4 for ; Tue, 13 Sep 2022 06:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=LIzkEbGu39kfxmsoJvSbR7jzHjkXlGS1st2Otx8Z+Yk=; b=j0ld7oXn5YEH3X23Ub3P5cchqyY7k+ESyah18CBTfPT/X4OjwMAXYJyjEnz1Tt6Mqw AjYcDLEWKIOnrQsnpU5vdK/K2+oPPnV2BG0ZrEFP4PEdRMKs8i2PT4Qk64smrAsGYZEb umIMu/7toz61L7+phwE5T0GAEbBhJUxMDXHW21hAAix6HZlMGMLV/+/t5ZjYKRBkXhLd lxH4qzAd+vOhBgQEllvCoYtnXgOU4kZJaAUBnHGUTfDRKsntnPSK7UYAQc7inm+v6i6H GQ5k3gl3K5l1bzd0NV6haN8N5SX5Nith3OlBiLe4WIxq5kXn2mW87Y6gq46F5IIhWAS6 IbBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=LIzkEbGu39kfxmsoJvSbR7jzHjkXlGS1st2Otx8Z+Yk=; b=WvH1ED2TQIe12pH90vmAukSmNN0H2ijocR5MPK0gJWk2q7FZ9anTHhcn+2C8TxfYQV umC5Qg/cSy48pi1NBxFwU7H5YRjmIhq/h5NnX2hq8aAiHiIwoVza/SW2foZ2DugN0GcK 9XFUKtVPUze2Y9deFoxTyahCBEIwvHIjqTz/acdseUVrHQn9V4nlnlV+lnGTR3WW9cCY IT3n6LmnVQGFuVqPAVmU5EEX7JGr+8K4DSwihRJ9gWt8OFMRXmrUeeWXHwtfehXcj1Qa vvS5eSFNbd35Hz9pFwFhNWuS2wOZRZ18qE5P9lcOj9wtRa3GK+pT+lOghB+YMThs73xI 63jg== X-Gm-Message-State: ACgBeo24xI0uYfdtLVNVCRrr+CgF38nvjtAGrhTAAcFUJAPi+VoH1nsN QOjEUp73vhjOiEGkbVftUXmVXgNqTc0BfQ== X-Google-Smtp-Source: AA6agR5dBB6rkRQJB3Azm5z5hOc7rcPEK/7qD+YwZMJVMTqpGkJQX9gW5oo+JmaADY9zRPeJtzWTug== X-Received: by 2002:a05:6512:3c88:b0:499:c78:5bb1 with SMTP id h8-20020a0565123c8800b004990c785bb1mr6096209lfv.503.1663075735188; Tue, 13 Sep 2022 06:28:55 -0700 (PDT) Received: from fedora.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id b15-20020a056512024f00b00498f871f33fsm1713802lfo.86.2022.09.13.06.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 06:28:54 -0700 (PDT) From: Linus Walleij To: linux-arm-msm@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: linux-arm-kernel@lists.infradead.org, Herman van Hazendonk , Linus Walleij Subject: [PATCH 3/3] ARM: dts: qcom: Add TMA340 to APQ8060 DragonBoard Date: Tue, 13 Sep 2022 15:28:46 +0200 Message-Id: <20220913132846.305716-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913132846.305716-1-linus.walleij@linaro.org> References: <20220913132846.305716-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This adds the CY8CTMA340 Touchscreen to the APQ8060 DragonBoard. Tested without display by issuing cat /dev/input/input/event3 which produces appropriate noise and interrupts on the dedicated GPIO line. Signed-off-by: Linus Walleij --- .../arm/boot/dts/qcom-apq8060-dragonboard.dts | 71 ++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts index 70a1dd629c7a..b07a0ba9e734 100644 --- a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts +++ b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts @@ -159,6 +159,19 @@ data { }; }; + dragon_gsbi3_i2c_pins: gsbi3_i2c { + mux { + pins = "gpio43", "gpio44"; + function = "gsbi3"; + }; + pinconf { + pins = "gpio43", "gpio44"; + drive-strength = <8>; + /* These have external pull-up 2.2kOhm to 1.8V */ + bias-disable; + }; + }; + dragon_gsbi8_i2c_pins: gsbi8_i2c { mux { pins = "gpio64", "gpio65"; @@ -240,6 +253,22 @@ irq { bias-pull-up; }; }; + + dragon_tma340_gpios: tma340 { + reset { + /* RESET line, TS_ATTN, WAKE_CTP */ + pins = "gpio58"; + function = "gpio"; + drive-strength = <6>; + bias-disable; + }; + irq { + pins = "gpio61"; /* IRQ line */ + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; }; qcom,ssbi@500000 { @@ -444,6 +473,45 @@ led@133 { }; }; + gsbi@16200000 { + status = "okay"; + qcom,mode = ; + + gsbi3_i2c: i2c@16280000 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&dragon_gsbi3_i2c_pins>; + + touchscreen@24 { + compatible = "cypress,cy8ctma340"; + reg = <0x24>; + /* Certainly we can do at least 400 kHz */ + clock-frequency = <400000>; + /* IRQ on GPIO61 called /CTP_INT */ + interrupt-parent = <&tlmm>; + interrupts = <61 IRQ_TYPE_EDGE_FALLING>; + /* + * The I2C bus is using a PCA9306 level translator from L16A + * to L2B so these two voltages are needed and L16A is + * kind of the IO voltage, however L16Aisn't really fed to + * the TMA340, which relies entirely on L2B (PM8901 L2). + */ + vcpin-supply = <&pm8058_l16>; + vdd-supply = <&pm8901_l2>; + /* GPIO58, called WAKE_CTP */ + reset-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>; + touchscreen-size-x = <480>; + touchscreen-size-y = <800>; + active-interval-ms = <0>; + touch-timeout-ms = <255>; + lowpower-interval-ms = <10>; + bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>; + pinctrl-names = "default"; + pinctrl-0 = <&dragon_tma340_gpios>; + }; + }; + }; + gsbi@19800000 { status = "okay"; qcom,mode = ; @@ -634,7 +702,8 @@ l1 { bias-pull-down; }; l2 { - regulator-min-microvolt = <2850000>; + /* TMA340 requires strictly 3.3V */ + regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; bias-pull-down; };