[PATCH] MAINTAINERS: add RaspberryPi co-maintainer

2022-11-30 Thread matthias . bgg
From: Matthias Brugger Peter accpeted to step up as a co-maintainer for the RPis. Reflect that in the corresponding MAINTAINERS files. Signed-off-by: Matthias Brugger --- MAINTAINERS | 1 + board/raspberrypi/rpi/MAINTAINERS | 1 + 2 files changed, 2 insertions(+) diff

[PATCH] doc: board: raspberrypi: Add documentation

2022-03-14 Thread matthias . bgg
From: Matthias Brugger Add documentation about the different configuration files for the RaspberryPi board family. Signed-off-by: Matthias Brugger --- doc/board/raspberrypi/index.rst | 10 + doc/board/raspberrypi/raspberrypi.rst | 53 +++ 2 files changed, 63

[PATCH v2 2/2] configs: rpi: Enable SMBIOS sysinfo driver

2021-04-12 Thread matthias . bgg
From: Matthias Brugger 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 --- Changes in v2: - fix typo in commit message configs/rpi_0_w_defconfig | 2 ++ configs/rpi_2_defconfig|

[PATCH v2 1/2] arm: dts: bcm283x: Add minimal smbios information

2021-04-12 Thread matthias . bgg
From: Matthias Brugger 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 --- Changes in v2: - drop product from chassi - fix typo in commit message

[PATCH 2/2] configs: rpi: Enable SMBIOS sysinfo driver

2021-04-09 Thread matthias . bgg
From: Matthias Brugger Enalbe this driver to allow U-Boot to get SMBIOS table information from a device tree node. Signed-off-by: Matthias Brugger --- configs/rpi_0_w_defconfig | 2 ++ configs/rpi_2_defconfig| 2 ++ configs/rpi_3_32b_defconfig| 2 ++

[PATCH 1/2] arm: dts: bcm283x: Add minimal smbios information

2021-04-09 Thread matthias . bgg
From: Matthias Brugger At present SMBIOS tables are emtpy, which breaks some use-cases that rely on that. Add some minimal information to fullfill this. Signed-off-by: Matthias Brugger --- arch/arm/dts/bcm283x-u-boot.dtsi | 20 1 file changed, 20 insertions(+) diff

[PATCH v2] smbios: Fix table when no string is present

2021-04-06 Thread matthias . bgg
From: Matthias Brugger When no string is present in a table, next_ptr points to the same location as eos. When calculating the string table length, we would only reserve one \0. By spec a SMBIOS table has to end with two \0\0 when no strings a present. Signed-off-by: Matthias Brugger ---

[PATCH] smbios: Fix table when no string is present

2021-03-17 Thread matthias . bgg
From: Matthias Brugger When no string is present in a table, next_ptr points to the same location as eos. When calculating the string table length, we would only reserve one \0. By spec a SMBIOS table has to end with two \0\0 when no strings a present. Signed-off-by: Matthias Brugger ---

[PATCH 2/2] configs: rpi4_32: Enable iProc RNG200

2021-02-26 Thread matthias . bgg
From: Matthias Brugger Enable the RNG driver for RPi4 with 32 bit. Signed-off-by: Matthias Brugger --- configs/rpi_4_32b_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig index 0a5d3ff8cd..91eeb3cd32 100644 ---

[PATCH 1/2] rng: iproc_rng200: Enable support for RPi4 armv7

2021-02-26 Thread matthias . bgg
From: Matthias Brugger On the RPi4 armv7 build we have the situationt that we use physical addresses of 64 bit, while the virtual addresses are 32 bit. Remap the base address in this scenario via map_physmem(). Signed-off-by: Matthias Brugger --- drivers/rng/iproc_rng200.c | 8 1

[PATCH] MAINTAINERS: Update info for Raspberry Pi

2021-02-26 Thread matthias . bgg
From: Matthias Brugger Add RPi config files and custodian repository. Signed-off-by: Matthias Brugger --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index b82b7adbeb..15929bf4ee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@

[PATCH 2/2] configs: RPi2: Disable EFI Grub workaround

2021-02-16 Thread matthias . bgg
From: Matthias Brugger The EFI Grub workaround isn't needed with Grub version 2.04 or higher. This version was published over a year ago, so disable the workaround to reduce boot time. Signed-off-by: Matthias Brugger --- configs/rpi_2_defconfig | 1 + 1 file changed, 1 insertion(+) diff

[PATCH 1/2] configs: BPI-R2: Disable EFI Grub workaround

2021-02-16 Thread matthias . bgg
From: Matthias Brugger The EFI Grub workaround on BananaPi R2 slows down the boot process to the point, that the watchdog will trigger a reboot before the kernel can reset it. Fix this by disabeling the workaround. Signed-off-by: Matthias Brugger --- configs/mt7623n_bpir2_defconfig | 1 + 1

[RFC PATCH] efi_loader: disable GRUB workaround by default

