From patchwork Wed Feb 8 09:13:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 54286 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3349440wrn; Wed, 8 Feb 2023 01:16:59 -0800 (PST) X-Google-Smtp-Source: AK7set+Yr74dPJUNvsqvNjHUEn9J0cSVb+3/KnarwfM3TmxBEHyrIAmsuCnWsgeiyb5WkGmDDPEe X-Received: by 2002:a17:903:24c:b0:198:a715:d26d with SMTP id j12-20020a170903024c00b00198a715d26dmr6690049plh.8.1675847819312; Wed, 08 Feb 2023 01:16:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675847819; cv=none; d=google.com; s=arc-20160816; b=jypMsafQMVD/J0d9ytxcbCjRIZgeduZGuyzEEVfqX0hvU9nnj7SV1WVYPDduFN1rEt g/GzbkFflTZsE9eBU1r/TY69CVTcJqhecfFsO7KeCv3/z/2dhWS4nkuwJlYltdLj4Kf4 FGYQEIqELnNQEzYfH4OU1cZWjnbxQKTROV3TiCEJmjJWPTe1ugVAhG+cDCo0E/Rh+i2G X+wM7BuPbMgAeUDIhI7y0A+CnvQJR2IwWBikVxWVymFNCitgXUY1JwKpYHT65BdEI0vo W7T9ym1wDH2m63mn0PzDnZy8CgYhbk7ue4Cm9FSTamdXjv20hdSnrf72bcqDoGohqPXc Jc6w== 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=MjPN7pBI5UqQh3zYwpXxa2DpIw4tZgUWZdbUG7h3884=; b=dkVJ7jcRRsGrxfdVALCnsY6+/Fw2sXsZari8oJR4EWjpU8BOIcEX5yKKSgtbneqf8M a2Jihy7r8YPWAs4UsIy5l/dckkwRV8B5CUoIjCTYnbO19PiUZdoc0hx2c+E6FVh1akB8 +HJryFJtCenOtDybaVpF4a/H4VjwtdhQs5b+9GztRIKYjWSIOUf3B6E3RwZEgSaTRXms Rmba4PgVo+9z385ObFzncksK6vdIw+Olwzz0oiqhHE3SSIjphn6RVM/eEDoTWuNCKkjz 9XibNttzEor7DjGAD2hkrQI/acm1yd/TwzUOUBx7qaMhxXf3hdlTk2yTVDhPL/d9HkBp 5PFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aEJRsFXh; 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 w14-20020a170902e88e00b001926b288ae9si19996871plg.82.2023.02.08.01.16.45; Wed, 08 Feb 2023 01:16:59 -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=aEJRsFXh; 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 S231218AbjBHJQJ (ORCPT + 99 others); Wed, 8 Feb 2023 04:16:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231208AbjBHJPb (ORCPT ); Wed, 8 Feb 2023 04:15:31 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31A81460BA for ; Wed, 8 Feb 2023 01:14:05 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id m2so49579616ejb.8 for ; Wed, 08 Feb 2023 01:14:05 -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=MjPN7pBI5UqQh3zYwpXxa2DpIw4tZgUWZdbUG7h3884=; b=aEJRsFXhysPMWaHGEH/q9pGU76L+ucPhUgRLvKwVoHRoSWE64eZ44Cit99mlPhDja3 XlPdowdgP5X22hR4yKKkSmMJAB2JlXxmFoWBYdYHdpAR5IEMw1lvWhN/6EoYwxxKUfqW zW0QCSoTmTwP8mwUtfopEfV7GgtHZ86v9+n8IHSRFzyxx5a/rEmwE62JHVGhG+ovBFoU v3gUtduB2fCHJBv7xyTlb6lc7walRMHFolHAu9G6K1+a4sahRuPmtOMIo4SS4zjk1yXa JLRiGRXrNYzSka0Pvccs6v5PdLcU55KYLVSAZ0rI9OC77/3+/QYgq+5O8+lRUa8j2zeZ hElg== 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=MjPN7pBI5UqQh3zYwpXxa2DpIw4tZgUWZdbUG7h3884=; b=fy6rjIcPygLbwIyE8BiycpB50JkMX2HvqiBKAFNjgIqo3UzctUE6x1inyg0U7MyWZp VrVvXM/4f9aeey94ZIZWJkB3H87O5pZKqNBFFFagMZd0h4Wzw+G5bFwIvNFn9jnjVSi7 VJ3np7MWE/NoVbwJQDXAWJHIqp2vNVMlVKIbBnaUiHrAwqi+q7VRpQ+9SQfoiHP3Mbjo fwatEkddHIurYhI+FqBeJkAZGqVOPrcED77WxQBUyxs5Ja1gGESLpIDz6ArNkJut0Bmy XvCjS8AcoIIfWqml9G+jk3wg6UjpHH79z5WxoWiZ6qdU/3xFrpSYcvlucvOPCufxXa+G NAyQ== X-Gm-Message-State: AO0yUKV/cqcCH+XnEKktb9GIlzgRwo4+Wd2YW5pRJ8FS8Cj7X7978O7s K5fvQXrU+LsoqPBPgvEUJcz0Jw== X-Received: by 2002:a17:907:1c18:b0:878:481c:c49b with SMTP id nc24-20020a1709071c1800b00878481cc49bmr9497382ejc.1.1675847637474; Wed, 08 Feb 2023 01:13:57 -0800 (PST) Received: from localhost.localdomain (abxh117.neoplus.adsl.tpnet.pl. [83.9.1.117]) by smtp.gmail.com with ESMTPSA id z2-20020a1709064e0200b00887a23bab85sm7987279eju.220.2023.02.08.01.13.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 01:13:57 -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 v6 07/10] dt-bindings: clock: Add Qcom SM6375 GPUCC Date: Wed, 8 Feb 2023 10:13:37 +0100 Message-Id: <20230208091340.124641-8-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230208091340.124641-1-konrad.dybcio@linaro.org> References: <20230208091340.124641-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?1757253803396422964?= X-GMAIL-MSGID: =?utf-8?q?1757253803396422964?= Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM6375 SoCs. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- .../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