From 33041972727e84d3f95e26c83322521f61827584 Mon Sep 17 00:00:00 2001 From: Matthias Brugger Date: Mon, 12 Apr 2021 15:38:51 +0200 Subject: arm: dts: bcm283x: Add minimal smbios information At present SMBIOS tables are empty, which breaks some use-cases that rely on that. Add some minimal information to fulfill this. Signed-off-by: Matthias Brugger --- arch/arm/dts/bcm283x-u-boot.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm/dts/bcm283x-u-boot.dtsi b/arch/arm/dts/bcm283x-u-boot.dtsi index 68d0362..22c67c4 100644 --- a/arch/arm/dts/bcm283x-u-boot.dtsi +++ b/arch/arm/dts/bcm283x-u-boot.dtsi @@ -6,6 +6,25 @@ * (C) Copyright 2016 Fabian Vogt */ +/ { + smbios { + compatible = "u-boot,sysinfo-smbios"; + smbios { + system { + manufacturer = "raspberrypi"; + product = "rpi"; + }; + baseboard { + manufacturer = "raspberrypi"; + product = "rpi"; + }; + chassis { + manufacturer = "raspberrypi"; + }; + }; + }; +}; + &uart0 { skip-init; u-boot,dm-pre-reloc; -- cgit v1.1 From 1bc00bc74b91efc96ccdafc5921812f1be3e1659 Mon Sep 17 00:00:00 2001 From: Matthias Brugger Date: Mon, 12 Apr 2021 15:38:52 +0200 Subject: configs: rpi: Enable SMBIOS sysinfo driver Enable this driver to allow U-Boot to get SMBIOS table information from a device tree node. Signed-off-by: Matthias Brugger Acked-by: Fabian Vogt --- configs/rpi_0_w_defconfig | 2 ++ configs/rpi_2_defconfig | 2 ++ configs/rpi_3_32b_defconfig | 2 ++ configs/rpi_3_b_plus_defconfig | 2 ++ configs/rpi_3_defconfig | 2 ++ configs/rpi_4_32b_defconfig | 2 ++ configs/rpi_4_defconfig | 2 ++ configs/rpi_arm64_defconfig | 2 ++ configs/rpi_defconfig | 2 ++ 9 files changed, 18 insertions(+) diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig index dfa7253..d17e102 100644 --- a/configs/rpi_0_w_defconfig +++ b/configs/rpi_0_w_defconfig @@ -28,6 +28,8 @@ CONFIG_DM_ETH=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_KEYBOARD=y diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig index 9001e2b..8b8affb 100644 --- a/configs/rpi_2_defconfig +++ b/configs/rpi_2_defconfig @@ -28,6 +28,8 @@ CONFIG_DM_ETH=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_KEYBOARD=y diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig index a2a44aa..b867b7f 100644 --- a/configs/rpi_3_32b_defconfig +++ b/configs/rpi_3_32b_defconfig @@ -30,6 +30,8 @@ CONFIG_DM_ETH=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_KEYBOARD=y diff --git a/configs/rpi_3_b_plus_defconfig b/configs/rpi_3_b_plus_defconfig index e34302d..043665c 100644 --- a/configs/rpi_3_b_plus_defconfig +++ b/configs/rpi_3_b_plus_defconfig @@ -30,6 +30,8 @@ CONFIG_DM_ETH=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_KEYBOARD=y diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig index c48ec9c..3cebd65 100644 --- a/configs/rpi_3_defconfig +++ b/configs/rpi_3_defconfig @@ -30,6 +30,8 @@ CONFIG_DM_ETH=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_KEYBOARD=y diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig index b1503e9..b813d04 100644 --- a/configs/rpi_4_32b_defconfig +++ b/configs/rpi_4_32b_defconfig @@ -40,6 +40,8 @@ CONFIG_DM_RESET=y CONFIG_DM_RNG=y CONFIG_RNG_IPROC200=y # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig index 9375885..de2658a 100644 --- a/configs/rpi_4_defconfig +++ b/configs/rpi_4_defconfig @@ -40,6 +40,8 @@ CONFIG_DM_RESET=y CONFIG_DM_RNG=y CONFIG_RNG_IPROC200=y # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_DM_USB_GADGET=y CONFIG_USB_XHCI_HCD=y diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig index 6b18a8c..f90107e 100644 --- a/configs/rpi_arm64_defconfig +++ b/configs/rpi_arm64_defconfig @@ -35,6 +35,8 @@ CONFIG_DM_RESET=y CONFIG_DM_RNG=y CONFIG_RNG_IPROC200=y # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_XHCI_PCI=y diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig index 48ed929..af2189b 100644 --- a/configs/rpi_defconfig +++ b/configs/rpi_defconfig @@ -28,6 +28,8 @@ CONFIG_DM_ETH=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_GENERIC is not set # CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y CONFIG_USB=y CONFIG_USB_DWC2=y CONFIG_USB_KEYBOARD=y -- cgit v1.1 From d28e127171768c618fb4d03ec4d3249527d7dccd Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Thu, 17 Jun 2021 11:22:03 +0200 Subject: ARM: bcm283x: change the virtual address of the XHCI PCI device base 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 Reviewed-by: Jaehoon Chung Reviewed-by: Nicolas Saenz Julienne Tested-by: Stefan Agner Signed-off-by: Matthias Brugger --- 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 49027ce..9803499 100644 --- a/arch/arm/mach-bcm283x/init.c +++ b/arch/arm/mach-bcm283x/init.c @@ -14,7 +14,7 @@ #include #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 @@ -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 #include -- cgit v1.1 From acc6987e59137485dbac0ee4a07cc349210954f3 Mon Sep 17 00:00:00 2001 From: "Ivan T. Ivanov" Date: Tue, 10 Aug 2021 16:31:14 +0200 Subject: rpi: Conditionally add simple-framebuffer node It appears that RPi firmware has already added framebuffer node under /chosen, at least on RPi 2 versions. So check for this and don't add duplicate node. Signed-off-by: Ivan T. Ivanov Signed-off-by: Matthias Brugger --- board/raspberrypi/rpi/rpi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index df52a46..372b26b 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -497,12 +497,11 @@ void *board_fdt_blob_setup(void) int ft_board_setup(void *blob, struct bd_info *bd) { - /* - * For now, we simply always add the simplefb DT node. Later, we - * should be more intelligent, and e.g. only do this if no enabled DT - * node exists for the "real" graphics driver. - */ - lcd_dt_simplefb_add_node(blob); + int node; + + node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer"); + if (node < 0) + lcd_dt_simplefb_add_node(blob); #ifdef CONFIG_EFI_LOADER /* Reserve the spin table */ -- cgit v1.1