Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1056009pxb; Sun, 11 Apr 2021 06:11:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYXJYeYCVFNBTih1KmfPZ5nxbuspW0+6nLsZXeztGjFe2GQZcEtNVxrX6/wNJhNrlSwV8C X-Received: by 2002:a17:907:2d94:: with SMTP id gt20mr16167283ejc.552.1618146704575; Sun, 11 Apr 2021 06:11:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618146704; cv=none; d=google.com; s=arc-20160816; b=ZNE9Br2hmu3SttyiVEfLCdqt8vNLQ5RP3LMFojgfbfHjWpHZ3tDdaROBDcgnfqXtIL ujnSbwyNCq++EIZrZrIVKqYVwuxu6VVVOyOkEK0DbS4RoQXiHRjVwG34r84vZYoTFwJ/ VvAEwhIPV6qNfQWKA3UjnEuPQtQt/dXGyh53Re896BoDVscj7YigXiyD9pPuWtq6fG/t IUGJ17LmlM9wpmGfPPK8Ey6lEvcP0Gm/cutO2A2Loc4Q2U+otfGWSm6ab0cbORQjiyuH fieexSdRALgORofzyXO16Zy4Kzs5mAaE7EOBkV0Oj/GcmSQKi7+NhcynunxHuY6R4JdQ vTxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=HSvdpIMLsn0RnpUE4sX7jib7kDhn37eZZS9bsKWgBwM=; b=VBm8jjiccLVF3EtL0erXMeaJvscBJaLiKua2h9nH+EExHsvMUBcuQv6CBr0FoEnhXw TbBjRmWNcq/WZ954AbbunJCuzepjcM4NvImNdseKY9SdO7n+gbeuCsodmXVuLiTKtMfq oc83P7lm0KnSyFklmGfDKnjWQ/+L+f4kzXVHCkTXgTFh6QG7pIYGp/Q98hQu1sE1SoiS KfyvTFlAiKrgSeLU0pdI1aZ9Z30AePK9TtwC1OGhv+0OTy8oIImkBM6a5wL2PU+uXjuZ RATDa7zhyqS1ORaEwThiIySgLJ6M3ivJzbIK7cjznvcttbj/dVLb4SKXVDwRwFSmKwMQ 9bZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FLLf+FIN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si6561308edk.323.2021.04.11.06.11.20; Sun, 11 Apr 2021 06:11:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FLLf+FIN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235677AbhDKNKm (ORCPT + 99 others); Sun, 11 Apr 2021 09:10:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235616AbhDKNKd (ORCPT ); Sun, 11 Apr 2021 09:10:33 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED03C061574; Sun, 11 Apr 2021 06:10:15 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id e7so11775476edu.10; Sun, 11 Apr 2021 06:10:15 -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=HSvdpIMLsn0RnpUE4sX7jib7kDhn37eZZS9bsKWgBwM=; b=FLLf+FINblf0xE6K84r49vHqlJhZXHkUC4gkjPIDXI8MGMaQBpF4cihrV6onpXTaBp vdkLL7dKxgW4JtI7yGkgR9edSUOif91Z7hayO9VyxeOIEYg0oDi5fHxj06ezRw1YS0GE /UEP0zK8DSvyaezvf7/sRSDjSFXp6C7Rqh1LEFCGDDkHE8wBeCd0bqfk2+VXr3e4YqyC CyW9iNuhrVHLL9W3AsMNlMdRbXpDERQxsFLgZzYSmwzosIxKuS3uU2zJHA7tETIwwZpf 471zec6rzuUmtCXU3WJ+/ldE4Cli6MezB/xGtRtWjOMU8LWVLzB/feura8Nk20Y4vHXd gZJQ== 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=HSvdpIMLsn0RnpUE4sX7jib7kDhn37eZZS9bsKWgBwM=; b=IUuBp+lMXY0giqk/VdVvLzyXwQeNjmILtkQhLTMqOHbwYvtG3rll6ULXU4VCQItpth YhOm5131bGI7uLEfchWrHC1QGpncl6UdJGRdXhx44balZF/IKB4AXwDnN8I5+ad0ZE4t QsI+zKZy1CGsBVezeYa+AVrdr8XG8rok+4Dhmqu2U7hYVixQ+KWlxIFkJKiMSCg4bl7Q ECZoX08Ha0hMqg8+baHGSsMWI/VYaDB300Tk0lYHOm7IQkuIpRWsoPT0WEUvnyOxFqZi bh/OtJL0wfoAooM/9HBANqbld5sAgSqKjcHffTjZbl2blGQlpgicTkAQ9WSWzOUlpTaf 6W7A== X-Gm-Message-State: AOAM530vXlYF38TovmepkE99sfCpbtyhwDLWthktW6yCKxSzoBnXthhA 5KgLn5h/aUvuG8m9uH151AY0O6dMf/hPaQ== X-Received: by 2002:a05:6402:5153:: with SMTP id n19mr11353148edd.173.1618146614237; Sun, 11 Apr 2021 06:10:14 -0700 (PDT) Received: from debian.home (81-204-249-205.fixed.kpn.net. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id w2sm3983520eju.71.2021.04.11.06.10.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Apr 2021 06:10:13 -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 v2 1/6] dt-bindings: pwm: convert pwm-rockchip.txt to YAML Date: Sun, 11 Apr 2021 15:10:02 +0200 Message-Id: <20210411131007.21757-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 --- Changed V2: changed schema for clocks and clock-names --- .../devicetree/bindings/pwm/pwm-rockchip.txt | 27 ------- .../devicetree/bindings/pwm/pwm-rockchip.yaml | 91 ++++++++++++++++++++++ 2 files changed, 91 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..142ce85ce --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml @@ -0,0 +1,91 @@ +# 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: + - const: rockchip,rk3036-pwm + - const: rockchip,rk2928-pwm + - items: + - enum: + - rockchip,rv1108-pwm + - const: rockchip,rk3288-pwm + + reg: + maxItems: 1 + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + maxItems: 2 + + "#pwm-cells": + enum: [2, 3] + description: + Must be 2 (rk2928) or 3 (rk3288 and later). + See pwm.yaml for a description of the cell format. + +required: + - compatible + - reg + - "#pwm-cells" + +if: + properties: + compatible: + contains: + enum: + - rockchip,rv1108-pwm + +then: + properties: + clocks: + items: + - description: Used to derive the functional clock for the device. + - description: Used as the APB bus clock. + + clock-names: + items: + - const: pwm + - const: pclk + + required: + - clocks + - clock-names + +else: + properties: + clocks: + maxItems: 1 + description: + Used both to derive the functional clock + for the device and as the bus clock. + + required: + - clocks + +additionalProperties: false + +examples: + - | + #include + pwm0: pwm@20030000 { + compatible = "rockchip,rk2928-pwm"; + reg = <0x20030000 0x10>; + clocks = <&cru PCLK_PWM01>; + #pwm-cells = <2>; + }; -- 2.11.0