[PATCH] pci: pci_mvebu: Add support for Kirkwood PCIe controllers

Tony Dinh mibodhi at gmail.com
Sat Jan 15 05:32:12 CET 2022


Hi Pali,


On Thu, Jan 13, 2022 at 3:35 PM Tony Dinh <mibodhi at gmail.com> wrote:
>
> Hi Pali,
>
> On Thu, Jan 13, 2022 at 5:28 AM Pali Rohár <pali at kernel.org> wrote:
> >
> > Kirkwood uses macros KW_DEFADR_PCI_MEM and KW_DEFADR_PCI_IO for base
> > address of PCIe mappings. Size of PCIe windows is not defined in any macro
> > yet, so export them in new KW_DEFADR_PCI_MEM_SIZE and KW_DEFADR_PCI_IO_SIZE
> > macros.
> >
> > Kirkwood arch code already maps mbus windows for io and mem, so avoid
> > calling mvebu_mbus_add_window_by_id() function which would try to do
> > duplicate window mapping.
> >
> > Kirkwood PCIe controllers already use "marvell,kirkwood-pcie" DT compatible
> > string, so mark pci_mvebu.c driver as compatible for it.
> >
> > Signed-off-by: Pali Rohár <pali at kernel.org>
> > ---
> > This patch depends on series "mvebu: Move PCIe code from serdes to PCIe driver":
> > https://patchwork.ozlabs.org/project/uboot/list/?series=277906&state=*
> >
> > Tony, could you please test it in Kirwood hardware?

Everything seems to be working fine. I've run 2 tests. For the
Pogoplug V4, tested with a USB 3.0 thumb drive (PCIe is the host bus),
For the Iomega iConnect, I don't have the Wifi Card or mSATA card
(could not found one in my pile yet), so the test is just for MVEBU
PCIe framework.

1st Test: Pogoplug V4 (Kirkwood 88F6192)

<BEGIN log>
U-Boot 2022.01-00458-ge120ef9f5f-dirty (Jan 14 2022 - 15:59:48 -0800)
Pogoplug V4
<snip>
pcie0.0: Link up
Net:   eth0: ethernet-controller at 72000
Hit any key to stop autoboot:  0

Pogo_V4> usb start
starting USB...
Bus ehci at 50000: USB EHCI 1.00
Bus xhci_pci: Register 400081f NbrPorts 4
Starting the controller
USB XHCI 1.00
scanning bus ehci at 50000 for devices... 1 USB Device(s) found
scanning bus xhci_pci for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found

Pogo_V4> pci info
Scanning PCI devices on bus 0
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x11ab     0x6281     Bridge device           0x04

Pogo_V4> pci region
#   Bus start          Phys start         Size                Flags
0   0x0000000090000000 0x0000000090000000 0x0000000008000000  mem
1   0x0000000090000000 0x0000000090000000 0x0000000008000000  mem
2   0x00000000c0000000 0x00000000c0000000 0x0000000000010000  io io

Pogo_V4> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
     u-boot EHCI Host Controller

  1  Hub (5 Gb/s, 0mA)
  |  U-Boot XHCI Host Controller
  |
  +-2  Mass Storage (5 Gb/s, 100mA)
       SanDisk Extreme AA010214142232182984
<END log>

2nd test: Iomega iConnect (Kirkwood 88F6281)

<BEGIN log>
U-Boot 2022.01-00489-g9b72d934c2-dirty (Jan 14 2022 - 18:32:35 -0800)
Iomega iConnect
<snip>
pcie0.0: Link down
Net:   egiga0
Error: egiga0 address not set.

Hit any key to stop autoboot:  0

iconnect => pci init
Scanning PCI devices on bus 0
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x11ab     0x6281     Bridge device           0x04

iconnect => pci region
#   Bus start          Phys start         Size                Flags
0   0x0000000090000000 0x0000000090000000 0x0000000008000000  mem
1   0x0000000090000000 0x0000000090000000 0x0000000008000000  mem
2   0x00000000c0000000 0x00000000c0000000 0x0000000000010000  io io

<END log>

Thanks for the great work!
Tony

Tested-by: Tony Dinh <mibodhi at gmail.com>


More information about the U-Boot mailing list