From patchwork Mon May 29 13:52:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 100282 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1535676vqr; Mon, 29 May 2023 07:02:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4HVAvW3Aax1Pw1Z+IM9lJobUMTa6L59KsCiF79l6CHZNkZ2PAa2HccesOHG7xXSemLk8J7 X-Received: by 2002:a17:902:7788:b0:1a8:ce:afd1 with SMTP id o8-20020a170902778800b001a800ceafd1mr11198204pll.20.1685368932150; Mon, 29 May 2023 07:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685368932; cv=none; d=google.com; s=arc-20160816; b=nC2sl0L5cnGTywfQuyllaAndi4HvP5/5STsMjB48EQcLsTOS+j8Q0Rg0gn3WMBVJ1f VtqiQICmsTl+b23Ic9qEG/1Z5GUhCH56uMZ+2Iungils7xAPwUhvCBJY4d8OIKk4rwWG J0GXuKU3P6UoAnkBUIc83X2TwCNrZERvbg5r8jmDF40ZE8m9VMhR9FJQQKfpDE10uldA ebjCWVgx5ZMZhPLr/oFV58T6ihliOB9eAv5dvzjD00+KmsyWA9rE6qq8ydLwjtfffCsR KdmPhVGvy+GJbtx9yt+RbLmzGSAAbBjvohYBV2tFdEXaydqGEHrh4+Ho4wbDMoEfr4yt XT+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=49E8NammB9b0i0yjicnQMIMZLXUM56GNXPHK3LYqmjk=; b=kzKkdMbG8Bc91mgKTk4m2gNl1kpTkIynNE8YKQR1ZPYmdS3Xv6qaFJoWyXWc7iD4dr Ivx/RvHgF5ChF7bXEbtgRHw5tS/FPL2GOyn9xNGzNV5/ef/yyvWszHRskv3R7QL7gzTP 4Zmn9jYgBH23/bT1hsz1yCHOOx97zLw79S2U7eY6xxukUfqW9YeZwHgbTaOQLyJsWfii Q7QVa7T1an6I5nk0AQdTgmsdVHwC/WYIl3cX1y5HQXeh7+5hm6gbq1rq6VzqI0UD9IPn vD/PW+DAgBUePWp9SJ+zzAsRQddkM9NinbcgpDwcscj5DY/8tFEvKgx6PKhUrda9+ZvF ivqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wRESbY6L; 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 k14-20020a170902c40e00b001a994803b1csi3940163plk.19.2023.05.29.07.01.59; Mon, 29 May 2023 07:02:12 -0700 (PDT) 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=wRESbY6L; 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 S229954AbjE2Nwg (ORCPT + 99 others); Mon, 29 May 2023 09:52:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbjE2Nwb (ORCPT ); Mon, 29 May 2023 09:52:31 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB682A0 for ; Mon, 29 May 2023 06:52:29 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4f3b9755961so3546687e87.0 for ; Mon, 29 May 2023 06:52:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685368348; x=1687960348; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=49E8NammB9b0i0yjicnQMIMZLXUM56GNXPHK3LYqmjk=; b=wRESbY6LzGnYEBmuGjiH+lcgaSgRYlCX7Y7CtbBJx651yXxemjegPXCdoCfhSD+031 nwvv7RWeTxJtdemDZrIpU6i0yFD2N97n5hOixCECuseVwu2SOfN9rFuz0YjsoDvglqtg NknTOi4wPyARNB6YzNF8b1Lap4QfFYxyNRthcQ1aQlHQQE+cqJZeTP8dgEmwNGsqMugM 20T2Ks963yLATFvYHj0qL4imppB5DkYN/AaV6C81lL5qfGg4pVgqryaNTNutYbnSy5C5 1cRvq0NWx4UR/JDo6pwJDRXbktFbxYJvKsAYRin4RhdMdrARYbL6Vvq1rMX4o0eNPCDP Sa0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685368348; x=1687960348; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=49E8NammB9b0i0yjicnQMIMZLXUM56GNXPHK3LYqmjk=; b=MiP3jVBpriortqYIcaOL9wePtvioiP0MokKzYZFykzIMb0CLZrLVFy9ewGlizUsbQ/ KdMqBLO1hoIJ9+fD7XdRhsUmEqFOJdeTh9+YwHCkoFihEUITTic/4mauyjr2uPKCZPN+ K3ghAoXbD3fQFH6QbktgW83GdCOLCFt9A5z7435ss+BidqOlmV3bpCZDteYWntJC+QL1 6CmNbbgNctXGZsFga725Nbkjp47iOXe/gatVEl7Xm1xO+GHXP/jP5VYuvnPQLWYV6JQI UVg+87IuhdSW+BfpMmT8GML2/QRpr5ZXnHJ0kXLm79HAzUUtIdKUr0G83+IBSBtYnn0z WBvw== X-Gm-Message-State: AC+VfDwNzi4hUbQXGd/DeYK4a3NFVtSZsemp+7XEZpFA+2m3EPOrktUv s1Yj8rO84qjEgDC1yjypH3iOeQ== X-Received: by 2002:ac2:5297:0:b0:4f2:5c4b:e69b with SMTP id q23-20020ac25297000000b004f25c4be69bmr3557027lfm.67.1685368348281; Mon, 29 May 2023 06:52:28 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id c16-20020ac25310000000b004f2532cfbc1sm4700lfh.81.2023.05.29.06.52.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 06:52:27 -0700 (PDT) From: Konrad Dybcio Date: Mon, 29 May 2023 15:52:21 +0200 Subject: [PATCH v8 02/18] dt-bindings: display/msm/gmu: Add GMU wrapper MIME-Version: 1.0 Message-Id: <20230223-topic-gmuwrapper-v8-2-69c68206609e@linaro.org> References: <20230223-topic-gmuwrapper-v8-0-69c68206609e@linaro.org> In-Reply-To: <20230223-topic-gmuwrapper-v8-0-69c68206609e@linaro.org> To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Bjorn Andersson , Konrad Dybcio , Akhil P Oommen , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Clark , Marijn Suijten , Konrad Dybcio , Krzysztof Kozlowski X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1685368343; l=3381; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=r/EBMgU06Tp71cfVplwZRxg54jR5hfGl93vpjcsu/ME=; b=AoFlK9crbxlkVpGPNu4hjQytqvO2j7fMJH34VpPs2eRJmNR/MHQEdwOq5nWx2CAs6OQObSMps QvXNukTjlmcD2ISVT4x9t412GMbmzO1lzEmatwWqb+GqaOo4Gf3xKed X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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,T_SCC_BODY_TEXT_LINE 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?1767237413345482959?= X-GMAIL-MSGID: =?utf-8?q?1767237413345482959?= The "GMU Wrapper" is Qualcomm's name for "let's treat the GPU blocks we'd normally assign to the GMU as if they were a part of the GMU, even though they are not". It's a (good) software representation of the GMU_CX and GMU_GX register spaces within the GPUSS that helps us programatically treat these de-facto GMU-less parts in a way that's very similar to their GMU-equipped cousins, massively saving up on code duplication. The "wrapper" register space was specifically designed to mimic the layout of a real GMU, though it rather obviously does not have the M3 core et al. To sum it all up, the GMU wrapper is essentially a register space within the GPU, which Linux sees as a dumbed-down regular GMU: there's no clocks, interrupts, multiple reg spaces, iommus and OPP. Document it. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio --- .../devicetree/bindings/display/msm/gmu.yaml | 50 ++++++++++++++++------ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/display/msm/gmu.yaml b/Documentation/devicetree/bindings/display/msm/gmu.yaml index f31a26305ca9..5fc4106110ad 100644 --- a/Documentation/devicetree/bindings/display/msm/gmu.yaml +++ b/Documentation/devicetree/bindings/display/msm/gmu.yaml @@ -19,16 +19,18 @@ description: | properties: compatible: - items: - - pattern: '^qcom,adreno-gmu-6[0-9][0-9]\.[0-9]$' - - const: qcom,adreno-gmu + oneOf: + - items: + - pattern: '^qcom,adreno-gmu-6[0-9][0-9]\.[0-9]$' + - const: qcom,adreno-gmu + - const: qcom,adreno-gmu-wrapper reg: - minItems: 3 + minItems: 1 maxItems: 4 reg-names: - minItems: 3 + minItems: 1 maxItems: 4 clocks: @@ -44,7 +46,6 @@ properties: - description: GMU HFI interrupt - description: GMU interrupt - interrupt-names: items: - const: hfi @@ -72,14 +73,8 @@ required: - compatible - reg - reg-names - - clocks - - clock-names - - interrupts - - interrupt-names - power-domains - power-domain-names - - iommus - - operating-points-v2 additionalProperties: false @@ -218,6 +213,28 @@ allOf: - const: axi - const: memnoc + - if: + properties: + compatible: + contains: + const: qcom,adreno-gmu-wrapper + then: + properties: + reg: + items: + - description: GMU wrapper register space + reg-names: + items: + - const: gmu + else: + required: + - clocks + - clock-names + - interrupts + - interrupt-names + - iommus + - operating-points-v2 + examples: - | #include @@ -250,3 +267,12 @@ examples: iommus = <&adreno_smmu 5>; operating-points-v2 = <&gmu_opp_table>; }; + + gmu_wrapper: gmu@596a000 { + compatible = "qcom,adreno-gmu-wrapper"; + reg = <0x0596a000 0x30000>; + reg-names = "gmu"; + power-domains = <&gpucc GPU_CX_GDSC>, + <&gpucc GPU_GX_GDSC>; + power-domain-names = "cx", "gx"; + };