From patchwork Mon Jan 30 15:32:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 50351 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2249244wrn; Mon, 30 Jan 2023 07:43:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXsNcjZCmADl+2fJumB3CvuoZOILEayyYsGGaiRaiti92Radrt0+/vH7XlQMyQod6KQH7YTD X-Received: by 2002:a05:6a20:1596:b0:b8:7905:b6c4 with SMTP id h22-20020a056a20159600b000b87905b6c4mr63553275pzj.61.1675093428233; Mon, 30 Jan 2023 07:43:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675093428; cv=none; d=google.com; s=arc-20160816; b=PEbF+fNwkE6o3eoF2r+T8XRd1GZLD9Tyo3yUwIy01GGak9cfJNdhOCZQJ9IA8TthZy AV87GCqoGl0Dyt/PYOMIDn40dpcb+1DQBXSGCTy38Rk1BVgCDd1qVqTtxA6Waf7MqFP8 xcr8u7udorR3y4VYsCUb6HzOQqL2BB2Svm5T+y4O8rC4gHammJf9WKGWvkAH+7qwgELs MWqI/InrGDF0PhrXUfM+kuWo80uG4pE9rBgwPDjYLrhitlE0LiuV0yiDkfwBO3JdpSy4 +V1I6UYjhKupmO6/gzR7Lo2ChMa7Hvmp+uClPRMBCjzpmw6PuyQUUsDwEI4Gm1JHL+tz yH3Q== 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=wdSQX0LrRXfachZslkET6uKTOBzCfMVLGTzHGzhhVmc=; b=0wqlKzK3eshpgunGD2WLayqgQHxX3V+a+e+cJDfEHJ5g7dFn0vL6r/AE3TzrnR4wik BvpwpDt8sg/adO5D17qrxCZ/YTdA78K0xW7t1s0SXFRNIf+b1HGiyPgqALkKg1cKhMhY vtAIW4DVOwccfW29Hn6IOyQ02wLu0xYM5vYPpyS5OXdnVWzXVyyZuD55WPQ6xtUuqFtj Zh4uWShvhUHA8Mx462Y36r6PKBxFyzySwgzu++wt6j4F5XoqA0X3tQ3Xd8i3i7FhXPYc kTDWVbkNr36l8csL7js8WJke56s3AtkeCkP5eEiGZst39YWtYpU+TK2cS2uom0VQ40W1 s02w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JF0RItLR; 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 k186-20020a6384c3000000b004dfe85e60f8si4075036pgd.321.2023.01.30.07.43.36; Mon, 30 Jan 2023 07:43:48 -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=JF0RItLR; 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 S238149AbjA3Pd1 (ORCPT + 99 others); Mon, 30 Jan 2023 10:33:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236705AbjA3PdS (ORCPT ); Mon, 30 Jan 2023 10:33:18 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C416125B2 for ; Mon, 30 Jan 2023 07:33:15 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id fi26so11305625edb.7 for ; Mon, 30 Jan 2023 07:33:15 -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=wdSQX0LrRXfachZslkET6uKTOBzCfMVLGTzHGzhhVmc=; b=JF0RItLRERfz/B4QO4rPZCOswCyZB5vZfqhBgpvFhSIETowsN9oqoE9rDJHC66gkIe CcYWRPuRJN1YjOmKgmLxU5c/aeeZf5VOrfBEjy7AbKyGjq0jf3UumLaNyAkYnZsKwAdl 4PTbtwCI0q6QCKtCyi/qEKZL0N9nxppjIRQ2APAS0/PsUrg3Fb7KRIhW4qaK7o47jNFH VPE8b5Lxt7geW21E/UBFFC2szTe6/pi2m43k6Vc8tSQi9Hs8tBplGrtRVhb7LKweh/Q+ k6UgCszQ1Khne63VKUXrOIMEdy7dkuemFk+eY6R6qaIyCpiH7rt5mknG/MZfP9SDqFPR ptJQ== 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=wdSQX0LrRXfachZslkET6uKTOBzCfMVLGTzHGzhhVmc=; b=IfDgbtL3JR0xqBnDzkrGqa6o2ev8CBNp/k3HAAqTFtYMAREU1ipA62oLOSh8jHNaxX vCN25werp8IfBjIer34EPZ1+qofh84z7Jmd89wMhf1jVx7ijvhaQhZaMi5IrFRPenlyN mlXONJwXXZVJnmmm6R5pPu3wcORTOx2erl6G5GIjDdoCMPEuiik5NbJhlp1PEUZ5D68y 59D60sNRXj4Ny68jRnziYsfsf+w9KdjeLitHwf2Y3Eu4RK4NZVVQlAwRg4hw+VPee9wn uA6zUEr3zCvxd3m9p6la/OmZYSUyPTSWGf4zhljEwTWW3ZuIkXKGAF9mL9pCgtQyY/LW UoMg== X-Gm-Message-State: AO0yUKX98Ok6nYkPARafCIcvMJBYdJntlRrhVEwHa5an63buiZ1MNdj8 tVe9Hks9l2xnFTeSn2XU9TEfPQ== X-Received: by 2002:a05:6402:3553:b0:4a2:49c0:abc0 with SMTP id f19-20020a056402355300b004a249c0abc0mr4122741edd.29.1675092793667; Mon, 30 Jan 2023 07:33:13 -0800 (PST) Received: from localhost.localdomain (abyl20.neoplus.adsl.tpnet.pl. [83.9.31.20]) by smtp.gmail.com with ESMTPSA id k7-20020a170906054700b00878769f1e6bsm6805773eja.55.2023.01.30.07.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 07:33:13 -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 v3 5/8] dt-bindings: clock: Add Qcom SM6375 GPUCC Date: Mon, 30 Jan 2023 16:32:49 +0100 Message-Id: <20230130153252.2310882-6-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230130153252.2310882-1-konrad.dybcio@linaro.org> References: <20230130153252.2310882-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?1756462766481829711?= X-GMAIL-MSGID: =?utf-8?q?1756462766481829711?= Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM6375 SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- v2 -> v3: - Pick up tags .../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