All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base
       [not found] <CGME20210617092207eucas1p2fba39144e5d4890a23ba70f794a25b79@eucas1p2.samsung.com>
@ 2021-06-17  9:22 ` Marek Szyprowski
  2021-06-17 21:44   ` Jaehoon Chung
                     ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Marek Szyprowski @ 2021-06-17  9:22 UTC (permalink / raw)
  To: u-boot
  Cc: Marek Szyprowski, Matthias Brugger, Sylwester Nawrocki,
	Nicolas Saenz Julienne, Jaehoon Chung, Bartlomiej Zolnierkiewicz

Move the XHCI PCI device base up in the virtual address space. This fixes
initialization failure observed with newer Raspberry Pi firmware, later
than 63b1922311 ("firmware: arm_loader: Update armstubs with those from
PR 117). It looks that chosing 0xff800000 as the XHCI PCI device base
conflicts with the updated ARM/VideoCore firmware.

This also requires to reduce the size of the mapped PCI device region
from 8MiB to 4MiB to fit into 32bit address space. This is still enough
for the XHCI PCI device.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
This fixes the issue observed on ARM 32bit after upgrading the RPi4
firmware files, described some time ago here:
https://lists.denx.de/pipermail/u-boot/2021-February/442317.html
---
 arch/arm/mach-bcm283x/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
index 49027ce0a2..9803499985 100644
--- a/arch/arm/mach-bcm283x/init.c
+++ b/arch/arm/mach-bcm283x/init.c
@@ -14,7 +14,7 @@
 #include <asm/global_data.h>
 
 #define BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS	0x600000000UL
-#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x800000UL
+#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x400000UL
 
 #ifdef CONFIG_ARM64
 #include <asm/armv8/mmu.h>
@@ -148,7 +148,7 @@ int mach_cpu_init(void)
 
 #ifdef CONFIG_ARMV7_LPAE
 #ifdef CONFIG_TARGET_RPI_4_32B
