Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2585009rwb; Fri, 2 Dec 2022 11:52:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf4LpS7PjNphpZJ86+bQPAKfLoB5qitk75jXMmPoZKX1hN0USCNRgn0t0ZQjtpD6PqTuf8Zn X-Received: by 2002:a17:906:4717:b0:7b9:f0ae:f492 with SMTP id y23-20020a170906471700b007b9f0aef492mr39817290ejq.559.1670010765971; Fri, 02 Dec 2022 11:52:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670010765; cv=none; d=google.com; s=arc-20160816; b=SEZng1UOZMl7NxC2pOcQLGToUshNe7TXUuDZhAnmtVMjmQ8sra9Z9EW4akpKf5V30O RwPiCOpB+bHkEFsKSntTn5G6AyxwtvsIVLiGWcRF4cuA8OKingVZANGJkxyqmwM5coNv 7640lQdW2olYqJ5AXhTPBNPTfhQvFTA7kumB7zeYVlWYxxdbWAMBRo6gNnM532cAqhSq EsN4H80sF1WsQZVK45xe8NX/KcHwfDxNVRC3+lQMu6i21Ai4FP3cWCCQ8965akGlh6Oe +zaHRLd9yYgO/KkMPOjW1i+AlKQMXQV7oKeyUSjlBksSXMjjloer6s3oAMAQXKZ/5nlN jC3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Ci79Z7enBIG94PpDsJhvi+mtdIO9uid2w2qukZ7VU/A=; b=Zbtk+Qia34TulaoyNSyeHgqalXV+WE6gqVQ5u9r2ic/l/h7OJ3obo6LR7bQt5Lfnqv bl/C5w5YFF1YLRP8uby3sZOi5ud2whsvO3bhA/KuIp3lecnWN8UTvLTW6ynT6J/gf6qh aolzh+1K36Ovt8Rm7pLf12IruWcbrRoh5g2XVI4Al774LYDln4FeZR66esfLLZzBjjxa GCG7SLMmsyL0c47K8hwXANENdGl7evv3w4ty1+bt19SkxPeBNmXvPSAl37LvPzhli6pa pRazMLsHAQB2iJSdVhz1iNxEnXhnHiWzkR16d3L7O9CwojrSkfqlXPaMmt/zWksiymD5 GO2w== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a05640206cb00b0045d189ac612si6512075edy.402.2022.12.02.11.52.26; Fri, 02 Dec 2022 11:52:45 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234372AbiLBTe6 (ORCPT + 82 others); Fri, 2 Dec 2022 14:34:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiLBTe5 (ORCPT ); Fri, 2 Dec 2022 14:34:57 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 90769A6074; Fri, 2 Dec 2022 11:34:55 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9136923A; Fri, 2 Dec 2022 11:35:01 -0800 (PST) Received: from bogus (unknown [10.57.5.79]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A467B3F67D; Fri, 2 Dec 2022 11:34:52 -0800 (PST) Date: Fri, 2 Dec 2022 19:34:49 +0000 From: Sudeep Holla To: Wang Honghui Cc: Catalin Marinas , Will Deacon , Arnd Bergmann , Olof Johansson , soc@kernel.org, Sudeep Holla , Rob Herring , Krzysztof Kozlowski , Cristian Marussi , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH] arm64/boot/dts and arm_scpi: add to support Phytium FT2004 CPU Message-ID: <20221202193449.vhmta6oou7oxf7gp@bogus> References: <0D48D1B7AC373F2F+Y4l+EOBIC9SmZD2A@TP-P15V> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0D48D1B7AC373F2F+Y4l+EOBIC9SmZD2A@TP-P15V> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 On Fri, Dec 02, 2022 at 12:24:48PM +0800, Wang Honghui wrote: > arm64/boot/dts and arm_scpi: add to support Phytium FT2004 CPU. > Krzysztof had commented pointing out some of the issues already. I will skip those. I am surprised as you seem to still post patches when there was ongoing discussions on SCPI compatibles on the other thread[1]. > Signed-off-by: Wang Honghui > --- > arch/arm64/Kconfig.platforms | 5 + > arch/arm64/boot/dts/Makefile | 1 + > arch/arm64/boot/dts/phytium/Makefile | 5 + > .../dts/phytium/ft2004-devboard-d4-dsk.dts | 73 +++ > .../dts/phytium/ft2004-generic-psci-soc.dtsi | 469 ++++++++++++++++++ > drivers/firmware/arm_scpi.c | 1 + You didn't respond with the reason for the need to use extra compatible when you can manage with generic compatible. I still think you must not need this change in arm_scpi as you simply can use existing compatible. Also if you need, it needs to be separate patch, I have already pointed out that. > diff --git a/arch/arm64/boot/dts/phytium/ft2004-generic-psci-soc.dtsi b/arch/arm64/boot/dts/phytium/ft2004-generic-psci-soc.dtsi > new file mode 100644 > index 000000000000..80d64e17899b > --- /dev/null > +++ b/arch/arm64/boot/dts/phytium/ft2004-generic-psci-soc.dtsi > @@ -0,0 +1,469 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * dts file for FT-2000/4 SoC > + * > + * Copyright (C) 2018-2019, Phytium Technology Co., Ltd. > + */ > + > +#include > + > +/ { > + compatible = "phytium,ft2004"; > + interrupt-parent = <&gic>; > + #address-cells = <2>; > + #size-cells = <2>; > + > + aliases { > + ethernet0 = &gmac0; > + ethernet1 = &gmac1; > + }; > + > + psci { > + compatible = "arm,psci-1.0"; > + method = "smc"; Drop all the below properties they are needed only for v0.1. For v0.2 and above it is fixed and don't need to be described in the DTS. > + cpu_suspend = <0xc4000001>; > + cpu_off = <0x84000002>; > + cpu_on = <0xc4000003>; > + sys_poweroff = <0x84000008>; > + sys_reset = <0x84000009>; > + }; > + > + cpus { > + #address-cells = <0x2>; > + #size-cells = <0x0>; > + > + cpu0: cpu@0 { > + device_type = "cpu"; > + compatible = "arm,armv8"; I assume this is not model and it is real platform in which case it must have real processor compatible like "arm,cortex-a57" or whatever it is. > + > + sram: sram@2a006000 { > + compatible = "phytium,ft2004-sram-ns","mmio-sram"; > + reg = <0x0 0x2a006000 0x0 0x2000>; > + > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0x0 0x0 0x2a006000 0x2000>; > + > + scpi_lpri: scpi-shmem@0 { > + compatible = "phytium,ft2004-scpi-shmem"; As mentioned multiple times, use the generic compatible "arm,scp-shmem" unless you need it for some specific reason in which case I would expect associated changes in the driver. > + reg = <0x1000 0x800>; > + }; > + }; > + > +}; > diff --git a/drivers/firmware/arm_scpi.c b/drivers/firmware/arm_scpi.c > index 435d0e2658a4..876eb2f9ff81 100644 > --- a/drivers/firmware/arm_scpi.c > +++ b/drivers/firmware/arm_scpi.c > @@ -904,6 +904,7 @@ static const struct of_device_id shmem_of_match[] __maybe_unused = { > { .compatible = "amlogic,meson-axg-scp-shmem", }, > { .compatible = "arm,juno-scp-shmem", }, > { .compatible = "arm,scp-shmem", }, > + { .compatible = "phytium,ft2004-scpi-shmem", }, Drop the above if there is no other change need in the driver which means you are compatible with std. SCPI spec and need nothing different meaning no need for this extra compatible. -- Regards, Sudeep [1] https://lore.kernel.org/all/20221201114107.2ig6pdncekzlpdq2@bogus