From patchwork Thu Jun 15 20:41:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 9790279 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5B65760325 for ; Thu, 15 Jun 2017 20:42:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CB4528631 for ; Thu, 15 Jun 2017 20:42:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FE2A28634; Thu, 15 Jun 2017 20:42:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B27622863B for ; Thu, 15 Jun 2017 20:41:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A00396E820; Thu, 15 Jun 2017 20:41:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id BE3966E817 for ; Thu, 15 Jun 2017 20:41:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 956DA10A1DB6; Thu, 15 Jun 2017 13:41:42 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id xKPSR5C2sz7x; Thu, 15 Jun 2017 13:41:39 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 2134210A1DB9; Thu, 15 Jun 2017 13:41:33 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id 8F7FB2E7519; Thu, 15 Jun 2017 13:41:30 -0700 (PDT) From: Eric Anholt To: dri-devel@lists.freedesktop.org, Archit Taneja , Andrzej Hajda , Laurent Pinchart , Thierry Reding , Rob Herring , Mark Rutland , devicetree@vger.kernel.org Subject: [PATCH 7/7] ARM: dts: bcm2835: Enable the Raspberry Pi touchscreen panel. Date: Thu, 15 Jun 2017 13:41:30 -0700 Message-Id: <20170615204130.19255-8-eric@anholt.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170615204130.19255-1-eric@anholt.net> References: <20170615204130.19255-1-eric@anholt.net> Cc: linux-kernel@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This commit is not intended to be merged. Instead we will use overlays to enable the panel, and this commit is just a demo of how things get wired up. Signed-off-by: Eric Anholt --- arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 5 ++++ arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 5 ++++ arch/arm/boot/dts/bcm2835-rpi-b.dts | 5 ++++ arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 5 ++++ arch/arm/boot/dts/bcm283x.dtsi | 30 +++++++++++++++++++++++- arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 5 ++++ 6 files changed, 54 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts index 432088ebb0a1..79f433eacb8b 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts @@ -101,3 +101,8 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; + +&i2c_dsi { + gpios = <&gpio 28 0 + &gpio 29 0>; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts index 4133bc2cd9be..145e0e4c2c7f 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts @@ -94,3 +94,8 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; + +&i2c_dsi { + gpios = <&gpio 2 0 + &gpio 3 0>; +}; diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts index 4d56fe3006b0..5b3f85883f0c 100644 --- a/arch/arm/boot/dts/bcm2835-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts @@ -89,3 +89,8 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; }; + +&i2c_dsi { + gpios = <&gpio 0 0 + &gpio 1 0>; +}; diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts index bf19e8cfb9e6..aa63cc29eca8 100644 --- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts @@ -39,3 +39,8 @@ &hdmi { hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; }; + +&i2c_dsi { + gpios = <&gpio 28 0 + &gpio 29 0>; +}; diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 35cea3fcaf5c..682f11a4fc91 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -505,7 +505,11 @@ "dsi1_ddr2", "dsi1_ddr"; - status = "disabled"; + port { + dsi_out_port: endpoint { + remote-endpoint = <&panel_dsi_port>; + }; + }; }; i2c1: i2c@7e804000 { @@ -575,6 +579,30 @@ vc4: gpu { compatible = "brcm,bcm2835-vc4"; }; + + i2c_dsi: i2c { + /* We have to use i2c-gpio because the + * firmware is also polling another device + * using the only hardware I2C bus that could + * connect to these pins. + */ + compatible = "i2c-gpio"; + #address-cells = <1>; + #size-cells = <0>; + gpios = <&gpio 28 0 + &gpio 29 0>; + + lcd@45 { + compatible = "raspberrypi,7inch-touchscreen-panel"; + reg = <0x45>; + + port { + panel_dsi_port: endpoint { + remote-endpoint = <&dsi_out_port>; + }; + }; + }; + }; }; clocks { diff --git a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts index c309633a1e87..c11026c6c8b4 100644 --- a/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts +++ b/arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts @@ -22,3 +22,8 @@ &uart1 { status = "okay"; }; + +&i2c_dsi { + gpios = <&gpio 44 0 + &gpio 45 0>; +};