Message ID | 20230530112050.5635-3-aford173@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2104565vqr; Tue, 30 May 2023 04:24:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DD7+fPm8+TQzceqZ//Y2qWiWjloB9enHQZ+Uoglz4kwOj4HZf1ckq61FH1n90ORHpqAJI X-Received: by 2002:a17:90b:118:b0:256:6167:c725 with SMTP id p24-20020a17090b011800b002566167c725mr1926334pjz.6.1685445850465; Tue, 30 May 2023 04:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685445850; cv=none; d=google.com; s=arc-20160816; b=pgogkZGUOLYQZkhS3EJgBz1tlz/BCX48OugeR7K1m7mSjgJY5dQ2OyImHJZS5E8wRK Nq6yCACA7kmJ7DRPxYlj4UgPI5ydurxrbZguHbq2kKxNF0JZW15BQS5RL0npzbP8hB2n UaQC+MzjBMi4Tg38K9q413CYVqD4eIlgcMW0f4LaVgA/uhpwAnk1WkHS2Ek8J+lW/G9T OORDEoqD67IMyUcjDDvpaehpEnpaf9AkUWHwfJgTlvv8Q/J2fjuS4LwZqVzM+SB2YiXT Cl0fH6OVk/wrWC14+/L1xc8hu2qtGGr8w9kWVab32zt9b7tJ2VUaeKhD8mxo4JYuXuf7 EKzw== 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=fZAcV0XNcMwrhSLLa6b9f3EOQQtrnYuiRx8TP1TjfRs=; b=KC71rYgXNsd4y4lvKDeUpqGPCtGiXI5Bjp3oi+2Zfy1nATf41CSNaz42i+zAVqtToZ gZUT36ZALvrhnpFOjozoVSb+s6/G5bIoR7/p7P2McsOw0pUXBBojWNZs1T+WkdVvDNTR g4m9iylE5+/tWoNSZrRGDtRWSo0xkO/CYj31rh4BkNgfkSO26UB3CiVoKIFiMsUI+In4 P2T8OfvEjt+jPZEX17+zpChTLiEUPBlNtaSjAe6VNJPoBfGcs8R5Tm/9RdkfJl5x8oJd sHDhEq0JeUlBcQMEu6m8pcCWfTPEHS4uUdtOs2U6baq8xCctoZQtiEUD1jVsKiX44147 EmOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=q5+FzL0b; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gl4-20020a17090b120400b00256c97defa9si614830pjb.54.2023.05.30.04.23.56; Tue, 30 May 2023 04:24:10 -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=@gmail.com header.s=20221208 header.b=q5+FzL0b; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231802AbjE3LVL (ORCPT <rfc822;andrewvogler123@gmail.com> + 99 others); Tue, 30 May 2023 07:21:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231626AbjE3LVI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 30 May 2023 07:21:08 -0400 Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 257B9E8; Tue, 30 May 2023 04:21:06 -0700 (PDT) Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3909756b8b1so1442319b6e.1; Tue, 30 May 2023 04:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685445665; x=1688037665; 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=fZAcV0XNcMwrhSLLa6b9f3EOQQtrnYuiRx8TP1TjfRs=; b=q5+FzL0bPNCscQLgbG5qP397449sMQM06sM1URLamdujhkCEyPJPRIvVYu0izRkAQE +5kkaNJyYSzZeI2vm4N7Sax7llgUQIW6hxlX5CLP/2A0r7h9B67RdjDqEgT6mFZC/hKh KucA3MtGbzMwnAkbIolfd/f/9+DrEVnlKYJ8jg024dYqMNX8U6+CAP8mf1Lg81yrlbZT G6ulBgxDGTnQq6YoD7j75PAaf3IqhKiFXSgw8QHbgo5RnYctQQMLgqOSTaLNoX3fPHGb LXx6L8H1BWoINUOhwGNOuMM2lS7hIMMQB3gkLeTUfhUuWP2+/N69cBLDBm7556IeD3rv ZH+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685445665; x=1688037665; 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=fZAcV0XNcMwrhSLLa6b9f3EOQQtrnYuiRx8TP1TjfRs=; b=Kv8cuejAwcMPG78CpyXyko6K5geFbto+RywzypFlSLQEfUorNO1UwLMeVsh279MiTu 9TYn1APcD2OV3POi8EvqXz6XlMspSb+Lqrt0kFu+mVgg6GwS7mhpBxBoCwbkOZiv1Ua/ uE6gTCur8lilp0eV442+ae5MpHbJ9MqfIepUfdSDVfM6oUQLlK4kYPmu9XXmPH1RFMpb Tf80UxBadhW4PyQ32nFBctFRugIxFc+1eBLJ5u+pzA/WRMiXERYYZuXAAkyEAnto+5fT SWN5a3/hp2ciba2nS0dsUd71mVGb77aEAWm6gxOSu0fk2GRJgUmWBGIefpPzNPTSo7OT CgZQ== X-Gm-Message-State: AC+VfDw6TNkbvNC0BO/6DO+deKRg9XmQPavpQBHpvd5WyoapC2qyrZHp lkMz/zXtjpTurXeS34NCNAZr/bvNb+s= X-Received: by 2002:aca:705:0:b0:398:937:6011 with SMTP id 5-20020aca0705000000b0039809376011mr861717oih.20.1685445664899; Tue, 30 May 2023 04:21:04 -0700 (PDT) Received: from aford-B741.lan ([2601:447:d001:897f:a5e7:c9e9:bb20:39c1]) by smtp.gmail.com with ESMTPSA id co17-20020a0566383e1100b003c4e02148e5sm634363jab.53.2023.05.30.04.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 04:21:04 -0700 (PDT) From: Adam Ford <aford173@gmail.com> To: linux-renesas-soc@vger.kernel.org Cc: biju.das.jz@bp.renesas.com, marek.vasut+renesas@gmail.com, cstevens@beaconembedded.com, aford@beaconembedded.com, Adam Ford <aford173@gmail.com>, Geert Uytterhoeven <geert+renesas@glider.be>, Magnus Damm <magnus.damm@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [RFC 3/3] arm64: dts: renesas: r8a774a1: Add GPU Node Date: Tue, 30 May 2023 06:20:49 -0500 Message-Id: <20230530112050.5635-3-aford173@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230530112050.5635-1-aford173@gmail.com> References: <20230530112050.5635-1-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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?1767318068256791585?= X-GMAIL-MSGID: =?utf-8?q?1767318068256791585?= |
Series |
[RFC,1/3] clk: renesas: rcar-gen3: Add support for ZG clock
|
|
Commit Message
Adam Ford
May 30, 2023, 11:20 a.m. UTC
With the 3dge and ZG clocks now available, the generic GPU node can
be added. Until proper firmware is made, it is not usable.
Signed-off-by: Adam Ford <aford173@gmail.com>
---
This is based on the assumption that the Rogue 6250 could use
generic driver [1] and firmware [2] being implemebted by the Mesa group
and others. In practice, the firmware isn't really compatible since
the 6250 in the RZ/G2M appears to be a different variant.
[1] - https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/powervr-next
[2] - https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/tree/powervr/powervr
Comments
Hi Adam, On Tue, May 30, 2023 at 1:21 PM Adam Ford <aford173@gmail.com> wrote: > With the 3dge and ZG clocks now available, the generic GPU node can > be added. Until proper firmware is made, it is not usable. > > Signed-off-by: Adam Ford <aford173@gmail.com> > --- > This is based on the assumption that the Rogue 6250 could use > generic driver [1] and firmware [2] being implemebted by the Mesa group > and others. In practice, the firmware isn't really compatible since > the 6250 in the RZ/G2M appears to be a different variant. > > [1] - https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/powervr-next > [2] - https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/tree/powervr/powervr Thanks for your patch! > --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > @@ -226,6 +226,27 @@ extalr_clk: extalr { > clock-frequency = <0>; > }; > > + gpu_opp_table: opp-table { > + compatible = "operating-points-v2"; > + > + opp-200000000 { > + opp-hz = /bits/ 64 <200000000>; > + opp-microvolt = <830000>; > + }; > + opp-300000000 { > + opp-hz = /bits/ 64 <300000000>; > + opp-microvolt = <830000>; > + }; > + opp-400000000 { > + opp-hz = /bits/ 64 <400000000>; > + opp-microvolt = <830000>; > + }; > + opp-600000000 { > + opp-hz = /bits/ 64 <600000000>; > + opp-microvolt = <830000>; > + }; > + }; > + > /* External PCIe clock - can be overridden by the board */ > pcie_bus_clk: pcie_bus { > compatible = "fixed-clock"; > @@ -2347,6 +2368,18 @@ gic: interrupt-controller@f1010000 { > resets = <&cpg 408>; > }; > > + gpu@fd000000 { > + compatible = "img,powervr-series6xt"; > + reg = <0 0xfd000000 0 0x40000>; > + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&cpg CPG_MOD 112>, <&cpg CPG_MOD 112>,<&cpg CPG_MOD 112>; > + clock-names = "core", "mem", "sys"; > + interrupt-names = "gpu"; > + operating-points-v2 = <&gpu_opp_table>; > + power-domains = <&sysc R8A774A1_PD_3DG_B>; > + resets = <&cpg 112>; > + }; > + > pciec0: pcie@fe000000 { > compatible = "renesas,pcie-r8a774a1", > "renesas,pcie-rcar-gen3"; LGTM. But obviously I cannot take this as-is, as there are no DT bindings for this device, and it didn't work for you... Gr{oetje,eeting}s, Geert
On Wed, Jun 7, 2023 at 8:21 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Adam, > > On Tue, May 30, 2023 at 1:21 PM Adam Ford <aford173@gmail.com> wrote: > > With the 3dge and ZG clocks now available, the generic GPU node can > > be added. Until proper firmware is made, it is not usable. > > > > Signed-off-by: Adam Ford <aford173@gmail.com> > > --- > > This is based on the assumption that the Rogue 6250 could use > > generic driver [1] and firmware [2] being implemebted by the Mesa group > > and others. In practice, the firmware isn't really compatible since > > the 6250 in the RZ/G2M appears to be a different variant. > > > > [1] - https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/powervr-next > > [2] - https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/tree/powervr/powervr > > Thanks for your patch! > > > --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > @@ -226,6 +226,27 @@ extalr_clk: extalr { > > clock-frequency = <0>; > > }; > > > > + gpu_opp_table: opp-table { > > + compatible = "operating-points-v2"; > > + > > + opp-200000000 { > > + opp-hz = /bits/ 64 <200000000>; > > + opp-microvolt = <830000>; > > + }; > > + opp-300000000 { > > + opp-hz = /bits/ 64 <300000000>; > > + opp-microvolt = <830000>; > > + }; > > + opp-400000000 { > > + opp-hz = /bits/ 64 <400000000>; > > + opp-microvolt = <830000>; > > + }; > > + opp-600000000 { > > + opp-hz = /bits/ 64 <600000000>; > > + opp-microvolt = <830000>; > > + }; > > + }; > > + > > /* External PCIe clock - can be overridden by the board */ > > pcie_bus_clk: pcie_bus { > > compatible = "fixed-clock"; > > @@ -2347,6 +2368,18 @@ gic: interrupt-controller@f1010000 { > > resets = <&cpg 408>; > > }; > > > > + gpu@fd000000 { > > + compatible = "img,powervr-series6xt"; > > + reg = <0 0xfd000000 0 0x40000>; > > + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; > > + clocks = <&cpg CPG_MOD 112>, <&cpg CPG_MOD 112>,<&cpg CPG_MOD 112>; > > + clock-names = "core", "mem", "sys"; > > + interrupt-names = "gpu"; > > + operating-points-v2 = <&gpu_opp_table>; > > + power-domains = <&sysc R8A774A1_PD_3DG_B>; > > + resets = <&cpg 112>; > > + }; > > + > > pciec0: pcie@fe000000 { > > compatible = "renesas,pcie-r8a774a1", > > "renesas,pcie-rcar-gen3"; > > LGTM. But obviously I cannot take this as-is, as there are no DT bindings > for this device, and it didn't work for you... It was mostly to follow up to the previous ones with links for the mainline Rogue video driver in the hopes that someone from Renesas might have some input on whether or not Renesas might be able to support this and have a discussion. I knew when I submitted it that it wouldn't be accepted which is why I posted it as an RFC. If I address concerns you have in the previous patches, would you be OK with me submitting then as a formal patch to at least get the rest of the system ready in the event the GPU driver/firmware becomes available? It seems harmless, but I also see the argument that it's dead code without the GPU node. If not, I'll shelve this for now, and hope to get some responses from Renesas. adam > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds
Hi Adam, On Wed, Jun 7, 2023 at 3:31 PM Adam Ford <aford173@gmail.com> wrote: > On Wed, Jun 7, 2023 at 8:21 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > On Tue, May 30, 2023 at 1:21 PM Adam Ford <aford173@gmail.com> wrote: > > > With the 3dge and ZG clocks now available, the generic GPU node can > > > be added. Until proper firmware is made, it is not usable. > > > > > > Signed-off-by: Adam Ford <aford173@gmail.com> > > > --- > > > This is based on the assumption that the Rogue 6250 could use > > > generic driver [1] and firmware [2] being implemebted by the Mesa group > > > and others. In practice, the firmware isn't really compatible since > > > the 6250 in the RZ/G2M appears to be a different variant. > > > > > > [1] - https://gitlab.freedesktop.org/frankbinns/powervr/-/tree/powervr-next > > > [2] - https://gitlab.freedesktop.org/frankbinns/linux-firmware/-/tree/powervr/powervr > > > > Thanks for your patch! > > > > > --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > > +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi > > > @@ -226,6 +226,27 @@ extalr_clk: extalr { > > > clock-frequency = <0>; > > > }; > > > > > > + gpu_opp_table: opp-table { > > > + compatible = "operating-points-v2"; > > > + > > > + opp-200000000 { > > > + opp-hz = /bits/ 64 <200000000>; > > > + opp-microvolt = <830000>; > > > + }; > > > + opp-300000000 { > > > + opp-hz = /bits/ 64 <300000000>; > > > + opp-microvolt = <830000>; > > > + }; > > > + opp-400000000 { > > > + opp-hz = /bits/ 64 <400000000>; > > > + opp-microvolt = <830000>; > > > + }; > > > + opp-600000000 { > > > + opp-hz = /bits/ 64 <600000000>; > > > + opp-microvolt = <830000>; > > > + }; > > > + }; > > > + > > > /* External PCIe clock - can be overridden by the board */ > > > pcie_bus_clk: pcie_bus { > > > compatible = "fixed-clock"; > > > @@ -2347,6 +2368,18 @@ gic: interrupt-controller@f1010000 { > > > resets = <&cpg 408>; > > > }; > > > > > > + gpu@fd000000 { > > > + compatible = "img,powervr-series6xt"; > > > + reg = <0 0xfd000000 0 0x40000>; > > > + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; > > > + clocks = <&cpg CPG_MOD 112>, <&cpg CPG_MOD 112>,<&cpg CPG_MOD 112>; > > > + clock-names = "core", "mem", "sys"; > > > + interrupt-names = "gpu"; > > > + operating-points-v2 = <&gpu_opp_table>; > > > + power-domains = <&sysc R8A774A1_PD_3DG_B>; > > > + resets = <&cpg 112>; > > > + }; > > > + > > > pciec0: pcie@fe000000 { > > > compatible = "renesas,pcie-r8a774a1", > > > "renesas,pcie-rcar-gen3"; > > > > LGTM. But obviously I cannot take this as-is, as there are no DT bindings > > for this device, and it didn't work for you... > > It was mostly to follow up to the previous ones with links for the > mainline Rogue video driver in the hopes that someone from Renesas > might have some input on whether or not Renesas might be able to > support this and have a discussion. I knew when I submitted it that > it wouldn't be accepted which is why I posted it as an RFC. > If I address concerns you have in the previous patches, would you be > OK with me submitting then as a formal patch to at least get the rest > of the system ready in the event the GPU driver/firmware becomes > available? It seems harmless, but I also see the argument that it's > dead code without the GPU node. The clock patches are almost there, and I'm happy to accept them when the last rough edges have been removed. > If not, I'll shelve this for now, and hope to get some responses from Renesas. Good luck! ;-) Gr{oetje,eeting}s, Geert
diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi index c21b78685123..7e5816113a3c 100644 --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi @@ -226,6 +226,27 @@ extalr_clk: extalr { clock-frequency = <0>; }; + gpu_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <830000>; + }; + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <830000>; + }; + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <830000>; + }; + opp-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <830000>; + }; + }; + /* External PCIe clock - can be overridden by the board */ pcie_bus_clk: pcie_bus { compatible = "fixed-clock"; @@ -2347,6 +2368,18 @@ gic: interrupt-controller@f1010000 { resets = <&cpg 408>; }; + gpu@fd000000 { + compatible = "img,powervr-series6xt"; + reg = <0 0xfd000000 0 0x40000>; + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cpg CPG_MOD 112>, <&cpg CPG_MOD 112>,<&cpg CPG_MOD 112>; + clock-names = "core", "mem", "sys"; + interrupt-names = "gpu"; + operating-points-v2 = <&gpu_opp_table>; + power-domains = <&sysc R8A774A1_PD_3DG_B>; + resets = <&cpg 112>; + }; + pciec0: pcie@fe000000 { compatible = "renesas,pcie-r8a774a1", "renesas,pcie-rcar-gen3";