mbox series

[U-Boot,RFC,00/22] Add support for Cavium Octeon-TX CN80XX/CN81XX

Message ID 20190222180319.32221-1-tharvey@gateworks.com
Headers show
Series Add support for Cavium Octeon-TX CN80XX/CN81XX | expand

Message

Tim Harvey Feb. 22, 2019, 6:02 p.m. UTC
The Cavium Octeon-TX 64-bit ARM based SoCs include the CN80XX and CN81XX.
These SoC's have peripheral drivers based on PCI ECAM.

This series has been tested on the the following Gateworks SBC's:
 - GW6100 - CN8021 dual A53 800MHz
 - GW6104 - CN8031 quad A53 1500MHz
 - GW6300 - CN8020 dual A53 800MHz
 - GW6304 - CN8030 quad A53 1500MHz

These patches all came originally from Cavium's SDK based on a 2017 version
of U-Boot and have been refactored a bit to strip out things that didn't make
sense that I saw in the original code.

These patches apply on top of U-Boot 2018.11 and if needed I can do minor
cleanup and rebase on top of master but I can't be the maintainer.

I'm also looking for comments on the PCI related patches as I am by far not
a PCI expert and am not sure what I've done here is correct for this SoC and
the others some of the changes would affect.

I'm looking for a maintainer for this - I only have boards with the above SoC's
and can't test anything else. I also don't have the resources to be a
maintainer of this arch - I'm looking at you Cavium/Marvell as your SDK's use
old forks of U-Boot with a slew of patches and there is no reason to not
mainline this code. I've added all the cavium/marvell contacts I could find
from previous threads about OcteonTX support in U-Boot.

The way I'm using this on the above boards is to build u-boot-nodtb.bin
and package it into a FIP image that the ATF loads. I can document this process
if needed.

You can find this series on github [1]

Best Regards,

Tim

[1] https://github.com/Gateworks/uboot-newport/tree/v2018.11-newport-rc1

