Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp108102rwb; Wed, 5 Oct 2022 15:34:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4eF0w8uZUZNh/0WiHtRTvL2TvxWVYhb3DeRSHW+OP4eebIEuwbrqH+8zCxwNJMHoEYYWRS X-Received: by 2002:a17:907:3f0f:b0:782:395f:cd69 with SMTP id hq15-20020a1709073f0f00b00782395fcd69mr1492589ejc.406.1665009245113; Wed, 05 Oct 2022 15:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665009245; cv=none; d=google.com; s=arc-20160816; b=SkTI621f970+2RrFlS5irLZ17j002K0iNBfn4C9VecJ968L/nlMfWgwk7fRz6Hx0Zg iwdFUqzw4MCgOMXC4v4OWYHAY36+S3WaIJ5evXm+9gXHL1z4sMzsrPjpXrizpEoIqY61 FKL3sr1Wd1eDbH2VdXn5t09xB7RMCntYoCqYPESRbWyEh5sN0hDJBJCPnpcfR/j+gbz3 w3fTywfbQbYYRSEHoqcpGjEVm47Adv53pQaSFimmKaR+OphdklJyrOZWaabN3kgQuNRu mvzUfhKCY5GQm2urLHIOjWlHR3PDoL9AaSIxmD11rK13xVNdB+PZaomADcokL73tPehx Q6Uw== 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=sQtmC5CT1BYx1wr4cDsdhyqbJnf1PNOi9nZ8obHDjYY=; b=PD+tTqcZm3ptqqxevJLcB1upfXSbf85fuwMnTzfcGHDLDQrz13NmJJMuqOckwLTy48 jrHkmwI/fg2p9HSR/A6Z+7OEGrDJCuEBZKFJpLgAzyFNAg2nwfjrhSng4RUDMxsSgZ+i O9sFQ3qrRjNG2C7UEDXgMsVF8tC+grnmUnsv/IxH7Q9OQc9l4AV+cRbq7/MqmSS+fRsm nkT9LZ9/J1LKb2IUUAg4FoxSUOPcIw0R6uaFuGKms5rlbQY31mG+e0DNMpftzDy5k/Mh 4wyD3es0E+uAGsszgn3qDIAaPpqZjVI4gZllQ/8M5mu2sRka6qymfHc7Zh7pQSJH9ApN B9tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=i9T+BWoy; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3-20020a170906198300b00783757c8e5esi11867003ejd.931.2022.10.05.15.33.39; Wed, 05 Oct 2022 15:34:05 -0700 (PDT) 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=i9T+BWoy; 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 S229592AbiJEWM5 (ORCPT + 99 others); Wed, 5 Oct 2022 18:12:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbiJEWMt (ORCPT ); Wed, 5 Oct 2022 18:12:49 -0400 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 0C76C82D38 for ; Wed, 5 Oct 2022 15:12:48 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id bu30so7942640wrb.8 for ; Wed, 05 Oct 2022 15:12:47 -0700 (PDT) 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; bh=sQtmC5CT1BYx1wr4cDsdhyqbJnf1PNOi9nZ8obHDjYY=; b=i9T+BWoyfOh4YwlSNxED/MNU5eEtRg/wQxRHg6AMMJnEhJpCZJxJIsMHYeysa/gZt0 zd5i4SC9fwfWTZPwWF7UtL1y0Ou8XdBQ5fZ4CPn4naErwOryPTtgjDSdzepvRfDRnB5l fB+28iqqQbaJEwSY/16k32aztbDoiP7W9FZ9m521A98TXEylSZxaJrOC1NLyamxRRVo6 yJCVeDEn8Wi/jpBcKDcFDFsuBWGhTF95c5xvfDpc7biLpfGHGqVI0vzjjDa7f7yt1z6Y vnjOUQi6LU5ejqMHeabB9wGgjjJuQjNCT/i7HdUOkDC09zmw0rYsdytRzgiKbZWNKABJ IEkg== 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; bh=sQtmC5CT1BYx1wr4cDsdhyqbJnf1PNOi9nZ8obHDjYY=; b=if7BqxdWGkL3/wbg4kXnHFv1WrjLUacE0yWV/v6DggZcetl6IOEvdyM00XW0lGqiDt unQse8WBiObj5zqJFxLLFIjMhYU6Epmgxzsvma7A9ZSz4VrgI+XLHrmx3gOhWJyAIbAs VxRSc4Tjqk/ArGhFSxr3rn877/2x7+atr1WIDp1ekK+kVKtJjYejaJmBfD+g7WBg/uU5 PLecpAmJ5uUgip1wSIJQ7XCQE356KLEtIWRDq871NG/oszApl9B/vu66WswklBu7gxrX RlVZy51xM2G3/VzBYqWcSnE0tIhMxPMpMnDcfxvY5iNpziKL31t08qABZImP4k+sklva WGrg== X-Gm-Message-State: ACrzQf30WRs4wfd+Ky9OwXTAl5xHioSh2PJbcTuJxNXP9rSvIP3nTSAn Y8DJu+BmDpLImXpJUZAS/3o9ba46r5j/LQ== X-Received: by 2002:a5d:5983:0:b0:22c:b9a0:e874 with SMTP id n3-20020a5d5983000000b0022cb9a0e874mr1075363wri.306.1665007966655; Wed, 05 Oct 2022 15:12:46 -0700 (PDT) Received: from rainbowdash.. (cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net. [86.15.83.122]) by smtp.gmail.com with ESMTPSA id d2-20020adffd82000000b0022e327f849fsm12184437wrr.5.2022.10.05.15.12.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 15:12:46 -0700 (PDT) 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 Subject: [PATCH v5 01/10] dt-bindings: pwm: Document Synopsys DesignWare snps,pwm-dw-apb-timers-pwm2 Date: Wed, 5 Oct 2022 23:12:33 +0100 Message-Id: <20221005221242.470734-2-ben.dooks@sifive.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221005221242.470734-1-ben.dooks@sifive.com> References: <20221005221242.470734-1-ben.dooks@sifive.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 --- 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"; + }; -- 2.35.1