Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1508716rdb; Wed, 24 Jan 2024 19:09:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IG55WD1d+DhoWxXn3ItB0NacMsupwtFXtRC9Qtcu3AA28JfKPq3Rw1brDdTiigHAGs4dY9r X-Received: by 2002:a17:907:d30a:b0:a31:7d0d:563a with SMTP id vg10-20020a170907d30a00b00a317d0d563amr65502ejc.4.1706152189944; Wed, 24 Jan 2024 19:09:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706152189; cv=pass; d=google.com; s=arc-20160816; b=eoVFRBHs2a8Rm5SZ17TOemWu0LcdfbhiRqTTm1TVa+u8HDnJ6wbYsMFdSk3Oo3luuF YjxQlo7SOa37hSaJebh0kgKkW3VT2Mf2PpL7IdzKko1Msczx2sw+fBfYQQrJHPTPTGmY IMeS5J2NLZcvHroKsKYgkYrwtmB1oHMUjMonASDmR1ggQVye9bm14HiItLsuYzfx8bmT GIB6A9e4IQ+jD1/u8P9cllV3GZM8aHzg4xZpPRUMJ+9w2cDxc8MPE/gR8i5YrZu5Do+X G+fkzZ/5cbLD3JN6flqnX9kobd4e1eFXbPcqhLIAZsQIpRtgt05j4O0wnsjIGXdT7yjv IveA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HJCqxru4IeZ1qDuUdtTG8ALDoe51hqYkSpw9Fxe6HAI=; fh=8v2OQwT0e/4mzSJfNnrkgSijoqadEWaNMSmTuHQsnfU=; b=ITT1TKxt3x6qh3xJ+WerZhsV8dAJkXBQcGB7my1rmyR6i2ql9l2AmQq+LAdBXWrJ1W QoA5pWh3aBxQa8vl5I9b2V4tL2iItpz0S7H1gjfI/v8meWXTAWfGh/XafX1+Mz3Jw/O1 Cz1320+wDzGiuvIsrVuyxpJKYMzbAa/p6ZRk3Et0ybNpPk122HDEkKD/RlmecXpkiO7d Iym4uM3hL+857pdoPZTYVlXJk55n1/NtRKxBleFRjmS0WsC3GnRJoj01wBbJS41F6nmA SwlGHgqWQUC0sK6K+7XWWhE90T664ut+xt5oL6H4+9LOnXFteT86OOTKUK2/NVA77QbD +U5w== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=unisoc.com); spf=pass (google.com: domain of linux-kernel+bounces-37913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37913-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c7-20020a170906340700b00a3185a39d15si28652ejb.200.2024.01.24.19.09.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 19:09:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=unisoc.com); spf=pass (google.com: domain of linux-kernel+bounces-37913-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37913-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6F8D11F25413 for ; Thu, 25 Jan 2024 03:09:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 259F6D537; Thu, 25 Jan 2024 03:09:04 +0000 (UTC) Received: from SHSQR01.spreadtrum.com (mx1.unisoc.com [222.66.158.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB27279F0 for ; Thu, 25 Jan 2024 03:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=222.66.158.135 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706152143; cv=none; b=GOoB8qHh+Dz1V6JR5My1DkMa64iinLBVf0YGRqDzNjRSh2TSUyeN3UlPyDQEJheizqwRSkJX7oF08JIpw4hjAgwy+c25JqQi/8i/w8te5SBoWcFwrrwcBLTOsGpscvS7BkJCis1KFxp48OdZNySMfIzkiMdMXWbjTrSQ1UGNDW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706152143; c=relaxed/simple; bh=R2C6qolABmQGKD8qhfjxXMFPRKAELbug93bu+jBPX/E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lsyegnjV/CGNmThij1yWORnV6UxmwfeVViOLql2zVKFR0udCaMxzwRpFJTXC4Srzqos3bsf/Q6JuMMW5xZJhS7qdPDqent6Jl5HYv7ZVqHBqqbU/P8IhFsfRIbpuTzK1soX+dOsvN8tRJRlmBEU9f23b+IMH+P2GuENBGyIoADw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com; spf=pass smtp.mailfrom=unisoc.com; arc=none smtp.client-ip=222.66.158.135 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unisoc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 40P38djq061628; Thu, 25 Jan 2024 11:08:39 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx06.spreadtrum.com [10.0.1.11]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4TL5F670HYz2Rq2lq; Thu, 25 Jan 2024 11:01:14 +0800 (CST) Received: from xm9614pcu.spreadtrum.com (10.13.2.29) by shmbx06.spreadtrum.com (10.0.1.11) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Thu, 25 Jan 2024 11:08:38 +0800 From: Wenhua Lin To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Orson Zhai , Baolin Wang , Chunyan Zhang , , , , wenhua lin , Wenhua Lin , Xiongpeng Wu , zhaochen su , Zhaochen Su , Xiaolong Wang Subject: [PATCH V2 4/6] dt-bindings: pwm: sprd: Convert to YAML Date: Thu, 25 Jan 2024 10:55:31 +0800 Message-ID: <20240125025533.10315-5-Wenhua.Lin@unisoc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240125025533.10315-1-Wenhua.Lin@unisoc.com> References: <20240125025533.10315-1-Wenhua.Lin@unisoc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx06.spreadtrum.com (10.0.1.11) X-MAIL:SHSQR01.spreadtrum.com 40P38djq061628 Convert Spreadtrum PWM controller bindings to DT schema. Signed-off-by: Wenhua Lin --- .../devicetree/bindings/pwm/pwm-sprd.txt | 40 -------- .../devicetree/bindings/pwm/pwm-sprd.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 40 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-sprd.txt create mode 100644 Documentation/devicetree/bindings/pwm/pwm-sprd.yaml diff --git a/Documentation/devicetree/bindings/pwm/pwm-sprd.txt b/Documentation/devicetree/bindings/pwm/pwm-sprd.txt deleted file mode 100644 index 87b206fd0618..000000000000 --- a/Documentation/devicetree/bindings/pwm/pwm-sprd.txt +++ /dev/null @@ -1,40 +0,0 @@ -Spreadtrum PWM controller - -Spreadtrum SoCs PWM controller provides 4 PWM channels. - -Required properties: -- compatible : Should be "sprd,ums512-pwm". -- reg: Physical base address and length of the controller's registers. -- clocks: The phandle and specifier referencing the controller's clocks. -- clock-names: Should contain following entries: - "pwmn": used to derive the functional clock for PWM channel n (n range: 0 ~ 3). - "enablen": for PWM channel n enable clock (n range: 0 ~ 3). -- #pwm-cells: Should be 2. See pwm.yaml in this directory for a description of - the cells format. - -Optional properties: -- assigned-clocks: Reference to the PWM clock entries. -- assigned-clock-parents: The phandle of the parent clock of PWM clock. - -Example: - pwms: pwm@32260000 { - compatible = "sprd,ums512-pwm"; - reg = <0 0x32260000 0 0x10000>; - clock-names = "pwm0", "enable0", - "pwm1", "enable1", - "pwm2", "enable2", - "pwm3", "enable3"; - clocks = <&aon_clk CLK_PWM0>, <&aonapb_gate CLK_PWM0_EB>, - <&aon_clk CLK_PWM1>, <&aonapb_gate CLK_PWM1_EB>, - <&aon_clk CLK_PWM2>, <&aonapb_gate CLK_PWM2_EB>, - <&aon_clk CLK_PWM3>, <&aonapb_gate CLK_PWM3_EB>; - assigned-clocks = <&aon_clk CLK_PWM0>, - <&aon_clk CLK_PWM1>, - <&aon_clk CLK_PWM2>, - <&aon_clk CLK_PWM3>; - assigned-clock-parents = <&ext_26m>, - <&ext_26m>, - <&ext_26m>, - <&ext_26m>; - #pwm-cells = <2>; - }; diff --git a/Documentation/devicetree/bindings/pwm/pwm-sprd.yaml b/Documentation/devicetree/bindings/pwm/pwm-sprd.yaml new file mode 100644 index 000000000000..81c5fd688c3c --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-sprd.yaml @@ -0,0 +1,93 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2023 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/pwm-sprd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Spreadtrum PWM controller + +maintainers: + - Orson Zhai + - Baolin Wang + - Chunyan Zhang + +description: | + Spreadtrum SoCs PWM controller provides 4 PWM channels. + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + items: + - enum: + - sprd,ums512-pwm + + reg: + maxItems: 1 + + clocks: + minItems: 8 + maxItems: 8 + + clock-names: + items: + - const: pwm0 + - const: enable0 + - const: pwm1 + - const: enable1 + - const: pwm2 + - const: enable2 + - const: pwm3 + - const: enable3 + description: | + Should contain following entries: + "pwmn": used to derive the functional clock for PWM channel n (n range: 0 ~ 3). + "enablen": for PWM channel n enable clock (n range: 0 ~ 3). + + assigned-clocks: + minItems: 4 + maxItems: 4 + + assigned-clock-parents: + minItems: 4 + maxItems: 4 + + "#pwm-cells": + const: 2 + +required: + - compatible + - reg + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + pwms: pwm@32260000 { + compatible = "sprd,ums512-pwm"; + reg = <0x32260000 0x10000>; + clock-names = "pwm0", "enable0", + "pwm1", "enable1", + "pwm2", "enable2", + "pwm3", "enable3"; + clocks = <&aon_clk CLK_PWM0>, <&aonapb_gate CLK_PWM0_EB>, + <&aon_clk CLK_PWM1>, <&aonapb_gate CLK_PWM1_EB>, + <&aon_clk CLK_PWM2>, <&aonapb_gate CLK_PWM2_EB>, + <&aon_clk CLK_PWM3>, <&aonapb_gate CLK_PWM3_EB>; + assigned-clocks = <&aon_clk CLK_PWM0>, + <&aon_clk CLK_PWM1>, + <&aon_clk CLK_PWM2>, + <&aon_clk CLK_PWM3>; + assigned-clock-parents = <&ext_26m>, + <&ext_26m>, + <&ext_26m>, + <&ext_26m>; + #pwm-cells = <2>; + }; + +... -- 2.17.1