From patchwork Wed Feb 1 18:36:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 51517 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp443419wrn; Wed, 1 Feb 2023 10:38:47 -0800 (PST) X-Google-Smtp-Source: AK7set80oUbzJR9KfbmDY4jFnOfLCiupCsxd3f/ZYlyrtKGCTjGBL+Bdc2+6usyGn5f1uvwx2wmx X-Received: by 2002:a17:90a:4b45:b0:230:3af9:183 with SMTP id o5-20020a17090a4b4500b002303af90183mr1330959pjl.20.1675276727444; Wed, 01 Feb 2023 10:38:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675276727; cv=none; d=google.com; s=arc-20160816; b=stcjn/d04B27N7AHWWaR4mK1c6KLA+9caIBYtvQH9f3ImgNcO5xEPF4Wtg+MMOPrux wPHQXo8+w3crucO3LYuU+JUi8lFQzunVp/j2UA6JG12SxE78LuQFbxzuq+zJbgLDvlpi grfLrjm9UwSTsy3SZb1I8dLVvXeyxsn4UE4rp7LCvSKgMst2XPz7C14zdyHHNdVcwfm5 Y9s5deVniA2RHf3uBsRr+EyirSYrdVFduCb+TFAD2dwq+H+tkXxX8EPiWU4uEBH7zaJT EEiReAw6PWpzsWOILUt7Yy2G5orEgKAlTsdAMfjlkPivU+FI/0eS0SdU3qXkrNJjIwvR EOvg== 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=VugfDnbVGJaahf/oLca3GRkNKUdU4yMW4xYQ5pl9Ev0=; b=FPp6OTPNBlpiqGd+DRgDXWCc2NTpSj6YIADtGudcztcuZ+29OdiIVr/AitQRV56V/J kGAcZN0OAA51DGFIDsiphGgptmUBkJ1SSMLVW5hn855bf5FUf+Bbu1UUBJLJ7vaWc/Sv vNqBxM6D0xzMkFKKLG8cTA0/0xrKd0Jkgi9WCI+uluQp4vA2xEIeJ+fxG3uVny+wsjBW gSn2SbVHEZGqHn3Rr+lEzr61ggQNBIy2ghhYzqoJz+q6r6TmzwPUdyFGZCxw1pJ+6kjW 3aM7Zo4KY2q9+3XQAju2yAQFtuq/ep+sWSGUO9mBspWOP6kXgBNa+sDQKhfCbkxCXqG5 TpkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tGXEf0in; 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 np6-20020a17090b4c4600b00229f5cf70f9si2752546pjb.107.2023.02.01.10.38.35; Wed, 01 Feb 2023 10:38:47 -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=tGXEf0in; 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 S232277AbjBAShk (ORCPT + 99 others); Wed, 1 Feb 2023 13:37:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232083AbjBAShW (ORCPT ); Wed, 1 Feb 2023 13:37:22 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F51C80176 for ; Wed, 1 Feb 2023 10:36:51 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id cw4so13514349edb.13 for ; Wed, 01 Feb 2023 10:36:51 -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=VugfDnbVGJaahf/oLca3GRkNKUdU4yMW4xYQ5pl9Ev0=; b=tGXEf0inP2Pw2LnTDwfZX+RwJPE8gldwNQdsQUvGROSrMyUhghrRkhLpWkonoZud9j OVu1QwLfJ3gzGv89ngV/2b9oV1XAlg+IDEN2gWGcC4VyljgoMrLjBEyqeglngEKn6/UE trH4EHO8omg0eMz5HUjwcoVVLGxWkQcufoHsmV2Us2R2pgkRruXxPOsfVGfKMea03U7J DLljkWoi2nBdWh5H45PMLNhztUsovu41DhzDCsi95VtjfNfPVNI2/NuArXXyJDY5gw58 8oaCtf3GPf7olyawupf+ymoLZFpRKnLIBcQtN3ceuy4HQWIf7W9HOthAMhAjlGjOjplr RVKA== 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=VugfDnbVGJaahf/oLca3GRkNKUdU4yMW4xYQ5pl9Ev0=; b=NbAROvl9EDRJpqaAW5tD/J7hOknHWWzb7n9P1eqa736g7QHFU+Ahsy4eaM3rpzcQBG gPB6WTm1M45DyAD3wmS2Y3g6R2fVCFqHB2FaigbsECB3tnMwMhY8beX70CmTZqH29thl iWuwOJCcBWsGK2uHU2P0jRu8Q54ZUTIaM8bOdXsKWeVLHyK3HZzyunsl85lo0zS+5Olb uBKJSLC3KF84GRHnWKNSxEVz4/z/c6M1O5xwj0Sun25AfWK6jX+1G5kELOaShvHhVxnf dgX3bw766uupIg7OJUm/xI+hGvOplZMghEX/p73HI/1oEQL/h9jAblwejlmmK9UiSf3O a+zg== X-Gm-Message-State: AO0yUKVtrOGcRmv/cm2bkPe4ZyKCUXsg6CcCdrfKuhrErNLiH6+nq1CP DPdoevG51UQNZQEnQPY9GduLAA== X-Received: by 2002:a50:9304:0:b0:4a2:7489:a70a with SMTP id m4-20020a509304000000b004a27489a70amr3564955eda.22.1675276604184; Wed, 01 Feb 2023 10:36:44 -0800 (PST) Received: from localhost.localdomain (abyl20.neoplus.adsl.tpnet.pl. [83.9.31.20]) by smtp.gmail.com with ESMTPSA id t13-20020a50d70d000000b00458b41d9460sm10297508edi.92.2023.02.01.10.36.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 10:36:43 -0800 (PST) From: Konrad Dybcio To: linux-arm-msm@vger.kernel.org, andersson@kernel.org, agross@kernel.org, krzysztof.kozlowski@linaro.org Cc: marijn.suijten@somainline.org, Konrad Dybcio , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 07/10] dt-bindings: clock: Add Qcom SM6375 GPUCC Date: Wed, 1 Feb 2023 19:36:23 +0100 Message-Id: <20230201183626.351211-8-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230201183626.351211-1-konrad.dybcio@linaro.org> References: <20230201183626.351211-1-konrad.dybcio@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?1756654970097037724?= X-GMAIL-MSGID: =?utf-8?q?1756654970097037724?= Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM6375 SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- v4 -> v5: No changes .../bindings/clock/qcom,sm6375-gpucc.yaml | 60 +++++++++++++++++++ include/dt-bindings/clock/qcom,sm6375-gpucc.h | 36 +++++++++++ 2 files changed, 96 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,sm6375-gpucc.yaml create mode 100644 include/dt-bindings/clock/qcom,sm6375-gpucc.h diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6375-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6375-gpucc.yaml new file mode 100644 index 000000000000..b480ead5bd69 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,sm6375-gpucc.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,sm6375-gpucc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Graphics Clock & Reset Controller on SM6375 + +maintainers: + - Konrad Dybcio + +description: | + Qualcomm graphics clock control module provides clocks, resets and power + domains on Qualcomm SoCs. + + See also:: include/dt-bindings/clock/qcom,sm6375-gpucc.h + +properties: + compatible: + enum: + - qcom,sm6375-gpucc + + clocks: + items: + - description: Board XO source + - description: GPLL0 main branch source + - description: GPLL0 div branch source + - description: SNoC DVM GFX source + +required: + - compatible + - clocks + +allOf: + - $ref: qcom,gcc.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + soc { + #address-cells = <2>; + #size-cells = <2>; + + clock-controller@5990000 { + compatible = "qcom,sm6375-gpucc"; + reg = <0 0x05990000 0 0x9000>; + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GCC_GPU_GPLL0_CLK_SRC>, + <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>, + <&gcc GCC_GPU_SNOC_DVM_GFX_CLK>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + }; +... diff --git a/include/dt-bindings/clock/qcom,sm6375-gpucc.h b/include/dt-bindings/clock/qcom,sm6375-gpucc.h new file mode 100644 index 000000000000..0887ac03825e --- /dev/null +++ b/include/dt-bindings/clock/qcom,sm6375-gpucc.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2023, Linaro Limited + */ + +#ifndef _DT_BINDINGS_CLK_QCOM_GPU_CC_BLAIR_H +#define _DT_BINDINGS_CLK_QCOM_GPU_CC_BLAIR_H + +/* GPU CC clocks */ +#define GPU_CC_PLL0 0 +#define GPU_CC_PLL1 1 +#define GPU_CC_AHB_CLK 2 +#define GPU_CC_CX_GFX3D_CLK 3 +#define GPU_CC_CX_GFX3D_SLV_CLK 4 +#define GPU_CC_CX_GMU_CLK 5 +#define GPU_CC_CX_SNOC_DVM_CLK 6 +#define GPU_CC_CXO_AON_CLK 7 +#define GPU_CC_CXO_CLK 8 +#define GPU_CC_GMU_CLK_SRC 9 +#define GPU_CC_GX_CXO_CLK 10 +#define GPU_CC_GX_GFX3D_CLK 11 +#define GPU_CC_GX_GFX3D_CLK_SRC 12 +#define GPU_CC_GX_GMU_CLK 13 +#define GPU_CC_SLEEP_CLK 14 + +/* GDSCs */ +#define GPU_CX_GDSC 0 +#define GPU_GX_GDSC 1 + +/* Resets */ +#define GPU_GX_BCR 0 +#define GPU_ACD_BCR 1 +#define GPU_GX_ACD_MISC_BCR 2 + +#endif