2021-02-09 Thread matthias . bgg
From: Matthias Brugger GRUB version 2.04 was published over a year ago. We should expect that distros use this version now. So disable the workaround by default. As we know that i.MX6 CPUs lack proper handling of caches, enable the workaround on these only. Signed-off-by: Matthias Brugger ---

[PATCH] fs: btrfs: Select SHA256 in Kconfig

2021-01-27 Thread matthias . bgg
From: Matthias Brugger Since commit 565a4147d17a ("fs: btrfs: Add more checksum algorithms") btrfs uses the sha256 checksum algorithm. But Kconfig lacks to select it. This leads to compilation errors: fs/built-in.o: In function `hash_sha256': fs/btrfs/crypto/hash.c:25: undefined reference to

[PATCH] board: mediatek: disable watchdog on BananaPi R2

2021-01-07 Thread matthias . bgg
From: Matthias Brugger Watchdog timeout comes in before we are able to load the kernel and reset the watchdog. Disable the watchdog late in the boot process to be able to boot the board. Signed-off-by: Matthias Brugger --- board/mediatek/mt7623/mt7623_rfb.c | 8

[PATCH v3 2/2] net: Use NDRNG device in srand_mac()

2020-12-18 Thread matthias . bgg
From: Matthias Brugger When calling srand_mac we use a weak seed dependent on the mac address. If present, use a RNG device instead to incerase entropy. Signed-off-by: Matthias Brugger --- Changes in v3: - use IS_ENABLED instead of #if Changes in v2: - fix dm_rng_read() parameters - add

[PATCH v3 1/2] lib: uuid: use RNG device if present

2020-12-18 Thread matthias . bgg
From: Matthias Brugger When calculating a random UUID we use a weak seed. Use a RNG device if present to increase entropy. Signed-off-by: Matthias Brugger --- Changes in v3: - use IS_ENABLED instead of #if - use 4 byte for entropy Changes in v2: - fix dm_rng_read() parameters - add missing

[PATCH v3 0/2] Use RNG to get random behaviour

2020-12-18 Thread matthias . bgg
From: Matthias Brugger For now bootp and uuid code use a weak seed for generating random data. U-Boot as support for RNG devices now, so we should change to code to use them if they are present. This will help mitigate issues like seen in CVE-2019-11690. Changes in v3: - use IS_ENABLED instead

[PATCH v2 2/2] net: Use NDRNG device in srand_mac()

2020-12-16 Thread matthias . bgg
From: Matthias Brugger When calling srand_mac we use a weak seed dependent on the mac address. If present, use a RNG device instead to incerase entropy. Signed-off-by: Matthias Brugger --- Changes in v2: - fix dm_rng_read() parameters - add missing include file net/net_rand.h | 19

[PATCH v2 1/2] lib: uuid: use RNG device if present

2020-12-16 Thread matthias . bgg
From: Matthias Brugger When calculating a random UUID we use a weak seed. Use a RNG device if present to increase entropy. Signed-off-by: Matthias Brugger --- Changes in v2: - fix dm_rng_read() parameters - add missing include lib/uuid.c | 21 ++--- 1 file changed, 18

[PATCH v2 0/2] Use RNG to get random behaviour

2020-12-16 Thread matthias . bgg
From: Matthias Brugger For now bootp and uuid code use a weak seed for generating random data. U-Boot as support for RNG devices now, so we should change to code to use them if they are present. This will help mitigate issues like seen in CVE-2019-11690. Changes in v2: - fix dm_rng_read()

[PATCH 2/2] net: Use NDRNG device in srand_mac()

2020-12-16 Thread matthias . bgg
From: Matthias Brugger When calling srand_mac we use a weak seed dependent on the mac address. If present, use a RNG device instead to incerase entropy. Signed-off-by: Matthias Brugger --- net/net_rand.h | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git

[PATCH 1/2] lib: uuid: use RNG device if present

2020-12-16 Thread matthias . bgg
From: Matthias Brugger When calculating a random UUID we use a weak seed. Use a RNG device if present to increase entropy. Signed-off-by: Matthias Brugger --- lib/uuid.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/uuid.c b/lib/uuid.c index

[PATCH 0/2] Use RNG to get random behaviour

2020-12-16 Thread matthias . bgg
From: Matthias Brugger For now bootp and uuid code use a weak seed for generating random data. U-Boot as support for RNG devices now, so we should change to code to use them if they are present. This will help mitigate issues like seen in CVE-2019-11690. Matthias Brugger (2): lib: uuid: use

[PATCH v2 2/2] config: Enable iProc RNG200 driver in RPi4 configs

2020-12-15 Thread matthias . bgg
From: Matthias Brugger We find the iProc RNG200 in the Raspberry Pi 4. Add it to all it's config so that it can be used. Signed-off-by: Matthias Brugger --- Changes in v2: - fix defconfigs using savedefconfig (Heinrich) configs/rpi_4_32b_defconfig | 2 ++ configs/rpi_4_defconfig | 2 ++

[PATCH v2 1/2] rng: Add iProc RNG200 driver

2020-12-15 Thread matthias . bgg
From: Matthias Brugger Add support for random number generator RNG200. This is for example found on RPi4. Signed-off-by: Matthias Brugger --- Changes in v2: None drivers/rng/Kconfig| 6 ++ drivers/rng/Makefile | 1 + drivers/rng/iproc_rng200.c | 186

[PATCH 2/2] config: Enable iProc RNG200 driver in RPi4 configs

2020-12-14 Thread matthias . bgg
From: Matthias Brugger We find the iProc RNG200 in the Raspberry Pi 4. Add it to all it's config so that it can be used. Signed-off-by: Matthias Brugger --- configs/rpi_4_32b_defconfig | 1 + configs/rpi_4_defconfig | 1 + configs/rpi_arm64_defconfig | 1 + drivers/rng/iproc_rng200.c |

[PATCH 1/2] rng: Add iProc RNG200 driver

2020-12-14 Thread matthias . bgg
From: Matthias Brugger Add support for random number generator RNG200. This is for example found on RPi4. Signed-off-by: Matthias Brugger --- drivers/rng/Kconfig| 6 ++ drivers/rng/Makefile | 1 + drivers/rng/iproc_rng200.c | 186 + 3

[PATCH] config: Enable USB Keyboard suuport on RPi4 32 bit

2020-07-12 Thread matthias . bgg
From: Matthias Brugger Supporting USB keyboards out of the box is both handy for development and production. Notably if u-boot is used to boot into GRUB. This patch adds USB keyboard support for 32 bit RPi4 config. Signed-off-by: Matthias Brugger --- configs/rpi_4_32b_defconfig | 1 + 1

[PATCH] configs: rpi: set NR_DRAM_BANKS to four

2020-05-29 Thread matthias . bgg
From: Matthias Brugger With the new RPi4 which has 8 GB of RAM, we can have up to four DRAM banks. Bump up the configuration files to detect all the memory in U-Boot. Signed-off-by: Matthias Brugger --- configs/rpi_4_32b_defconfig | 2 +- configs/rpi_4_defconfig | 2 +-

[PATCH 1/2] mmc: sdhci: Use debug for not supported SDMA info message

2020-05-12 Thread matthias . bgg
From: Matthias Brugger If CONFIG_MMC_SDHCI_SDMA is enabled but the HW could not support it, we no longer error out. Instead we do not enable it in the host. Change the output from printf to debug as this isn't an error but only additional information now. Signed-off-by: Matthias Brugger ---

[PATCH 2/2] configs: rpi_arm64: enable SDHCI SDMA support

2020-05-12 Thread matthias . bgg
From: Matthias Brugger RPi4 supports SDMA on it's SDHCI controller. Enable to option for the combine RPi3/4 config. Signed-off-by: Matthias Brugger --- configs/rpi_arm64_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/rpi_arm64_defconfig b/configs/rpi_arm64_defconfig

[PATCH v1 2/3] watchdog MediaTek add upstream compatible

2020-04-25 Thread matthias . bgg
From: Matthias Brugger The upstream compatible is called mt6589-wdt. Add this compatible to the driver. Signed-off-by: Matthias Brugger --- drivers/watchdog/mtk_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index

[PATCH v1 3/3] arm: enable distro boot for bananapi-r2

2020-04-25 Thread matthias . bgg
From: Matthias Brugger This patch enables distro boot for the bananapi-r2, based on a MediaTek mt7623n. Signed-off-by: Matthias Brugger --- configs/mt7623n_bpir2_defconfig | 3 ++- include/configs/mt7623.h| 24 2 files changed, 22 insertions(+), 5

[PATCH v1 1/3] timer MediaTek use upstream compatible

2020-04-25 Thread matthias . bgg
From: Matthias Brugger The timers compatible string in upstream is called mt6577-timer. Add this compatible to the driver. Signed-off-by: Matthias Brugger --- drivers/timer/mtk_timer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/timer/mtk_timer.c b/drivers/timer/mtk_timer.c

[PATCH 0/2] Reading size-cells and address-cells from a node should walk up the

2020-04-08 Thread matthias . bgg
From: Matthias Brugger parent stack to find the property. This is reflected through comments in the code, but actually not implemented. This leads to the fact that some DTBs worked by accident. Fix this by walking the tree when reading this properties. After fixing the default size-cells

[PATCH 2/2] dm: core: Walk the tree to find address- and size-cells properties

2020-04-08 Thread matthias . bgg
From: Matthias Brugger Walk the tree when reading size-cells or address-cells properties. Reported-by: Robin Randhawa Signed-off-by: Matthias Brugger --- drivers/core/ofnode.c | 8 include/dm/ofnode.h | 36 include/dm/read.h | 6 ++

[PATCH 1/2] libfdt: Make fdt_cells function accessible

2020-04-08 Thread matthias . bgg
From: Matthias Brugger For reading address-cells and size-cells, the libfdt only provides functions which do not return in case the node does not provide the property. For traversing the DT to find the parent node which provides this property we will need to know that. Make fdt_cells accessible

[PATCH] configs: rpi: Set phy auto negotiation

2020-01-30 Thread matthias . bgg
From: Matthias Brugger Lower timeout for PHY auto negotiation as otherwise we have to wait for far too long. Signed-off-by: Matthias Brugger --- include/configs/rpi.h | 8 1 file changed, 8 insertions(+) diff --git a/include/configs/rpi.h b/include/configs/rpi.h index

[PATCH v4 1/2] Kconfig: add btrfs to distro boot

2020-01-17 Thread matthias . bgg
From: Matthias Brugger Some distributions use btrfs as the default file system. Enable btrfs support by default when using distro boot for all architectures but riscv, as it breaks compilation due to size problems. Signed-off-by: Matthias Brugger --- Changes in v4: - do not build for MIPS

[PATCH v4 2/2] configs: Re-sync with CONFIG_DISTRO_DEFAULTS

2020-01-17 Thread matthias . bgg
From: Matthias Brugger CONFIG_DISTRO_DEFAULTS now enables CMD_BTRFS by default, we can delete the config option in the corresponding default configs. Other boards won't build with btrfs enabled so disable the support by default. Signed-off-by: Matthias Brugger --- Changes in v4: - disable

[PATCH] buildman: Enable buildman on aarch64 hosts

2020-01-17 Thread matthias . bgg
From: Matthias Brugger At kernel.org aarch64 toolchains are published in folder arm64. Fix the URL for that case, so that we can fetch toolchains on aarch64 machines. Signed-off-by: Matthias Brugger --- tools/buildman/toolchain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v3 2/2] configs: Re-sync with CONFIG_DISTRO_DEFAULTS

2020-01-16 Thread matthias . bgg
From: Matthias Brugger CONFIG_DISTRO_DEFAULTS now enables CMD_BTRFS by default, we can delete the config option in the corresponding default configs. Signed-off-by: Matthias Brugger --- Changes in v3: None Changes in v2: None configs/sandbox64_defconfig| 1 - configs/sandbox_defconfig

[PATCH v3 1/2] Kconfig: add btrfs to distro boot

2020-01-16 Thread matthias . bgg
From: Matthias Brugger Some distributions use btrfs as the default file system. Enable btrfs support by default when using distro boot for all architectures but riscv, as it breaks compilation due to size problems. Signed-off-by: Matthias Brugger --- Changes in v3: - use imply instead of

[PATCH v2 1/2] Kconfig: add btrfs to distro boot

2020-01-15 Thread matthias . bgg
From: Matthias Brugger Some distributions use btrfs as the default file system. Enable btrfs support by default when using distro boot for all architectures but riscv, as it breaks compilation due to size problems. Signed-off-by: Matthias Brugger --- Changes in v2: - disable default btrfs

[PATCH v2 2/2] configs: Re-sync with CONFIG_DISTRO_DEFAULTS

2020-01-15 Thread matthias . bgg
From: Matthias Brugger CONFIG_DISTRO_DEFAULTS now enables CMD_BTRFS by default, we can delete the config option in the corresponding default configs. Signed-off-by: Matthias Brugger --- Changes in v2: None configs/sandbox64_defconfig| 1 - configs/sandbox_defconfig | 1 -

[PATCH 2/2] configs: Re-sync with CONFIG_DISTRO_DEFAULTS

2020-01-09 Thread matthias . bgg
From: Matthias Brugger CONFIG_DISTRO_DEFAULTS now enables CMD_BTRFS by default, we can delete the config option in the corresponding default configs. Signed-off-by: Matthias Brugger --- configs/sandbox64_defconfig| 1 - configs/sandbox_defconfig | 1 - configs/turris_mox_defconfig

[PATCH 1/2] Kconfig: add btrfs to distro boot

2020-01-09 Thread matthias . bgg
From: Matthias Brugger Some distributions use btrfs as the default file system. Enable btrfs support by default when using distro boot. Signed-off-by: Matthias Brugger --- Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/Kconfig b/Kconfig index 99cc56f3c2..ced0e3021e 100644 ---

[PATCH v2 1/3] rpi: fix dram bank initialization

2019-12-05 Thread matthias . bgg
From: Matthias Brugger To update the dram bank information from device-tree we use fdtdec_decode_ram_size() which expectes the the size-cells and address-cells to be defined in the memory node. For normal system RAM these values are defined in the root node. When the values differ from the

[PATCH v2 2/3] rpi: Enable DRAM bank initialization on arm64

2019-12-05 Thread matthias . bgg
From: Matthias Brugger Up to now we only update the DRAM banks when we are define CONFIG_BCM2711. But our one binary approach uses a config that supports BCM2837 and BCM2711. As a result we only see one gibibyte of RAM on Raspberry Pi 4, even if it has more RAM. Fix this by calling

[PATCH v2 3/3] ARM: defconfig: Fix 32bit config for RPi4

2019-12-05 Thread matthias . bgg
From: Matthias Brugger The rpi_4_32b_defconfig states that only one DRAM bank is present. This leads to a wrong configuration of the available DRAM. Fix this by setting the DRAM bank config accordingly. Fixes: 193279d784 ("RPI: Add defconfigs for rpi4 (32/64)") Signed-off-by: Matthias Brugger

[PATCH 1/2] rpi: fix dram bank initialization

2019-12-04 Thread matthias . bgg
From: Matthias Brugger To update the dram bank information from device-tree we use fdtdec_decode_ram_size() which expectes the the size-cells and address-cells to be defined in the memory node. For normal system RAM these values are defined in the root node. When the values differ from the

[PATCH 2/2] rpi: Enable DRAM bank initialization on arm64

2019-12-04 Thread matthias . bgg
From: Matthias Brugger Up to now we only update the DRAM banks when we are define CONFIG_BCM2711. But our one binary approach uses a config that supports BCM2837 and BCM2711. As a result we only see one gigabyte of RAM on Raspberry Pi 4, although it has more RAM. Fix this by calling

[U-Boot] [PATCH v1] MAINTAINERS: Add info for bcm283x

2019-11-27 Thread matthias . bgg
From: Matthias Brugger The bcm283x has grown in files, which was not reflected in the MAINTAINERS file. Fix this by adding the missing entries. Signed-off-by: Matthias Brugger --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[U-Boot] [PATCH v4 2/4] ARM: bcm283x: Move BCM283x_BASE to a global variable

2019-11-19 Thread matthias . bgg
From: Matthias Brugger We move the per SOC define BCM283x_BASE to a global variable. This is a first step to provide a single binary for several bcm283x SoCs. Signed-off-by: Matthias Brugger --- Changes in v4: None Changes in v3: None Changes in v2: - fix register access in reset_cpu()

[U-Boot] [PATCH v4 3/4] ARM: bcm283x: Set rpi_bcm283x_base at run-time

2019-11-19 Thread matthias . bgg
From: Matthias Brugger As part of the effort to create one binary for several bcm83x SoCs we read the IO base address from device-tree. Signed-off-by: Matthias Brugger --- Changes in v4: - read IO base from device-tree Changes in v3: None Changes in v2: - rename BCM2838 to BCM2711 in the

[U-Boot] [PATCH v4 4/4] ARM: bcm283x: Set memory map at run-time

2019-11-19 Thread matthias . bgg
From: Matthias Brugger For bcm283x based on arm64 we also have to change the mm_region. Add assign this in mach_cpu_init() so we can create now one binary for RPi3 and RPi4. Signed-off-by: Matthias Brugger --- Changes in v4: - call rpi_update_mem_map only for ARM64 - get rid of struct pdata

[U-Boot] [PATCH v4 1/4] rpi: push fw_dtb_pointer in the .data section

2019-11-19 Thread matthias . bgg
From: Matthias Brugger The fw_dtb_pointer was defined in the assembly code, which makes him live in section .text_rest Put that's not necessary, we can push the variable in the .data section. This will prevent relocation errors like:

[U-Boot] [PATCH v4 0/4] RPi one binary for RPi3/4 and RPi1/2

2019-11-19 Thread matthias . bgg
From: Matthias Brugger In this series we prepare the RaspberryPi source code to be able to build one binary for RPi[3,4] and one for RPi[1,2]. To achieve this we need to set the IO base address on runtime. Apart from that, for arm64 we also need to set memory region correctly. This patches fix

[U-Boot] [PATCH v3 3/4] ARM: bcm283x: Set rpi_bcm283x_base at run-time

2019-11-12 Thread matthias . bgg
From: Matthias Brugger As part of the effort to create one binary for several bcm83x SoCs we use the SoC compatible to decide which IO base address we use. Signed-off-by: Matthias Brugger --- Changes in v3: None Changes in v2: - rename BCM2838 to BCM2711 in the correct patch - push

[U-Boot] [PATCH v3 4/4] ARM: bcm283x: Set memory map at run-time

2019-11-12 Thread matthias . bgg
From: Matthias Brugger For bcm283x based on arm64 we also have to change the mm_region. Add assign this in mach_cpu_init() so we can create now one binary for RPi3 and RPi4. Signed-off-by: Matthias Brugger --- Changes in v3: None Changes in v2: - Move mem_map out of assembly file - push

[U-Boot] [PATCH v3 2/4] ARM: bcm283x: Move BCM283x_BASE to a global variable

2019-11-12 Thread matthias . bgg
From: Matthias Brugger We move the per SOC define BCM283x_BASE to a global variable. This is a first step to provide a single binary for several bcm283x SoCs. Signed-off-by: Matthias Brugger --- Changes in v3: None Changes in v2: - fix register access in reset_cpu()

[U-Boot] [PATCH v3 0/4] RPi one binary for RPi3/4 and RPi1/2

2019-11-12 Thread matthias . bgg
From: Matthias Brugger In this series we prepare the RaspberryPi source code to be able to build one binary for RPi[3,4] and one for RPi[1,2]. To achieve this we need to set the IO base address on runtime. Apart from that, for arm64 we also need to set memory region correctly. This patches fix

[U-Boot] [PATCH v3 1/4] rpi: push fw_dtb_pointer in the .data section

2019-11-12 Thread matthias . bgg
From: Matthias Brugger The fw_dtb_pointer was defined in the assembly code, which makes him live in section .text_rest Put that's not necessary, we can push the variable in the .data section. This will prevent relocation errors like:

[U-Boot] [PATCH v4 3/3] drivers: bcm283x: Set pre-location flag for OF_BOARD

2019-11-08 Thread matthias . bgg
From: Matthias Brugger U-Boot support on Raspberry Pi 4 relies on the device-tree provided by the firmware. The blob does not contain the U-Boot specific pre-loc-rel properties. The result is, that the U-Boot banner is not printed. We fix this by setting the DM_FLAG_PRE_RELOC flag in the

[U-Boot] [PATCH v4 1/3] fdt: fix bcm283x dm-pre-reloc definitions

2019-11-08 Thread matthias . bgg
From: Matthias Brugger In commmit 143256b353 ("fdt: update bcm283x device tree sources to Linux 5.1-rc6 state") we deleted the label for the node soc from bcm283x.dtsi As we don't need to add the property dm-pre-reloc to the soc node, we can delete it from bcm283x-uboot.dtsi Tested-by: Tom

[U-Boot] [PATCH v4 2/3] arm: dts: bcm283x: Rename U-Boot file

2019-11-08 Thread matthias . bgg
From: Matthias Brugger Rename the file bcm283x-uboot.dtsi so that it get automatically include through the scripts/Makefile.lib using $(CONFIG_SYS_SOC))-u-boot.dtsi Without this uarts and pincontroller miss the property dm-pre-reloc and the first call to bcm283x_mu_serial_ofdata_to_platdata()

[U-Boot] [PATCH v3 3/3] drivers: bcm283x: Set pre-location flag for OF_BOARD

2019-11-07 Thread matthias . bgg
From: Matthias Brugger U-Boot support on Raspberry Pi 4 relies on the device-tree provided by the firmware. The blob does not contain the U-Boot specific pre-loc-rel properties. The result is, that the U-Boot banner is not printed. We fix this by setting the DM_FLAG_PRE_RELOC flag in the

[U-Boot] [PATCH v3 1/3] fdt: fix bcm283x dm-pre-reloc definitions

2019-11-07 Thread matthias . bgg
From: Matthias Brugger In commmit 143256b353 ("fdt: update bcm283x device tree sources to Linux 5.1-rc6 state") we delete the label for the node soc. As we don't need the to add the property dm-pre-reloc to this node, we can delete it fomr bcm283x-uboot.dtsi Tested-by: Tom Rini [RPi 3, 32b and

[U-Boot] [PATCH v2 3/3] drivers: bcm283x: Set pre-location flag for OF_BOARD

2019-11-07 Thread matthias . bgg
From: Matthias Brugger U-Boot support on Raspberry Pi 4 relies on the device-tree provided by the firmware. The blob does not contain the U-Boot specific pre-loc-rel properties. The result is, that the U-Boot banner is not printed. We fix this by setting the DM_FLAG_PRE_RELOC flag in the

[U-Boot] [PATCH v2 1/3] fdt: fix bcm283x dm-pre-reloc definitions

2019-11-07 Thread matthias . bgg
From: Matthias Brugger In commmit 143256b353 ("fdt: update bcm283x device tree sources to Linux 5.1-rc6 state") we delete the label for the node soc. As we don't need the to add the property dm-pre-reloc to this node, we can delete it fomr bcm283x-uboot.dtsi Signed-off-by: Matthias Brugger

[U-Boot] [PATCH] fdt: fix bcm283x dm-pre-reloc definitions

2019-11-07 Thread matthias . bgg
From: Matthias Brugger In commmit 143256b353 ("fdt: update bcm283x device tree sources to Linux 5.1-rc6 state") we accidently deleted the inclution of bcm283x-uboot.dtsi which marks, soc, uarts and pincontroller as dm-pre-reloc Without this definitions the first call to

[U-Boot] [PATCH] ARM: defconfig: add unified config for RPi3 and RPi4

2019-11-06 Thread matthias . bgg
From: Matthias Brugger Provide a defconfig which allows us to boot Raspberrry Pi 4 and Raspberry Pi 3 Model B/B+ Instead of using the embedded DTB as done in RPi3 we use the devicetree provided by the firmware. Signed-off-by: Matthias Brugger --- This patch is based on the series to enable

[U-Boot] [PATCH] pinctrl: bcm283x: Add compatible for RPi4

2019-11-06 Thread matthias . bgg
From: Matthias Brugger The Raspberry Pi 4 upstream kernel device tree instroduces a new compatible for the pinctroller. Add this to the driver so that we can boot with the upstream kernel DT. Signed-off-by: Matthias Brugger --- drivers/pinctrl/broadcom/pinctrl-bcm283x.c | 1 + 1 file

[U-Boot] [PATCH v2 4/4] ARM: bcm283x: Set memory map at run-time

2019-11-05 Thread matthias . bgg
From: Matthias Brugger For bcm283x based on arm64 we also have to change the mm_region. Add assign this in mach_cpu_init() so we can create now one binary for RPi3 and RPi4. Signed-off-by: Matthias Brugger --- Changes in v2: - Move mem_map out of assembly file - push mem_map into the .data

[U-Boot] [PATCH v2 3/4] ARM: bcm283x: Set rpi_bcm283x_base at run-time

2019-11-05 Thread matthias . bgg
From: Matthias Brugger As part of the effort to create one binary for several bcm83x SoCs we use the SoC compatible to decide which IO base address we use. Signed-off-by: Matthias Brugger --- Changes in v2: - rename BCM2838 to BCM2711 in the correct patch - push rpi_bcm283x_base into the

[U-Boot] [PATCH v2 1/4] rpi: push fw_dtb_pointer in the .data section

2019-11-05 Thread matthias . bgg
From: Matthias Brugger The fw_dtb_pointer was defined in the assembly code, which makes him live in section .text_rest Put that's not necessary, we can push the variable in the .data section. This will prevent relocation errors like:

[U-Boot] [PATCH v2 0/4] RPi one binary for RPi3/4 and RPi1/2

2019-11-05 Thread matthias . bgg
From: Matthias Brugger In this series we prepare the RaspberryPi source code to be able to build one binary for RPi[3,4] and one for RPi[1,2]. To achieve this we need to set the IO base address on runtime. Apart from that, for arm64 we also need to set memory region correctly. This patches fix

[U-Boot] [PATCH v2 2/4] ARM: bcm283x: Move BCM283x_BASE to a global variable

2019-11-05 Thread matthias . bgg
From: Matthias Brugger We move the per SOC define BCM283x_BASE to a global variable. This is a first step to provide a single binary for several bcm283x SoCs. Signed-off-by: Matthias Brugger --- Changes in v2: - fix register access in reset_cpu() arch/arm/mach-bcm283x/include/mach/base.h

[U-Boot] [PATCH 3/3] ARM: bcm283x: Set memory map at run-time

2019-09-27 Thread matthias . bgg
From: Matthias Brugger For bcm283x based on arm64 we also have to change the mm_region. Add assign this in mach_cpu_init() so we can create now one binary for RPi3 and RPi4. Signed-off-by: Matthias Brugger --- arch/arm/mach-bcm283x/init.c | 65 +--

[U-Boot] [PATCH 2/3] ARM: bcm283x: Set rpi_bcm283x_base at run-time

2019-09-27 Thread matthias . bgg
From: Matthias Brugger As part of the effort to create one binary for several bcm83x SoCs we use the SoC compatible to decide which IO base address we use. Signed-off-by: Matthias Brugger --- arch/arm/mach-bcm283x/Kconfig | 6 arch/arm/mach-bcm283x/init.c | 60

[U-Boot] [PATCH 1/3] ARM: bcm283x: Move BCM283x_BASE to a global variable

2019-09-27 Thread matthias . bgg
From: Matthias Brugger We move the per SOC define BCM283x_BASE to a global variable. This is a first step to provide a single binary for several bcm283x SoCs. Signed-off-by: Matthias Brugger --- arch/arm/mach-bcm283x/include/mach/base.h | 11 +++

[U-Boot] [PATCH 0/3] RPi one binary for RPi3/4 and RPi1/2

2019-09-27 Thread matthias . bgg
From: Matthias Brugger In this series we prepare the RaspberryPi source code to be able to build one binary for RPi[3,4] and one for RPi[1,2]. To achieve this we need to set the IO base address on runtime. Apart from that, for arm64 we also need to set memory region correctly. This patches fix

[U-Boot] [PATCH v2] rpi4: enable dram bank initialization

2019-09-09 Thread matthias . bgg
From: Matthias Brugger When booting through the efi stub, the memory map get's created by reading the dram bank information. Depending on the version of the RPi4 this information changes. Read the device tree to initialize the dram bank data structure. This way the kernel is able to access the

[U-Boot] [PATCH] rpi4: enable dram bank initialization

2019-09-06 Thread matthias . bgg
From: Matthias Brugger When booting through the efi stub, the memory map get's created by reading the dram bank information. Depending on the version of the RPi4 this information changes. Read the device tree to initialize the dram bank data structure. This way the kernel is able to access the

[U-Boot] [PATCH v2 0/4] Fix default values for address and size cells

2019-09-05 Thread matthias . bgg
From: Matthias Brugger The libftd implementation of U-Boot is outdated with the upstream project. Especially the default number of size-cells was wrong. This series fixes this by backporting the corresponding patches from the upstream project. Changes since v1: - fix spelling of U-Boot (patch 1

[U-Boot] [PATCH v2 4/4] dm: Fix default address cells return value

2019-09-05 Thread matthias . bgg
From: Matthias Brugger Default address cells value on the livetree access function returns the wrong value. Fix this so that the value returned corresponds to the device tree specification. Signed-off-by: Matthias Brugger --- include/dm/of.h | 2 +- 1 file changed, 1 insertion(+), 1

[U-Boot] [PATCH v2 2/4] libfdt: return correct value if #size-cells property is not present

2019-09-05 Thread matthias . bgg
From: Matthias Brugger According to the device tree specification, the default value for was not present. This patch also makes fdt_address_cells() and fdt_size_cells() conform to the behaviour documented in libfdt.h. The defaults are only returned if fdt_getprop() returns -FDT_ERR_NOTFOUND,

[U-Boot] [PATCH v2 3/4] libfdt: Allow #size-cells of 0

2019-09-05 Thread matthias . bgg
From: Matthias Brugger The commit "libfdt: fdt_address_cells() and fdt_size_cells()" introduced a bug as it consolidated code between the helpers for getting be 0, and is frequently found so in practice for /cpus. IEEE1275 only requires implementations to handle 1..4 for #address-cells,

[U-Boot] [PATCH v2 1/4] libfdt: fdt_address_cells() and fdt_size_cells()

2019-09-05 Thread matthias . bgg
From: Matthias Brugger Add internal fdt_cells() to avoid copy and paste. Fix typo in fdt_size_cells() documentation comment. This is based in upstream commit: c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()") but misses the test cases, as we don't implement them in U-Boot.

[U-Boot] [PATCH 1/2] libfdt: fdt_address_cells() and fdt_size_cells()

2019-07-26 Thread matthias . bgg
From: Matthias Brugger Add internal fdt_cells() to avoid copy and paste. Fix typo in fdt_size_cells() documentation comment. This is based in upstream commit: c12b2b0 ("libfdt: fdt_address_cells() and fdt_size_cells()") but misses the test cases, as we don't implement them in u-boot.

[U-Boot] [PATCH 2/2] libfdt: return correct value if #size-cells property is not present

2019-07-26 Thread matthias . bgg
From: Matthias Brugger According to the device tree specification, the default value for was not present. This patch also makes fdt_address_cells() and fdt_size_cells() conform to the behaviour documented in libfdt.h. The defaults are only returned if fdt_getprop() returns -FDT_ERR_NOTFOUND,

[U-Boot] [PATCH] ARM: bcm283x mbox: Fix send status register

2019-07-16 Thread matthias . bgg
From: Fabian Vogt Before we can send a message to the mailbox we have to check that there is space to do so. Therefore we poll the status register. But up to now the wrong status register, the one of mailbox 0, was checked. Fix this by polling the status regiser of mailbox 1. Signed-off-by:

[U-Boot] [PATCH] video: arm: rpi: Bail out early if querying video information fails

2019-07-11 Thread matthias . bgg
From: Fabian Vogt When probing we query for the width and hight of the display. If the firmware does not report any connected display the system will crash. See https://github.com/raspberrypi/firmware/issues/1157 for details. Signed-off-by: Fabian Vogt [mb: update commit message]

[U-Boot] [PATCH] RPi: Add mbrugger as board maintainer

2019-03-28 Thread matthias . bgg
From: Matthias Brugger I took over maintainership from Alex Graf with commit 3157bbfa18 ("rpi: Make Matthias maintainer") But I forgot to update the board maintainer file. This patch adds myself to the game. Signed-off-by: Matthias Brugger --- board/raspberrypi/rpi/MAINTAINERS | 2 +- 1

[U-Boot] [PATCH v2 1/2] efi_loader: Fix serial console size detection

2019-03-05 Thread matthias . bgg
From: Matthias Brugger Function term_read_reply tries to read from the serial console until the end_char was read. This can hang forever if we are, for some reason, not be able to read the full response (e.g. serial buffer too small, frame error). This patch moves the timeout detection into

[U-Boot] [PATCH v2 2/2] efi_loader: Fix possible starving in efi_cin_read_key

2019-03-05 Thread matthias . bgg
From: Matthias Brugger The function efi_cin_read_key can be affected by a loss of a character which will make u-boot to wait forever. Fix this by calling term_get_char instead. Signed-off-by: Matthias Brugger --- Changes in v2: None lib/efi_loader/efi_console.c | 18 -- 1

[U-Boot] [RFC] drivers: serial: Check only input buffers in pending

2019-02-26 Thread matthias . bgg
From: Matthias Brugger Serial device function pending allows to check the state of the input and output buffers. But in fact only a check for the input buffers is used in the device model. There are even some driver which discard a check on the output buffers. So delete the check for the output

[U-Boot] [PATCH] efi_loader: Fix serial console size detection

2019-02-26 Thread matthias . bgg
From: Matthias Brugger Function term_read_reply tries to read from the serial console until the end_char was read. This can hang forever if we are, for some reason, not be able to read the full response (e.g. serial buffer too small, frame error). This patch moves the timeout detection into

  1   2   >