From patchwork Tue Feb 28 10:27:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 62405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2934049wrd; Tue, 28 Feb 2023 02:31:32 -0800 (PST) X-Google-Smtp-Source: AK7set8Hmi+HVxrDBxdiD0S4aemeRMEpcCAaHMaJ5j86AEKrzcbruY70ewRd+ZVBvsPijTtHsnnn X-Received: by 2002:a17:906:3a4c:b0:884:3174:119d with SMTP id a12-20020a1709063a4c00b008843174119dmr2164438ejf.14.1677580291870; Tue, 28 Feb 2023 02:31:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677580291; cv=none; d=google.com; s=arc-20160816; b=VPpLZYmQw9ORqP+ETPG0vaW13RVTxFezWCFDg6DIkJxobKVS7UuDKbpW7AEyQsSUI7 YhjgS5+uddRe5X6Pvm0hhQBUpNLp5BhG49dSXZuqi+cEDrAE5/DPTBzwNmDsCOLJ8KbD 2IbEvrQ9nGuY/H3nlppspiXeLHIEimvjx0M9gtIVsQcHKW3Na4vlL9pDToWrBL3bCmUE XvPVRO2XxU0UIbsVtZPHWW022mruZl0uG9T7iBvQGR2mUkCkCa9x6hIOxiox7FfCVnZr lV+vy5v81VGNxyZPDwbExkYc3THXoiKBKEkwWpgRc0jM8g7NU+0Z8miV85f06TSbMjEw e2zw== 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=R+tG6JS0Kz0cbXbeKHjMGU0WeFesVUIEOdqPcndUf68=; b=fCZz+lk5iJUZTf4Bw+tQlBxe67KnHhpBNEZKk6HQQqm12JqVzfaj6oBEJz0L7So68i uAI4qX9R41YQMzcv+iliAdopuYxFWzIlQvJ7sFShr4xYRaSGJCCu31UsnaiTx8X8DQ1T wU0dT1fW70z3etha6ghOErAryjkVScsjMFXLPU2VfSMcfR7fbLCPvx1ZL1m+7VMuxDmA I3gfCNELN4bzcYXG4/rDNt6TvH3t50sOj3I0H1EST0KFxyj8RXA36aWdlAQCpA3v64xV j80YjXvdLcI+tQ+vU+fOaq10hiLq70uptCOPAsqdHN1mjdqJt4WGQ5rtaWQzHUHnfDnG a+2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XBtqrJ66; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v24-20020a1709067d9800b008cf79b051cesi3573338ejo.895.2023.02.28.02.31.09; Tue, 28 Feb 2023 02:31:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XBtqrJ66; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231203AbjB1K2C (ORCPT + 99 others); Tue, 28 Feb 2023 05:28:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231289AbjB1K1g (ORCPT ); Tue, 28 Feb 2023 05:27:36 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F4F02D14A; Tue, 28 Feb 2023 02:27:20 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 03DE66602FDB; Tue, 28 Feb 2023 10:27:18 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580039; bh=1JnVPVujLBT5atPy7IIvdnCv3UEvpv+n+JLXQmdBXc4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XBtqrJ661TF65pMMYdFlcwffGxegFzbooParqFCFZ/PsBfC5GB/3luHURrV0BYvch WCUzqm8UyJbNHi0nzLej2N5SMiMMdBKWs2tkkPZwyZjadsTsXN9minzIpXJhksPZjI +ux46nPhjvajG96R8MeOmWfzjPAetD9idFqfaOV8E+17fgrO0Iy21mkoLIVcw++SDJ yHLrAum9cY2qA4NxshgkViXJOCqrA8UzJQq67gtrYEyqY8Wnl3ZXFHR6XVYVxEl1wf nyMaFifj5PlKcovAGTC7SYhuFyW5h3BBhiT4/GGTJAYscxIAyk9k2OM4qV8VWoHXZc minCGbH9D9V/A== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, 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, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v4 12/12] drm/panfrost: Add support for Mali on the MT8186 SoC Date: Tue, 28 Feb 2023 11:27:04 +0100 Message-Id: <20230228102704.708150-12-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759070432151307762?= X-GMAIL-MSGID: =?utf-8?q?1759070432151307762?= MediaTek MT8186 has a Mali-G52 MC2 2EE (Bifrost): add a new compatible and platform data using the same supplies list as "mt8183_b" (only one regulator), and a new pm_domains list with only two power domains. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Chen-Yu Tsai Tested-by: Chen-Yu Tsai --- drivers/gpu/drm/panfrost/panfrost_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index 14cdeaeeb5c4..e4053bf84c62 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -679,6 +679,14 @@ static const struct panfrost_compatible mediatek_mt8183_b_data = { .pm_domain_names = mediatek_mt8183_pm_domains, }; +static const char * const mediatek_mt8186_pm_domains[] = { "core0", "core1" }; +static const struct panfrost_compatible mediatek_mt8186_data = { + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, + .supply_names = mediatek_mt8183_b_supplies, + .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains), + .pm_domain_names = mediatek_mt8186_pm_domains, +}; + static const char * const mediatek_mt8192_supplies[] = { "mali", NULL }; static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2", "core3", "core4" }; @@ -708,6 +716,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "arm,mali-valhall-jm", .data = &default_data, }, { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data }, { .compatible = "mediatek,mt8183b-mali", .data = &mediatek_mt8183_b_data }, + { .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data }, { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data }, {} };