Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4888784ybl; Mon, 13 Jan 2020 23:17:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxvcHJDg+qccAL906AK86BkGJ2vMcMHAn+Wph5OKV9DF+UVtI8I9T036+ZEubaH7f4XXxIM X-Received: by 2002:aca:cf50:: with SMTP id f77mr16150486oig.60.1578986243905; Mon, 13 Jan 2020 23:17:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578986243; cv=none; d=google.com; s=arc-20160816; b=vOQ6IezvdrLhe+MJhv/nT4ceCM2hY841NGnpyBsAhlmLaXnPbccEX8leXumX8oreZA 6A0sjxN3+32+Pr7lnEN3AnG1P16FG+X31CpT9VsIUBqgBfPUlbpJlVLarAPUchVW9DXf MG8BFonTpNbXtCMJdGone9cvuzIdCvnCWAccWGaIygkOrJxoKpx5DVp6t1IrWAG1C6x8 0A60ecPRkSBQgd2oDy0F4mhziaOeke523IZyXT+hXfEZI56qHWU1AtDMRDRm1bCD4Q01 lnb9+me6xDskzdTx0Z0mTkP1ogwjL7eCO2u0XrsCLZPuZHthk1emgfPMBwId+bqHEl3X UVWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0nAMwABlvSCq85Ew40FaRBYOhPfLosw2bX17FJGZVNI=; b=S3bti8j9soprn25BDMVPWnXGcIn2c7GRbyCTrTTpXP6TN8G3EiBbM4cE5S3s6S5d1g RIcuQyH10RL7C1nw5HGQqpOBLOQeYwmSOfBv/6NHuja3VydAFdT0/7iEgN73uq1A7Lj8 +V7uMNFIRCM7EPtwGRFAqCxPRehsDILElJy2htA0nVWFJ1Z+NpcbACykV13WnGdwTv/v Yi72xKSIVCKZkP9qcXY45++b0lYZlWvA4YUyHf+1KHXWsfGt4IUf+cn3c4L1zEsc12dD fAJ2DIgKpzEwZo4FYkJPU8jj9r7fx0K75pEymtw4hFuNJVdvtWeR39G9AaRSezThccKB z1yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YmLqYjt5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x207si7150868oif.30.2020.01.13.23.17.12; Mon, 13 Jan 2020 23:17:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YmLqYjt5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728978AbgANHQQ (ORCPT + 99 others); Tue, 14 Jan 2020 02:16:16 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:33291 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728950AbgANHQP (ORCPT ); Tue, 14 Jan 2020 02:16:15 -0500 Received: by mail-pf1-f195.google.com with SMTP id z16so6148797pfk.0 for ; Mon, 13 Jan 2020 23:16:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0nAMwABlvSCq85Ew40FaRBYOhPfLosw2bX17FJGZVNI=; b=YmLqYjt53Yi34BbEoChwfZpJQtyTZqV6RjrcBP2Xs9gqKCSYMyysxeCHjZKLlA6zZm 5zy03t9bwv0ssBSdslzzMCrsBrxpaMMFG/iiBlJ2f3MCzurncD8WvkVet9lureeAqtZE sKJQONJX9aYp4Kk8kXBibRNOZrYZFxb+l+zBk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0nAMwABlvSCq85Ew40FaRBYOhPfLosw2bX17FJGZVNI=; b=GOP0dF2JExRINrP8zip5a8SxKh+iNr9jc1cWi5muSvxDiyPruq0tMLn4L0Kp0VNY3r CIqaSLRpI247xYuAujasfhZseKfxjIXO7Pb32Lec+51VOridsQAiO0aoYfxax2uykJm+ U/Z8ENL8ceAyOD1OSSV+ydK9JOX5Zid6mvjMrifN/gVPG9weMh/G3lbpii6WJ4DKylNu FeXhTCI6hEc+uxoVKYjC3wD2HjIH12U+jsH66pqkzspEzRH6N3ZWNed/YYH7IaYKJ2zP E0o1vnpISpz1sM8jRNzoY6YmbBiabD/qxgCGzxTEDE9jsVYo0WvPEuZDyohc+n3NGClj Rmiw== X-Gm-Message-State: APjAAAWLWkZlqbCrqGC9uIW2y46fUlooJBbyOhQ0SGYoE+i6m2TG5eJI Jo+zr3PjxFO0nPjuW1G7SmGIfQ== X-Received: by 2002:a63:2d44:: with SMTP id t65mr26752292pgt.112.1578986174251; Mon, 13 Jan 2020 23:16:14 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:d8b7:33af:adcb:b648]) by smtp.gmail.com with ESMTPSA id b4sm17092976pfd.18.2020.01.13.23.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 23:16:13 -0800 (PST) From: Nicolas Boichat To: Rob Herring Cc: David Airlie , Daniel Vetter , Mark Rutland , Matthias Brugger , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , Liam Girdwood , Mark Brown , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, hsinyi@chromium.org Subject: [PATCH v3 2/7] arm64: dts: mt8183: Add node for the Mali GPU Date: Tue, 14 Jan 2020 15:15:57 +0800 Message-Id: <20200114071602.47627-3-drinkcat@chromium.org> X-Mailer: git-send-email 2.25.0.rc1.283.g88dfdc4193-goog In-Reply-To: <20200114071602.47627-1-drinkcat@chromium.org> References: <20200114071602.47627-1-drinkcat@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a basic GPU node for mt8183. Signed-off-by: Nicolas Boichat Reviewed-by: Alyssa Rosenzweig --- Upstreaming what matches existing bindings from our Chromium OS tree: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.19/arch/arm64/boot/dts/mediatek/mt8183.dtsi#1348 The evb part of this change depends on this patch to add PMIC dtsi: https://patchwork.kernel.org/patch/10928161/ The binding we use with out-of-tree Mali drivers includes more clocks, this is used for devfreq: the out-of-tree driver switches clk_mux to clk_sub_parent (26Mhz), adjusts clk_main_parent, then switches clk_mux back to clk_main_parent: (see https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.19/drivers/gpu/arm/midgard/platform/mediatek/mali_kbase_runtime_pm.c#423) clocks = <&topckgen CLK_TOP_MFGPLL_CK>, <&topckgen CLK_TOP_MUX_MFG>, <&clk26m>, <&mfgcfg CLK_MFG_BG3D>; clock-names = "clk_main_parent", "clk_mux", "clk_sub_parent", "subsys_mfg_cg"; v3: - No changes v2: - Use sram instead of mali_sram as SRAM supply name. - Rename mali@ to gpu@. arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 7 ++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 104 ++++++++++++++++++++ 2 files changed, 111 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts index 1fb195c683c3d01..7d609e0cd9b4975 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts @@ -7,6 +7,7 @@ /dts-v1/; #include "mt8183.dtsi" +#include "mt6358.dtsi" / { model = "MediaTek MT8183 evaluation board"; @@ -30,6 +31,12 @@ &auxadc { status = "okay"; }; +&gpu { + supply-names = "mali", "sram"; + mali-supply = <&mt6358_vgpu_reg>; + sram-supply = <&mt6358_vsram_gpu_reg>; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c_pins_0>; diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 1ade9153e5c265b..4da3f1ed1c15bf3 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -597,6 +597,110 @@ mfgcfg: syscon@13000000 { #clock-cells = <1>; }; + gpu: gpu@13040000 { + compatible = "mediatek,mt8183-mali", "arm,mali-bifrost"; + reg = <0 0x13040000 0 0x4000>; + interrupts = + , + , + ; + interrupt-names = "job", "mmu", "gpu"; + + clocks = <&topckgen CLK_TOP_MFGPLL_CK>; + + power-domains = + <&scpsys MT8183_POWER_DOMAIN_MFG_CORE0>, + <&scpsys MT8183_POWER_DOMAIN_MFG_CORE1>, + <&scpsys MT8183_POWER_DOMAIN_MFG_2D>; + + operating-points-v2 = <&gpu_opp_table>; + }; + + gpu_opp_table: opp_table0 { + compatible = "operating-points-v2"; + opp-shared; + + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + opp-microvolt = <625000>, <850000>; + }; + + opp-320000000 { + opp-hz = /bits/ 64 <320000000>; + opp-microvolt = <631250>, <850000>; + }; + + opp-340000000 { + opp-hz = /bits/ 64 <340000000>; + opp-microvolt = <637500>, <850000>; + }; + + opp-360000000 { + opp-hz = /bits/ 64 <360000000>; + opp-microvolt = <643750>, <850000>; + }; + + opp-380000000 { + opp-hz = /bits/ 64 <380000000>; + opp-microvolt = <650000>, <850000>; + }; + + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <656250>, <850000>; + }; + + opp-420000000 { + opp-hz = /bits/ 64 <420000000>; + opp-microvolt = <662500>, <850000>; + }; + + opp-460000000 { + opp-hz = /bits/ 64 <460000000>; + opp-microvolt = <675000>, <850000>; + }; + + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <687500>, <850000>; + }; + + opp-540000000 { + opp-hz = /bits/ 64 <540000000>; + opp-microvolt = <700000>, <850000>; + }; + + opp-580000000 { + opp-hz = /bits/ 64 <580000000>; + opp-microvolt = <712500>, <850000>; + }; + + opp-620000000 { + opp-hz = /bits/ 64 <620000000>; + opp-microvolt = <725000>, <850000>; + }; + + opp-653000000 { + opp-hz = /bits/ 64 <653000000>; + opp-microvolt = <743750>, <850000>; + }; + + opp-698000000 { + opp-hz = /bits/ 64 <698000000>; + opp-microvolt = <768750>, <868750>; + }; + + opp-743000000 { + opp-hz = /bits/ 64 <743000000>; + opp-microvolt = <793750>, <893750>; + }; + + opp-800000000 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <825000>, <925000>; + }; + }; + mmsys: syscon@14000000 { compatible = "mediatek,mt8183-mmsys", "syscon"; reg = <0 0x14000000 0 0x1000>; -- 2.25.0.rc1.283.g88dfdc4193-goog