-#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT	0xff800000UL
+#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT	0xffc00000UL
 #include <addr_map.h>
 #include <asm/system.h>
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base
  2021-06-17  9:22 ` [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base Marek Szyprowski
@ 2021-06-17 21:44   ` Jaehoon Chung
  2021-06-18  9:00   ` nicolas saenz julienne
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jaehoon Chung @ 2021-06-17 21:44 UTC (permalink / raw)
  To: Marek Szyprowski, u-boot
  Cc: Matthias Brugger, Sylwester Nawrocki, Nicolas Saenz Julienne,
	Bartlomiej Zolnierkiewicz

On 6/17/21 6:22 PM, Marek Szyprowski wrote:
> Move the XHCI PCI device base up in the virtual address space. This fixes
> initialization failure observed with newer Raspberry Pi firmware, later
> than 63b1922311 ("firmware: arm_loader: Update armstubs with those from
> PR 117). It looks that chosing 0xff800000 as the XHCI PCI device base
> conflicts with the updated ARM/VideoCore firmware.
> 
> This also requires to reduce the size of the mapped PCI device region
> from 8MiB to 4MiB to fit into 32bit address space. This is still enough
> for the XHCI PCI device.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> ---
> This fixes the issue observed on ARM 32bit after upgrading the RPi4
> firmware files, described some time ago here:
> https://lists.denx.de/pipermail/u-boot/2021-February/442317.html
> ---
>  arch/arm/mach-bcm283x/init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
> index 49027ce0a2..9803499985 100644
> --- a/arch/arm/mach-bcm283x/init.c
> +++ b/arch/arm/mach-bcm283x/init.c
> @@ -14,7 +14,7 @@
>  #include <asm/global_data.h>
>  
>  #define BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS	0x600000000UL
> -#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x800000UL
> +#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x400000UL
>  
>  #ifdef CONFIG_ARM64
>  #include <asm/armv8/mmu.h>
> @@ -148,7 +148,7 @@ int mach_cpu_init(void)
>  
>  #ifdef CONFIG_ARMV7_LPAE
>  #ifdef CONFIG_TARGET_RPI_4_32B
> -#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT	0xff800000UL
> +#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT	0xffc00000UL
>  #include <addr_map.h>
>  #include <asm/system.h>
>  
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base
  2021-06-17  9:22 ` [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base Marek Szyprowski
  2021-06-17 21:44   ` Jaehoon Chung
@ 2021-06-18  9:00   ` nicolas saenz julienne
  2021-09-03 14:23   ` Stefan Agner
  2021-09-15 11:22   ` Matthias Brugger
  3 siblings, 0 replies; 5+ messages in thread
From: nicolas saenz julienne @ 2021-06-18  9:00 UTC (permalink / raw)
  To: Marek Szyprowski, u-boot
  Cc: Matthias Brugger, Sylwester Nawrocki, Nicolas Saenz Julienne,
	Jaehoon Chung, Bartlomiej Zolnierkiewicz

[-- Attachment #1: Type: text/plain, Size: 997 bytes --]

On Thu, 2021-06-17 at 11:22 +0200, Marek Szyprowski wrote:
> Move the XHCI PCI device base up in the virtual address space. This fixes
> initialization failure observed with newer Raspberry Pi firmware, later
> than 63b1922311 ("firmware: arm_loader: Update armstubs with those from
> PR 117). It looks that chosing 0xff800000 as the XHCI PCI device base
> conflicts with the updated ARM/VideoCore firmware.
> 
> This also requires to reduce the size of the mapped PCI device region
> from 8MiB to 4MiB to fit into 32bit address space. This is still enough
> for the XHCI PCI device.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> This fixes the issue observed on ARM 32bit after upgrading the RPi4
> firmware files, described some time ago here:
> https://lists.denx.de/pipermail/u-boot/2021-February/442317.html
> ---

Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>

Regards,
Nicolas

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base
  2021-06-17  9:22 ` [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base Marek Szyprowski
  2021-06-17 21:44   ` Jaehoon Chung
  2021-06-18  9:00   ` nicolas saenz julienne
@ 2021-09-03 14:23   ` Stefan Agner
  2021-09-15 11:22   ` Matthias Brugger
  3 siblings, 0 replies; 5+ messages in thread
From: Stefan Agner @ 2021-09-03 14:23 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: u-boot, Matthias Brugger, Sylwester Nawrocki,
	Nicolas Saenz Julienne, Jaehoon Chung, Bartlomiej Zolnierkiewicz

On 2021-06-17 11:22, Marek Szyprowski wrote:
> Move the XHCI PCI device base up in the virtual address space. This fixes
> initialization failure observed with newer Raspberry Pi firmware, later
> than 63b1922311 ("firmware: arm_loader: Update armstubs with those from
> PR 117). It looks that chosing 0xff800000 as the XHCI PCI device base
> conflicts with the updated ARM/VideoCore firmware.
> 
> This also requires to reduce the size of the mapped PCI device region
> from 8MiB to 4MiB to fit into 32bit address space. This is still enough
> for the XHCI PCI device.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> This fixes the issue observed on ARM 32bit after upgrading the RPi4
> firmware files, described some time ago here:
> https://lists.denx.de/pipermail/u-boot/2021-February/442317.html

This also fixes an issue we are seeing in Home Assistant:
https://github.com/home-assistant/operating-system/issues/1490

It does seem that it depends on the binary size (since USB enumeration
worked with 2021.04 at one point, but after enabling more configurations
it caused issues).

So:
Tested-by: Stefan Agner <stefan@agner.ch>

I've seen that this did not make it into master yet, which tree is this
expected to get merged through?

--
Stefan


> ---
>  arch/arm/mach-bcm283x/init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
> index 49027ce0a2..9803499985 100644
> --- a/arch/arm/mach-bcm283x/init.c
> +++ b/arch/arm/mach-bcm283x/init.c
> @@ -14,7 +14,7 @@
>  #include <asm/global_data.h>
>  
>  #define BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS	0x600000000UL
> -#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x800000UL
> +#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x400000UL
>  
>  #ifdef CONFIG_ARM64
>  #include <asm/armv8/mmu.h>
> @@ -148,7 +148,7 @@ int mach_cpu_init(void)
>  
>  #ifdef CONFIG_ARMV7_LPAE
>  #ifdef CONFIG_TARGET_RPI_4_32B
> -#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT	0xff800000UL
> +#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT	0xffc00000UL
>  #include <addr_map.h>
>  #include <asm/system.h>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base
  2021-06-17  9:22 ` [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base Marek Szyprowski
                     ` (2 preceding siblings ...)
  2021-09-03 14:23   ` Stefan Agner
@ 2021-09-15 11:22   ` Matthias Brugger
  3 siblings, 0 replies; 5+ messages in thread
From: Matthias Brugger @ 2021-09-15 11:22 UTC (permalink / raw)
  To: Marek Szyprowski, u-boot
  Cc: Sylwester Nawrocki, Jaehoon Chung, Bartlomiej Zolnierkiewicz,
	Nicolas Saenz Julienne, Stefan Agner



On 17/06/2021 11:22, Marek Szyprowski wrote:
> Move the XHCI PCI device base up in the virtual address space. This fixes
> initialization failure observed with newer Raspberry Pi firmware, later
> than 63b1922311 ("firmware: arm_loader: Update armstubs with those from
> PR 117). It looks that chosing 0xff800000 as the XHCI PCI device base
> conflicts with the updated ARM/VideoCore firmware.
> 
> This also requires to reduce the size of the mapped PCI device region
> from 8MiB to 4MiB to fit into 32bit address space. This is still enough
> for the XHCI PCI device.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Queued in rpi-next now.

Thanks,
Matthias

> ---
> This fixes the issue observed on ARM 32bit after upgrading the RPi4
> firmware files, described some time ago here:
> https://lists.denx.de/pipermail/u-boot/2021-February/442317.html
> ---
>   arch/arm/mach-bcm283x/init.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-bcm283x/init.c b/arch/arm/mach-bcm283x/init.c
> index 49027ce0a2..9803499985 100644
> --- a/arch/arm/mach-bcm283x/init.c
> +++ b/arch/arm/mach-bcm283x/init.c
> @@ -14,7 +14,7 @@
>   #include <asm/global_data.h>
>   
>   #define BCM2711_RPI4_PCIE_XHCI_MMIO_PHYS	0x600000000UL
> -#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x800000UL
> +#define BCM2711_RPI4_PCIE_XHCI_MMIO_SIZE	0x400000UL
>   
>   #ifdef CONFIG_ARM64
>   #include <asm/armv8/mmu.h>
> @@ -148,7 +148,7 @@ int mach_cpu_init(void)
>   
>   #ifdef CONFIG_ARMV7_LPAE
>   #ifdef CONFIG_TARGET_RPI_4_32B
> -#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT	0xff800000UL
> +#define BCM2711_RPI4_PCIE_XHCI_MMIO_VIRT	0xffc00000UL
>   #include <addr_map.h>
>   #include <asm/system.h>
>   
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-15 11:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20210617092207eucas1p2fba39144e5d4890a23ba70f794a25b79@eucas1p2.samsung.com>
2021-06-17  9:22 ` [PATCH] ARM: bcm283x: change the virtual address of the XHCI PCI device base Marek Szyprowski
2021-06-17 21:44   ` Jaehoon Chung
2021-06-18  9:00   ` nicolas saenz julienne
2021-09-03 14:23   ` Stefan Agner
2021-09-15 11:22   ` Matthias Brugger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.