Message ID | 20230506-msm8226-oxilicx-v1-1-52e34b94ff22@z3ntu.xyz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1260875vqo; Sat, 6 May 2023 14:43:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6jOQcBZsVNTVBnYdl8BBrnQVZQkCYf7HIJVOd3GfjmSEXWHC6VBY1MuJ0b2Mf51jhwak0Q X-Received: by 2002:a05:6a00:2408:b0:63f:18ae:1d5f with SMTP id z8-20020a056a00240800b0063f18ae1d5fmr7359297pfh.29.1683409394463; Sat, 06 May 2023 14:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683409394; cv=none; d=google.com; s=arc-20160816; b=J4Dc12HmEFydkuhuzxloIJif8JhBvi5iH7PiV9wyLwhWUUcfTn1JuvL7MNG6mmn+Bj 4Vfo+HiOUkK7IROPiSOYDB74dVu2cFyL/FBwfKxilA37BpDEalZpjB/edSQ1Osq7jj0a Q/2R7qe2xnaKqAnNQsUaIZH/J3s9MsU8j8M7VoGQ421l3AGU3K6Z02mogw8808Jx+/P5 IbicM9GWOnPgNTDRkE/uFLad+xpSSxPcE+IMxcvZW0Mx2EsnG6WzX76M+wFgjtt8XhnO 2Jhz6F0grOiD1oInzhSCYZb9XlHchug9M8K+rHOEQ3OyYn5qE8xCNOuAmnbwehri9/M2 eblA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=NAMcV3vSuH05GSSRzu/qYNu15rhNVgfdU4QziQtfXmU=; b=Kh+Vvz5Qd3LvqZIBEv6z/IYgQ7DbONvQdbtCyqTWMcJbpIeMu6D3kog1QRkwzoLF+C t0BZjg5kQanNKCel/P7eziQSV0Z/QDrTkhKmYuRZJ8J7X1FgMkW8pvR9Hy0zpb/RWD5x KbhKjBDUeH4gMngdu29noMhRiSDahsKvwfNnycXTooHz7W5/hGqVxbtLizCNw1horEo7 sRXhcYVbkb0snAS7chTVHrgUsj60oAKhfuzMyGGOK5ROOvYuXGMRc6JC2jkKwWVeZm/2 4Hzmr0bz57LVT2vcMeOxjT5hNd9gk5OhmWEFK+GU5FGr6NTy6hODM3bN4lSYk7rqvJVL RN/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=z3ntu header.b=vu5rWWRH; 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=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m184-20020a6258c1000000b0063b8d5c43fbsi4903072pfb.200.2023.05.06.14.42.52; Sat, 06 May 2023 14:43:14 -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=@z3ntu.xyz header.s=z3ntu header.b=vu5rWWRH; 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=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229972AbjEFVWj (ORCPT <rfc822;baris.duru.linux@gmail.com> + 99 others); Sat, 6 May 2023 17:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjEFVWh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 6 May 2023 17:22:37 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F4531491A; Sat, 6 May 2023 14:22:35 -0700 (PDT) Received: from [192.168.178.23] (unknown [62.108.10.64]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 3DE85CECA7; Sat, 6 May 2023 21:22:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=z3ntu; t=1683408123; bh=Mgla0FqG6s0rTpF9FbXF74aYR+zs9h7SWW7n4ppNO+c=; h=From:Date:Subject:To:Cc; b=vu5rWWRHgQolokSXPm5u5BG9PWOMJ2H/w8f6f4HnEH/M1GxK2YdFW1zveaYeHU0t0 mH1bhpJY2qpaTDVo6jQ91RSU4igUFbwEVeNhyXlCjqnQJ03SEU9ERsS/QtVH+rVsap 2nNGJue4nE3IDMRIn683Wejv9px/gdF3dzKoHpso= From: Luca Weiss <luca@z3ntu.xyz> Date: Sat, 06 May 2023 23:20:05 +0200 Subject: [PATCH] clk: qcom: mmcc-msm8974: Add OXILICX_GDSC for msm8226 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230506-msm8226-oxilicx-v1-1-52e34b94ff22@z3ntu.xyz> X-B4-Tracking: v=1; b=H4sIAITEVmQC/x2NywqDMBAAf0X23IUYrY/+Sukhxo0uxChZWgLiv 7v0OAPDnCCUmQRe1QmZfiy8J4X6UYFfXVoIeVYGa2xjnqbDTbbB2g73wpF9wT40wYSB2rGeQav JCeGUXfKrdukbo8ojU+Dy37w/13UDLVTSVXYAAAA= To: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Bjorn Andersson <andersson@kernel.org>, Andy Gross <agross@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, Bartosz Dudziak <bartosz.dudziak@snejp.pl> Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss <luca@z3ntu.xyz> X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1373; i=luca@z3ntu.xyz; h=from:subject:message-id; bh=Mgla0FqG6s0rTpF9FbXF74aYR+zs9h7SWW7n4ppNO+c=; b=owEBbQKS/ZANAwAIAXLYQ7idTddWAcsmYgBkVsT6XiIg7hNY3hv51IzCTbp3r+ZwiSqhd8idr 45PSjANRtiJAjMEAAEIAB0WIQQ5utIvCCzakboVj/py2EO4nU3XVgUCZFbE+gAKCRBy2EO4nU3X VsjID/9SIt93I9xubBMFtSW5Bq3kj2RM/bh2bBsUrE9Z63S0oK2mvT0B6wUo02A9Xij0S5PNu/J 5gc6T78kuuM0EtkVz1HiBDfHRvB6TnNAuPu+u7orS/BZeTJdyS+1H8cxXJIdSTRLfxXL0w5gSzw 2e9y8glSGaeUTmWjZ2wnpBYDT+mdu2CQ+WbMJbx9eSWnYU/ZRiYHN64zs9QgZyjz+D2S8pOQT3E PH2mFgoZGmUmgNgDW8wMNl9r8t3DwpiBqIKQ/5BoJJZa2gHloW/pBOyXipGh52HmyY1jCnVGDFg R4u0xhzIP/yEZET0xDT1OCaV+NzZRyEho9Qkqx7INZBRrsv5clkuVD08lYtF/FBfZRZKQnnceYZ ynlLd+aYFYcD9z5/5kLyM507UPlBbs4oF5TLoTRT0uIdFoBgX651ViTqaQCijKmR2dK797gVxdv 3a1EZKzjuSbsOLQy83g/8DPvbIyLGk8GquSi1MiQZOt/WXWIlPLUQ5nMGHXOwwevYxs0noXZga5 cc3nDFKM7U3LTuNCvRz49BCe/mGszfEDOL+OZZpn3ur6wKZImr5x4GiladYO/WZ6QOAiOUH+Fwc 9uNLWuLH1VUDcl1Bra1c+nw8eBqTJY6WWEUJy7WZ7gGnvX5CLVcn7GI7sgC7vz/Ett40ygbBiYF 1M4tyWkA+w8C1gQ== X-Developer-Key: i=luca@z3ntu.xyz; a=openpgp; fpr=BD04DA24C971B8D587B2B8D7FAF69CF6CD2D02CD X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765182688950694628?= X-GMAIL-MSGID: =?utf-8?q?1765182688950694628?= |
Series |
clk: qcom: mmcc-msm8974: Add OXILICX_GDSC for msm8226
|
|
Commit Message
Luca Weiss
May 6, 2023, 9:20 p.m. UTC
On msm8226 we also have OXILICX_GDSC but we need a slighly different
config, with a .cxcs defined for clock but with no parent.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889
change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d
Best regards,
Comments
On 6.05.2023 23:20, Luca Weiss wrote: > On msm8226 we also have OXILICX_GDSC but we need a slighly different > config, with a .cxcs defined for clock but with no parent. Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and to achieve that, we sometimes define it to be the GX's (also implicitly known as "oxili-non-CX" in before-a6xx-times) parent.. Roughly speaking CX powers the "GPU hardware owned by the broader SoC that may not need the GPU core clock to be up" and GX powers the "GPU hardware owned strictly by the GPU that needs at least some GPU clocks to be enabled" Maybe 8974 simply has a bug in the driver that would do the reverse? Could you (and perhaps Dmitry on his shiny new 13yo board) test that theory, preferably on both SoCs? --- a/drivers/clk/qcom/mmcc-msm8974.c +++ b/drivers/clk/qcom/mmcc-msm8974.c @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = { .pd = { .name = "oxili", }, + .parent = &oxili_gdsc.pd, .pwrsts = PWRSTS_OFF_ON, }; @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = { .pd = { .name = "oxilicx", }, - .parent = &oxili_gdsc.pd, .pwrsts = PWRSTS_OFF_ON, }; Konrad > > Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > --- > drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c > index 4273fce9a4a4..39ee3953567c 100644 > --- a/drivers/clk/qcom/mmcc-msm8974.c > +++ b/drivers/clk/qcom/mmcc-msm8974.c > @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { > .pwrsts = PWRSTS_OFF_ON, > }; > > +static struct gdsc oxilicx_gdsc_msm8226 = { > + .gdscr = 0x4034, > + .cxcs = (unsigned int []){ 0x4028 }, > + .cxc_count = 1, > + .pd = { > + .name = "oxilicx", > + }, > + .pwrsts = PWRSTS_OFF_ON, > +}; > + > static struct clk_regmap *mmcc_msm8226_clocks[] = { > [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, > [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, > @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { > [MDSS_GDSC] = &mdss_gdsc, > [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, > [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, > + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, > }; > > static const struct regmap_config mmcc_msm8226_regmap_config = { > > --- > base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889 > change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d > > Best regards,
On 08/05/2023 10:23, Konrad Dybcio wrote: > > > On 6.05.2023 23:20, Luca Weiss wrote: >> On msm8226 we also have OXILICX_GDSC but we need a slighly different >> config, with a .cxcs defined for clock but with no parent. > Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and > to achieve that, we sometimes define it to be the GX's (also > implicitly known as "oxili-non-CX" in before-a6xx-times) parent.. > > Roughly speaking CX powers the "GPU hardware owned by the broader > SoC that may not need the GPU core clock to be up" and GX powers > the "GPU hardware owned strictly by the GPU that needs at least some > GPU clocks to be enabled" > > Maybe 8974 simply has a bug in the driver that would do the reverse? > Could you (and perhaps Dmitry on his shiny new 13yo board) test that > theory, preferably on both SoCs? > > --- a/drivers/clk/qcom/mmcc-msm8974.c > +++ b/drivers/clk/qcom/mmcc-msm8974.c > @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = { > .pd = { > .name = "oxili", > }, > + .parent = &oxili_gdsc.pd, > .pwrsts = PWRSTS_OFF_ON, > }; Are you declaring oxili_gdsc to be a parent of itself? > > @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = { > .pd = { > .name = "oxilicx", > }, > - .parent = &oxili_gdsc.pd, > .pwrsts = PWRSTS_OFF_ON, > }; > > Konrad >> >> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> >> --- >> drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c >> index 4273fce9a4a4..39ee3953567c 100644 >> --- a/drivers/clk/qcom/mmcc-msm8974.c >> +++ b/drivers/clk/qcom/mmcc-msm8974.c >> @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { >> .pwrsts = PWRSTS_OFF_ON, >> }; >> >> +static struct gdsc oxilicx_gdsc_msm8226 = { >> + .gdscr = 0x4034, >> + .cxcs = (unsigned int []){ 0x4028 }, >> + .cxc_count = 1, >> + .pd = { >> + .name = "oxilicx", >> + }, >> + .pwrsts = PWRSTS_OFF_ON, >> +}; >> + >> static struct clk_regmap *mmcc_msm8226_clocks[] = { >> [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, >> [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, >> @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { >> [MDSS_GDSC] = &mdss_gdsc, >> [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, >> [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, >> + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, >> }; >> >> static const struct regmap_config mmcc_msm8226_regmap_config = { >> >> --- >> base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889 >> change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d >> >> Best regards,
On 8.05.2023 13:32, Dmitry Baryshkov wrote: > On 08/05/2023 10:23, Konrad Dybcio wrote: >> >> >> On 6.05.2023 23:20, Luca Weiss wrote: >>> On msm8226 we also have OXILICX_GDSC but we need a slighly different >>> config, with a .cxcs defined for clock but with no parent. >> Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and >> to achieve that, we sometimes define it to be the GX's (also >> implicitly known as "oxili-non-CX" in before-a6xx-times) parent.. >> >> Roughly speaking CX powers the "GPU hardware owned by the broader >> SoC that may not need the GPU core clock to be up" and GX powers >> the "GPU hardware owned strictly by the GPU that needs at least some >> GPU clocks to be enabled" >> >> Maybe 8974 simply has a bug in the driver that would do the reverse? >> Could you (and perhaps Dmitry on his shiny new 13yo board) test that >> theory, preferably on both SoCs? >> >> --- a/drivers/clk/qcom/mmcc-msm8974.c >> +++ b/drivers/clk/qcom/mmcc-msm8974.c >> @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = { >> .pd = { >> .name = "oxili", >> }, >> + .parent = &oxili_gdsc.pd, >> .pwrsts = PWRSTS_OFF_ON, >> }; > > Are you declaring oxili_gdsc to be a parent of itself? lol.. nice catch of course this line should have been + .parent = &oxilicx_gdsc.pd, and the definitions would need to be swapped Konrad > >> @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = { >> .pd = { >> .name = "oxilicx", >> }, >> - .parent = &oxili_gdsc.pd, >> .pwrsts = PWRSTS_OFF_ON, >> }; >> >> Konrad >>> >>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> >>> --- >>> drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++ >>> 1 file changed, 11 insertions(+) >>> >>> diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c >>> index 4273fce9a4a4..39ee3953567c 100644 >>> --- a/drivers/clk/qcom/mmcc-msm8974.c >>> +++ b/drivers/clk/qcom/mmcc-msm8974.c >>> @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { >>> .pwrsts = PWRSTS_OFF_ON, >>> }; >>> +static struct gdsc oxilicx_gdsc_msm8226 = { >>> + .gdscr = 0x4034, >>> + .cxcs = (unsigned int []){ 0x4028 }, >>> + .cxc_count = 1, >>> + .pd = { >>> + .name = "oxilicx", >>> + }, >>> + .pwrsts = PWRSTS_OFF_ON, >>> +}; >>> + >>> static struct clk_regmap *mmcc_msm8226_clocks[] = { >>> [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, >>> [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, >>> @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { >>> [MDSS_GDSC] = &mdss_gdsc, >>> [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, >>> [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, >>> + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, >>> }; >>> static const struct regmap_config mmcc_msm8226_regmap_config = { >>> >>> --- >>> base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889 >>> change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d >>> >>> Best regards, >
On Montag, 8. Mai 2023 13:35:07 CEST Konrad Dybcio wrote: > On 8.05.2023 13:32, Dmitry Baryshkov wrote: > > On 08/05/2023 10:23, Konrad Dybcio wrote: > >> On 6.05.2023 23:20, Luca Weiss wrote: > >>> On msm8226 we also have OXILICX_GDSC but we need a slighly different > >>> config, with a .cxcs defined for clock but with no parent. > >> > >> Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and > >> to achieve that, we sometimes define it to be the GX's (also > >> implicitly known as "oxili-non-CX" in before-a6xx-times) parent.. > >> > >> Roughly speaking CX powers the "GPU hardware owned by the broader > >> SoC that may not need the GPU core clock to be up" and GX powers > >> the "GPU hardware owned strictly by the GPU that needs at least some > >> GPU clocks to be enabled" > >> > >> Maybe 8974 simply has a bug in the driver that would do the reverse? > >> Could you (and perhaps Dmitry on his shiny new 13yo board) test that > >> theory, preferably on both SoCs? > >> > >> --- a/drivers/clk/qcom/mmcc-msm8974.c > >> +++ b/drivers/clk/qcom/mmcc-msm8974.c > >> @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = { > >> .pd = { > >> .name = "oxili", > >> }, > >> + .parent = &oxili_gdsc.pd, > >> .pwrsts = PWRSTS_OFF_ON, > >> }; > > > > Are you declaring oxili_gdsc to be a parent of itself? > > lol.. nice catch of course this line should have been > > + .parent = &oxilicx_gdsc.pd, > > and the definitions would need to be swapped The 0x4024 oxili_gdsc (downstream name gdsc_oxili_gx) is disabled in 8226 dts. Only in downstream msm8974.dtsi this gdsc gets "parent-supply = <&pm8841_s4_corner>;", on 8226 there's no parent-supply. And the gdsc parent doesn't even seem to be described there. Should I still try? > > Konrad > > >> @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = { > >> .pd = { > >> .name = "oxilicx", > >> }, > >> - .parent = &oxili_gdsc.pd, > >> .pwrsts = PWRSTS_OFF_ON, > >> }; > >> > >> Konrad > >> > >>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > >>> --- > >>> drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++ > >>> 1 file changed, 11 insertions(+) > >>> > >>> diff --git a/drivers/clk/qcom/mmcc-msm8974.c > >>> b/drivers/clk/qcom/mmcc-msm8974.c index 4273fce9a4a4..39ee3953567c > >>> 100644 > >>> --- a/drivers/clk/qcom/mmcc-msm8974.c > >>> +++ b/drivers/clk/qcom/mmcc-msm8974.c > >>> @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { > >>> .pwrsts = PWRSTS_OFF_ON, > >>> }; > >>> +static struct gdsc oxilicx_gdsc_msm8226 = { > >>> + .gdscr = 0x4034, > >>> + .cxcs = (unsigned int []){ 0x4028 }, > >>> + .cxc_count = 1, > >>> + .pd = { > >>> + .name = "oxilicx", > >>> + }, > >>> + .pwrsts = PWRSTS_OFF_ON, > >>> +}; > >>> + > >>> static struct clk_regmap *mmcc_msm8226_clocks[] = { > >>> [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, > >>> [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, > >>> @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { > >>> [MDSS_GDSC] = &mdss_gdsc, > >>> [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, > >>> [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, > >>> + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, > >>> }; > >>> static const struct regmap_config mmcc_msm8226_regmap_config = { > >>> > >>> --- > >>> base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889 > >>> change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d > >>> > >>> Best regards,
On 9.05.2023 18:57, Luca Weiss wrote: > On Montag, 8. Mai 2023 13:35:07 CEST Konrad Dybcio wrote: >> On 8.05.2023 13:32, Dmitry Baryshkov wrote: >>> On 08/05/2023 10:23, Konrad Dybcio wrote: >>>> On 6.05.2023 23:20, Luca Weiss wrote: >>>>> On msm8226 we also have OXILICX_GDSC but we need a slighly different >>>>> config, with a .cxcs defined for clock but with no parent. >>>> >>>> Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and >>>> to achieve that, we sometimes define it to be the GX's (also >>>> implicitly known as "oxili-non-CX" in before-a6xx-times) parent.. >>>> >>>> Roughly speaking CX powers the "GPU hardware owned by the broader >>>> SoC that may not need the GPU core clock to be up" and GX powers >>>> the "GPU hardware owned strictly by the GPU that needs at least some >>>> GPU clocks to be enabled" >>>> >>>> Maybe 8974 simply has a bug in the driver that would do the reverse? >>>> Could you (and perhaps Dmitry on his shiny new 13yo board) test that >>>> theory, preferably on both SoCs? >>>> >>>> --- a/drivers/clk/qcom/mmcc-msm8974.c >>>> +++ b/drivers/clk/qcom/mmcc-msm8974.c >>>> @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = { >>>> .pd = { >>>> .name = "oxili", >>>> }, >>>> + .parent = &oxili_gdsc.pd, >>>> .pwrsts = PWRSTS_OFF_ON, >>>> }; >>> >>> Are you declaring oxili_gdsc to be a parent of itself? >> >> lol.. nice catch of course this line should have been >> >> + .parent = &oxilicx_gdsc.pd, >> >> and the definitions would need to be swapped > > The 0x4024 oxili_gdsc (downstream name gdsc_oxili_gx) is disabled in 8226 dts. > > Only in downstream msm8974.dtsi this gdsc gets "parent-supply = > <&pm8841_s4_corner>;", on 8226 there's no parent-supply. And the gdsc parent > doesn't even seem to be described there. > > Should I still try? No, nevermind, this SoC is cut down more than I had initially thought. Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> with a minor nit: oxilicx -> oxili_cx Konrad > >> >> Konrad >> >>>> @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = { >>>> .pd = { >>>> .name = "oxilicx", >>>> }, >>>> - .parent = &oxili_gdsc.pd, >>>> .pwrsts = PWRSTS_OFF_ON, >>>> }; >>>> >>>> Konrad >>>> >>>>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> >>>>> --- >>>>> drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++ >>>>> 1 file changed, 11 insertions(+) >>>>> >>>>> diff --git a/drivers/clk/qcom/mmcc-msm8974.c >>>>> b/drivers/clk/qcom/mmcc-msm8974.c index 4273fce9a4a4..39ee3953567c >>>>> 100644 >>>>> --- a/drivers/clk/qcom/mmcc-msm8974.c >>>>> +++ b/drivers/clk/qcom/mmcc-msm8974.c >>>>> @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { >>>>> .pwrsts = PWRSTS_OFF_ON, >>>>> }; >>>>> +static struct gdsc oxilicx_gdsc_msm8226 = { >>>>> + .gdscr = 0x4034, >>>>> + .cxcs = (unsigned int []){ 0x4028 }, >>>>> + .cxc_count = 1, >>>>> + .pd = { >>>>> + .name = "oxilicx", >>>>> + }, >>>>> + .pwrsts = PWRSTS_OFF_ON, >>>>> +}; >>>>> + >>>>> static struct clk_regmap *mmcc_msm8226_clocks[] = { >>>>> [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, >>>>> [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, >>>>> @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { >>>>> [MDSS_GDSC] = &mdss_gdsc, >>>>> [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, >>>>> [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, >>>>> + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, >>>>> }; >>>>> static const struct regmap_config mmcc_msm8226_regmap_config = { >>>>> >>>>> --- >>>>> base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889 >>>>> change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d >>>>> >>>>> Best regards, > > > >
On Dienstag, 16. Mai 2023 02:15:06 CEST Konrad Dybcio wrote: > On 9.05.2023 18:57, Luca Weiss wrote: > > On Montag, 8. Mai 2023 13:35:07 CEST Konrad Dybcio wrote: > >> On 8.05.2023 13:32, Dmitry Baryshkov wrote: > >>> On 08/05/2023 10:23, Konrad Dybcio wrote: > >>>> On 6.05.2023 23:20, Luca Weiss wrote: > >>>>> On msm8226 we also have OXILICX_GDSC but we need a slighly different > >>>>> config, with a .cxcs defined for clock but with no parent. > >>>> > >>>> Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and > >>>> to achieve that, we sometimes define it to be the GX's (also > >>>> implicitly known as "oxili-non-CX" in before-a6xx-times) parent.. > >>>> > >>>> Roughly speaking CX powers the "GPU hardware owned by the broader > >>>> SoC that may not need the GPU core clock to be up" and GX powers > >>>> the "GPU hardware owned strictly by the GPU that needs at least some > >>>> GPU clocks to be enabled" > >>>> > >>>> Maybe 8974 simply has a bug in the driver that would do the reverse? > >>>> Could you (and perhaps Dmitry on his shiny new 13yo board) test that > >>>> theory, preferably on both SoCs? > >>>> > >>>> --- a/drivers/clk/qcom/mmcc-msm8974.c > >>>> +++ b/drivers/clk/qcom/mmcc-msm8974.c > >>>> @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = { > >>>> > >>>> .pd = { > >>>> > >>>> .name = "oxili", > >>>> > >>>> }, > >>>> > >>>> + .parent = &oxili_gdsc.pd, > >>>> > >>>> .pwrsts = PWRSTS_OFF_ON, > >>>> > >>>> }; > >>> > >>> Are you declaring oxili_gdsc to be a parent of itself? > >> > >> lol.. nice catch of course this line should have been > >> > >> + .parent = &oxilicx_gdsc.pd, > >> > >> and the definitions would need to be swapped > > > > The 0x4024 oxili_gdsc (downstream name gdsc_oxili_gx) is disabled in 8226 > > dts. > > > > Only in downstream msm8974.dtsi this gdsc gets "parent-supply = > > <&pm8841_s4_corner>;", on 8226 there's no parent-supply. And the gdsc > > parent doesn't even seem to be described there. > > > > Should I still try? > > No, nevermind, this SoC is cut down more than I had initially thought. > > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > > with a minor nit: oxilicx -> oxili_cx Hi Konrad, where do you want this changed? Just the .name field? But even that one is now matching the other oxilicx variant. And there's also gdscs like oxilicx_ahb_clk. Let me know. Regards Luca > > Konrad > > >> Konrad > >> > >>>> @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = { > >>>> > >>>> .pd = { > >>>> > >>>> .name = "oxilicx", > >>>> > >>>> }, > >>>> > >>>> - .parent = &oxili_gdsc.pd, > >>>> > >>>> .pwrsts = PWRSTS_OFF_ON, > >>>> > >>>> }; > >>>> > >>>> Konrad > >>>> > >>>>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> > >>>>> --- > >>>>> > >>>>> drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++ > >>>>> 1 file changed, 11 insertions(+) > >>>>> > >>>>> diff --git a/drivers/clk/qcom/mmcc-msm8974.c > >>>>> b/drivers/clk/qcom/mmcc-msm8974.c index 4273fce9a4a4..39ee3953567c > >>>>> 100644 > >>>>> --- a/drivers/clk/qcom/mmcc-msm8974.c > >>>>> +++ b/drivers/clk/qcom/mmcc-msm8974.c > >>>>> @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { > >>>>> > >>>>> .pwrsts = PWRSTS_OFF_ON, > >>>>> > >>>>> }; > >>>>> +static struct gdsc oxilicx_gdsc_msm8226 = { > >>>>> > >>>>> + .gdscr = 0x4034, > >>>>> + .cxcs = (unsigned int []){ 0x4028 }, > >>>>> + .cxc_count = 1, > >>>>> + .pd = { > >>>>> + .name = "oxilicx", > >>>>> + }, > >>>>> + .pwrsts = PWRSTS_OFF_ON, > >>>>> +}; > >>>>> + > >>>>> > >>>>> static struct clk_regmap *mmcc_msm8226_clocks[] = { > >>>>> > >>>>> [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, > >>>>> [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, > >>>>> > >>>>> @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { > >>>>> > >>>>> [MDSS_GDSC] = &mdss_gdsc, > >>>>> [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, > >>>>> [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, > >>>>> > >>>>> + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, > >>>>> > >>>>> }; > >>>>> > >>>>> static const struct regmap_config mmcc_msm8226_regmap_config = { > >>>>> > >>>>> --- > >>>>> base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889 > >>>>> change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d > >>>>> > >>>>> Best regards,
On 23.05.2023 22:44, Luca Weiss wrote: > On Dienstag, 16. Mai 2023 02:15:06 CEST Konrad Dybcio wrote: >> On 9.05.2023 18:57, Luca Weiss wrote: >>> On Montag, 8. Mai 2023 13:35:07 CEST Konrad Dybcio wrote: >>>> On 8.05.2023 13:32, Dmitry Baryshkov wrote: >>>>> On 08/05/2023 10:23, Konrad Dybcio wrote: >>>>>> On 6.05.2023 23:20, Luca Weiss wrote: >>>>>>> On msm8226 we also have OXILICX_GDSC but we need a slighly different >>>>>>> config, with a .cxcs defined for clock but with no parent. >>>>>> >>>>>> Hm, on newer (a5xx+) GPUs, CX needs to be turned on first and >>>>>> to achieve that, we sometimes define it to be the GX's (also >>>>>> implicitly known as "oxili-non-CX" in before-a6xx-times) parent.. >>>>>> >>>>>> Roughly speaking CX powers the "GPU hardware owned by the broader >>>>>> SoC that may not need the GPU core clock to be up" and GX powers >>>>>> the "GPU hardware owned strictly by the GPU that needs at least some >>>>>> GPU clocks to be enabled" >>>>>> >>>>>> Maybe 8974 simply has a bug in the driver that would do the reverse? >>>>>> Could you (and perhaps Dmitry on his shiny new 13yo board) test that >>>>>> theory, preferably on both SoCs? >>>>>> >>>>>> --- a/drivers/clk/qcom/mmcc-msm8974.c >>>>>> +++ b/drivers/clk/qcom/mmcc-msm8974.c >>>>>> @@ -2431,6 +2431,7 @@ static struct gdsc oxili_gdsc = { >>>>>> >>>>>> .pd = { >>>>>> >>>>>> .name = "oxili", >>>>>> >>>>>> }, >>>>>> >>>>>> + .parent = &oxili_gdsc.pd, >>>>>> >>>>>> .pwrsts = PWRSTS_OFF_ON, >>>>>> >>>>>> }; >>>>> >>>>> Are you declaring oxili_gdsc to be a parent of itself? >>>> >>>> lol.. nice catch of course this line should have been >>>> >>>> + .parent = &oxilicx_gdsc.pd, >>>> >>>> and the definitions would need to be swapped >>> >>> The 0x4024 oxili_gdsc (downstream name gdsc_oxili_gx) is disabled in 8226 >>> dts. >>> >>> Only in downstream msm8974.dtsi this gdsc gets "parent-supply = >>> <&pm8841_s4_corner>;", on 8226 there's no parent-supply. And the gdsc >>> parent doesn't even seem to be described there. >>> >>> Should I still try? >> >> No, nevermind, this SoC is cut down more than I had initially thought. >> >> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> >> >> with a minor nit: oxilicx -> oxili_cx > > Hi Konrad, > > where do you want this changed? Just the .name field? Yes and maybe the struct name. We shouldn't be messing with bindings since it's cosmetic. But even that one is now > matching the other oxilicx variant. And there's also gdscs like > oxilicx_ahb_clk. oxilicx literally means "the CX side of OXILI", or translating from Qualcommish to English "GPU registers accessible from the AP, not necessarily the GPU itself" Konrad > > Let me know. > > Regards > Luca > >> >> Konrad >> >>>> Konrad >>>> >>>>>> @@ -2439,7 +2440,6 @@ static struct gdsc oxilicx_gdsc = { >>>>>> >>>>>> .pd = { >>>>>> >>>>>> .name = "oxilicx", >>>>>> >>>>>> }, >>>>>> >>>>>> - .parent = &oxili_gdsc.pd, >>>>>> >>>>>> .pwrsts = PWRSTS_OFF_ON, >>>>>> >>>>>> }; >>>>>> >>>>>> Konrad >>>>>> >>>>>>> Signed-off-by: Luca Weiss <luca@z3ntu.xyz> >>>>>>> --- >>>>>>> >>>>>>> drivers/clk/qcom/mmcc-msm8974.c | 11 +++++++++++ >>>>>>> 1 file changed, 11 insertions(+) >>>>>>> >>>>>>> diff --git a/drivers/clk/qcom/mmcc-msm8974.c >>>>>>> b/drivers/clk/qcom/mmcc-msm8974.c index 4273fce9a4a4..39ee3953567c >>>>>>> 100644 >>>>>>> --- a/drivers/clk/qcom/mmcc-msm8974.c >>>>>>> +++ b/drivers/clk/qcom/mmcc-msm8974.c >>>>>>> @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { >>>>>>> >>>>>>> .pwrsts = PWRSTS_OFF_ON, >>>>>>> >>>>>>> }; >>>>>>> +static struct gdsc oxilicx_gdsc_msm8226 = { >>>>>>> >>>>>>> + .gdscr = 0x4034, >>>>>>> + .cxcs = (unsigned int []){ 0x4028 }, >>>>>>> + .cxc_count = 1, >>>>>>> + .pd = { >>>>>>> + .name = "oxilicx", >>>>>>> + }, >>>>>>> + .pwrsts = PWRSTS_OFF_ON, >>>>>>> +}; >>>>>>> + >>>>>>> >>>>>>> static struct clk_regmap *mmcc_msm8226_clocks[] = { >>>>>>> >>>>>>> [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, >>>>>>> [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, >>>>>>> >>>>>>> @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { >>>>>>> >>>>>>> [MDSS_GDSC] = &mdss_gdsc, >>>>>>> [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, >>>>>>> [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, >>>>>>> >>>>>>> + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, >>>>>>> >>>>>>> }; >>>>>>> >>>>>>> static const struct regmap_config mmcc_msm8226_regmap_config = { >>>>>>> >>>>>>> --- >>>>>>> base-commit: dd9e11d6477a52ede9ebe575c83285e79e823889 >>>>>>> change-id: 20230506-msm8226-oxilicx-7f3f0f8e491d >>>>>>> >>>>>>> Best regards, > > > >
diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c index 4273fce9a4a4..39ee3953567c 100644 --- a/drivers/clk/qcom/mmcc-msm8974.c +++ b/drivers/clk/qcom/mmcc-msm8974.c @@ -2443,6 +2443,16 @@ static struct gdsc oxilicx_gdsc = { .pwrsts = PWRSTS_OFF_ON, }; +static struct gdsc oxilicx_gdsc_msm8226 = { + .gdscr = 0x4034, + .cxcs = (unsigned int []){ 0x4028 }, + .cxc_count = 1, + .pd = { + .name = "oxilicx", + }, + .pwrsts = PWRSTS_OFF_ON, +}; + static struct clk_regmap *mmcc_msm8226_clocks[] = { [MMSS_AHB_CLK_SRC] = &mmss_ahb_clk_src.clkr, [MMSS_AXI_CLK_SRC] = &mmss_axi_clk_src.clkr, @@ -2533,6 +2543,7 @@ static struct gdsc *mmcc_msm8226_gdscs[] = { [MDSS_GDSC] = &mdss_gdsc, [CAMSS_JPEG_GDSC] = &camss_jpeg_gdsc, [CAMSS_VFE_GDSC] = &camss_vfe_gdsc, + [OXILICX_GDSC] = &oxilicx_gdsc_msm8226, }; static const struct regmap_config mmcc_msm8226_regmap_config = {