Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1722010pxm; Fri, 4 Mar 2022 02:04:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJycQjIVY/8k58c0zs9XG2/yIXx94j5lvJCtE3vHWc+zhZhuuY5BEwiUmAQGtUsqr44a8nA7 X-Received: by 2002:a17:90b:4b4b:b0:1be:fd9a:c279 with SMTP id mi11-20020a17090b4b4b00b001befd9ac279mr9949344pjb.83.1646388246645; Fri, 04 Mar 2022 02:04:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646388246; cv=none; d=google.com; s=arc-20160816; b=cJwOkbMzYgex76at4FXOl7sPkW/u2ax4nHUsoLYENBq5S/WTFZNLDEvxLtgQYW3rbL g0OMBOJUIU1Lq4sZRu6F+ZgnD3IEGEgLPx+vgW3/K3DV/i4CstgqLcixg0IOya4s3rI7 NClwHtCWgzrFUZ1GBSEmV6m6QRr0cJ+julRBlTz46t4I3wfZL7ovqWNX5bLe4SUuFyCP ktXPWD5KDiVdMtM0cYI4HTYWUOqJIZNT6d4ikFGaSPzxrIav6rM5reZgJvYRj/nIOAWI 1z2PMuI91gDUGfcdOrquwf72VKKEFUgYy5qzyc1btzjA8UrJCNbwm7KoifZJ2tbErr9C 9qow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wWVk1HdVKHKWZTkHXArYkJGtcXaktgPsJzA7MpWG2+A=; b=dOYJHy0nTwLCMD0SD1DSNDYZz+LpFavtj6vYfUbK+lFa0waD1eMzmFHbe6Ef/sXGTL XbLZNzhMgvIGcpJvf9dfcNfu2+Dx0+5ECyzY0KI6B6XKmYzoteIkZC36xF44PHFn8goi Y1deOmJ5wCDbTwwEOvDBKGse/1zhSuBWDNrbfLzNlF3sl87Ogo3GwQrJBZ4Q0E+PCle7 OdqcPMs9n0HnQfsQ7+ialzHf6TJ4h2RzLN9mct8yxuK2AlKAsLUKYf67vKqf+iE1n7A/ IO1rd/ibbsD0fGQyyPIpityO8lwpUuVQlOzijZ7kxamqMrvdfH18HfNm/n59Gn8aql1Y IGUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FSEdEhsp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e1-20020a656781000000b00378b905af35si4380371pgr.417.2022.03.04.02.03.50; Fri, 04 Mar 2022 02:04:06 -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=@kernel.org header.s=k20201202 header.b=FSEdEhsp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235545AbiCCXSw (ORCPT + 99 others); Thu, 3 Mar 2022 18:18:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231898AbiCCXSu (ORCPT ); Thu, 3 Mar 2022 18:18:50 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0E72A70E; Thu, 3 Mar 2022 15:18:03 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 455B761532; Thu, 3 Mar 2022 23:18:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2F7EC340F1; Thu, 3 Mar 2022 23:18:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646349482; bh=tlOHNfyRtXEFJ6xoJ1AtsupQm9XzW3NADGZEF72E09I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FSEdEhsphzeP07HC7WHYwdul0B2vKlmEIrKvi0FwBCC+QJLQQ6mr4OX0OMQOp6FYW tigRGG0MyZbrzSM66O2k5FQMbyZdAlUSNdK7RVosG2TvW2RTMY5GFQ5Ln6e20z+JPF ozi0nuP16NZZsa1lCfilUB9asttLe71PTDN7GxXuGLYyyU6dnWwRjlZowT4OTGARQW 2a3pRbPncrYYKmQgP69WtBPOimN3Xuusbgks8+l51Y4asforlD5I0/LmGZ0IJx8AkV JQnWJ0YMf6rsSviWCZigheHA1NOYMJvD054gRPpMh+SPuqOyJ7Al+YaYrvlwqxQEs7 faLc08eacbILA== Received: by mail-ed1-f46.google.com with SMTP id o1so7530082edc.3; Thu, 03 Mar 2022 15:18:02 -0800 (PST) X-Gm-Message-State: AOAM530hsYMDr16amKWivENSDcLRzJMUF4HduiBSGBsnWoBFzxqHemNN tyxhCx1UOhiQQjkO1LhTCYLcqed+QXkkwc4MFA== X-Received: by 2002:a05:6402:4384:b0:413:9e36:b56f with SMTP id o4-20020a056402438400b004139e36b56fmr25916622edc.280.1646349480795; Thu, 03 Mar 2022 15:18:00 -0800 (PST) MIME-Version: 1.0 References: <20220303211620.32456-1-david@ixit.cz> In-Reply-To: <20220303211620.32456-1-david@ixit.cz> From: Rob Herring Date: Thu, 3 Mar 2022 17:17:49 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] dt-bindings: timer: Tegra: Convert text bindings to yaml To: David Heidelberg Cc: Daniel Lezcano , Thomas Gleixner , Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Stephen Warren , ~okias/devicetree@lists.sr.ht, "linux-kernel@vger.kernel.org" , devicetree@vger.kernel.org, linux-tegra Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Thu, Mar 3, 2022 at 3:16 PM David Heidelberg wrote: > > Convert Tegra timer binding into yaml format. > > This commit also merge 3 text bindings with almost > identical content (differens in number of registers). > > Signed-off-by: David Heidelberg > --- > v2: > - reg: true -> reg: maxItems: 1 > --- > .../bindings/timer/nvidia,tegra-timer.yaml | 150 ++++++++++++++++++ > .../bindings/timer/nvidia,tegra20-timer.txt | 24 --- > .../bindings/timer/nvidia,tegra210-timer.txt | 36 ----- > .../bindings/timer/nvidia,tegra30-timer.txt | 28 ---- > 4 files changed, 150 insertions(+), 88 deletions(-) > create mode 100644 Documentation/devicetree/bindings/timer/nvidia,tegra-timer.yaml > delete mode 100644 Documentation/devicetree/bindings/timer/nvidia,tegra20-timer.txt > delete mode 100644 Documentation/devicetree/bindings/timer/nvidia,tegra210-timer.txt > delete mode 100644 Documentation/devicetree/bindings/timer/nvidia,tegra30-timer.txt > > diff --git a/Documentation/devicetree/bindings/timer/nvidia,tegra-timer.yaml b/Documentation/devicetree/bindings/timer/nvidia,tegra-timer.yaml > new file mode 100644 > index 000000000000..f0b401f80aff > --- /dev/null > +++ b/Documentation/devicetree/bindings/timer/nvidia,tegra-timer.yaml > @@ -0,0 +1,150 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/timer/nvidia,tegra-timer.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: NVIDIA Tegra timer > + > +maintainers: > + - Stephen Warren > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: nvidia,tegra210-timer > + then: > + properties: > + interrupts: > + # Either a single combined interrupt or up to 14 individual interrupts > + minItems: 1 > + maxItems: 14 > + description: > > + A list of 14 interrupts; one per each timer channels 0 through 13 > + > + - if: > + properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - nvidia,tegra114-timer > + - nvidia,tegra124-timer > + - nvidia,tegra132-timer > + - const: nvidia,tegra30-timer > + - items: > + - const: nvidia,tegra30-timer > + - const: nvidia,tegra20-timer > + then: > + properties: > + interrupts: > + # Either a single combined interrupt or up to 6 individual interrupts > + minItems: 1 > + maxItems: 6 > + description: > > + A list of 6 interrupts; one per each of timer channels 1 through 5, > + and one for the shared interrupt for the remaining channels. > + > + - if: > + properties: > + compatible: > + const: nvidia,tegra20-timer > + then: > + properties: > + interrupts: > + # Either a single combined interrupt or up to 4 individual interrupts > + minItems: 1 > + maxItems: 4 > + description: | > + A list of 4 interrupts; one per timer channel. > + > +properties: > + compatible: > + oneOf: > + - const: nvidia,tegra210-timer > + description: > > + The Tegra210 timer provides fourteen 29-bit timer counters and one 32-bit > + timestamp counter. The TMRs run at either a fixed 1 MHz clock rate derived > + from the oscillator clock (TMR0-TMR9) or directly at the oscillator clock > + (TMR10-TMR13). Each TMR can be programmed to generate one-shot, periodic, > + or watchdog interrupts. > + - items: > + - enum: > + - nvidia,tegra114-timer > + - nvidia,tegra124-timer > + - nvidia,tegra132-timer > + - const: nvidia,tegra30-timer > + - items: > + - const: nvidia,tegra30-timer > + - const: nvidia,tegra20-timer > + description: > > + The Tegra30 timer provides ten 29-bit timer channels, a single 32-bit free > + running counter, and 5 watchdog modules. The first two channels may also > + trigger a legacy watchdog reset. > + - const: nvidia,tegra20-timer > + description: > > + The Tegra20 timer provides four 29-bit timer channels and a single 32-bit free > + running counter. The first two channels may also trigger a watchdog reset. > + > + reg: > + maxItems: 1 > + > + interrupts: true > + > + clocks: > + maxItems: 1 > + > + clock-names: > + items: > + - const: timer > + > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + > +additionalProperties: false > + > +examples: > + - | > + #include > + timer@60005000 { > + compatible = "nvidia,tegra30-timer", "nvidia,tegra20-timer"; > + reg = <0x60005000 0x400>; > + interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH > + 0 1 IRQ_TYPE_LEVEL_HIGH > + 0 41 IRQ_TYPE_LEVEL_HIGH > + 0 42 IRQ_TYPE_LEVEL_HIGH > + 0 121 IRQ_TYPE_LEVEL_HIGH > + 0 122 IRQ_TYPE_LEVEL_HIGH>; The unhelpful bot warning is a new thing. 'interrupts' here must now have brackets around each entry to figure out the interrupt cell size. With that, Reviewed-by: Rob Herring > + clocks = <&tegra_car 214>; > + }; > + - | > + #include > + #include > + #include > + > + timer@60005000 { > + compatible = "nvidia,tegra210-timer"; > + reg = <0x60005000 0x400>; > + interrupts = , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + , > + ; > + clocks = <&tegra_car TEGRA210_CLK_TIMER>; > + clock-names = "timer"; > + };