| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
sdhci_write32 accepts the register as second argument, not third.
Fix this up.
Fixes: 075179763a ("mci: sdhci: add Atmel SDHCI (sama5d2, sam9x60) support")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Those regulators are needed by other devices. Probe them early.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The PMIC provides regulators, which are needed before other
devices can probe.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Some i2c device want to be coredevices. Add a macro to avoid
boilerplate code.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Command timeouts are sometimes a normal operating condition
(for example when probing whether the connected card is SD or MMC),
so we don't want to print an error message for all of them. Move
those messages to the debug level, the MCI core will print some
more meaningful messages on most command errors anyways.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
No other MCI does retry failing commands on its own (if at all
this should be done by the MCI core). Remove the retry, as we
don't want to paper over board level issues.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| | |
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| | |
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since Linux v5.1, the pinctrl driver can use the st,package property
if provided to validate whether the ball to be configured exists
on the package. The upstream device trees provide this property,
but if we'll want barebox to supply it instead, so we can use the same
barebox binary for different SoC variants.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
BSEC_SMC_READ_SHADOW and BSEC_SMC_WRITE_SHADOW aren't fields, but
operations to apply on fields. Rename it accordingly and fix up instances
where it was used wrongly.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Setting the NVMEM stride to 4 means we can't have nvmem cells pointing
at odd addresses. Linux sets it to 1 instead and handles reads at
unaligned addresses by splitting them up to aligned chunks. Copy over
the code to do the same. Unaligned writes remain illegal.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
To facilitate using the same barebox binary for multiple variants of the
STM32MP15x, have it fix up the CPU device tree nodes.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Revision A was 0x1000 and B was 0x2000, so I assumed the next would
be revision C valued 0x3000. Alas, it's revision Z with 0x2001...
Change the code accordingly and add detection for the new 800Mhz
profiles.
Code taken from U-Boot commit
cf0818b477 ("stm32mp1: support of STM32MP15x Rev.Z") and
Patch[1] "stm32mp1: add 800 MHz profile support".
[1]: https://st-md-mailman.stormreply.com/pipermail/uboot-stm32/2020-February/002170.html
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bsec_read_field returns a negative value on error, pass it along
signed. This doesn't matter now, because we ignore the error code, but
it's the correct thing to do.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When probing from the device tree use the device tree provided clock
lookups. So far we only used the clock lookups based on the physical
base address of the device, but these should go sooner or later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Boards supporting device tree have to make sure OFTREE and OFDEVICE are
selected. Add a convenience option pulling in the right options and
select it from the boards.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The enet_out clock gate is wrongly abstracted. The bit it is controlling
is not just a bit to enable the clock, it also controls the direction of
the ethernet reference clock. When the bit is cleared, the ethernet
reference clock must be fed into the SoC from an external oscillator;
when it's set then the ethernet reference clock is generated internally.
The correct setting depends on the board, so we must not set the bit
unconditionally during probe of the clock driver. Whether or not the
clock is enabled can be selected by the board by removing the clock from
the FEC in its dts.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When a mandatory clock is missing we have to return with an error. Just
breaking out of the loop results in ignoring the error.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The ptp clock doesn't exist on all SoCs, make it optional. In fact it
was optional before due to a bug in the driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |\ \ \ |
|
| |\ \ \ \ |
|
| |\ \ \ \ \
| | | |_|_|/
| | |/| | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
While some support is still missing (USB, LCD), we already have some
prerequisites in place like USB PHY and PWM (for backlight). We also have
gained one new board and some other new drivers since the last time the
defconfig was touched, so enable them all, as well as some possibly useful
commands.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
While the regulator is indeed powered by the PMIC, basically the whole
system is, and it's always on. Linux doesn't handle this specially
however and will defer SDMMC probe till after the PMIC is probed costing
us some valuable boot time. Fix this up.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |_|/
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This adds support for the Linux Automation GmbH MC-1 board built around
the Octavo Systems OSD32MP157C-512M SiP.
The device tree is based on the one in linux-stm32/stm32-next, which
will probably be merged for Linux v5.8-rc1. Instead of waiting that
long, we import it here with some stuff removed/changed, so it's usable
for both barebox and Linux, without the prerequisite patches.
The non-barebox specific parts have been moved into separate DTSIs
(arch/arm/dts/stm32mp{157c-lxa-mc1,15xx-osd32}.dtsi), so both can be
dropped after the v5.8-rc1 sync with only include path change necessary
in arch/arm/dts/stm32mp157c-lxa-mc1.dts.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |\ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We already support Ethernet and QSPI on the SAMA5D2, but MMC was so far
missing. Port over the at91bootstrap driver to barebox. Some parts are
based on the U-Boot and Linux implementations.
To support future use in PBL, the driver model and driver implementation
parts are split into separate files with the latter being compilable for PBL
as well.
Registers, which are found in the common Linux sdhci.h have been added
to the barebox sdhci.h. Registers which appear to be Atmel specific have
been added to atmel-sdhci-common.c instead.
The driver still misses some parts, which will follow later:
- ADMA is unsupported, PIO only for now
- Only the SD/MMC controller already enabled by the first stage
bootloader is supported. Further clocking changes appear
to be necessary to enable another
Both can be retrofitted later on and don't hold us back from booting
from MMC.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
With Atmel SDHCI support incoming, we'll want the cards to have
predictable names. Extend the sama5d2.dtsi with an /aliases node.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
SDHCI reset is common between many SDHCI variants. Add a library
function, so it can be reused.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The sdhci_readN accessors don't lend themselves for clean use with
readx_poll_timeout because they accept two arguments. Add
a sdhci-specific helper, so the sdhci drivers can cut down on the
timeout loop boilerplate.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
barebox adoption of Linux commit:
| commit 5f5323a14cad19323060a8cbf9d96f2280a462dd
| Author: Dejin Zheng <zhengdejin5@gmail.com>
| Date: Mon Mar 23 23:05:51 2020 +0800
|
| iopoll: introduce read_poll_timeout macro
|
| this macro is an extension of readx_poll_timeout macro. the accessor
| function op just supports only one parameter in the readx_poll_timeout
| macro, but this macro can supports multiple variable parameters for
| it. so functions like phy_read(struct phy_device *phydev, u32 regnum)
| and phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum) can
| also use this poll timeout core. and also expand it can sleep some time
| before read operation.
|
| Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
| Signed-off-by: David S. Miller <davem@davemloft.net>
Also, implement readx_poll_timeout using read_poll_timeout.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |\ \ \ \ |
|
| |\ \ \ \ \ |
|
| |\ \ \ \ \ \
| | |_|_|/ / /
| |/| | | | | |
|
|\ \ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Needed to automatically detect the SD card when it contains the barebox
environment.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The MXS AUART is in the kernel known as "ttyAPP". Set the Linux console
name to make automatic setting of the console= Kernel parameter work.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Enable more features:
- USB support
- wd command
- ubiformat
- regulator command
Changes:
- Disable all consoles (they are enabled using stdout-path property)
- Do not probe MMC/SD cards during probe
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The existing i.MX chipidea support can be used for i.MX28 as well. The
main difference is that the i.MX28 doesn't have a usbmisc unit, so the
bulk of this patch makes this unit optional in the driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The imx-usb-phy needs a small delay on i.MX28, otherwise the
stmp_reset_block() fails. Add this delay unconditionally as it doesn't
seem to be worth it to limit the delay on this platform.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Add a filetype for i.MX23/28 SD card images so that they can be
detected.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Adoption of U-Boot commit:
| commit b4a2cdc13ed886b981e8fcd3087293ba9296f17f
| Author: Marek Vasut <marex@denx.de>
| Date: Tue Oct 15 18:26:57 2019 +0200
|
| arm: mxs: Increase VDDD voltage to match specification
|
| According to IMX28CEC rev. 4, 10/2018, Table 15. Recommended Operating
| Conditions, page 16, the VDDD should be set to 1.55V when the CPU is
| operating at 454MHz. This is the case in U-Boot, hence increase the
| VDDD voltage. This fixes instability when performing TFTP transfers.
| Increase the brownout threshold to 1.4V. The documentation recommends
| 1.45V setting for the brownout, however, this triggers failure during
| power block init, so keep the brownout slightly lower.
|
| Signed-off-by: Marek Vasut <marex@denx.de>
| Cc: Stefano Babic <sbabic@denx.de>
| Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
When probing from the device tree use the device tree provided clock
lookups. So far we only used the clock lookups based on the physical
base address of the device, but these should go sooner or later.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The USB clocks are missing, add them to make USB work as part of the
i.MX chipidea driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The device tree clock lookups use the position in the clks array,
hence they must match. fec_sleep is a barebox specific clock and
is in between other clocks. Put the clock at the end of the array.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|