From patchwork Fri Dec 23 15:38:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 36291 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp383573wrn; Fri, 23 Dec 2022 07:39:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXstvubF99OjyasuexANLmkwem3efKq2C7MTyiAHXgIgN6TEA19M1WKF2oE9jYAIYla/k7dM X-Received: by 2002:a05:6402:2890:b0:47e:eaae:9a56 with SMTP id eg16-20020a056402289000b0047eeaae9a56mr7509410edb.5.1671809950514; Fri, 23 Dec 2022 07:39:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671809950; cv=none; d=google.com; s=arc-20160816; b=MzztMhNkrpkteyFV3KvITGGzO7NUL7KkbP5y7F7UTjm1KKzA2BX7/PoE91IwZgABgF eEzlpj9TwZ76eKYyxleP7moQ3o38Y9ykhaqLIjrg+3c80Yc1cOKc02GwsW1EPiCRh21a 7RM4CaC7JAzV73I/o8qXMgTLFw158t5SIH5DJRyKC2BDZeLyOJmXG3V8GmBbV4SihI+U zDib7UfP+xrDcVL8Ymj1vTLyHIe4AjnWf4qe7LtI7Un5v7PhiNrV2oZY+2MxOVxr568l hXn5JOFuniUj6PjYKjH5qi2y+uAF2bqDDC06qXQ5EZiHRwhYQnnlibt39FELT6qza6D+ JI8Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EtWGiVmifJ/p5NoM/SB2O4ZTTUxKNKwZjVeO5da62YQ=; b=PL1TbJc2HVStF/cXYn48L14BBn4c/IsV5/NLvP+SX3qwN1xi+4hreacIC0iDMnw8TL T/i3nMgQRovc5IEBFVvl2Wc3Kk2Jdi6lMB5j/q6F6nQxV9jLLQFNev3ebflmVz1XagBO L9cLx0ED3gho+BJdNYZlvNzmwc9vZw91MZjyY3W7IqafH512sDUdT3m3FVKovDhMOfX6 VZvfd/hVAOC//DScv5X0S5Yi+fHOVBPdV/PLnSt+tXR2TvoE/Aupu7AfM9mBKbEUIzav B7qrI3ckaN1irCTVb4JYr4x0OH8tvS5RYUMsP7wOD14WMxyMdmBecWGSAtSpuMpC1a3y U4mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=eoViL67C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w3-20020a05640234c300b004777f60fedasi3583248edc.28.2022.12.23.07.38.47; Fri, 23 Dec 2022 07:39:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=eoViL67C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236483AbiLWPib (ORCPT + 99 others); Fri, 23 Dec 2022 10:38:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230448AbiLWPi0 (ORCPT ); Fri, 23 Dec 2022 10:38:26 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4DE237F9A for ; Fri, 23 Dec 2022 07:38:25 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id h16so4875844wrz.12 for ; Fri, 23 Dec 2022 07:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EtWGiVmifJ/p5NoM/SB2O4ZTTUxKNKwZjVeO5da62YQ=; b=eoViL67CheerY/GJogWInFCx8oEhaNaDJ48UxfpAPT6Yx1Y3wpgYmwCqQY/xro+8Nk H9dXTVmTUgsTw2FmT5LZlxfSMFMWIbXtJ4RYhSeeTeo1PP2XjumDJ2sAHQ+I+wY72ZTB kOWuDIydGIx04Z0lWdp7/qceGwBiUhEMZlalMIiXHPCKQjvpjB/QmpiVSGGOncGFzvxV cimB5EyTLlFkGxKuQiDyQ9TgimBARZj86hcn8gCvF6k/+IXAFtB53QDSYj3sRTbI+Ajt ManLmmEbaMQIgpLPmLUrgLhSxuRUakauAa8DMaeKWu65TnEteoditriEs6unm9um9EGN kMZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EtWGiVmifJ/p5NoM/SB2O4ZTTUxKNKwZjVeO5da62YQ=; b=iIUoIL238k2UFMTGovG93iZPdi3fpa3sEatKwVyknAqALAnMuyQK6K5ztZmGQvL7b3 kprS1wJ2UrYcrlB4UvFd44M1sNWhx/B8Sx7wZLye7dRKIxM4UpVw1aWVF5PvLorSDFuc Rt5Y/u3ZAKC0fY4P7yhGWCg8a4PhLQHNrx3f5ylPdpC7fc2ObiaAe9lhiPt7wdLZIcGP kAQkOQBwr0Jwn3jmBhgOdadMST5b+t6+05GpT46d+ePeHh83aTWzz8NDD/nugC6XieUJ Ny0FAaJhN6/HCwrxH7AfJLOEHnDeATO23+5L8jFegNvRGpu6Pg7aJ6aVMVwmoo3Z5VKr bJ3w== X-Gm-Message-State: AFqh2kpJAYLuRhKWw1hFPJoisPLp02UDnHOdqve2Lsy1UhLkBkvYzBVa E3qS7uWdYBfxTzh9eHVaqLYVHA== X-Received: by 2002:adf:eb08:0:b0:242:e73:f636 with SMTP id s8-20020adfeb08000000b002420e73f636mr7834154wrn.4.1671809904392; Fri, 23 Dec 2022 07:38:24 -0800 (PST) Received: from rainbowdash.. (cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net. [86.15.83.122]) by smtp.gmail.com with ESMTPSA id m5-20020adfc585000000b00236488f62d6sm3491610wrg.79.2022.12.23.07.38.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 07:38:24 -0800 (PST) From: Ben Dooks To: linux-pwm@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Lee Jones , u.kleine-koenig@pengutronix.de, Thierry Reding , Krzysztof Kozlowski , Greentime Hu , jarkko.nikula@linux.intel.com, William Salmon , Jude Onyenegecha , Ben Dooks , Krzysztof Kozlowski Subject: [PATCH v7 01/10] dt-bindings: pwm: Document Synopsys DesignWare snps,pwm-dw-apb-timers-pwm2 Date: Fri, 23 Dec 2022 15:38:11 +0000 Message-Id: <20221223153820.404565-2-ben.dooks@sifive.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221223153820.404565-1-ben.dooks@sifive.com> References: <20221223153820.404565-1-ben.dooks@sifive.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753019790732831866?= X-GMAIL-MSGID: =?utf-8?q?1753019790732831866?= Add documentation for the bindings for Synopsys' DesignWare PWM block as we will be adding DT/platform support to the Linux driver soon. Signed-off-by: Ben Dooks Reviewed-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König --- v5: - fixed order of properties - corrected clock to two items v4: - fixed typos, added reg v3: - add description and example - merge the snps,pwm-number into this patch - rename snps,pwm to snps,dw-apb-timers-pwm2 v2: - fix #pwm-cells to be 3 - fix indentation and ordering issues --- .../bindings/pwm/snps,dw-apb-timers-pwm2.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml diff --git a/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml b/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml new file mode 100644 index 000000000000..9aabdb373afa --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022 SiFive, Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/snps,dw-apb-timers-pwm2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Synopsys DW-APB timers PWM controller + +maintainers: + - Ben Dooks + +description: + This describes the DesignWare APB timers module when used in the PWM + mode. The IP core can be generated with various options which can + control the functionality, the number of PWMs available and other + internal controls the designer requires. + + The IP block has a version register so this can be used for detection + instead of having to encode the IP version number in the device tree + comaptible. + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + const: snps,dw-apb-timers-pwm2 + + reg: + maxItems: 1 + + "#pwm-cells": + const: 3 + + clocks: + items: + - description: Interface bus clock + - description: PWM reference clock + + clock-names: + items: + - const: bus + - const: timer + + snps,pwm-number: + $ref: /schemas/types.yaml#/definitions/uint32 + description: The number of PWM channels configured for this instance + enum: [1, 2, 3, 4, 5, 6, 7, 8] + +required: + - compatible + - reg + - "#pwm-cells" + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + pwm: pwm@180000 { + compatible = "snps,dw-apb-timers-pwm2"; + reg = <0x180000 0x200>; + #pwm-cells = <3>; + clocks = <&bus>, <&timer>; + clock-names = "bus", "timer"; + };