Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp813424ybg; Thu, 19 Mar 2020 09:12:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vucwVw3UQmIZfwn7Kntv4Mv3L6ZcR5fCReTkXMmEh0kgHr9V/FWKwmE1lPfet8lRkSk99lk X-Received: by 2002:aca:c488:: with SMTP id u130mr3023359oif.154.1584634320739; Thu, 19 Mar 2020 09:12:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584634320; cv=none; d=google.com; s=arc-20160816; b=f8lMqDbyvktFIELLqnOu47gUIKFbltkxVRW5Hp9HHSlxEjkWcWJjMBcsXxnZow4Z/z kEAaeD01+5U5kb/l4cKQ5HNKQwXCgw8PEtn5Q7Kbg2IquuEhwQeScUwU/P7c7uwom/cv Xz4YrU5p4Ih2a+5oVXLxAnWuuyVY/sFkzSamORMtc2YKUef4ZaCUAL6vyHnV64BsOonb rb0hE29J5SDeDu7GGJSNyX689r8zI4C74lGVvtXEVf6ITS8mR+7cEyu67Pqxot3oXKd6 YWwwuOmRjcm3RWyJ9Gp1EE7rjLv103rYmDcwM0o4kRrVg0GBKlh4g/ODj1V4c3c5OTfE qHZg== 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-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=Pmda60PDxsd5dj7yVs681zqhBLSaiX6WMOvOdfTnCDY=; b=JGFV59qDUrwTUAMT7JMqonfMJawYmCCmz5p3B/UPmlJkqbtSFgeDDM1wtde4+6+NmF frSIwfSijWz/etzlQ4hsvKMNW0z9Jxye8fvunbmucfzRmVyKi53wvXF9fcne92u3aYRz DZtvXZNV/ku7t0bep3T3RnCBAZWe+NnXmMSGGXwnxX+4scwGEJV03yFJfRaqVohKrvQA u4RdEvi0tGYr/s7FGO0kVd1xED8hgRmad2E4LiwvnfN+5Ryr7CiTyYizugRW7E8GLIIt VPHBqTeQk85ahl9idMdLGh4RScNSaXVwn60b3EB4xT6QOqmj7eaGEcCJLvElQ0Om49DP Hkhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=m00v60jz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f63si1206254oib.85.2020.03.19.09.11.18; Thu, 19 Mar 2020 09:12:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=m00v60jz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727949AbgCSQKF (ORCPT + 99 others); Thu, 19 Mar 2020 12:10:05 -0400 Received: from vps.xff.cz ([195.181.215.36]:59430 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727064AbgCSQKE (ORCPT ); Thu, 19 Mar 2020 12:10:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1584634202; bh=JE6As6CIZS8cuj7+7+rzHQMv4MweXNHp5Nj8F2f/1sA=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=m00v60jzWPKSy4jXWtAUn2BxQ5ECTDL76y74ZABR/+zsxyxNzOa9abxC1yecgnHjx KyWqFQ4mWOj4PlpaJGOWIf7n5O1LgS0Mx1dDT4j3JRi//FLpLhUvc7wcVlo8MsbAN0 kGfArbhAbc0qZa9JaF5PXOh0PrQ1KuPwEaZS+Odk= Date: Thu, 19 Mar 2020 17:10:02 +0100 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Icenowy Zheng Cc: Thierry Reding , Sam Ravnborg , Rob Herring , Maxime Ripard , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com Subject: Re: [linux-sunxi] [PATCH v2 5/5] arm64: allwinner: dts: a64: add LCD-related device nodes for PinePhone Message-ID: <20200319161002.kmivhr3ouhoyn4bt@core.my.home> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Icenowy Zheng , Thierry Reding , Sam Ravnborg , Rob Herring , Maxime Ripard , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com References: <20200316133503.144650-1-icenowy@aosc.io> <20200316133503.144650-6-icenowy@aosc.io> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 19, 2020 at 10:51:36PM +0800, Icenowy Zheng wrote: > 在 2020-03-16星期一的 21:35 +0800,Icenowy Zheng写道: > > PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for > > display. > > > > Add its device nodes. > > > > Signed-off-by: Icenowy Zheng > > --- > > No changes in v2. > > > > .../dts/allwinner/sun50i-a64-pinephone.dtsi | 37 > > +++++++++++++++++++ > > 1 file changed, 37 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > > b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > > index cefda145c3c9..96d9150423e0 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi > > @@ -16,6 +16,15 @@ aliases { > > serial0 = &uart0; > > }; > > > > + backlight: backlight { > > + compatible = "pwm-backlight"; > > + pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; > > + brightness-levels = <0 16 18 20 22 24 26 29 32 35 38 42 > > 46 51 56 62 68 75 83 91 100>; > > Should I drop the 0 here and replace it with 14? Almost all boards in arm/boot/dts start at 0. > I have heard community complaining about setting 0 to brightness make > the screen black. Level 0 (first value in the list) is special, and turns off the backlight: 123 if (brightness > 0) { 124 pwm_get_state(pb->pwm, &state); 125 state.duty_cycle = compute_duty_cycle(pb, brightness); 126 pwm_apply_state(pb->pwm, &state); 127 pwm_backlight_power_on(pb); 128 } else { 129 pwm_backlight_power_off(pb); 130 } o. > (I think in this situation bl_power or blank the DSI panel can still > totally shut down the backlight). > > > + default-brightness-level = <15>; > > + enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */ > > + power-supply = <®_ldo_io0>; > > + }; > > + > > chosen { > > stdout-path = "serial0:115200n8"; > > }; > > @@ -84,6 +93,30 @@ &dai { > > status = "okay"; > > }; > > > > +&de { > > + status = "okay"; > > +}; > > + > > +&dphy { > > + status = "okay"; > > +}; > > + > > +&dsi { > > + vcc-dsi-supply = <®_dldo1>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + status = "okay"; > > + > > + panel@0 { > > + compatible = "xingbangda,xbd599"; > > + reg = <0>; > > + reset-gpios = <&pio 3 23 GPIO_ACTIVE_LOW>; /* PD23 */ > > + iovcc-supply = <®_dldo2>; > > + vcc-supply = <®_ldo_io0>; > > + backlight = <&backlight>; > > + }; > > +}; > > + > > &ehci0 { > > status = "okay"; > > }; > > @@ -188,6 +221,10 @@ &r_pio { > > */ > > }; > > > > +&r_pwm { > > + status = "okay"; > > +}; > > + > > &r_rsb { > > status = "okay"; > > > > -- > > 2.24.1 > > >