From patchwork Wed May 12 16:02:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 435804 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham 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 B1A63C433B4 for ; Wed, 12 May 2021 16:55:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 77EA7611AC for ; Wed, 12 May 2021 16:55:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240590AbhELQz7 (ORCPT ); Wed, 12 May 2021 12:55:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240162AbhELQa3 (ORCPT ); Wed, 12 May 2021 12:30:29 -0400 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A074DC08EACF; Wed, 12 May 2021 09:03:16 -0700 (PDT) Received: by mail-lj1-x233.google.com with SMTP id p20so6276044ljj.8; Wed, 12 May 2021 09:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m5a3LpSMEA2FyBM0XUI5BkccXTFTL84Xmwv8wTBlzfM=; b=mr/g/PwBPVeExTjtiZC+qX8HbljZsXXFQpRTFHmFENuSx7iLcL4ulhU2K2nbToesaV FM436fFeJbW6OP1Agi7rENm91cnFQiSmN4hE79wgZoFRoxh7frZ6SMcuxC5SNqjT677x jFIzMQSNGijLC5wO0W7OIfXicS5i9JY/VEuX5RttgbEmXB++EqsZdkTGfI2VsaSCoE9t 2EGlDt6nzTTID3RjVW+eC206NKN75z0N/Y+EFJhtDQgikkfXr+JWvNo6LzLN9g0KVyk9 aUQeJ326qMk1vWFBAKIqA41fjJcYancb3l/UX9Dy1UJiwAYwIjZQQvOQwHoLBODmyVna +Pgw== 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=m5a3LpSMEA2FyBM0XUI5BkccXTFTL84Xmwv8wTBlzfM=; b=HbnnxRX3NLF4kni8BJbPGn4Ml1OBaVevFJw93uQLrATI8sZe8gZtu4QUQaKdKaOurK kH34b2Y+EE7wXckgNpAY7l1MDgrnx5ceEkDx+SpwAkSCxRjGhy7s2sWSJeFG2gZ5Pi+m v4IXp/G52uVp9sNAZQss37gP/Fq1rJBg4vhbqdTKNFKjyT9CbBDyweq94sBPD12HiX/T C/8Mqb9h0GMTQR7mWXCF9OTIuPh32ImXnX5Z6owaSrgeBQawEM009EIzYWn1DlW/jKxu vDQ1NB1vsDsXdEMmxP5JQtd2SCact3n+AqcHFrSBTTHsH46coEbzLXr6VaZN+he2sCYY Je0Q== X-Gm-Message-State: AOAM530WR+2B0xjsdYn9lbW2BSqYEe3Z1TqQ4GYKfqQZPHVQiq/0EWTa BSbIik0E70hSsSd+d7JjJXc= X-Google-Smtp-Source: ABdhPJwbfi+Iv9VSTgBMtpTqyMbSw1fieIjoLW3VHjdo1A4uK4xe3NoyvdsrwxdLRI3Xj+FV5+L1dQ== X-Received: by 2002:a2e:9c01:: with SMTP id s1mr29260574lji.402.1620835394404; Wed, 12 May 2021 09:03:14 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id a6sm32646ljp.76.2021.05.12.09.03.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 09:03:13 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , Lee Jones , Rob Herring , Florian Fainelli Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH] dt-bindings: pwm: brcm, iproc-pwm: convert to the json-schema Date: Wed, 12 May 2021 18:02:53 +0200 Message-Id: <20210512160253.15000-1-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Rafał Miłecki This helps validating DTS files. Signed-off-by: Rafał Miłecki --- .../bindings/pwm/brcm,iproc-pwm.txt | 21 --------- .../bindings/pwm/brcm,iproc-pwm.yaml | 45 +++++++++++++++++++ 2 files changed, 45 insertions(+), 21 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt create mode 100644 Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt b/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt deleted file mode 100644 index 655f6cd4ef46..000000000000 --- a/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.txt +++ /dev/null @@ -1,21 +0,0 @@ -Broadcom iProc PWM controller device tree bindings - -This controller has 4 channels. - -Required Properties : -- compatible: must be "brcm,iproc-pwm" -- reg: physical base address and length of the controller's registers -- clocks: phandle + clock specifier pair for the external clock -- #pwm-cells: Should be 3. See pwm.yaml in this directory for a - description of the cells format. - -Refer to clocks/clock-bindings.txt for generic clock consumer properties. - -Example: - -pwm: pwm@18031000 { - compatible = "brcm,iproc-pwm"; - reg = <0x18031000 0x28>; - clocks = <&osc>; - #pwm-cells = <3>; -}; diff --git a/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.yaml b/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.yaml new file mode 100644 index 000000000000..218ab06c34d1 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/brcm,iproc-pwm.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/brcm,iproc-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom iProc PWM controller + +maintainers: + - Rafał Miłecki + +description: + This controller has 4 channels. + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + const: brcm,iproc-pwm + + reg: + maxItems: 1 + + clocks: + description: external clock + maxItems: 1 + + "#pwm-cells": + const: 3 + +unevaluatedProperties: false + +required: + - reg + - clocks + +examples: + - | + pwm@18031000 { + compatible = "brcm,iproc-pwm"; + reg = <0x18031000 0x28>; + clocks = <&osc>; + #pwm-cells = <3>; + };