Tim Harvey (22):
  arm: introduce ARCH_THUNDERX
  arm: add thunderx_81xx
  thunderx: add FDT support
  thunderx: add thunderx register definitions and misc functions
  thunderx: move DRAM prints to debug
  dm: pci: add PCI SR-IOV EA support
  fdt: add fdtdec_get_pci_bus_range
  pci: add thunderx pci/ecam driver
  pci: fix pce enumeration on thunderx
  arm: include 64bit io accessors
  gpio: add thunderx gpio driver
  i2c: add thunderx I2C driver
  spi: add thunderx SPI driver
  xhci: add support for cavium thunderx XHCI
  thunderx_81xx: add support for XHCI
  thunderx_81xx: enable usb mass storage and usb ethernet
  ahci: support 64bit systems
  ahci: set n_ports from host caps
  ahci: add support for ThunderX AHCI
  thunderx_81xx: add AHCI support
  net: add thunderx vnic drivers
  pci: auto probe thunderx NIC devices

 arch/arm/Kconfig                              |    6 +-
 arch/arm/Makefile                             |    1 +
 arch/arm/dts/Makefile                         |    3 +-
 arch/arm/dts/thunderx-81xx.dts                |   36 +
 arch/arm/dts/thunderx-81xx.dtsi               |  440 +++++
 .../arm/include/asm/arch-thunderx}/atf.h      |    2 +-
 .../arm/include/asm/arch-thunderx}/atf_part.h |    0
 arch/arm/include/asm/arch-thunderx/fdt.h      |   12 +
 arch/arm/include/asm/arch-thunderx/thunderx.h |  300 ++++
 .../include/asm/arch-thunderx}/thunderx_svc.h |    0
 .../include/asm/arch-thunderx/thunderx_vnic.h |   15 +
 arch/arm/include/asm/gpio.h                   |    2 +-
 arch/arm/include/asm/io.h                     |    8 +
 arch/arm/mach-thunderx/Makefile               |    2 +
 .../thunderx => arch/arm/mach-thunderx}/atf.c |    6 +-
 arch/arm/mach-thunderx/fdt.c                  |  218 +++
 arch/arm/mach-thunderx/lowlevel_init.S        |   31 +
 arch/arm/mach-thunderx/misc.c                 |   33 +
 arch/x86/cpu/baytrail/cpu.c                   |    3 +-
 board/cavium/thunderx/Kconfig                 |   23 +-
 board/cavium/thunderx/Makefile                |    2 +-
 board/cavium/thunderx/thunderx.c              |   60 +-
 configs/thunderx_81xx_defconfig               |   65 +
 configs/thunderx_88xx_defconfig               |    9 +-
 drivers/ata/ahci.c                            |   46 +-
 drivers/gpio/Kconfig                          |    7 +
 drivers/gpio/Makefile                         |    1 +
 drivers/gpio/thunderx_gpio.c                  |  189 ++
 drivers/i2c/Kconfig                           |    7 +
 drivers/i2c/Makefile                          |    1 +
 drivers/i2c/designware_i2c.c                  |    4 +-
 drivers/i2c/intel_i2c.c                       |    3 +-
 drivers/i2c/thunderx_i2c.c                    |  878 ++++++++++
 drivers/mmc/pci_mmc.c                         |    3 +-
 drivers/net/Kconfig                           |   34 +
 drivers/net/Makefile                          |    1 +
 drivers/net/cavium/Makefile                   |    8 +
 drivers/net/cavium/nic.h                      |  569 ++++++
 drivers/net/cavium/nic_main.c                 |  795 +++++++++
 drivers/net/cavium/nic_reg.h                  |  228 +++
 drivers/net/cavium/nicvf_main.c               |  553 ++++++
 drivers/net/cavium/nicvf_queues.c             | 1123 ++++++++++++
 drivers/net/cavium/nicvf_queues.h             |  364 ++++
 drivers/net/cavium/q_struct.h                 |  692 ++++++++
 drivers/net/cavium/thunder_bgx.c              | 1529 +++++++++++++++++
 drivers/net/cavium/thunder_bgx.h              |  259 +++
 drivers/net/cavium/thunder_xcv.c              |  190 ++
 drivers/net/cavium/thunderx_smi.c             |  388 +++++
 drivers/net/e1000.c                           |    5 +-
 drivers/net/pch_gbe.c                         |    3 +-
 drivers/nvme/nvme.c                           |    3 +-
 drivers/pci/Kconfig                           |    9 +
 drivers/pci/Makefile                          |    1 +
 drivers/pci/pci-uclass.c                      |  316 +++-
 drivers/pci/pci_auto.c                        |   18 +
 drivers/pci/pci_thunderx.c                    |  160 ++
 drivers/spi/Kconfig                           |    6 +
 drivers/spi/Makefile                          |    1 +
 drivers/spi/thunderx_spi.c                    |  448 +++++
 drivers/usb/host/ehci-pci.c                   |    3 +-
 drivers/usb/host/xhci-pci.c                   |   10 +-
 include/ahci.h                                |    3 +
 include/configs/thunderx_81xx.h               |   82 +
 include/fdtdec.h                              |   11 +
 include/pci.h                                 |   58 +-
 include/pci_ids.h                             |   15 +
 lib/fdtdec.c                                  |   13 +
 net/eth_legacy.c                              |    3 +
 68 files changed, 10248 insertions(+), 69 deletions(-)
 create mode 100644 arch/arm/dts/thunderx-81xx.dts
 create mode 100644 arch/arm/dts/thunderx-81xx.dtsi
 rename {include/cavium => arch/arm/include/asm/arch-thunderx}/atf.h (96%)
 rename {include/cavium => arch/arm/include/asm/arch-thunderx}/atf_part.h (100%)
 create mode 100644 arch/arm/include/asm/arch-thunderx/fdt.h
 create mode 100644 arch/arm/include/asm/arch-thunderx/thunderx.h
 rename {include/cavium => arch/arm/include/asm/arch-thunderx}/thunderx_svc.h (100%)
 create mode 100644 arch/arm/include/asm/arch-thunderx/thunderx_vnic.h
 create mode 100644 arch/arm/mach-thunderx/Makefile
 rename {board/cavium/thunderx => arch/arm/mach-thunderx}/atf.c (98%)
 create mode 100644 arch/arm/mach-thunderx/fdt.c
 create mode 100644 arch/arm/mach-thunderx/lowlevel_init.S
 create mode 100644 arch/arm/mach-thunderx/misc.c
 create mode 100644 configs/thunderx_81xx_defconfig
 create mode 100644 drivers/gpio/thunderx_gpio.c
 create mode 100644 drivers/i2c/thunderx_i2c.c
 create mode 100644 drivers/net/cavium/Makefile
 create mode 100644 drivers/net/cavium/nic.h
 create mode 100644 drivers/net/cavium/nic_main.c
 create mode 100644 drivers/net/cavium/nic_reg.h
 create mode 100644 drivers/net/cavium/nicvf_main.c
 create mode 100644 drivers/net/cavium/nicvf_queues.c
 create mode 100644 drivers/net/cavium/nicvf_queues.h
 create mode 100644 drivers/net/cavium/q_struct.h
 create mode 100644 drivers/net/cavium/thunder_bgx.c
 create mode 100644 drivers/net/cavium/thunder_bgx.h
 create mode 100644 drivers/net/cavium/thunder_xcv.c
 create mode 100644 drivers/net/cavium/thunderx_smi.c
 create mode 100644 drivers/pci/pci_thunderx.c
 create mode 100755 drivers/spi/thunderx_spi.c
 create mode 100644 include/configs/thunderx_81xx.h