From patchwork Tue Apr 6 15:50:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 12185555 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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=unavailable 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 04870C433ED for ; Tue, 6 Apr 2021 15:53:17 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 92C88610CC for ; Tue, 6 Apr 2021 15:53:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92C88610CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=avXpwArGOkFc+kEB+6GI1HU1wkG8d/4iROsSBXL+6Tw=; b=VGuWzoHYVQsda5zM0To9rrj6Hh hwm8GW+O7+BjAZu9yJCuh/erLXcclgMb/UW8uCs6aWE9KFeS5sQ6/9RnZrqYTWZwT/iRuQ8RlH4Ow agIIOYx1Q2bQANEJW46mqFAfCD/IkV0Nu3E3J209BmjRsK8U1bm5grHlrg//jsR8YN78Kh9DlQlr8 HKEJaTYDqSSC9mvyPnm0VajRVaPFIWUOTlTtnjWV9qOXVC8GbZSzIOZXBbYzIJlyj+PUyZ7l5Erpj zJwqhqsd/UyElQZm9IPxDcT3aYPr4WkRf0OyLDw1con/GKvyMUxoxlNnquo9us2sCjI7NpjtdPvrk W0SI5bDA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTnyt-002xVE-Fs; Tue, 06 Apr 2021 15:51:07 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTnyp-002xUU-1W; Tue, 06 Apr 2021 15:51:05 +0000 Received: by mail-ej1-x635.google.com with SMTP id e14so22708696ejz.11; Tue, 06 Apr 2021 08:51:02 -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; bh=MwBs5r1ZJNOmTqYBpKTtnKYCyLFiaA9WgWxe+ttx57g=; b=YpfgJoVR99TLjEIAiCUf0MhS+8vlpnI8XDlBtP8pBpMnVl0rJoCsv2VrTntaygKrVi oYU39msAOlzwehwCWXX45pzV/nUMhAHb2Z3rvEKHNeKHuk0seJ71SA6Clu1YwnRXi2Zm bM/UuIHPx6eqJAd/1ZoZWPpNppiSjkugnTo9hFRKLfxY6fTMeEUfQCJ/L6ZwD8GKBLb5 LG1rjqVfgw0TiQ6gsZAMsDJjExhL0IID0Jn4yj5BNw59xhBz5ZfWLX9zhwUj3zovMFvP RIp18iRTt7qlyUtO8P7bvOVLcv2k0pvF34zV/OlxRYQwvhmTmB9ZSw6GvhZf3q9C/7We Ui2w== 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; bh=MwBs5r1ZJNOmTqYBpKTtnKYCyLFiaA9WgWxe+ttx57g=; b=QlRe3r6X+qxV3Wf3m65CVaF6nrzN5gRkA8KqgVF/r8yha/eiXdgSEYen5OcxFVNTef u0Uic8nE2Sgu3yUWrum6qTu8WVWXvAcQHbOsxmBSBMmc5kISkqSxfmFKyWawx5hSaFpx +Q3yeX+RZn8OUh8kAXSS0LWr79WJ4qNub9GPb3kzOwiVeIzNsFi3AszjiVo9F1qwizj+ KlcLMuYPHvGx/bHL6A/7G8x8gLqJ2jatunsSqxTKD7mU++EO2MeEWffcID9QY3mUFWSu mzG5V9QhhSnFQciupU3Id193ASQu2VDDt1mSSnguodQ9dmvHrQcCsjsyBCb1hEisZOZ7 HJIw== X-Gm-Message-State: AOAM531JiyjhNQtm6V0r/TusR7IzvjJYhHAp7X5gC9oQ8hQ3lYFRxlW2 M+wUWpI8XlCw1STfOMEiCiZh9GJ6t018tQ== X-Google-Smtp-Source: ABdhPJwB8DLj57BRL/dataeb6kvhb3ZsPmD6W8ROBoUSxQljHmy0I8hpKKuNGdvCPz5jzF8sJ9z0LQ== X-Received: by 2002:a17:906:1ba9:: with SMTP id r9mr2482740ejg.395.1617724261927; Tue, 06 Apr 2021 08:51:01 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id h8sm13894327ede.25.2021.04.06.08.51.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Apr 2021 08:51:01 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de Cc: robh+dt@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/2] dt-bindings: pwm: convert pwm-rockchip.txt to YAML Date: Tue, 6 Apr 2021 17:50:52 +0200 Message-Id: <20210406155053.29101-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_165103_165936_15EDD322 X-CRM114-Status: GOOD ( 19.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Current dts files with 'pwm' nodes are manually verified. In order to automate this process pwm-rockchip.txt has to be converted to yaml. Signed-off-by: Johan Jonker --- .../devicetree/bindings/pwm/pwm-rockchip.txt | 27 --------- .../devicetree/bindings/pwm/pwm-rockchip.yaml | 66 ++++++++++++++++++++++ 2 files changed, 66 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-rockchip.txt create mode 100644 Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml diff --git a/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt b/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt deleted file mode 100644 index f70956dea..000000000 --- a/Documentation/devicetree/bindings/pwm/pwm-rockchip.txt +++ /dev/null @@ -1,27 +0,0 @@ -Rockchip PWM controller - -Required properties: - - compatible: should be "rockchip,-pwm" - "rockchip,rk2928-pwm": found on RK29XX,RK3066 and RK3188 SoCs - "rockchip,rk3288-pwm": found on RK3288 SOC - "rockchip,rv1108-pwm", "rockchip,rk3288-pwm": found on RV1108 SoC - "rockchip,vop-pwm": found integrated in VOP on RK3288 SoC - - reg: physical base address and length of the controller's registers - - clocks: See ../clock/clock-bindings.txt - - For older hardware (rk2928, rk3066, rk3188, rk3228, rk3288, rk3399): - - There is one clock that's used both to derive the functional clock - for the device and as the bus clock. - - For newer hardware (rk3328 and future socs): specified by name - - "pwm": This is used to derive the functional clock. - - "pclk": This is the APB bus clock. - - #pwm-cells: must be 2 (rk2928) or 3 (rk3288). See pwm.yaml in this directory - for a description of the cell format. - -Example: - - pwm0: pwm@20030000 { - compatible = "rockchip,rk2928-pwm"; - reg = <0x20030000 0x10>; - clocks = <&cru PCLK_PWM01>; - #pwm-cells = <2>; - }; diff --git a/Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml b/Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml new file mode 100644 index 000000000..cfd637d3e --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip PWM controller + +maintainers: + - Heiko Stuebner + +properties: + compatible: + oneOf: + - const: rockchip,rk2928-pwm + - const: rockchip,rk3288-pwm + - const: rockchip,vop-pwm + - items: + - enum: + - rockchip,rv1108-pwm + - const: rockchip,rk3288-pwm + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 2 + description: + For older hardware (rk2928, rk3066, rk3188, rk3228, rk3288, rk3399) + There is one clock that is used both to derive the functional clock + for the device and as the bus clock. + For newer hardware (rk3328 and future SoCs) that is also specified + with clock names. + "pwm" is used to derive the functional clock for the device. + "pclk" is used as the APB bus clock. + + clock-names: + minItems: 1 + items: + - const: pwm + - const: pclk + + "#pwm-cells": + enum: [2, 3] + description: + Must be 2 (rk2928) or 3 (rk3288). + See pwm.yaml for a description of the cell format. + +additionalProperties: false + +required: + - compatible + - reg + - clocks + - "#pwm-cells" + +examples: + - | + #include + pwm0: pwm@20030000 { + compatible = "rockchip,rk2928-pwm"; + reg = <0x20030000 0x10>; + clocks = <&cru PCLK_PWM01>; + #pwm-cells = <2>; + }; From patchwork Tue Apr 6 15:50:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 12185557 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,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 CFE91C433B4 for ; Tue, 6 Apr 2021 15:53:17 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4132561074 for ; Tue, 6 Apr 2021 15:53:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4132561074 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YHkoHO86SXQEYI9XcfYJZYZLzeeiH4r6/qnND8rF8v8=; b=dFYKzqyhP4JfSl4rTXBBHDXcdr Dnu3OJ0N9nkYKKMZ4CitC5M0JvB1D90iZqV4Qzt/GTKa53cGYzwCL+rVP7lyRzxgi5WQ+Y5jpX4Ab MI0PF6rePQmjuwgGakYVDdNJA2DHGMoZnzgwOZAs2k77X/NkwPL/5F9sKKrBhaMnsVkwdbmhnP0bE Rxn7RUdIKPEREkm1N5PxcpH9nHHWP85Y39Dfy4e+xj+xDFq0LND3WfccPI0U6d2PZBZff/7RUTY2k p76q5axlG96h9CrHDYGb0upuFPcmOXmg/5etY4suUY1FVUkLiYP3GZbEre7nSdmeJTu0AYtOVOryT gbJ2p4Ow==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTnz0-002xVo-PT; Tue, 06 Apr 2021 15:51:15 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTnyp-002xUV-Fq; Tue, 06 Apr 2021 15:51:05 +0000 Received: by mail-ej1-x62d.google.com with SMTP id b7so22775135ejv.1; Tue, 06 Apr 2021 08:51:03 -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:in-reply-to:references; bh=Qj4ZbUSCwnNRsGsyd4823o8NwDOo/ZM9rO1POtn+Q7M=; b=mMTsP8eKqHQw2U/phTGdhcue3frO4TNws7ugE+cWsrZeQtb0YH6uYR3KOUZEGH8tmq sT3OOHCOJeJnSFSLmgn8qiV8O8kJ+4amDvi5kPSPZh7HwFqsxe7qGkJFGVV3Wyskrvbb vX4nZROVWP1lFWuBdJN9i3vwL7qw7rZRBAzdKs7sHMB/KDp5GJrE2V/bQp6I0C/gAOB1 Q/PJiJpH1AZssOpVgcvm4+ujyKpjE8R+MwcngypfdJpTrWJSJd4hoWmXDRBivbZhAAYi tDJaZjE/6RKGBRHtVgALilx7DtYjr5tUwW5yLRa7hev6k0oNKzJJaeRrYAunKPFY1zH1 Eyjw== 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:in-reply-to :references; bh=Qj4ZbUSCwnNRsGsyd4823o8NwDOo/ZM9rO1POtn+Q7M=; b=dqb5i3F6/K+hNDtPahl8h2lhYAq0/lgU73Tv+ssY8uhFhP6yt3DfyBjwBA9c++catj IHE1E1KCTWINWeCTVDim89pwk44xEjQToxi6oLRBm1fR4So0y+wOab/0tOas2HJ7Oz+D VyvMT1W68mrazFUp0Ff027peh5dYlNnbJEIeJVECR+QAqpMG18s2OQCccVWLi62dKaj7 GUnnJpiipSbBDc6HlfrQuLFruqsojfbAVdq/h6QKt0eKijfumG8D2Ekx4QIYrJmKFQOD aybN/N4kOCSeueRuzFrsW+RX+UXRNR83eNT0d1ilJZASOnLa1gx7wkCWcbqkHcAcdfa5 me+A== X-Gm-Message-State: AOAM5314AlDUCnBaVlwwZ8iA17rbN5NGCFmK6P0t0D/2HJDkkP1l/Z30 wcqlrl7mt+lvaj26HIbNcGI= X-Google-Smtp-Source: ABdhPJyG2PqjLSzQz7sM421IaGpYPRDFTvC2MggBRpVNNsIld3uI8NWFbgb77DuQxdTZYdXa3dDQyQ== X-Received: by 2002:a17:906:6dc9:: with SMTP id j9mr17253967ejt.188.1617724262892; Tue, 06 Apr 2021 08:51:02 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id h8sm13894327ede.25.2021.04.06.08.51.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Apr 2021 08:51:02 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de Cc: robh+dt@kernel.org, thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de, lee.jones@linaro.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/2] dt-bindings: pwm: add more compatible strings to pwm-rockchip.yaml Date: Tue, 6 Apr 2021 17:50:53 +0200 Message-Id: <20210406155053.29101-2-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210406155053.29101-1-jbx6244@gmail.com> References: <20210406155053.29101-1-jbx6244@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_165103_592651_CE9F46EE X-CRM114-Status: GOOD ( 11.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The compatible strings below are already in use in the Rockchip dtsi files, but were somehow never added to a document, so add "rockchip,rk3328-pwm" "rockchip,rk3036-pwm", "rockchip,rk2928-pwm" "rockchip,rk3368-pwm", "rockchip,rk3288-pwm" "rockchip,rk3399-pwm", "rockchip,rk3288-pwm" "rockchip,px30-pwm", "rockchip,rk3328-pwm" "rockchip,rk3308-pwm", "rockchip,rk3328-pwm" for pwm nodes to pwm-rockchip.yaml. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml b/Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml index cfd637d3e..3945d586c 100644 --- a/Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml +++ b/Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml @@ -14,11 +14,22 @@ properties: oneOf: - const: rockchip,rk2928-pwm - const: rockchip,rk3288-pwm + - const: rockchip,rk3328-pwm - const: rockchip,vop-pwm - items: + - const: rockchip,rk3036-pwm + - const: rockchip,rk2928-pwm + - items: - enum: + - rockchip,rk3368-pwm + - rockchip,rk3399-pwm - rockchip,rv1108-pwm - const: rockchip,rk3288-pwm + - items: + - enum: + - rockchip,px30-pwm + - rockchip,rk3308-pwm + - const: rockchip,rk3328-pwm reg: maxItems: 1