aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-03-12cmd: add serial console support for the cls commandHeinrich Schuchardt1-2/+8
Currently the cls command does not support the serial console The screen can be cleared in the video uclass, the colored frame buffer console, and the serial console by sending the same escape sequence. This reduces the cls command to a single printf() statement on most boards. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-03-12mtd: spi-nor-ids: Enable quad read for Gigadevice gd25lq128Niklas Cassel1-1/+1
The Gigadevice gd25lq128 serial flash exists in different versions, all which identify themselves using the same JEDEC id. gd25lq128c: https://www.gigadevice.com/datasheet/gd25lq128 gd25lq128d: https://www.gigadevice.com/datasheet/gd25lq128d However, all versions support quad read, so enable it. Tested and verified on the Sipeed MAix BiT board. Fixes: 30b9a28a3f2d ("mtd: spi-nor-ids: Add Gigadevice gd25lq128 ID") Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2022-03-10arm: add initial support for the Phytium Pomelo BoardWIP/2022-03-10-platform-updatesweichangzheng14-0/+686
This adds platform code and the device tree for the Phytium Pomelo Board. The initial support comprises the UART and the PCIE. Signed-off-by: weichangzheng <nicholas_zheng@outlook.com>
2022-03-10ARM: mach-omap2: omap3: Make clock functions staticAdam Ford1-2/+2
get_osc_clk_speed and get_sys_clkin_sel are only used in one file. Make them static. Tested on OMAP3530, DM3730, AM3517. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-03-10ARM: am3517_evm: Remove hard-coded pin muxingAdam Ford1-198/+0
With updated device trees now supporting pinmuxing for USB, ethernet, MMC, and other peripherals necessary to start MLO and U-Boot, the hard-coded pinmux options can be removed since they are now handed by DM and only muxed when the respective peripheral needs it. Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Derald D. Woods <woods.technical@gmail.com>
2022-03-10ARM: dts: am3517-evm: Sync DTS with Linux 5.17-rc5Adam Ford4-42/+47
Sync the am3517-evm device tree files with those from Linux 5.17-rc5 with some additional fixes for pinmuxing Ethernet and moving the pinmux references to the respective peripherals. Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Derald D. Woods <woods.technical@gmail.com>
2022-03-10ARM: dts: logicpd-torpedo: Resyc DTS files with Linux 5.17-rc5Adam Ford4-34/+103
Resyc DTS files with Linux 5.17-rc5. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-03-10ARM: omap3_logic: Remove hard-coded USB muxingAdam Ford1-17/+0
With recent fixes to USB pinmuxing in the device trees, there is no need to hard-code the pinmuxing in this table. It is all handled in DM now. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-03-10ARM: dts: logicpd-som-lv: Resync DTS files with Linux 5.17-rc5Adam Ford4-43/+45
Resync the DTS files for the Logic PD SOM-LV with Linux 5.17-rc5 with some additional pending changes to address issues with wrong pin-muxing on the OMAP35. Signed-off-by: Adam Ford <aford173@gmail.com>
2022-03-10ARM: am3517-evm: Remove more non-DM legacy ethernet reset codeAdam Ford1-8/+0
The ethernet controller is DM compliant, and the device tree defines it. There is no need to manually handle pulling the ethernet out of reset. Signed-off-by: Adam Ford <aford173@gmail.com> Tested-by: Derald D. Woods <woods.technical@gmail.com>
2022-03-10configs: j721e_hs_evm_a72_defconfig: Add command for initializing QSGMII PHYAswath Govindraju1-1/+1
QSGMII PHY present on the j721e common processor board requires to be initialized before the core boots up. Therefore, run the corresponding command during boot to do the same. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-03-10configs: j721e_evm_a72_defconfig: Fix the bootcmdAswath Govindraju1-1/+1
Add the command "boot_rprocs" that is required for booting remote processors in U-Boot. Fixes: 5980925e2a5a ("include: configs: j721e_evm: Add support to boot ethfw core in j721e") Reported-by: Jesse Villarreal <jesse.villarreal@ti.com> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-03-10include: configs: j721e_evm.h: Fix the env variable corresponding to QSGMII ↵Aswath Govindraju1-2/+17
PHY init QSGMII PHY initialization should only be done for J721E EVMs and not for J721E-SK boards. Therefore, fix the environment variables accordingly. Also, by default remote processors should not be booted in U-Boot but rather be left to the users to enable this by setting dorprocboot. Therefore, remove dorprocboot that is being set by default. Fixes: 5980925e2a5a ("include: configs: j721e_evm: Add support to boot ethfw core in j721e") Reported-by: Suman Anna <s-anna@ti.com> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
2022-03-10ram: aspeed: Rework kconfig optionsJoel Stanley1-40/+51
Ensure the ASPEED related options are grouped together under the RAM option when enabling support. This also makes some minor grammar corrections and renames options so they present cleanly in menuconfig. There should be no functional change to the configuration or binary. Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Dylan Hung <dylan_hung@aspeedtech.com>
2022-03-10ARM: omap3_beagle: Enable DM_PMIC and DM_REGULATORRomain Naour1-0/+5
Enabling DM_PMIC, DM_REGULATOR_FIXED, and DM_REGULATOR_GPIO gives us the ability to better monitor voltages and enable hardware through the device tree. The TL4030 (TPS65950) is not yet migrated to DM, so this patch only enables the fixed and GPIO controlled regulators. Based on commit [1][2]. [1] a40d3cc845756e1e38af5ac31986539417e64abb [2] 2448e42d73fb91e4b56bb41b2677e18ab99a6c83 Signed-off-by: Romain Naour <romain.naour@gmail.com>
2022-03-10ARM: omap3_beagle: Enable PinctrlRomain Naour1-0/+2
The simple pinctrl driver currently available works with the omap3. Enabling this will use the device tree to automatically set the pin-muxing for various drivers. Based on commit: 57dbf754e37d3347cad441f3869bf72c0d726a71 Signed-off-by: Romain Naour <romain.naour@gmail.com>
2022-03-10ARM: omap3_beagle: Power on MMC when setting up PMICRomain Naour1-7/+2
The PMIC enables power to the MMC card by default, but depending on the state it was left when restarted, it's possible the MMC may be powered down. This patch patch explicitly tells the twl4030 to power the MMC. Based on commits [1][2]. [1] 64fd2d26140aa72b43428d079974f7c0e7f88353 [2] 27b653449178e80b333e7bc5a81eed3bd1bd6861 Signed-off-by: Romain Naour <romain.naour@gmail.com>
2022-03-10ARM: omap3_beagle: Remove non-DM initializationRomain Naour1-7/+0
With DM_MMC working for both SPL and U-Boot, this patch removes the legacy style of initializing the MMC driver. Based on omap3_logic: 42140dd0962bc134c0aad27524d0f4cc3955f255. Signed-off-by: Romain Naour <romain.naour@gmail.com>
2022-03-10Merge branch '2022-03-09-events-subsystem' into nextTom Rini67-73/+1068
To quote the author: It is a common need in U-Boot to have one subsystem notify another when something happens. An example is reading a partition table when a new block device is set up. It is also common to add weak functions and 'hook' functions to modify how U-Boot works. See for example ft_board_setup() and the like. U-Boot would benefit from a generic mechanism to handle these cases, with the ability to hook into various 'events' in a subsystem-independent and transparent way. This series provides a way to create and dispatch events, with a way of registering a 'spy' which watches for events of different types. This allows 'hook' functions to be created in a generic way. It also includes a script to list the hooks in an image, which is a bit easier to debug than weak functions, as well as an 'event' command to do the same from within U-Boot. These 'static' events can be used to replace hooks like misc_init_f(), for example. Also included is basic support for 'dynamic' events, where a spy can be registered at runtime. The need for this is still being figured out.
2022-03-10event: Add documentationSimon Glass4-0/+117
Add documentation for events, including the event command. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10event: Add a script to decode the event-spy listSimon Glass3-0/+137
For debugging and dicoverability it is useful to be able to see a list of each event spy in a U-Boot ELF file. Add a script which shows this, along with the event type and the source location. This makes events a little easier to use than weak functions, for example. Add a basic sandbox test as well. We could provide a test for other boards, but for now, few use events. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10event: Add a commandSimon Glass5-0/+40
Add a command to show the available events. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10event: Convert arch_cpu_init_dm() to use eventsSimon Glass26-43/+74
Instead of a special function, send an event after driver model is inited and adjust the boards which use this function. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10event: Convert misc_init_f() to use eventsSimon Glass21-22/+32
This hook can be implmented using events, for the three boards that actually use it. Add the event type and event handlers. Drop CONFIG_MISC_INIT_F since we can just use CONFIG_EVENT to control this. Since sandbox always enables CONFIG_EVENT, we can drop the defconfig lines there too. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10event: Add events for device probe/removeSimon Glass7-0/+96
Generate events when devices are probed or removed, allowing hooks to be added for these situations. This is controlled by the DM_EVENT config option. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10event: Set up the event system on start-upSimon Glass1-0/+2
Call event_init() before relocation to get the event system running. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10event: Add a simple testSimon Glass4-0/+53
Add a test for event registration and activation. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10event: Add basic support for eventsSimon Glass10-0/+465
Add a way to create and dispatch events without needing to allocate memory. Also add a way to 'spy' on events, thus allowing 'hooks' to be created. Use a linker list for static events, which we can use to replace functions like arch_cpu_init_f(). Allow an EVENT_DEBUG option which makes it easier to see what is going on at runtime, but uses more code space. Dynamic events allow the creation of a spy at runtime. This is not always necessary, but can be enabled with EVENT_DYNAMIC if needed. A 'test' event is the only option for now. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10binman: Expand elf support a littleSimon Glass1-7/+51
Allow finding a symbol by its address. Also export the function to get the file offset of a particular address, so it can be used by a script to be added. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10sandbox: start: Sort the header filesSimon Glass1-2/+2
These header files don't follow the correct order. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-03-10sunxi: boards: Enable SPI flash support in U-Boot properAndre Przywara8-0/+14
Some sunxi boards ship with SPI flash, which allows booting through the BootROM. We cover this functionality by a separate SPL "mini" driver. Separately we have a proper DM_SPI driver for U-Boot proper, which provides access to the SPI flash through the "sf" command. That allows to update the firmware on the SPI flash, also to store the environment there. However only very few boards actually enable support for U-Boot proper, even though that would work and the SPL part is configured. Use the cleaned up configuration scheme to enable SPI flash on those boards which mention a SPI flash in their .dts, or which use the SPL SPI support. Out of the box this would enable storing the environment on the SPI flash, and allows people to read or write the flash from U-Boot, for instance to update the SPI flash when booted via an SD card. For this to actually work there must be a "spi0" alias in the DT, which most boards are missing. But this should be addressed separately. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2022-03-10env: sunxi: enable ENV_IS_IN_SPI_FLASHAndre Przywara1-0/+1
Now that sunxi uses CONFIG_SPI more sanely, and can also now properly load the environment from SPI flash, let's enable the symbol that actually considers the SPI flash when accessing the environment. As this symbol depends on CONFIG_SPI, which we now only enable if the board has a SPI flash, we can make if "default y" for all Allwinner boards. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2022-03-10sunxi: use boot source for determining environment locationAndre Przywara1-8/+43
Currently we only support to load the environment from raw MMC or FAT locations on Allwinner boards. With the advent of SPI flash we probably also want to support using the environment there, so we need to become a bit more flexible. Change the environment priority function to take the boot source into account. When booted from eMMC or SD card, we use FAT or MMC, if configured, as before. If we are booted from SPI flash, we try to use the environment from there, if possible. The same is true for NAND flash booting, although this is somewhat theoretical right now (as untested). This way we can use the same image for SD and SPI flash booting, which allows us to simply copy a booted image from SD card to the SPI flash, for instance. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2022-03-10env: sunxi: Define location in SPI flashAndre Przywara1-2/+4
To allow loading and storing the environment from SPI flash, adjust the raw offset variables for Allwinner boards to make sense there. U-Boot (including SPL and other blobs) is loaded from the beginning of SPI flash, so move the environment location as far back as possible, to not create unnecessary limits. As those offsets are shared with (now mostly unused) raw MMC environment, we should respect the common one megabyte limit, which also makes sense on SPI flash. So limit the environment for those raw locations to 64KB, and place it just below 1MB (@960KB). Those values are currently unused, unless someone forcibly enables the raw MMC environment. In this case it would break as of now, as the current offset of 544KB is far too low for the current (arm64) U-Boot proper. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2022-03-10sunxi: Kconfig: Fix up SPI configurationAndre Przywara8-7/+6
Commit 7945caf22c44 ("arm: sunxi: Enable SPI/SPI-FLASH support for A64") selected CONFIG_SPI by default on all Allwinner A64 boards, even though only 4 out of the 14 A64 boards have a SPI flash chip. All other SoCs had to manually select DM_SPI and friends, even though they are a platform property (the sunxi SPI driver is DM_SPI only). Clean this up to allow easy selection of SPI flash support in U-Boot proper, by selecting DM_SPI and DM_SPI_FLASH *if* CONFIG_SPI is selected, for *all* Allwinner SoCs. This simplifies the defconfig for two Libretech boards already. Also remove the forced CONFIG_SPI from the A64 Kconfig, instead let the four boards which allow SPI booting select this explicitly. Any board wishing to support SPI flash in U-Boot proper now just defines CONFIG_SPI and CONFIG_SPI_FLASH_<vendor> in its defconfig, Kconfig takes care of the rest. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2022-03-09net: phy: Add support for ethernet-phy-id with gpio resetMichal Simek6-0/+97
Ethernet phy like dp83867 is using strapping resistors to setup PHY address. On Xilinx boards strapping is setup on wires which are connected to SOC where internal pull ups/downs influnce phy address. That's why there is a need to setup pins properly (via pinctrl driver for example) and then perform phy reset. I can be workarounded by reset gpio done for mdio bus but this is not working properly when multiply phys sitting on the same bus. That's why it needs to be done via ethernet-phy-id driver where dt binding has gpio reset per phy. DT binding is available here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/net/ethernet-phy.yaml The driver is are reading the vendor and device id from valid phy node using ofnode_read_eth_phy_id() and creating a phy device. Kconfig PHY_ETHERNET_ID symbol is used because not every platform has gpio support. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Link: https://lore.kernel.org/r/70ab7d71c812b2c972d48c129e416c921af0d7f5.1645627539.git.michal.simek@xilinx.com
2022-03-09net: phy: Remove static return type for phy_device_create()Michal Simek2-3/+16
Remove static return type for phy_device_create() to avoid file scope for this function. Also add required prototype in phy.h. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Link: https://lore.kernel.org/r/1517f4053403fbd53e899d500e7485d068a4f0b6.1645627539.git.michal.simek@xilinx.com
2022-03-09net: phy: Add new read ethernet phy id functionMichal Simek2-0/+49
Add new function to get ethernet phy id from compatible property of the mdio phy node. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Link: https://lore.kernel.org/r/16019efb3820a50330935fdaae191cec1f101b5c.1645627539.git.michal.simek@xilinx.com
2022-03-09MAINTAINERS: Remove duplicated entry for ehci-zynq.cMichal Simek1-1/+0
ehci-zynq.c is assigned to Zynq and ZynqMP that's why remove one. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/d97779178fa56f1c6af40f5604b0bf349002cd36.1646639027.git.michal.simek@xilinx.com
2022-03-09arm64: zynqmp: add support for zcu106 rev1.0Neal Frager4-1/+860
This patch adds psu_init for Xilinx ZCU106 rev1.0. Xilinx ZCU106 rev1.0 has newer x16 DDR4 memories and it is SW compatible with revA. Signed-off-by: Neal Frager <neal.frager@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/997b3e23457e4d24ce0e197d742382aaec36c2b2.1646230318.git.michal.simek@xilinx.com
2022-03-09i2c: i2c-cdns: Prevent early termination of writeSai Pavan Boddu1-4/+6
During sequential loading of data, hold the bus to prevent controller from sending stop signal in case no data is available in fifo. Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com> Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/2407b39d305999cb42438c5423aebc3b514acabb.1646122610.git.michal.simek@xilinx.com
2022-03-09i2c: i2c-cdns: Fix write transaction stateSai Pavan Boddu1-0/+6
Start write transfer after loading data to FIFO. Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com> Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/f0b3e443daa7758e00dfdcc245cf6b2120b0e907.1646122610.git.michal.simek@xilinx.com
2022-03-09i2c: i2c-cdns: Start read transaction after write to transfer_size regSai Pavan Boddu1-1/+1
Avoid a race condition where read transaction is started keeping expected bytes as 0. Which sometimes would result in sending STOP signal as no data is expected. Observed on QEMU platform. Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com> Reviewed-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/487c8026791bfd60719403a2df2c54bb0ae99232.1646122610.git.michal.simek@xilinx.com
2022-03-09dma: xilinx: Add Display Port DMA driverMichal Simek3-0/+51
Display Port (DP) has own dma driver that's why add this skeleton driver only for handling power domain setting and send configuration object to PMUFW to enable it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/fe8bc313bcd430b04e9fa6fb770d5799ef28b350.1645627920.git.michal.simek@xilinx.com
2022-03-09video: Add skeleton driver for ZynqMP Display port driverMichal Simek3-0/+75
The reason for this driver is to use call power management driver to enable it in PMUFW. There is missing functionality now but should be added in near future. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/598cb9515bbabc803f72e287464e3d107cd106a3.1645627920.git.michal.simek@xilinx.com
2022-03-09mmc: zynq_sdhci: Add support for dynamic configurationAshok Reddy Soma1-2/+99
Add support for dynamic configuration which will takes care of configuring the SD secure space configuration registers using firmware APIs, performing SD reset assert and deassert. High level sequence: - Check for the PM dynamic configuration support, if no error proceed with SD dynamic configurations(next steps) otherwise skip the dynamic configuration. - Put the SD Controller in reset. - Configure SD Fixed configurations. - Configure the SD Slot Type. - Configure the BASE_CLOCK. - Configure the 8-bit support. - Bring the SD Controller out of reset. In the above steps, apart from the Fixed configurations, remaining all configurations are dynamic and they will be read from devicetree. And also remove hardcoded secure register writes, as dynamic sd config support is added. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/030a3ec041ff3efebd574b4d2b477ad85f12cbce.1645626962.git.michal.simek@xilinx.com
2022-03-09lib: div64: Add support for round up of div64_u64Ashok Reddy Soma1-0/+3
Most of the frequencies are not rounded up to a proper number. When we need to devide these frequencies to get a number for example frequency in Mhz, we see it as one less than the actual intended value. Ex: If we want to get Mhz from frequency 199999994hz, we will calculate it using div64_u64(199999994, 1000000) and we will get 199Mhz in place of 200Mhz. Add a macro DIV64_U64_ROUND_UP for rounding up div64_u64. This is taken from linux 'commit 68600f623d69("mm: don't miss the last page because of round-off error")'. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/f9fdcba76cd692ae436b1d7883b490e3dc207231.1645626962.git.michal.simek@xilinx.com
2022-03-09firmware: zynqmp: Add support for set sd config and is function supportedAshok Reddy Soma2-0/+57
Add firmware API's to set SD configuration and to check if a purticular function is supported. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/f64fa2f73e4775e9ad2f4d91339d6c74b43116a3.1645626962.git.michal.simek@xilinx.com
2022-03-09firmware: zynqmp: Add and update firmware enumsAshok Reddy Soma1-0/+23
Update enum pm_ioctl_id with more IOCTLs. Add enum pm_sd_config_type to support dynamic sd configuration. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/9aba090ec11d2591dbe6978e73e64384873c99fc.1645626962.git.michal.simek@xilinx.com
2022-03-08Merge branch '2022-03-08-assorted-fixes'Tom Rini8-19/+21
- serial uclass fix, mailmap/gitignore updates