aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-bcm283x/include
AgeCommit message (Collapse)AuthorFilesLines
2020-12-13dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass1-2/+2
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-10Merge tag 'rpi-next-2020.10' of ↵Tom Rini2-0/+20
https://gitlab.denx.de/u-boot/custodians/u-boot-raspberrypi - add support for PCI and XHCI for RPi4 (64 bit only) - optionally reset XHCI device on registration - enable USB_KEYBOARD for rpi_4_defconfig
2020-07-10rpi4: add a mapping for the PCIe XHCI controller MMIO registers (ARM 32bit)Marek Szyprowski1-0/+8
Create a non-cacheable mapping for the 0x600000000 physical memory region, where MMIO registers for the PCIe XHCI controller are instantiated by the PCIe bridge. Due to 32bit limit in the CPU virtual address space in ARM 32bit mode, this region is mapped at 0xff800000 CPU virtual address. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2020-07-10arm: rpi: Add function to trigger VL805's firmware loadNicolas Saenz Julienne2-0/+20
On the Raspberry Pi 4, after a PCI reset, VL805's (a xHCI chip) firmware may either be loaded directly from an EEPROM or, if not present, by the SoC's VideCore (the SoC's co-processor). Introduce the function that informs VideCore that VL805 may need its firmware loaded. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-05-18common: Drop linux/bug.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-11-24ARM: bcm283x: Move BCM283x_BASE to a global variableMatthias Brugger5-4/+28
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 <mbrugger@suse.com>
2019-10-31lib: time: Add microsecond timerMarek Vasut1-3/+0
Add get_timer_us(), which is useful e.g. when we need higher precision timestamps. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> [trini: Fixup arch/arm/mach-bcm283x/include/mach/timer.h] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-09-06ARM: bcm283x: Include definition for additional emmc clockAndrei Gherzan1-0/+1
This clock has a different mbox ID so have this included in the relevant header file. Signed-off-by: Andrei Gherzan <andrei@balena.io> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2019-09-06ARM: bcm283x: Add BCM283x_BASE defineMatthias Brugger4-20/+4
Devices of bcm283x have different base address, depending if they are on bcm2835 or bcm2836/7. Use BCM283x_BASE depending on the SoC you want to build and only add the offset in the header files. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Andrei Gherzan <andrei@balena.io>
2019-09-06ARM: bcm283x mbox: Fix send status registerFabian Vogt1-2/+5
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: Fabian Vogt <fvogt@suse.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> [mb: rename registers and update commit message] Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2019-06-12ARM: bcm283x: Fix definition of MBOX_TAG_TEST_PIXEL_ORDERBerkus Decker1-1/+1
The MBOX_TAG_TEST_PIXEL_ORDER define is incorrect. According to official documentation it has a slightly different numbering. Correct mailbox constants are defined in e.g. linux raspberry-firmware https://code.woboq.org/linux/linux/include/soc/bcm2835/raspberrypi-firmware.h.html#RPI_FIRMWARE_FRAMEBUFFER_TEST_PIXEL_ORDER These are obtained from the bcm2835 documentation e.g. https://github.com/raspberrypi/firmware/wiki/Mailbox-property-interface#test-pixel-order Fix the define to get us back in sync with the spec. Signed-off-by: Berkus Decker <berkus+github@metta.systems> [agraf: clarify subject, extend commit message] Signed-off-by: Alexander Graf <agraf@csgraf.de> [mb: updating email of agraf] Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini6-12/+6
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 <trini@konsulko.com>
2018-04-05mmc: use core clock frequency in bcm2835 sdhostJonathan Gray1-1/+2
In raspberrypi-firmware 7fdcd00e00a42a1c91e8bd6f5eb8352fe9358557 and later start.elf now sets the EMMC clock to 200 MHz. According to Phil Elwell in https://github.com/raspberrypi/firmware/issues/953 the SDHost controller shares the core/VPU clock and doesn't use the EMMC clock. Use the core clock id when determining the frequency to allow U-Boot to work with recent versions of raspberrypi-firmware. Otherwise U-Boot hangs at: U-Boot 2018.03 (Mar 14 2018 - 20:36:00 +1100) DRAM: 948 MiB RPI 3 Model B (0xa02082) MMC: mmc@7e202000: 0, sdhci@7e300000: 1 Loading Environment from FAT... Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-01-28bcm283x: Add pinctrl driverAlexander Graf1-2/+0
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 <agraf@suse.de>
2017-05-09video: arm: rpi: Move the video settings out of the driverSimon Glass1-0/+17
Add a function to set the video parameters to the msg handler and remove it from the video driver. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
2017-05-09video: arm: rpi: Move the video query out of the driverSimon Glass1-0/+9
Add a function to get the video size to the msg handler and remove it from the video driver. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
2017-05-09arm: rpi: Add a function to obtain the MMC clockSimon Glass1-0/+7
Move this code into the new message handler file. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-09arm: rpi: Add a file to handle messagesSimon Glass1-0/+18
The bcm283x chips provide a way for the ARM core to communicate with the graphics processor, which is in charge of many things. This is handled by way of a message prototcol. At present the code for sending message (and receiving a reply) is spread around U-Boot, primarily in the board file. This means that sending a message from a driver requires duplicating the code. Create a new message implementation with a function to support powering on a subsystem as a starting point. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-09arm: rpi: Drop the GPIO device addressesSimon Glass1-5/+0
We can rely on the device tree to provide this information. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-11-28ARM: bcm283x: Implement EFI RTS reset_systemAlexander Graf1-1/+1
The rpi has a pretty simple way of resetting the whole system. All it takes is to poke a few registers at a well defined location in MMIO space. This patch adds support for the EFI loader implementation to allow an OS to reset and power off the system when we're outside of boot time. Signed-off-by: Alexander Graf <agraf@suse.de>
2016-09-06bcm2835_gpio: Implement GPIOF_FUNCAlexander Graf1-0/+2
So far we could only tell the gpio framework that a GPIO was mapped as input or output, not as alternative function. This patch adds support for determining whether a function is mapped as alternative. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
2016-03-27ARM: bcm283x: don't always define CONFIG_BCM2835Stephen Warren5-5/+5
Currently, CONFIG_BCM2835 is defined for all BCM283x builds and _BCM2836 is defined when building for that SoC. That means there isn't a single define that means "exactly BCM2835". This will complicate future patches where BCM2835-vs-anything-else needs to be determined simply. Modify the code to define one or the other of CONFIG_BCM2835/BCM2836 so future patches are simpler. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-02-24rpi: set board serial number in environmentLubomir Rintel1-0/+11
Gets propagated into the device tree and then into /proc/cpuinfo where users often expect it. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Reviewed-by: Stephen Warren <swarren@wwwdotorg.org>
2015-12-05rpi: get rid of BCM2835_BOARD_REV_* macrosStephen Warren1-28/+0
There are two numbering schemes for the RPi revision values; old and new scheme. The values within each scheme overlap. Hence, it doesn't make sense to have absolute/global names for the revision IDs. Get rid of the names and just use the raw revision/type values to set up the array of per-revision data. This change makes most sense when coupled with the next change. However, it's split out so that the mechanical cut/paste is separate from the logic changes for easier review and problem bisection. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2015-10-19ARM: rpi: add another revision of Raspberry Pi A+Lubomir Rintel1-0/+1
Seen this one in the wild. Is labelled "Raspberry Pi Model A+ V1.1, (C) Raspberry Pi 2014". A standard A+ board, much like the one with version 0x12, didn't notice any differencies. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2015-08-12arm/mach-bcm283x/mbox: Flush and invalidate dcache when using fw mailboxAlexander Stein1-0/+3
When using dcache the setup data for the mailbox must be actually written into memory before calling into firmware. Thus flush and invalidate the memory. Signed-off-by: Alexander Stein <alexanders83@web.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Tested-by: Stephen Warren <swarren@wwwdotorg.org>
2015-05-28ARM: bcm283x: Reorder timer.hMarek Vasut1-5/+10
Reorder the timer.h file so it can be included from board config file. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Tyler Baker <tyler.baker@linaro.org>
2015-05-28ARM: bcm283x: Repair wdog.hMarek Vasut1-2/+2
Trivially fix the include check in wdog.h. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Tyler Baker <tyler.baker@linaro.org>
2015-04-13ARM: rpi: add a couple more revision IDsStephen Warren1-1/+3
According to Gordon Henderson's WiringPi library, there are some more Pi revision IDs out there. Add support for them. http://git.drogon.net/?p=wiringPi;a=blob_plain;f=wiringPi/wiringPi.c;hb=5edd177112c99416f68ba3e8c6c4db6ed942e796 At least ID 0x13 is out in the wild: Reported-by: Chee-Yang Chau <cychau@gmail.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2015-03-28ARM: bcm283x: move SoC headers to mach-bcm283x/include/machMasahiro Yamada5-0/+677
Move arch/arm/include/asm/arch-bcm283x/* -> arch/arm/mach-bcm283x/include/mach/* Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org>