From patchwork Wed Nov 22 16:12:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13465101 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 246A9C61D97 for ; Wed, 22 Nov 2023 16:13:26 +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=2DPU3mMWTQnM6qQuHQiDSxN6P1tZJ0kufP4enBXXtts=; b=hxfUGExenpuYaf CV5qavjLEVumb2m2r0v9vNRKaaWKw/KzsRIefrlc8hyCiEhdpaGhOau92IvhT0F7ZoUKyfsOfL7UT 7Tb8l36WTMxJPX+gbSjlawus9rBkyEsSBNuImFFJ5y6+a9xkGwZsp9gaVMr5T7TbAjzTsF9AfwzYY tnlgqtgaM0syz5G1NNBRBrlaPrV0NE5eRt7pmhQB1I540w+h940hGo+bZoaoM/PXAUUKrF7VXTa36 7Zhjyh+kvFKr15knDiYcS/lV+haWl7rxAVzp4cAto+8F9RpMjObD5vhwE0pLxzNBeVjaCd4iVA3ag /FK6dEjnkIqsHFLAa/rQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r5pqT-002OfN-2F; Wed, 22 Nov 2023 16:12:57 +0000 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r5pqN-002ObN-2M for linux-arm-kernel@lists.infradead.org; Wed, 22 Nov 2023 16:12:53 +0000 Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:d60:3031:68fb:d1ad]) by michel.telenet-ops.be with bizsmtp id DUCm2B00E3EmSSH06UCmUJ; Wed, 22 Nov 2023 17:12:46 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1r5pq4-009ylC-95; Wed, 22 Nov 2023 17:12:46 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1r5pqI-00GzNP-7j; Wed, 22 Nov 2023 17:12:46 +0100 From: Geert Uytterhoeven To: Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH v2 1/3] ARM: shmobile: defconfig: Switch to DRM_SHMOBILE Date: Wed, 22 Nov 2023 17:12:41 +0100 Message-Id: <3d17d8418ddabeb84ff5fa1cdd16439ddc84286f.1700669207.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231122_081251_927522_F7AAFAF8 X-CRM114-Status: GOOD ( 11.54 ) 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 Now the DRM driver for the SH-Mobile LCD Controller supports DT, replace the legacy frame buffer device driver by the DRM driver. Disable frame buffer device drivers, as this was the last frame buffer device driver for Renesas ARM systems. Enable CONFIG_DRM_FBDEV_EMULATION and CONFIG_FB_DEVICE, as these are no longer auto-enabled since commit bb6c4507fe825f1b ("drm: fix up fbdev Kconfig defaults"). Signed-off-by: Geert Uytterhoeven --- v2: - New. --- arch/arm/configs/shmobile_defconfig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig index e2ea369548eb0a8d..c47a638172a89bfd 100644 --- a/arch/arm/configs/shmobile_defconfig +++ b/arch/arm/configs/shmobile_defconfig @@ -135,8 +135,10 @@ CONFIG_VIDEO_ADV7604=y CONFIG_VIDEO_ADV7604_CEC=y CONFIG_VIDEO_ML86V7667=y CONFIG_DRM=y +CONFIG_DRM_FBDEV_EMULATION=y CONFIG_DRM_RCAR_DU=y # CONFIG_DRM_RCAR_USE_MIPI_DSI is not set +CONFIG_DRM_SHMOBILE=y CONFIG_DRM_PANEL_SIMPLE=y CONFIG_DRM_PANEL_EDP=y CONFIG_DRM_DISPLAY_CONNECTOR=y @@ -145,8 +147,7 @@ CONFIG_DRM_SII902X=y CONFIG_DRM_SIMPLE_BRIDGE=y CONFIG_DRM_I2C_ADV7511=y CONFIG_DRM_I2C_ADV7511_AUDIO=y -CONFIG_FB=y -CONFIG_FB_SH_MOBILE_LCDC=y +CONFIG_FB_DEVICE=y CONFIG_BACKLIGHT_PWM=y CONFIG_BACKLIGHT_AS3711=y CONFIG_SOUND=y From patchwork Wed Nov 22 16:12:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13465103 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 82934C61D99 for ; Wed, 22 Nov 2023 16:13:29 +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=AbDI1uABNGZHxJRNgLq0XK79cd/dSHDMGZ3w+6Fxegc=; b=HhvrRGwVEkXVZW 7o2DnNfIAD01/H9mHrjYGxT707YK564BR/49UFtevUYNIqPYDK3dF9/lK1HtGq2Ax5erEOpyE6n+O 3VDHVWcdHP9Qg3Vri/G5lG7PIesNzRkaRYMiBKVo2b07thfXlXTDPekPGAG69d87PX9UudFmyrzC+ eIA6YCb9I2/ADt4uKl4DsbmuN5LMFc91LNBPWkMa706s/6eoFO3iRvMDN3UduhUH4Z7rck5mpa908 Ag58/6dDr5R744XjeQddI7GV0rHa2LXxfhPV6OonqMPZo3f3Qng8DE7O0LjPlo6WG8qZcQDwPD3vn mGmRTAJ+znXjIMrlhkHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r5pqT-002Of3-0S; Wed, 22 Nov 2023 16:12:57 +0000 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r5pqN-002Ob7-02 for linux-arm-kernel@lists.infradead.org; Wed, 22 Nov 2023 16:12:52 +0000 Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:d60:3031:68fb:d1ad]) by baptiste.telenet-ops.be with bizsmtp id DUCm2B00E3EmSSH01UCmq7; Wed, 22 Nov 2023 17:12:46 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1r5pq4-009ylE-99; Wed, 22 Nov 2023 17:12:46 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1r5pqI-00GzNS-8L; Wed, 22 Nov 2023 17:12:46 +0100 From: Geert Uytterhoeven To: Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH v2 2/3] ARM: dts: renesas: r8a7740: Add LCDC nodes Date: Wed, 22 Nov 2023 17:12:42 +0100 Message-Id: <12dcec10e6fb3b55c39f6221349d35d6d6f17a5d.1700669207.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231122_081251_188490_4EF9F22A X-CRM114-Status: GOOD ( 12.37 ) 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 device nodes for the two LCD Controllers (LCDC) on the R-Mobile A1 SoC, and for the two optional external LCDL clock inputs. Note that the HDMI clock for LCDC1 is not added, as this clock is not yet supported. Based on a patch by Laurent Pinchart adding the first LCDC device node. Signed-off-by: Geert Uytterhoeven --- v2: - No changes. Changes compared to Laurent's original: - Add lcdc0 label, - Rename node from display to lcdc-controller, - Rename compatible value from "renesas,lcdc-r8a7740" to "renesas,r8a7740-lcdc", - Correct syntax of reg property, - Use GIC_SPI macro, - Add more clocks, - Add power-domains property, - Add status disabled, - Remove second port from lcdc0, as only lcdc1 has an HDMI port, - Add lcdc1 device node. --- arch/arm/boot/dts/renesas/r8a7740.dtsi | 65 ++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/arch/arm/boot/dts/renesas/r8a7740.dtsi b/arch/arm/boot/dts/renesas/r8a7740.dtsi index 1b2cf5fa322b2985..55884ec701f8dab4 100644 --- a/arch/arm/boot/dts/renesas/r8a7740.dtsi +++ b/arch/arm/boot/dts/renesas/r8a7740.dtsi @@ -398,6 +398,61 @@ sh_fsi2: sound@fe1f0000 { status = "disabled"; }; + lcdc0: lcd-controller@fe940000 { + compatible = "renesas,r8a7740-lcdc"; + reg = <0xfe940000 0x4000>; + interrupts = ; + clocks = <&mstp1_clks R8A7740_CLK_LCDC0>, + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk0_clk>, + <&vou_clk>; + clock-names = "fck", "media", "lclk", "video"; + power-domains = <&pd_a4lc>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lcdc0_rgb: endpoint { + }; + }; + }; + }; + + lcdc1: lcd-controller@fe944000 { + compatible = "renesas,r8a7740-lcdc"; + reg = <0xfe944000 0x4000>; + interrupts = ; + clocks = <&mstp1_clks R8A7740_CLK_LCDC1>, + <&cpg_clocks R8A7740_CLK_M3>, <&lcdlclk1_clk>, + <&vou_clk>; + clock-names = "fck", "media", "lclk", "video"; + power-domains = <&pd_a4lc>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lcdc1_rgb: endpoint { + }; + }; + + port@1 { + reg = <1>; + + lcdc1_hdmi: endpoint { + }; + }; + }; + }; + tmu0: timer@fff80000 { compatible = "renesas,tmu-r8a7740", "renesas,tmu"; reg = <0xfff80000 0x2c>; @@ -474,6 +529,16 @@ fsibck_clk: fsibck { #clock-cells = <0>; clock-frequency = <0>; }; + lcdlclk0_clk: lcdlclk0 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; + lcdlclk1_clk: lcdlclk1 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + }; /* Special CPG clocks */ cpg_clocks: cpg_clocks@e6150000 { From patchwork Wed Nov 22 16:12:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13465100 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 2D1E4C61D97 for ; Wed, 22 Nov 2023 16:13:21 +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=SFC54zxlMPpPP866lV7vce4d2cc6iRhuo6kqqqJ1y6c=; b=vhtHhjyG17Tr1/ 7J2XN2yfYGsmWAhh5OmuDVWRPT/EcNoNDhMwhgI6rEj//Nj0/CnOQ7RAciZoL/Tuu1O8ncH+2T5u+ ps90S2GG8/HVnFx2kzgAutwJBfnGICq8lcU3qK6X0TPWz6osXK9LXQQBnvif0FmHyj1JWT9s8urC5 yrCNbezScGh+6GnoDjHx/kl4ycGk5BKJdqPNy7fssoqErM9reO0tls9mGUZnzmLQB0lrCsxZehz5t RsRmjTKv6fjNOIJ6w+u4j14LaSEXUU4attarhOpZjMkn5kqxMKKZfg7BdFINgPDk70zeTC1mE9gu4 RogMoYIPs59vL6O7FCoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r5pqN-002Ocx-33; Wed, 22 Nov 2023 16:12:51 +0000 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r5pqK-002Ob9-2p for linux-arm-kernel@lists.infradead.org; Wed, 22 Nov 2023 16:12:50 +0000 Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:d60:3031:68fb:d1ad]) by xavier.telenet-ops.be with bizsmtp id DUCm2B00H3EmSSH01UCmsF; Wed, 22 Nov 2023 17:12:46 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1r5pq4-009ylF-9k; Wed, 22 Nov 2023 17:12:46 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1r5pqI-00GzNX-9A; Wed, 22 Nov 2023 17:12:46 +0100 From: Geert Uytterhoeven To: Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven , Laurent Pinchart Subject: [PATCH v2 3/3] ARM: dts: renesas: armadillo800eva: Add LCD panel Date: Wed, 22 Nov 2023 17:12:43 +0100 Message-Id: <278339322dcaaedc0d68fc67f1f1272d880084d7.1700669207.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231122_081249_053729_BBE740CB X-CRM114-Status: GOOD ( 10.93 ) 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 Describe the 5" WVGA TFT LCD panel on the Armadillo-800-EVA development board, and enable the LCD controller that drives it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v2: - Add Reviewed-by. For proper operation, this depends on: 1. commit 410bb21319f69c2e ("drm/panel: simple: Add Ampire AM-800480L1TMQW-T00H") in drm/drm-next, 2. Patch series "[PATCH 00/39] drm: renesas: shmobile: Atomic conversion + DT support" https://lore.kernel.org/r/cover.1687423204.git.geert+renesas@glider.be 3. Enabling CONFIG_DRM_SHMOBILE instead of CONFIG_FB_SH_MOBILE_LCDC. --- .../dts/renesas/r8a7740-armadillo800eva.dts | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts index d21e00e1f40152d6..e1ac2c161e730342 100644 --- a/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts +++ b/arch/arm/boot/dts/renesas/r8a7740-armadillo800eva.dts @@ -132,7 +132,7 @@ i2c2: i2c-2 { i2c-gpio,delay-us = <5>; }; - backlight { + backlight: backlight { compatible = "pwm-backlight"; pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>; brightness-levels = <0 1 2 4 8 16 32 64 128 255>; @@ -143,6 +143,18 @@ backlight { enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>; }; + panel { + compatible = "ampire,am-800480l1tmqw-t00h"; + backlight = <&backlight>; + power-supply = <®_5p0v>; + + port { + panel_in: endpoint { + remote-endpoint = <&lcdc0_rgb>; + }; + }; + }; + sound { compatible = "simple-audio-card"; @@ -228,10 +240,22 @@ rtc@30 { }; }; -&pfc { +&lcdc0 { pinctrl-0 = <&lcd0_pins>; pinctrl-names = "default"; + status = "okay"; + + ports { + port@0 { + endpoint { + remote-endpoint = <&panel_in>; + }; + }; + }; +}; + +&pfc { ether_pins: ether { groups = "gether_mii", "gether_int"; function = "gether";