Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1222493rda; Mon, 23 Oct 2023 06:26:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVGtToODvVGYdm09hLZFVfR6jVOqy2jx+GLPRef6STpIHlLK3gwIUWD9MV+OT3wuqNireI X-Received: by 2002:a17:902:fb07:b0:1c9:d6f8:1908 with SMTP id le7-20020a170902fb0700b001c9d6f81908mr6374112plb.9.1698067572029; Mon, 23 Oct 2023 06:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698067572; cv=none; d=google.com; s=arc-20160816; b=LYWasCQGTyTTEK8JXbySFTaFRMJCqC5EjKSp1A7t57ExJ5n73YoEhEdPD5U5RA5Pd+ cvCE2zj10IwH2iiByGd9gfyPacQxFC0zjO9tUF26F4xYSyFGHmnDPVDO2aaoTKWkV8Ev XyppMHRU3vukOja2SPja5dTaalXlgm9+lq0ouxnLzppoFMz35ajjvIJuaZ72R0o3Iqcr ji860E2fZDS4UBCHdpA6H+Jv0eL5Nx8qpNcr5/EOI/Q9J5choR7r0dkxEOdcnqtLlO/d YyrRO0STEhCfu3hpZgLDa7V83FZej2AMT9DhEQh2V0turVSdkeorKVJ+Axp5llxcsy4S PayA== 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:organization:message-id:date:subject:cc:to :from:dkim-signature; bh=KraaAR9AJRx4szBcb69Mh9Dil932gzrCb3ff3bUUqeE=; fh=m7m88qc4Ap04xDRkHN0m8FaSEapiPpjizRz78v2j8L0=; b=O2+3751bmjGZKUIxcp1FtDQc6ev34BOQVzm3jzwLrnyt7oZDmITQIeEyWZF1m6HLz6 d/RqAb6g3oodun4YYc1xDRT6Y2T0OB5caOk+toi2Xa/GtToCaLt9tPT5vCnupuwiepn7 4y0bc9I0vJDnGLOdaQ2BAGLZJVnOFPyslarM8C8N1iTO5WSdTbtHtdtXV5eCKJrAWZgH Z5k2/t8HzDo4/r1tzmhNVBItKxWD8x33CBO5eukWGyKUb06bVbvl3VNvZ/rte0MfEW6c ov2VKDg0bn3PMtB0kI6R7F5EtxFffZrRFrV7mcPgUdZ0xEXPhIBYoNEK9D5nmeJC6IA1 J3Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=T7cEzjpp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id j1-20020a170902690100b001bbd0450af8si6252507plk.187.2023.10.23.06.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 06:26:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@tq-group.com header.s=key1 header.b=T7cEzjpp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tq-group.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 40E3A80AC597; Mon, 23 Oct 2023 06:26:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233605AbjJWNZg (ORCPT + 99 others); Mon, 23 Oct 2023 09:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233064AbjJWNZK (ORCPT ); Mon, 23 Oct 2023 09:25:10 -0400 Received: from mx1.tq-group.com (mx1.tq-group.com [93.104.207.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8245926B7; Mon, 23 Oct 2023 06:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1698067401; x=1729603401; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KraaAR9AJRx4szBcb69Mh9Dil932gzrCb3ff3bUUqeE=; b=T7cEzjpp2WWwpDgofDuSkW+PokhhIu1cwmSfiZsddeJpOR6AHQIw4joj mZ5CcrkvMSeuoRIxGaiT06Okkk5cssJym5x8TxjJZ7Ty6VpgBAmRMw0Lf +KdxgizhV4m9zr3dxqeJazlgrENYgXSxW+kZgSqRTX5sTcTKR+EqE65r2 +MC+1wMyMztBI5ukvXE0RHwhnXeJtwZjye0hTHbV+7dAxSpWZTpJbGimV g2sYLAPvi8YfVsUdzvvh49onK3vAIiPtjg/IqvK61E5zINxlz59TM6mBp kqhrDECjLb+gC/4N7uejDOiv+4+byHFiVbUB9aNgX5GOLD6R1pPHvvR5b g==; X-IronPort-AV: E=Sophos;i="6.03,244,1694728800"; d="scan'208";a="33603121" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 23 Oct 2023 15:23:19 +0200 Received: from steina-w.localnet (steina-w.tq-net.de [10.123.53.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vtuxmail01.tq-net.de (Postfix) with ESMTPSA id C6A0128007F; Mon, 23 Oct 2023 15:23:18 +0200 (CEST) From: Alexander Stein To: linux-arm-kernel@lists.infradead.org, Adam Ford Cc: aford@beaconembedded.com, Adam Ford , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2] arm64: dts: imx8mp: Add NPU Node Date: Mon, 23 Oct 2023 15:23:21 +0200 Message-ID: <9185912.CDJkKcVGEf@steina-w> Organization: TQ-Systems GmbH In-Reply-To: <20231022161911.10792-1-aford173@gmail.com> References: <20231022161911.10792-1-aford173@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 23 Oct 2023 06:26:09 -0700 (PDT) Hi Adam, thanks for the update. Am Sonntag, 22. Oktober 2023, 18:19:10 CEST schrieb Adam Ford: > The NPU is based on the Vivante GC8000 and its power-domain > is controlled my pgc_mlmix. Since the power-domain uses > some of these clocks, setup the clock parent and rates > inside the power-domain, and add the NPU node. >=20 > The data sheet states the CLK_ML_AHB should be 300MHz for > nominal, but 800MHz clock will divide down to 266 instead. > Boards which operate in over-drive mode should update the > clocks on their boards accordingly. When the driver loads, > the NPU numerates as: >=20 > etnaviv-gpu 38500000.npu: model: GC8000, revision: 8002 There seems to be some race condition upon GPU/NPU detection. Sometimes I g= et=20 these messages: [ 1.338100] etnaviv-gpu 38000000.gpu: model: GC7000, revision: 6204 [ 1.344469] etnaviv-gpu 38008000.gpu: model: GC520, revision: 5341 [ 1.350748] etnaviv-gpu 38500000.npu: model: GC0, revision: 0 [ 1.356514] etnaviv-gpu 38500000.npu: Unknown GPU model Sometimes I see GC8000 being detected as you have written. Despite that the= =20 patch itself looks good. Reviewed-by: Alexander Stein >=20 > Signed-off-by: Adam Ford > --- >=20 > V2: Move the clock parent and rate assignments to the ppc_mlmix node > since clock parents should be configured before they are used, > and pgc_mlmix uses them first. > Slow the clock rates down to confirm to nominal mode instead of > overdrive mode. >=20 > diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index > c9a610ba4836..a18b9ba98ea2 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi > @@ -887,6 +887,15 @@ pgc_mlmix: power-domain@24 { > clocks =3D <&clk=20 IMX8MP_CLK_ML_AXI>, > <&clk=20 IMX8MP_CLK_ML_AHB>, > <&clk=20 IMX8MP_CLK_NPU_ROOT>; > + assigned-clocks =3D=20 <&clk IMX8MP_CLK_ML_CORE>, > + =09 <&clk IMX8MP_CLK_ML_AXI>, > + =09 <&clk IMX8MP_CLK_ML_AHB>; > + assigned-clock- parents =3D <&clk IMX8MP_SYS_PLL1_800M>, > + =09 <&clk IMX8MP_SYS_PLL1_800M>, > + =09 <&clk IMX8MP_SYS_PLL1_800M>; > + assigned-clock- rates =3D <800000000>, > + =09 <800000000>, > + =09 <300000000>; > }; > }; > }; > @@ -2012,6 +2021,18 @@ vpumix_blk_ctrl: blk-ctrl@38330000 { > interconnect-names =3D "g1", "g2", "vc8000e"; > }; >=20 > + npu: npu@38500000 { > + compatible =3D "vivante,gc"; > + reg =3D <0x38500000 0x200000>; > + interrupts =3D ; > + clocks =3D <&clk IMX8MP_CLK_NPU_ROOT>, > + <&clk IMX8MP_CLK_NPU_ROOT>, > + <&clk IMX8MP_CLK_ML_AXI>, > + <&clk IMX8MP_CLK_ML_AHB>; > + clock-names =3D "core", "shader", "bus", "reg"; > + power-domains =3D <&pgc_mlmix>; > + }; > + > gic: interrupt-controller@38800000 { > compatible =3D "arm,gic-v3"; > reg =3D <0x38800000 0x10000>, =2D-=20 TQ-Systems GmbH | M=FChlstra=DFe 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht M=FCnchen, HRB 105018 Gesch=E4ftsf=FChrer: Detlef Schneider, R=FCdiger Stahl, Stefan Schneider http://www.tq-group.com/