From patchwork Mon Jan 30 15:32:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 50350 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2249193wrn; Mon, 30 Jan 2023 07:43:42 -0800 (PST) X-Google-Smtp-Source: AK7set88aFa7k5E0pWipDH2wwan9XtfINU+hRCZ1FwzIgBCagEmGTCllJ9Nrqm7RGOLBtHlR1hcZ X-Received: by 2002:a17:903:120e:b0:196:27be:4f53 with SMTP id l14-20020a170903120e00b0019627be4f53mr22676222plh.13.1675093422374; Mon, 30 Jan 2023 07:43:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675093422; cv=none; d=google.com; s=arc-20160816; b=riKLiv3KSZskXZ3fL4KZJQ+s3R2rmNOkKIfkg9X1PIz4JvxXkZut/+bWAAgNQTZl1A lWwTkvAOPnBCazYs2iH6jFYyfRsuz8+FBUj1U/eL7et5sfDozhHeIsv9Hrkp8Y1vGg3k FZ+x13rGX4RabbdSm2xod6oAJR/VcDg4IrVB2nO0G7NMH3g6qwBQX9xPZMnnabrciOQG qr5kY5JKG3a9u39fZWhKMrEl2VgXBR6Vqwswjy9VtwElKJJ452301R2bJeV4qP5nEl7M Ir+Pz+xyvuWAyRkse+LABrufN07B1HldlEVpLRuRkBabhdNAPct4e8PsPDVl3eYvTy2U ArTw== 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=BIBTHdMpJGj1YCjdQaodZetEO+nkmZdzZbbwqCGyEGM=; b=ApyIxkKy/NzA+PJI4/l9slgRcdH6RXHhQgjv7XDgqExcCTWeQfji+T8R94XpVLLch/ J1jkmptDlKhkicuts3jFnigDsttypasg7OtiVda2abLEljsMPewqcQsMvuM/rRZ9KkCT 1PbbrFdm3Oap1kwNltrPK8ZrcOrOWc9Caa4xNvX0udC6xD3Q3pgk5QcMFs3ldR07xfIe raX/++pf7tv2t0Upg01MddtYX6D08UT3QYwTMIvWTk1Kit3D27GrWU0dRDq9zcPARKY5 4OGzwgMKWs1Sh1RnC3MFwLigDX9c99zRQeM58iu0NEf/ltASrNXPMx+kTJD1UomIqOuH blug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="A29o/c5r"; 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 t16-20020a170902e85000b00189891763f3si14919945plg.600.2023.01.30.07.43.30; Mon, 30 Jan 2023 07:43:42 -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="A29o/c5r"; 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 S238235AbjA3PdT (ORCPT + 99 others); Mon, 30 Jan 2023 10:33:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237770AbjA3PdM (ORCPT ); Mon, 30 Jan 2023 10:33:12 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E51EAE392 for ; Mon, 30 Jan 2023 07:33:10 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id me3so32819272ejb.7 for ; Mon, 30 Jan 2023 07:33:10 -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=BIBTHdMpJGj1YCjdQaodZetEO+nkmZdzZbbwqCGyEGM=; b=A29o/c5r086DH6T0OW7hZKhQP2tstypbmwm5lL7Aykly0tstb/giuKS2rJtm4RBtw6 LnCBV0KefbIAQps+qOpsO7aDYDeK+x4vV4XaX4T8Ax2idrC3dPhIanvHmVWi8T//O/4/ ZNbUeEfOv7ROAeDSp1NOkRaoNyl9NbDkXe3cAhQaHcdY57UZXY7lGg+LXnyVdU7uioE0 iecT9bgIsp2fpWrhDu1MFLsQNfkMn6fZLPt3tMfYy1qDGiTKL9/vCWd8TRRWxnjzxB8m bpvlAXkwASxksPvse0OUIqIjm6VG3CWjQCn/VNRYYa/wo3LKYlw7w4Z0ibZzfts74Cvc Qfdw== 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=BIBTHdMpJGj1YCjdQaodZetEO+nkmZdzZbbwqCGyEGM=; b=onC/80Md/6w3j6K6mN0I+b67Z4YiujrfDbIAT44NWnZ1jOyXEj1PMgHMu5mDNCC5aZ 2fdNQfo3O0+N+QlDgbGVl9V+1s32yRIrFAiHxOdbuRyH0Sm5vT57SbvCpwKH2BW0yGAg ar8aI1KWv8KGVUROEmDIqfMe1FtSLfxYKtecPxIxrRceSpdtMBc4JEA1nOK0tvR9wwb6 U1gS2FjhlXj/CZkYpizc91wBapfJu1FV96ZuyGHHF999GBKDcTfKgzT1uTsNVjzIC9jL qdEiR+aEiZHRLPzgVZjpBeacRnDNuKwir+ww7K5qvNrb4mktutjwgkF1r3q+qQtmwBVv aMWg== X-Gm-Message-State: AO0yUKX/lc7EG0Q29jpMUQdcf71vKlupyiH1qqEVHAiTqOGmCsh065JP YNfv1GVhG1y2XCjoV7juWB4NRA== X-Received: by 2002:a17:907:6da0:b0:878:58e6:f1eb with SMTP id sb32-20020a1709076da000b0087858e6f1ebmr20264075ejc.23.1675092789331; Mon, 30 Jan 2023 07:33:09 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 07:33:08 -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 3/8] dt-bindings: clock: Add Qcom SM6125 GPUCC Date: Mon, 30 Jan 2023 16:32:47 +0100 Message-Id: <20230130153252.2310882-4-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=ham 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?1756462760641434713?= X-GMAIL-MSGID: =?utf-8?q?1756462760641434713?= Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM6125 SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- v2 -> v3: - Pick up tags .../bindings/clock/qcom,sm6125-gpucc.yaml | 64 +++++++++++++++++++ include/dt-bindings/clock/qcom,sm6125-gpucc.h | 31 +++++++++ 2 files changed, 95 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,sm6125-gpucc.yaml create mode 100644 include/dt-bindings/clock/qcom,sm6125-gpucc.h diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6125-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6125-gpucc.yaml new file mode 100644 index 000000000000..374a1844a159 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,sm6125-gpucc.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,sm6125-gpucc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Graphics Clock & Reset Controller on SM6125 + +maintainers: + - Konrad Dybcio + +description: | + Qualcomm graphics clock control module provides clocks and power domains on + Qualcomm SoCs. + + See also:: include/dt-bindings/clock/qcom,sm6125-gpucc.h + +properties: + compatible: + enum: + - qcom,sm6125-gpucc + + clocks: + items: + - description: Board XO source + - description: GPLL0 main branch source + + '#clock-cells': + const: 1 + + '#power-domain-cells': + const: 1 + + reg: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - '#clock-cells' + - '#power-domain-cells' + +additionalProperties: false + +examples: + - | + #include + #include + + soc { + #address-cells = <1>; + #size-cells = <1>; + + clock-controller@5990000 { + compatible = "qcom,sm6125-gpucc"; + reg = <0x05990000 0x9000>; + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GCC_GPU_GPLL0_CLK_SRC>; + #clock-cells = <1>; + #power-domain-cells = <1>; + }; + }; +... diff --git a/include/dt-bindings/clock/qcom,sm6125-gpucc.h b/include/dt-bindings/clock/qcom,sm6125-gpucc.h new file mode 100644 index 000000000000..ce5bd920f2c4 --- /dev/null +++ b/include/dt-bindings/clock/qcom,sm6125-gpucc.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2023, Linaro Limited + */ + +#ifndef _DT_BINDINGS_CLK_QCOM_GPU_CC_SM6125_H +#define _DT_BINDINGS_CLK_QCOM_GPU_CC_SM6125_H + +/* Clocks */ +#define GPU_CC_PLL0_OUT_AUX2 0 +#define GPU_CC_PLL1_OUT_AUX2 1 +#define GPU_CC_CRC_AHB_CLK 2 +#define GPU_CC_CX_APB_CLK 3 +#define GPU_CC_CX_GFX3D_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_SLEEP_CLK 10 +#define GPU_CC_GX_GFX3D_CLK 11 +#define GPU_CC_GX_GFX3D_CLK_SRC 12 +#define GPU_CC_AHB_CLK 13 +#define GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK 14 + +/* GDSCs */ +#define GPU_CX_GDSC 0 +#define GPU_GX_GDSC 1 + +#endif