From patchwork Fri Jul 15 11:25:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiaEn Wu X-Patchwork-Id: 591162 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAC29CCA481 for ; Fri, 15 Jul 2022 11:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233723AbiGOL1O (ORCPT ); Fri, 15 Jul 2022 07:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232073AbiGOL06 (ORCPT ); Fri, 15 Jul 2022 07:26:58 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBA9B87F51; Fri, 15 Jul 2022 04:26:52 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id f65so4123190pgc.12; Fri, 15 Jul 2022 04:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1u5oyif5xJc6tf3rWTCcNAXqF09LYJdHLNTlsfB9J08=; b=qF6pWmeF0M4udMy4fnaDKGqlHpvWfnrSleUsZ1R3LvzAA164EL4eUuh21No19uTWwA 4Ncn12fEmplqmDy7Y1eNhwl3wGCNNNm2SdH6vTqBLEJ82FVKIhkbr2dJyuMLjYkk4AzC 3+iqQmtO9Aubo0Xz6rxLxPZ/g10BuYSZdOwPIOykslr7B2bNNhQhS2jvfU7rYgeNxka7 bbYB0AybPKmVCU2ZmVhxLoFB9J/GHwYRsfEeTmk0OpBlC8FAu+4EwMb7iHLyEHxJYcqu pIWkmCmfOIT2Fl0CvVjXYS7kjUcs+GbIFM1wdSRMcPXxDhiIhG6d3PLs0HfXut5ZbjFH KdIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1u5oyif5xJc6tf3rWTCcNAXqF09LYJdHLNTlsfB9J08=; b=Z8jbgJXMfF7leB3JyT4bw68mo5Zq0IgjmCBa/0ZaTnAmrrwurFTAKEel/mwZoiVEMN a0MuNVgZswtFxFjxjFeR7YzypAFKJ8/DsJ/E4DTF64ZD2UeOgysx2pSQOqC1It48c6F+ p592YAgbLIGFpJTsQtka8aJsBsElimsnPal2EGFzEzMJkrp8g2NwKRB+cSwGGDNS6E0w LtjpuFHa7DIQiasSZplhhTnUO7kPNHYWa8aQWhpw5e9H2kI4B3kVflBimkKgjkVeIR5w DCsWG3bNNAvxOSwCnq+sfO8uGnxYKyeBTXKzEN0OL6bFF8YJJdjnlfbqsVb+tvUQSYed U9Ig== X-Gm-Message-State: AJIora8x+M/Bqd+A17Fi1/rQx0rXAvz041vOJXXFZ8sfn+1oUrQ3VuOg mPqxB5blcXYMj4vYjl80mCc= X-Google-Smtp-Source: AGRyM1tn+1VSM0nJrDcicImUQfV+BJwlknSwvv/sZpqhQ8QXScW6TUatzKl62b43uUmVmtXsdqu/qQ== X-Received: by 2002:a62:4e04:0:b0:52b:30f5:59b8 with SMTP id c4-20020a624e04000000b0052b30f559b8mr5028844pfb.37.1657884412477; Fri, 15 Jul 2022 04:26:52 -0700 (PDT) Received: from RD-3580-24288.rt.l (42-72-159-86.emome-ip.hinet.net. [42.72.159.86]) by smtp.gmail.com with ESMTPSA id a5-20020aa78e85000000b00525b61f4792sm3550604pfr.109.2022.07.15.04.26.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 04:26:52 -0700 (PDT) From: ChiaEn Wu To: lee.jones@linaro.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, sre@kernel.org, chunfeng.yun@mediatek.com, gregkh@linuxfoundation.org, jic23@kernel.org, lars@metafoo.de, lgirdwood@gmail.com, broonie@kernel.org, linux@roeck-us.net, heikki.krogerus@linux.intel.com, deller@gmx.de Cc: chiaen_wu@richtek.com, alice_chen@richtek.com, cy_huang@richtek.com, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-iio@vger.kernel.org, linux-fbdev@vger.kernel.org, szunichen@gmail.com, Rob Herring Subject: [PATCH v5 05/13] dt-bindings: backlight: Add MediaTek MT6370 backlight Date: Fri, 15 Jul 2022 19:25:59 +0800 Message-Id: <20220715112607.591-6-peterwu.pub@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220715112607.591-1-peterwu.pub@gmail.com> References: <20220715112607.591-1-peterwu.pub@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: ChiYuan Huang Add MT6370 backlight binding documentation. Signed-off-by: ChiYuan Huang Reviewed-by: Rob Herring --- .../leds/backlight/mediatek,mt6370-backlight.yaml | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml diff --git a/Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml new file mode 100644 index 0000000..d674212 --- /dev/null +++ b/Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/backlight/mediatek,mt6370-backlight.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT6370 Backlight + +maintainers: + - ChiaEn Wu + +description: | + This module is part of the MT6370 MFD device. + The MT6370 Backlight WLED driver supports up to a 29V output voltage for + 4 channels of 8 series WLEDs. Each channel supports up to 30mA of current + capability with 2048 current steps (11 bits) in exponential or linear + mapping curves. + +allOf: + - $ref: common.yaml# + +properties: + compatible: + const: mediatek,mt6370-backlight + + default-brightness: + minimum: 0 + maximum: 2048 + + max-brightness: + minimum: 0 + maximum: 2048 + + enable-gpios: + description: External backlight 'enable' pin + maxItems: 1 + + mediatek,bled-pwm-enable: + description: | + Enable external PWM input for backlight dimming + type: boolean + + mediatek,bled-pwm-hys-enable: + description: | + Enable the backlight input-hysteresis for PWM mode + type: boolean + + mediatek,bled-pwm-hys-input-th-steps: + $ref: /schemas/types.yaml#/definitions/uint8 + enum: [1, 4, 16, 64] + description: | + The selection of the upper and lower bounds threshold of backlight + PWM resolution. If we choose selection 64, the variation of PWM + resolution needs more than 64 steps. + + mediatek,bled-ovp-shutdown: + description: | + Enable the backlight shutdown when OVP level triggered + type: boolean + + mediatek,bled-ovp-microvolt: + enum: [17000000, 21000000, 25000000, 29000000] + description: | + Backlight OVP level selection. + + mediatek,bled-ocp-shutdown: + description: | + Enable the backlight shutdown when OCP level triggerred. + type: boolean + + mediatek,bled-ocp-microamp: + enum: [900000, 1200000, 1500000, 1800000] + description: | + Backlight OC level selection. + + mediatek,bled-channel-use: + $ref: /schemas/types.yaml#/definitions/uint8 + description: | + Backlight LED channel to be used. + Each bit mapping to: + - 0: CH4 + - 1: CH3 + - 2: CH2 + - 3: CH1 + minimum: 1 + maximum: 15 + +required: + - compatible + - mediatek,bled-channel-use + +additionalProperties: false