Skip to contentSkip to conversation

sunxi: introduce Allwinner H5 config option

PATCH Icenowy Zheng 2 participants 2 messages Jan 26, 2017

lore
Share & tools
lore
#0 lore raw

2017?1?26? 18:45? Maxime Ripard <[email protected]>???

Quoted 44 lines · Andre Przywara
Quoted 42 lines

The Allwinner H5 Soc is bascially an H3 with high SRAM and ARMv8 cores. As the peripherals and the pinmuxing are almost identical, we piggy back on the shared MACH_SUN8I_H3_H5 config symbol.

---
? arch/arm/mach-sunxi/cpu_info.c |? 2 ++
? board/sunxi/Kconfig??????????? | 10 ++++++++++
? 2 files changed, 12 insertions(+)

arch/arm/mach-sunxi/cpu_info.c +0 -0
index f1f6fd5..85633cc 100644 
@@ -91,6 +91,8 @@ int print_cpuinfo(void) 
 ? puts("CPU:?? Allwinner A80 (SUN9I)\n"); 

? #elif defined CONFIG_MACH_SUN50I
? puts("CPU:?? Allwinner A64 (SUN50I)\n");
+#elif defined CONFIG_MACH_SUN50I_H5
+ puts("CPU:?? Allwinner H5 (SUN50I)\n");
? #else
? #warning Please update cpu_info.c with correct CPU information ? puts("CPU:?? SUNXI Family\n");

board/sunxi/Kconfig +0 -0
index a63e176..87ec77e 100644 
@@ -56,6 +56,11 @@ config MACH_SUNXI_H3_H5 

? select SUNXI_GEN_SUN6I
? select SUPPORT_SPL
?
+config MACH_SUN50I_H5
+ bool
+ select SUNXI_HIGH_SRAM
+ select MACH_SUNXI_H3_H5
+
? choice
? prompt "Sunxi SoC Variant"
? optional

board/sunxi/Kconfig +0 -0
@@ -143,6 +148,11 @@ config MACH_SUN50I 

? select SUNXI_HIGH_SRAM
? select SUPPORT_SPL

Quoted 8 lines
Quoted 6 lines

?
+config MACH_SUN50I_H5_64
+ bool "sun50i (Allwinner H5)"
+ select ARM64
+ select MACH_SUN50I_H5
+

Why do we need two different MACH ?

For adding 32-bit SPL or even fully 32-bit system options.

Quoted 11 lines

Maxime

Signature · 8 lines
Maxime Ripard, Free Electrons 
Embedded Linux and Kernel engineering 
http://free-electrons.com 

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. 
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com. 
For more options, visit https://groups.google.com/d/optout. 
#1 lore raw

Hi Maxime, Icenowy,

Quoted 54 lines · Icenowy Zheng

2017?1?26? 18:45? Maxime Ripard <[email protected]>???

Quoted 52 lines · Andre Przywara
Quoted 40 lines

The Allwinner H5 Soc is bascially an H3 with high SRAM and ARMv8 cores. As the peripherals and the pinmuxing are almost identical, we piggy back on the shared MACH_SUN8I_H3_H5 config symbol.

---

  arch/arm/mach-sunxi/cpu_info.c |  2 ++ 
  board/sunxi/Kconfig            | 10 ++++++++++ 
  2 files changed, 12 insertions(+) 
arch/arm/mach-sunxi/cpu_info.c +2 -0
index f1f6fd5..85633cc 100644 
@@ -91,6 +91,8 @@ int print_cpuinfo(void) 
  puts("CPU:   Allwinner A80 (SUN9I)\n"); 
  #elif defined CONFIG_MACH_SUN50I 
  puts("CPU:   Allwinner A64 (SUN50I)\n"); 
+#elif defined CONFIG_MACH_SUN50I_H5 
+ puts("CPU:   Allwinner H5 (SUN50I)\n"); 
  #else 
  #warning Please update cpu_info.c with correct CPU information 
  puts("CPU:   SUNXI Family\n"); 
board/sunxi/Kconfig +5 -0
index a63e176..87ec77e 100644 
@@ -56,6 +56,11 @@ config MACH_SUNXI_H3_H5 
  select SUNXI_GEN_SUN6I 
  select SUPPORT_SPL 
 
+config MACH_SUN50I_H5 
+ bool 
+ select SUNXI_HIGH_SRAM 
+ select MACH_SUNXI_H3_H5 
+ 
  choice 
  prompt "Sunxi SoC Variant" 
  optional 

board/sunxi/Kconfig config MACH_SUN50I · line 155

Quoted 8 lines
board/sunxi/Kconfig +5 -0
@@ -143,6 +148,11 @@ config MACH_SUN50I 
  select SUNXI_HIGH_SRAM 
  select SUPPORT_SPL 
 
+config MACH_SUN50I_H5_64 
+ bool "sun50i (Allwinner H5)" 
+ select ARM64 
+ select MACH_SUN50I_H5 
+ 

Why do we need two different MACH ?

Ah, thanks for spotting this!

Quoted 1 line

For adding 32-bit SPL or even fully 32-bit system options.

Yes, but actually that's not implemented in this series. Looks like some rebasing artifact.

I think I will remove it here for this pure 64-bit drop. _If_ we need it later on, we can always add it back when we merge some 32-bit support. But we could as well use "#if defined(MACH_SUN50I_H5) && defined(ARM64)" if we need to do anything specific.
I hope that this will not be needed, but we'll see.

Cheers,
Andre.