From patchwork Mon Dec 12 16:35:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 32437 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2342301wrr; Mon, 12 Dec 2022 08:36:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf6oETMd29wPdmfNSqj+fmkN+5tC6PLy7HRmVl22mmuKcle8iqpdYGqUpNUGXKkjqHgvifN8 X-Received: by 2002:a17:90a:f0d5:b0:221:7043:74c4 with SMTP id fa21-20020a17090af0d500b00221704374c4mr1310749pjb.13.1670863000931; Mon, 12 Dec 2022 08:36:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670863000; cv=none; d=google.com; s=arc-20160816; b=M2UWQDv+yMQcDKgagDMgfcIMauDmZsnCZaP2BU+ZNfDnKHxDAeJaPzaN8voIizYTDJ KdUw3dWOkX3X7h2yPXQzvh7yHZh+iZniNyWw1XJbnNDkPJLMXlSgXZwBwjWBzMt1Df2l 4m9FFY8xNjoPBiigN6U2rzRJa6YfwElKGUCcxPcc3hGMq+BB3sYQ+RZzze0FIIZIBvQy Q/ua7hg8YyOkm4Ih2T7icxuLiNDc98uEEaziVAlLIvWQROWbwKmHC9lidNIy2lwloN1g SP0AacH+pGBR77ScJQV/onq3/8HuNAcdVW0vGTVWYi2l7NTwaWCs4el8Lj1OotohcYkR UAeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z5YdFqvc4mvoUpjnEdg6UwW9ItZt44+OzF74arwCzxM=; b=IermMtoH9lfz5AKY8Cm//dcDDZ426CP6eu0qfoO0YAw0r3txr6RSCqpyGiU4UbWjkN zITZbJajEktkJFpNZ3Eio7jNgqHVkhUmp4hockwx4ESxBPsXiDo1/cOSWGPptRt5D/wY /sH7rJ/GTkda66kdXxjT0vf694MjBXg/+ta/6BBDTjmWpBS7lbJBYx8l9WZGkJ5+df9e XUty/SU61XFAPS/mqPfoec1QyTHh+gAt9NXx5cVD+U0GfPfAw9qVXVp0/K9SchS8XBRf Gb4I+lm9KttaC7o7FZx0zZF/CAhCjvEZvVm6USqgcw/R/ZVlBsa2Nzqhw3P7LvuFY2kV B8tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ta3FbO7e; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pq14-20020a17090b3d8e00b0020087bc6415si9731968pjb.16.2022.12.12.08.36.26; Mon, 12 Dec 2022 08:36:40 -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=@linaro.org header.s=google header.b=ta3FbO7e; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232590AbiLLQfx (ORCPT + 99 others); Mon, 12 Dec 2022 11:35:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232277AbiLLQfp (ORCPT ); Mon, 12 Dec 2022 11:35:45 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7497462E7 for ; Mon, 12 Dec 2022 08:35:44 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id p8so274618lfu.11 for ; Mon, 12 Dec 2022 08:35:44 -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=Z5YdFqvc4mvoUpjnEdg6UwW9ItZt44+OzF74arwCzxM=; b=ta3FbO7eAitz9phNwFQsTIDDNTTY7yhEWS8RRtjq2+yKHaocAr3LuCL5Ab5XaLVwcL NVB+CTo76h+Dxkd9gqxLtuHpDGHO9UiggO+i7WAKyNLP4UfYCJrO4GaGnLfyyMNH/Acf KHXZ41jSMnPI2K8Qnc3TJ9HEEz175tu3FYPWq3/uC9knaS3VGzhCwhPenHWbuEQvnY/D 4eM6ZCNlCiyMBafAS/6Juj1ny23kRutmdgztSLI9HzmEBLESIUQ5CJdNqDUPpsPpe4Xl 83SZwjs039OX1oAGe+KUM/6iH++7ml/M1+VvXnQqsF6vDTF2uRwjHTCgr0zvysRhyNv4 +BZQ== 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=Z5YdFqvc4mvoUpjnEdg6UwW9ItZt44+OzF74arwCzxM=; b=c8Lus0Unk2pVyx6uhR8RQ9qC/tai7W1huTy6vdqsNRp6NgwyCpC9AN5A/YCfJNER7j H/qPiNwm2oxFcxam2tI7XxCIi/PzkxKJeFO+mcSeE3itkTKuyio6/+RM3QwtUVqrAxHF pxq289Q6KxdgtlK1WYZnDRNdqxt0nVYux8CVgsx1+oEk3GaUCj3X9DqLsb0353jJKpNk Sheiw6kniLN+9vXaMeK3oJUcZHM3qAuXgGR62JRX16fc06RwLO/BFhipZER0jvENMazA hUw4XLbKHRvUsxESXor+gwaPc9j0i/UQjHVi3Ca46gMvsVZHFTAPnnO4mrGyz3jeN0Xo tTCQ== X-Gm-Message-State: ANoB5pnRFRahMHgB8MAb70HXmRxvRRvUnRZJKqT2ypVN5qO3BNnMhEjt E1/O/xwkSnwlmMGrdEAW++q2o1KQUzD3OyAw6gE= X-Received: by 2002:a19:a41a:0:b0:4b5:8fee:1d71 with SMTP id q26-20020a19a41a000000b004b58fee1d71mr3660656lfc.64.1670862944027; Mon, 12 Dec 2022 08:35:44 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id v16-20020ac25b10000000b004acff58a951sm29209lfn.133.2022.12.12.08.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 08:35:43 -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 Cc: Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org Subject: [PATCH 06/12] dt-bindings: watchdog: qcom-wdt: merge MSM timer Date: Mon, 12 Dec 2022 17:35:26 +0100 Message-Id: <20221212163532.142533-6-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221212163532.142533-1-krzysztof.kozlowski@linaro.org> References: <20221212163532.142533-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752026841747323346?= X-GMAIL-MSGID: =?utf-8?q?1752026841747323346?= 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: Guenter Roeck --- .../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..697caf1937cc 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 in that order. + + 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>; + };