summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-01-16test/py: i2c: Add tests for i2c commandLove Kumar
Add below test cases for i2c commands: i2c_bus - To show i2c bus info, i2c_dev - To set or show the current bus, i2c_probe - To probe the i2c device, i2c_eeprom - To test i2c eeprom device, i2c_probe_all_buses - To list down all the buses and probes it Signed-off-by: Love Kumar <[email protected]>
2024-01-16test/py: mii: Add tests for mii commandLove Kumar
Add below test cases for mii commands: mii_info -To display MII PHY info mii_list - To list MII devices mii_set_device - To set MII device mii_read - To reads register from MII PHY address mii_dump - To display data from MII PHY address Signed-off-by: Love Kumar <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-01-16ARM add initial support for the Phytium Pe2201 Board.TracyMg_Li
Add pe2201 platform code and the device tree of pe2201 platform board. The initial support comprises the UART and PCIe. Signed-off-by: TracyMg_Li <[email protected]> Changes since v1: fix space corrupt. Changes since v2: switch to bootstd and text environment. Changes since v3: add environment variables.
2024-01-16lib: smbios: remove redundant next_header()Heinrich Schuchardt
next_header() and get_next_header() only differ in how the const attribute is used. One function taking a const parameter and returning a non-const is good enough. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2024-01-16smbios: copy QEMU tablesHeinrich Schuchardt
QEMU provides SMBIOS tables with detailed information. We should not try to replicate them in U-Boot. If we want to inform about U-Boot, we can add a Firmware Inventory Information (type 45) table in future. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-01-16arm: dts: k3-j721e-binman: Add support for HS-SE 2.0Neha Malcom Francis
Add support for J721E HS-SE 2.0 device. Make use of the existing templates and override the phandles for sysfw.itb so that builds do not fail. Signed-off-by: Neha Malcom Francis <[email protected]>
2024-01-16doc: board: phytec: Add phyCORE-AM62xWadim Egorov
Add documentation for PHYTEC phyCORE-AM62x SoM. Signed-off-by: Wadim Egorov <[email protected]> Reviewed-by: Dhruva Gole <[email protected]>
2024-01-16board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoMWadim Egorov
Add basic support for PHYTEC phyCORE-AM62x SoM. Supported features: - 2GB DDR4 RAM - eMMC Flash - OSPI NOR Flash - external uSD - Ethernet - debug UART Product page SoM: https://www.phytec.com/product/phycore-am62x Device trees were taken from Linux v6.7-rc3. Signed-off-by: Wadim Egorov <[email protected]> Reviewed-by: Dhruva Gole <[email protected]>
2024-01-16test/py: mdio: Add tests for mdio commandLove Kumar
Add below test cases for mdio commands: mdio_list - To list MDIO buses mdio_read - To read PHY's register at <devad>.<reg> mdio_write - To write PHY's register at <devad>.<reg> Signed-off-by: Love Kumar <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-01-16test/py: net: Add dhcp abort testLove Kumar
Abort the dhcp request in the middle by pressing ctrl + c on u-boot prompt and validate the abort status. Signed-off-by: Love Kumar <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2024-01-16Merge tag 'qcom-2024.04-rc1' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-snapdragon Qualcomm architecture changes: * Move clock and pinctrl drivers out of mach-snapdragon * Various clock driver improvements * Convert PMIC power/reset key driver to use the button API * Preparetory work for migrating to upstream DT
2024-01-16Merge tag 'u-boot-imx-20240115' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx
2024-01-16sandbox_flattree: enable button supportCaleb Connolly
sandbox_flattree enables QCOM_PMIC_GPIO which now depends on BUTTON. As a result the button tests now get run, but fail because the ADC and GPIO button drivers aren't enabled. Enable them to run the tests for sandbox_flattree. Reported-by: Neil Armstrong <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16test: spmi: fix testsCaleb Connolly
With the recent changes to the Qualcomm PMIC GPIO driver the sandbox tests for it no longer pass, update the DTS and tests to work with the changes. Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16pmic: qcom: dont use dev_read_addr to get USIDCaleb Connolly
Linux DTs stuff a value indicating if the USID is a USID or a GSID in the reg property, the Linux SPMI driver then reads the two address cells separately. U-boot's dev_read_addr() doesn't know how to handle this, so use ofnode_read_u32_index() to get just the USID. The Qcom pmic driver doesn't have support for GSID handling, so just ignore the second value for now. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16spmi: msm: fix register range namesCaleb Connolly
The core and chnl register ranges were swapped on SDM845. Fix it, and fetch the register ranges by name instead of by index. Drop the cosmetic "version" variable and clean up the debug logging. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16gpio: qcom_pmic: drop gpio-count propertyCaleb Connolly
This property is not part of the dt bindings and all boards use the new gpio-ranges property instead. Drop support for this. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16dts: qcom: adjust pmic gpio to use upstream bindingsCaleb Connolly
Use the upstream gpio-ranges property instead of gpio-count, and drop the bank-name property for Qualcomm boards. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16gpio: qcom_pmic: support upstream DTCaleb Connolly
Upstream uses the gpio-ranges property to define the number of GPIOs, support for parsing this when gpio-count is unspecified Additionally, drop the bank-name property as it isn't used in upstream, and we can just hardcode the bank name instead. Reviewed-by: Sumit Garg <[email protected]> Tested-by: Sumit Garg <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16gpio: qcom_pmic: drop pon GPIO driverCaleb Connolly
Remove the (now unused) GPIO driver for the power and resin buttons on the PMIC. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16mach-snapdragon: switch to PMIC button driverCaleb Connolly
The PMIC button driver is a much better representation of the hardware here, adjust the boards to use upstream DT and the PMIC button driver instead of exposing the buttons as GPIOs and relying on the GPIO-button driver. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16button: qcom-pmic: introduce Qualcomm PMIC button driverCaleb Connolly
Qualcomm PMICs include a "pon" function which handles two buttons, the power button and "resin" button (usually volume down). Introduce a new driver following upstream Linux DT to enable these and map them to Enter and Down respectively to enable use in boot menus. Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Tested-by: Sumit Garg <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16gpio: qcom_pmic: fix silent dev_read_addr downcastCaleb Connolly
priv->pid is uint32_t, but dev_read_addr() returns a uint64_t on arm64, with the upper bits being used for error codes. Do error checking before downcasting to u32 to prevent errors being silently ignored. Reviewed-by: Sumit Garg <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Tested-by: Sumit Garg <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16serial: msm-geni: handle devm_clk_get() errorsCaleb Connolly
devm_clk_get() returns an ERR_PTR on failure, not null. Fix the check to avoid the board crashing when the clock isn't available. Additionally, add the missing error handling for this function. Fixes: 324df15a292e ("serial: qcom: add support for GENI serial driver") Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16serial: msm-geni: don't rely on parent misc deviceCaleb Connolly
commit 1b15483deb3f ("misc: add Qualcomm GENI SE QUP device driver") introduced support for platform-specific oversampling values, necessary to configure the UART clocks on all platforms at runtime. However it relies in probing a parent device. Despite the DM_FLAG_PRE_RELOC flag, this is not done consistently during boot. Instead, take another approach by relying on ofnode_ helpers to read the serial engine base address and do the read directly. This fixes early UART on boards with a non-default oversampling rate. Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16msm_gpio: use unsigned intCaleb Connolly
Replaces the uses of "unsigned" with "unsigned int". Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16pinctrl: qcom: make compatible with linux DTsCaleb Connolly
The pinctrl and GPIO drivers are currently heavily incompatible with upstream. Most Qualcomm pinctrl blocks feature "tiles" of pins, each at it's own address. Introduce support for these by allowing the soc driver to specify per-pin register offsets similarly to the Linux driver. Adjust the GPIO driver to handle these too, and finally enable support for all pins with the same numbering as used in Linux. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16pinctrl: qcom: move ipq4019 driver from mach-ipq40xxCaleb Connolly
Drop the duplicated pinctrl-snapdragon driver from mach-ipq40xx and add it to drivers/pinctrl/qcom. Acked-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16pinctrl: qcom: move out of mach-snapdragonCaleb Connolly
Move the Qualcomm pinctrl drivers out of mach-snapdragon and over to the rest of the pinctrl drivers, adjust the drivers so that support for each platform can be enabled/disabled individually and introduce platform specific configuration options. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16clk/qcom: fix rcg divider valueCaleb Connolly
The RCG divider field takes a value of (2*h - 1) where h is the divisor. This allows fractional dividers to be supported by calculating them at compile time using a macro. However, the clk_rcg_set_rate_mnd() function was also performing the calculation. Clean this all up and consistently use the F() macro to calculate these at compile time and properly support fractional divisors. Additionally, improve clk_bcr_update() to timeout with a warning rather than hanging the board, and make the freq_tbl struct and helpers common so that they can be reused by future platforms. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16clk/qcom: add mnd_width to clk_rcg_set_rate_mnd()Caleb Connolly
This property is needed on some platforms to ensure that only the relevant bits are set in the M/N/D registers. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16clk/qcom: use function pointers for enable and set_rateCaleb Connolly
Currently, it isn't possible to build clock drivers for more than one platform due to how the msm_enable() and msm_set_rate() callbacks are implemented. Extend qcom_clk_data to include function pointers for these and convert all platforms to use them. Previously, clock drivers relied on include/configs/<board.h> to include the board specific sysmap header, however as most of the header contents are clock driver related, import the contents directly into each clock driver and remove the header. The only exception here is the dragonboard820c board file which includes some pinctrl macros, those are also inlined. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]> [caleb: remove additional sysmap-sdm845.h mention]
2024-01-16clk/qcom: sdm845: add register map for simple gate clocksCaleb Connolly
Many gate clocks can be enabled with a single register write, add support for defining these simple gate clocks and add the ones found on SDM845. While we're here, inline clk_init_uart() into msm_set_rate(). Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16clk/qcom: handle resets and clocks in one deviceKonrad Dybcio
Qualcomm's clock controller blocks actually do much more than it says on the tin.. They provide clocks, resets and power domains. Currently, U-Boot requires one to spawn 2 separate devices for controlling clocks and resets, both spanning the same register space. Refactor the code to make it work with just a single DT node, making it compatible with upstream Linux bindings and dropping the dedicated reset driver in favour of including it in the clock driver. Heavily inspired by Renesas code for a similar hw block. [caleb: moved drivers to clk/qcom, added reset driver and adjusted bind logic. Imported qcom,gcc-ipq4019.h from Linux] Signed-off-by: Konrad Dybcio <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16clk/qcom: move ipq4019 driver from mach-ipq40xxCaleb Connolly
This driver is just a stub, but it's necessary to support the upcoming reset driver changes. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-16clk/qcom: move from mach-snapdragonCaleb Connolly
Clock drivers don't belong here, move them to the right place and declutter mach-snapdragon a bit. To de-couple these drivers from specific "target" platforms, add additional config options to enable each clock driver gated behind a common CLK_QCOM option and enable them by default for the respective targets. This will make future work easier as we move towards a generic Qualcomm target. Reviewed-by: Sumit Garg <[email protected]> Signed-off-by: Caleb Connolly <[email protected]>
2024-01-15Merge tag 'u-boot-nand-20240115' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-nand-flash Pull request for u-boot-nand-20240115 The first patch is by Heinrich Schuchardt and fixes an integer overflow The following two patches are by Dario Binacchi and add arguments check to the nand_mtd_to_devnum() and nand_register() functions. The remaining patches are by Roger Quadros and include various fixes for the OMAP platform.
2024-01-15arm: xea: Add support for boot image source descriptor in SPLAnatolij Gustschin
We load two boot image source descriptor structures from last two sectors in the SPI NOR flash and determine the boot source for loading the kernel/DTB images, then adjust the boot order for loading image from eMMC boot0 or boot1 partition. Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: Lukasz Majewski <[email protected]>
2024-01-15arm: config: Enable CRC8 support in SPL on imx287 XEA boardLukasz Majewski
The boot0/1 feature uses simple CRC8 to check (in SPL) if SPI-NOR content is not corrupted, hence the need to enable it. Signed-off-by: Lukasz Majewski <[email protected]>
2024-01-15arm: xea: Move XEA's environment variables from xea.h to xea.envLukasz Majewski
The default set of environment variables from CFG_EXTRA_ENV_SETTINGS has been moved to a separate file - board/liebherr/xea/xea.env Adjustments done: - fitImage support - SPI-NOR layout re-organization Signed-off-by: Lukasz Majewski <[email protected]>
2024-01-15board: phytec: fix link error when disabling PHYTEC_SOM_DETECTIONYannic Moog
Commit aa7858fe5e2e ("board: phytec: som_detection: move definitions to source file") moved function definitions from header to source file. Makefile however was not updated to unconditionally (from [..]_SOM_DETECTION) build the imx8 and phytec som detection units. Also remove unused includes that cause build failures on arm 32bit boards. SoM detection shall support 32bit boards as well, but arch specific code should not be included in the generic module. Fixes: aa7858fe5e2e ("board: phytec: som_detection: move definitions to source file") Signed-off-by: Yannic Moog <[email protected]>
2024-01-15arm: mach-k3: am642: Define NAND boot deviceRoger Quadros
AM642 SoC supports booting from GPMC NAND device. Define boot device for it. Signed-off-by: Roger Quadros <[email protected]> Link: https://www.mail-archive.com/[email protected]/msg499180.html Signed-off-by: Dario Binacchi <[email protected]>
2024-01-15mtd: rawnand: omap_gpmc: fix OF based partition parsing for NANDRoger Quadros
Set NAND chip ofnode and device so OF based partition parsing can work. Signed-off-by: Roger Quadros <[email protected]> Link: https://www.mail-archive.com/[email protected]/msg499178.html Signed-off-by: Dario Binacchi <[email protected]>
2024-01-15mtd: rawnand: omap_gpmc: Use DT provided IO addressRoger Quadros
For DM case we can get the NAND chip's IO address from DT so we don't need to rely on CFG_SYS_NAND_BASE. Signed-off-by: Roger Quadros <[email protected]> Reviewed-by: Dario Binacchi <[email protected]> Link: https://www.mail-archive.com/[email protected]/msg499177.html Signed-off-by: Dario Binacchi <[email protected]>
2024-01-15memory: ti-gpmc: Fix buildRoger Quadros
sys_proto.h no longer exists for K3 platform so drop it. Include sizes.h to so SZ_16M is visible. Signed-off-by: Roger Quadros <[email protected]> Reviewed-by: Dario Binacchi <[email protected]> Link: https://www.mail-archive.com/[email protected]/msg499176.html Signed-off-by: Dario Binacchi <[email protected]>
2024-01-15mtd: rawnand: omap_elm: Fix elm_init definitionRoger Quadros
The macro ELM_BASE is defined in mach/hardware.h and is not visible at the omap_elm.h header file. Avoid using it in omap_elm.h. Reported-by: Hong Guan <[email protected]> Fixes: 7363cf0581a3 ("mtd: rawnand: omap_elm: u-boot driver model support") Signed-off-by: Roger Quadros <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Dario Binacchi <[email protected]>
2024-01-15mtd: nand: omap_gpmc: Fix NAND in SPL for AM335xRoger Quadros
AM335x uses a special driver "am335x_spl_bch.c" as SPL NAND loader. This driver expects 1 sector at a time ECC and doesn't work well with multi-sector ECC that was implemented in commit 04fcd2587321 ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction") Additionally, the omap_elm driver does not support multi sector ECC and will need more work and tests to get multi sector working correctly on all platforms. Switch back to 1 sector at a time read/ECC. Fixes: 04fcd2587321 ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction") Signed-off-by: Roger Quadros <[email protected]> Tested-by: Enrico Leto <[email protected]> Tested-by: Heiko Schocher <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Dario Binacchi <[email protected]>
2024-01-15mtd: nand: check nand_mtd_to_devnum() argumentDario Binacchi
If the "mtd" parameter is NULL, the search will definitely yield a negative result. In that case, it's better to exit immediately. Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Michael Trimarchi <[email protected]> Link: https://lore.kernel.org/all/[email protected]
2024-01-15mtd: nand: complete nand_register() arguments checkDario Binacchi
The patch checks that the "mtd" parameter is accessible before proceeding. Signed-off-by: Dario Binacchi <[email protected]> Reviewed-by: Michael Trimarchi <[email protected]> Link: https://lore.kernel.org/all/[email protected]
2024-01-15cmd: mtd: avoid unintentional integer overflowHeinrich Schuchardt
mtd dump beyond 4 GiB will show incorrect results. Multiplying two u32 will yield a u32. Add a missing cast. Fixes: 5db66b3aee6f ("cmd: mtd: add 'mtd' command") Addresses-Coverity-ID: 477205 ("Unintentional integer overflow") Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/all/[email protected] Signed-off-by: Dario Binacchi <[email protected]>