From patchwork Fri Jan 13 10:33:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 642913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EC7BC54EBD for ; Fri, 13 Jan 2023 10:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241214AbjAMKeb (ORCPT ); Fri, 13 Jan 2023 05:34:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241114AbjAMKeP (ORCPT ); Fri, 13 Jan 2023 05:34:15 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E5334F138 for ; Fri, 13 Jan 2023 02:34:02 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id ss4so44038716ejb.11 for ; Fri, 13 Jan 2023 02:34:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+Gyn9HlBhvG4T1CTbJfaQi/2bfhTMYRBumH9jkT1kFo=; b=Dirg2tpLP8+rcNqEkyKVP6uRTQeGQGRa4uG2INybsbvSSXfqjmMb0/S+oki+yIiT8y 77gAnDPyH8DPq5FypF6XwFUD9ZnnPf3tT6G4KELGve2xLKpf4rPKIJcMHe+MfQWievwF sI7rOQtxcqsxq0vMkpe0zTrD7dZ/tiPzmUCjD//EFNZaBJkYG/qtC+YA2saJ5nubNuH7 /qPO/xthLIpBV2JPvUnXOKZhXWSQ3SbDooL69c0ii/uRATbOUZYMrj0MpX2+M4/n0EnX czZH/BrMx036PUOKqmL9Yr0RQWFKVyvOw5RCuxZSzOjdz4dopJ5N3mg90J80FvVwb3N5 NOFA== 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:message-id:reply-to; bh=+Gyn9HlBhvG4T1CTbJfaQi/2bfhTMYRBumH9jkT1kFo=; b=xvrvPhdBRrJ/dXG/OXUvJNXbFl8U9rctfMzcaURciReb+aXTmDA+KP4yvPxSOa9Yeh JitOuBLtJ93ROJ2bEPos70OMmiBTcqK2UG1CQcjrB6IuHeVM8G+zCQq/MOTl2n07so5K 6kPdB3o2fYw5c/xNoUxCU9a+HzKHcfc5MEnlHwRyEtyt36gsGvilAr1DDZKkJhIkCsp1 y+pHB7OKUP3LUOshju1Akg7vT5Y05yHe8dvPgmHH2Ar6WG2xHK7teEOeGgEWH9BZz/oJ gb1nu2Jvu32dy7r4qdb7p3LYzrpMh+FV1t5Dqcl1r2yAWX/7mZ6iLP/J5o9Gn/a6Ppf6 hn1w== X-Gm-Message-State: AFqh2koABRqaGfIL6gfxsDOtRbGVZfPf+QoR2VK6KQIXI92Hvn8hMA7u kxhCHpTPf9+N+ibWU22FqXUkIg== X-Google-Smtp-Source: AMrXdXuQvabCkxOh7cAxMXM4m2p4oeMARrjXif6sQoJ3LgBjWJMi3vYQ1AMC8eD/VWTBhI0JdvyAIw== X-Received: by 2002:a17:907:8e93:b0:7ae:bfec:74c7 with SMTP id tx19-20020a1709078e9300b007aebfec74c7mr73244720ejc.72.1673606041624; Fri, 13 Jan 2023 02:34:01 -0800 (PST) Received: from krzk-bin.. ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id qw25-20020a1709066a1900b007ae1e528390sm8296926ejc.163.2023.01.13.02.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jan 2023 02:34:01 -0800 (PST) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Wim Van Sebroeck , Guenter Roeck , Prakash Ranjan , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 6/7] dt-bindings: watchdog: qcom-wdt: merge MSM timer Date: Fri, 13 Jan 2023 11:33:45 +0100 Message-Id: <20230113103346.29381-7-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230113103346.29381-1-krzysztof.kozlowski@linaro.org> References: <20230113103346.29381-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Merge Qualcomm MSM timer bindings into watchdog, because the timer compatibles are already included here and the hardware is quite similar. While converting the MSM timer bindings, adjust clock-frequency property to take only one frequency, instead of two, because: 1. DT schema does not allow to frequencies, 2. The Linux timer driver reads only first frequency. Signed-off-by: Krzysztof Kozlowski Acked-by: Daniel Lezcano Reviewed-by: Rob Herring --- Changes since v1: 1. Add tag. 2. Correct clock-frequency description (Rob). --- .../bindings/timer/qcom,msm-timer.txt | 47 ------------------ .../bindings/watchdog/qcom-wdt.yaml | 49 +++++++++++++++++++ 2 files changed, 49 insertions(+), 47 deletions(-) delete mode 100644 Documentation/devicetree/bindings/timer/qcom,msm-timer.txt diff --git a/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt b/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt deleted file mode 100644 index 5e10c345548f..000000000000 --- a/Documentation/devicetree/bindings/timer/qcom,msm-timer.txt +++ /dev/null @@ -1,47 +0,0 @@ -* MSM Timer - -Properties: - -- compatible : Should at least contain "qcom,msm-timer". More specific - properties specify which subsystem the timers are paired with. - - "qcom,kpss-timer" - krait subsystem - "qcom,scss-timer" - scorpion subsystem - -- interrupts : Interrupts for the debug timer, the first general purpose - timer, and optionally a second general purpose timer, and - optionally as well, 2 watchdog interrupts, in that order. - -- reg : Specifies the base address of the timer registers. - -- clocks: Reference to the parent clocks, one per output clock. The parents - must appear in the same order as the clock names. - -- clock-names: The name of the clocks as free-form strings. They should be in - the same order as the clocks. - -- clock-frequency : The frequency of the debug timer and the general purpose - timer(s) in Hz in that order. - -Optional: - -- cpu-offset : per-cpu offset used when the timer is accessed without the - CPU remapping facilities. The offset is - cpu-offset + (0x10000 * cpu-nr). - -Example: - - timer@200a000 { - compatible = "qcom,scss-timer", "qcom,msm-timer"; - interrupts = <1 1 0x301>, - <1 2 0x301>, - <1 3 0x301>, - <1 4 0x301>, - <1 5 0x301>; - reg = <0x0200a000 0x100>; - clock-frequency = <19200000>, - <32768>; - clocks = <&sleep_clk>; - clock-names = "sleep"; - cpu-offset = <0x40000>; - }; diff --git a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml index b7fc57f4800e..837ce9112071 100644 --- a/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/qcom-wdt.yaml @@ -10,6 +10,9 @@ maintainers: - Sai Prakash Ranjan properties: + $nodename: + pattern: "^(watchdog|timer)@[0-9a-f]+$" + compatible: oneOf: - items: @@ -48,6 +51,20 @@ properties: clocks: maxItems: 1 + clock-names: + items: + - const: sleep + + clock-frequency: + description: + The frequency of the general purpose timer in Hz. + + cpu-offset: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Per-CPU offset used when the timer is accessed without the CPU remapping + facilities. The offset is cpu-offset + (0x10000 * cpu-nr). + interrupts: minItems: 1 maxItems: 5 @@ -67,12 +84,27 @@ allOf: const: qcom,kpss-wdt then: properties: + clock-frequency: false + cpu-offset: false interrupts: minItems: 1 items: - description: Bark - description: Bite + else: + properties: + interrupts: + minItems: 3 + items: + - description: Debug + - description: First general purpose timer + - description: Second general purpose timer + - description: First watchdog + - description: Second watchdog + required: + - clock-frequency + unevaluatedProperties: false examples: @@ -86,3 +118,20 @@ examples: interrupts = ; timeout-sec = <10>; }; + + - | + #include + + watchdog@200a000 { + compatible = "qcom,kpss-wdt-ipq8064", "qcom,kpss-timer", "qcom,msm-timer"; + interrupts = , + , + , + , + ; + reg = <0x0200a000 0x100>; + clock-frequency = <25000000>; + clocks = <&sleep_clk>; + clock-names = "sleep"; + cpu-offset = <0x80000>; + };