summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release v2020.06.0v2020.06.0Sascha Hauer2020-06-101-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: sdhci: Fix swapped argument for sdhci_write32Ahmad Fatoum2020-06-101-2/+2
| | | | | | | | | 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>
* Merge branch 'for-next/stm32'Sascha Hauer2020-05-1410-33/+184
|\
| * regulator: stpmic1: move to coredevice levelLucas Stach2020-05-121-1/+1
| | | | | | | | | | | | | | 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>
| * mfd: stpmic1: move to coredevice levelLucas Stach2020-05-121-1/+1
| | | | | | | | | | | | | | | | 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>
| * i2c: add coredevice_i2c_driver() macroLucas Stach2020-05-121-0/+2
| | | | | | | | | | | | | | | | 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>
| * mci: stm32_sdmmc2: move command timeout errors to debug levelLucas Stach2020-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
| * mci: stm32_sdmmc2: don't retry commandsLucas Stach2020-05-121-14/+2
| | | | | | | | | | | | | | | | | | 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>
| * image: add stm32 images to gitignoreLucas Stach2020-05-121-0/+1
| | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: add stm32image to .gitignoreLucas Stach2020-05-121-0/+1
| | | | | | | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * stm32mp: init: fix up st, package into stm32mp pinctrl nodesAhmad Fatoum2020-05-121-15/+48
| | | | | | | | | | | | | | | | | | | | | | 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>
| * nvmem: bsec: remove wrongly named bsec_field typeAhmad Fatoum2020-05-082-4/+4
| | | | | | | | | | | | | | | | | | 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>
| * nvmem: bsec: allow reads at unaligned offsetsAhmad Fatoum2020-05-081-4/+38
| | | | | | | | | | | | | | | | | | | | 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>
| * ARM: stm32mp: init: fix up CPU device tree nodesAhmad Fatoum2020-05-081-0/+45
| | | | | | | | | | | | | | | | 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>
| * ARM: stm32mp: init: detect Revision Z and 800 MHz profilesAhmad Fatoum2020-05-082-6/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ARM: stm32mp: init: don't cast signed error to unsignedAhmad Fatoum2020-05-081-2/+2
| | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/powerpc'Sascha Hauer2020-05-1423-10/+1444
|\ \
| * \ Merge branch 'for-next/mxs' into nextSascha Hauer2020-04-304-25/+39
| |\ \
| | * | clk: mxs: Use device tree provided clock lookupsSascha Hauer2020-04-282-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | arm: mxs: Add Kconfig option for device tree boardsSascha Hauer2020-04-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | clk: mxs: Do not enable enet_out clockSascha Hauer2020-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | net: fec_imx: Return with an error when mandatory clock is missingSascha Hauer2020-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | net: fec_imx: Make ptp clock optionalSascha Hauer2020-04-282-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | Merge branch 'for-next/misc' into nextSascha Hauer2020-04-304-12/+10
| |\ \ \
| * \ \ \ Merge branch 'for-next/kconfig' into nextSascha Hauer2020-04-3020-96/+342
| |\ \ \ \
| * \ \ \ \ Merge branch 'for-next/stm32' into nextSascha Hauer2020-04-2812-5/+756
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | ARM: stm32mp: expand stm32mp_defconfig for new drivers and boardAhmad Fatoum2020-04-282-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | ARM: stm32mp: lxa-mc1: break reg_3v3 dependency on PMICAhmad Fatoum2020-04-281-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | ARM: stm32mp: add Linux Automation MC-1 supportAhmad Fatoum2020-04-2810-0/+705
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | Merge branch 'for-next/sdhci' into nextSascha Hauer2020-04-2811-5/+688
| |\ \ \ \
| | * | | | mci: sdhci: add Atmel SDHCI (sama5d2, sam9x60) supportAhmad Fatoum2020-04-276-0/+627
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | ARM: at91: dts: specify aliases for sdmmc nodesAhmad Fatoum2020-04-273-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | mci: sdhci: implement sdhci_reset()Ahmad Fatoum2020-04-272-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | mci: sdhci: provide sdhci_readx_poll_timeout helpersAhmad Fatoum2020-04-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | | iopoll: Introduce read_poll_timeoutSascha Hauer2020-04-271-5/+24
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | Merge branch 'for-next/misc' into nextSascha Hauer2020-04-28515-2972/+424
| |\ \ \ \
| * \ \ \ \ Merge branch 'for-next/kbuild' into nextSascha Hauer2020-04-2841-392/+420
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'for-next/dts' into nextSascha Hauer2020-04-281105-9488/+39069
| |\ \ \ \ \ \ | | |_|_|/ / / | |/| | | | |
* | | | | | | Merge branch 'for-next/mxs'Sascha Hauer2020-05-1416-48/+160
|\ \ \ \ \ \ \
| * | | | | | | mmc: mxs: implement detect callbackSascha Hauer2020-05-071-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needed to automatically detect the SD card when it contains the barebox environment. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | | serial: mxs auart: Set Linux console nameSascha Hauer2020-05-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | ARM: i.MX28: Update defconfigSascha Hauer2020-05-071-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | usb: i.MX: Add i.MX28 supportSascha Hauer2020-05-074-18/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | usb: imx-usb-phy: Add delaySascha Hauer2020-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | watchdog: i.MX28: Add device tree supportSascha Hauer2020-05-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | | | | filetype: Add filetype for i.MX23/28 SD card imagesSascha Hauer2020-05-062-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | ARM: mxs: Increase VDDD voltage to match specificationSascha Hauer2020-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | clk: mxs: Use device tree provided clock lookupsSascha Hauer2020-05-062-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | clk imx28: Add USB clocksSascha Hauer2020-05-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | | | clk: mxs: Fix clock numberingSascha Hauer2020-05-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>