From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8FE669D1E for ; Tue, 30 Jan 2024 19:55:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706644502; cv=none; b=SQmqUz9ZBBg8WGeiJroh6lIMvrsZoC91EjwbhsyWhPKosGTM5zj+Ljf4gKmlrEaI3sIPKSZtNnkRLThdrgkXH2agNnjBFDgC+JWOvr6LfZybgWql3fDpC33cBQsEoaf4EDf/ak1+9Bvmpe6hYoHn9JYjvWSuNK6CITo1oPiaadY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706644502; c=relaxed/simple; bh=YV58XM8z5DcA8R7rpigVE/zuFs2tguSdvi43bLmSNt8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZoMyH9aPVb7bkxx/G130V2rfbbDOqL89yvlnOWYhZoEaFg48wz1B1y9IPWopKRfpCYJzbBA02n/DQJIHHEn8toUv4AeWCNSuM04T+C4AcBBGenXRmj/m5WWM/vajiTIeTCZTELj17qzZ4D7EY+QPqvU4aCHnEqFo9svoDRWRqAY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ed+UPfyr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ed+UPfyr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBC8AC433C7; Tue, 30 Jan 2024 19:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706644502; bh=YV58XM8z5DcA8R7rpigVE/zuFs2tguSdvi43bLmSNt8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ed+UPfyrWqTCC+Iu92Dw0Tt8bJP3lGjPpH887lcUwEYOTErYMmdRD3NAIhoh4LANU M2cfKqy4U5uto40nmx3EG+sJEJShTFnztA//vSzqte0NDpI5qii2b23z0TGraX7xGH TN9uDcWtnMMvYJuKfB+WdrogbAPN3dXTAX3WZpKACsD0YTH3Yk34sRslKL6foCpD9W kbmc1Z3gvcF2SPsteZFUsJayIrSnlVVfaxoYB8u60wlWv7S8x+n0aAEeiv2xG/dhA/ Rk+AWaqqopxi9MthaMZhHKicJ8NWBQm8WzC2gKlXKQ3ekEqm5Gwvm3I9MCSiUeN6Oe 22nG0+C2kHw9A== Date: Tue, 30 Jan 2024 13:54:59 -0600 From: Rob Herring To: Boris Brezillon Cc: dri-devel@lists.freedesktop.org, Daniel Vetter , "Marty E . Plummer" , =?iso-8859-1?Q?Cl=E9ment_P=E9ron?= , Nicolas Boichat , Neil Armstrong , Faith Ekstrand , Daniel Stone , Liviu Dudau , Steven Price , Robin Murphy , kernel@collabora.com, Heiko Stuebner , Tatsuyuki Ishi , Chris Diamand , Ketil Johnsen , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Subject: Re: [PATCH v4 13/14] dt-bindings: gpu: mali-valhall-csf: Add support for Arm Mali CSF GPUs Message-ID: <20240130195459.GA2187809-robh@kernel.org> References: <20240122163047.1954733-1-boris.brezillon@collabora.com> <20240122163047.1954733-14-boris.brezillon@collabora.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240122163047.1954733-14-boris.brezillon@collabora.com> On Mon, Jan 22, 2024 at 05:30:44PM +0100, Boris Brezillon wrote: > From: Liviu Dudau > > Arm has introduced a new v10 GPU architecture that replaces the Job Manager > interface with a new Command Stream Frontend. It adds firmware driven > command stream queues that can be used by kernel and user space to submit > jobs to the GPU. > > Add the initial schema for the device tree that is based on support for > RK3588 SoC. The minimum number of clocks is one for the IP, but on Rockchip > platforms they will tend to expose the semi-independent clocks for better > power management. > > v4: > - Fix formatting issue > > v3: > - Cleanup commit message to remove redundant text > - Added opp-table property and re-ordered entries > - Clarified power-domains and power-domain-names requirements for RK3588. > - Cleaned up example > > Note: power-domains and power-domain-names requirements for other platforms > are still work in progress, hence the bindings are left incomplete here. > > v2: > - New commit > > Signed-off-by: Liviu Dudau > Cc: Krzysztof Kozlowski > Cc: Rob Herring > Cc: Conor Dooley > Cc: devicetree@vger.kernel.org > Signed-off-by: Boris Brezillon > --- > .../bindings/gpu/arm,mali-valhall-csf.yaml | 147 ++++++++++++++++++ > 1 file changed, 147 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml > new file mode 100644 > index 000000000000..be1f6bacc3f3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml > @@ -0,0 +1,147 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpu/arm,mali-valhall-csf.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ARM Mali Valhall GPU > + > +maintainers: > + - Liviu Dudau > + - Boris Brezillon > + > +properties: > + $nodename: > + pattern: '^gpu@[a-f0-9]+$' > + > + compatible: > + oneOf: > + - items: > + - enum: > + - rockchip,rk3588-mali > + - const: arm,mali-valhall-csf # Mali Valhall GPU model/revision is fully discoverable > + > + reg: > + maxItems: 1 > + > + interrupts: > + items: > + - description: Job interrupt > + - description: MMU interrupt > + - description: GPU interrupt > + > + interrupt-names: > + items: > + - const: job > + - const: mmu > + - const: gpu > + > + clocks: > + minItems: 1 > + maxItems: 3 > + > + clock-names: > + minItems: 1 > + items: > + - const: core > + - const: coregroup > + - const: stacks > + > + mali-supply: true > + > + operating-points-v2: true > + opp-table: > + type: object > + > + power-domains: > + minItems: 1 > + maxItems: 5 > + > + power-domain-names: > + minItems: 1 > + maxItems: 5 > + > + sram-supply: true > + > + "#cooling-cells": > + const: 2 > + > + dynamic-power-coefficient: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + A u32 value that represents the running time dynamic > + power coefficient in units of uW/MHz/V^2. The > + coefficient can either be calculated from power > + measurements or derived by analysis. > + > + The dynamic power consumption of the GPU is > + proportional to the square of the Voltage (V) and > + the clock frequency (f). The coefficient is used to > + calculate the dynamic power as below - > + > + Pdyn = dynamic-power-coefficient * V^2 * f > + > + where voltage is in V, frequency is in MHz. > + > + dma-coherent: true > + > +required: > + - compatible > + - reg > + - interrupts > + - interrupt-names > + - clocks > + - mali-supply > + > +additionalProperties: false > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: rockchip,rk3588-mali > + then: > + properties: > + clocks: > + minItems: 3 > + power-domains: > + maxItems: 1 > + power-domain-names: false > + > +examples: > + - | > + #include > + #include > + #include > + #include > + > + gpu: gpu@fb000000 { > + compatible = "rockchip,rk3588-mali", "arm,mali-valhall-csf"; > + reg = <0xfb000000 0x200000>; > + interrupts = , > + , > + ; > + interrupt-names = "job", "mmu", "gpu"; > + clock-names = "core", "coregroup", "stacks"; > + clocks = <&cru CLK_GPU>, <&cru CLK_GPU_COREGROUP>, > + <&cru CLK_GPU_STACKS>; > + power-domains = <&power RK3588_PD_GPU>; > + operating-points-v2 = <&gpu_opp_table>; > + mali-supply = <&vdd_gpu_s0>; > + sram-supply = <&vdd_gpu_mem_s0>; > + }; > + > + gpu_opp_table: opp-table { Move this into the gpu node. With that, Reviewed-by: Rob Herring > + compatible = "operating-points-v2"; > + opp-300000000 { > + opp-hz = /bits/ 64 <300000000>; > + opp-microvolt = <675000 675000 850000>; > + }; > + opp-400000000 { > + opp-hz = /bits/ 64 <400000000>; > + opp-microvolt = <675000 675000 850000>; > + }; > + }; > + > +... > -- > 2.43.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 030BDC46CD2 for ; Tue, 30 Jan 2024 19:55:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6DC361134FF; Tue, 30 Jan 2024 19:55:34 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 98BA91134FF for ; Tue, 30 Jan 2024 19:55:33 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A5D0B61058; Tue, 30 Jan 2024 19:55:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EBC8AC433C7; Tue, 30 Jan 2024 19:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706644502; bh=YV58XM8z5DcA8R7rpigVE/zuFs2tguSdvi43bLmSNt8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ed+UPfyrWqTCC+Iu92Dw0Tt8bJP3lGjPpH887lcUwEYOTErYMmdRD3NAIhoh4LANU M2cfKqy4U5uto40nmx3EG+sJEJShTFnztA//vSzqte0NDpI5qii2b23z0TGraX7xGH TN9uDcWtnMMvYJuKfB+WdrogbAPN3dXTAX3WZpKACsD0YTH3Yk34sRslKL6foCpD9W kbmc1Z3gvcF2SPsteZFUsJayIrSnlVVfaxoYB8u60wlWv7S8x+n0aAEeiv2xG/dhA/ Rk+AWaqqopxi9MthaMZhHKicJ8NWBQm8WzC2gKlXKQ3ekEqm5Gwvm3I9MCSiUeN6Oe 22nG0+C2kHw9A== Date: Tue, 30 Jan 2024 13:54:59 -0600 From: Rob Herring To: Boris Brezillon Subject: Re: [PATCH v4 13/14] dt-bindings: gpu: mali-valhall-csf: Add support for Arm Mali CSF GPUs Message-ID: <20240130195459.GA2187809-robh@kernel.org> References: <20240122163047.1954733-1-boris.brezillon@collabora.com> <20240122163047.1954733-14-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240122163047.1954733-14-boris.brezillon@collabora.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Tatsuyuki Ishi , Nicolas Boichat , kernel@collabora.com, Daniel Stone , Krzysztof Kozlowski , devicetree@vger.kernel.org, Ketil Johnsen , Liviu Dudau , Conor Dooley , dri-devel@lists.freedesktop.org, Steven Price , =?iso-8859-1?Q?Cl=E9ment_P=E9ron?= , Daniel Vetter , Chris Diamand , "Marty E . Plummer" , Robin Murphy , Faith Ekstrand Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, Jan 22, 2024 at 05:30:44PM +0100, Boris Brezillon wrote: > From: Liviu Dudau > > Arm has introduced a new v10 GPU architecture that replaces the Job Manager > interface with a new Command Stream Frontend. It adds firmware driven > command stream queues that can be used by kernel and user space to submit > jobs to the GPU. > > Add the initial schema for the device tree that is based on support for > RK3588 SoC. The minimum number of clocks is one for the IP, but on Rockchip > platforms they will tend to expose the semi-independent clocks for better > power management. > > v4: > - Fix formatting issue > > v3: > - Cleanup commit message to remove redundant text > - Added opp-table property and re-ordered entries > - Clarified power-domains and power-domain-names requirements for RK3588. > - Cleaned up example > > Note: power-domains and power-domain-names requirements for other platforms > are still work in progress, hence the bindings are left incomplete here. > > v2: > - New commit > > Signed-off-by: Liviu Dudau > Cc: Krzysztof Kozlowski > Cc: Rob Herring > Cc: Conor Dooley > Cc: devicetree@vger.kernel.org > Signed-off-by: Boris Brezillon > --- > .../bindings/gpu/arm,mali-valhall-csf.yaml | 147 ++++++++++++++++++ > 1 file changed, 147 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml > new file mode 100644 > index 000000000000..be1f6bacc3f3 > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-valhall-csf.yaml > @@ -0,0 +1,147 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpu/arm,mali-valhall-csf.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: ARM Mali Valhall GPU > + > +maintainers: > + - Liviu Dudau > + - Boris Brezillon > + > +properties: > + $nodename: > + pattern: '^gpu@[a-f0-9]+$' > + > + compatible: > + oneOf: > + - items: > + - enum: > + - rockchip,rk3588-mali > + - const: arm,mali-valhall-csf # Mali Valhall GPU model/revision is fully discoverable > + > + reg: > + maxItems: 1 > + > + interrupts: > + items: > + - description: Job interrupt > + - description: MMU interrupt > + - description: GPU interrupt > + > + interrupt-names: > + items: > + - const: job > + - const: mmu > + - const: gpu > + > + clocks: > + minItems: 1 > + maxItems: 3 > + > + clock-names: > + minItems: 1 > + items: > + - const: core > + - const: coregroup > + - const: stacks > + > + mali-supply: true > + > + operating-points-v2: true > + opp-table: > + type: object > + > + power-domains: > + minItems: 1 > + maxItems: 5 > + > + power-domain-names: > + minItems: 1 > + maxItems: 5 > + > + sram-supply: true > + > + "#cooling-cells": > + const: 2 > + > + dynamic-power-coefficient: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + A u32 value that represents the running time dynamic > + power coefficient in units of uW/MHz/V^2. The > + coefficient can either be calculated from power > + measurements or derived by analysis. > + > + The dynamic power consumption of the GPU is > + proportional to the square of the Voltage (V) and > + the clock frequency (f). The coefficient is used to > + calculate the dynamic power as below - > + > + Pdyn = dynamic-power-coefficient * V^2 * f > + > + where voltage is in V, frequency is in MHz. > + > + dma-coherent: true > + > +required: > + - compatible > + - reg > + - interrupts > + - interrupt-names > + - clocks > + - mali-supply > + > +additionalProperties: false > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: rockchip,rk3588-mali > + then: > + properties: > + clocks: > + minItems: 3 > + power-domains: > + maxItems: 1 > + power-domain-names: false > + > +examples: > + - | > + #include > + #include > + #include > + #include > + > + gpu: gpu@fb000000 { > + compatible = "rockchip,rk3588-mali", "arm,mali-valhall-csf"; > + reg = <0xfb000000 0x200000>; > + interrupts = , > + , > + ; > + interrupt-names = "job", "mmu", "gpu"; > + clock-names = "core", "coregroup", "stacks"; > + clocks = <&cru CLK_GPU>, <&cru CLK_GPU_COREGROUP>, > + <&cru CLK_GPU_STACKS>; > + power-domains = <&power RK3588_PD_GPU>; > + operating-points-v2 = <&gpu_opp_table>; > + mali-supply = <&vdd_gpu_s0>; > + sram-supply = <&vdd_gpu_mem_s0>; > + }; > + > + gpu_opp_table: opp-table { Move this into the gpu node. With that, Reviewed-by: Rob Herring > + compatible = "operating-points-v2"; > + opp-300000000 { > + opp-hz = /bits/ 64 <300000000>; > + opp-microvolt = <675000 675000 850000>; > + }; > + opp-400000000 { > + opp-hz = /bits/ 64 <400000000>; > + opp-microvolt = <675000 675000 850000>; > + }; > + }; > + > +... > -- > 2.43.0 >