Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp14205408pxu; Mon, 4 Jan 2021 16:15:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0Br098TVV5Mut8gCqkiqOjv9LSzZLSa7GWKUrv+MD268dIgQfLh8SaAHghE2WZfDdPhLW X-Received: by 2002:a50:d50a:: with SMTP id u10mr72177524edi.58.1609805752636; Mon, 04 Jan 2021 16:15:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609805752; cv=none; d=google.com; s=arc-20160816; b=LyITxFNGsP5LpRGrf8tuD7swOFHpUZzkK3UEcSIFD0oNeF9qjeiPuNKCPJsvlRQiGh 5PulG0i4mG3qPffWYqhFvuClyWtA/HueOFxekSphHdtDFY7wvRxCb2ULwznHA0VtsuSG bl8DD40jmjyFP9A9jsHzrfcyQQJxQ0qWsh07PPLrcv5gaBtwlGCI0ZnEkfDYQmaiegV+ cqyJNP7T3q6RYL96WjH2uwgbvWnIi2HgV7dhcY+n8CCNK0yflYosDoml45cxKmbM4JHm eGsfstkwDgr45pLMbvCO8lsUtLMX1aHGF0TzhU3kxLTxVjIcqhd6Td7hWzxLvx5zwFSW dqvw== 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=CvqJReQ8p0Q2wrcytP2TtmywERHqcvpbJnQQt8vIrRI=; b=N77kGPwLdmuRL8SlBPpyJJucn90pfiJxFdBqqm0rKe/tv/zzOM1WEphf7npKgipO+r ee0dX5V752vGlKohKDotiw7sHaT4ttH7WRIsfISKrPPOQvNRU0NMlyfpd1ipvDldih3r IOSskyDEWMpBd1Dk7bxPDNmIpuUg3b6q4SWJ7/WarKvUQkjrQG4oiOyXlCfMPU/09rby +4ffIYaepW7egBORh/6H6UDBBrjxcLy/6bNzrx55RQwa3wPp6RfGQSUTD1gp8LbeCa7C duTR1/L6kCTHoMMc3GeKj02yanCrIlOwUDd96PI50QEK2Mi4FLsH/vs0RthX7UGDs5f0 uqkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ScUimOvR; 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 k8si29082120ejg.191.2021.01.04.16.15.29; Mon, 04 Jan 2021 16:15:52 -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=ScUimOvR; 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 S1727936AbhAEAM5 (ORCPT + 99 others); Mon, 4 Jan 2021 19:12:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726864AbhAEAM5 (ORCPT ); Mon, 4 Jan 2021 19:12:57 -0500 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B6EDC0617A2 for ; Mon, 4 Jan 2021 16:11:49 -0800 (PST) Received: by mail-pl1-x636.google.com with SMTP id x18so15423540pln.6 for ; Mon, 04 Jan 2021 16:11:49 -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=CvqJReQ8p0Q2wrcytP2TtmywERHqcvpbJnQQt8vIrRI=; b=ScUimOvRWjQnaVl3XASbOdDlbmovU5P/7tEX4ORdNnIB9j9wH5ytoq2cCDVznY8O30 eWgD9UXUHHlO9+50t+PPEVX+4CPMTPPcRsOA9d9fy6QHgz6DC0RWtq4zVhuKED0lX97P m0r1OSN/9xz2wHbXEElVpx3wFAvjk4kL5TQ5E= 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=CvqJReQ8p0Q2wrcytP2TtmywERHqcvpbJnQQt8vIrRI=; b=YecjKCUYR3TBTzqDeoJoVPo1UkFNXuzjnIbEDMxW7i7cKTWpr1xP6/8MW4kX9Uu5Uw JOSGEQ7ALoKCuc+vt7swz5I7g/9bqdzMD8SguKaS2hSDS4BkV71CvHsf9SC0/wVQ0AMe QZWh6LMksGXfULNBqj5Etjm4xrRfuCr1B7YFDEMp75vSdiEVZGbbfl02l2DSQKnMjOVd bgO8RZP0t1jiiU87o37aLSgUe0cRuFqonbwzD9IsXBABVRobrVT9XPTn0js0aMUes4Wj Mff+ye7OyeN+UfiyUgU8vJfFOJ/pNCS4n9Z6nPCgNV/fiCwxOXM5U9IbT9iJYPlSPYIK wWvg== X-Gm-Message-State: AOAM533NF1zh1dFhfltQcIUsNT2r1SUi/8JLMd+HaFDT0+ixlB2mAJFe OYxfBFe+fn08f+U4vSknOv7aGA== X-Received: by 2002:a17:902:8a8d:b029:dc:8ac6:a149 with SMTP id p13-20020a1709028a8db02900dc8ac6a149mr14187800plo.18.1609805508768; Mon, 04 Jan 2021 16:11:48 -0800 (PST) Received: from drinkcat2.tpe.corp.google.com ([2401:fa00:1:b:7220:84ff:fe09:41dc]) by smtp.gmail.com with ESMTPSA id bf3sm465620pjb.45.2021.01.04.16.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jan 2021 16:11:48 -0800 (PST) From: Nicolas Boichat To: Rob Herring , Steven Price , Alyssa Rosenzweig Cc: hsinyi@chromium.org, hoegsberg@chromium.org, fshao@chromium.org, boris.brezillon@collabora.com, Nicolas Boichat , Daniel Vetter , David Airlie , Matthias Brugger , Tomeu Vizoso , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v6 4/4] drm/panfrost: Add mt8183-mali compatible string Date: Tue, 5 Jan 2021 08:11:19 +0800 Message-Id: <20210105081111.v6.4.I5f6b04431828ec9c3e41e65f3337cec6a127480d@changeid> X-Mailer: git-send-email 2.29.2.729.g45daf8777d-goog In-Reply-To: <20210105001119.2129559-1-drinkcat@chromium.org> References: <20210105001119.2129559-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 G-57 Bifrost. Signed-off-by: Nicolas Boichat --- 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