Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp157996pxu; Thu, 7 Jan 2021 01:04:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJydoFNUcGwE0sQ1LO/YcpsHCtLhN0YBTLX0VTwgYJ3LLM+oWm2OTj6hRypWnKlpIF7DBO6h X-Received: by 2002:a17:906:1b46:: with SMTP id p6mr5827211ejg.68.1610010255637; Thu, 07 Jan 2021 01:04:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610010255; cv=none; d=google.com; s=arc-20160816; b=msTyF1TwJiGdDzPo3WERgPOCGL/I8v7T5zoFR+Ast6Fqk6Dfp5fm4hfx2nV+67LkvL Qa66J4NSJ6Ezn2Av/HAivR7wiCLclueJ34m20eFXlh5kqn1tnq4mrq6VF5VqKNv3LpEg iQNeUWXl58kicHUN3hM91s1No0Ln7fBcOqwrSGP1QPtlOKdC4EEkktf108EHu2A6hlv0 d8KzZxwsBZYlv8jW9UCJ90ooc6GCz43TdC7KDHnP6aW0sN+XLe6WAlq5GOIlOTAOO2DW M0WjDvblLTKjt7YLQ65tlByWfPg+Jcxc7HMv9AvSCAPE/e+TkppeZrVDXOlTiRPKXBE3 lkig== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=xxRssKJ9dAC1Cxvvi5KyIPIbeBOqG6VrSD6Gdw3ud3Y=; b=aPEbkKgNYMtOMGOHyObS3PsgXjyJEFGhSaTa8Ssc5Jaoi+DgA5wy5pCjjcDUY5A8Vx fNfXAbocnBNN3tiY68i4Jkf9h2l0UFAqqGbVoH6HDc5x2zc3gfGMUJvjPYzHaW1ctBvj XM6dvB5TM3yXzme1E+ozgEMNDOZMJoSnq6O96DgelET5ikandiO8SpA8qHhFeXxunXIA IQtn3ALAst9aKxjNhdstWJZG0q0SYVtih33+p2hTfSa3o7BwJB5DbKaxRJkkjt6KafwU A/rK/Zl4l/JAqUlnW4V/xE0tVKx4oDX5HZF3fGZO/m+9WZIGcBOfL+nnlRRdMOoUCT/c K4OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KBjUR7cK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h4si1870468eje.526.2021.01.07.01.03.52; Thu, 07 Jan 2021 01:04:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KBjUR7cK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727126AbhAGJBu (ORCPT + 99 others); Thu, 7 Jan 2021 04:01:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726110AbhAGJBu (ORCPT ); Thu, 7 Jan 2021 04:01:50 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BFC4C0612FD for ; Thu, 7 Jan 2021 01:00:42 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id i7so4400786pgc.8 for ; Thu, 07 Jan 2021 01:00:42 -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=xxRssKJ9dAC1Cxvvi5KyIPIbeBOqG6VrSD6Gdw3ud3Y=; b=KBjUR7cKDtbkIB9nXZkdYy6KZLbDztMb7bpPE5DYa/Uhzlb+aomoIpSUm2Nf3IsA7Z HF8iljHC3ztecNW2kB3MKMuf5MVwqpxRcWRGYYcEcCTscSj8BL9f6NppcQGWRD4tLxAf w96Ucac4FF0t2j8TbDh3mXTWduA2XhtlSlMmg= 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=xxRssKJ9dAC1Cxvvi5KyIPIbeBOqG6VrSD6Gdw3ud3Y=; b=L3vxZCxHKJpLx06qOsH/h2PNF2ky37VAr3SE5Pvo8SiKq/9dPNTd+DCv9bxnKUIWOg c8jIV4hkTLi65+T/FwkbgcLbMiCjF6KAiL60NhjZRxQPH08GPL/aJmRmEVmYaHxk9gSG adcHxfmsEBcwKbc5E5Qj4DW+b39s+qo1aDESDjsxZpu/KV95L2gmn3+ntZstFiOAsjZC qwxXVl6SRcZHq2zD2ZLrl1p55sVceO6hZQJtYCCbiiE7tlkkEzEqRRV/khoGuEEoRFYY dG6fyBRRR9wy+y8i1BcjWhdQFuIKnwqe1AnyUUs5nlvsL2TlCkJqjBwCfx7dEOSxow36 SV9w== X-Gm-Message-State: AOAM531v4ucSEsBNgdLRj31Zw1d6JdaWzWNtsNYppd6trlVHlRB/rOie 9+1JrxIBYyx3aiycr9+qjlTB4Q== X-Received: by 2002:aa7:93c3:0:b029:19d:e081:9751 with SMTP id y3-20020aa793c30000b029019de0819751mr8088831pff.73.1610010041700; Thu, 07 Jan 2021 01:00:41 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:7220:84ff:fe09:41dc]) by smtp.gmail.com with ESMTPSA id a29sm5022421pfr.73.2021.01.07.01.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 01:00:41 -0800 (PST) From: Nicolas Boichat To: Rob Herring , Steven Price , Alyssa Rosenzweig Cc: hsinyi@chromium.org, hoegsberg@chromium.org, Tomeu Vizoso , boris.brezillon@collabora.com, fshao@chromium.org, Nicolas Boichat , Daniel Vetter , David Airlie , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v8 4/4] drm/panfrost: Add mt8183-mali compatible string Date: Thu, 7 Jan 2021 17:00:22 +0800 Message-Id: <20210107170017.v8.4.I5f6b04431828ec9c3e41e65f3337cec6a127480d@changeid> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog In-Reply-To: <20210107090022.3536550-1-drinkcat@chromium.org> References: <20210107090022.3536550-1-drinkcat@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for MT8183's G72 Bifrost. Signed-off-by: Nicolas Boichat Reviewed-by: Tomeu Vizoso --- (no changes since v7) Changes in v7: - Fix GPU ID in commit message Changes in v6: - Context conflicts, reflow the code. - Use ARRAY_SIZE for power domains too. Changes in v5: - Change power domain name from 2d to core2. Changes in v4: - Add power domain names. Changes in v3: - Match mt8183-mali instead of bifrost, as we require special handling for the 2 regulators and 3 power domains. drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 83a461bdeea8..ca07098a6141 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -665,6 +665,15 @@ static const struct panfrost_compatible amlogic_data = { .vendor_quirk = panfrost_gpu_amlogic_quirk, }; +const char * const mediatek_mt8183_supplies[] = { "mali", "sram" }; +const char * const mediatek_mt8183_pm_domains[] = { "core0", "core1", "core2" }; +static const struct panfrost_compatible mediatek_mt8183_data = { + .num_supplies = ARRAY_SIZE(mediatek_mt8183_supplies), + .supply_names = mediatek_mt8183_supplies, + .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), + .pm_domain_names = mediatek_mt8183_pm_domains, +}; + static const struct of_device_id dt_match[] = { /* Set first to probe before the generic compatibles */ { .compatible = "amlogic,meson-gxm-mali", @@ -681,6 +690,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "arm,mali-t860", .data = &default_data, }, { .compatible = "arm,mali-t880", .data = &default_data, }, { .compatible = "arm,mali-bifrost", .data = &default_data, }, + { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data }, {} }; MODULE_DEVICE_TABLE(of, dt_match); -- 2.29.2.729.g45daf8777d-goog