Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1266971ybt; Thu, 2 Jul 2020 00:49:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN71y6DD3c7HUeNt30G62dCZMtxMZUQcI5cKcRDrSdkX/7VqmD+l4/SopZehudU0WboOCk X-Received: by 2002:a17:906:a01:: with SMTP id w1mr26938840ejf.197.1593676155460; Thu, 02 Jul 2020 00:49:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593676155; cv=none; d=google.com; s=arc-20160816; b=bnoncda+tZqxl+p9Whbrx+AQ2QJLOgV7nIQsbH9/Q+g19dctljjkfPLpfkHY+OtLs/ NXxHVvgT7ERiJs8SDUZoXnGXThjYJ3qv1SiNHYWgP3xBPgX4El0fI/Tj8fwRcBD2nW2Z cchUmUtWbn3RCP7OuvHTl0/lW2Jqa7CQqZh3zm1B5WHlmUeUNHu2ggNnuTtaAtBNCxtg pEfVhIYKFRjohIiiWOQq2tlbV+mI6DN4Bw+R7VhmwFitZhJ1IR6g+GgGSfD3mz+J/D/b esxp5ICPCGE1gP9XGM5Oh6X+kg78Hgdl6FpH4UDyX3RBBQG0hdcaK2XrHBcAlavyQWCj 4v6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=XD7giw22ZmO7+jioYevux6e4A4VypAB+8F9PcAxqDzg=; b=hZquhnX3SfI/Ke04/9L/1Pu+B/lxb53KxLkzAtn86Fus2VU/TVJq7XMaJaFaQD2GFw VCvJe8Le2qp4NOg9RvHAcY9sBZDFA0kAPHDAzViYoGAnZdSCfftFB7aM8LXVAY4PnC7X 0KYWwUDvZ3pUf5IgCu6a4IRTlLcQNXcAKesCUCY+nHjylmECeh9SsTb7mesdSfAJ3WzD /CpveszwKrJ8KckroCbMtcfb1ZhlR3iua5h3ZxNhvsLhrEonMFWl+rRwNuEolxBTg6W3 ewOxAGp4IdcyGHYgz9Daxb5+tde1/XhRy90fbktXIfdQwvMj5Xs4C0qD0/QQ4wacihLu Wq0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=onCcasIj; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=uHSAlAsA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 3si5641765ejz.337.2020.07.02.00.48.52; Thu, 02 Jul 2020 00:49:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=onCcasIj; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=uHSAlAsA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727094AbgGBHqk (ORCPT + 99 others); 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--