From patchwork Wed Feb 9 16:25:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Detlev Casanova X-Patchwork-Id: 12740440 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 3E7B9C433EF for ; Wed, 9 Feb 2022 16:27:11 +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=nr9XpREYNiqc5PRDEFITWtEIDZxIUnf/I+rtfbAjUEA=; b=zqQZ4JegsL5j4d ffh5Tc6yOMRzH9iy+FIOjDtH9LfS03bbX18GeM61iyXW9ycE6HOyM1qJFv+lfHNb7XCTszNad0jxT wTlqytLw+aX9POGHWFe7U/hsdEJ7lR/sb75zLwc07TuameE3cVozT6slW1fxOQ6kELDxkhZCn1/QV BlkI1f6wWzGYIS1hfooBFyZRBqCIMrFJ7zUyGAlmNIMILJlb1PulgK9ZH+mHNeOWduNXlBzXxZefh 6zjrqzdh8Gt+/CFTjvrx1Iv0Zu5DXBu8jm6Z7S9G799NsbFZEHntv43rdPUt1HsegKaUGEvS33xqA lwtJHfWfNk1Pd14E0eKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHpn6-000myV-9w; Wed, 09 Feb 2022 16:26:00 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHpmq-000muU-Rd; Wed, 09 Feb 2022 16:25:46 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: detlev) with ESMTPSA id 5A86E1F437CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644423943; bh=gDx8AevH/7v2bszTk4dO4GKNMSB8b/jIT4jSxIO98/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FfXgUKHm+msioKg64rAQSkHFkHKTZQrdzXczGgHhGPTwcst6IIoxkFPmch14NYSXl 5bWqx//7S7TObaFng//M5QANQO7w2uNVr/QvnUZaLzha5w4FOIY2b8RAMGVFpjktlB UiWz6cAKvAS/EcfOM7YYnLwMZD8bMszJ+BKoiLmCCA9/S7RDg7Xl7dygRA7OdLpiQ2 X/UDKaoj36PYf+lWQ75acTmDIesTRMJ8oa6iVRXz0yWIajIGEDmTqNQ4+1FLfPwm01 hvaso6n5QYzAA4Rtgfr3L7SUUwYSjr7BVyGHKZy3EypL98m/c4leFv0qslkchtWsD/ 9hS8CnNd+yL1A== From: Detlev Casanova To: linux-kernel@vger.kernel.org Cc: Detlev Casanova , Arnd Bergmann , Olof Johansson , soc@kernel.org (maintainer:ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)), Rob Herring , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE...), Stefan Wahren , linux-arm-kernel@lists.infradead.org (moderated list:ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE) Subject: [PATCH 2/2] ARM: dts: Add bcm2711-rpi-4-b-7inch-ts-dsi.dts Date: Wed, 9 Feb 2022 11:25:12 -0500 Message-Id: <20220209162515.706729-3-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220209162515.706729-1-detlev.casanova@collabora.com> References: <20220209162515.706729-1-detlev.casanova@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220209_082545_182546_BF69C47F X-CRM114-Status: GOOD ( 16.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a device tree to support the official Raspberrypi 7" touchscreen for the Raspberry Pi 4 B The panel is connected on the DSI 1 port and uses the simple-panel driver. The device tree also makes sure to activate: * dvp: bcm2711 clock driver * hvs: Hardware Video Scaler * pixelvalve[0-4]: CRTC modules * txp: CRTC Writeback Signed-off-by: Detlev Casanova --- arch/arm/boot/dts/Makefile | 1 + .../boot/dts/bcm2711-rpi-4-b-7inch-ts-dsi.dts | 129 ++++++++++++++++++ arch/arm64/boot/dts/broadcom/Makefile | 1 + .../broadcom/bcm2711-rpi-4-b-7inch-ts-dsi.dts | 2 + 4 files changed, 133 insertions(+) create mode 100644 arch/arm/boot/dts/bcm2711-rpi-4-b-7inch-ts-dsi.dts create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b-7inch-ts-dsi.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 0de64f237cd8..b46daf2df4ce 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -94,6 +94,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \ bcm2837-rpi-cm3-io3.dtb \ bcm2711-rpi-400.dtb \ bcm2711-rpi-4-b.dtb \ + bcm2711-rpi-4-b-7inch-ts-dsi.dtb \ bcm2711-rpi-cm4-io.dtb \ bcm2835-rpi-zero.dtb \ bcm2835-rpi-zero-w.dtb diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b-7inch-ts-dsi.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b-7inch-ts-dsi.dts new file mode 100644 index 000000000000..62e986358c2a --- /dev/null +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b-7inch-ts-dsi.dts @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include "bcm2711-rpi-4-b.dts" + +/ { + model = "Raspberry Pi 4 Model B + Rpi 7inch touchscreen"; + + panel_disp1: panel_disp1@0 { + reg = <0 0 0>; + compatible = "raspberrypi,7inch-dsi", "simple-panel"; + backlight = <®_display>; + power-supply = <®_display>; + status = "okay"; + + port { + panel_in: endpoint { + remote-endpoint = <&bridge_out>; + }; + }; + }; + + reg_bridge: reg_bridge@0 { + reg = <0 0 0>; + compatible = "regulator-fixed"; + regulator-name = "bridge_reg"; + gpio = <®_display 0 0>; + vin-supply = <®_display>; + enable-active-high; + status = "okay"; + }; +}; + +&i2c_csi_dsi { + ft5406: ts@38 { + compatible = "edt,edt-ft5506"; + reg = <0x38>; + status = "okay"; + + vcc-supply = <®_display>; + reset-gpio = <®_display 1 1>; + + touchscreen-size-x = < 800 >; + touchscreen-size-y = < 480 >; + + touchscreen-inverted-x; + touchscreen-inverted-y; + }; + + reg_display: reg_display@45 { + compatible = "raspberrypi,7inch-touchscreen-panel-regulator"; + reg = <0x45>; + gpio-controller; + #gpio-cells = <2>; + status = "okay"; + }; + +}; + +&dsi1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + port { + dsi_out: endpoint { + remote-endpoint = <&bridge_in>; + }; + }; + + bridge@0 { + reg = <0>; + compatible = "toshiba,tc358762"; + vddc-supply = <®_bridge>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + bridge_in: endpoint { + remote-endpoint = <&dsi_out>; + }; + }; + + port@1 { + reg = <1>; + bridge_out: endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; + }; +}; + +&aon_intr { + status = "okay"; +}; + +&dvp { + status = "okay"; +}; + +&hvs { + status = "okay"; +}; + +&pixelvalve0 { + status = "okay"; +}; + +&pixelvalve1 { + status = "okay"; +}; + +&pixelvalve2 { + status = "okay"; +}; + +&pixelvalve3 { + status = "okay"; +}; + +&pixelvalve4 { + status = "okay"; +}; + +&txp { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile index c6882032a428..965361bff829 100644 --- a/arch/arm64/boot/dts/broadcom/Makefile +++ b/arch/arm64/boot/dts/broadcom/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \ bcm2711-rpi-4-b.dtb \ + bcm2711-rpi-4-b-7inch-ts-dsi.dtb \ bcm2711-rpi-cm4-io.dtb \ bcm2837-rpi-3-a-plus.dtb \ bcm2837-rpi-3-b.dtb \ diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b-7inch-ts-dsi.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b-7inch-ts-dsi.dts new file mode 100644 index 000000000000..c325adc4f874 --- /dev/null +++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b-7inch-ts-dsi.dts @@ -0,0 +1,2 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "arm/bcm2711-rpi-4-b-7inch-ts-dsi.dts"