Skip to content

RFC Nexell S5P6818 SoC support

Lukasz Majewski u-boot 1 version New

Get series with b4
b4 am 20171130110112.1fcf8653@jawa

Versions newest first

  1. v1 RFC Latest0 of 13 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 13 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [U-Boot] [RFC PATCH 00/13] Nexell S5P6818 SoC support

Hi,

Quoted 49 lines

Hi Andre,

Quoted 47 lines

Hi,

this is a first draft of the things Amit and I have been working on in the last months. It introduces support for an SoC called "Nexell S5P6818". This is an Octa-core ARMv8 SoC with Cortex-A53 cores, which apparently is closely related to (older) Samsung SoCs. Many peripherals are compatible to Samsung IP (UART, MMC, Ethernet, timers, ...), but some core peripherals like the clocks and the pin controller seem to be completely different. We used the NanoPi M3 board [1] for testing, which uses this SoC along with the usual suspects of on-board components and connectors. This port is done completely from scratch, by just looking at the manual. This allows a much cleaner and modern U-Boot support than the BSP code.

The ARM Generic Timer (aka. arch timer) does not seem to work on this SoC. Ideally there would be some (hidden?) register enabling the right clock source, though we haven't found one (yet). But as also other code for this SoC out there on the net does not seem to be able to use the arch timer, I am not too hopeful here. While this does not impose a real problem to U-Boot (patch 3/13 takes care of that), it is a showstopper for mainline arm64 Linux, which heavily relies on the arch timer (since it's a mandatory part of the ARMv8 architecture). There is only a very small chance that the arch timer ever becomes optional in the mainline arm64 kernel. However our arm(32) kernel ports works quite nicely so far, also a (hacked) arm64 kernel boots to the prompt. We will submit Linux patches at a later time.

We would be grateful to get some comments on the patches. The first five patches adapt existing code to simplify support for this SoC. The following six patches then successively enable and add SoC support, culmulating in the addition of a nanopi_m3_defconfig file in patch 11/13. The SoC support code is actually architecture agnostic, though up until the last patch it generates an AArch64 binary. To overcome the problems with the arch timer mentioned above, the final patch switches the port over to AArch32, which can more naturally launch arm kernels.

This code so far does not include an SPL, instead it relies on some vendor provided code to initialise the DRAM and load U-Boot proper. The original BSP code provided a binary blob for that (called "secondboot"), although there is some GPLed version of that available on github([2]). We can load a 32-bit U-Boot with both the vendor blob and Rafaello's GPL version, the 64-bit version is only usable with the GPL code. Instruction on how to create a bootable SD card are contained in the arch/arm/mach-nexell/README file.

Quoted 6 lines
Quoted 2 lines

We would be very grateful to get some first feedback on those patches and the approach in general taken here.

Just to ask - why it is not possible to add this to:

/arch/arm/mach-exynos ? And start new mach-nexell ?

Ok. I was too fast :-)

Nexell is a separate company - also from Korea - so mach-nexell is a correct approach.

Sorry.

Quoted 3 lines

As fair as I remember, many Samsung SoCs (especially S5P) share IP blocks, so maybe there is a place for unification?

But unification if possible is more than welcome - as it was done in this patch set with uart code.

Quoted 3 lines

Also, it would be quite challenging to support first armv8 Samsung soc in the current directory structure.....

Considering above - mach-nexell is probably the way to go.

Quoted 85 lines

+CC Jaehoon - who may have some comments here.

Quoted 67 lines

Cheers,
Andre.

[1] http://nanopi.io/nanopi-m3.html
[2] https://github.com/rafaello7/bl1-nanopi-m3

Amit Singh Tomar (4):
reset: add driver for generic reset controllers
mmc: add MMC (glue) driver for Nexell SoCs
arm: nexell: add ARM64 MMU regions
arm: nexell: add timer support

