From patchwork Thu Feb 9 07:40:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tinghan Shen X-Patchwork-Id: 54790 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp193216wrn; Wed, 8 Feb 2023 23:44:29 -0800 (PST) X-Google-Smtp-Source: AK7set/c9n1jmMudNf87Pmse5E+rAL8MQ5VAYFuCQRPjWkowQRQHkzj4IyV9kNZLQUoQEYUQIvUM X-Received: by 2002:a17:906:5952:b0:885:dd71:89b5 with SMTP id g18-20020a170906595200b00885dd7189b5mr10818061ejr.41.1675928669804; Wed, 08 Feb 2023 23:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675928669; cv=none; d=google.com; s=arc-20160816; b=SaO9wRnt29+ZddaHZSJG24KPpjDE3F0D1yVBlbncbpaCgt6fVDZDTr74mq+lHnxqbr 89zVKSqG+wc+a7/aOzFhrpNzxKVkSTWDu8TQ1hE/uYdap/qKRiql8kztKKWthVgPutF3 7wkVe3tEXFY/gT+6wBztMNV9DCtdqw8CzgYdZwoExPa6S+//H8LW80wQZsPYJmjMdW6c 6iYWZX8sg8tJD1rLOhnnOs7DdeQHEq9lqEG1evs99l1JMVUlNf4BoDOb7CQuLmOwwBbr nlSSKIhM1fdadOPy/UFao+HRi0BIF75pzmPlD9RQFL+tk195ic3+qbf/Sc2LJBJbRGEd PrwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=SOGG31q+O+/Pz6GrWiIsoHSd9f46vLgfVPDNWGwhamI=; b=dYPWiDH4R92aN0AYpmQ/PyKucrq9WvbZ+OXPJvTjISKsbCirKj6qkNXdMgyctmEPj0 yea5MX25waL2IqM2V+VRDhzWZRY2m2MhEyO5/eq17Q5oAFRHWv88qNJM4teH2LWx8jIF tVbwnFA4Qg7REK8L7m3phnWSEAX1LPpuFA6D78ZqvUr44WckmH7dOr0mFVlpr47Nf7Xl m/9tzcBNSNL3//AncaYl9WYZ7PXBtU4oynxilv1vvpvgznqWi5AK8RD6bxxML66eW82K zlx86aShNLgtmsq6b4EPklXmTZds9eASDtslsJt+Z0+LY9t/FGFTWhVfvIe+c6SG8jCs iwbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=pudEEpO5; 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=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d14-20020a05640208ce00b004ab066f6dfesi1431861edz.374.2023.02.08.23.44.06; Wed, 08 Feb 2023 23:44:29 -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=@mediatek.com header.s=dk header.b=pudEEpO5; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230006AbjBIHlo (ORCPT + 99 others); Thu, 9 Feb 2023 02:41:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229990AbjBIHlW (ORCPT ); Thu, 9 Feb 2023 02:41:22 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 926EF2384B; Wed, 8 Feb 2023 23:40:59 -0800 (PST) X-UUID: 13bc13eca84d11ed945fc101203acc17-20230209 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=SOGG31q+O+/Pz6GrWiIsoHSd9f46vLgfVPDNWGwhamI=; b=pudEEpO5cMjttMyipwJAWCSPj29GnQXjosMBNxvY1aujw5MAaipRvHuqmDiG07CRgzhSKclPD3jma3UQO8qlmr8B42nj90AEAeHTz2qXNdAJSs5sV+/OZRlTj1vfIjOF1qVpX3S4ZkJpaLWR34blh9So9uMpN0WnFED/tLbbNW0=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.19,REQID:00705716-0ee7-46b5-95e5-0420e5b78545,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:885ddb2,CLOUDID:b519eff7-ff42-4fb0-b929-626456a83c14,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-UUID: 13bc13eca84d11ed945fc101203acc17-20230209 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 257639458; Thu, 09 Feb 2023 15:40:51 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.3; Thu, 9 Feb 2023 15:40:50 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 9 Feb 2023 15:40:50 +0800 From: Tinghan Shen To: Bjorn Andersson , Mathieu Poirier , Rob Herring , "Krzysztof Kozlowski" , Matthias Brugger , AngeloGioacchino Del Regno , Tinghan Shen CC: , , , , , Subject: [PATCH v4 12/12] arm64: dts: mediatek: mt8195: Add SCP 2nd core Date: Thu, 9 Feb 2023 15:40:21 +0800 Message-ID: <20230209074021.13936-13-tinghan.shen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230209074021.13936-1-tinghan.shen@mediatek.com> References: <20230209074021.13936-1-tinghan.shen@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY 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?1757338581203167091?= X-GMAIL-MSGID: =?utf-8?q?1757338581203167091?= Rewrite the MT8195 SCP device node as a cluster and add the SCP 2nd core in it. Since the SCP device node is changed to multi-core structure, enable SCP cluster to enable probing SCP core 0. Signed-off-by: Tinghan Shen --- .../boot/dts/mediatek/mt8195-cherry.dtsi | 4 +++ arch/arm64/boot/dts/mediatek/mt8195.dtsi | 30 ++++++++++++++----- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi index 56749cfe7c33..4f9bc7581adb 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi @@ -933,6 +933,10 @@ interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; }; +&scp_cluster { + status = "okay"; +}; + &scp { status = "okay"; diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index 8f1264d5290b..87e49f5fb7b3 100644 --- a/arch/arm64/boot/dts/mediatek/mt8195.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8195.dtsi @@ -826,14 +826,30 @@ clocks = <&infracfg_ao CLK_INFRA_AO_GCE2>; }; - scp: scp@10500000 { - compatible = "mediatek,mt8195-scp"; - reg = <0 0x10500000 0 0x100000>, - <0 0x10720000 0 0xe0000>, - <0 0x10700000 0 0x8000>; - reg-names = "sram", "cfg", "l1tcm"; - interrupts = ; + scp_cluster: scp@10500000 { + compatible = "mediatek,mt8195-scp-dual"; + reg = <0 0x10720000 0 0xe0000>, <0 0x10700000 0 0x8000>; + reg-names = "cfg", "l1tcm"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0x10500000 0x100000>; status = "disabled"; + + scp: scp@0 { + compatible = "mediatek,scp-core"; + reg = <0x0 0xa0000>; + reg-names = "sram"; + interrupts = ; + status = "disabled"; + }; + + scp_c1: scp@a0000 { + compatible = "mediatek,scp-core"; + reg = <0xa0000 0x20000>; + reg-names = "sram"; + interrupts = ; + status = "disabled"; + }; }; scp_adsp: clock-controller@10720000 {