Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp106860iof; Sun, 5 Jun 2022 22:35:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBREA6Y9gm1maKDuBoXR47OeWdznX5RGBGsg1ZuM84bftVZXh9jbR6ZA8k/7S9TFp83zlo X-Received: by 2002:a17:903:2287:b0:164:95f:b4d6 with SMTP id b7-20020a170903228700b00164095fb4d6mr22381550plh.140.1654493724006; Sun, 05 Jun 2022 22:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654493724; cv=none; d=google.com; s=arc-20160816; b=h2qM2xHQNlOkVbZ/USZusk7bxkv7YrGsJze9OxdFhbWFBJ4ijrARWWI1veUL/7rMOY SZnnHKLCgzAdzYn3KxqDZISmR0rCtjdFPLgiQF16V3QmLA0ltk74Qtz5nmeJ5m6hJcKO NGJP8RkCyfd82G4Nbud/ih+t/dE1vL4X/xotzEzhcW+tf0WN6ole5kIcjB1rXVIVkRQI bG9g81FMquMmNX7ZgP4z1+NMTpp4LuP3fMQVzkxtJ49dsRjtrvnkPRh515F01qKe3/Ip 29ok79BSXR2s5H36oDErJ4XBmPW5LtmHkU5b7d2vGj2jXOC2orbVbAfMrkEAmUDQO4N8 iEvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2aAzgWufLM3eFBRQ9m2A+4XEm2/EjgHO8XjvIlt8qsc=; b=kQ1Ga4mhqmk6oO7EKdyaqE+rjV3TDhj70TBtePGlNybophuuUY2JDW9j3iAYOT9Pxe 9BLD+dyx9F+ZmRJk+0X2HGQ0B6bU4HdfEFM3agMDHMe9Ds6Vhd7zwYgjqZ4Bguy1YqKG sHVx6lLwV2N4b+LBVy1xnSy/KdySmyGJgWhu043gn/yq7W6DxljLrsinZ6mU2Ka9j4QM YjiXyH1vn5kVscPgUZvnYvyDWzJgoPZgka8uCl0rr8xZgt9bPy529pVN988RWhqAqroR wxYobhCasKmOeJ6+kXJWrvDV+JZxv1UB2wD/FFe/mSAb0Po7WGU11rXCbGtegTUYDZR4 0Yuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Icn4irk9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m18-20020a170902db1200b0016749b24ad4si15066301plx.172.2022.06.05.22.35.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:35:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Icn4irk9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A1B34233EAC; Sun, 5 Jun 2022 21:36:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351998AbiFFBji (ORCPT + 99 others); Sun, 5 Jun 2022 21:39:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351993AbiFFBj3 (ORCPT ); Sun, 5 Jun 2022 21:39:29 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EECB04EDD3; Sun, 5 Jun 2022 18:39:27 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id q1so14261485ljb.5; Sun, 05 Jun 2022 18:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2aAzgWufLM3eFBRQ9m2A+4XEm2/EjgHO8XjvIlt8qsc=; b=Icn4irk9qnC0CRZA12hvjLPiNe929gRNEg4ZfZV0T3RYBehB9uqQtL9hviXbnYeMv2 bPOGPBWkInazcMgEV6wlUWAWy4LSCAmIviwlw4PqqQoU1GClhQ+gTrya2W+LXGW27HEI YTBJghZmXIacPXwHbAz2rLV6GEdEzbddpeFWiv5x8CHz0zoKy99fxoUgELLe3DGexses 5LgMUJl0NxVpiM5Ez4NxsHgGhlLB+23vcIQlNp/NfcZ79MKpf4bLNTppNG2jATt0VSfc LY9vQsx92hbFfZqPtzMGD9LKgeqzTKmWr7UkOiBTX5xPNFaUc0caWkM8N94mo7q/5kjt wuHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2aAzgWufLM3eFBRQ9m2A+4XEm2/EjgHO8XjvIlt8qsc=; b=qk5EA1mPyMBAiVwI31e0WMEWOtSdD2YLNat/olzs/OPmS+5Aw1lAXR3IFS/fdLk96r ZZCccozFH8i8USaHEvWGdJgnWySmI6EHSO3onyWdJWj3+qbDwJ0GV1ni/wy2WsF1PjsC up/6mfR4aCm6SxtJ8sM2gBF0qQ+rSoWpIUQxzdBla3aQ/lYDsIRtBfXD/rwXubeW+f6w XqvVTu2uUrtqSaj6knm7YikMICdZlxktSUnhwFW24EVDYo0K7LySvtNo/R9YwHsXU8zO F+sUYw8sRv5MZ5FsiMU3MTT/Q4hoxel5Mt3n26JYp2P8M2ATherh0wBkCZF4SEv4eQ1c 3TPA== X-Gm-Message-State: AOAM530tJO+N/QFtVAaGpxZzJAnAmJYstvw+RNsSakLXfLhGp1xfe/Ub StsJQEuRI3NNjlLKNoqMzkb78fOh8XJBhZ/dEr8= X-Received: by 2002:a2e:904a:0:b0:255:7b02:8f32 with SMTP id n10-20020a2e904a000000b002557b028f32mr9325452ljg.133.1654479565373; Sun, 05 Jun 2022 18:39:25 -0700 (PDT) MIME-Version: 1.0 References: <1653534995-30794-1-git-send-email-u0084500@gmail.com> <1653534995-30794-2-git-send-email-u0084500@gmail.com> <1c7ab94c-a736-c629-bd8c-8a974803e2b9@linaro.org> <076d53d3-6062-686f-8e45-14c5f936bbf6@linaro.org> <20220602135604.GA2194286-robh@kernel.org> <12096a2c-98c3-9e77-785f-808cc3e1a0e4@linaro.org> In-Reply-To: <12096a2c-98c3-9e77-785f-808cc3e1a0e4@linaro.org> From: ChiYuan Huang Date: Mon, 6 Jun 2022 09:39:15 +0800 Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: backlight: rt4831: Add the new property for ocp level selection To: Krzysztof Kozlowski Cc: Rob Herring , Krzysztof Kozlowski , Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Helge Deller , cy_huang , lucas_tsai@richtek.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , dri-devel , "open list:FRAMEBUFFER LAYER" , Linux LED Subsystem , lkml Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Krzysztof Kozlowski =E6=96=BC 2022=E5=B9= =B46=E6=9C=886=E6=97=A5 =E9=80=B1=E4=B8=80 =E4=B8=8A=E5=8D=8812:11=E5=AF=AB= =E9=81=93=EF=BC=9A > > On 02/06/2022 17:31, ChiYuan Huang wrote: > > Krzysztof Kozlowski =E6=96=BC 2022=E5= =B9=B46=E6=9C=882=E6=97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8B=E5=8D=889:58=E5=AF= =AB=E9=81=93=EF=BC=9A > >> > >> On 02/06/2022 15:56, Rob Herring wrote: > >>> On Thu, May 26, 2022 at 12:32:12PM +0200, Krzysztof Kozlowski wrote: > >>>> On 26/05/2022 10:13, ChiYuan Huang wrote: > >>>>> Krzysztof Kozlowski =E6=96=BC 2022= =E5=B9=B45=E6=9C=8826=E6=97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8B=E5=8D=884:06=E5= =AF=AB=E9=81=93=EF=BC=9A > >>>>>> > >>>>>> On 26/05/2022 05:16, cy_huang wrote: > >>>>>>> From: ChiYuan Huang > >>>>>>> > >>>>>>> Add the new property for ocp level selection. > >>>>>>> > >>>>>>> Signed-off-by: ChiYuan Huang > >>>>>>> --- > >>>>>>> .../bindings/leds/backlight/richtek,rt4831-backlight.yaml = | 8 ++++++++ > >>>>>>> include/dt-bindings/leds/rt4831-backlight.h = | 5 +++++ > >>>>>>> 2 files changed, 13 insertions(+) > >>>>>>> > >>>>>>> diff --git a/Documentation/devicetree/bindings/leds/backlight/ric= htek,rt4831-backlight.yaml b/Documentation/devicetree/bindings/leds/backlig= ht/richtek,rt4831-backlight.yaml > >>>>>>> index e0ac686..c1c59de 100644 > >>>>>>> --- a/Documentation/devicetree/bindings/leds/backlight/richtek,rt= 4831-backlight.yaml > >>>>>>> +++ b/Documentation/devicetree/bindings/leds/backlight/richtek,rt= 4831-backlight.yaml > >>>>>>> @@ -47,6 +47,14 @@ properties: > >>>>>>> minimum: 0 > >>>>>>> maximum: 3 > >>>>>>> > >>>>>>> + richtek,bled-ocp-sel: > >>>>>> > >>>>>> Skip "sel" as it is a shortcut of selection. Name instead: > >>>>>> "richtek,backlight-ocp" > >>>>>> > >>>>> OK, if so, do I need to rename all properties from 'bled' to 'backl= ight' ? > >>>>> If only this property is naming as 'backlight'. it may conflict wi= th > >>>>> the others like as "richtek,bled-ovp-sel". > >>>> > >>>> Ah, no, no need. > >>>> > >>>>>> > >>>>>>> + description: | > >>>>>>> + Backlight OCP level selection, currently support 0.9A/1.2A= /1.5A/1.8A > >>>>>> > >>>>>> Could you explain here what is OCP (unfold the acronym)? > >>>>> Yes. And the full name is 'over current protection'. > >>>> > >>>> Thanks and this leads to second thing - you encode register value > >>>> instead of logical value. This must be a logical value in mA, so > >>>> "richtek,bled-ocp-microamp". > >>> > >>> We already have common properties for setting current of LEDs. We sho= uld > >>> use that here I think. > >> > >> It might not be exactly the same. We have "led-max-microamp" which is > >> the maximum allowed current. I guess over-current protection level is > >> slightly higher (e.g. led-max-microamp + 1). IOW, led-max-microamp is > >> something which still can be set and used by system/hardware. OCP shou= ld > >> not. > >> > > Yap, you're right. > > So I am right or Rob? > As I know, both are incorrect. > > From the modern backlight IC design, it uses the boost converter archit= ecture. > > This OCP level is to limit the inductor current when the internal MOS > > switch turn on. > > Details can refer to the below wiki link > > https://en.wikipedia.org/wiki/Boost_converter > > > > And based on it, OVP is used to limit the inductor output voltage. > > Each channel maximum current is based on the IC affordable limit. > > It is more like as what you said 'led-max-microamp'. > > > > So boost voltage level may depend on the LED VF. > > The different series of LED may cause different boost voltage. > > > > RT4831's OVP/OCP is not just the protection, more like as the limit. > > This suggests Rob is right, so let's use led-max-microamp property? > No, the meaning is different. 'led-max-microamp' always means the channel output current. It already can be adjusted by backlight brightness node. For example low voltage side (3.3~4.4V) to generate the boost voltage to 16~17V, even 20V for BLED Vout. This OCP is to limit the input current of low voltage side. After the explanation, do you still think it's the same thing? > Best regards, > Krzysztof