Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp988273iob; Fri, 13 May 2022 18:44:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxni6H1UUbLyBSpnWr3ISqqRpSTArB5PMpIY0vOQNGOcetMeTGfvy3LxW76+kjZMrL3n+Tz X-Received: by 2002:a05:6000:1868:b0:20c:95c4:ed9a with SMTP id d8-20020a056000186800b0020c95c4ed9amr5979930wri.243.1652492654652; Fri, 13 May 2022 18:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652492654; cv=none; d=google.com; s=arc-20160816; b=fIqgvrwzIRr5gLZFVot9qDpqokmHK831N6y7PraZ52dBjvXzPYO7CCgm1DdpE+AK7H E3HBHBiBcruE+VpL1IXrDbucADWNKR3ujKGTsy2rF6QQQWSa9VslqsXoVZmKyHGfw+uo KsIsB+CPPfx4R1fJAq8JnNnqeV0uRdxafOm8lrkXp/1MwvE46I05JNn7hCg64TxwpD0W ciMm3LQPzg2VqD5IEIk4q2gLqH0CanWpGFP0EbkzXHIzxuCbTWfI9uI/m7NPG/n7tUnU pr2D2TtzMbX/uxRRSOmcSfms11QLxnWteZpb6Dnd3WiNZ06j/5Tt3/iSWN/VeQlnnRVB QUYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=G3MKrp20J1JwJu+ktM1A9W9hOc2DnWu2Y4hYhV2ql4I=; b=U+jXQzVJV1L6Y/yOjr/oaqeR/5dJo9hm1Ko2Nj7w4xNynypF8wrZYcNcNQ/euFrwPy 4t4tFsLZXVHFcGyhN86DQ9DYDrSJLlz90RUNS98V0lPjhMleHeMenDghS4NdQtvr40hf Gcq+R2XUa/PeDJIEOE5uVQuyiRbqz0Yko8ue4qVlXqPtkYNUPAzeMO+9x54pPao+rxJe g3cESTpOGMciXNZhoYl/J39yCMYontPcogSdJQ8IEhOVDOeAmncJK7hOHlrUOGvouaV4 hu6ZV9fgWU9WcojWEgdG0A/4elTNRS71PiR6Hu83RmaYoMg9nzodytPS95HU0J1JHpTn 9KEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w20-20020a7bc114000000b003944c141060si6404007wmi.25.2022.05.13.18.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:44:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 17EB92F354F; Fri, 13 May 2022 17:09:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377441AbiEMGs6 (ORCPT + 99 others); Fri, 13 May 2022 02:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359479AbiEMGs4 (ORCPT ); Fri, 13 May 2022 02:48:56 -0400 Received: from maillog.nuvoton.com (maillog.nuvoton.com [202.39.227.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0961C18A696; Thu, 12 May 2022 23:48:54 -0700 (PDT) Received: from NTHCCAS04.nuvoton.com (NTHCCAS04.nuvoton.com [10.1.8.29]) by maillog.nuvoton.com (Postfix) with ESMTP id 406721C80DD3; Fri, 13 May 2022 14:48:54 +0800 (CST) Received: from NTHCCAS04.nuvoton.com (10.1.8.29) by NTHCCAS04.nuvoton.com (10.1.8.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 13 May 2022 14:48:53 +0800 Received: from [172.19.1.47] (172.19.1.47) by NTHCCAS04.nuvoton.com (10.1.12.25) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Fri, 13 May 2022 14:48:53 +0800 Message-ID: <46a55b01-ee9f-604f-72c9-916bc2f02a09@nuvoton.com> Date: Fri, 13 May 2022 14:48:54 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH V4 3/5] arm64: dts: nuvoton: Add initial support for MA35D1 Content-Language: en-US To: Krzysztof Kozlowski , , , , , CC: , , , , , , , , References: <20220510032558.10304-1-ychuang3@nuvoton.com> <20220510032558.10304-4-ychuang3@nuvoton.com> <03ac0a67-bd1f-12ca-74f7-8d5b05857ea7@linaro.org> From: Jacky Huang In-Reply-To: <03ac0a67-bd1f-12ca-74f7-8d5b05857ea7@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 2022/5/12 下午 10:10, Krzysztof Kozlowski wrote: > On 10/05/2022 05:25, Jacky Huang wrote: >> Add the initial device tree files for Nuvoton MA35D1 Soc. >> >> Signed-off-by: Jacky Huang >> --- >> arch/arm64/boot/dts/Makefile | 1 + >> arch/arm64/boot/dts/nuvoton/Makefile | 2 + >> arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts | 24 +++++ >> arch/arm64/boot/dts/nuvoton/ma35d1.dtsi | 120 +++++++++++++++++++++ >> 4 files changed, 147 insertions(+) >> create mode 100644 arch/arm64/boot/dts/nuvoton/Makefile >> create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts >> create mode 100644 arch/arm64/boot/dts/nuvoton/ma35d1.dtsi >> >> diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile >> index 1ba04e31a438..7b107fa7414b 100644 >> --- a/arch/arm64/boot/dts/Makefile >> +++ b/arch/arm64/boot/dts/Makefile >> @@ -19,6 +19,7 @@ subdir-y += lg >> subdir-y += marvell >> subdir-y += mediatek >> subdir-y += microchip >> +subdir-y += nuvoton >> subdir-y += nvidia >> subdir-y += qcom >> subdir-y += realtek >> diff --git a/arch/arm64/boot/dts/nuvoton/Makefile b/arch/arm64/boot/dts/nuvoton/Makefile >> new file mode 100644 >> index 000000000000..e1e0c466bf5e >> --- /dev/null >> +++ b/arch/arm64/boot/dts/nuvoton/Makefile >> @@ -0,0 +1,2 @@ >> +# SPDX-License-Identifier: GPL-2.0 >> +dtb-$(CONFIG_ARCH_NUVOTON) += ma35d1-evb.dtb >> diff --git a/arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts b/arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts >> new file mode 100644 >> index 000000000000..95f0facb0476 >> --- /dev/null >> +++ b/arch/arm64/boot/dts/nuvoton/ma35d1-evb.dts >> @@ -0,0 +1,24 @@ >> +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +/* >> + * Device Tree Source for MA35D1 Evaluation Board (EVB) >> + * >> + * Copyright (C) 2022 Nuvoton Technology Corp. >> + */ >> + >> +/dts-v1/; >> +#include "ma35d1.dtsi" >> + >> +/ { >> + model = "Nuvoton MA35D1-EVB"; >> + compatible = "nuvoton,ma35d1-evb", "nuvoton,ma35d1"; >> + >> + chosen { >> + stdout-path = "serial0:115200n8"; >> + }; >> + >> + memory@80000000 { >> + device_type = "memory"; >> + reg = <0x0 0x80000000 0x0 0x10000000>; >> + }; >> +}; >> + > > .git/rebase-apply/patch:60: new blank line at EOF. > > + > > warning: 1 line adds whitespace errors. > I will fix it. > >> diff --git a/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi b/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi >> new file mode 100644 >> index 000000000000..7212f8de6906 >> --- /dev/null >> +++ b/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi >> @@ -0,0 +1,120 @@ >> +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +/* >> + * Copyright (c) 2022 Nuvoton Technology Corp. >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> + >> +/ { >> + compatible = "nuvoton,ma35d1"; >> + interrupt-parent = <&gic>; >> + #address-cells = <2>; >> + #size-cells = <2>; >> + >> + cpus { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + cpu-map { >> + cluster0 { >> + core0 { >> + cpu = <&cpu0>; >> + }; >> + core1 { >> + cpu = <&cpu1>; >> + }; >> + }; >> + }; >> + >> + cpu0: cpu@0 { >> + device_type = "cpu"; >> + compatible = "arm,cortex-a35"; >> + reg = <0x0>; >> + enable-method = "psci"; >> + next-level-cache = <&L2_0>; >> + }; >> + >> + cpu1: cpu@1 { >> + device_type = "cpu"; >> + compatible = "arm,cortex-a35"; >> + reg = <0x1>; >> + enable-method = "psci"; >> + next-level-cache = <&L2_0>; >> + }; >> + >> + L2_0: l2-cache0 { >> + compatible = "cache"; >> + cache-level = <2>; >> + }; >> + }; >> + >> + psci { >> + compatible = "arm,psci-0.2"; >> + method = "smc"; >> + }; >> + >> + hxt_24m: hxt_24mhz { > No underscores in node name. Generic node names, so "clock-X" or > "clock-some-suffix" OK, I will modify it as  hxt-24m: hxt-24mhz >> + compatible = "fixed-clock"; >> + #clock-cells = <0>; >> + clock-frequency = <24000000>; > This does not look like property of SoC. Where is this clock defined? In > the SoC or on the board? It's an external crystal on the board. I add this node, because it's the clock source of clock controller. It always present on all ma35d1 boards.     clk: clock-controller@40460200 {         compatible = "nuvoton,ma35d1-clk";         reg = <0x0 0x40460200 0x0 0x100>;         #clock-cells = <1>;         clocks = <&hxt_24m>;         clock-names = "HXT_24MHz"; ... >> + clock-output-names = "HXT_24MHz"; >> + }; >> + >> + timer { >> + compatible = "arm,armv8-timer"; >> + interrupts = > + IRQ_TYPE_LEVEL_LOW)>, >> + > + IRQ_TYPE_LEVEL_LOW)>, >> + > + IRQ_TYPE_LEVEL_LOW)>, >> + > + IRQ_TYPE_LEVEL_LOW)>; >> + clock-frequency = <12000000>; >> + }; >> + >> + sys: system-controller@40460000 { >> + compatible = "nuvoton,ma35d1-sys", "syscon", "simple-mfd"; > Why is this a simple-mfd if there are no children here? What do you want > to instantiate here? It's not a device, but a set of registers for system level control. I want to provide a register base mapping for other devices to access system control registers. > Where is the nuvoton,ma35d1-sys compatible documented? OK, I will add the compatible document in next version. >> + reg = <0x0 0x40460000 0x0 0x400>; >> + }; >> + >> + reset: reset-controller { >> + compatible = "nuvoton,ma35d1-reset"; > Also not documented. I will also add the document for it. > >> + nuvoton,ma35d1-sys = <&sys>; >> + #reset-cells = <1>; >> + }; >> + >> + clk: clock-controller@40460200 { >> + compatible = "nuvoton,ma35d1-clk"; >> + reg = <0x0 0x40460200 0x0 0x100>; >> + #clock-cells = <1>; >> + clocks = <&hxt_24m>; >> + clock-names = "HXT_24MHz"; > Please test your DTS with make dtbs_check. > > Don't send DTS which does not pass the checks. It is unnecessary use of > reviewers time when the same job can be done by automated tools. > > Best regards, > Krzysztof Yes, I read the "writing-schema.rst" and know how to do now. Thank you. Sincerely, Jacky Huang