Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp148176lqs; Thu, 13 Jun 2024 06:33:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWvCtGgy6BB14TePnd2mnE3z6jtvT2bIAyhMRBNeGiJI7Ct+jL6ga9wtjgxhSzi4i0pa6aoFGWz9vpkDkuf4a+ewbf/bI7f2VYZxiQjw== X-Google-Smtp-Source: AGHT+IGqCcTK+2jbbsg2qpbzRrNP5kqx2Lem2/uAphXQ7K5BuDL3AhPrCVX7T71RvulPKU/g6c8w X-Received: by 2002:a05:6358:491a:b0:19f:3348:e3d4 with SMTP id e5c5f4694b2df-19f69d2dfa1mr551634655d.17.1718285621564; Thu, 13 Jun 2024 06:33:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718285621; cv=pass; d=google.com; s=arc-20160816; b=h+tGhzMd+IB1kXoTRhVwXbbmPZGFxNOcDJq7f8K/OdOArlg/Cz3PkEzXIQKm89ylsb xY6k1FAucjW1JafN3U2a5Re3Hh/7TfwxG6PjTIqsIbBnaTRO47OzTBsBij6snm9WH2rP MWYz1iGzyiH1G5k7fSv+XRY00YdCy8yFA8YABBbe9KFuaBPIdv+lHVPV4n7Ats9cHkQ9 +54LvbZfySUxI5bFRxYdDSmjBYtuf1hSXdoR9BgvJ0cEqisHvCLSgdRiz5veHPwCwrkY cISKWtZwai1cnO4PK7u3Is00lOnVtx4XNCVEYX36GSuXHglyBeTdjQ2M1mNDmoi0dguf RZOA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=UY7+qVTCBnkic8L6HrX2KqWBFLJlyWpgMqTcC8mYb1g=; fh=/xrIQErcWJ6meq5IF77ewUBVtMR78P8lMjrl+IAQaXw=; b=AJC++l2S5X7mvWttsW/kVSzuADBsnYoFpyfvREwkkVG+w55Ut1fDy97Mkr91tV8dzG gU695b6hbahSkexqfdVcUI8043G7x8UQRNnCO8i+JD73gDep7qmJEKgVw3lF6uAlSMig kJkXJ4+ltM5MqvoPiVGF7BV5Qwn6i+bwprjSV0Dc+699sBKrJOiAydx1EjhS7VWWwfLa VhTMtq3go1hWce6RHAQyAPgxgx6O+RjLyz0vZsUQycjvTb2c50SJTzQAUiO2WBqiX6fC IfFRrb/2s+Poxoc5R5AF9xLHjnCRuRCt4u1SdKLLk+4p+HeJ1w0tOk2szDmje8mz2rta Q10g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hsBZ+G+H; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-213308-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213308-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee67b9820si1267633a12.876.2024.06.13.06.33.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:33:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213308-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hsBZ+G+H; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-213308-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213308-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A1B692854E5 for ; Thu, 13 Jun 2024 13:25:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED92414533F; Thu, 13 Jun 2024 13:23:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hsBZ+G+H" Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4785F144D00; Thu, 13 Jun 2024 13:23:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718285007; cv=none; b=qy43gQMd4HOdOxifhCTnVmnLbrDWHUmV0HKL/yDBgXwH26xUPbo+JjI5zFZ320Eng91387M0BXM7yK4Gg9npWwI3TMM822cupify/SSU5QLrncaQc1lOVJiy9r+U5EVZ770suWwh+uYvqDZHIyPODLI/2e6pIgxOeRf6NiDSFEA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718285007; c=relaxed/simple; bh=6SUWhYLUvPu0jUI6jw+gwsAu3EpJiUscax3yC3oq0HY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=TqHyPiBxPih/8N2LePY04ssSLcNPYba2ObleTIyZkvLG0/9YrXVFTbhqgpFaqRgW/An4D3LiZx7sirA/sWx/h3fASwlbPGKmsSDZvpg5e/5gUTpHmfuXx3+WFEeLo1S87WLJljBr+IGBG0V2mpAXshYeqzYaQB7OJTa5ThC2aQs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hsBZ+G+H; arc=none smtp.client-ip=209.85.215.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-6ce533b643dso752771a12.3; Thu, 13 Jun 2024 06:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718285005; x=1718889805; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=UY7+qVTCBnkic8L6HrX2KqWBFLJlyWpgMqTcC8mYb1g=; b=hsBZ+G+HbIqp5N+MGswiz5r+Ix0p33odmCWMl76r3w/Ua+OWeKgtARfJRm6jWeNUVo ERriOuue1VTqDLdq+YoQjs5flgw8YRr/HJyeG0nsZwpogDoTiFdrZJfjZZVnvrh0hCbS xrA9kyOjZUcBJG3Dn+leQ6KAFkQ8k0ftz1sBhhtChfnXKLM5HW/xxi6aAed57lA0b5wK IXYA7eBUUzWP3OrbE8Dd1sgtXyQbhq3kNrzBkGHWtE4iDS8oP/I6G63kqm8r0xEYjNKI Xc3bHd/l59D6HI39EbW+HSVhENiIW6b0x6dDh3e/+jLB3PPHA7SdQflN8hVQ/R2yMOVU ls6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285005; x=1718889805; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UY7+qVTCBnkic8L6HrX2KqWBFLJlyWpgMqTcC8mYb1g=; b=JHnRyjgWJzNHKC6XmLwZryCOtb4++nJgXaCxpB0lPhil+TFDG4KgEnmWfNB8+iTmk6 a9v9NQgMhH19r5xFecJbYYEaHqzhJzKR94vkHmuaXddo/T9t/JEJGPgLU6ciH+KHVftg FF5iBc/xwHsRD+ZoJDguUuZtUXC+uXlSp7O6CtuvyNwV+6IJA8IStBVPFI6Om2tsTzcQ OY/eLfsQ7yApks7/32CamPFT3D5/ciUMdVmoT36cavoKCWVfonvaKWouRYQGa/H8p51f XW/L4CWL73M1I+GYHtJsMz8MXeQDCVCRpLwxL48q6rDdj2BmvcfwLxJBx2RGM+Io6jYz T7QQ== X-Forwarded-Encrypted: i=1; AJvYcCWiFWEHs/CGRgfw7rzr+SCOJW9AUL3QF1Xgk8EAO7pxXGTIxkqUvm+9eqvKnj223rr6dTIBiOlDfwXuYwY1UfempB7DfxiXgdy49QVKXJ2jXFuVeB5uZ4ertQxNYnYh07cP+ZJqLYP1nfTuWqwt25WKU7/MUxvAjgSYkDsVGvp2vzIAQw== X-Gm-Message-State: AOJu0YzdByBLA8ZnPqjbKxnC7LaOJgoLVz5DVWXrLZ65PwBV0q/99Vu1 T1Kt24lLFVFa3/utLAFKsu8JekG+s/vHLJMnWufOZ5BYCQ5MD04kR6/7IdoCjQ0IR8trP46Ahly QYoGZVIvz+sagBT8Ji8nenGwj49s= X-Received: by 2002:a17:90b:1909:b0:2bf:de54:f5b with SMTP id 98e67ed59e1d1-2c4a762fdebmr4954256a91.18.1718285005354; Thu, 13 Jun 2024 06:23:25 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240530083513.4135052-1-wenst@chromium.org> <20240530083513.4135052-4-wenst@chromium.org> In-Reply-To: From: Adam Ford Date: Thu, 13 Jun 2024 08:23:13 -0500 Message-ID: Subject: Re: [PATCH 3/6] dt-bindings: gpu: powervr-rogue: Add MediaTek MT8173 GPU To: Chen-Yu Tsai Cc: Frank Binns , "matthias.bgg@gmail.com" , "tzimmermann@suse.de" , Matt Coster , "sboyd@kernel.org" , "robh@kernel.org" , "krzk+dt@kernel.org" , "maarten.lankhorst@linux.intel.com" , "mripard@kernel.org" , "conor+dt@kernel.org" , "angelogioacchino.delregno@collabora.com" , "dri-devel@lists.freedesktop.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "airlied@gmail.com" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , "daniel@ffwll.ch" , "linux-clk@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 13, 2024 at 4:10=E2=80=AFAM Chen-Yu Tsai w= rote: > > On Tue, Jun 4, 2024 at 12:18=E2=80=AFPM Chen-Yu Tsai = wrote: > > > > On Fri, May 31, 2024 at 9:37=E2=80=AFPM Frank Binns wrote: > > > > > > Hi ChenYu, > > > > > > On Thu, 2024-05-30 at 16:35 +0800, Chen-Yu Tsai wrote: > > > > The MediaTek MT8173 comes with a PowerVR Rogue GX6250, which is one > > > > of the Series6XT GPUs, another sub-family of the Rogue family. > > > > > > I've added Adam Ford who sent out some DT related patches [1] for the= Renesas > > > variant of GX6250 and the GX6650 (another Series6XT GPU). > > > > > > > > > > > This was part of the very first few versions of the PowerVR submiss= ion, > > > > but was later dropped. The compatible string has been updated to fo= llow > > > > the new naming scheme adopted for the AXE series. > > > > > > > > In a previous iteration of the PowerVR binding submission [1], the > > > > number of clocks required for the 6XT family was mentioned to be > > > > always 3. This is also reflected here. > > > > > > > > [1] https://lore.kernel.org/dri-devel/6eeccb26e09aad67fb30ffcd523c7= 93a43c79c2a.camel@imgtec.com/ > > > > > > > > Signed-off-by: Chen-Yu Tsai > > > > --- > > > > .../bindings/gpu/img,powervr-rogue.yaml | 24 +++++++++++++++= ---- > > > > 1 file changed, 20 insertions(+), 4 deletions(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/gpu/img,powervr-rogu= e.yaml b/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml > > > > index 256e252f8087..48aa205b66b4 100644 > > > > --- a/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml > > > > +++ b/Documentation/devicetree/bindings/gpu/img,powervr-rogue.yaml > > > > @@ -12,10 +12,17 @@ maintainers: > > > > > > > > properties: > > > > compatible: > > > > - items: > > > > - - enum: > > > > - - ti,am62-gpu > > > > - - const: img,img-axe # IMG AXE GPU model/revision is fully d= iscoverable > > > > + oneOf: > > > > + - items: > > > > + - enum: > > > > + - mediatek,mt8173-gpu > > > > + # PowerVR 6XT GPU model/revision is fully discoverable > > > > + - const: img,powervr-6xt > > > > + - items: > > > > + - enum: > > > > + - ti,am62-gpu > > > > + # IMG AXE GPU model/revision is fully discoverable > > > > + - const: img,img-axe > > > > > > The Series6XT GPU models have differing numbers of power domains (eit= her 2, 4 or > > > 5). Whereas, the AXE GPUs have a single power domain, so I assume the= re should > > > be a related change here. > > > > > > The GX6250 has two power domains (lets call them A and B). There's a = constraint > > > that if domain B is powered then domain A must also be powered. > > > > > > In patch 6 [2] it's setting the power domain to MT8173_POWER_DOMAIN_M= FG, which I > > > believe corresponds to power domain B. I assume this works because th= e MTK power > > > controller driver is encoding the constraint above, meaning that when= we disable > > > or enable MT8173_POWER_DOMAIN_MFG it's also disabling/enabling MT8173= _POWER_DOMA > > > IN_MFG_2D (domain A). > > > > It could also be that the power domains are split in the glue layer and= there > > is some sequencing handled there. I'll reach out to MediaTek to see if = they > > can dig up some design specifics. > > Unfortunately they said they no longer have that information. > > > I assume you would like to see the separate power domains properly mode= led > > in the device tree? > > So how should we go about this? Adam, do you have this information for > your platform? In the Renesas platform, I only had to add one clock [1] and one power-domain [2] to get the GPU to come up. In Renesas' downstream driver, they only use one clock, but Geert, the Renesas tree maintainer, sent me the three clocks to assign to the 6xt graphics if it's determined that 3 clocks are required. In terms of the power domain, there appear to be 2, but one is dependent on another, so turning on the 'B' power domain turns on the 'A' power domain automatically. I should note that I can't get the graphics to function, since the 6xt isn't supported yet, so there could be some elements missing that I am unaware of. adam [1] - https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/c= ommit/drivers/clk/renesas?h=3Dnext-20240613&id=3Df7b0dfffd3e0897ca73916a0c3= d3fb61c61df51e [2] - https://patchwork.kernel.org/project/linux-renesas-soc/patch/20240227= 034539.193573-3-aford173@gmail.com/ > > Thanks > ChenYu > > > > > Thanks > > ChenYu > > > > > Thanks > > > Frank > > > > > > [1] https://lists.freedesktop.org/archives/dri-devel/2024-February/44= 3548.html > > > [2] https://lists.freedesktop.org/archives/dri-devel/2024-May/455833.= html > > > > > > > > > > > reg: > > > > maxItems: 1 > > > > @@ -56,6 +63,15 @@ allOf: > > > > properties: > > > > clocks: > > > > maxItems: 1 > > > > + - if: > > > > + properties: > > > > + compatible: > > > > + contains: > > > > + const: img,powervr-6xt > > > > + then: > > > > + properties: > > > > + clocks: > > > > + minItems: 3 > > > > > > > > examples: > > > > - |