From patchwork Tue Sep 13 13:14:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12974786 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 E7A05C54EE9 for ; Tue, 13 Sep 2022 13:14:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229547AbiIMNOg (ORCPT ); Tue, 13 Sep 2022 09:14:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbiIMNOf (ORCPT ); Tue, 13 Sep 2022 09:14:35 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52CFC103B for ; Tue, 13 Sep 2022 06:14:32 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id y29so14314227ljq.7 for ; Tue, 13 Sep 2022 06:14:32 -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=lRrz3GkDbD4TxHnjuoqCBPRZOr1Mxb1x7Zl8/uUpFnYBknsuXIdXe78tDX7FVQxlga gUnzM4dt9uaO3d5IftuEQ3oUoSVbufhrz5ZMmDZw9eFcBUKmRGZkByeK/nTtJkczz46r 4NfQP/6sRNFi3bYZnR356Avxx8zh9Wz9SDX+gHXMLFJ+NEto9MEKdKclZytWBoKGP7ga K1UmjlHskeL2wbi0iXXCcVdUdk4wUl9E4KGDAwCxPvWJBk1OpEpz26KRJirDZwhMLEWQ C35ldYv3nispJKDX1s2oZmTIR/v0sgKZU21LO2D3XvhBsLzoSQemqTMUEywu4Ze+8fhs rIcw== 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=NYk2gMra+MbBmxyB9rd5MpH36aSDmkuhDDzUozsVQyauX130XYfeqEDq/TIuF05esc /x+D69N2JR1LRYuB4XzQQ7Wo7RAwvqGDOjj9ZwLpKjqqQs8fklKtGhf45TLLpJEvNvjZ DU09k4xzQXViUhYyRohVYJMruyTLVVikqkcC4dLE9XsBLllYIwxqdv1yS0vJQu0t4tqh XqTCSM/2+i4t19BoCpeihlCQifZvrx/Nr5uYLow9aTGwMQCQOhVrCpD4QA+uPq7N8/Jh aYnoz4IVp8RocTglZ680wfon3NJ4Uh9ra9VV7WUz8sY9iJS0eVm+0H54UBPpvzyiS43m XIKg== X-Gm-Message-State: ACgBeo0DjDnt5hC3WBvAZaLkD81c5xbr2deVmMkUqGKALEQVcL00LNgg BcKn0FqJBYyyeJ3UTSpZN39M0Yj4RHLBtg== X-Google-Smtp-Source: AA6agR4uKOApQ7WOXaFOnodnLebBEqOFd2k5vgd5QImfjiO/IWNQeU9a9+0mt5wu/o+h1BXYKMzNvw== X-Received: by 2002:a2e:be9b:0:b0:25f:e027:4999 with SMTP id a27-20020a2ebe9b000000b0025fe0274999mr9514661ljr.395.1663074870524; Tue, 13 Sep 2022 06:14:30 -0700 (PDT) Received: from fedora.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m25-20020a05651202f900b00492f5ad0ae7sm1703255lfq.43.2022.09.13.06.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 06:14:30 -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:14:21 +0200 Message-Id: <20220913131423.304804-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:14:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12974785 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 79294C6FA82 for ; Tue, 13 Sep 2022 13:14:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230001AbiIMNOk (ORCPT ); Tue, 13 Sep 2022 09:14:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbiIMNOi (ORCPT ); Tue, 13 Sep 2022 09:14:38 -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 8BBA55FA1 for ; Tue, 13 Sep 2022 06:14:34 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id w8so20023436lft.12 for ; Tue, 13 Sep 2022 06:14:34 -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=OyExbSWn1p17oLiexCOjoMEeY0TnNaDEmZ6+4fd0hsAHW6NwHFGIsAfz13/FCmE6+f i1kbzx0NQkx9Nko4o07CwC3AyobzEh/i5gEneWEEhauIm0SRGOS1r2ZhebBi4Da6bc3q Z29AHyi0CiIgRzX1WSnltpXU3zU+ePGViMIyM8Vz3bZiYc70YIq/ve+7uwiyzoFagmkN x6RJAEFkrQ4s+laZvpna54gMc+dqLgh6ScbLnU9CCVHKrdVYNlsDaQtyNHUlzyJqMnmx sbT84HapRdxtImwvXzwK7IUkpxuG4ti3ypI8avpLUACjGI1jb5Z2I8MNF4ABZ/ekSSEs lJ5A== 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=l+Uvtdq5CxaXkPRlDZk65wbDZPPqpzpBfXvUYB5gZD2pfnsTUASGqLEqgVPJOLQAM8 kb1Ib6186y9OGCofzrMKsXn8D5uNDKvsrNlHmcBOoOT74r5+5wZN6Xe3SlcWOq+GN5/y CZXoye7hKZeE08pzIIVWWKjN8cW8VGw8Wr5nhCz7U2P3v+itC5mXiDf9okkA3J+0Qrhk RPq10mChj0euY6hNi0LKnsS6TKU/RmeBZv05aO1T4p0deiXqtLzaZcKQeO9QoL6H6QOm Foz5eE8Iea/sm+21hFsgvMML/PBvFilLXyGvEayc/w6wO2yyRa2XA8updD6iJz+XNp3i xciw== X-Gm-Message-State: ACgBeo2H0X0mIyPN3xpyHC/hnYuB2g/lvbDdj35vkyiUNwj3dosNYiKF ipb8zQz4fMcOZ9WMI35KuwmxLXT9AGrkDg== X-Google-Smtp-Source: AA6agR5E+OSRi+pk2x7l7InFA365or6uEBJLwbNOZCJdYg96dmCCVjX9EGkjVW8ZJvvtYRLT1LVTVg== X-Received: by 2002:a05:6512:ea3:b0:497:a170:a23b with SMTP id bi35-20020a0565120ea300b00497a170a23bmr10987606lfb.514.1663074872544; Tue, 13 Sep 2022 06:14:32 -0700 (PDT) Received: from fedora.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m25-20020a05651202f900b00492f5ad0ae7sm1703255lfq.43.2022.09.13.06.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 06:14:32 -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:14:22 +0200 Message-Id: <20220913131423.304804-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913131423.304804-1-linus.walleij@linaro.org> References: <20220913131423.304804-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:14:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12974787 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 582B4C6FA82 for ; Tue, 13 Sep 2022 13:14:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230519AbiIMNOo (ORCPT ); Tue, 13 Sep 2022 09:14:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229853AbiIMNOk (ORCPT ); Tue, 13 Sep 2022 09:14:40 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11CE16150 for ; Tue, 13 Sep 2022 06:14:37 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id x10so14318916ljq.4 for ; Tue, 13 Sep 2022 06:14:36 -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=VwtdKLOb1t4FXhLrVWpMdxP48RC/EmgJwF27tSYMBlBaeLW5lRhOQO7+nFWdwne/o1 p4Wc4dz9ZziEoF//X5jZYUlyu6Nv1xyL5W2dPy4RYhur1llX6dxU+r5+wyYrUm6MheW7 zK2W8Zog7+e71+NAJsb4D9CdRimI9NpbruiHVbrZEb7GWxSnuc18cq/4LLlteQfxPFYS jXIjQVH3OxgLYlFCi8g7U840JlkT4XInGMzWlObIzsKqjF5AgWB3PNfEr+9SqL6shs5K 5gUDJk7pMX1v8aJZL+EX3znWIALwMNMYT7Kd9iBWVhk9wu5qrJjKlO+FVHETyFfkGE3Y 1sjw== 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=YQyaQmp5JB03+6O5NziuskwMz83FBeaXSY1CRyTatmiqWZIwsrfzsXrplBsesTygx4 UvyONmBmzdyG8wNS6leuPYQOiJPZ6+7bFOwlJgtCmIexESKX9QnJ4Z46l/YarOYRQEKn poVUmaY+DyhxcMIPETICfSVSuG0vTTIP2hq/ZtNXGzpHpQKbVSTDfKblnXOMX+/YFrr+ VBexiJJfcp6FZ3NVPPhxuPMxnm+KwM/Kyv8NtD4XeTZJ6sJzE/vXqL5h8Oml6qKH+7xj 5SMVsRJdThnGffQ/25sMJC/ZUpdw7Cj20QztAynr1gtWtRAPGmF9/hE9l89+m5Itraqc FL4A== X-Gm-Message-State: ACgBeo2yUvibP37aArGHEqTv0df4mkWL3g1+MF4/cRTzjRZxyGFX8XSq L6TRWprdfC4NlvdYVcGzjlku3BvCION2qg== X-Google-Smtp-Source: AA6agR7nlR7IWFbNbc8HoHdVHrsolshq6dNXJujQbf8qq5HE7TyJyGI348Q48IdX+3HY4HBp+pFt1w== X-Received: by 2002:a05:651c:553:b0:268:e0b3:479d with SMTP id q19-20020a05651c055300b00268e0b3479dmr9645021ljp.239.1663074874979; Tue, 13 Sep 2022 06:14:34 -0700 (PDT) Received: from fedora.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id m25-20020a05651202f900b00492f5ad0ae7sm1703255lfq.43.2022.09.13.06.14.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 06:14:34 -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:14:23 +0200 Message-Id: <20220913131423.304804-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913131423.304804-1-linus.walleij@linaro.org> References: <20220913131423.304804-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; };