From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D484AC433F5 for ; Sat, 15 Jan 2022 04:32:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFEC9831CA; Sat, 15 Jan 2022 05:32:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="e3zcIbeI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A0E9F81221; Sat, 15 Jan 2022 05:32:28 +0100 (CET) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7D4C381221 for ; Sat, 15 Jan 2022 05:32:24 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mibodhi@gmail.com Received: by mail-yb1-xb31.google.com with SMTP id m1so10682998ybo.5 for ; Fri, 14 Jan 2022 20:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=cpqMH/eyw1sR0yXTCBipXUjcR+Y3rVNprCjXYipYZxI=; b=e3zcIbeIXWbao5fJy9L7BBryA825eb+pSxAHCuE8HvAboV7RA4nzPBbKnVl7dz262p CC4CtdWemXVtwkjpFQZws4FXQTuQ2Du6MiNO0HaKQO2MxeZ0TH+EZzBQdO3PaEy56pPW DQkO//4ha5smahAjuquYynFYGklId1Sw0cPqHJlo5Po73r/+hUT9h3qxlsI7z3ATnrPv nqFnRc8fFtrrr+6rCYW+66NSjTQXOI1Y2qkw9SbOVzvJzKNC3FwUhby0gdEhsjjJOMer b+2Hzo/rfxPpp3HVZW54BvRXxe97V1VDKz87Gs7MmkcU0zlVAQgL/rUGadlHB9XzrAXD 8foQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=cpqMH/eyw1sR0yXTCBipXUjcR+Y3rVNprCjXYipYZxI=; b=hFRp8I03c/n7EXdaT1t806BaLn7QJ3tZ/vioDhRnRkMILIH/lnx825be3h38Nz32kX Vf7ukg/UyL60LPLrS7jEtqHaPda85BrgCwGRwA7GQFgh01fz1nS1qawtakd8bl9Cb4/p HYA6tu+Lfy7IP11U5VVWsmBXZ9XR2YyIX8g1QKdYLuauSpMZUJKsmfAIQ7wEz7nMRrIG eAZIsAV/DJZExV8zv+ybuioXI6S5QxoE3/18p4cJLHXP9PMmXWsi6QjnUKN746zFuX91 i+DXkr4xLGpdNNXx6YNzKUkKUM3XEwLhMEvA6hAWNDY+VYdUdxMWUKO/Q/zp5diboz7O EaPQ== X-Gm-Message-State: AOAM533wZKjFjCgpLUux7t9SuKFbwnipPuGs2n+XI32Fm07X+imesd2x QmoLUK1eJkMlUwq8YL2zHUMGmdTmYR5xImiBrAY= X-Google-Smtp-Source: ABdhPJyVH+aY2AIkOC4bA11/GxE0PrK1hZIgKXYRbuf8FlxfQR0rcoFe4Y8bidaTr4XDczZMOqwy5ZCJ6KNDKvtI0jE= X-Received: by 2002:a5b:790:: with SMTP id b16mr11831519ybq.348.1642221143181; Fri, 14 Jan 2022 20:32:23 -0800 (PST) MIME-Version: 1.0 References: <20220113132804.7814-1-pali@kernel.org> In-Reply-To: From: Tony Dinh Date: Fri, 14 Jan 2022 20:32:12 -0800 Message-ID: Subject: Re: [PATCH] pci: pci_mvebu: Add support for Kirkwood PCIe controllers To: =?UTF-8?Q?Pali_Roh=C3=A1r?= Cc: Stefan Roese , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Pali, On Thu, Jan 13, 2022 at 3:35 PM Tony Dinh wrote: > > Hi Pali, > > On Thu, Jan 13, 2022 at 5:28 AM Pali Roh=C3=A1r 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 ma= cro > > 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 compat= ible > > string, so mark pci_mvebu.c driver as compatible for it. > > > > Signed-off-by: Pali Roh=C3=A1r > > --- > > This patch depends on series "mvebu: Move PCIe code from serdes to PCIe= driver": > > https://patchwork.ozlabs.org/project/uboot/list/?series=3D277906&state= =3D* > > > > 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) U-Boot 2022.01-00458-ge120ef9f5f-dirty (Jan 14 2022 - 15:59:48 -0800) Pogoplug V4 pcie0.0: Link up Net: eth0: ethernet-controller@72000 Hit any key to stop autoboot: 0 Pogo_V4> usb start starting USB... Bus ehci@50000: USB EHCI 1.00 Bus xhci_pci: Register 400081f NbrPorts 4 Starting the controller USB XHCI 1.00 scanning bus ehci@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 2nd test: Iomega iConnect (Kirkwood 88F6281) U-Boot 2022.01-00489-g9b72d934c2-dirty (Jan 14 2022 - 18:32:35 -0800) Iomega iConnect pcie0.0: Link down Net: egiga0 Error: egiga0 address not set. Hit any key to stop autoboot: 0 iconnect =3D> pci init Scanning PCI devices on bus 0 BusDevFun VendorId DeviceId Device Class Sub-Class _____________________________________________________________ 00.00.00 0x11ab 0x6281 Bridge device 0x04 iconnect =3D> pci region # Bus start Phys start Size Flags 0 0x0000000090000000 0x0000000090000000 0x0000000008000000 mem 1 0x0000000090000000 0x0000000090000000 0x0000000008000000 mem 2 0x00000000c0000000 0x00000000c0000000 0x0000000000010000 io io Thanks for the great work! Tony Tested-by: Tony Dinh