Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp159701lqg; Fri, 1 Mar 2024 00:58:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVNfLPM5xqN9Gz4IAgzikz914YGX3hEhm1INR208ez1KOTI50CTjvxWeBgCTpTMCr3+WBMXU7bWcZSgLakHMdFfiO9G9uysxqtV6UJBWg== X-Google-Smtp-Source: AGHT+IFuq0lH3Kz0iNr7Z7odUR9k5hYfiT1qyMhwa0x6DKElrQTZKUX020qic1/0kdne3B5C2vpm X-Received: by 2002:a17:907:20b9:b0:a43:e550:4067 with SMTP id pw25-20020a17090720b900b00a43e5504067mr697057ejb.12.1709283518359; Fri, 01 Mar 2024 00:58:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709283518; cv=pass; d=google.com; s=arc-20160816; b=rZL8jZwU+cNQK7yELN9kx/yd1DrY/aL/Km3AIslniuNrMvWHc7eXO2yK6sgtxyk3Sh 01GqnNS17BQ/5d8KUG5iemBC2ycjO/eSZyQr7axtF8zrCo2sJ5wF9UuUHj6o21z/ZTMp Q4GHSkqP2wSJMv8hpTlzmM/R6T0ggcYyGlcY6vGyOOxsvW8zsp0Z/hbA1UK3Hkee72gC vyCjaQTHFgP731pt4DAcghhiTzBuAep8pEJMXUsReHsKhqL/WLKGKO74fKyMDosG1PQi J8bel02oH3McNhgmv3RksNGPhhfl7GL0XT3s7LaRwW7f8zVnQMNMa9xYJcF5Pn7r447u yIKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=InfVPVB17r70eZRCxjgk3TaBDZxSYd2ZlvgayN7gEEk=; fh=Ce6l7k+F1ZO7t4vDxIu8sNir/WV5YdsUt3Cw2vn76H8=; b=W/5PBi5SSme6vXsOJJP0o9tU+9WSVDxt2t3VjskW21qCnHxBVQoGFR92Ey2Q0k4jIa wXLitU1b7CtrFZ55xyZ5v+eHMuhWgTf6gCciXrwUZWrqBMmeGd2fbT09LiRLeoX9gONz cnAW0yHnSOTSt8HQY5y8dP17hMXrbTmypFg+XGruRGNNZ+KvUerSXW5mnG5lHK8Q5ztQ Fsq5dk6ojPmz5qB7ElNiMSbu6Zrp0hBr3cVybPi69GmcDV29M3A0uixDAO0d03ri1Toy nx6DlLj3TFfbVsCEskgVg8agy7JKqnESHfAHfBa/iq/KX1n3A1SZUDZY1sU7TzLBFqUZ pW/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-88129-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88129-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j13-20020a170906474d00b00a443aba25b4si1287687ejs.632.2024.03.01.00.58.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 00:58:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88129-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-88129-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88129-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CF1551F21CD1 for ; Fri, 1 Mar 2024 08:58:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82B626A035; Fri, 1 Mar 2024 08:58:29 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75DF36A026 for ; Fri, 1 Mar 2024 08:58:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709283509; cv=none; b=J3koSZYdSe0CNtNd3j8nSW623OttTx3FgH+T85rI5nti6FJJ/sz8NG3cz+BEmBuGUMmTXJcm/ZjhgWoqkiRAteRZjmnvYShaa4FtUxuO1BpI54pLlUe83mxEnGmJfTKsfxpLS1cTXs7sNCLeqt6GhIHOfT6k/fnnaCpoKk0pows= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709283509; c=relaxed/simple; bh=Y2ooKxwu0DvEAlAO3yUTV8/LjvCmLJjEEzzi6omP6EE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rbuzXiGAESp0MLhqcFt7RpVJq3GplcRaQ0V5ZDtvVgW9nIbCEzgKVoFpAH7VhYmeSPWNjzvXzL1CyO4dnB7LMCV7UVVcAgvjlfUfoer9th1lxie8Cz/ibLrnpbHgq+Zwl+dy6VbDvz7UcHyJkFDTvxQja8H29J2RiuISxiMFbro= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rfyif-0003jY-UI; Fri, 01 Mar 2024 09:58:17 +0100 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rfyie-003kKQ-Tg; Fri, 01 Mar 2024 09:58:16 +0100 Received: from mfe by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rfyie-00F28a-2f; Fri, 01 Mar 2024 09:58:16 +0100 Date: Fri, 1 Mar 2024 09:58:16 +0100 From: Marco Felsch To: Adam Ford Cc: linux-arm-kernel@lists.infradead.org, Rob Herring , Conor Dooley , Fabio Estevam , Pengutronix Kernel Team , devicetree@vger.kernel.org, Sascha Hauer , aford@beaconembedded.com, linux-kernel@vger.kernel.org, imx@lists.linux.dev, Krzysztof Kozlowski , Shawn Guo Subject: Re: [PATCH 2/2] arm64: dts: imx8mp-beacon: Enable LVDS-1 Message-ID: <20240301085816.bam4ph43w7tikhea@pengutronix.de> References: <20240229233556.116944-1-aford173@gmail.com> <20240229233556.116944-2-aford173@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240229233556.116944-2-aford173@gmail.com> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Hi Adam, On 24-02-29, Adam Ford wrote: > Beacon has an LVDS display that can connect to one of the > LVDS ports on the baseboard. The display requires a 30MHz > clock to display properly, and the LDB needs to run at 7x that. > With the audio CODEC now moved to the AUDIO_PLL1, the AUDIO_PLL2 > is now available to source the LDB at 210MHz and the DISP_PIX2. > > Signed-off-by: Adam Ford > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts > index 1f827ef38e36..731ee2667060 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mp-beacon-kit.dts > @@ -19,6 +19,26 @@ aliases { > ethernet1 = &fec; > }; > > + backlight: backlight { > + compatible = "pwm-backlight"; > + pwms = <&pwm2 0 100000 0>; > + power-supply = <®_lcd1_reset>; > + status = "okay"; status is not required here. > + > + brightness-levels = < 0 1 2 3 4 5 6 7 8 9 > + 10 11 12 13 14 15 16 17 18 19 > + 20 21 22 23 24 25 26 27 28 29 > + 30 31 32 33 34 35 36 37 38 39 > + 40 41 42 43 44 45 46 47 48 49 > + 50 51 52 53 54 55 56 57 58 59 > + 60 61 62 63 64 65 66 67 68 69 > + 70 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 > + 100>; Are you aware of: 'num-interpolated-steps' to avoid such arrays? > + default-brightness-level = <80>; > + }; > + > chosen { > stdout-path = &uart2; > }; > @@ -135,6 +155,38 @@ led-3 { > }; > }; > > + lvds-1 { > + compatible = "panel-lvds"; > + power-supply = <®_lcd1>; > + width-mm = <223>; > + height-mm = <125>; > + backlight = <&backlight>; > + data-mapping = "vesa-24"; > + > + panel-timing { > + /* 800x480@60Hz */ > + clock-frequency = <30000000>; > + hactive = <800>; > + vactive = <480>; > + hsync-len = <48>; > + hfront-porch = <40>; > + hback-porch = <40>; > + vfront-porch = <13>; > + vback-porch = <29>; > + vsync-len = <1>; > + hsync-active = <1>; > + vsync-active = <3>; > + de-active = <1>; > + pixelclk-active = <0>; > + }; I would like to have a proper panel-simple.c entry but that's just my POV of adding panels. > + > + port { > + panel1_in: endpoint { > + remote-endpoint = <&ldb_lvds_ch1>; > + }; > + }; > + }; > + > reg_audio: regulator-wm8962 { > compatible = "regulator-fixed"; > regulator-name = "3v3_aud"; > @@ -144,6 +196,25 @@ reg_audio: regulator-wm8962 { > enable-active-high; > }; > > + reg_lcd1_reset: regulator-lcd1-reset { > + compatible = "regulator-fixed"; > + regulator-name = "LVDS-1 reset"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpio = <&pca6416_3 13 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + vin-supply = <®_lcd1>; > + }; This reset "regulator" seems more like a workaround, why don't you use the reset-gpios property from "panel-lvds"? Regards, Marco > + > + reg_lcd1: regulator-lcd1 { > + compatible = "regulator-fixed"; > + regulator-name = "lvds-1 power"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpio = <&pca6416_3 14 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > + > reg_usdhc2_vmmc: regulator-usdhc2 { > compatible = "regulator-fixed"; > regulator-name = "VSD_3V3"; > @@ -457,6 +528,38 @@ &lcdif1 { > status = "okay"; > }; > > +&lcdif2 { > + status = "okay"; > +}; > + > +&lvds_bridge { > + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_LDB>, <&clk IMX8MP_AUDIO_PLL2_OUT>; > + assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL2_OUT>; > + assigned-clock-rates = <210000000>, <210000000>; > + status = "okay"; > + > + ports { > + port@2 { > + ldb_lvds_ch1: endpoint { > + remote-endpoint = <&panel1_in>; > + }; > + }; > + }; > +}; > + > +&media_blk_ctrl { > + assigned-clocks = <&clk IMX8MP_CLK_MEDIA_AXI>, > + <&clk IMX8MP_CLK_MEDIA_APB>, > + <&clk IMX8MP_CLK_MEDIA_DISP1_PIX>, > + <&clk IMX8MP_CLK_MEDIA_DISP2_PIX>, > + <&clk IMX8MP_VIDEO_PLL1>; > + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>, > + <&clk IMX8MP_SYS_PLL1_800M>, > + <&clk IMX8MP_VIDEO_PLL1_OUT>, > + <&clk IMX8MP_AUDIO_PLL2_OUT>; > + assigned-clock-rates = <500000000>, <200000000>, <0>, <0>, <1039500000>; > +}; > + > &micfil { > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_pdm>; > @@ -496,6 +599,12 @@ &pcie_phy { > status = "okay"; > }; > > +&pwm2 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pwm2>; > +}; > + > &sai3 { > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_sai3>; > @@ -596,6 +705,13 @@ &usdhc2 { > }; > > &iomuxc { > + > + pinctrl_pwm2: pwm2grp { > + fsl,pins = < > + MX8MP_IOMUXC_GPIO1_IO09__PWM2_OUT 0x116 > + >; > + }; > + > pinctrl_ecspi2: ecspi2grp { > fsl,pins = < > MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x82 > -- > 2.43.0 > > >