From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DD74C433E1 for ; Thu, 2 Jul 2020 07:46:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C9CE20899 for ; Thu, 2 Jul 2020 07:46:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="onCcasIj"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="uHSAlAsA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727954AbgGBHqk (ORCPT ); Thu, 2 Jul 2020 03:46:40 -0400 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:43447 "EHLO wnew4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbgGBHqj (ORCPT ); Thu, 2 Jul 2020 03:46:39 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id DF820A96; Thu, 2 Jul 2020 03:46:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 02 Jul 2020 03:46:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=XD7giw22ZmO7+jioYevux6e4A4V ypAB+8F9PcAxqDzg=; b=onCcasIjj6hTu3WPuf4sGp6/uBj/24rWctvNGuHHyQP iGIkq5cs6KYY6exKCz3iXR5EdwP6dWkoXl6thsoClOXo4/LeYsT5RJhO0PzS61+a u1stq2r53l/8rRv+uHLF+vrJ7aiDaGLerafnb4EMwxsRzKjk7ZySAs/gSDFV8K4O //HqGET1kB3hDcCkI4venIwe3XjS67w8J/URT5dRoVrA1K/+OMGIilKnBn8FDEHF U4BbTf9XCLWgZf+OK6czrO9sLwZSkAam2l/AG4T5KnMX8H38ooOsDZIyrcYGY+tw ObRp5CD9jFWZuFrFXbv46s7zk4YBjLDS9vVcbb620iw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=XD7giw 22ZmO7+jioYevux6e4A4VypAB+8F9PcAxqDzg=; b=uHSAlAsAhoZYXWd6OnEizh vO+Xr7Xthpivedv8K2ygyrVsmHnBr+3XxwBk2YyKwXlIe5fQ2X/1ky1a0rqHMDEH QMhNhe07CpiOg9iD952KgVdmy+lfI11JNZSSWslE9MbChMlVn4tY2PgAq+N3SyiG M4aL4/7pEBw1+9xEE7ycWkT9ewJCBQn/SHAS3iXbceBZjF3QTzJaM6MV2GPeba/i so1fHRPqUrkggVHamPlfO5CmRKGIQCUkoe2isukDNSRMB8c8y+TuE9sRkq9GPuYD vH5YfOsq4XRwnkHXSpq4pWlF7RD1LgkOBrn4+x6sVMGOEHCv7BDGfL6CmhqSnSuA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtdefgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id D187D3280064; Thu, 2 Jul 2020 03:46:33 -0400 (EDT) Date: Thu, 2 Jul 2020 09:46:31 +0200 From: Maxime Ripard To: Ondrej Jirman Cc: linux-sunxi@googlegroups.com, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Guido =?utf-8?Q?G=C3=BCnther?= , Purism Kernel Team , Rob Herring , Chen-Yu Tsai , Linus Walleij , Icenowy Zheng , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Samuel Holland , Martijn Braam , Luca Weiss , Bhushan Shah Subject: Re: [PATCH v7 12/13] arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone Message-ID: <20200702074631.oj54lreufm3fkhiu@gilmour.lan> References: <20200701162928.1638874-1-megous@megous.com> <20200701162928.1638874-13-megous@megous.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4seei5k7uul7ogtm" Content-Disposition: inline In-Reply-To: <20200701162928.1638874-13-megous@megous.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --4seei5k7uul7ogtm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 01, 2020 at 06:29:27PM +0200, Ondrej Jirman wrote: > From: Icenowy Zheng >=20 > PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for > display. >=20 > Backlight levels curve was optimized by Martijn Braam using a > lux meter. >=20 > Add its device nodes. >=20 > Signed-off-by: Icenowy Zheng > Signed-off-by: Martijn Braam > Signed-off-by: Ondrej Jirman > Acked-by: Linus Walleij > --- > .../allwinner/sun50i-a64-pinephone-1.1.dts | 19 ++++++++++ > .../dts/allwinner/sun50i-a64-pinephone.dtsi | 35 +++++++++++++++++++ > 2 files changed, 54 insertions(+) >=20 > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b= /arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > index 06a775c41664..3e99a87e9ce5 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > @@ -9,3 +9,22 @@ / { > model =3D "Pine64 PinePhone Braveheart (1.1)"; > compatible =3D "pine64,pinephone-1.1", "allwinner,sun50i-a64"; > }; > + > +&backlight { > + power-supply =3D <®_ldo_io0>; > + /* > + * PWM backlight circuit on this PinePhone revision was changed since > + * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight > + * being off is around 20%. Duty cycle for the lowest brightness level > + * also varries quite a bit between individual boards, so the lowest > + * value here was chosen as a safe default. > + */ > + brightness-levels =3D < > + 774 793 814 842 > + 882 935 1003 1088 > + 1192 1316 1462 1633 > + 1830 2054 2309 2596 > + 2916 3271 3664 4096>; > + num-interpolated-steps =3D <50>; > + default-brightness-level =3D <400>; > +}; > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/ar= ch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > index cefda145c3c9..85a7aa5efd32 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > @@ -16,6 +16,13 @@ aliases { > serial0 =3D &uart0; > }; > =20 > + backlight: backlight { > + compatible =3D "pwm-backlight"; > + pwms =3D <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; > + enable-gpios =3D <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ > + /* Backlight configuration differs per PinePhone revision. */ > + }; > + > chosen { > stdout-path =3D "serial0:115200n8"; > }; > @@ -84,6 +91,30 @@ &dai { > status =3D "okay"; > }; > =20 > +&de { > + status =3D "okay"; > +}; > + > +&dphy { > + status =3D "okay"; > +}; > + > +&dsi { > + vcc-dsi-supply =3D <®_dldo1>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + status =3D "okay"; If you're about to send a new version, you can remove #address-cells and #size-cells too, they're already set in the DTSI. Maxime --4seei5k7uul7ogtm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXv2Q1wAKCRDj7w1vZxhR xRU3AP9/RU4o7gJkXULsYLNValRt6TkkGC1AIH6ty1GbeFVv2AD+NJYwDiC9CJxm iWn2yi4SWp4MZG0IKSMy8iATzq2rVgs= =mUin -----END PGP SIGNATURE----- --4seei5k7uul7ogtm-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9EA5C433E0 for ; Thu, 2 Jul 2020 07:48:18 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AADE5212CC for ; Thu, 2 Jul 2020 07:48:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CWaqdkkP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="onCcasIj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="uHSAlAsA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AADE5212CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CIlR54pniQdWKnKnbSaRZdqdAfouwq/duQOvsBL2kUQ=; b=CWaqdkkPx1lXO+47FGplg+n8c CpjLsLF4f+1Y/6R60k6oeE3EacsBTSCRyUdo0N7mbImjGgTikerFRB/rEOG7xO90RM9bs0NxFi40K X6xc1SB4Zr3EgXlVjVtpjZicnyj9Osh8UjIYV9p1HE4wDK002mRvIt5OzvF+1tZjrnFFO2TBoxOMT 8sbjIbFbzjCVQyQLzno8/ppTTVt9C50kx27D9aRP2RkhQoGZj6+8nq9eBR7CEtGieFDyOCmXeuPBB 6tK4PnsXflptPBIZG7X0metbhqy0h9euy4VLIEbA3lUk4eWsRIk/IPZOGshL2v0sK7sdkfegEL3SU iKf7tzeWw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqtvj-0000Oh-Un; Thu, 02 Jul 2020 07:46:47 +0000 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqtvg-0000NA-LZ for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 07:46:46 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id DF820A96; Thu, 2 Jul 2020 03:46:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 02 Jul 2020 03:46:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=XD7giw22ZmO7+jioYevux6e4A4V ypAB+8F9PcAxqDzg=; b=onCcasIjj6hTu3WPuf4sGp6/uBj/24rWctvNGuHHyQP iGIkq5cs6KYY6exKCz3iXR5EdwP6dWkoXl6thsoClOXo4/LeYsT5RJhO0PzS61+a u1stq2r53l/8rRv+uHLF+vrJ7aiDaGLerafnb4EMwxsRzKjk7ZySAs/gSDFV8K4O //HqGET1kB3hDcCkI4venIwe3XjS67w8J/URT5dRoVrA1K/+OMGIilKnBn8FDEHF U4BbTf9XCLWgZf+OK6czrO9sLwZSkAam2l/AG4T5KnMX8H38ooOsDZIyrcYGY+tw ObRp5CD9jFWZuFrFXbv46s7zk4YBjLDS9vVcbb620iw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=XD7giw 22ZmO7+jioYevux6e4A4VypAB+8F9PcAxqDzg=; b=uHSAlAsAhoZYXWd6OnEizh vO+Xr7Xthpivedv8K2ygyrVsmHnBr+3XxwBk2YyKwXlIe5fQ2X/1ky1a0rqHMDEH QMhNhe07CpiOg9iD952KgVdmy+lfI11JNZSSWslE9MbChMlVn4tY2PgAq+N3SyiG M4aL4/7pEBw1+9xEE7ycWkT9ewJCBQn/SHAS3iXbceBZjF3QTzJaM6MV2GPeba/i so1fHRPqUrkggVHamPlfO5CmRKGIQCUkoe2isukDNSRMB8c8y+TuE9sRkq9GPuYD vH5YfOsq4XRwnkHXSpq4pWlF7RD1LgkOBrn4+x6sVMGOEHCv7BDGfL6CmhqSnSuA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtdefgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id D187D3280064; Thu, 2 Jul 2020 03:46:33 -0400 (EDT) Date: Thu, 2 Jul 2020 09:46:31 +0200 From: Maxime Ripard To: Ondrej Jirman Subject: Re: [PATCH v7 12/13] arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone Message-ID: <20200702074631.oj54lreufm3fkhiu@gilmour.lan> References: <20200701162928.1638874-1-megous@megous.com> <20200701162928.1638874-13-megous@megous.com> MIME-Version: 1.0 In-Reply-To: <20200701162928.1638874-13-megous@megous.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_034644_859867_50A58B9A X-CRM114-Status: GOOD ( 17.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Purism Kernel Team , Samuel Holland , David Airlie , Guido =?utf-8?Q?G=C3=BCnther?= , Bhushan Shah , Chen-Yu Tsai , Rob Herring , linux-kernel@vger.kernel.org, Martijn Braam , linux-sunxi@googlegroups.com, Thierry Reding , Luca Weiss , dri-devel@lists.freedesktop.org, Daniel Vetter , Sam Ravnborg , Linus Walleij , linux-arm-kernel@lists.infradead.org, Icenowy Zheng Content-Type: multipart/mixed; boundary="===============4494935030522278872==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4494935030522278872== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4seei5k7uul7ogtm" Content-Disposition: inline --4seei5k7uul7ogtm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 01, 2020 at 06:29:27PM +0200, Ondrej Jirman wrote: > From: Icenowy Zheng >=20 > PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for > display. >=20 > Backlight levels curve was optimized by Martijn Braam using a > lux meter. >=20 > Add its device nodes. >=20 > Signed-off-by: Icenowy Zheng > Signed-off-by: Martijn Braam > Signed-off-by: Ondrej Jirman > Acked-by: Linus Walleij > --- > .../allwinner/sun50i-a64-pinephone-1.1.dts | 19 ++++++++++ > .../dts/allwinner/sun50i-a64-pinephone.dtsi | 35 +++++++++++++++++++ > 2 files changed, 54 insertions(+) >=20 > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b= /arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > index 06a775c41664..3e99a87e9ce5 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > @@ -9,3 +9,22 @@ / { > model =3D "Pine64 PinePhone Braveheart (1.1)"; > compatible =3D "pine64,pinephone-1.1", "allwinner,sun50i-a64"; > }; > + > +&backlight { > + power-supply =3D <®_ldo_io0>; > + /* > + * PWM backlight circuit on this PinePhone revision was changed since > + * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight > + * being off is around 20%. Duty cycle for the lowest brightness level > + * also varries quite a bit between individual boards, so the lowest > + * value here was chosen as a safe default. > + */ > + brightness-levels =3D < > + 774 793 814 842 > + 882 935 1003 1088 > + 1192 1316 1462 1633 > + 1830 2054 2309 2596 > + 2916 3271 3664 4096>; > + num-interpolated-steps =3D <50>; > + default-brightness-level =3D <400>; > +}; > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/ar= ch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > index cefda145c3c9..85a7aa5efd32 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > @@ -16,6 +16,13 @@ aliases { > serial0 =3D &uart0; > }; > =20 > + backlight: backlight { > + compatible =3D "pwm-backlight"; > + pwms =3D <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; > + enable-gpios =3D <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ > + /* Backlight configuration differs per PinePhone revision. */ > + }; > + > chosen { > stdout-path =3D "serial0:115200n8"; > }; > @@ -84,6 +91,30 @@ &dai { > status =3D "okay"; > }; > =20 > +&de { > + status =3D "okay"; > +}; > + > +&dphy { > + status =3D "okay"; > +}; > + > +&dsi { > + vcc-dsi-supply =3D <®_dldo1>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + status =3D "okay"; If you're about to send a new version, you can remove #address-cells and #size-cells too, they're already set in the DTSI. Maxime --4seei5k7uul7ogtm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXv2Q1wAKCRDj7w1vZxhR xRU3AP9/RU4o7gJkXULsYLNValRt6TkkGC1AIH6ty1GbeFVv2AD+NJYwDiC9CJxm iWn2yi4SWp4MZG0IKSMy8iATzq2rVgs= =mUin -----END PGP SIGNATURE----- --4seei5k7uul7ogtm-- --===============4494935030522278872== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4494935030522278872==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBB1FC433E0 for ; Fri, 3 Jul 2020 08:12:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B32D9206A1 for ; Fri, 3 Jul 2020 08:12:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="onCcasIj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="uHSAlAsA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B32D9206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 95F2E6EB39; Fri, 3 Jul 2020 08:12:03 +0000 (UTC) Received: from wnew4-smtp.messagingengine.com (wnew4-smtp.messagingengine.com [64.147.123.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id A81C26EA64 for ; Thu, 2 Jul 2020 07:46:43 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id DF820A96; Thu, 2 Jul 2020 03:46:36 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 02 Jul 2020 03:46:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=XD7giw22ZmO7+jioYevux6e4A4V ypAB+8F9PcAxqDzg=; b=onCcasIjj6hTu3WPuf4sGp6/uBj/24rWctvNGuHHyQP iGIkq5cs6KYY6exKCz3iXR5EdwP6dWkoXl6thsoClOXo4/LeYsT5RJhO0PzS61+a u1stq2r53l/8rRv+uHLF+vrJ7aiDaGLerafnb4EMwxsRzKjk7ZySAs/gSDFV8K4O //HqGET1kB3hDcCkI4venIwe3XjS67w8J/URT5dRoVrA1K/+OMGIilKnBn8FDEHF U4BbTf9XCLWgZf+OK6czrO9sLwZSkAam2l/AG4T5KnMX8H38ooOsDZIyrcYGY+tw ObRp5CD9jFWZuFrFXbv46s7zk4YBjLDS9vVcbb620iw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=XD7giw 22ZmO7+jioYevux6e4A4VypAB+8F9PcAxqDzg=; b=uHSAlAsAhoZYXWd6OnEizh vO+Xr7Xthpivedv8K2ygyrVsmHnBr+3XxwBk2YyKwXlIe5fQ2X/1ky1a0rqHMDEH QMhNhe07CpiOg9iD952KgVdmy+lfI11JNZSSWslE9MbChMlVn4tY2PgAq+N3SyiG M4aL4/7pEBw1+9xEE7ycWkT9ewJCBQn/SHAS3iXbceBZjF3QTzJaM6MV2GPeba/i so1fHRPqUrkggVHamPlfO5CmRKGIQCUkoe2isukDNSRMB8c8y+TuE9sRkq9GPuYD vH5YfOsq4XRwnkHXSpq4pWlF7RD1LgkOBrn4+x6sVMGOEHCv7BDGfL6CmhqSnSuA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrtdefgdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id D187D3280064; Thu, 2 Jul 2020 03:46:33 -0400 (EDT) Date: Thu, 2 Jul 2020 09:46:31 +0200 From: Maxime Ripard To: Ondrej Jirman Subject: Re: [PATCH v7 12/13] arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone Message-ID: <20200702074631.oj54lreufm3fkhiu@gilmour.lan> References: <20200701162928.1638874-1-megous@megous.com> <20200701162928.1638874-13-megous@megous.com> MIME-Version: 1.0 In-Reply-To: <20200701162928.1638874-13-megous@megous.com> X-Mailman-Approved-At: Fri, 03 Jul 2020 08:12:01 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Purism Kernel Team , Samuel Holland , David Airlie , Guido =?utf-8?Q?G=C3=BCnther?= , Bhushan Shah , Chen-Yu Tsai , Rob Herring , linux-kernel@vger.kernel.org, Martijn Braam , linux-sunxi@googlegroups.com, Thierry Reding , Luca Weiss , dri-devel@lists.freedesktop.org, Sam Ravnborg , linux-arm-kernel@lists.infradead.org, Icenowy Zheng Content-Type: multipart/mixed; boundary="===============1980191963==" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --===============1980191963== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4seei5k7uul7ogtm" Content-Disposition: inline --4seei5k7uul7ogtm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 01, 2020 at 06:29:27PM +0200, Ondrej Jirman wrote: > From: Icenowy Zheng >=20 > PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for > display. >=20 > Backlight levels curve was optimized by Martijn Braam using a > lux meter. >=20 > Add its device nodes. >=20 > Signed-off-by: Icenowy Zheng > Signed-off-by: Martijn Braam > Signed-off-by: Ondrej Jirman > Acked-by: Linus Walleij > --- > .../allwinner/sun50i-a64-pinephone-1.1.dts | 19 ++++++++++ > .../dts/allwinner/sun50i-a64-pinephone.dtsi | 35 +++++++++++++++++++ > 2 files changed, 54 insertions(+) >=20 > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b= /arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > index 06a775c41664..3e99a87e9ce5 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts > @@ -9,3 +9,22 @@ / { > model =3D "Pine64 PinePhone Braveheart (1.1)"; > compatible =3D "pine64,pinephone-1.1", "allwinner,sun50i-a64"; > }; > + > +&backlight { > + power-supply =3D <®_ldo_io0>; > + /* > + * PWM backlight circuit on this PinePhone revision was changed since > + * 1.0, and the lowest PWM duty cycle that doesn't lead to backlight > + * being off is around 20%. Duty cycle for the lowest brightness level > + * also varries quite a bit between individual boards, so the lowest > + * value here was chosen as a safe default. > + */ > + brightness-levels =3D < > + 774 793 814 842 > + 882 935 1003 1088 > + 1192 1316 1462 1633 > + 1830 2054 2309 2596 > + 2916 3271 3664 4096>; > + num-interpolated-steps =3D <50>; > + default-brightness-level =3D <400>; > +}; > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/ar= ch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > index cefda145c3c9..85a7aa5efd32 100644 > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > @@ -16,6 +16,13 @@ aliases { > serial0 =3D &uart0; > }; > =20 > + backlight: backlight { > + compatible =3D "pwm-backlight"; > + pwms =3D <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; > + enable-gpios =3D <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ > + /* Backlight configuration differs per PinePhone revision. */ > + }; > + > chosen { > stdout-path =3D "serial0:115200n8"; > }; > @@ -84,6 +91,30 @@ &dai { > status =3D "okay"; > }; > =20 > +&de { > + status =3D "okay"; > +}; > + > +&dphy { > + status =3D "okay"; > +}; > + > +&dsi { > + vcc-dsi-supply =3D <®_dldo1>; > + #address-cells =3D <1>; > + #size-cells =3D <0>; > + status =3D "okay"; If you're about to send a new version, you can remove #address-cells and #size-cells too, they're already set in the DTSI. Maxime --4seei5k7uul7ogtm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXv2Q1wAKCRDj7w1vZxhR xRU3AP9/RU4o7gJkXULsYLNValRt6TkkGC1AIH6ty1GbeFVv2AD+NJYwDiC9CJxm iWn2yi4SWp4MZG0IKSMy8iATzq2rVgs= =mUin -----END PGP SIGNATURE----- --4seei5k7uul7ogtm-- --===============1980191963== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1980191963==--