| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
CONFIG_MMU_EARLY has been removed. Remove the remaining occurences of
this option.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, a lot of code handles dma_addr_t values as if they actually
hold CPU addresses. However, this is not always true. For example, MIPS
architecture requires an explicit conversion from the physical address
space to some virtual address space segment to get a valid CPU-side
pointer. Another issue is that DMA ranges that may be specified in a
device tree will not work this way. To get from a virtual address to a
dma handle and vice versa we need to add/subtract some offset, which is
calculated from "dma-ranges" property. Only dma_map_single() was doing
this, but dma_sync_single_for_*() also should.
Improve the interface by adding 'struct device' as the first argument to
the dma_sync_single_for_*(). This allows to do cpu_to_dma/dma_to_cpu()
conversions in common code and call into arch-specific code with proper
cpu-side addresses. To make things more clear, make the virtual address
argument of those arch-side functions be properly represented with a
void* type.
Apply the required changes in device drivers that use the affected
functions, making them pass the appropriate device pointer.
Signed-off-by: Denis Orlov <denorl2009@gmail.com>
Link: https://lore.barebox.org/20230604215002.20240-2-denorl2009@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
Currently arch specific headers can be included with
longer possible as there won't be a single mach anymore.
Move all bcm283x specific header files to include/mach/bcm283x/ to
prepare for multi-arch support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The mini uart (Pins 8/10) is the primary UART on the Raspberry Pi 4 and
can be set up in firmware by specifying enable_uart=1 in the config.txt.
Add a DEBUG_LL implementation to use this for early debugging.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-20-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With basic driver support added in previous commits, add the boilerplate
to have barebox-raspberry-pi.img usable as bootloader for the Raspberry Pi 4
in 64-Bit mode. Tested peripherals:
- SD-Card
- pinctrl
- clocksource
- mini-UART
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-19-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our Raspberry Pi clock driver is a hack, but it works well enough for
older Rpis and just needs one more clock to support the SD-Card on the
Raspberry Pi 4, so add that. In return, we remove bcm2835-cs, which we
won't use on Raspberry Pi 4, because we'll leverage the ARM architected
timer instead.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-16-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Early MMU setup in 64-bit Raspberry Pi 3 barebox hangs, while normal
setup concludes normally. Until this is figured out, disallow build
of 64-Bit Raspberry Pi 3 support while CONFIG_MMU_EARLY=y.
This issue doesn't affect the Raspberry Pi 4.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-15-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Have the subarch select the needed symbols to display a 32-bit/64-bit
menu and hide the boards that aren't capable of 64-bit when
CONFIG_64BIT=y. Building for 64-bit throws some warning about mismatched
type sizes, so fix those as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-14-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new image that can be booted on all supported boards. This work by
including DTs for all enabled boards in config and then consulting the
mailbox interface at runtime to deduce which DT to pass to barebox
proper. An alternative would have been to use the existing
barebox-dt-2nd.img with a VideoCore-supplied device tree, but that has
the drawback of requiring barebox to observe the same bindings as the
kernel that's booted later. This approach makes migration
straight-forward, because no difference in VideoCore configuration is
required.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-8-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
We'll add a generic image containing multiple DTs in a follow-up commit,
which would benefit from compressing the DTs. For uniformity, compress
the existing DTs as well to save some kilobytes there.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
barebox uses DT to find out the base address of the mailbox. For the
generic image, we need to use the mailbox interface to find out which DT
to use. Resolve the chicken-egg problem by hardcoding a list of mailbox
base addresses and selecting the correct one by looking up the CPU ID
and using that to deduce the Raspberry Pi SoC type.
Note that this is incompatible with arm_peri_high=1.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-5-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
We will repurpose core.c in a later commit. It has a single function
similar in spirit to bcm2835_register_fb which lives in a header, so
move it there too.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609055922.667016-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
barebox used to apply quirks by asking VideoCore firmware. If this was
not possible, an error message is printed, but other initialization
happened as expected. With the move to board driver matched by DT, we
incur two breakages:
- Compute Module 3/3+ used to be explicitly supported, but are absent
in new compatible list
- Unsupported variants used to initialize with only an error message,
but now their revision ID must be known
Fix this by amending the compatible list with all non-Raspberry Pi 4
compatibles listed in the binding. We also make existence of a match
data optional and error out if it doesn't exist. This is so far unused,
but it conveys the intent for future users.
Fixes: c062cd5cf47d ("ARM: rpi: validate devicetree compatible instead of changing model name")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220502142959.1325298-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we have multiple driver depending on the bcm2835 mbox. Since
the probe dependency currently can't be solved properly we have
different issue depending with or without deep-probe.
To make it work with and without deep-probe, we need to init MBOX on
first request.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://lore.barebox.org/20220203104552.3158202-3-o.rempel@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To verify only Kconfig/Makefile is touched:
git show --numstat --format=oneline HEAD | grep -v 'Kconfig\|Makefile'
will print only arch/powerpc/Kbuild.
To verify nothing unexpected is added:
git show -U0 | grep '^-[^-]\|^+[^+]' | sort -u
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220103120539.1730644-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
We don't have a clock driver for the raspberry pi, so board code needs
to list which used devices have clocks that are already known to be active
on boot. The Mini UART is one such device. We already wave away the
clock on the BCM2836, do the same for the BCM2835 as well.
Cc: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
We have several macros for a oneline driver registration. Add some
missing and use them consistently where possible througout the tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97
("Remove the CREDITS file"). Remove references to it from several files.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
This makes sure that during a mailbox transfer no other mailbox transfer
is started. This happens on a raspberrypi3 where one GPIO on the
firmware GPIO controller (which is controlled via mailbox) is registered
as a heartbeat LED. With this it can happen that during a mailbox
transfer the poller which drives the heartbeat LED is triggered in
is_timeout() which results in corrupted transfers.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
To give the user an idea where the messages come from.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Taken from the kernel adopted to barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Not all messages return a valid response as they do not send a response
at all. This is at least true for the SET_GPIO_STATE and SET_GPIO_CONFIG
messages.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Raspberry Pi Compute Module 3+ was released in January 2019.
Source for the new board revision code:
https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
Signed-off-by: Tomaz Solc <tomaz.solc@tablix.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The raspberry pi 3 comes up with the mini UART as default, so allow to
use it for debug_ll output.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In contrast to other architectures, R.Pi debug UART config was placed
under the "System Type" menu, not under the "Debugging -> low-level
debugging port". This made this setting easy to miss when enabling low
level debug mesages.
While at it use the existing base address defines rather than defining
them again in Kconfig.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Move defines to header file to make them reusable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Compute Module needs "no-sd" property on the MMC interface otherwise
mci-bcm2835 hangs on SD card probe.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't know if the firmware running on the raspberry pi is the same firmware
which is running on all bcm283x devices.
Therefore move the console clock initialization into the rpi-common.c board file.
A future commit will use this function to retrieve the miniuart clock from the
raspberry pi firmware.
No functional changes.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Raspberry Pi Zero W is basically a Raspberry Pi 1 B+
but on a smaller PCB and with Bluetooth and WiFi.
See:
https://elinux.org/RPi_Hardware
This patch adds support for Raspberry Pi Zero W to barebox.
Signed-off-by: Chris Fiege <chris@tinyhost.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
Commit 7e497d48acbd1184e3f6bd23bd16dfae84dd1129 introduced a name change which
breaks support for the fixed clkdev for uart and sdhci for RPI.
Use clkdev_add_physbase instead to be independant from the device tree names.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
This adds basic support at the same feature level as the other
supported raspberry pi boards.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Signed-off-by: Enrico Joerns <ejo@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Roland Hieber <r.hieber@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
Move out of architecture code and add some real watchdog functionality.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
This commit switches the RaspberryPi arch over to probe Barebox
from the builtin DT and enables multi-image builds.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
To let the user select the right base, when building multi-image.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Makes more space available for the malloc area and will allow
to switch to multi-image later on.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
This way it can be probed from DT later on.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
In prepareation for devicetree probing.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
This patch adds Raspberry Pi 2 support in barebox. The features should
be the same like the current RPi status in barebox.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch change the align of mbox stack resource to 32. The reason is
that I had some experience with bcm2836 and the mbox implementation,
after setting the align to 64(on bcm2836) the issues was gone.
I found these values inside the u-boot implementation, they use 32
(bcm2835) and 64 (bcm2836).
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
This patch changes the most part of mach-bcm2835 to mach-bcm283x. This
prepares to add RPi2 support which is a bcm2836. This patch changes the
Kconfig entry namens to BCM283X for drivers only. These drivers should
working the same in bcm2836.
While updating defconfig I added LED support/trigger option.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|