From patchwork Thu Jan 26 18:13:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 48835 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp419791wrn; Thu, 26 Jan 2023 10:21:53 -0800 (PST) X-Google-Smtp-Source: AK7set+kvNgo1bkzkYODhegm+hFvcQWEMvVQLEwK1DOat6mLkNQf7/cSlamPBLesddQu6NXOoKLR X-Received: by 2002:a05:6402:2064:b0:4a0:b72b:8be4 with SMTP id bd4-20020a056402206400b004a0b72b8be4mr4568942edb.8.1674757313319; Thu, 26 Jan 2023 10:21:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674757313; cv=none; d=google.com; s=arc-20160816; b=WhcA6vC0/nYn1K03ACGKc0oPC+UGgHhSUyx2vU2b03+95bFnTco76r6Vn8J/vzaBvZ iv10pcl6PwvzJb3/IsAGbLRZjEPBxQBEoADQYkrtRsr79InuHs6vJYlaZ+eUNu5LvlrK p4lsdI6NGZP3Bg/wJ2C0cef5UpS76mx+3Y27AY8+PUQC8XRUKjtRm+B6ksXnaEC3ItE+ C6erQB2UzrXqTybl/ulfpVWt8CYxmJRL9Z3Nj1JXfLgpHoeDYiPH3zHiiIul3HJNXalp 4vcMww+Uj1lo8q9E0JszeroXDo17r6CxOQ5zUl5WXFWcaKhdt/EdhtZPXoOakfaaTqM2 G9lA== 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=3pTb5wpNdthCuVjgjcUKylwdCIsqRo5OGcUFbMgOJow=; b=I/9aalHSra6zEeWgYUO90a9IivkNdhvmiWn9xKTbVnzAXU0cuqhX80poTpUJZQfAMd rmB0xi/dxMphlrDXzppCtTkKndirxjEfZz46RfngtOi13dLgT1O5LvREKYiGsADnMl9g q3Yjll3D+RA3nRkunr8HSMeYg/a2HWXGqiAWdP2SKv5noNoW41lxhg7vy5sGwDJdZ3JY kKAgyuCLdxvWAI2VrQseeO4/CLajyFLI7fvGPGueqdgIqbvs+88Yu/fqtCsIWTeheP+3 YViKkfvVX/LaAh4KdUAz9S2rQa/QwNQYXIZ6hvce6OfPWsoc5M8ftdR4sroXxz0BE9sv UMcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="b/A8K/0t"; 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 c21-20020a50d655000000b0049e385155fbsi2437785edj.1.2023.01.26.10.21.28; Thu, 26 Jan 2023 10:21:53 -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="b/A8K/0t"; 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 S231910AbjAZSOH (ORCPT + 99 others); Thu, 26 Jan 2023 13:14:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231985AbjAZSOC (ORCPT ); Thu, 26 Jan 2023 13:14:02 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA7A9627B4 for ; Thu, 26 Jan 2023 10:13:52 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id y15so1974037edq.13 for ; Thu, 26 Jan 2023 10:13:52 -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=3pTb5wpNdthCuVjgjcUKylwdCIsqRo5OGcUFbMgOJow=; b=b/A8K/0tYlSS0dzWC+tB/RqdwpPxJXEihggNaF6GullWU5syq3Hgbv9Sqy2Q/zo5zo DILtSrp7DIyEhN++LlXvGI45zUC943muS31OZga42jy4htt3HcvuKeVvgZQXvfqbNtuK a4Bnb1Gm1/FU0NkF6E+zPJUX90Y0STM/sdP0CyejIdwDDeo2RjIXKpUSKhdGfWhDOoIn 7yULdOSUY5z8O5SMkFsXzyRX7VD/LZCRjXsOToBe0aB32u/qMsGzwj5daM6+qPOe6n0r Z4O02Nmyeh1gieAXM5yXNhvW/urssJI9AOKVVWr700WFbzci0NgKQrXqZIF3Oj2/fL0g qIZw== 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=3pTb5wpNdthCuVjgjcUKylwdCIsqRo5OGcUFbMgOJow=; b=GHZ2AlEZrSnrRylD6MV6Ae3axhJaFnNRsAYmv5b06fdg5IbU7WHdnxAs6D/LvoVD8c rSJKPaZY/cN8FoQQquUYfwHLITDfy1qcVRPHhx2xMnz9qtks5nPT1iCnW+Y71sUuyHPf 2VmJbRRJqRSQEMJ/Gm8fMUBiA644x6anfj83q8gHhns0R7L3c0IGhOBtKhoostnh0Vck L6JT0wSrZnlq1mWjw1vpn3wwA5IZFOAVr29ui6FFqcz+Rhhm9IffGJUw6Dr79TPtwjAY g7k+qFSfRZS4T1rNoJpRgnU6mnXVWsYG09PwyxinaPTt8mRNarNXAJqL36+6Mtn7kYBk oRIw== X-Gm-Message-State: AFqh2kq90iAQh7k9dzapUztPB0FDHkeZyc56DxDGbXOCjBggn6VBqfxK iSjCNcUjB0A13NgWtBrGl/OG/0wAEijCNJGt X-Received: by 2002:a05:6402:43c4:b0:49e:8425:6033 with SMTP id p4-20020a05640243c400b0049e84256033mr29415893edc.28.1674756832243; Thu, 26 Jan 2023 10:13:52 -0800 (PST) Received: from localhost.localdomain (abyl20.neoplus.adsl.tpnet.pl. [83.9.31.20]) by smtp.gmail.com with ESMTPSA id k6-20020aa7d8c6000000b00487fc51c532sm1100416eds.33.2023.01.26.10.13.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 10:13:51 -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 v2 5/6] dt-bindings: clock: Add Qcom SM6115 GPUCC Date: Thu, 26 Jan 2023 19:13:34 +0100 Message-Id: <20230126181335.12970-6-konrad.dybcio@linaro.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230126181335.12970-1-konrad.dybcio@linaro.org> References: <20230126181335.12970-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?1756110324592628459?= X-GMAIL-MSGID: =?utf-8?q?1756110324592628459?= Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM6115 SoCs. Signed-off-by: Konrad Dybcio --- v1 -> v2: No changes .../bindings/clock/qcom,sm6115-gpucc.yaml | 71 +++++++++++++++++++ include/dt-bindings/clock/qcom,sm6115-gpucc.h | 36 ++++++++++ 2 files changed, 107 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/qcom,sm6115-gpucc.yaml create mode 100644 include/dt-bindings/clock/qcom,sm6115-gpucc.h diff --git a/Documentation/devicetree/bindings/clock/qcom,sm6115-gpucc.yaml b/Documentation/devicetree/bindings/clock/qcom,sm6115-gpucc.yaml new file mode 100644 index 000000000000..abf4e87359a3 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,sm6115-gpucc.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,sm6115-gpucc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Graphics Clock & Reset Controller on SM6115 + +maintainers: + - Konrad Dybcio + +description: | + Qualcomm graphics clock control module provides clocks and power domains on + Qualcomm SoCs. + + See also:: include/dt-bindings/clock/qcom,sm6115-gpucc.h + +properties: + compatible: + enum: + - qcom,sm6115-gpucc + + clocks: + items: + - description: Board XO source + - description: GPLL0 main branch source + - description: GPLL0 main div source + + '#clock-cells': + const: 1 + + '#power-domain-cells': + const: 1 + + '#reset-cells': + const: 1 + + reg: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - '#clock-cells' + - '#reset-cells' + - '#power-domain-cells' + +additionalProperties: false + +examples: + - | + #include + #include + + soc { + #address-cells = <1>; + #size-cells = <1>; + + clock-controller@5990000 { + compatible = "qcom,sm6115-gpucc"; + reg = <0x05990000 0x9000>; + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GCC_GPU_GPLL0_CLK_SRC>, + <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; + }; +... diff --git a/include/dt-bindings/clock/qcom,sm6115-gpucc.h b/include/dt-bindings/clock/qcom,sm6115-gpucc.h new file mode 100644 index 000000000000..945f21a7d745 --- /dev/null +++ b/include/dt-bindings/clock/qcom,sm6115-gpucc.h @@ -0,0 +1,36 @@ +/* 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_SM6115_H +#define _DT_BINDINGS_CLK_QCOM_GPU_CC_SM6115_H + +/* GPU_CC clocks */ +#define GPU_CC_PLL0 0 +#define GPU_CC_PLL0_OUT_AUX2 1 +#define GPU_CC_PLL1 2 +#define GPU_CC_PLL1_OUT_AUX 3 +#define GPU_CC_AHB_CLK 4 +#define GPU_CC_CRC_AHB_CLK 5 +#define GPU_CC_CX_GFX3D_CLK 6 +#define GPU_CC_CX_GMU_CLK 7 +#define GPU_CC_CX_SNOC_DVM_CLK 8 +#define GPU_CC_CXO_AON_CLK 9 +#define GPU_CC_CXO_CLK 10 +#define GPU_CC_GMU_CLK_SRC 11 +#define GPU_CC_GX_CXO_CLK 12 +#define GPU_CC_GX_GFX3D_CLK 13 +#define GPU_CC_GX_GFX3D_CLK_SRC 14 +#define GPU_CC_SLEEP_CLK 15 +#define GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK 16 + +/* Resets */ +#define GPU_GX_BCR 0 + +/* GDSCs */ +#define GPU_CX_GDSC 0 +#define GPU_GX_GDSC 1 + +#endif