From patchwork Sat Apr 30 06:01:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 568296 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 C6647C4332F for ; Sat, 30 Apr 2022 13:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382657AbiD3NNM (ORCPT ); Sat, 30 Apr 2022 09:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382636AbiD3NNL (ORCPT ); Sat, 30 Apr 2022 09:13:11 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A38082D02; Sat, 30 Apr 2022 06:09:49 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id bv19so20112381ejb.6; Sat, 30 Apr 2022 06:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e6HTTfg5BzZgVlVHutoMY6UjT5iplTny53rcKCZeVPU=; b=Ak6tJMw3Ee5rB0qpC5Ce8AqqaZ1ZCO42tWCz1oWG/fzyCoAM8RVhWHgF9tmdsabZPZ glQaSRJhClgRQBDXZd0gOGPjaQClubtfEBiL8KRPVOEKdPiigIATUonSCVr8wRCxWVxh qihXSZ4s+X+A98qCEK1LTkLh+1l7CP/Ec67N+SRdaK5Y2BCfJxnPPXfEOsW1dUadh1iP sfsldSG/lAlMxS5PyCyLlphzCTqeFyI+5mUcJ0snIEZ379N0OkAxhs+m6lFhyuSzHm05 DE+sibN6SVyWurVQLxgUX9esNFnEopWtFwGMN8bRrHy57n0OpNBDpVFtnozwd9XJgn8n JC7Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=e6HTTfg5BzZgVlVHutoMY6UjT5iplTny53rcKCZeVPU=; b=cPjVEWjUHSfMYCIyweCdpx2gVZ31B2lR8zxuu5fPb3xqQtfbf6d2pgGHnYIRF9nt+f f+YHyu57/5Fi0auIc0yYMDivHp9j82HX4nVEBZicFbXqUfuleSsR4gKwYes8DQWyd0pm nBgj2Cln+wzGFpcBLPgk5fo1il4CWiC3H/tGBDSX1OW3flrPZGc27GbpR/LCOyhwylj2 qiZ7SOTLCOFzS1qRho611KkDY+oXwr4JZN4vzFDtCv8+6O4sL0Zk8RUnWWus/qO/ngqc 28pxPNG9swhk1LrcjsgX5X/hXvIipp5DCVTywzwu4fA1/W2TmvH+xhQA9mnQAbuxNm5R 1Jkg== X-Gm-Message-State: AOAM531OTH3yeTgFjnsUlw6rFLtmlHjnYV8zRiqL2IQfZe8P/S+ukJlL vJ9gGFDi/1jLvoniAliv868= X-Google-Smtp-Source: ABdhPJwrjUbofybMdx669nGMDvgymdKTcsJGNRCujusycVH6ibGTO8oqf7KYHduc7wjJE8HxdRyM2w== X-Received: by 2002:a17:906:414f:b0:6f3:e324:4aae with SMTP id l15-20020a170906414f00b006f3e3244aaemr3807098ejk.727.1651324187991; Sat, 30 Apr 2022 06:09:47 -0700 (PDT) Received: from localhost.localdomain (93-42-70-190.ip85.fastwebnet.it. [93.42.70.190]) by smtp.googlemail.com with ESMTPSA id u5-20020a056402064500b0042617ba63a0sm4142404edx.42.2022.04.30.06.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 06:09:47 -0700 (PDT) From: Ansuel Smith To: Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Ansuel Smith , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org Cc: Krzysztof Kozlowski , Rob Herring Subject: [PATCH v2 1/3] dt-bindings: clock: Convert qcom,krait-cc to yaml Date: Sat, 30 Apr 2022 08:01:23 +0200 Message-Id: <20220430060125.9124-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220430060125.9124-1-ansuelsmth@gmail.com> References: <20220430060125.9124-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert qcom,krait-cc to yaml Documentation. Signed-off-by: Ansuel Smith Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring --- .../bindings/clock/qcom,krait-cc.txt | 34 ----------- .../bindings/clock/qcom,krait-cc.yaml | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 34 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/qcom,krait-cc.txt create mode 100644 Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml diff --git a/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt b/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt deleted file mode 100644 index 030ba60dab08..000000000000 --- a/Documentation/devicetree/bindings/clock/qcom,krait-cc.txt +++ /dev/null @@ -1,34 +0,0 @@ -Krait Clock Controller - -PROPERTIES - -- compatible: - Usage: required - Value type: - Definition: must be one of: - "qcom,krait-cc-v1" - "qcom,krait-cc-v2" - -- #clock-cells: - Usage: required - Value type: - Definition: must be 1 - -- clocks: - Usage: required - Value type: - Definition: reference to the clock parents of hfpll, secondary muxes. - -- clock-names: - Usage: required - Value type: - Definition: must be "hfpll0", "hfpll1", "acpu0_aux", "acpu1_aux", "qsb". - -Example: - - kraitcc: clock-controller { - compatible = "qcom,krait-cc-v1"; - clocks = <&hfpll0>, <&hfpll1>, <&acpu0_aux>, <&acpu1_aux>, ; - clock-names = "hfpll0", "hfpll1", "acpu0_aux", "acpu1_aux", "qsb"; - #clock-cells = <1>; - }; diff --git a/Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml b/Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml new file mode 100644 index 000000000000..e879bfbe67ac --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,krait-cc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,krait-cc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Krait Clock Controller + +maintainers: + - Ansuel Smith + +description: | + Qualcomm Krait Clock Controller used to correctly scale the CPU and the L2 + rates. + +properties: + compatible: + enum: + - qcom,krait-cc-v1 + - qcom,krait-cc-v2 + + clocks: + items: + - description: phandle to hfpll for CPU0 mux + - description: phandle to hfpll for CPU1 mux + - description: phandle to CPU0 aux clock + - description: phandle to CPU1 aux clock + - description: phandle to QSB fixed clk + + clock-names: + items: + - const: hfpll0 + - const: hfpll1 + - const: acpu0_aux + - const: acpu1_aux + - const: qsb + + '#clock-cells': + const: 1 + +required: + - compatible + - clocks + - clock-names + - '#clock-cells' + +additionalProperties: false + +examples: + - | + clock-controller { + compatible = "qcom,krait-cc-v1"; + clocks = <&hfpll0>, <&hfpll1>, + <&acpu0_aux>, <&acpu1_aux>, <&qsb>; + clock-names = "hfpll0", "hfpll1", + "acpu0_aux", "acpu1_aux", "qsb"; + #clock-cells = <1>; + }; +... From patchwork Sat Apr 30 06:01:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 568295 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 0A2D3C4167B for ; Sat, 30 Apr 2022 13:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382664AbiD3NNO (ORCPT ); Sat, 30 Apr 2022 09:13:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382658AbiD3NNM (ORCPT ); Sat, 30 Apr 2022 09:13:12 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 920A98233A; Sat, 30 Apr 2022 06:09:50 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id gh6so20195854ejb.0; Sat, 30 Apr 2022 06:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2jO8iQFRsavkZH0i8n1gjUFOf09L/MY+4sf/fbVG9MQ=; b=UQDpkKpV/4lKGFo2REi9G7aOaeDIbB1Lz6vRyjvU4okPl/yfL125mJnZLyZvkabIYW M9A7fcfO76f6rWTyGDr3dzkNnn0kegvLSKax4Us5OUNar59GHf15wcjuZT6+GUHZYRlH ZV+RWTRLyGfvwR5qldbJ1gRji4zrMkJkRYbBcDdZPu2x3RZ4btbxBOhu/MrY2cqi+t4R DDv+AiLoz2Ux5/vr+PL2ke5IjeZCBaPzTIWob0hQ5TA/qLkTGqYTScy6NF35iCYLqy6Q iS4liqN3xNvTy63GoHPz4Z+fsQaLqKYIrQrRmz5m84TNXFvQ3a+neRWdR5zF8Pdt1raD v94g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=2jO8iQFRsavkZH0i8n1gjUFOf09L/MY+4sf/fbVG9MQ=; b=1trVe3O3/q+fEKgUv/7bj/VQwo6dqibrT7lE2Ow4WacRX0XveYZVX5YhVhCyujxCW/ m8zTyRkK4V8L5wNpU413zTT/zVlM7Vstlnkd6ibn7QUO3Gy/pw32ZoPAq8J454pMPkJx EjZ67Abeqp3XIhiuaRSAsY0mCV1bQbMY+atMrPx7EiD1AyMb0HBPmeT2CJjhV8/7c/+P ES6UW3ed9iKeCt9WlGLUm6e/HWZ98vtHQhIzXeGNxurW3ey8HA6wcamc3QdG6adnKY5w weIafSxjHSSGs8lq+7+SXgbU513v3IZ/mUc/AWHeqHr9KKp3kDV/xACvKVHRlWIqBXnJ tRmw== X-Gm-Message-State: AOAM531i0ETB+Rd19PfbpSbctV0pahx1i8XUS0k0EkpvRdgI0TLYNsIw D48Gx3Yyln3OZFOatTsjZ14= X-Google-Smtp-Source: ABdhPJyQPYQax1z5uhUJu/4dr81kkHvXEcQ8Fh+cREcpHXAO0gxojNp3tiMnEZDZiMEG480y0qEwcw== X-Received: by 2002:a17:907:6282:b0:6e0:c64a:60a7 with SMTP id nd2-20020a170907628200b006e0c64a60a7mr3747466ejc.349.1651324188976; Sat, 30 Apr 2022 06:09:48 -0700 (PDT) Received: from localhost.localdomain (93-42-70-190.ip85.fastwebnet.it. [93.42.70.190]) by smtp.googlemail.com with ESMTPSA id u5-20020a056402064500b0042617ba63a0sm4142404edx.42.2022.04.30.06.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Apr 2022 06:09:48 -0700 (PDT) From: Ansuel Smith To: Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Ansuel Smith , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 2/3] dt-bindings: arm: msm: Convert kpss-acc driver Documentation to yaml Date: Sat, 30 Apr 2022 08:01:24 +0200 Message-Id: <20220430060125.9124-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220430060125.9124-1-ansuelsmth@gmail.com> References: <20220430060125.9124-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Convert kpss-acc driver Documentation to yaml. The original Documentation was wrong all along. Fix it while we are converting it. The example was wrong as kpss-acc-v2 should only expose the regs but we don't have any driver that expose additional clocks. The kpss-acc driver is only specific to v1. For this exact reason, limit all the additional bindings (clocks, clock-names, clock-output-names and #clock-cells) to v1 and also flag that these bindings should NOT be used for v2. Signed-off-by: Ansuel Smith Reviewed-by: Krzysztof Kozlowski --- .../bindings/arm/msm/qcom,kpss-acc.txt | 49 ---------- .../bindings/arm/msm/qcom,kpss-acc.yaml | 94 +++++++++++++++++++ 2 files changed, 94 insertions(+), 49 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt create mode 100644 Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt deleted file mode 100644 index 7f696362a4a1..000000000000 --- a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.txt +++ /dev/null @@ -1,49 +0,0 @@ -Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) - -The KPSS ACC provides clock, power domain, and reset control to a Krait CPU. -There is one ACC register region per CPU within the KPSS remapped region as -well as an alias register region that remaps accesses to the ACC associated -with the CPU accessing the region. - -PROPERTIES - -- compatible: - Usage: required - Value type: - Definition: should be one of: - "qcom,kpss-acc-v1" - "qcom,kpss-acc-v2" - -- reg: - Usage: required - Value type: - Definition: the first element specifies the base address and size of - the register region. An optional second element specifies - the base address and size of the alias register region. - -- clocks: - Usage: required - Value type: - Definition: reference to the pll parents. - -- clock-names: - Usage: required - Value type: - Definition: must be "pll8_vote", "pxo". - -- clock-output-names: - Usage: optional - Value type: - Definition: Name of the output clock. Typically acpuX_aux where X is a - CPU number starting at 0. - -Example: - - clock-controller@2088000 { - compatible = "qcom,kpss-acc-v2"; - reg = <0x02088000 0x1000>, - <0x02008000 0x1000>; - clocks = <&gcc PLL8_VOTE>, <&gcc PXO_SRC>; - clock-names = "pll8_vote", "pxo"; - clock-output-names = "acpu0_aux"; - }; diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml new file mode 100644 index 000000000000..707a81a6c30e --- /dev/null +++ b/Documentation/devicetree/bindings/arm/msm/qcom,kpss-acc.yaml @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/msm/qcom,kpss-acc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) + +maintainers: + - Ansuel Smith + +description: | + The KPSS ACC provides clock, power domain, and reset control to a Krait CPU. + There is one ACC register region per CPU within the KPSS remapped region as + well as an alias register region that remaps accesses to the ACC associated + with the CPU accessing the region. + +properties: + compatible: + enum: + - qcom,kpss-acc-v1 + - qcom,kpss-acc-v2 + + reg: + items: + - description: Base address and size of the register region + - description: Optional base address and size of the alias register region + + clocks: + items: + - description: phandle to pll8_vote + - description: phandle to pxo_board + + clock-names: + items: + - const: pll8_vote + - const: pxo + + clock-output-names: + description: Name of the aux clock. Krait can have at most 4 cpu. + enum: + - acpu0_aux + - acpu1_aux + - acpu2_aux + - acpu3_aux + + '#clock-cells': + const: 0 + +required: + - compatible + - reg + +allOf: + - if: + properties: + compatible: + contains: + const: qcom,kpss-acc-v1 + then: + required: + - clocks + - clock-names + - clock-output-names + - '#clock-cells' + else: + properties: + clocks: false + clock-names: false + clock-output-names: false + '#clock-cells': false + +additionalProperties: false + +examples: + - | + #include + + clock-controller@2088000 { + compatible = "qcom,kpss-acc-v1"; + reg = <0x02088000 0x1000>, <0x02008000 0x1000>; + clocks = <&gcc PLL8_VOTE>, <&pxo_board>; + clock-names = "pll8_vote", "pxo"; + clock-output-names = "acpu0_aux"; + #clock-cells = <0>; + }; + + - | + clock-controller@f9088000 { + compatible = "qcom,kpss-acc-v2"; + reg = <0xf9088000 0x1000>, + <0xf9008000 0x1000>; + }; +...