From patchwork Wed Jan 26 16:00:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 1584531 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=u9eCTlZ3; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4JkT2q6rcPz9t6g for ; Thu, 27 Jan 2022 03:00:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233591AbiAZQAe (ORCPT ); Wed, 26 Jan 2022 11:00:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233375AbiAZQAd (ORCPT ); Wed, 26 Jan 2022 11:00:33 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D8EBC06173B for ; Wed, 26 Jan 2022 08:00:33 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id r25so9891873wrc.12 for ; Wed, 26 Jan 2022 08:00:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ckaniTJrXjFPNb9ajEebiXyBklsXtwYbMy6SavKwAPM=; b=u9eCTlZ3WjziSPAVIm0Ax4tRzo2FcWclSJjBo/KTgbOPEK7FgC4dhT6UeXxfefSq7W 4MLT64OHLOE1LDLFxA2+WNQ6p+nx+3M9IZhe3UemH3Nz8LGfIYGvKNxQWQFn+xs6Ssc/ TiBAVP15NBUMyXEmqAHSSRh34Og8zzlbu74MBPSB4YC91AtLUXayH/x9svmGNAV3cddC /CSirsz73Lm9LvINd56Dy8qSOjd9HX9DxgEqJ/qwvmzVhS9y4k9vcm1L+96DozIsqLRH qZI8jVyDZ6xRFeVFZo3IOPtgZFxs/cmyhCEU7FbUkQZrAHAYqFux8vw4MdE8tY3lH3De Vb/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ckaniTJrXjFPNb9ajEebiXyBklsXtwYbMy6SavKwAPM=; b=uEGWrqS/nIO0nPZLo3AlmUshA+ROiWpW5/0jdhqEdP4oJxWc967c2LpA8JisltaONY 3XUfoc6rA4ET4jCs6ZjxnfeFTnXFOnfkKv7UAy6HYMjVi6zTT18oTn0P/1E/sG6Qr8g4 WV/rEmvNluuZ2ZwIHM9anENm8Hf2WSQ83heglWyU9t77lk15+oahiCXHFox/LKWTdmk6 b5md4d3Z7xZnQ+crVLmyeMjz7PQfhpM/2bYCPi7uS4fSrUtIxzO92b59tLIMtx4uBdJr lKKKht+a+4QnxmSi2v7EpdvKglrqTM1kcWNahffS8saUAdNYNmg1rsRdawyvJDcVI+qc JA6g== X-Gm-Message-State: AOAM532JUO+nvN9dfg3n3YYAPfM9DtqPhDuMY1jj61FfZDPzPnyx/5FN ugwith89q5a07RTyq7H8J87vxQ== X-Google-Smtp-Source: ABdhPJwcNs2MkAUvk6cLg4u2AE64qp2yxfqutljtC9X6uhKZNMfN7AsTKpM9jVCR1Hj5VkwWMQLT8A== X-Received: by 2002:a5d:414c:: with SMTP id c12mr23694666wrq.68.1643212832009; Wed, 26 Jan 2022 08:00:32 -0800 (PST) Received: from localhost.localdomain (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id u3sm10253128wrs.55.2022.01.26.08.00.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 08:00:30 -0800 (PST) From: Corentin Labbe To: daniel.lezcano@linaro.org, robh+dt@kernel.org, tglx@linutronix.de Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH v2] dt-bindings: timer: Convert faraday,fttmr010 to yaml Date: Wed, 26 Jan 2022 16:00:21 +0000 Message-Id: <20220126160021.3537591-1-clabbe@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Converts timer/faraday,fttmr010.txt to yaml. Signed-off-by: Corentin Labbe --- Changes since v1: - added moxart example - relaxed some contraints as driver only support one clock and one interrupt (as used by moxa,moxart-timer) .../bindings/timer/faraday,fttmr010.txt | 38 -------- .../bindings/timer/faraday,fttmr010.yaml | 88 +++++++++++++++++++ 2 files changed, 88 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/timer/faraday,fttmr010.txt create mode 100644 Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml diff --git a/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt b/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt deleted file mode 100644 index 3cb2f4c98d64..000000000000 --- a/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt +++ /dev/null @@ -1,38 +0,0 @@ -Faraday Technology timer - -This timer is a generic IP block from Faraday Technology, embedded in the -Cortina Systems Gemini SoCs and other designs. - -Required properties: - -- compatible : Must be one of - "faraday,fttmr010" - "cortina,gemini-timer", "faraday,fttmr010" - "moxa,moxart-timer", "faraday,fttmr010" - "aspeed,ast2400-timer" - "aspeed,ast2500-timer" - "aspeed,ast2600-timer" - -- reg : Should contain registers location and length -- interrupts : Should contain the three timer interrupts usually with - flags for falling edge - -Optionally required properties: - -- clocks : a clock to provide the tick rate for "faraday,fttmr010" -- clock-names : should be "EXTCLK" and "PCLK" for the external tick timer - and peripheral clock respectively, for "faraday,fttmr010" -- syscon : a phandle to the global Gemini system controller if the compatible - type is "cortina,gemini-timer" - -Example: - -timer@43000000 { - compatible = "faraday,fttmr010"; - reg = <0x43000000 0x1000>; - interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */ - <15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */ - <16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */ - clocks = <&extclk>, <&pclk>; - clock-names = "EXTCLK", "PCLK"; -}; diff --git a/Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml b/Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml new file mode 100644 index 000000000000..db9fb171ea49 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/faraday,fttmr010.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Faraday Technology timer + +maintainers: + - Linus Walleij + +description: | + This timer is a generic IP block from Faraday Technology, embedded in the + Cortina Systems Gemini SoCs and other designs. + +properties: + compatible: + oneOf: + - const: faraday,fttmr010 + - items: + - const: cortina,gemini-timer + - const: faraday,fttmr010 + - items: + - const: moxa,moxart-timer + - const: faraday,fttmr010 + - const: aspeed,ast2400-timer + - const: aspeed,ast2500-timer + - const: aspeed,ast2600-timer + + reg: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 3 + description: Should contain the three timer interrupts usually with flags for falling edge + + clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + items: + - const: "PCLK" + - const: "EXTCLK" + + syscon: + $ref: /schemas/types.yaml#/definitions/phandle + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + /* taken from arch/arm/boot/dts/gemini.dtsi */ + timer@43000000 { + compatible = "faraday,fttmr010"; + reg = <0x43000000 0x1000>; + interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */ + <15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */ + <16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */ + clocks = <&extclk>, <&pclk>; + clock-names = "PCLK", "EXTCLK"; + syscon = <&syscon>; + }; + - | + #include + /* taken from arch/arm/boot/dts/moxart.dtsi */ + timer: timer@98400000 { + compatible = "moxa,moxart-timer", "faraday,fttmr010"; + reg = <0x98400000 0x42>; + interrupts = <19 IRQ_TYPE_EDGE_FALLING>; + clocks = <&clk_apb>; + clock-names = "PCLK"; + }; +...