summaryrefslogtreecommitdiff
path: root/board/keymile/common
AgeCommit message (Collapse)Author
2025-07-22km: drop KM_RESERVED_PRAMHolger Brunck
This variable is unused since we dropped the support for the Kirkwood boards. Signed-off-by: Holger Brunck <[email protected]>
2025-07-22km: qrio: fix set_gpio read/modify/writeTomas Alvarez Vanoli
Setting GPIO by reading the value of the GPRT register, toggling the correct bit and then writing it causes input values to transfer to the output. Here's how (example): 1) set gpio 17 and 18 as input. 2) set gpio 17 output value to 0 (read gprt, change 17 to 0, write). 3) set gpio 18 output value to 0 (read gprt, change 18 to 0, write). The problem here is that because we set 17 as input, and it's a pull-up, when we read gprt in step 3, the bit 17 will be 1 and not 0. Instead of doing read/write/modify, the solution is to keep track internally of the user set GPIOs, and replace the read step with this static variable. Signed-off-by: Tomas Alvarez Vanoli <[email protected]> Signed-off-by: Holger Brunck <[email protected]>
2024-07-23board: keymile: convert to CONFIG_DM_I2CAnatolij Gustschin
The conversion to DM_I2C is mandatory, rework to remove use of legacy I2C API. Signed-off-by: Anatolij Gustschin <[email protected]> Cc: Aleksandar Gerasimovski <[email protected]> Cc: Holger Brunck <[email protected]> Cc: Tomas Alvarez Vanoli <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-07board: keymile: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this board vendor directory and when needed add missing include files directly. Reviewed-By: Holger Brunck <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2023-03-02Correct SPL use of PG_WCOM_UBOOT_UPDATE_SUPPORTEDSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_PG_WCOM_UBOOT_UPDATE_SUPPORTED defined in Kconfig Signed-off-by: Simon Glass <[email protected]> Aleksandar Gerasimovski <[email protected]>
2023-02-10Correct SPL uses of PG_WCOM_UBOOT_UPDATESimon Glass
This converts 2 usages of this option to the non-SPL form, since there is no SPL_PG_WCOM_UBOOT_UPDATE defined in Kconfig Signed-off-by: Simon Glass <[email protected]> Aleksandar Gerasimovski <[email protected]>
2023-02-10Correct SPL uses of PG_WCOM_UBOOT_BOOTPACKAGESimon Glass
This converts 2 usages of this option to the non-SPL form, since there is no SPL_PG_WCOM_UBOOT_BOOTPACKAGE defined in Kconfig Signed-off-by: Simon Glass <[email protected]> Aleksandar Gerasimovski <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <[email protected]>
2022-04-01kmtegr1: Drop CONFIG_KMTEGR1Tom Rini
The only usage of CONFIG_KMTEGR1 can be replaced by CONFIG_TARGET_KMTEGR1 so do so and remove this other symbol. Cc: Holger Brunck <[email protected]> Cc: Heiko Schocher <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Holger Brunck <[email protected]>
2022-02-01km: common: implement field fail-safe u-boot updateAleksandar Gerasimovski
This patch provides possibility for field fail-safe u-boot updates. The implementation can be used on all pg-wcom boards that are booting from parallel NOR flash. When used in a board design, provided check_for_uboot_update function will start new u-boot at defined location if updateduboot envvar is set to yes. With this implementation it is expected that factory programmed u-boot will always stay as it is, and optionally new u-boot can be safely programmed by embedded software when the unit is rolled out on the field. It is expected check_for_uboot_update to be called early in execution before relocation (*_f) once SoC is basically initialized and environment can be read, with this possibilities to not be able to fix a u-boot bug by a u-boot update are reduced to minimum. Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2022-02-01km: qrio: add access functions for ebootcountAleksandar Gerasimovski
The EBOOTCNT is a reserved persistent static memory area in QRIO, and similar to BOOTCNT is intended to be used as boot counter location. Comparable to BOOTCNT that is reserved for u-boot main bootcount infrastructure, EBOOTCNT is intended to be used for pg-wcom board specific purposes (e.g implementing early boot counter for fail-safe u-boot update). Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2022-02-01km: qrio: add function to read PGY_PRES pin statusAleksandar Gerasimovski
It is necessary to read the status of the PGY_PRES pin so that u-boot can react accordingly. Signed-off-by: Rainer Boschung <[email protected]> Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2022-02-01km: qrio: add function to read SLFTEST pin statusAleksandar Gerasimovski
There is a request from HW designers to use this QRIO pin for detecting DIC26_SELFTEST status instead of a GPIO pin. This pin is typically used during production for executing POST tests and starting test ESW bank. Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2021-09-30WS cleanup: remove trailing empty linesWolfgang Denk
Signed-off-by: Wolfgang Denk <[email protected]>
2021-08-30keymile: Use CONFIG_SYS_IVM_EEPROM_ADRTom Rini
As the code reads now, making this code path use CONFIG_SYS_IVM_EEPROM_ADR rather than CONFIG_SYS_I2C_EEPROM_ADDR seems to make sense as the rest of the EEPROM infrastructure isn't used on these platforms. Cc: Aleksandar Gerasimovski <[email protected]> Signed-off-by: Tom Rini <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Aleksandar Gerasimovski <[email protected]>
2021-08-02global: Convert simple_strtoul() with hex to hextoul()Simon Glass
It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <[email protected]>
2021-06-17keymile: common: fix hexadecimal env variable formatAleksandar Gerasimovski
Commit df86d32 breaks linux kernel and product application boot. Linux kernel and our product application scripts are expecting 0x prefix for hexadecimal values, while env_set_hex writes them without a prefix. This patch partially revert env_set_hex usage for affected env variables. Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2021-04-15board/km: add support for seli8 design based on nxp ls102xAleksandar Gerasimovski
The SELI8 design is a new tdm service unit card for Hitachi-Powergrids XMC and FOX product lines. It is based on NXP LS1021 SoC and it provides following interfaces: - IFC interface for NOR, NAND and external FPGA's - 1 x RGMII ETH for debug purposes - 2 x SGMII ETH for management communication via back-plane - 1 x uQE HDLC for management communication via back-plane - 1 x I2C for peripheral devices - 1 x SPI for peripheral devices - 1 x UART for debug logging It is foreseen that the design will be later re-used for another XMC and FOX service cards with similar SoC requirements. Signed-off-by: Rainer Boschung <[email protected]> Signed-off-by: Matteo Ghidoni <[email protected]> Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2021-02-21dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIOIgor Opaniuk
Use CONFIG_IS_ENABLED() macro, which provides more convenient way to check $(SPL)DM_I2C/$(SPL)DM_I2C_GPIO configs for both SPL and U-Boot proper. CONFIG_IS_ENABLED(DM_I2C) expands to: - 1 if CONFIG_SPL_BUILD is undefined and CONFIG_DM_I2C is set to 'y', - 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_DM_I2C is set to 'y', - 0 otherwise. All occurences were replaced automatically using these bash cmds: $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} + $ find . -type f -exec sed -i 's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + $ find . -type f -exec sed -i 's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} + Reviewed-by: Heiko Schocher <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Igor Opaniuk <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2021-02-15Merge branch '2021-02-02-drop-asm_global_data-when-unused'Tom Rini
- Merge the patch to take <asm/global_data.h> out of <common.h>
2021-02-08board/km: move km i2c deblock declarations to a km/common.hAleksandar Gerasimovski
Cleanup, move the declarations to keymile/common.h instead declaring them per-board config.h Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2021-02-08PowerPC: keymile: Add support for kmcent2 boardNiel Fourie
Add basic support for the Hitachi Power Grids kmcent2 board, based on the NXP QorIQ T1040 SoC. Signed-off-by: Valentin Longchamp <[email protected]> Signed-off-by: Rainer Boschung <[email protected]> Signed-off-by: Niel Fourie <[email protected]> Cc: Holger Brunck <[email protected]> Cc: Heiko Schocher <[email protected]> Reviewed-by: Stefan Roese <[email protected]> [Fixed blank line at EOF errors] Signed-off-by: Priyanka Jain <[email protected]>
2021-02-08keymile: common: update to set_env_hex(), fix "pram" radixNiel Fourie
Replace instances of sprintf()/set_env() for setting hexadecimal values with set_env_hex(). In set_km_env() the "pram" variable was set to an hexadecimal value, while initr_mem() expects an unsigned decimal, so use set_env_ulong() instead. Signed-off-by: Niel Fourie <[email protected]> Cc: Holger Brunck <[email protected]> Cc: Heiko Schocher <[email protected]> Reviewed-by: Stefan Roese <[email protected]> [Rebased] Signed-off-by: Priyanka Jain <[email protected]>
2021-02-08board/km/common: fix pnvramaddr and varaddrAleksandar Gerasimovski
Take into account SDRAM_BASE address when calculating pnvramaddr and varaddr offsets. Up to now Keymile designs had SDRAM_BASE equal to zero and the offsets where calculated correctly, this fix is for the upcoming designs that have SDRAM_BASE different then zero. Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2021-02-08keymile: common: qrio: print QRIO id and revision numberAleksandar Gerasimovski
Add show_qrio function to print chip id and revision information. There are already multiple QRIO chip versions available and the upcoming designs may want to show used version. Signed-off-by: Rainer Boschung <[email protected]> Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2021-02-08board: keymile: common: fix qrio compilation for armAleksandar Gerasimovski
This patch is fixing qrio driver compilation for ARM architecture: - It includes asm/io.h for in_/out_ access - It use correct names for set/clear_bits as defined in linux/bitops.h Signed-off-by: Aleksandar Gerasimovski <[email protected]> Reviewed-by: Priyanka Jain <[email protected]>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2020-12-01km/arm: coding style clean upHolger Brunck
Address most of the checkpatch issues we found in km_arm and common km code. CC: Stefan Roese <[email protected]> CC: Valentin Longchamp <[email protected]> Signed-off-by: Holger Brunck <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2020-07-17board/km: update MAINTAINERS emailHolger Brunck
Signed-off-by: Holger Brunck <[email protected]> CC: Valentin Longchamp <[email protected]>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <[email protected]>
2020-05-18common: Drop linux/bitops.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <[email protected]>
2020-05-18common: Drop linux/delay.h from common headerSimon Glass
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <[email protected]>
2020-05-18command: Remove the cmd_tbl_t typedefSimon Glass
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <[email protected]>
2020-03-03ARM: socfpga: Add initial support for the ABB SECU boardHolger Brunck
Add initial support for the ABB SECU board, which is an ArriaV-based SoCFPGA system with ethernet and booting from Denali NAND. Signed-off-by: Holger Brunck <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: Simon Goldschmidt <[email protected]>
2020-01-23km/common: fix for CPUWD reset reasonRainer Boschung
The CPUWD reset reason is used for kmp204x. And the qrio cpu reset request is configured to operate in core reset mode. But for the evaluation of the qrio's reset reason register the CPUWD figures as a unit reset source rather than a core reset source. This patch defines the CPUWD reset as a core reset source when evaluating the reset reason register. Signed-off-by: Rainer Boschung <[email protected]> CC: Priyanka Jain <[email protected]>
2020-01-23KM/kmp204x: qrio and i2c deblock code moved to commonHolger Brunck
This patch moves the qrio and i2c deblocking code to keymile/common as it will also be used by the upcoming CENT2 board. Signed-off-by: Holger Brunck <[email protected]> CC: Priyanka Jain <[email protected]>
2020-01-10km/boards: add MAC address offset as argument to ivm_populate_envHolger Brunck
For upcoming SECU board we have different MAC address offsets depending on which functional unit we are running. In this case we need to pass this value to the ivm_populate_env function instead of using the hard coded config option there. Signed-off-by: Holger Brunck <[email protected]> CC: Stefan Roese <[email protected]> CC: Valentin Longchamp <[email protected]> CC: Marek Vasut <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2020-01-10km/boards: fix typo for MAC address offset config optionHolger Brunck
This patch only fixes a typo. Signed-off-by: Holger Brunck <[email protected]> CC: Stefan Roese <[email protected]> CC: Valentin Longchamp <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2019-08-12Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- Various improvements to Keymile boards - mostly DT conversation (Pascal & Holger) - Removal of now unsupported Keymile boards (Pascal & Holger) - Small MVEBU PCI fix (Marek) - Turris Omnia defconfig update (Marek) - Misc Allied Telesis defconfig updates (Chris)
2019-08-12powerpc/km: remove unmaintained target KMVECT1Holger Brunck
Signed-off-by: Valentin Longchamp <[email protected]> Signed-off-by: Holger Brunck <[email protected]> Signed-off-by: Stefan Roese <[email protected]>
2019-08-12km: remove obsolete definitions in KM header filesPascal Linder
After moving the KM specific configurations to Kconfig, the associated preprocessor definitions can now be removed in the headers. Moreover, the whitelist has been adapted correspondingly. Signed-off-by: Pascal Linder <[email protected]> Signed-off-by: Holger Brunck <[email protected]> Signed-off-by: Stefan Roese <[email protected]>
2019-08-11env: Move env_set() to env.hSimon Glass
Move env_set() over to the new header file. Acked-by: Joe Hershberger <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <[email protected]>
2017-08-16env: Rename getenv/_f() to env_get()Simon Glass
We are now using an env_ prefix for environment functions. Rename these two functions for consistency. Also add function comments in common.h. Quite a few places use getenv() in a condition context, provoking a warning from checkpatch. These are fixed up in this patch also. Suggested-by: Wolfgang Denk <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2017-08-16env: Rename setenv() to env_set()Simon Glass
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2017-07-22km/ivm: allow to set locally administred MAC addressesHolger Brunck
It is possible to flag MAC addresses as locally administred. In this case they don't need to be unique. This is only allowed for interfaces which have no connection to the outside. For the TEGR1 board we use this feature. Cc: Heiko Schocher <[email protected]> Signed-off-by: Holger Brunck <[email protected]>