Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1686561pxj; Wed, 19 May 2021 11:27:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXOzJ3j1MoYR6yi8F8lt8V9hOmnhCIMwPIJ+XHII0VRBCOF1CGttFYO6t6TxJTD1u3atw9 X-Received: by 2002:a6b:b2c8:: with SMTP id b191mr871639iof.19.1621448867149; Wed, 19 May 2021 11:27:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621448867; cv=none; d=google.com; s=arc-20160816; b=JU9V5G7ZoTX+UNujHRMOd4Qg/OqCTFscUKILFfvBZYRA/JE9ooxPfjhhTM0cQb9w4u GE16V89N0l7ObzNP8zfwnPMYKTQ2gw6Ewzhwlt4UTYSzaJd5jbiAPELTGYXCdfodhOPK s60IOLTp12fy2+3xYALiGCbWTcyn36wvyMv0et5JQjcQFdMr119Uy3FfuRc8t7gTqDkI MRYX4HjVGpetVX0I4LmaDtlLhlTZgEJfAxQ0gHK0Ofe12PYgwt0yc0gJJhzqbzAGJcsU 0KMvJjvK0hJfNah0ZGA9NyVnTauLzoce10sUou0VMwy8J7BNp+bpXZP/lfP5ay6ltYDL 9hIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CWPyuzoJy/mScoWjTd2g156JIqxC7nCj/J8y8W+5TIQ=; b=IFlhGQ3h1Ac9WoxOi188qKWB0otjK86ndGmAWXO8t63tRDEmQsPcXQYpKJKoNiQa42 ePOhTT9tKUxOMXljXlOwfkzVshXxQLEuAT8i4MW0B3IAcjei3+iy8EJ99ZHyyFdSvdqp hoXMTGXU/vVVyLEQE3LwiJNr1OzvOG+4S2tAaFLWrWUP6ljzSEra3Jllt3Ocgr6NxMHM UuQm5TU56FUbYlzxeRAlhrsme3QILHfht3BGYhLk2tJnspAOWbnXPSCO3+xm2CfrDPLU +CwyN7o4a/j+OqIAuXuNY3SYbuTmYfacHbq+N+b3+xCCNX/ZUy6l8KU5pPwZxtqmXGop IfPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=gFITqRQ4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si67082jaw.8.2021.05.19.11.27.34; Wed, 19 May 2021 11:27:47 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=gFITqRQ4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345673AbhERRzp (ORCPT + 99 others); Tue, 18 May 2021 13:55:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351288AbhERRzo (ORCPT ); Tue, 18 May 2021 13:55:44 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27EAEC061573 for ; Tue, 18 May 2021 10:54:26 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id d11so11184692wrw.8 for ; Tue, 18 May 2021 10:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CWPyuzoJy/mScoWjTd2g156JIqxC7nCj/J8y8W+5TIQ=; b=gFITqRQ42/kzXwvlJxXPZLz9mArPh+pgdzCUd/Jxd1yrL6hggF14NdJNillhgJdwyX Sce0Br+HzNLf+LOydSu6aplcnaRFCsjewZ+DGhQFzn95i9HvdGi7Vj0BFatbdG9lD2Oy mvNPsKvV+132xtqDcIQ2zn1o0rRLooZVm6bkQJ+onnbx88YTgoTors2oG8C38Zwb49Xj ynvUDuaGkuN57coAxPIG3Gjp3LW+ruLhQTAVMx1wHLTTJq5YGgg/bCyW2W/Zo7ywGYPh F57HYLCKxLUOIKXusNpVCm7AxFQBEFqVWk3gcMS6EfxZl5WffEcfM8tVle8Pmyb/8oYd NuuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CWPyuzoJy/mScoWjTd2g156JIqxC7nCj/J8y8W+5TIQ=; b=il6HVoOOHUYvxmku7TcdpD8CYQHOheg8UkClEzfrmqbNd/VyVa3vXNoOTGtE5hRLGB y67w6/PzsDLp95sf4X6YtMSoYkOBTuTuGkZvvh3ZhwyCl2MoXIklrmR7tPuoOfEAg1kF dfpyM97FWVwSjJbu1C0C0VlZv8dVxSQAIlqHjoJ8xFODbyF3SCEm2iFmj78N/QTMQBZm QV25Em+Mp/Gvzjt/qXDpNdaGaOJA3CGM06AP0nKca6guum708dHR0oovaoKZWu7s2PLh u4XBPmYG53eOKSjsMSX3ZLsOYgC7BQ+GgMm7wfAGfWDZA+xB1mD3lrZmnHn1x2SWTXhE wsHw== X-Gm-Message-State: AOAM533i3ga1mmcZuieRigBHFuzlCUgHTBE57DdmVuC2woMMLuI/3Lxg x7zOo3rkvyTGVx55vrOuQvyQYw== X-Received: by 2002:a5d:4003:: with SMTP id n3mr8552995wrp.173.1621360464840; Tue, 18 May 2021 10:54:24 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id a17sm14458963wrt.53.2021.05.18.10.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 10:54:24 -0700 (PDT) From: Fabien Parent To: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Lee Jones , Rob Herring , Matthias Brugger Cc: mkorpershoek@baylibre.com, Fabien Parent , linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: pwm: pwm-mtk-disp: convert to YAML schema Date: Tue, 18 May 2021 19:54:19 +0200 Message-Id: <20210518175422.2678665-1-fparent@baylibre.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the dt-binding documentation for pwm-mtk-disp to YAML. Signed-off-by: Fabien Parent --- .../devicetree/bindings/pwm/pwm-mtk-disp.txt | 44 ---------- .../devicetree/bindings/pwm/pwm-mtk-disp.yaml | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 44 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt create mode 100644 Documentation/devicetree/bindings/pwm/pwm-mtk-disp.yaml diff --git a/Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt b/Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt deleted file mode 100644 index 902b271891ae..000000000000 --- a/Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt +++ /dev/null @@ -1,44 +0,0 @@ -MediaTek display PWM controller - -Required properties: - - compatible: should be "mediatek,-disp-pwm": - - "mediatek,mt2701-disp-pwm": found on mt2701 SoC. - - "mediatek,mt6595-disp-pwm": found on mt6595 SoC. - - "mediatek,mt8167-disp-pwm", "mediatek,mt8173-disp-pwm": found on mt8167 SoC. - - "mediatek,mt8173-disp-pwm": found on mt8173 SoC. - - reg: physical base address and length of the controller's registers. - - #pwm-cells: must be 2. See pwm.yaml in this directory for a description of - the cell format. - - clocks: phandle and clock specifier of the PWM reference clock. - - clock-names: must contain the following: - - "main": clock used to generate PWM signals. - - "mm": sync signals from the modules of mmsys. - - pinctrl-names: Must contain a "default" entry. - - pinctrl-0: One property must exist for each entry in pinctrl-names. - See pinctrl/pinctrl-bindings.txt for details of the property values. - -Example: - pwm0: pwm@1401e000 { - compatible = "mediatek,mt8173-disp-pwm", - "mediatek,mt6595-disp-pwm"; - reg = <0 0x1401e000 0 0x1000>; - #pwm-cells = <2>; - clocks = <&mmsys CLK_MM_DISP_PWM026M>, - <&mmsys CLK_MM_DISP_PWM0MM>; - clock-names = "main", "mm"; - pinctrl-names = "default"; - pinctrl-0 = <&disp_pwm0_pins>; - }; - - backlight_lcd: backlight_lcd { - 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>; - power-supply = <&mt6397_vio18_reg>; - enable-gpios = <&pio 95 GPIO_ACTIVE_HIGH>; - }; diff --git a/Documentation/devicetree/bindings/pwm/pwm-mtk-disp.yaml b/Documentation/devicetree/bindings/pwm/pwm-mtk-disp.yaml new file mode 100644 index 000000000000..0f016c81cd53 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-mtk-disp.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/pwm/pwm-mtk-disp.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: MediaTek display PWM controller + +maintainers: + - Thierry Reding + - Lee Jones + - Matthias Brugger + +properties: + compatible: + oneOf: + - enum: + - mediatek,mt2701-disp-pwm + - mediatek,mt6595-disp-pwm + - mediatek,mt8173-disp-pwm + - items: + - const: mediatek,mt8167-disp-pwm + - const: mediatek,mt8173-disp-pwm + + reg: + maxItems: 1 + + clocks: + items: + - description: clock used to generate PWM signals + - description: sync signal from the mmsys module + + clock-names: + items: + - const: main + - const: mm + + "#pwm-cells": + const: 2 + + power-domains: + description: + List of phandles and PM domain specifiers, as defined by bindings of the + PM domain provider (see also ../power_domain.txt). + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + pwm0: pwm@1401e000 { + compatible = "mediatek,mt8173-disp-pwm"; + reg = <0x1401e000 0x1000>; + #pwm-cells = <2>; + clocks = <&mmsys CLK_MM_DISP_PWM026M>, + <&mmsys CLK_MM_DISP_PWM0MM>; + clock-names = "main", "mm"; + pinctrl-names = "default"; + pinctrl-0 = <&disp_pwm0_pins>; + }; + + backlight_lcd: backlight_lcd { + 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>; + power-supply = <&mt6397_vio18_reg>; + enable-gpios = <&pio 95 GPIO_ACTIVE_HIGH>; + }; -- 2.31.1