From patchwork Tue Nov 14 00:45:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inochi Amaoto X-Patchwork-Id: 744207 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F041BA56 for ; Tue, 14 Nov 2023 00:44:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="l5RkHVAO" Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10olkn2085.outbound.protection.outlook.com [40.92.41.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E444FD57; Mon, 13 Nov 2023 16:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HEuGDaUM4PDxJd1VNdJ3lULZYZdbgspu95Sat3cfjlPspN8CG1udP2v45qOh8pXbjxL9GHxeQA7yc2jr+pIJphD/yXmA6xAYgjNQ8gHV5Q+YbQcUSmf5hwb5wZiQ+60aEjdEFr2djJtni3aAMvV4/4aat7/L8hFjcZGqBYIf/tqKvOJWTZNepzYMQyYCzjaMcJVTi8j6yE3jG5dDr5HEMR0WNxzb2gZgvgBvXW+SDq8FUoZVz1UUFbaZi3ueTX3pIKY4INSU466JiUJ+mYMT6uEUPgGfK/ScuU0akBGUjdJ8Und58vIF6UpAeNn/15HYT1vVmDp+u6i08Az2oyxlHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W3p2gWsaGfy+eN0wYhaYS9pM5sfYQbyopz4lxiaPD+I=; b=Eh69fzCRB8GyNei/JtW2hZSUt9/e1xIygXRXhm44bqUnl1H8eP0Fmzm71lChJ+0KcdJD4BaegOdU9/jSCRvvm3XaARsOV5PV3sfiEddEY++NgOhwE51jalp6Rq/rRv0fjPDMHRV36VyLMNPXdYnOxPMMkyIaXU8p0fVRJxsu7hVYPd9xOQPYuyI6YKIuS+hfHpiqXxrinE2n1W4++/isSN/v9zeSk+H2zDwxfgi0wqIwoEObZSNzMbBhY8JyxBKIFMu/qOGdLKFImSRDEa5c5ZFbya6QadopZHxl5mBDcRdo5Oqk7rdW2waWMUvGUHLlqnNuGphHwz5Wg8gGKP9dNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W3p2gWsaGfy+eN0wYhaYS9pM5sfYQbyopz4lxiaPD+I=; b=l5RkHVAO38g8Lu9M7h/LBsYK5AOFCifBHvUW6oNLvNiUSUSdV4N59LdDiL0QAlFkRRQLxJeRP+SamIR/5M4WVJv+MkiZ1rb7CmKYWrrX0Ks1rSFo7lYkoosUFBOee41ZTOVoR/o+EykdUNC1VPbzILH/C5GmS1swZv9pNO4xM3IdyOTiEgtRQUxVXZqj2hw2UIo1a8zIrhQ6t0ZNQnvotry6BEQKkhs0Pgo7cTkX0kJGsaBKzTloilukT+U56gbDblmgfI6paUlJB90M0jtU8I88yPtGRmKdaV115KAjExACFVcP2zi6pZ2+usg8TV34tH4JldebWiZeCIBK44P08g== Received: from IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) by DM6PR20MB3492.namprd20.prod.outlook.com (2603:10b6:5:2a3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.29; Tue, 14 Nov 2023 00:44:51 +0000 Received: from IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::55b:c350:980:ad8]) by IA1PR20MB4953.namprd20.prod.outlook.com ([fe80::55b:c350:980:ad8%6]) with mapi id 15.20.6977.029; Tue, 14 Nov 2023 00:44:51 +0000 From: Inochi Amaoto To: Chao Wei , Chen Wang , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Inochi Amaoto , Xiaoguang Xing Cc: Guo Ren , Jisheng Zhang , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] riscv: dts: sophgo: separate sg2042 mtime and mtimecmp to fit aclint format Date: Tue, 14 Nov 2023 08:45:32 +0800 Message-ID: X-Mailer: git-send-email 2.42.1 In-Reply-To: References: X-TMN: [s1u8kyEb7LUZGOEBX/k+s+0hJ1OmD+0zX/swTeX/NvY=] X-ClientProxiedBy: TYBP286CA0019.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:ce::31) To IA1PR20MB4953.namprd20.prod.outlook.com (2603:10b6:208:3af::19) X-Microsoft-Original-Message-ID: <20231114004534.43833-2-inochiama@outlook.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR20MB4953:EE_|DM6PR20MB3492:EE_ X-MS-Office365-Filtering-Correlation-Id: 38a5bd1d-79ee-4285-c022-08dbe4aae927 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ibnJdM95xVjXXLUTasErrmQrkX03kne5f95f0j+oRSxa8XPe4KCsxN+/6keJYmhE6LMm7cZx6FHXwBbD19FBJ5KouAQBZC9i+RvyjKp1STypcproyaND1w3PTIsQrtuzzlMPRwXrw7iJQrJLV6mg1viUcSanwDg/2Rq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5ilEYAkchlUAj0nh/5Iy90OfTL8D7JMOtyWeVFjrJj81rxbaSPrYogdpn3UbZGZY+LGq58TLo7USmIuil7rD47G1aWsOQ19/isAnMLPKinFOqTAYhphqNL5A9z9wg/3HFy6Jr+vfrhp8osR6o19rShy6yZ4G/xPhu7FXjtcbXXUtX0qLuYqjho0cuSV3pCs1hewfiv/aBiQbigwi+x5G8LT17kXH2LvWYGhN0c5FZpKaD3cHa4EWaiO/GRbEpwAJiPUcpQey2UCiYmHy9mri+C+k5rXLMDbyMp6yxkr9XX7AkvDJltCLGR2rt5uiY3BGrkCY5bHw52RRBfXrQrEG+p9NJdu2OX0P9XmZ5KWpueS9NY2tCsk42C3akPCrjYeaufCP8OLLf8xloNgTtNImTegKHd/yAf7K4v7zM1/4Pq+aiVc3Le/VYaX1dgNecycBXIHDM+XCKmdlWgF6tW6KmvgoUlGILuL+RKRjmidl6NANQFYc4XTnRhLJOiUQjp1qGlBuhJYfPTZ34/rNCuzlMF/3HkX7EB14FQtpGWcyRcauemxrGyKGEyg43vOSMwRavk/vb4x4qKMfodky7PHzAoSS68W1oqfDqoy7jqe1N/JFjxVY286qNlULMmWHZfyk7ACvjmwiN05H+CsmrFVSUcV7AoIK9QM3/gYA2teZEbh03q/vPW6soWJDPcBh8x083cmQaLJ7N1s= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38a5bd1d-79ee-4285-c022-08dbe4aae927 X-MS-Exchange-CrossTenant-AuthSource: IA1PR20MB4953.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2023 00:44:51.3715 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR20MB3492 Change the timer layout in the dtb to fit the format that needed by the SBI. Signed-off-by: Inochi Amaoto Fixes: 967a94a92aaa ("riscv: dts: add initial Sophgo SG2042 SoC device tree") --- arch/riscv/boot/dts/sophgo/sg2042.dtsi | 80 +++++++++++++++----------- 1 file changed, 48 insertions(+), 32 deletions(-) -- 2.42.1 diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi index 93256540d078..0b5d93b5c783 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi +++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi @@ -93,144 +93,160 @@ clint_mswi: interrupt-controller@7094000000 { <&cpu63_intc 3>; }; - clint_mtimer0: timer@70ac000000 { + clint_mtimer0: timer@70ac004000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac000000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac004000 0x00000000 0x00000000>, + <0x00000070 0xac004000 0x00000000 0x0000c000>; interrupts-extended = <&cpu0_intc 7>, <&cpu1_intc 7>, <&cpu2_intc 7>, <&cpu3_intc 7>; }; - clint_mtimer1: timer@70ac010000 { + clint_mtimer1: timer@70ac014000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac010000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac014000 0x00000000 0x00000000>, + <0x00000070 0xac014000 0x00000000 0x0000c000>; interrupts-extended = <&cpu4_intc 7>, <&cpu5_intc 7>, <&cpu6_intc 7>, <&cpu7_intc 7>; }; - clint_mtimer2: timer@70ac020000 { + clint_mtimer2: timer@70ac024000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac020000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac024000 0x00000000 0x00000000>, + <0x00000070 0xac024000 0x00000000 0x0000c000>; interrupts-extended = <&cpu8_intc 7>, <&cpu9_intc 7>, <&cpu10_intc 7>, <&cpu11_intc 7>; }; - clint_mtimer3: timer@70ac030000 { + clint_mtimer3: timer@70ac034000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac030000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac034000 0x00000000 0x00000000>, + <0x00000070 0xac034000 0x00000000 0x0000c000>; interrupts-extended = <&cpu12_intc 7>, <&cpu13_intc 7>, <&cpu14_intc 7>, <&cpu15_intc 7>; }; - clint_mtimer4: timer@70ac040000 { + clint_mtimer4: timer@70ac044000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac040000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac044000 0x00000000 0x00000000>, + <0x00000070 0xac044000 0x00000000 0x0000c000>; interrupts-extended = <&cpu16_intc 7>, <&cpu17_intc 7>, <&cpu18_intc 7>, <&cpu19_intc 7>; }; - clint_mtimer5: timer@70ac050000 { + clint_mtimer5: timer@70ac054000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac050000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac054000 0x00000000 0x00000000>, + <0x00000070 0xac054000 0x00000000 0x0000c000>; interrupts-extended = <&cpu20_intc 7>, <&cpu21_intc 7>, <&cpu22_intc 7>, <&cpu23_intc 7>; }; - clint_mtimer6: timer@70ac060000 { + clint_mtimer6: timer@70ac064000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac060000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac064000 0x00000000 0x00000000>, + <0x00000070 0xac064000 0x00000000 0x0000c000>; interrupts-extended = <&cpu24_intc 7>, <&cpu25_intc 7>, <&cpu26_intc 7>, <&cpu27_intc 7>; }; - clint_mtimer7: timer@70ac070000 { + clint_mtimer7: timer@70ac074000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac070000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac074000 0x00000000 0x00000000>, + <0x00000070 0xac074000 0x00000000 0x0000c000>; interrupts-extended = <&cpu28_intc 7>, <&cpu29_intc 7>, <&cpu30_intc 7>, <&cpu31_intc 7>; }; - clint_mtimer8: timer@70ac080000 { + clint_mtimer8: timer@70ac084000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac080000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac084000 0x00000000 0x00000000>, + <0x00000070 0xac084000 0x00000000 0x0000c000>; interrupts-extended = <&cpu32_intc 7>, <&cpu33_intc 7>, <&cpu34_intc 7>, <&cpu35_intc 7>; }; - clint_mtimer9: timer@70ac090000 { + clint_mtimer9: timer@70ac094000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac090000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac094000 0x00000000 0x00000000>, + <0x00000070 0xac094000 0x00000000 0x0000c000>; interrupts-extended = <&cpu36_intc 7>, <&cpu37_intc 7>, <&cpu38_intc 7>, <&cpu39_intc 7>; }; - clint_mtimer10: timer@70ac0a0000 { + clint_mtimer10: timer@70ac0a4000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac0a0000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac0a4000 0x00000000 0x00000000>, + <0x00000070 0xac0a4000 0x00000000 0x0000c000>; interrupts-extended = <&cpu40_intc 7>, <&cpu41_intc 7>, <&cpu42_intc 7>, <&cpu43_intc 7>; }; - clint_mtimer11: timer@70ac0b0000 { + clint_mtimer11: timer@70ac0b4000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac0b0000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac0b4000 0x00000000 0x00000000>, + <0x00000070 0xac0b4000 0x00000000 0x0000c000>; interrupts-extended = <&cpu44_intc 7>, <&cpu45_intc 7>, <&cpu46_intc 7>, <&cpu47_intc 7>; }; - clint_mtimer12: timer@70ac0c0000 { + clint_mtimer12: timer@70ac0c4000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac0c0000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac0c4000 0x00000000 0x00000000>, + <0x00000070 0xac0c4000 0x00000000 0x0000c000>; interrupts-extended = <&cpu48_intc 7>, <&cpu49_intc 7>, <&cpu50_intc 7>, <&cpu51_intc 7>; }; - clint_mtimer13: timer@70ac0d0000 { + clint_mtimer13: timer@70ac0d4000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac0d0000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac0d4000 0x00000000 0x00000000>, + <0x00000070 0xac0d4000 0x00000000 0x0000c000>; interrupts-extended = <&cpu52_intc 7>, <&cpu53_intc 7>, <&cpu54_intc 7>, <&cpu55_intc 7>; }; - clint_mtimer14: timer@70ac0e0000 { + clint_mtimer14: timer@70ac0e4000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac0e0000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac0e4000 0x00000000 0x00000000>, + <0x00000070 0xac0e4000 0x00000000 0x0000c000>; interrupts-extended = <&cpu56_intc 7>, <&cpu57_intc 7>, <&cpu58_intc 7>, <&cpu59_intc 7>; }; - clint_mtimer15: timer@70ac0f0000 { + clint_mtimer15: timer@70ac0f4000 { compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer"; - reg = <0x00000070 0xac0f0000 0x00000000 0x00007ff8>; + reg = <0x00000070 0xac0f4000 0x00000000 0x00000000>, + <0x00000070 0xac0f4000 0x00000000 0x0000c000>; interrupts-extended = <&cpu60_intc 7>, <&cpu61_intc 7>, <&cpu62_intc 7>,