summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-18Merge branch '2022-01-18-platform-updates'Tom Rini
- cubieboard7 MMC support, AST2600 MAC support
2022-01-18miiphy.h: Remove CONFIG_DM_xxx guardsTom Rini
Function prototypes must not be guarded with ifdef tests. Doing so prevents us from doing: if (CONFIG_IS_ENABLED(FOO)) func(); as that results in a warning when CONFIG_FOO is not enabled. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-18clk: ast2600: Revise MII interface delayDylan Hung
The clock delay of the RMII/RGMII interface is controlled by SCU340~35C. These values are obtained by measurement and experiments so we simply use macro to define them. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-18configs: ast2600: enable DM_MDIO and MDIO driverDylan Hung
Enable DM_MDIO and Aspeed MDIO driver for AST2600 EVB. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-18ARM: dts: ast2600: Add MDIO devicesDylan Hung
There are 4 MDIO bus controllers in AST2600 SOC. Each of them can connect to one or more PHY chips and is flexible to work with the 4 MAC devices in AST2600. On AST2600 EVB, MDIO 0,1,2,3 connect to the PHY chips used by MAC 0,1,2,3 respectively. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-18net: ftgmac100: Add Aspeed AST2600 supportDylan Hung
Add support of the MAC controller of Aspeed AST2600 SOC. The MAC controller is the same with AST2500, except it has stand-alone MDIO hardware block. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-18net: ftgmac100: Add DM_MDIO supportDylan Hung
Add support for DM_MDIO to connect to PHY. For the systems that have a stand-alone MDIO hardware block, enable CONFIG_DM_MDIO to use driver model for MDIO devices. Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-18configs: Enable mmc supportAmit Singh Tomar
This commits enables mmc on the Actions Cubieboard7 board. Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
2022-01-18mmc: actions: add MMC driver for Actions OWL S700/S900Amit Singh Tomar
This commit adds support for MMC controllers found on Actions OWL SoC platform(S700/S900). Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
2022-01-18ARM: dts: s700: add MMC/SD controller nodeAmit Singh Tomar
This patch adds node for mmc/sd controller found on Action Semi OWL S700 SoC. Since, upstream Linux binding has not been merged for S700 MMC/SD controller, Changes are put in u-boot specific dtsi file. Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
2022-01-18ARM: dts: sync Actions Semi S700 DT from Linux v5.16-rc3Amit Singh Tomar
This Synchronizes the Actions Semi S700 SoC DT changes from commit "g58e1100fdc59" ("Linux v5.16-rc3"). Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
2022-01-18clk: actions: Add SD/MMC clocksAmit Singh Tomar
This commit adds SD/MMC clocks, and provides .set/get_rate callbacks for SD/MMC device present on Actions OWL S700 SoCs. Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
2022-01-18clk: actions: Introduce dummy get/set_rate callbacksAmit Singh Tomar
This commit introduces get/set_rate callbacks, these are dummy at the moment, and can be used to get/set clock for various devices based on the clk id. Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-01-18Merge branch '2022-01-17-assorted-updates'Tom Rini
- musb gadget pinctrl-single, pxa3xx nand bugfixes - btrfs BLAKE2 hash support and another btrfs fix - board_r cleanups
2022-01-18pinctrl: single: add support for pinctrl-single, pins when #pinctrl-cells = 2AJ Bagwell
Changes to the am33xx device (33e9021a) trees have been merged in from the upstream linux kernel which now means the device tree uses the new pins format (as of 5.10) where the confinguration can be stores as a separate configuration value and pin mux mode which are then OR'd together. This patch adds support for the new format to u-boot so that pinctrl-cells is now respected when reading in pinctrl-single,pins Signed-off-by: Anthony Bagwell <anthony.bagwell@hivehome.com>
2022-01-18fs/btrfs: fix a bug that U-boot fs btrfs implementation doesn't handle ↵Qu Wenruo
NO_HOLE feature correctly [BUG] When passing a btrfs with NO_HOLE feature to U-boot, and if one file contains holes, then the hash of the file is not correct in U-boot: # mkfs.btrfs -f test.img # Since v5.15, mkfs defaults to NO_HOLES # mount test.img /mnt/btrfs # xfs_io -f -c "pwrite 0 4k" -c "pwrite 8k 4k" /mnt/btrfs/file # md5sum /mnt/btrfs/file 277f3840b275c74d01e979ea9d75ac19 /mnt/btrfs/file # umount /mnt/btrfs # ./u-boot => host bind 0 /home/adam/test.img => ls host 0 < > 12288 Mon Dec 27 05:35:23 2021 file => load host 0 0x1000000 file 12288 bytes read in 0 ms => md5sum 0x1000000 0x3000 md5 for 01000000 ... 01002fff ==> 855ffdbe4d0ccc5acab92e1b5330e4c1 The md5sum doesn't match at all. [CAUSE] In U-boot btrfs implementation, the function btrfs_read_file() has the following iteration for file extent iteration: /* Read the aligned part */ while (cur < aligned_end) { ret = lookup_data_extent(root, &path, ino, cur, &next_offset); if (ret < 0) goto out; if (ret > 0) { /* No next, direct exit */ if (!next_offset) { ret = 0; goto out; } } /* Read file extent */ But for NO_HOLES features, hole extents will not have any extent item for it. Thus if @cur is at a hole, lookup_data_extent() will just return >0, and update @next_offset. But we still believe there is some data to read for @cur for ret > 0 case, causing we read extent data from the next file extent. This means, what we do for above NO_HOLES btrfs is: - Read 4K data from disk to file offset [0, 4K) So far the data is still correct - Read 4K data from disk to file offset [4K, 8K) We didn't skip the 4K hole, but read the data at file offset [8K, 12K) into file offset [4K, 8K). This causes the checksum mismatch. [FIX] Add extra check to skip to the next non-hole range after lookup_data_extent(). Signed-off-by: Qu Wenruo <wqu@suse.com>
2022-01-18fs/btrfs: add dependency on BLAKE2 hashQu Wenruo
Now btrfs can utilize the newly intorudced BLAKE2 hash. Signed-off-by: Qu Wenruo <wqu@suse.com>
2022-01-18lib: add BLAKE2 hash supportQu Wenruo
The code is cross-ported from BLAKE2 reference implementation (https://github.com/BLAKE2/BLAKE2). With minimal change to remove unused macros/features. Currently there is only one user inside U-boot (btrfs), and since it only utilize BLAKE2B, all other favors are all removed. Signed-off-by: Qu Wenruo <wqu@suse.com> [trini: Rename ROUND to R to avoid clash with <linux/bitops.h> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-18common: board_r: drop ifdefs around header includesOvidiu Panait
Drop the remaining ifdefs around header includes, to fix an old TODO. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-01-18common: board_r: include asm-generic/gpio.hOvidiu Panait
Not all architectures define <asm/gpio.h> and even on those that do, the header cannot be included for all boards without causing various build failures. Since common/board_r.c only needs gpio_hog_probe_all() declaration, include <asm-generic/gpio.h> and drop the associated ifdef. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-01-18common: board_r: move init_addr_map() to init.hOvidiu Panait
asm/mmu.h include is currently guarded by CONFIG_ADDR_MAP ifdef because the header is only present on arm and powerpc. In order to remove the dependency on this header and the associated ifdef, move init_addr_map() declaration to init.h, since it is only called during the common init sequence. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-01-18common: board_r: drop initr_addr_map wrapperOvidiu Panait
Add a return value to init_addr_map and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-01-18common: board_r: drop initr_kgdb wrapperOvidiu Panait
Add a return value to kgdb_init and use it directly in the post-relocation init sequence, rather than using a wrapper stub. Also, move the "KGDB" print message inside kgdb_init(). Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-01-18common: remove bedbug debugger supportOvidiu Panait
Commit 98f705c9cefd ("powerpc: remove 4xx support") removed (in 2017) the last code that made use of bedbug debugger support. Since there aren't any boards left that define either CONFIG_CMD_BEDBUG or a real bedbug_init(), drop this feature from u-boot. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-18common: spl: move armv7m-specific code to spl_perform_fixups()Ovidiu Panait
Factor out armv7m fragment to spl_perform_fixups(), which is an arch/board specific function designed for this purpose. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-01-17drivers: musb_gadget: Save endpoint desc to usb_ep->descqianfan Zhao
Fix fastboot flash bug. If the downloading file size is equal to the partition size, "fastboot flash" can't work, at least in sunxi platform, because used an uninitalized point: ep->desc. This patch also fixed 'data abort' bug in am335x platform. Reproduce: fastboot flash loader1 spl/sunxi-spl.bin. Signed-off-by: qianfan Zhao <qianfanguijin@163.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-01-17mtd: nand: pxa3xx: set mtd->devRobert Marko
Currently the pxa3xx driver does not set the udevice in the mtd_info struct and this prevents the mtd from parsing the partitions via DTS like for SPI-NOR. So simply set the mtd->dev to the driver udevice. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Reviewed-by: Stefan Roese <sr@denx.de>
2022-01-17Merge branch '2022-01-15-TI-platform-updates'Tom Rini
- Let am335x_evm use the CPSW or PRUSS ethernet. - Implement timer_get_boot_us in the omap timer driver - gpmc bitflip, QSPI clock calculation on am437x, da8xx_gpio bugfixes - Assorted K3 updates
2022-01-17Merge tag 'u-boot-at91-2022.04-b' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 Second set of u-boot-at91 features for the 2022.04 cycle: This small feature set includes few changes for sama7g5 and sama7g5ek: turn blue led on at boot, changes required for the Rev4 of the board, better sync with the Linux DT with regards to the new DT nodes.
2022-01-17Merge https://source.denx.de/u-boot/custodians/u-boot-pmicTom Rini
- Apple M1 PMIC support
2022-01-17Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-netTom Rini
- PXE label override support - Fastboot UDP configurable port - new phy driver: TI DP83869HM - and few minor fixes to dsa.
2022-01-17configs: at91: sama7g5ek: enable CONFIG_PHANDLE_CHECK_SEQEugen Hristev
CONFIG_PHANDLE_CHECK_SEQ will allow different sequence number for nodes that have the same name, but they are different. In sama7g5ek case, there are multiple 'i2c@600' nodes which are child nodes of different parent 'flexcom' nodes. These are different i2c busses even if the node is the same, and have to be differentiated. Without this config, the sequence number 0 is reused for two i2c busses, and this is something that we have to avoid: Looking for 'i2c' at 4704, name i2c@600 - serial0, /ahb/apb/serial@e1824200 - i2c0, /ahb/apb/flexcom@e181c000/i2c@600 Found seq 0 i2c_post_bind: i2c@600, seq=0 Looking for 'i2c' at 6236, name i2c@600 - serial0, /ahb/apb/serial@e1824200 - i2c0, /ahb/apb/flexcom@e181c000/i2c@600 Found seq 0 i2c_post_bind: i2c@600, seq=0 After this patch: Looking for 'i2c' at 4704, name i2c@600 - serial0, /ahb/apb/serial@e1824200 - i2c0, /ahb/apb/flexcom@e181c000/i2c@600 - i2c1, /ahb/apb/flexcom@e2818000/i2c@600 Found seq 1 Before the patch: => i2c bus Bus 0: i2c@600 Bus 0: i2c@600 (active 0) 52: eeprom@52, offset len 1, flags 0 53: eeprom@53, offset len 1, flags 0 => After the patch: => i2c bus Bus 0: i2c@600 Bus 1: i2c@600 (active 1) 52: eeprom@52, offset len 1, flags 0 53: eeprom@53, offset len 1, flags 0 Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-01-17ARM: dts: at91: sama7g5ek: move eeproms to flexcom8Eugen Hristev
The rev4 of the board sama7g5ek has the eeproms on flexcom8 instead of flexcom1. Initialize flexcom8 with required pincontrol and move the eeproms accordingly. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-01-17ARM: dts: at91: sama7g5: add flx8 and required nodesEugen Hristev
Add Flexcom8 node with required referenced nodes as phandles. Since Flexcom8 is present in Linux, take the node exactly as-is from Linux. Some nodes are referenced in Linux as phandles, the dma and the gic. Add them as well to the file, even if they are unused by Uboot. This is a step towards having the U-boot DT equivalent with the DT in Linux. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-01-17power: domain: Add Apple pmgr driverMark Kettenis
This driver supports power domains for the power management controller found on Apple SoCs. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-17arm: dts: apple: Add u-boot,dm-pre-reloc propertiesMark Kettenis
These are necessary to make sure the power domains needed for the serial console are availble in the pre-relocation phase. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-17arm: dts: apple: Update Apple M1 device treesMark Kettenis
This synchronizes the device trees with those that are in the process of being upstreamed into Linux. This is mostly the current state of the device trees on the asahilinux branch with a few extra bits used by OpenBSD. This includes device trees for machines that were still missing. There are still some differences that will hopefully be resolved soon. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-16board: ti: am335x: Choose CPSW or PRUSS configuration based on jumper settingAmjad Ouled-Ameur
The am335x-ice-v2 board's Ethernet ports can be configured in 'MII' or 'RMII' mode to be connected to 'PRUSS' or 'CPSW' Ethernet subsystems. This patch sets the environment variable 'ice_mii' to 'mii' or 'rmii' accordingly. Based on that we choose the appropriate board devicetree i.e. 'am335x-ice-v2.dtb' or 'am335x-ice-v2-prueth.dtb'. Since there are 2 Ethernet ports with 2 modes, there can be 4 configurations but for now we consider both ports in different modes to be an invalid configuration and prevent boot in that case. Signed-off-by: Roger Quadros <rogerq@ti.com> [Amjad: use overlay instead of using new am335x-ice-v2-prueth.dtb] Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Make prueth_is_mii be marked __maybe_unused] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-16nand: gpmc: Handle bitflips in erased pages when using BCH ECC engineDavid Rivshin
In the case of an erased (sub)page both the data and ECC are all 0xFF bytes. This fails the normal ECC verification, as the computed ECC of all-0xFF is not also 0xFF. The GPMC NAND driver attempted to detect erased pages by checking that the ECC bytes are all-0xFF, but this had two problems: 1) bitflips in the data were not corrected, so the data looked not-erased 2) bitflips in the ECC bytes were reported as uncorrectable ECC errors The equivalent Linux driver [1] correctly handles this by counting the number of 0-bits in the combination of data and ECC bytes. If the number of 0-bits is less than the amount of bits correctable by the selected ECC algorithm, then it is treated as an erased page with correctable bitflips. Implement similar, though simplified, logic in omap_correct_data_bch(). [1] see omap_elm_correct_data() in omap2.c Signed-off-by: David Rivshin <drivshin@allworx.com>
2022-01-16Fix wrong QSPI clock calculation for AM4372Stefan Mätje
On AM4372 the SPI_GCLK input gets its clock from the PRCM module which divides the PER_CLKOUTM2 frequency (192MHz) by a fixed factor of 4. See AM437x Reference Manual in section 27 QSPI >> 27.2 Integration. The QSPI_FCLK therefore needs to take this factor into account and becomes (192000000 / 4). Signed-off-by: Stefan Mätje <stefan.maetje@esd.eu>
2022-01-16configs: am43xx_hs_evm: Add SPL_USB_STORAGE SupportAmjad Ouled-Ameur
Enable CONFIG_SPL_USB_STORAGE to support UBS MSC boot support. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
2022-01-16omap: timer: implement timer_get_boot_usChristian Gmeiner
To make the OMAP DM timer driver useful for the timing of bootstages, we need to implement timer_get_boot_us(..). Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2022-01-16gpio: da8xx_gpio: Fix gpio name with addresschao zeng
The GPIO bank numbers do not appear in the device tree, so make the gpio name based on the address (ie gpio@42110000_25 vs 25) Signed-off-by: chao zeng <chao.zeng@siemens.com>
2022-01-15ARM: dts: K3-am642-r5-sk: Enable Second CPSW port in R5/A53 SPLVignesh Raghavendra
Enable Second Ethernet port on which ROM support Ethboot. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
2022-01-15net: fastboot: make UDP port net: configurableChristian Gmeiner
The fastboot protocol uses per default the UDP port 5554. In some cases it might be needed to change the used port. The fastboot utility provides a way to specifiy an other port number to use already. fastboot -s udp:192.168.1.76:1234 boot fastboot.img Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-15net: fsl: Fix busy flag polling registerMarkus Koch
NXP's mEMAC reference manual, Chapter 6.5.5 "MDIO Ethernet Management Interface usage", specifies to poll the BSY (0) bit in the CFG/STAT register to wait until a transaction has finished, not bit 31 in the data register. In the Linux kernel, this has already been fixed in commit 26eee0210ad7 ("net/fsl: fix a bug in xgmac_mdio"). This patch changes the register in the fman_mdio and fsl_ls_mdio drivers. As the MDIO_DATA_BSY define is no longer in use, this patch also removes its definition from the fsl_memac header. Signed-off-by: Markus Koch <markus@notsyncing.net> Reviewed-by: Camelia Groza <camelia.groza@nxp.com>
2022-01-15net: eth-phy: Demote missing phy-handle log message to debugMarek Vasut
Reduce the missing phy-handle log message to debug message. It is possible for ethernet DT node to have no phy-handle e.g. in case of a fixed-link connection. Furthermore, drop the FEC: prefix, which is a copy-paste error and rather print the ethernet device name. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-15net: phy: add TI DP83869HM ethernet driverDominic Rath
This driver is based on an older downstream TI kernel, with changes and cleanups to work with mainline device-tree bindings. Signed-off-by: Dominic Rath <rath@ibv-augsburg.net> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-15net: dsa: sja1105: fix device id detectionVladimir Oltean
The sja1105_check_device_id() function contains logic to work without changing the device tree on reworked boards, one of which I have (the NXP LS1021A-TSN normally has a SJA1105T, but I have a version with a resoldered SJA1105Q which is pin compatible). This logic is taken from the Linux driver. However this logic gets shortcircuited in U-Boot by an earlier check for the exact device ID specified in the device tree. So the reworked board does not probe the SJA1105Q switch. Remove this duplicated logic and let the automatic device ID detection do its job. Fixes: f24b666b2204 ("net: dsa: add driver for NXP SJA1105 L2 switch") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2022-01-15net: dsa: fix phydev->speed being uninitialized for the CPU port fixed PHYVladimir Oltean
If the DSA API is going to allow drivers to do things such as: - phy_config in dsa_ops :: port_probe - phy_startup in dsa_ops :: port_enable then it would actually be good if the ->port_probe() method would actually be called in all cases before the ->port_enable() is. Currently this is true for user ports, but not true for the CPU port, because the CPU port does not have a udevice registered for it (this is all part of DSA's design). So the current issue is that after phy_startup has finished for the CPU port, its phydev->speed is an uninitialized value, because phy_config() was never called for the priv->cpu_port_fixed_phy, and it is precisely phy_config() who copies the speed into the phydev in the case of the fixed PHY driver. So we need to simulate a probing event for the CPU port by manually calling the driver's ->port_probe() method for the CPU port. Fixes: 8a2982574854 ("net: dsa: introduce a .port_probe() method in struct dsa_ops") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>