11 Dec, 2019

2 commits

  • 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 dram_init_banksize.

    Fixes: 5694090670 ("ARM: defconfig: add unified config for RPi3 and RPi4")

    Signed-off-by: Matthias Brugger

    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 default values defined in the spec, we can end up with wrong RAM
    bank information.

    Switch to the "standard" way to update the RAM bank information to
    avoid this.

    Fixes: 9de5b89e4c ("rpi4: enable dram bank initialization")

    Signed-off-by: Matthias Brugger

    Matthias Brugger
     

03 Dec, 2019

1 commit


24 Nov, 2019

2 commits

  • 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

    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:
    board/raspberrypi/rpi/rpi.c:317:(.text.board_get_usable_ram_top+0x8):
    relocation truncated to fit: R_AARCH64_LDST64_ABS_LO12_NC against symbol
    `fw_dtb_pointer' defined in .text section in board/raspberrypi/rpi/built-in.o

    Signed-off-by: Matthias Brugger

    Matthias Brugger
     

01 Oct, 2019

1 commit

  • 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 whole
    range of available memory.

    Signed-off-by: Matthias Brugger

    Matthias Brugger
     

07 Sep, 2019

2 commits


12 Aug, 2019

2 commits


29 Mar, 2019

1 commit

  • 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
    Reviewed-by: Heinrich Schuchardt
    Reviewed-by: Alexander Graf

    Matthias Brugger
     

15 Feb, 2019

1 commit

  • Add Raspberry Pi Compute Module 3+ to list of models, the revision code
    is 0x10 according to the list on raspberrypi.org.

    v2: Use the same dtb name as CM3 as CM3+ is a drop in replacement
    for CM3.

    Signed-off-by: Jonathan Gray
    Reviewed-by: Alexander Graf
    Signed-off-by: Matthias Brugger

    Jonathan Gray
     

04 Dec, 2018

2 commits


11 Sep, 2018

1 commit

  • In int-ll64.h, we always use the following typedefs:

    typedef unsigned int u32;
    typedef unsigned long uintptr_t;
    typedef unsigned long long u64;

    This does not need to match to the compiler's .
    Do not include it.

    The use of PRI* makes the code super-ugly. You can simply use
    "l" for printing uintptr_t, "ll" for u64, and no modifier for u32.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

09 Apr, 2018

1 commit

  • In order that we can use eth_env_* even when CONFIG_NET isn't set, move
    these functions to environment code from net code.

    This fixes failures such as:

    board/ti/am335x/built-in.o: In function `board_late_init':
    board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
    u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

    which caters for use cases such as:

    commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
    variable")

    when Ethernet is required in Linux, but not U-Boot.

    Signed-off-by: Alex Kiernan

    Alex Kiernan
     

06 Apr, 2018

1 commit

  • In the model table for the new revision code encoding documented in
    https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
    add the entries for old models with the new scheme and add CM3 which
    only appears in the new scheme.

    A device tree for CM3 is not currently upstreamed in linux. When that
    happens the name will likely have to be adjusted in the table.

    Signed-off-by: Jonathan Gray
    Signed-off-by: Alexander Graf

    Jonathan Gray
     

05 Apr, 2018

1 commit


15 Feb, 2018

1 commit


29 Jan, 2018

2 commits

  • We are switching to a model where our board file can directly fail probing
    of serial devices when they're not usable, so remove the current runtime
    hack we have.

    Signed-off-by: Alexander Graf

    Alexander Graf
     
  • The bcm283x family of SoCs have a GPIO controller that also acts as
    pinctrl controller.

    This patch introduces a new pinctrl driver that can actually properly mux
    devices into their device tree defined pin states and is now the primary
    owner of the gpio device. The previous GPIO driver gets moved into a
    subdevice of the pinctrl driver, bound to the same OF node.

    That way whenever a device asks for pinctrl support, it gets it
    automatically from the pinctrl driver and GPIO support is still available
    in the normal command line phase.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

04 Dec, 2017

1 commit


16 Aug, 2017

4 commits


09 Jul, 2017

1 commit


10 May, 2017

6 commits


24 Jan, 2017

1 commit


29 Nov, 2016

3 commits


22 Nov, 2016

1 commit

  • Raspberry firmware used to pass a FDT blob at a fixed address (0x100),
    but this is not true anymore. The address now depends on both the
    memory size and the blob size [1].

    If one wants to passthrough this FDT blob to the kernel, the most
    reliable way is to save its address from the r2/x0 register in the
    U-Boot entry point and expose it in a environment variable for
    further processing.

    This patch just does this:
    - save the provided address in the global variable fw_dtb_pointer
    - expose it in ${fdt_addr} if it points to a a valid FDT blob

    There are many different ways to use it. One can, for example, use
    the following script which will extract from the tree the command
    line built by the firmware, then hand over the blob to a previously
    loaded kernel:

    fdt addr ${fdt_addr}
    fdt get value bootargs /chosen bootargs
    bootz ${kernel_addr_r} - ${fdt_addr}

    Alternatively, users relying on sysboot/pxe can simply omit any FDT
    statement in their extlinux.conf file, U-Boot will automagically pick
    ${fdt_addr} and pass it to the kernel.

    [1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&t=134018

    Signed-off-by: Cédric Schieli
    Acked-by: Stephen Warren

    Cédric Schieli
     

07 Sep, 2016

1 commit

  • On the raspberry pi, you can disable the serial port to gain dynamic frequency
    scaling which can get handy at times.

    However, in such a configuration the serial controller gets its rx queue filled
    up with zero bytes which then happily get transmitted on to whoever calls
    getc() today.

    This patch adds detection logic for that case by checking whether the RX pin is
    mapped to GPIO15 and disables the mini uart if it is not mapped properly.

    That way we can leave the driver enabled in the tree and can determine during
    runtime whether serial is usable or not, having a single binary that allows for
    uart and non-uart operation.

    Signed-off-by: Alexander Graf
    Acked-by: Stephen Warren
    Reviewed-by: Simon Glass

    Alexander Graf