| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The defines in the Barebox copy of imx8mq-reset.h had a typo, which has been fixed
in the upstream Linux version of this file. So depending on include ordering the
reset driver using those defines would fail to compile. Use the typo fixed versions
of the define in the driver and remove the duplicate include file, as we also have
the proper upstream version now.
Reported-by: Giorgio Dal Molin <giorgio.nicole@arcor.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This ports over the Linux v5.6-rc1 state of the driver.
It'll be needed for both EHCI and DWC2 usb connectivity on the stm32mp1.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This driver supports internal regulators (1V1, 1V8, 3V3) in the
STMicroelectronics STM32 chips. Control of these regulators will
be required when adding USB support later on.
Imported here is the Linux v5.6-rc1 state of the driver.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The upstream (v5.6-rc1) device tree node of the stm32mp157c-dk2's OHCI
has a phys property, but not phy-names. We have no API to reference
such a phy easily (passing NULL isn't allowed). Add one.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
barebox already enables/disables the ->pwr regulator at the correct
places, but doesn't assign a value anywhere. Initialize it with the
phy-supply regulator like Linux does.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Linux has since migrated to a new lookup API that lacks the init_data
parameter. As it's unused in barebox, follow suit.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Linux v5.6-rc1 contains 168 references to regultor_bulk_get, which
allows getting multiple regulators to set at once. Instead of open
coding them when porting code, port over the helpers to barebox.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The watchdog driver will remain unprobed if the driver or the OF node
is disabled, but the reset reason is useful even then.
System reset and reset source determination is achieved with the RCC
peripheral for which we have a reset controller driver.
Move the code over there, so reset reason and reset are available
always.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Whether reset_source_name() returns the just set reset_source is
dependent on probe order and the priorities of prior reset sources
in relation to the current one. Make this more robust by using the new
reset_source_to_string.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On most resets, a "reset reason: unknown" would clutter the console,
because the watchdog doesn't support differentiating between POR and
RST. Reduce the clutter by only printing the message when we have
something interesting to say (i.e. watchdog reset).
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Missing symbols for overlay or root tree are valid if the overlay only
adds paths to the device tree. The code handles this correctly, however
it still isues a WARNING for the missing symbols. Demote the warning to
info and move into the of_overlay_apply_symbols() function.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Both reset GPIO and regulator are optional as per the binding and the
driver can work without if we ignore their absence. Do so.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
regulator_{enable,disable} are already no-ops when the parameter is
NULL. Drop the NULL checks thusly.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
info->priv is dereferenced before a valid value has been set leading to
a NULL pointer dereference in the probe function. Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch adds translation from CPU to DMA addresses, which is required for
proper operation on certain architectures like MIPS.
This patch also fixes the bug introduced by 4350744bf5 "usb: ehci-hcd: port
periodic transactions implementation from the u-boot", which is still present
in the original U-Boot code:
td->qt_buffer[0] =
cpu_to_hc32((unsigned long)buffer + i * elementsize);
td->qt_buffer[1] =
cpu_to_hc32((td->qt_buffer[0] + 0x1000) & ~0xfff);
...
In case of a big-endian CPU 0x1000 is added to the byte-swapped value
`td->qt_buffer[0]`, the result is byte swapped once again and stored to
`td->qt_buffer[1]`. This results in erroneous values being stored in
`td->qt_buffer[1..4]`.
N.B.: This patch needs some testing on architectures different from MIPS.
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The code was ported over from U-Boot and has some things different than
the Kernel driver:
- It reads ->mdio_address, but the kernel driver doesn't
- It doesn't write ->mdio_data in a read, but the kernel driver does
- It has delays in addition to spinning on MII_BUSY, but the kernel driver
doesn't
Adopt the same flow as used by the kernel.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The dummy read was a left over from an abandoned merge with the existing
support for the SoCFPGA variant of the Designware MAC. It doesn't exist
in either the U-Boot or kernel drivers for the EQOS, thus drop it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Most fastboot commands are suitable for a secure boot environment as
they only allow to download/flash/erase to files/partitions which were
explicitly specified in the usbgadget command.
The "oem" group of commands allows execution of arbitrary barebox
commands. This needs to be disabled for secure boot devices.
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/
| |
| |
| |
| |
| |
| | |
Add a missing newline to the pr_warn call while applying the overlays.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The i.MX8MM also has a usbmisc unit. It's the same as for the i.MX7d,
add the compatible entry for it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds the DDR driver for the i.MX8MQ/i.MX8MM. It's taken from
U-Boot v2020.04-rc1 with slight modifications for barebox
The i.MX8MQ boards in the tree currently use the output of an earlier
version of the NXP i.MX8M DDR Tool which doesn't use a controller driver
but instead does most stuff in board code. It seems this can coexist
with the new driver, only a few helper functions that previously lived
in arch/arm/mach-imx/imx8-ddrc.c are now provided by the new driver.
Tested on an i.MX8MM EVK
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Just add the compatible string, nothing more to do.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This adds clock support for the i.MX8MM, taken from Linux-5.5.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds support for the pll14xx found on i.MX8MM devices. This is
taken from the Kernel as of v5.5. Since we'll need some early setup
for the PLL a PBL hook is added to be called from lowlevel code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Only add the compatible string to let the driver match.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Only add the compatible string to let the driver match.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Only add the compatible string to let the driver match.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For boards that do the RAM setup in code we can up to now only download
the PBL part to SRAM. This patch adds support for downloading the rest
of the image after the RAM has been configured.
The ROM is nice enough to leave the USB controller initialized after a
download, so we don't have to reinitialize it, but can simply continue to
use the controller. Like all two-staged loading processes on i.MX this
needs board support, it will only work when a board calls
imx_barebox_load_usb() or one of the SoC specific variants.
This needs the host counterpart in imx-usb-loader which is done in the
next patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The register definitions will be shared by the regular and the
pbl driver, so move them to a header file.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unlike the i.MX8MQ the i.MX8MM has three SDHCI controllers. Add support
for picking the base address of the third controller from the instance
number. While at it use the IMX8M_ base addresses rather than the
IMX8MQ_ base addresses.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
imx8_esdhc_load_image() and friends can't be used on the big variants of
the i.MX8, so rename to imx8m_esdhc_load_image()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The big i.MX8 does HAB through the SCU which will be different. To avoid
confusion rename the functions to imx8m_*
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In clk_dump we only print the state of clk_is_enabled(). Depending on
the clock this can mean different things. When the clock provides an
is_enabled() callback it will print its result, so the enabled state
matches the hardware state of that clock, but doesn't necessarily mean
its parents are enabled. If a clock does not provide an is_enabled()
callback then we rely on our internal enable_count tracker.
Change this to always print the hardware state of the current clock. It
can be:
- disabled: The clock is disabled (as provided by is_enabled())
- enabled: The clock is enabled (as provided by is_enabled())
- always enabled: The clock can't be disabled (no is_enabled callback
and can't be enabled/disabled)
- unknown: no is_enabled callback but can be enabled/disabled
Additionally we print the enable_count variable, so from enable_count !=
0 we can know that barebox has enabled the clock.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The enable count of critical clocks may not drop below 1. Otherwise
the new parent during a reparenting of a critical clock will not
be enabled.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Critical clocks have to be enabled initially. We have to do this not
only to enable the clock itself, but also to make sure its parents
stay enabled and also to correctly enable the new parents during
reparenting of the clock.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We can save some time by explicitly telling the block layer that a range
is unused before overwriting it. This brought time my sample write
from 445s to 376s.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
According to dts/Bindings/pinctrl/pinctrl-single.txt:113 the correct order of
parameters is <offset, value, mask>.
Fixes: f7e0cae43 ('pinctrl-single: Handle "pinctrl-single,function-mask" dt property')
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since b1d9837182, detection of various USB flash drives stopped working.
While the changes itself look correct, probably the HUB requires some
"recovery time" between the GET_STATUS commands in order to be able to
detect devices.
Our configuration: i.MX6ULL (USB-OTG) with only one port on the root
HUB. This port is connected to a Microchip USB4916 hub (permanently
attached). The USB4916 is configured with it's power on defaults which
means that bPwrOn2PwrGood is set to the maximum (0xFF = 510 ms).
Fixes: b1d9837182 ("usb: Change power-on / scanning timeout handling")
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Kernel commit 0782e8572c ("ARM: dts: Probe am335x musb with ti-sysc")
which we pulled in during the v2020.02.0 dts/ sync moved the USB nodes
to be under a ti-sysc bus instead of ti,am33xx-usb.
This new probe order broke am335x USB under barebox, because the MUSB
drivers couldn't cope with the now different device probe order.
Pepper some -EPROBE_DEFER around to make USB work again.
Fixes: 574eed3f6f ("dts: update to v5.5-rc1")
Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
am335x_get_usb_phy() retrieves the last probed USB phy. On the BeagleBone
with both PHYs enabled, this means that dependent on probe order, both
MUSB instances could end up with the same PHY.
Remove the global variable and have the MUSB driver parse the "phys"
property instead.
The cleaner way to achieve this would be to migrate phy-am335x.c
and phy-am335x-control.c to the generic phy framework and have MUSB use
of_phy_get, alas, even Linux hasn't done this so far and we need
a short patch for master anyway, thus just do it the easy way.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Tested-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The upstream device tree no longer lists "syscfg-clk" and the syscon node
contains a clocks property that the barebox syscon driver now
automatically clocks before access.
Thus drop the requirement that "syscfg-clk" is specified.
Fixes: 4aaceef58 ("dts: update to v5.6-rc1")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Linux supports a clocks property in syscon nodes to indicate that access
should only occur with the clock active.
Attach the clock to the regmap if found.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|