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=-13.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 30AFBC33CA9 for ; Mon, 13 Jan 2020 18:18:15 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id DED51207E0 for ; Mon, 13 Jan 2020 18:18:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nF9craMj"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="lzbZp2lH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DED51207E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h+/zZgS1kyJ0XkM8l7xRWl7X0odV8kChIx8mR3rwijA=; b=nF9craMjVdqdN1 7Suoi+fk3D+2+ri9jD9H+sZoe6fE3l8NKKQIzhKtCoE0oJ+3kB/JFBKHwZT4xQhtXeXalsdgxuC84 u5vlmEk5L6s/wNawiodGPUGGW3W8bE2iIuCFQc50gUopZY0oH14t4bLuTAv+YJscq1gIttynbSj0C AJ0RternPE8cxlJr1XYW2btcri2RxSEmgnbiGeH8Q0C6iZsTXjUxgTSMLmSd/8VrUjeeYaxQsxxGi E1OZiwJiXdoupGSawlEfC0X+SFHjgFwX5kkHVCDGsosGj2IRIl23PTYz9qpyvgzQA13Rkavm87JE4 wvL5GRDLjaa8J7uKbBAQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ir4I2-0000ty-6u; Mon, 13 Jan 2020 18:18:14 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ir4Hz-0000sn-3H for linux-arm-kernel@lists.infradead.org; Mon, 13 Jan 2020 18:18:12 +0000 Received: by mail-pg1-x543.google.com with SMTP id x8so5076417pgk.8 for ; Mon, 13 Jan 2020 10:18:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=J17YeTOEpSo1FzyDOd+9aTAz8l6C4D4MHcZ+fgWk1Mo=; b=lzbZp2lH/gU4yPLMC6wYwDVhgGCuadvdlO8VX6DZQrbqAzclxITjWEIKq2Cl0jbIcH Pb8rfbp3ZyzD/ei8vViUF082DNsG9iO8XsvKWbhCH0UhNEiqZ0iHet659p8zuGShBJ8J oex8GmqQsyyu5bKGxGtL87Enz1KnBZJyEXUdo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=J17YeTOEpSo1FzyDOd+9aTAz8l6C4D4MHcZ+fgWk1Mo=; b=frIUWF+5omHlP4UzJFfLYXQEDt4ljLJbAvG8XfgpaywkKaIuOaAnDNPYpDBR5/sDwT keHWP7tG4pJndcxk6vN8XFYFI0fqFQ3LfqcZbcH/4NdxerCedG1gqozT29LXZezFmAM7 RHp5Vzr8j2jOJJPS8ylYVLKr1hzYehXQ4jb+RZOf5grPy3BS1iB2VxP3K+qiLsXGKGvQ fwnV6HiWwYBbN8NlWniO1VW99nEqPxmtJkqo2H2ZLL4Co8u+WYCqy9+UfOpNd+UMxyVu vBN4EwscDPkUf9TtVq48HamU1XpG3rbhnBy9hN9rMNX8ofQH4+nlf6M0QmzZZ7B2lpIf 29mw== X-Gm-Message-State: APjAAAXDci2y0JV/Ik3kp8cR7FOUFAgskCv3bBtHWbdt+UMyQJe174P/ HqtFnkjmFzNbQYoB+KGEIgFgbA== X-Google-Smtp-Source: APXvYqyO2vTrtNquO0tteVK8jK7Phzfpow0bBhbfaw7+obCd30pnX73il3H6mcF4Pibd+xR5fcY2gA== X-Received: by 2002:a62:c541:: with SMTP id j62mr21026945pfg.237.1578939490112; Mon, 13 Jan 2020 10:18:10 -0800 (PST) Received: from localhost ([2620:15c:202:1:4fff:7a6b:a335:8fde]) by smtp.gmail.com with ESMTPSA id z22sm15206346pfr.83.2020.01.13.10.18.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jan 2020 10:18:09 -0800 (PST) Date: Mon, 13 Jan 2020 10:18:07 -0800 From: Matthias Kaehlcke To: Enric Balletbo i Serra Subject: Re: [PATCH v2 2/2] arm64: dts: mediatek: add mt8173 elm and hana board Message-ID: <20200113181807.GH89495@google.com> References: <20200110073730.213789-1-hsinyi@chromium.org> <20200110073730.213789-3-hsinyi@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200113_101811_166103_8519BCC1 X-CRM114-Status: GOOD ( 32.11 ) 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: Mark Rutland , devicetree@vger.kernel.org, Nicolas Boichat , linux-kernel@vger.kernel.org, Daniel Kurtz , Doug Anderson , Rob Herring , linux-mediatek@lists.infradead.org, Hsin-Yi Wang , Matthias Brugger , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Mon, Jan 13, 2020 at 10:29:51AM +0100, Enric Balletbo i Serra wrote: > Hi Hsin-Yi, > > Apart from the maintainer comments, a few more comments ... > > cc'ing Matthias and Doug who I know played a bit with the pwm-backlight for the > uprev of the veyron devices, and you might be interested in his feedback in general. > > On 10/1/20 8:37, Hsin-Yi Wang wrote: > > Elm is Acer Chromebook R13. Hana is Lenovo Chromebook. Both uses mt8173 > > SoC. > > > > Signed-off-by: Hsin-Yi Wang > > --- > > Changes in v2: > > - remove downstream nodes and unused nodes > > - use GPIO_ACTIVE_LOW for ps8640 gpios > > - move trackpad to hana > > --- > > arch/arm64/boot/dts/mediatek/Makefile | 3 + > > .../dts/mediatek/mt8173-elm-hana-rev7.dts | 27 + > > .../boot/dts/mediatek/mt8173-elm-hana.dts | 16 + > > .../boot/dts/mediatek/mt8173-elm-hana.dtsi | 60 + > > arch/arm64/boot/dts/mediatek/mt8173-elm.dts | 15 + > > arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 1040 +++++++++++++++++ > > 6 files changed, 1161 insertions(+) > > create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm-hana-rev7.dts > > create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dts > > create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi > > create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm.dts > > create mode 100644 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi > > diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi > > new file mode 100644 > > index 000000000000..2ac738bebe04 > > --- /dev/null > > +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi > > @@ -0,0 +1,1040 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +/* > > + * Copyright 2016 MediaTek Inc. > > + */ > > + > > +#include > > +#include > > +#include "mt8173.dtsi" > > + > > +/ { > > + aliases { > > + serial0 = &uart0; > > + serial1 = &uart1; > > + serial2 = &uart2; > > + serial3 = &uart3; > > + }; > > I think this should be in mt8173.dtsi? > > > + > > + memory@40000000 { > > + device_type = "memory"; > > + reg = <0 0x40000000 0 0x80000000>; > > + }; > > + > > + backlight_lcd: backlight_lcd { > > nit: Not sure if you need to change or not, but this node is usually called > backlight: backlight without the _lcd. Note that this imply a userspace change > but /sys/class/backlight/backlight is more aligned with other boards (I guess) > when you have only one backlight. See for example: > > git grep backlight arch/arm64/boot/* > > > + compatible = "pwm-backlight"; > > + pwms = <&pwm0 0 1000000>; > > + brightness-levels = < > > + 0 16 32 48 64 80 96 112 > > + 128 144 160 176 192 208 224 240 > > + 255 > > + >; > > + default-brightness-level = <9>; > > The reason you see the display too dark is because userspace sets and remembers > the default value you have using the above configuration which is only 16 > levels. So after removing the two above properties you should set a new > brightness from userspace. > > AFAIK 16 levels is not enough to have fancy backlight effects on Chrome OS > userspace, at least is not enough for Rockchip devices so I suppose is the same > for Mediatek. > > You have to options here. > > A) Remove brightness-levels and default-brightness-level. This will end with a > non-linear brightness curve for the backlight up to 4095 levels. > > # cat max_brightness > 4095 > > B) Use the num-interpolated-steps and default-brightness-level properties. This > will end with a linear curve brightness. Similar to what is done for veyron > devices but in this case with more levels because the PWM to control the > backlight is 16-bits instead of 8-bits for veyron devices. > > * > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/rk3288-veyron-edp.dtsi#n42 > > My guess is that you're interested on option B here to be coherent with other > Chromebooks. You could evaluate either way. One of the reasons to chose the interpolated-steps for veyron was that some veyron panels require a minimum backlight level to work properly. This can be easily configured with the linear curve, but currently not with the non-linear one. Another reason was to keep the backlight curve of a released device unaltered, though I think that's not strictly required as long as the behavior with the non-linear curve is close/good enough. Chrome OS user space supports both types of curves, for a new device I would probably start with a non-linear curve, and only change that if the resulting behavior doesn't meet expectations for some reason. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel