From patchwork Thu Mar 16 10:20:39 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: 70722 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp402907wrt; Thu, 16 Mar 2023 03:36:29 -0700 (PDT) X-Google-Smtp-Source: AK7set+WUkjaIi6cVk0aln9IlKTemIqNecr9zqr8V/1Ni9lLzcl4gG1DXIe+MyKTY5/eSuNYeD0+ X-Received: by 2002:a05:6a20:4c08:b0:d6:52a4:561a with SMTP id fm8-20020a056a204c0800b000d652a4561amr3083611pzb.52.1678962989239; Thu, 16 Mar 2023 03:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678962989; cv=none; d=google.com; s=arc-20160816; b=f8o9XTGlmm/llDXCs/6PwZ4pm/YSLeUAhDiA27N9BzPgaS+RDH+9/zby5471Jw1IKK 0NZ3ZhlMaIFbjQ9YYFy7T7SmQ1GW89EEEgmH4yFeENz020KY0pzPaf9qJ3IZcRbmhizi +/6qCzB5MiFKJLszPOYFSaGTAGvjnMMlZujrEvF3Frmy+sBKlq0f8caBZY33xkvNx/nz M97YXhqGJu42nQNMSc7nmlDEaH6GUB9xHK8a261Jz1CfT99odQWuJy6HULfyhI4s1QWV DVsIhvluOqk6pdS5BJVOGidLD1rAm+Ra9JcMH113SLCOVG6gWP2hdBOjBgNsUt80bphG LbGQ== 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=RSrQdn/bX63ggDVrCdEzTLh2BCZytP9HBj8phJjyRTs=; b=PN1oEf+DjPp3n/iczkvn9aEMf8a/2H5q/R+b7gNvCOEfJQuxJJzXctIW04PzCL1Pvl N2fDGDYGothf4ib9mD59881VASlrRSs84R8q+UG8lMk6wpVLZ4sViUP9EKLbNc/BIdOX BhXJ1zZDndFFXZUp+6IbjbjF8fYJzYi8JU5c97KnaPckqgptHUZGYSkU8fBjakmZ+D8Q T0He/w5LXo3Jljj0tf4eswjxZDs4csuZaIhdlwV+LSNAiNbkOVHebcNS4fgjhersFtRu m0bEmjrUhdEcDQHFAPSbHpCH0fweEkz9FDpAZkZCqTVJ4ykfgQD4KrCj8782+k55R/Nl UC3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=V+ebgBXr; 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=QUARANTINE sp=QUARANTINE 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 j18-20020a635512000000b004fbd58ce355si7118893pgb.511.2023.03.16.03.36.11; Thu, 16 Mar 2023 03:36:29 -0700 (PDT) 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=V+ebgBXr; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230499AbjCPKVx (ORCPT + 99 others); Thu, 16 Mar 2023 06:21:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbjCPKVM (ORCPT ); Thu, 16 Mar 2023 06:21:12 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF843BD4E1; Thu, 16 Mar 2023 03:20:58 -0700 (PDT) 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 3278466030A5; Thu, 16 Mar 2023 10:20:54 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1678962054; bh=zaVPC8a/zjPKkMkKy2u0SknVPayDnrlxaZ88LGSOuPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V+ebgBXr59zxnfFqZTRha1fbz/sXBfiDuR3wz4sIfqE/TQ4J9AbE3/XQpH2LGrDjk I7OA2HII3H2o9DkwjN98y5HpFsScHJli/w165lcNfVJdfo6E0caSfhbfdSCmCaW7x4 ZsN9by9bR+7sqhKL8hZKStk2J/tnqF0cm9hbBelMEYFTFNzgmfikxiHvhXW3SRx/1H McZoEAyZvv7bwEzcScDFwZHRQsZzz8/t7KbdnhYncpQPPwJfelsXm0zJRfPn4nb4TY zWcejFyTAo0xah/I2OXNetcw+Io8wvB2VWxW+ONsCOKbhOantTDqr5ZidQI5raWz9k fkxEFQntyhYVA== 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 v5 10/12] drm/panfrost: Add mediatek,mt8192-mali compatible Date: Thu, 16 Mar 2023 11:20:39 +0100 Message-Id: <20230316102041.210269-11-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230316102041.210269-1-angelogioacchino.delregno@collabora.com> References: <20230316102041.210269-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?1760520295528538393?= X-GMAIL-MSGID: =?utf-8?q?1760520295528538393?= From: Alyssa Rosenzweig Required for Mali-G57 on the Mediatek MT8192 and MT8195, which uses even more power domains than the MT8183 before it. Signed-off-by: Alyssa Rosenzweig [Angelo: Removed unneeded "sram" supply, added mt8195 to commit description] Co-developed-by: AngeloGioacchino Del Regno 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c index f49096f53141..45c4accb6a1e 100644 --- a/drivers/gpu/drm/panfrost/panfrost_drv.c +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c @@ -656,6 +656,16 @@ static const struct panfrost_compatible mediatek_mt8183_data = { .pm_domain_names = mediatek_mt8183_pm_domains, }; +static const char * const mediatek_mt8192_supplies[] = { "mali", NULL }; +static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2", + "core3", "core4" }; +static const struct panfrost_compatible mediatek_mt8192_data = { + .num_supplies = ARRAY_SIZE(mediatek_mt8192_supplies) - 1, + .supply_names = mediatek_mt8192_supplies, + .num_pm_domains = ARRAY_SIZE(mediatek_mt8192_pm_domains), + .pm_domain_names = mediatek_mt8192_pm_domains, +}; + static const struct of_device_id dt_match[] = { /* Set first to probe before the generic compatibles */ { .compatible = "amlogic,meson-gxm-mali", @@ -674,6 +684,7 @@ static const struct of_device_id dt_match[] = { { .compatible = "arm,mali-bifrost", .data = &default_data, }, { .compatible = "arm,mali-valhall-jm", .data = &default_data, }, { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data }, + { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data }, {} }; MODULE_DEVICE_TABLE(of, dt_match);