[v9,01/10] arm64: Kconfig.platforms: Add config for Nuvoton MA35 platform

Message ID 20230504033726.93-2-ychuang570808@gmail.com
State New
Headers
Series Introduce Nuvoton ma35d1 SoC |

Commit Message

Jacky Huang May 4, 2023, 3:37 a.m. UTC
  From: Jacky Huang <ychuang3@nuvoton.com>

Add ARCH_NUVOTON configuration option for Nuvoton MA35 family SoCs.

Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
---
 arch/arm64/Kconfig.platforms | 9 +++++++++
 1 file changed, 9 insertions(+)
  

Comments

Krzysztof Kozlowski May 4, 2023, 6:29 a.m. UTC | #1
On 04/05/2023 05:37, Jacky Huang wrote:
> From: Jacky Huang <ychuang3@nuvoton.com>
> 
> Add ARCH_NUVOTON configuration option for Nuvoton MA35 family SoCs.
> 
> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
  
Krzysztof Kozlowski May 4, 2023, 6:32 a.m. UTC | #2
On 04/05/2023 05:37, Jacky Huang wrote:
> From: Jacky Huang <ychuang3@nuvoton.com>
> 
> Add ARCH_NUVOTON configuration option for Nuvoton MA35 family SoCs.
> 
> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
> ---
>  arch/arm64/Kconfig.platforms | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index 89a0b13b058d..c1f277c05569 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -236,6 +236,15 @@ config ARCH_NPCM
>  	  General support for NPCM8xx BMC (Arbel).
>  	  Nuvoton NPCM8xx BMC based on the Cortex A35.
>  
> +config ARCH_NUVOTON

Either this should be ARCH_MA35 or you should integrate it with NPCM.
ARCH_NUVOTON means all Nuvoton platforms.


Best regards,
Krzysztof
  
Arnd Bergmann May 4, 2023, 7:49 a.m. UTC | #3
On Thu, May 4, 2023, at 08:32, Krzysztof Kozlowski wrote:
> On 04/05/2023 05:37, Jacky Huang wrote:
>> From: Jacky Huang <ychuang3@nuvoton.com>
>> 
>> Add ARCH_NUVOTON configuration option for Nuvoton MA35 family SoCs.
>> 
>> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
>> ---
>>  arch/arm64/Kconfig.platforms | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>> 
>> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
>> index 89a0b13b058d..c1f277c05569 100644
>> --- a/arch/arm64/Kconfig.platforms
>> +++ b/arch/arm64/Kconfig.platforms
>> @@ -236,6 +236,15 @@ config ARCH_NPCM
>>  	  General support for NPCM8xx BMC (Arbel).
>>  	  Nuvoton NPCM8xx BMC based on the Cortex A35.
>>  
>> +config ARCH_NUVOTON
>
> Either this should be ARCH_MA35 or you should integrate it with NPCM.
> ARCH_NUVOTON means all Nuvoton platforms.

I'd go with two separate Kconfig options here (ARCH_MA35 and ARCH_NPCM)
for arm64, but keep the shared arch/arm64/boot/dts/nuvoton directory,
I think that fits most closely what we do on other targets, and there
is apparently very little sharing of IP blocks between npcm and ma35,
if any.

      Arnd
  
Jacky Huang May 4, 2023, 8 a.m. UTC | #4
On 2023/5/4 下午 03:49, Arnd Bergmann wrote:
> On Thu, May 4, 2023, at 08:32, Krzysztof Kozlowski wrote:
>> On 04/05/2023 05:37, Jacky Huang wrote:
>>> From: Jacky Huang <ychuang3@nuvoton.com>
>>>
>>> Add ARCH_NUVOTON configuration option for Nuvoton MA35 family SoCs.
>>>
>>> Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
>>> ---
>>>   arch/arm64/Kconfig.platforms | 9 +++++++++
>>>   1 file changed, 9 insertions(+)
>>>
>>> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
>>> index 89a0b13b058d..c1f277c05569 100644
>>> --- a/arch/arm64/Kconfig.platforms
>>> +++ b/arch/arm64/Kconfig.platforms
>>> @@ -236,6 +236,15 @@ config ARCH_NPCM
>>>   	  General support for NPCM8xx BMC (Arbel).
>>>   	  Nuvoton NPCM8xx BMC based on the Cortex A35.
>>>   
>>> +config ARCH_NUVOTON
>> Either this should be ARCH_MA35 or you should integrate it with NPCM.
>> ARCH_NUVOTON means all Nuvoton platforms.
> I'd go with two separate Kconfig options here (ARCH_MA35 and ARCH_NPCM)
> for arm64, but keep the shared arch/arm64/boot/dts/nuvoton directory,
> I think that fits most closely what we do on other targets, and there
> is apparently very little sharing of IP blocks between npcm and ma35,
> if any.
>
>        Arnd

Dear Arnd and Krzysztof,

Thank you for your suggestion, it really helped me. We are also considering
whether to use ARCH_MA35. As NPCM and MA35 are designed for different
application areas, it is unlikely that they would be used simultaneously.
Therefore, it would be more reasonable to separate them into ARCH_NPCM and
ARCH_MA35. In the next version, v10, we will change all instances of
ARCH_NUVOTON in this patchset to ARCH_MA35 and keep shared directory 
changed.


Best Regards,
Jacky Huang
  

Patch

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 89a0b13b058d..c1f277c05569 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -236,6 +236,15 @@  config ARCH_NPCM
 	  General support for NPCM8xx BMC (Arbel).
 	  Nuvoton NPCM8xx BMC based on the Cortex A35.
 
+config ARCH_NUVOTON
+	bool "Nuvoton MA35 Platforms"
+	select GPIOLIB
+	select PINCTRL
+	select RESET_CONTROLLER
+	help
+	  This enables support for the ARMv8 based Nuvoton SoCs such
+	  as MA35D1.
+
 config ARCH_QCOM
 	bool "Qualcomm Platforms"
 	select GPIOLIB