From patchwork Thu Feb 23 13:34:40 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: 60979 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp317591wrd; Thu, 23 Feb 2023 05:42:20 -0800 (PST) X-Google-Smtp-Source: AK7set8X0iA8VNRVnlJW7gZ1E899zb/XmnqMamZtqCODgSdCesAL5en6xqk8dpDJsUK4sl1Kue8g X-Received: by 2002:a17:906:150:b0:894:4341:77d6 with SMTP id 16-20020a170906015000b00894434177d6mr18683186ejh.1.1677159740678; Thu, 23 Feb 2023 05:42:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677159740; cv=none; d=google.com; s=arc-20160816; b=YExV+el79RvY4SJuUoFPq2A9fRkT/gD2UkQp2VkVlr2fA1IcBo0v7HEdJjXevCfICw KUFO4QVkPY5kXomraGqFpIrGAWobM8j9+d+T5B4SDjaqVafT1Rb8fuls278hcIEXx18F uQAPzNrkJaC92U2Hc0JfS610edx4Hb0U4WPKqb4wEGmeSR8kGGp+CdJYfmoZdCS/3+IS o0cHty2fn8jvFmqCbXmMMU2lIoPvD8H/6lCqhWb1mMIrqGIBGXgjELV7Tb53BuuIGVS7 uGpQi+Ga8ROVaUDHMw7ZzhLFAYaxVd1fywxX2a/8NFVSODcYTJWUPbSbomimDDZmdFxf +JTA== 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=FMfdiM13fhNnqDKSct6SZ9/VsenkCovJxjsYEtqYwCE=; b=CjQ4dWojEtsBSPYnMBv9LByteQ73lCiQLtoxzI3ZO1ezyA1ndab+TDyEI71wj5kVNP Iaqo6o3PPKseKBL0CMs5eo5Ee2mX1GI1okhX9pJpsKJjsbaDF6ViEMCUQ4aXIRIt+ABK KhSUwt+hr0FMTkySVpIEKEYiYgobNQYlCqXeIwsrTetTvqAU+8o4i2llUEcd0otERwU1 uCGW1Gt2507vSlvQ+26bjTvDjz5nKX7I46SSqYITxDl8T5sYobWMyuSkEV9CAuMX5hOI efw55e973H4BJ+w1MVO60OYTgBN+g2i0TTJHQUOnBkMacBm603bNY2uHE0wwJFP//uKu GgUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=DU3AqJ0z; 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 kb3-20020a170907924300b008b97df5bd54si17304349ejb.961.2023.02.23.05.41.57; Thu, 23 Feb 2023 05:42:20 -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=DU3AqJ0z; 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 S234629AbjBWNfe (ORCPT + 99 others); Thu, 23 Feb 2023 08:35:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234247AbjBWNfG (ORCPT ); Thu, 23 Feb 2023 08:35:06 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67C3430E89; Thu, 23 Feb 2023 05:35:04 -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 8C6CA6602206; Thu, 23 Feb 2023 13:35:02 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677159303; bh=hkk4f6FFc9GkAmhDJ/1AiRSfMxb8riRRgIr9wuciCH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DU3AqJ0zCCiOWwKjRhzNTq4/7HwCBpb9jEPw1PWupbABOHnMVA1gWQgVpgd9kHSqN v54YewBfLsyLZP4fA0GVryUdVTTG3Mytud2s8G7t2Pf9FBJDacdlgUCEcIhN8RvqJo ZvXHitMOwFh28a/EsK1vNvT16Mss035RjZuHjZN+AJv0rd6wYtbwVkU9wfvAeNThVg mRuxTEQJH3sbODV+l2h6xljlgD16lkvD/RjrPXDqQYp0SsyEoJemHQuDJ6DyfcLhXy XyDgx0r2fTFZflf/zIc51MCARWXOJOjbu1toIj3odbWDB95bbnMs18uZJrHmS3qd07 wvWOh2NW9HVZw== 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 v3 11/11] drm/panfrost: Add support for Mali on the MT8186 SoC Date: Thu, 23 Feb 2023 14:34:40 +0100 Message-Id: <20230223133440.80941-12-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> References: <20230223133440.80941-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?1758629452261628682?= X-GMAIL-MSGID: =?utf-8?q?1758629452261628682?= 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 --- 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 }, {} };