| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
The Linux dts files have all network interfaces enabled. We have
to disable the ones that are unused.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The barebox partition on the SD card starts at offset 0x1000, so the
partition node should be named partition@1000.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds support for reading the EEPROM which has a "NXID" data
structure on it. The MAC addresses for the ethernet devices are
found here which are registered with this patch.
The NXID data structure is also found on other NXP Layerscape boards,
so once we support other boards the code should be moved somewhere
where it can be shared between boards.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The ls1046ardb only has one EEPROM instead of two and this is a 24c04
(which spans two addresses on the I2C bus) and not a 24c512.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Enable the PCIe nodes on the ls1046ardb board. U-Boot registers the PCIe
devices based on the SERDES configuration, but for us it's easier to
just enable them in the device tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
The upstream dts file has a "spansion,m25p80" as compatible string
for the SPI NOR flashes. This doesn't match the real chip which
identifies itself as "s25fl512s". The driver warns about this. Change
the compatible to "jedec,spi-nor" to avoid such issues.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Add a barebox update handler for easy barebox update.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
barebox and its environment should be in the first MiB of the SD card.
With this we won't overwrite any partitions from the partition table.
While at it add a barebox partition for a future update handler.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
| |
Fixes: 06928c7d1758 (mfd: da9053: use new reset_source_set_device)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Those are results of the Zynq image build, don't clobber the
git status output.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Inside mdio_register, a read of the PHY's id register is attempted.
If it fails, we print an error message with eqos_err, which uses the
ethernet device's unique name, but at this time there has been none set,
because eth_register was not yet called. Fix this by using the MDIO bus
device instead.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't be using the MAC including the MDIO controller while the clocks
are off, but this is exactly the case when mdio_register is called and
the interface is not yet up. To allow reading the PHY id to succeed
before the interface is up, turn on the clocks as part of the
initialization in the probe.
This fixes following error at probe time:
ERROR: <NULL>: MDIO not idle at entry
The NULL is fixed in a follow-up commit.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Specifying ->halt only means that it's called along with eth_unregister.
If we want to halt the DMA, we will have to call it ourselves in the
remove callback. Do this.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
The kwbimage detection calculates a checksum over the first 31 bytes of
the image. This is correct for the v0 image format, but for the v1 image
format the checksum in the image also covers the extenstion headers.
These might not be completely present in the initial buffer provided to
file_detect_type(), so just drop the checksum calculation for v1 images.
Fixes: bf8b6d46db ("kwbimage_v0: add support to detect and boot a mvebu v0 image")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
When phy_get() returns -ENOSYS or -ENODEV it means we can go without
phy. Do not print an error message in this case.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
designware_eqos.c contains an eqos_stop implementation to stop the NIC
when halting the interface. Unfortunately it wasn't used leading to
memory corruption on boot, possibly due to DMA. Fix this.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
| |
am335x_sdram_size() may be called when we are not running at the
address we are linked at. This means tree switch conversions and
jump tables will not work. Disable these in the CFLAGS for this
file.
This fixes a crash in am335x_sdram_size() with newer gcc versions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Since Kernel commit 5b63fb90adb9 ("ARM: dts: Fix incomplete dts data for
am3 and am4 mmc") (barebox commit 419db1f984 ("dts: update to
v5.3-rc7")) the AM33xx MMC2 controller is unconditionally enabled in the
dts. This has the effect that the driver probes for this device and then
can't access the registers as the clock is disabled. Enable the clock to
let the driver probe successfully.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
On i.MX6 with HAB enabled we call into the ROM later in
imx6_hab_get_status(). This only works when the XN bit is not set for
this area, so remap the first MiB as cached which doesn't have the XN
bit set.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The bitstream header has 5 fields, that start with a char for the type.
Four fields have a big-ending length and a null-terminated string for
the design name, the part number, and the date and time of creation. The
last field is a big-endian 32 bit unsigned int for the size of the
bitstream.
Print this info when loading the bitstream.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The driver provides functionalities to check and load a bitstream to FPGA.
A boolean parameter to check if FPGA is already programmed is
added.
Signed-off-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Port functions from xlnx-linux to get FPGA status and invoke bitstream
loading.
Signed-off-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| | |
Signed-off-by: Thomas Haemmerle <thomas.haemmerle@wolfvision.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The watchdog resets the system if the watchdog gets pinged to fast.
Between each watchdog ping must be a pause of at least 200ms. This
commit fixes that by rejecting two fast requests.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The TWDSCALE is the found scale + 1 as described in the datasheets
for the DA9062/3 devices. The driver logic is correct just the debug
message is wrong.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
timeout_curr is the timeout programmed into the watchdog hardware every
500 milliseconds. If watchdog poller support is disabled, it still
shows up as a configurable device parameter, but has no effect.
Improve user experience by having it show up only if watchdog poller
support was compiled in. This is already the case for the autoping
parameter. The timeout_max parameter is a generic parameter and will
remain unchanged.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
timeout_curr is the timeout programmed into the watchdog hardware every
500 milliseconds. If watchdog poller support is disabled, it serves
no purpose, prefix it with poller_ to better communicate this fact.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The barebox watchdog poller uses the struct watchdog.timeout_cur as
the timeout value to configure the watchdog with.
There's no need for the device driver to set this. I didn't know that
when I wrote the drivers, but I do now, hence this commit.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
So far, wd has always configured the highest-priority watchdog when
multiple are available. Add an optional -d parameter to support
configuring the other watchdogs as well. The name passed can be either
the watchdog device name (e.g. wdog0) or the hardware device name (e.g.
efi-wdt).
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
So far watchdog users could only configure the watchdog with the highest
priority. In preparation for having the wd command configure a watchdog
by name, extend watchdog_set_timeout with a struct watchdog *parameter
and export functions to query default watchdog and to find watchdog by
name.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
8f4cf30903 ("watchdog: Allow multiple watchdogs") introduced the ability
to set a per-watchdog priority from within drivers, which is usually
populated with of_get_watchdog_priority.
For debugging, it can be useful to query and override this priority on
the fly. Provide a device parameter to do so.
As watchdog_get_default only considers priorities > 0, it makes sense
to have a newly set priority of 0 disable the watchdog.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The barebox EFI documentation notes:
> Current linux kernel (v5.0) will execute ExitBootServices() during the
> early boot stage and thus will automatically disable the (U)EFI watchdog.
> Since it is the proper behavior according to the (U)EFI specification, it
> is impossible to protect full boot chain by using this watchdog only.
> It is recommended to use an alternative hardware watchdog
Heed the advice and bump down the EFI watchdog priority below the
watchdog priority default.
This ensures the EFI watchdog isn't inadvertently used if other
watchdogs are registered.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
55da0cf1 ("efi: add support for initrd loading") introduced support for
the Linux v3.6+ handover protocol[1]. As part of this change a x86 cli
(Clear Interrupt Flag) instruction was introduced just prior to the jump
into the kernel's EFI handover protocol entry point.
While the normal Linux x86 boot protocols require that interrupts are
masked on entry, this doesn't apply to the EFI stub, because the EFI
stub itself is the one implementing the boot protocol and as such
masks the interrupts itself[2].
EFI watchdogs may, and often are, implemented using a timer interrupt.
Dropping the cli will allow monitoring the boot of the kernel up to it
calling ExitBootServices.
In absence of a hardware watchdog, this is the only watchdog available
to users with EFI 1.0+, so it seems prudent to not make it even more
useless.
[1]: https://www.kernel.org/doc/Documentation/x86/boot.txt
[2]: Linux v5.4-rc4, arch/x86/boot/compressed/eboot.c
Cc: Michael Olbrich <mol@pengutronix.de>
Fixes: 55da0cf1 ("efi: add support for initrd loading")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The UEFI specification paragraph quoted above notes:
> The watchdog timer is only used during boot services. On successful
> completion of ExitBootServices() the watchdog timer is disabled.
Thus disabling the watchdog is _the_ only proper behavior. Adjust the
wording accordingly.
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ARM TF-A reports compatibility with PSCI v1.1 since v1.5. Upstream
ARM TF-A support for STM32MP was introduced with v1.6.
It's thus safe to assume that the STM32MP barebox will never have to
interact with a secure monitor implementing PSCI v0.1.
Overwrite the psci device tree compatible to specify v0.2. This is the
first version that implements PSCI_VERSION, which allows the barebox
psci client driver selected in this commit to query the actual PSCI
version and fix it up into the device tree.
This fixes an issue where resetting via PSCI fails in Linux because the
upstream device tree compatible:
reboot: Restarting system
Reboot failed -- System halted
Reported-by: Michael Olbrich <mol@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We'll probably be using compressed DTBs for all new boards as well, thus
move the ARM_USE_COMPRESSED_DTB, so it's always selected for STM32MP.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
System reset on the STM32MP may be done via PSCI when running TF-A
as first-stage boot loader. Provide a PSCI driver to simplify using it:
- A psci_invoke function is exported, so other code can use it
- A fixup for the PSCI device tree node is registered
- A reset and poweroff handler via PSCI is registered for PSCI >= v0.2
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The smc command has a help defined, but unused. Wire it in, so
help smc and smc -invalidoption work as expected.
While at it, remove the unimplemented -z option. It's unneeded,
because -c turns off the CPU after starting it again already.
Also it seems it's not implementable without interprocessor communication,
which is probably overkill here.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There's already an option to use when debugging PSCI. Instead of
requiring users to #define DEBUG 1 as well, have the smc command be
usable when CONFIG_ARM_PSCI_DEBUG, not DEBUG is defined.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For more usability, translate CPU_ON error codes into the error
descriptions found in the PSCI Platform Design Document[1].
[1]: http://infocenter.arm.com/help/topic/com.arm.doc.den0022d/Power_State_Coordination_Interface_PDD_v1_1_DEN0022D.pdf
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The STPMIC1 is the ST Microelectronics PMIC designed for use with
STM32MP. Enable it and its cell drivers by default in the defconfig.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This node has so far been unused and is a remnant from when the stm32mp
device drivers weren't completely upstream yet. Drop the node.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit imports the Linux v5.3 state of the driver. This allows us
to regulate at least the v3v3 voltage rail used by the DK1 and DK2
Ethernet PHY and SD-Card. Eventually, this driver should be used by the
USB host driver to supply the vbus voltage as well.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When we call regmap_init, the regmap is associated with the device
supplied and can be queried with dev_get_regmap. This is more natural
than expecting cell drivers to cast dev->parent->priv. Do it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The incoming stpmic1 regulator driver makes use of these helpers
internally. Thus port them out of Linux v5.3.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|