Andre Przywara (9):
serial: s5p: rework Samsung UART driver to get rid of uart.h
serial: S5P/Samsung: refactor and Kconfig-ize UART selection
arm: move SYS_ARCH_TIMER to KConfig
arm: add basic framework for Nexell S5P6818 support
arm: nexell: embed NSIH header
arm: nexell: add UART support
arm: nexell: add preliminary S5P6818 SoC device tree
arm: add NanoPi M3 board support
arm: nexell: switch to 32-bit

 arch/arm/Kconfig                          |  29 +++++
 arch/arm/Makefile                         |   1 +
 arch/arm/cpu/armv8/Makefile               |   2 +-
 arch/arm/dts/s5p6818-nanopi-m3.dts        |  30 +++++
 arch/arm/dts/s5p6818.dtsi                 | 196
++++++++++++++++++++++++++++++
arch/arm/dts/s5pc1xx-goni.dts             |   2 +-
arch/arm/dts/s5pc1xx-smdkc100.dts         |   2 +-
arch/arm/include/asm/arch-nexell/boot0.h  |  35 ++++++
arch/arm/include/asm/arch-nexell/clk.h    |  15 +++
arch/arm/include/asm/arch-nexell/pwm.h    |  62 ++++++++++
arch/arm/mach-exynos/include/mach/uart.h  |  44 -------
arch/arm/mach-imx/mx7ulp/Kconfig          |   1 +
arch/arm/mach-nexell/Kconfig              |   9 ++
arch/arm/mach-nexell/Makefile             |  10 ++
arch/arm/mach-nexell/README               |  49 ++++++++
arch/arm/mach-nexell/board.c              | 128 +++++++++++++++++++
arch/arm/mach-nexell/mmu-arm64.c          |  39 ++++++
arch/arm/mach-s5pc1xx/Kconfig             |   2 +
arch/arm/mach-s5pc1xx/include/mach/uart.h |  44 -------
configs/nanopi_m3_defconfig               |  12 ++
drivers/mmc/Kconfig                       |   8 ++
drivers/mmc/Makefile                      |   1 +
drivers/mmc/nexell_dw_mmc.c               | 159
++++++++++++++++++++++++ drivers/reset/Kconfig
|   6 + drivers/reset/Makefile                    |   1 +
drivers/reset/reset-generic.c             | 111 +++++++++++++++++
drivers/serial/Kconfig                    |   6 +
drivers/serial/Makefile                   |   2 +-
drivers/serial/serial_s5p.c               |  45 ++++++-
include/configs/mx7ulp_evk.h              |   1 -
include/configs/s5p6818.h                 |  35 ++++++
include/configs/ti_armv7_keystone2.h      |   1 -
scripts/config_whitelist.txt              |   1 - 33 files changed,

989 insertions(+), 100 deletions(-) create mode 100644 arch/arm/dts/s5p6818-nanopi-m3.dts create mode 100644 arch/arm/dts/s5p6818.dtsi create mode 100644 arch/arm/include/asm/arch-nexell/boot0.h create mode 100644 arch/arm/include/asm/arch-nexell/clk.h create mode 100644 arch/arm/include/asm/arch-nexell/pwm.h delete mode 100644 arch/arm/mach-exynos/include/mach/uart.h create mode 100644 arch/arm/mach-nexell/Kconfig create mode 100644 arch/arm/mach-nexell/Makefile create mode 100644

Quoted 9 lines

arch/arm/mach-nexell/README create mode 100644 arch/arm/mach-nexell/board.c create mode 100644 arch/arm/mach-nexell/mmu-arm64.c delete mode 100644 arch/arm/mach-s5pc1xx/include/mach/uart.h create mode 100644 configs/nanopi_m3_defconfig create mode 100644 drivers/mmc/nexell_dw_mmc.c create mode 100644 drivers/reset/reset-generic.c create mode 100644 include/configs/s5p6818.h

Best regards,

Quoted 7 lines

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171130/523e10d9/attachment.sig>