From patchwork Fri Jan 7 05:13:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12706209 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F181C433F5 for ; Fri, 7 Jan 2022 05:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y/77bcFMyYiAVtvpwI027k4dtz+TiiwfeTvJ433GYR0=; b=ZT8xJ+/vJRVyQn ViUZbwoDKcEJlBwBr60G04FO/4b8w11G1fQ72JY7CEMj/NnhdDyttk1/FJ1bgL0F3kV0/IsrYljvR 9+0w9Zs953zPuKzJViSQsTbS3Ij2L0groAx0/FYvMUIu0wppyrbvTMLEK8C59dXKK0PMS05+8bPlI R/FqZeVpKNqWyF0kmdcIQcIgqHGXapD442H4A623PGEq4evK9aBG2AcvsQEk7uBkjwjYiatrFEGva AMhvzmnh2aKuvW+Kq2orNPt8cl3Zi0Sc1+AI9GlYF8wCvfwH2PgyKvLn1iFi5v56M6Bqb+7ym/HEs 9OJD4E91JX1/wiLudxtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5hZw-002LCu-68; Fri, 07 Jan 2022 05:14:16 +0000 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5hZR-002L0z-32; Fri, 07 Jan 2022 05:13:46 +0000 Received: by mail-qk1-x731.google.com with SMTP id i187so4927269qkf.5; Thu, 06 Jan 2022 21:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d0E8s9XkVMJfO71U0WZapgq3CBnEOczzCxvv2x4eTOI=; b=awhqnAkIp7trR8Jv9wraBB/3QMSgqaGlulcxwILOUKQ6xfuXvz9Cy8JIV1bqHeSk0B xnYQnCHZcvhNLYbBGUBPrlOIyR6Fve60BMqo0Egl92ueIIYwPolz+0ZcJfKwscAa4Zey tkW93zs0Ec5qd8bvHW3qA0sn2Lhok4E7VF92Zwsb8bCQspev1hIK5D8hOGo7s3IE+ZYF trPp6C4CZVfhFh+BZtLHqWE1xOvEyq6KPMMGIPBqBp+RV84KxSSRrc8uPIain2/P5NNw VmS6NhpD4RsKkEsJI6FVNMx/UxyyOdwZPUDG7VNJ+eDYKanizAGZGNYaJtaiPs++iD15 np0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d0E8s9XkVMJfO71U0WZapgq3CBnEOczzCxvv2x4eTOI=; b=Y2dYyO0UyX0wh3ubTb5lgAaeHY7kMAsHSmeaBMNiJPHy+p2jRFIMc/cRS9uXTUokej s2+bzAHzFRMb19ilaGSLtptb3USyuqD94zDIQ4l5Ki0jJDQ4NHwsXb2DVM0N8nevHpoi EBCzqdgb19UCl32Pp5NP/uGVO/zSiNLcxZDyjhm8iMwQHGvWCxEGUi8wE4IW3MiZm2MA GF+iCTRNWPoQJ2vi4zkkpT6k4/x+lLArxrY07HiZTwWIN5fbZLVaCi9xRzw0FULyDPcv 5Iy1VnXorUasrk+oSSjeig3Yyy2opzNQXRcQfXOIjWJiCrltGy2F/qvpXKItSQWGXqG2 5Zcg== X-Gm-Message-State: AOAM531JBkWCdZULG+1A+rFXjOjRuOg7mLLdCzWT7oQ7vCb/8NsQYNzF rcAISlOW+KmYw8eBXfGsO7ONa7xddqNFKA== X-Google-Smtp-Source: ABdhPJwKGvck88HMWuNcgtplD8fVqm2IP/5UhmLKJ/hHRmQaUGaAF0uj1u94MoiOsIW91+gruO6WtQ== X-Received: by 2002:a05:620a:24ca:: with SMTP id m10mr43698820qkn.649.1641532420494; Thu, 06 Jan 2022 21:13:40 -0800 (PST) Received: from master-x64.sparksnet (c-98-233-193-225.hsd1.dc.comcast.net. [98.233.193.225]) by smtp.gmail.com with ESMTPSA id d15sm1651461qka.3.2022.01.06.21.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 21:13:40 -0800 (PST) From: Peter Geis To: Rob Herring , Heiko Stuebner Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] arm64: dts: rockchip: add pine64 touch panel display to rockpro64 Date: Fri, 7 Jan 2022 00:13:34 -0500 Message-Id: <20220107051335.3812535-4-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107051335.3812535-1-pgwipeout@gmail.com> References: <20220107051335.3812535-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_211345_159231_E18FAF60 X-CRM114-Status: GOOD ( 12.16 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The Pine64 touch panel is a panel consisting of the Feiyang fy07024di26a30d panel with a Goodix gt911 touch screen. Add the device tree nodes to the rockpro64 to permit attaching this display to the device. Signed-off-by: Peter Geis --- .../boot/dts/rockchip/rk3399-rockpro64.dtsi | 80 ++++++++++++++++++- 1 file changed, 76 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi index 83db4ca67334..158befb9a48c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi @@ -20,6 +20,15 @@ chosen { stdout-path = "serial2:1500000n8"; }; + /* enable for panel backlight support */ + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm0 0 1000000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <5>; + status = "disabled"; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <125000000>; @@ -220,6 +229,14 @@ vdd_log: vdd-log { regulator-max-microvolt = <1700000>; vin-supply = <&vcc5v0_sys>; }; + + avdd: avdd { + compatible = "regulator-fixed"; + regulator-name = "avdd"; + regulator-min-microvolt = <11000000>; + regulator-max-microvolt = <11000000>; + vin-supply = <&vcc3v3_s0>; + }; }; &cpu_l0 { @@ -301,6 +318,11 @@ &hdmi { status = "okay"; }; +/* force hdmi to vopb */ +&hdmi_in_vopl { + status = "disabled"; +}; + &hdmi_sound { status = "okay"; }; @@ -400,8 +422,6 @@ regulator-state-mem { vcc3v0_touch: LDO_REG2 { regulator-name = "vcc3v0_touch"; - regulator-always-on; - regulator-boot-on; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; regulator-state-mem { @@ -490,8 +510,6 @@ regulator-state-mem { vcc3v3_s0: SWITCH_REG2 { regulator-name = "vcc3v3_s0"; - regulator-always-on; - regulator-boot-on; regulator-state-mem { regulator-off-in-suspend; }; @@ -565,6 +583,19 @@ fusb0: typec-portc@22 { vbus-supply = <&vcc5v0_typec>; status = "okay"; }; + + /* enable for pine64 touch screen support */ + touch: touchscreen@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + AVDD28-supply = <&vcc3v0_touch>; + VDDIO-supply = <&vcc3v0_touch>; + interrupt-parent = <&gpio4>; + interrupts = ; + irq-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; + status = "disabled"; + }; }; &i2s0 { @@ -600,6 +631,47 @@ &io_domains { gpio1830-supply = <&vcc_3v0>; }; +/* enable for pine64 panel display support */ +&mipi_dsi { + status = "disabled"; + clock-master; + + ports { + mipi_out: port@1 { + reg = <1>; + + mipi_out_panel: endpoint { + remote-endpoint = <&mipi_in_panel>; + }; + }; + }; + + mipi_panel: panel@0 { + compatible = "feiyang,fy07024di26a30d"; + reg = <0>; + avdd-supply = <&avdd>; + backlight = <&backlight>; + dvdd-supply = <&vcc3v3_s0>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + mipi_in_panel: endpoint { + remote-endpoint = <&mipi_out_panel>; + }; + }; + }; + }; +}; + +/* force dsi to vopl */ +&mipi_in_vopb { + status="disabled"; +}; + &pcie0 { ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; num-lanes = <4>; From patchwork Fri Jan 7 05:13:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12706208 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 21C0DC433EF for ; Fri, 7 Jan 2022 05:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UHUbsrkXoAhuzSRTbi7vQZVqnJ8vAYmz4s8KqrxjsjI=; b=P1Ky+fdvZibZp3 +GxkO1BjXdAHbHT/Bw6jyCsr2YgCdEeVBbcxg1/sQP8m+ESiCkBE8O8KZXznPI0k7LIF1vZJ4Yfi4 16ZYun0yPkasBI797VxLKR5J90uDwGNyw+FTJMR5PTkS/NPw5wPEEa2eaTcCdMQa1GP5Qq6AoF3LG qUU/ZiBm+DCHbxA6m/fycT1JMJ/6angi0H+I9tlbz1iKhP33/uXvAGhHlXM+th4Uquf5u9hIJhYGt 8YKElt44+KCAM45yCIIlQP9NxRH9ENLUrCmRxrRYc3J7Mmd+moHMQGTaRj0hd0rHutZxOuRQavhPy 6SP0YauZHKUbiavsRUQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5hZv-002LCX-CC; Fri, 07 Jan 2022 05:14:15 +0000 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5hZR-002L15-59; Fri, 07 Jan 2022 05:13:46 +0000 Received: by mail-qk1-x734.google.com with SMTP id i130so4947235qke.3; Thu, 06 Jan 2022 21:13:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZnX2c/AivJPvE3M4KgpGz9qCvVjWTtRZpCLeFLJb/64=; b=jhcH33f2rPJdslRUlsnQb/mI5egx3yjh1XRyMm1WHG3iNkzWWKLPWiwt1LvxANMrm6 +wuTlRzzaEJAHEnGVYo66bULDqob6E+XP08ruvluHzgCCyA9uaGV6lcQNpSkZcxPmHjC laOvrBhyfeqEQW3rMlEiVYEWA49a6HrO+2RoScWGyP0sOK4A41q8iuW009sz8vN6oqNY RGc5zybzvtgFd4MxIhYKAWU5RsjqqThBSNxNdHqW4nRrEv/l9re1/JyFT8Mk0t27stSa nMZiHyg3qsS44wioLnKqSpvb1w72tzbUvOUzDp/c4Q8rTI47dNCm3BhEASgiYLrmLGpW hJaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZnX2c/AivJPvE3M4KgpGz9qCvVjWTtRZpCLeFLJb/64=; b=QDF/s18T0oxKATZOVAjDtyvrnFEpAArx7QGMKkLi8VdN4ymRX9rTR6lFHVSe0XwXOY gSU16lQsincKJGSrDFtO2wCM6B2/FI4kZgAr58+vmeVzGXuKUylvGOprThMjVicIy75k mRDIlV0jhJgGztASmDEkJ5bMMqja+WYoOpKRetGyKgZy35NY48gG9XLzGUJDdiWeHocs fK6griFWTSxPoHGF/Q1lSZg6FjyDE+F/3JR8gm96EP/wDnXwNsjIB1BVFaDAgQEEn7n6 qknHeBkgZWO19AvtGNB6nG6xiAkVffREIdtcTZqMLpoKCxTdTJvANJ8/6gxfZYj1QNfA /1Ow== X-Gm-Message-State: AOAM5334qouST0TAzz2CJJNqOYW6SUZUZYfXVFrv4WyftssMFiSxTcwE 1x5NbGf0VOPWubUTdeQ2yco= X-Google-Smtp-Source: ABdhPJyxvYrqYFDlkIi0IZIQpBfxEsFe8ZBlx2sEOe9KCyROC7cqYGRV1dzISY18pXdzDCCbz24+YA== X-Received: by 2002:a05:620a:25c8:: with SMTP id y8mr44783504qko.455.1641532421366; Thu, 06 Jan 2022 21:13:41 -0800 (PST) Received: from master-x64.sparksnet (c-98-233-193-225.hsd1.dc.comcast.net. [98.233.193.225]) by smtp.gmail.com with ESMTPSA id d15sm1651461qka.3.2022.01.06.21.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 21:13:41 -0800 (PST) From: Peter Geis To: Rob Herring , Heiko Stuebner Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] arm64: dts: rockchip: enable the pine64 touch screen on rockpro64 Date: Fri, 7 Jan 2022 00:13:35 -0500 Message-Id: <20220107051335.3812535-5-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107051335.3812535-1-pgwipeout@gmail.com> References: <20220107051335.3812535-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220106_211345_239594_0277BAE6 X-CRM114-Status: GOOD ( 11.63 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Enable the touch screen, backlight, and dsi nodes for the Pine64 touch panel attached to the rockpro64. Signed-off-by: Peter Geis --- arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi index 158befb9a48c..f6c36fcd6db3 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi @@ -26,7 +26,7 @@ backlight: backlight { pwms = <&pwm0 0 1000000 0>; brightness-levels = <0 4 8 16 32 64 128 255>; default-brightness-level = <5>; - status = "disabled"; + status = "okay"; }; clkin_gmac: external-gmac-clock { @@ -594,7 +594,7 @@ touch: touchscreen@5d { interrupts = ; irq-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>; - status = "disabled"; + status = "okay"; }; }; @@ -633,7 +633,7 @@ &io_domains { /* enable for pine64 panel display support */ &mipi_dsi { - status = "disabled"; + status = "okay"; clock-master; ports {