From patchwork Thu Nov 1 20:00:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10664483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9C1D13B5 for ; Thu, 1 Nov 2018 20:01:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A70FF2C0DF for ; Thu, 1 Nov 2018 20:01:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 986122C0EF; Thu, 1 Nov 2018 20:01:25 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2CC982C0DF for ; Thu, 1 Nov 2018 20:01:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j7urSnJmxixBzOC7YNRLkf/97dPD2KSJOzxw/3BFDRI=; b=FD8XvqLdhWDLl2 2g3QvPAmquK/5W8NuIJzBJVSSxaLtHJpyaJo8941+dQznjnl6s3GY+jQ0pFUyC5DqQdQpqA7ADfLe xvN0wbAhNg/fi57oe4uO6jbAaAVnmEP+OW+Zt9ZYRJ9GFpp/BVltUtN5k5terJChYlneSDR/G4kMU Jxh9CsfOYAR597c+1/L5FprnWR85n+mXBLBMYD7RmUe17qsZCYef2AVX5lfhRxdD8BSvsllib263E Xw37YPnUgCBrfUQlLyq+mqINZoVQGggj6iOJOCHxmVcljwK5jGiWmp8T7s/77rV8SDEilBj9SBNxD r0Ser4hXMhceVeJ4HC2g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJ9c-0004Eu-KJ; Thu, 01 Nov 2018 20:01:20 +0000 Received: from vpn-0-22.aquilenet.fr ([2a0c:e300:4:22::] helo=leonov.paulk.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJ9Z-00040n-0B for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 20:01:18 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id C512FBFC95 for ; Thu, 1 Nov 2018 21:01:04 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 5CA30C1064; Thu, 1 Nov 2018 21:01:04 +0100 (CET) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id EEF67C1044; Thu, 1 Nov 2018 21:00:33 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/7] drm/sun4i: tcon: Pass encoder instead of using panel for RGB setup Date: Thu, 1 Nov 2018 21:00:39 +0100 Message-Id: <20181101200045.6078-2-contact@paulk.fr> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101200045.6078-1-contact@paulk.fr> References: <20181101200045.6078-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_130117_465617_8693BC18 X-CRM114-Status: GOOD ( 17.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , David Airlie , linux-sunxi@googlegroups.com, Rob Herring , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Thierry Reding Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Features such as dithering and pixel data edge configuration currently rely on the panel registered with the TCON driver. However, bridges are also supported in addition panels. Instead of retrieving the connector from the panel, pass the encoder from the calling function, as is done for other interfaces. The connector is then retrieved from the encoder with the dedicated helper. Even in the case of bridges, the connector is registered with the encoder from our driver and is accessible when iterating connectors. Signed-off-by: Paul Kocialkowski --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index f949287d926c..262ffb6b0f82 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -478,8 +478,11 @@ static void sun4i_tcon0_mode_set_lvds(struct sun4i_tcon *tcon, } static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, + const struct drm_encoder *encoder, const struct drm_display_mode *mode) { + struct drm_connector *connector = sun4i_tcon_get_connector(encoder); + struct drm_display_info display_info = connector->display_info; unsigned int bp, hsync, vsync; u8 clk_delay; u32 val = 0; @@ -491,8 +494,7 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, sun4i_tcon0_mode_set_common(tcon, mode); /* Set dithering if needed */ - if (tcon->panel) - sun4i_tcon0_mode_set_dithering(tcon, tcon->panel->connector); + sun4i_tcon0_mode_set_dithering(tcon, connector); /* Adjust clock delay */ clk_delay = sun4i_tcon_get_clk_delay(mode, 0); @@ -556,17 +558,11 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, * Following code is a way to avoid quirks all around TCON * and DOTCLOCK drivers. */ - if (tcon->panel) { - struct drm_panel *panel = tcon->panel; - struct drm_connector *connector = panel->connector; - struct drm_display_info display_info = connector->display_info; - - if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE) - clk_set_phase(tcon->dclk, 240); + if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_POSEDGE) + clk_set_phase(tcon->dclk, 240); - if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE) - clk_set_phase(tcon->dclk, 0); - } + if (display_info.bus_flags & DRM_BUS_FLAG_PIXDATA_NEGEDGE) + clk_set_phase(tcon->dclk, 0); regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG, SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | SUN4I_TCON0_IO_POL_VSYNC_POSITIVE, @@ -684,7 +680,7 @@ void sun4i_tcon_mode_set(struct sun4i_tcon *tcon, sun4i_tcon0_mode_set_lvds(tcon, encoder, mode); break; case DRM_MODE_ENCODER_NONE: - sun4i_tcon0_mode_set_rgb(tcon, mode); + sun4i_tcon0_mode_set_rgb(tcon, encoder, mode); sun4i_tcon_set_mux(tcon, 0, encoder); break; case DRM_MODE_ENCODER_TVDAC: From patchwork Thu Nov 1 20:00:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10664489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 36B5213B5 for ; Thu, 1 Nov 2018 20:01:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28B362C0EF for ; Thu, 1 Nov 2018 20:01:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A8DD2C10A; Thu, 1 Nov 2018 20:01:48 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2DAAE2C0EF for ; Thu, 1 Nov 2018 20:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wjatAJ6B4tEqH17Sj80wAjzoLhyaJRTm8W/d7Mr00mE=; b=YBEbZJ46NnpSt4 u1JqvK6wO6/40Q8QA2N0UUoPyVHGnGzoALAO/k5X3L8OzVTYOKgiUNRhdApnEmhmxKUSSdsOT23ts FpAbmu8XENp+ATO59wQDEIf9eZDUvWfoX4v1e31ihP4svKYgh4QJmYmeSLfJarEYmib6kOTEFo5tC m+aB4MbBPXbWDsP2aG7BG313T/0hOCKby3il4vte/VCWLxZC4d8rdRGZnBvhEhCm2owSukcYZpQgO sSGBozADIb4ujVWk4zKhDY3u49nMIJI4K7wm+K1n321ghnceOXnGolETvcsB1viVUh1ccvGK73/xL KPsHwsRHObkVwmMMRAoA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJA2-0004dl-7u; Thu, 01 Nov 2018 20:01:46 +0000 Received: from vpn-0-22.aquilenet.fr ([2a0c:e300:4:22::] helo=leonov.paulk.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJ9w-0004S9-6W for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 20:01:44 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id AA1C7BFA47 for ; Thu, 1 Nov 2018 21:01:28 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 2FE29C106E; Thu, 1 Nov 2018 21:01:27 +0100 (CET) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 35D89C1057; Thu, 1 Nov 2018 21:00:34 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/7] drm/sun4i: tcon: Support an active-low DE signal with RGB interface Date: Thu, 1 Nov 2018 21:00:40 +0100 Message-Id: <20181101200045.6078-3-contact@paulk.fr> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101200045.6078-1-contact@paulk.fr> References: <20181101200045.6078-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_130140_495551_B6F122D3 X-CRM114-Status: GOOD ( 17.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , David Airlie , linux-sunxi@googlegroups.com, Rob Herring , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Thierry Reding Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Some panels need an active-low data enable (DE) signal for the RGB interface. This requires flipping a bit in the TCON0 polarity register when setting up the mode for the RGB interface. Match the associated bus flag and use it to set the polarity inversion bit for the DE signal when required. Signed-off-by: Paul Kocialkowski --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 7 ++++++- drivers/gpu/drm/sun4i/sun4i_tcon.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c index 262ffb6b0f82..0420f5c978b9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -543,6 +543,9 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, if (mode->flags & DRM_MODE_FLAG_PVSYNC) val |= SUN4I_TCON0_IO_POL_VSYNC_POSITIVE; + if (display_info.bus_flags & DRM_BUS_FLAG_DE_LOW) + val |= SUN4I_TCON0_IO_POL_DE_NEGATIVE; + /* * On A20 and similar SoCs, the only way to achieve Positive Edge * (Rising Edge), is setting dclk clock phase to 2/3(240°). @@ -565,7 +568,9 @@ static void sun4i_tcon0_mode_set_rgb(struct sun4i_tcon *tcon, clk_set_phase(tcon->dclk, 0); regmap_update_bits(tcon->regs, SUN4I_TCON0_IO_POL_REG, - SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | SUN4I_TCON0_IO_POL_VSYNC_POSITIVE, + SUN4I_TCON0_IO_POL_HSYNC_POSITIVE | + SUN4I_TCON0_IO_POL_VSYNC_POSITIVE | + SUN4I_TCON0_IO_POL_DE_NEGATIVE, val); /* Map output pins to channel 0 */ diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h index 3d492c8be1fc..b5214d71610f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.h +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h @@ -116,6 +116,7 @@ #define SUN4I_TCON0_IO_POL_REG 0x88 #define SUN4I_TCON0_IO_POL_DCLK_PHASE(phase) ((phase & 3) << 28) +#define SUN4I_TCON0_IO_POL_DE_NEGATIVE BIT(27) #define SUN4I_TCON0_IO_POL_HSYNC_POSITIVE BIT(25) #define SUN4I_TCON0_IO_POL_VSYNC_POSITIVE BIT(24) From patchwork Thu Nov 1 20:00:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10664511 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3027F157A for ; Thu, 1 Nov 2018 20:13:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E9922BFC5 for ; Thu, 1 Nov 2018 20:13:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 125442BFCB; Thu, 1 Nov 2018 20:13:17 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BB7E52BFC5 for ; Thu, 1 Nov 2018 20:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jLi/9WTEKI9hiazVdIgVvZdAZigZf38+0KfQmPFYGJ0=; b=Hjw3OWh7/x5wO1 h3B0AGbjrFSSUjGLpVsjxXhJEnjTwVqe5/2RrVdrFXZw8uVEGVB2PZjphYMCTfjFcEwleRaO8eQXF ALkv3KuDKnfK57usHlLHH4ZllLmbdeKeEkvRydUgBejg5Uc+rY9ulVNYhR/JTLtjsApY4RHMwlwk8 qYLWfKlxaSWTOmCZv/Kf2yXcjsoaG+gn4ahoTfohv2fgxY/SVkDpDzEDmi5NplP9OHLgKwJXrEl8S n+4mqwek5mVqZ5fO8tPf13FV3670C03pCOfXusKPDK2efE+OMEAxKXIqS/sQ8DHKMrUad8nBYdKxq NTSEf9+SAe+mB6MlAYyg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJL9-0001fA-73; Thu, 01 Nov 2018 20:13:15 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJA6-0004bh-2D for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 20:02:01 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 6BCA6BFDF8 for ; Thu, 1 Nov 2018 21:01:38 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id E52D3C1070; Thu, 1 Nov 2018 21:01:37 +0100 (CET) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 7030EC105B; Thu, 1 Nov 2018 21:00:34 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/7] dt-bindings: Add vendor prefix for LeMaker Date: Thu, 1 Nov 2018 21:00:41 +0100 Message-Id: <20181101200045.6078-4-contact@paulk.fr> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101200045.6078-1-contact@paulk.fr> References: <20181101200045.6078-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_130150_587904_529614EA X-CRM114-Status: GOOD ( 13.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , David Airlie , linux-sunxi@googlegroups.com, Rob Herring , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Thierry Reding Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This introduces a new device-tree binding vendor prefix for Shenzhen LeMaker Technology Co., Ltd. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Hering --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 0f5453d1823c..4eecfbf866a4 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -206,6 +206,7 @@ laird Laird PLC lantiq Lantiq Semiconductor lattice Lattice Semiconductor lego LEGO Systems A/S +lemaker Shenzhen LeMaker Technology Co., Ltd. lenovo Lenovo Group Ltd. lg LG Corporation libretech Shenzhen Libre Technology Co., Ltd From patchwork Thu Nov 1 20:00:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10664493 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C944B14BD for ; Thu, 1 Nov 2018 20:02:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B65BA2C0EF for ; Thu, 1 Nov 2018 20:02:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A68172C11E; Thu, 1 Nov 2018 20:02:23 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 44EA12C0EF for ; Thu, 1 Nov 2018 20:02:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ISrW+eK3BjmWyeEFr0mvsfZdHjge4b4duMsBAzQZzL8=; b=F7I+YCo7RfCUIa KQbESgyXgo2y/2a+fEptg4ovGxLPnPbskS9hSDF3AgOHN3MsICIz3bImcjR2hZsqOPX1VQiHDH9/9 YF1oVnjmBbwH75QMVBtoiolsAL0KkE6B37CojgNBAwS50sy358ZgaRI42+lcjCTP+/nH7itdfHgQ5 y3q5Wn1EQaSkjtA0QOSHkfjXtrawsmKIdcBqjJDg4SA1nJdWx6kwx7Vn07SJf2FzqWlpX9fW7RmZP rYYCUsJFSjbMxaGvi+J0bL/Iq9Cuefo7EZ358rRqQyMZtH1IJr5E5y9ztxwrnilC1NZ92cw42cRau 6SND8LS+/NYZoPD2KEZw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJAb-000572-Fo; Thu, 01 Nov 2018 20:02:21 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJAZ-00056a-Hc for linux-arm-kernel@bombadil.infradead.org; Thu, 01 Nov 2018 20:02:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FnMautzyfG6/HMaVTVRU/ulZCwpNwwaCKu1QSuOQkao=; b=suiUYUdmwkwVZblhKvioTdUud+ F2BTxASpWfIaagAy/vsHFki1+XBDtwQToEkTREK6qkjP/Sq2uWxLhbzfrx0Z317yTAsOS0MeK+N/6 4kglhEZ0et/2JqFxMxUAIfRNCq2dp5bat3C4oogZIZVijbNvlQLI7Q/1Ah0A+QEPZAx9b3G4M3uL3 R1FCXnfOusvLmwBLQfR0ponDFBmJAFFxy4hT7TYj1TWGhHjnfGuVzXD/LwohE1su9gUgAUaKDMsuu gK5bkx5iJqcsZTU5HcA5avFOW0abMxWfSdYAAaiYLPOfpBMbPVy/a5eH7L5TzY/NiueZykjb07lp8 yp4FKimw==; Received: from vpn-0-22.aquilenet.fr ([2a0c:e300:4:22::] helo=leonov.paulk.fr) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJAV-0003Cj-NT for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 20:02:17 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id CCE63BFDEA for ; Thu, 1 Nov 2018 21:01:56 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 608E7C1076; Thu, 1 Nov 2018 21:01:56 +0100 (CET) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id AAB26C1045; Thu, 1 Nov 2018 21:00:34 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 4/7] dt-bindings: Add bindings for the LeMaker BL035-RGB-002 LCD panel Date: Thu, 1 Nov 2018 21:00:42 +0100 Message-Id: <20181101200045.6078-5-contact@paulk.fr> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101200045.6078-1-contact@paulk.fr> References: <20181101200045.6078-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_200215_895709_667C0967 X-CRM114-Status: GOOD ( 18.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , David Airlie , linux-sunxi@googlegroups.com, Rob Herring , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Thierry Reding Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds the device-tree bindings for the LeMaker BL035-RGB-002 3.5" QVGA TFT LCD panel, compatible with simple-panel. Signed-off-by: Paul Kocialkowski --- .../bindings/display/panel/lemaker,bl035-rgb-002.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/lemaker,bl035-rgb-002.txt diff --git a/Documentation/devicetree/bindings/display/panel/lemaker,bl035-rgb-002.txt b/Documentation/devicetree/bindings/display/panel/lemaker,bl035-rgb-002.txt new file mode 100644 index 000000000000..22cff3eb1b8f --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/lemaker,bl035-rgb-002.txt @@ -0,0 +1,7 @@ +LeMaker BL035-RGB-002 3.5" QVGA TFT LCD panel + +Required properties: +- compatible: should be "lemaker,bl035-rgb-002" + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. From patchwork Thu Nov 1 20:00:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10664503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EB2313B5 for ; Thu, 1 Nov 2018 20:02:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F6BA2C10A for ; Thu, 1 Nov 2018 20:02:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3398C2C12C; Thu, 1 Nov 2018 20:02:53 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D923E2C10A for ; Thu, 1 Nov 2018 20:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vjpqMsxz3WJKpBoj+RXbjYccvONvd1CG17Mn0n36j60=; b=izUSs5ny0zbTGY zgYavLf05ArIsiyu9TbY30PMxBEprqDCOX17JIvsmVJJqZ0E+oe0yGAfkKCFfzc3Luz0NbBQktAjm Z0/pT3xEfXMp6idg/Gbk9UpHPwAx8rKCfyAhlmYr89Aj6bClO1HAIjRey6ZoysHIbxIW3pp7fRPPV R0z1bgmUimYz7MIdZ/SAFNKFXp0fj/ULiN2qABm9wha7/VPT7PmOJFWcA6hrnSoWsjG5eAIGnxfpx xn5H/lNKokdPs4EeegTqnhr0KE/arnr4UkJL93vs16DnR8Sh9GIAqOb4Bg2Bi+IRgVmlFHqd2AnxE Jv1+Qz29UsbiGJbIXy3g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJB4-0005Yd-JU; Thu, 01 Nov 2018 20:02:50 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJAs-0005Dz-Q6 for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 20:02:41 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 065BABFDEA for ; Thu, 1 Nov 2018 21:02:26 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 7D188C107D; Thu, 1 Nov 2018 21:02:26 +0100 (CET) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id E7FDAC1043; Thu, 1 Nov 2018 21:00:34 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 5/7] drm/panel: simple: Add support for the LeMaker BL035-RGB-002 3.5" LCD Date: Thu, 1 Nov 2018 21:00:43 +0100 Message-Id: <20181101200045.6078-6-contact@paulk.fr> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101200045.6078-1-contact@paulk.fr> References: <20181101200045.6078-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_130239_130900_4C5B9DD9 X-CRM114-Status: GOOD ( 15.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , David Airlie , linux-sunxi@googlegroups.com, Rob Herring , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Thierry Reding Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds support for the 3.5" LCD panel from LeMaker, sold for use with BananaPi boards. It comes with a 24-bit RGB888 parallel interface and requires an active-low DE signal Signed-off-by: Paul Kocialkowski --- drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 90296090340e..8e147cfa7b88 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -1562,6 +1562,30 @@ static const struct panel_desc kyo_tcg121xglp = { .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG, }; +static const struct drm_display_mode lemaker_bl035_rgb_002_mode = { + .clock = 7000, + .hdisplay = 320, + .hsync_start = 320 + 20, + .hsync_end = 320 + 20 + 30, + .htotal = 320 + 20 + 30 + 38, + .vdisplay = 240, + .vsync_start = 240 + 4, + .vsync_end = 240 + 4 + 3, + .vtotal = 240 + 4 + 3 + 15, + .vrefresh = 60, +}; + +static const struct panel_desc lemaker_bl035_rgb_002 = { + .modes = &lemaker_bl035_rgb_002_mode, + .num_modes = 1, + .size = { + .width = 70, + .height = 52, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24, + .bus_flags = DRM_BUS_FLAG_DE_LOW, +}; + static const struct drm_display_mode lg_lb070wv8_mode = { .clock = 33246, .hdisplay = 800, @@ -2569,6 +2593,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "kyo,tcg121xglp", .data = &kyo_tcg121xglp, + }, { + .compatible = "lemaker,bl035-rgb-002", + .data = &lemaker_bl035_rgb_002, }, { .compatible = "lg,lb070wv8", .data = &lg_lb070wv8, From patchwork Thu Nov 1 20:00:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10664499 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5ACC014BD for ; Thu, 1 Nov 2018 20:02:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AB642C0EF for ; Thu, 1 Nov 2018 20:02:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E8932C11E; Thu, 1 Nov 2018 20:02:43 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E0CBE2C0EF for ; Thu, 1 Nov 2018 20:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LHmrvduR9Suh6SlkA/e+WyRahbqXf8eAbmAWu04LGy4=; b=cf3NhWRwhivJsZ ORh3m2T+QdlQFE0JwlCmpjHU8OdX5idzZNgTjdeYnQ+0+Iae/xRelwbeuwfQhcyr8xvl0vbg+dmBt +YKXf2fo1S8PVxKkFrNPqBTQEe04Sz+4Ga5pIAFSaNM72VVtpSolsq9izs/6T5xdijga0RhAjfKz8 auR7pCXz6qHilTPwyc1Q04G1mxxFPpgOLlb9S4QN95LSr/uiG2u8biETK3ggAHhV5mcj0SD/Z1DEH 84NjXjRV89AXr/3jnYHPv5sh4AWeYfaewKE7Rwtr/aogllLQzSfMIBaznl2mFBCU8NHpgoitoqqCU 3OMb8EtUK4tPKCmW9wNQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJAv-0005OR-Pz; Thu, 01 Nov 2018 20:02:41 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJAs-0005EP-Q5 for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 20:02:40 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 45C39BFDF8 for ; Thu, 1 Nov 2018 21:02:27 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id D1C49C107E; Thu, 1 Nov 2018 21:02:26 +0100 (CET) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 30E31C105A; Thu, 1 Nov 2018 21:00:35 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH NOT FOR MERGE v2 6/7] ARM: dts: sun7i: Add pinmux configuration for LCD0 RGB888 pins Date: Thu, 1 Nov 2018 21:00:44 +0100 Message-Id: <20181101200045.6078-7-contact@paulk.fr> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101200045.6078-1-contact@paulk.fr> References: <20181101200045.6078-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_130239_121941_D35A5FB1 X-CRM114-Status: GOOD ( 13.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , David Airlie , linux-sunxi@googlegroups.com, Rob Herring , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Thierry Reding Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds the pin muxing definition for configuring the PD pins in LCD0 mode for a RGB888 format to the sun7i device-tree. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun7i-a20.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi index 9c52712af241..26f3714eaad0 100644 --- a/arch/arm/boot/dts/sun7i-a20.dtsi +++ b/arch/arm/boot/dts/sun7i-a20.dtsi @@ -811,6 +811,17 @@ function = "ir1"; }; + lcd0_rgb888_pins: lcd0-rgb888 { + pins = "PD0", "PD1", "PD2", "PD3", + "PD4", "PD5", "PD6", "PD7", + "PD8", "PD9", "PD10", "PD11", + "PD12", "PD13", "PD14", "PD15", + "PD16", "PD17", "PD18", "PD19", + "PD20", "PD21", "PD22", "PD23", + "PD24", "PD25", "PD26", "PD27"; + function = "lcd0"; + }; + mmc0_pins_a: mmc0@0 { pins = "PF0", "PF1", "PF2", "PF3", "PF4", "PF5"; From patchwork Thu Nov 1 20:00:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10664505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B617514BD for ; Thu, 1 Nov 2018 20:03:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A41A52C146 for ; Thu, 1 Nov 2018 20:03:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92D012C188; Thu, 1 Nov 2018 20:03:19 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 185562C146 for ; Thu, 1 Nov 2018 20:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R1qDuElG8isOr4skBS0QVoEakrohBpKC6n4nvHLr9MU=; b=NlhGmSEjnZzZSX ZqCM/Uz8DS6aqk0tixRPzNkk28GIgEr0WfGl8ziAQOdz+qQtzQ0DP+cR0dxlQpQippbspE5SgXG9B fodp5CyoiPW3uk+rlLzNfjoNi2kSHZWso+WeufhuSkBUPDgaVd09103jCWGkkvPQLvIKtWZnRhy1X I4pPmrimY238UWYnrMdhMSBpZ98GBLRfvScTE/DNAL1jLO/8vlt7ctChvNFVmb/hOAsJlYhe1UuRm rinU7FjAqnOhTegV1SsQKaDbSfx4pA68LImo/VazFBXa0htxDTnk7A/0HyIPeZtKH/SYnkrok/tUi iish+JerrEFXTbUN2WKQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJBO-0005v6-Ub; Thu, 01 Nov 2018 20:03:10 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJB9-0005R8-8W for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 20:03:09 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id B6995BFC95 for ; Thu, 1 Nov 2018 21:02:43 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 5750AC1087; Thu, 1 Nov 2018 21:02:43 +0100 (CET) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 6FE77C105C; Thu, 1 Nov 2018 21:00:35 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH NOT FOR MERGE v2 7/7] ARM: dts: sun7i-a20-bananapi: Add bindings for the LeMaker 3.5" LCD Date: Thu, 1 Nov 2018 21:00:45 +0100 Message-Id: <20181101200045.6078-8-contact@paulk.fr> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101200045.6078-1-contact@paulk.fr> References: <20181101200045.6078-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_130256_532542_9C2FA987 X-CRM114-Status: GOOD ( 15.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , David Airlie , linux-sunxi@googlegroups.com, Rob Herring , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Thierry Reding Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This adds the backlight panel, power, pwm and tcon0 device-tree bindings required for supporting the 3.5" LCD from LeMaker on the BananaPi M1. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 89 ++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts index 70dfc4ac0bb5..dd2f8bc41fae 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts @@ -48,6 +48,7 @@ #include #include +#include / { model = "LeMaker Banana Pi"; @@ -63,6 +64,75 @@ stdout-path = "serial0:115200n8"; }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 50000 0>; + brightness-levels = < 0 1 1 1 1 2 2 2 + 2 3 3 3 3 4 4 4 + 5 5 5 6 6 6 7 7 + 8 8 8 9 9 9 10 10 + 10 11 11 12 12 12 13 13 + 14 14 14 15 15 16 16 17 + 17 17 18 18 19 19 20 20 + 21 21 21 22 22 23 23 24 + 24 25 25 26 26 27 27 28 + 28 29 30 30 31 31 32 32 + 33 33 34 35 35 36 36 37 + 38 38 39 39 40 41 41 42 + 43 43 44 44 45 46 47 47 + 48 49 49 50 51 51 52 53 + 54 54 55 56 57 57 58 59 + 60 61 61 62 63 64 65 65 + 66 67 68 69 70 71 71 72 + 73 74 75 76 77 78 79 80 + 81 82 83 84 85 86 87 88 + 89 90 91 92 93 94 95 96 + 97 98 99 101 102 103 104 105 + 106 108 109 110 111 112 114 115 + 116 117 119 120 121 123 124 125 + 127 128 129 131 132 133 135 136 + 138 139 141 142 144 145 147 148 + 150 151 153 154 156 157 159 161 + 162 164 166 167 169 171 173 174 + 176 178 180 181 183 185 187 189 + 191 192 194 196 198 200 202 204 + 206 208 210 212 214 216 219 221 + 223 225 227 229 232 234 236 238 + 241 242 244 246 248 250 253 255>; + default-brightness-level = <128>; + enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ + }; + + panel: panel { + compatible = "lemaker,bl035"; + #address-cells = <1>; + #size-cells = <0>; + power-supply = <&panel_power>; + backlight = <&backlight>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + panel_input: endpoint@0 { + reg = <0>; + remote-endpoint = <&tcon0_out_panel>; + }; + }; + }; + + panel_power: panel_power { + compatible = "regulator-fixed"; + regulator-name = "panel-power"; + regulator-min-microvolt = <10400000>; + regulator-max-microvolt = <10400000>; + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */ + enable-active-high; + regulator-boot-on; + }; + hdmi-connector { compatible = "hdmi-connector"; type = "a"; @@ -275,6 +345,12 @@ }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pins_a>; + status = "okay"; +}; + #include "axp209.dtsi" ®_dcdc2 { @@ -322,6 +398,19 @@ status = "okay"; }; +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd0_rgb888_pins>; + status = "okay"; +}; + +&tcon0_out { + tcon0_out_panel: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>;