From patchwork Wed Feb 9 08:51:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 12739830 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7E8A5C433FE for ; Wed, 9 Feb 2022 08:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=16RpuFKN4MHofe+X6k0K6hTowfdcvA/BewEqGDlE9Pk=; b=lVFJgIBwY7bQvw cayzQn8238VQWK+XqrztlmH0gI2N/Gl7VjiTvuaHCEydlMYXq+Ml9n3jQJwawFPXMnVorqjL5pV0R GmL9LPSc8hhPfEjmGo+75BwUNJEaXxVC0AFL8YNrpSf58iakSrV1/BpasfZq9O/zB9H+9J8nPusu+ VOgHgjOOEdaGPvODZHN6vxc9Rcdkj94R/wclbzmf0BbSQhHKWo3ZxigAzbTpeFjFs6CGxw3ytUm6T eoRAYK05RZSu54t3gnkkLQl/oZ+GeXZsXu/wu0J/MsH9ZINwvlzKEfjqPu7V+obh4pR09yWmCMfda sZN4Bj8D4PTT3spa5KmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHij5-00Gjm7-Rl; Wed, 09 Feb 2022 08:53:23 +0000 Received: from mail-db8eur05on2065.outbound.protection.outlook.com ([40.107.20.65] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHihM-00Gitn-P4; Wed, 09 Feb 2022 08:51:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TpSm0dmEscaZA2JegRIYfIzBaRv17ac5+LYZYzOHrozitPbmrEf8VwRWwZ7QuOP5XWv16BsU7m4a5NaZx3dRGjWSbxAFlbtco4z05ph7vxgWO64cXRN+K7i9QFlaVweYGo2+Ja87bGACa37mLMi296vhTzulOXlaFJhF9tDQrzsGMjvaOqK/ytftm8dkkSrfDk+WkjIEfikf5pRgAVyKAySdD3GHJJe6GlYzWmqyPhoQ9LNYQZLSZK0xnhv94YqAtc5yPnRQ7Z7Lsz2LDO5beizLZhyGuFrCfpd5l05Gn/5l1ppMV586PTE9oyHae5CecEKApP10g30jzqqV/V58oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NoHFNvqb0jv3J8as9pJQb0e8fgE2Vfvfy1zsGXmEqls=; b=OqIvHpj+i8F5zhGqjCSRMi+l+3LyVPPFT7PrDufg+eVMFeUeLnH7/Qy8hXNUomvuybc/9dg4UERI9AEJP5GVuBygjOKLjdEOL84mfQkRgmwKLkWh5xosWTQ8YIkcqqp218w1PY9IsKb3H1yDVFNICK8+a0dfDKryCGLaPpPMB+NDTybOZygSD3WRK2yFlT32jJbnYqVB0GwF8rivgVtWGdekFfvL92O1C7MhZ2jrFwSsHMP/v2PNFHCiHYs6SXm93TTx3BFmkV10+IyprTFbkmgBM2H54wM8uWaEoMNaObH9d/L/hFnxP9nD7HCJJ4t5/XEK73894PccX0hnMLsVYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NoHFNvqb0jv3J8as9pJQb0e8fgE2Vfvfy1zsGXmEqls=; b=MjNLRsPy8JJdNmopEI3xfEFSu8APrC5y4Qra6dfrflQ+jxh5VneKLGAVeOnvlCLw3RjMtsI1bE6FzPwYJli/mLMjFdICoZjMFBIWJuA1+u1Io+dugptcaqm33ej2sEARXOVtREGd+skEsXw+U6vgLRD2wTQRZT6OnNWEX++zDao= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from HE1PR0802MB2426.eurprd08.prod.outlook.com (2603:10a6:3:e1::23) by VI1PR08MB2927.eurprd08.prod.outlook.com (2603:10a6:802:21::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Wed, 9 Feb 2022 08:51:29 +0000 Received: from HE1PR0802MB2426.eurprd08.prod.outlook.com ([fe80::e14f:197:5001:4c56]) by HE1PR0802MB2426.eurprd08.prod.outlook.com ([fe80::e14f:197:5001:4c56%3]) with mapi id 15.20.4951.019; Wed, 9 Feb 2022 08:51:27 +0000 From: Michael Riesch To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Cc: David Airlie , Daniel Vetter , Rob Herring , Heiko Stuebner , Peter Geis , Nicolas Frattaroli , Michael Riesch , Ezequiel Garcia , Alex Bee , Liang Chen , Sascha Hauer , Ezequiel Garcia Subject: [PATCH v5 2/5] arm64: dts: rockchip: add gpu node to rk356x Date: Wed, 9 Feb 2022 09:51:07 +0100 Message-Id: <20220209085110.3588035-3-michael.riesch@wolfvision.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220209085110.3588035-1-michael.riesch@wolfvision.net> References: <20220209085110.3588035-1-michael.riesch@wolfvision.net> X-ClientProxiedBy: ZR0P278CA0072.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:21::23) To HE1PR0802MB2426.eurprd08.prod.outlook.com (2603:10a6:3:e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c048c59b-621d-492a-1e11-08d9eba95b91 X-MS-TrafficTypeDiagnostic: VI1PR08MB2927:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:983; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /lQH+t2Z5XgDI1oUUf41KDIGWU0kW/rOdQvpJ+HxpTrz4hkrMar9kwZGmkyasp8d4eNPFMNhDS03iGEDr8QXeVXmSpkedxqheZS7qt59/cqP/MVggi1SZCvebgVDFkYFIuDXPTHKYoNHVGtgA7NGl8HYTHwqCvbfYL33+5EYgpsyLJ114JFA9dT67eLn9Rg5nye70M2mQR66+9FB8toTCBPEtWbqOtTHfYcD0Qg1jr9ZtHaGD0f3ShvWoXeajHZvsYzipKQldKc4iCjB6jcuDfv7aypslaVNvysud4fPBKZ4i2/EBFpvexzMKQTRHkAOMyOtsBjg5YWgeQgjbcYtQCoB3PuGYb2bBnL42DBe03mNOTSiPq2tSa74Ez6D+TZC4vy8c688TQYvwwUh1lBuUfFEzqX9trnWD5EJtSCN3qYFNPAQ39OSCNFVdnIRj2GR5846iDc4UgUrRx6k0f58RZF6Ve72yAEteYW16PVFW/Fbqxvedi6GDRxmOLqcQEm6bta+3cMNZDswzREmc+fXV1MFIHQU07QNXutTugPjBVysBIPqmD0OQ/hDBX7p7fZA/oY/e52HEaykovQSDlozqfcOJTZkRtXQOoHsjy8YqcF+cshKr8W1yz1rC0LCL4/3qy5QEwCuXb5wSis4G46ONw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR0802MB2426.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(54906003)(66556008)(186003)(4326008)(316002)(66476007)(36756003)(6666004)(44832011)(8676002)(66946007)(7416002)(5660300002)(52116002)(6506007)(86362001)(83380400001)(2616005)(1076003)(8936002)(6486002)(508600001)(38100700002)(2906002)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ERFQt+yMcp5NG7/ZDTnWPT+ZtWQ3bOdGIxi/z05bCWoDNyAskRg2dlkhj4Hn784gN/iOwZgMB2PwgJ6nO9TV9lmmyLV4vtZWB7OzZBuz/9bq3lph0YjLXB9ukm1fisdYK+1kP3CZhaRlsHciXEFHcTjAsJDVRIU748JSp4EhuikEP+8cWs/xKcV1uID+O+VkYRs6qm17e5MTqjle8UTNoWf24BLlTTaqF1kjAxUmFJz62K4Cf73SjXgyTRQJs9+6/sZVPi4YuXXxSv1os2Tr3qqJJAdrfDqdzjJvimG2pWS/Xig6n3PVETweiHq6B56mZUGKGRcLXbHPZE+iav6SxBto4IYWpOgQE+Rz3V5S/gZoAz2SXbfZVJ2Yf4sgmXr91EXjwkPz0jtZxKrdJ+jj1EblNtMNDA4lL47IAuaZciiwsM0KuYLtokGRijzOo2h3clq79SMNKRc41IaVuj9gaQ9HihXMYiZ1bLA4fUyoecF4yW+lXe9mKxPBPM9nTnUoLS5BtQZwlidxsuYiE1Chm/egGfNPgdfqD2lpINT9MqWQismh/XkYyPi+ZzIXrphl8n9BTbw5CS3xLwDHqDqqUFyUacg/HtsX30UvW18hxgDfMXrOxy768N/4Ov2PskdAxJ+rzcU6kxKhKlCSTviSx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URKed36KxVNDz8AOrWRQ= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: c048c59b-621d-492a-1e11-08d9eba95b91 X-MS-Exchange-CrossTenant-AuthSource: HE1PR0802MB2426.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2022 08:51:26.9279 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SViyvLkMS647Pc2sPxz2dmil059dIeQHmKK9NOdCrQfjcVnrZYwgoE4MfEqKpgSemjBi6lD0/iRI96ZqZShLuYhKHk9/8K69uhXjMh2Q7Aw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2927 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220209_005136_895744_2891BFC3 X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Ezequiel Garcia Rockchip SoCs RK3566 and RK3568 have a Mali Gondul core which is based on the Bifrost architecture. It has one shader core and two execution engines. Quoting the datasheet: Mali-G52 1-Core-2EE * Support 1600Mpix/s fill rate when 800MHz clock frequency * Support 38.4GLOPs when 800MHz clock frequency Signed-off-by: Ezequiel Garcia Signed-off-by: Alex Bee Signed-off-by: Michael Riesch --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 49 ++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index ff1689283996..47484305b7a4 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -144,6 +144,40 @@ scmi_clk: protocol@14 { }; }; + gpu_opp_table: opp-table-1 { + compatible = "operating-points-v2"; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <825000>; + }; + + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <825000>; + }; + + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <825000>; + }; + + opp-600000000 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <825000>; + }; + + opp-700000000 { + opp-hz = /bits/ 64 <700000000>; + opp-microvolt = <900000>; + }; + + opp-800000000 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1000000>; + }; + }; + pmu { compatible = "arm,cortex-a55-pmu"; interrupts = , @@ -444,6 +478,21 @@ power-domain@RK3568_PD_RKVENC { }; }; + gpu: gpu@fde60000 { + compatible = "rockchip,rk3568-mali", "arm,mali-bifrost"; + reg = <0x0 0xfde60000 0x0 0x4000>; + interrupts = , + , + ; + interrupt-names = "job", "mmu", "gpu"; + clocks = <&scmi_clk 1>, <&cru CLK_GPU>; + clock-names = "core", "bus"; + #cooling-cells = <2>; + operating-points-v2 = <&gpu_opp_table>; + power-domains = <&power RK3568_PD_GPU>; + status = "disabled"; + }; + sdmmc2: mmc@fe000000 { compatible = "rockchip,rk3568-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0x0 0xfe000000 0x0 0x4000>;