summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-08mtd: rawnand: omap_gpmc: support u-boot driver modelRoger Quadros
Adds driver model support. We need to be able to self initialize the NAND controller/chip at probe and so enable CONFIG_SYS_NAND_SELF_INIT. Doing so requires nand_register() API which is provided by nand.c and needs to be enabled during SPL build via CONFIG_SPL_NAND_INIT. But nand.c also provides nand_init() so we need to get rid of nand_init() in omap_gpmc driver if CONFIG_SPL_NAND_INIT is set. Signed-off-by: Roger Quadros <rogerq@kernel.org> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20221220102203.52398-5-rogerq@kernel.org
2023-01-08dt-bindings: mtd: Add ti, gpmc-nand DT binding documentationRoger Quadros
Add DT binding documentation for the TI GPMC NAND controller. This is picked up from the Linux Kernel. Signed-off-by: Roger Quadros <rogerq@kernel.org> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20221220102203.52398-4-rogerq@kernel.org
2023-01-08mtd: rawnand: nand_base: Allow base driver to be used in SPL without nand_bbtRoger Quadros
nand_bbt.c is not being built with the nand_base driver during SPL build. This results in build failures if we try to access any nand_bbt related functions. Don't use any nand_bbt functions for SPL build. Signed-off-by: Roger Quadros <rogerq@kernel.org> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20221220102203.52398-3-rogerq@kernel.org
2023-01-08mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correctionRoger Quadros
The BCH detection hardware can generate ECC bytes for multiple sectors in one go. Use that feature. correct() only corrects one sector at a time so we need to call it repeatedly for each sector. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Link: https://lore.kernel.org/all/20221220102203.52398-2-rogerq@kernel.org
2023-01-02Merge branch '2023-01-02-platform-updates' into nextTom Rini
- Synquacer updates / fixes, PowerPC keymile platform dts fix, assorted TI platform updates, ht1380 RTC driver, serial driver cleanups, pg_wcom defconfig updates, s5p4418 DM_SERIAL (and legacy code removal).
2023-01-02arm: s5p4418: dm_serial: remove old code / add DEBUG_UARTStefan Bosch
Remove init of UART-clock and UART-reset in arch_cpu_init(). Add DEBUG_UART to s5p4418_nanopi2_defconfig. Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
2023-01-02arm: s5p4418: dm_serial: switch to DM_SERIALStefan Bosch
Switch the S5P4418-SOC and therefore the s5p4418_nanopi2 board to DM_SERIAL. Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
2023-01-02arm: s5p4418: dm_serial: add uarts to dtsStefan Bosch
Add S5P4418 UARTs and appropriate pinctrl to dts. Add UART to s5p4418-nanopi2.dts. Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
2023-01-02arm: s5p4418: dm_serial: add driver source codeStefan Bosch
Add dm_serial driver source code for S5P4418 SOC. Extend the "arm,pl011" driver by init of UART-clock and UART-reset. Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
2023-01-02board/pg_wcom: rework defconfigHolger Brunck
Switch off SCSI related config options to get rid of the board removal warning. We don't use this interface. Also disable UBIFS to decrease the image size, as this is also not used. Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2023-01-02board: ti: common: board_detect: Fix EEPROM read quirk for 2-byteNeha Malcom Francis
EEPROM detection logic in ti_i2c_eeprom_get() involves figuring out whether addressing is 1-byte or 2-byte. There are currently different behaviours seen across boards as documented in commit bf6376642fe8 ("board: ti: common: board_detect: Fix EEPROM read quirk"). Adding to the list, we see that there are 2-byte EEPROMs that read properly with 1-byte addressing with no offset. For ti_i2c_eeprom_am6_get where eeprom parse operation is dynamic, the earlier commit d2ab2a2bafd5 ("board: ti: common: board_detect: Fix EEPROM read quirk for AM6 style data") tried to resolve this by running ti_i2c_eeprom_get() twice. However this commit along with its former commit fails on J7 platforms where EEPROM successfully return back the header on 1-byte addressing and continues to do so until an offset is introduced. So the second read incorrectly determines the EEPROM as 1-byte addressing. A more generic solution is introduced here to solve this issue: 1-byte read without offset and 1-byte read with offset. If both passes, it follows 1-byte addressing else we proceed with 2-byte addressing check. Tested on J721E, J7200, DRA7xx, AM64x Signed-off-by: Neha Malcom Francis <n-francis@ti.com> Fixes: d2ab2a2bafd5 (board: ti: common: board_detect: Fix EEPROM read quirk for AM6 style data) Fixes: bf6376642fe8 (board: ti: common: board_detect: Fix EEPROM read quirk) Tested-By: Matwey V. Kornilov <matwey.kornilov@gmail.com>
2023-01-02Add CONFIG_SYS_NAND_SELF_INIT to Kconfig for NAND DENALI driverLokanathan, Raaj
Add the CONFIG_SYS_NAND_SELF_INIT to the Kconfig to follow the changes from mainline. Signed-off-by: Lokanathan, Raaj <raaj.lokanathan@intel.com> Signed-off-by: Jit Loon Lim <jit.loon.lim@intel.com>
2023-01-02serial: Use -EAGAIN in getc and putcPali Rohár
U-Boot serial code already handles -EAGAIN value from getc and putc callbacks. So change drivers code to return -EAGAIN when HW is busy instead of doing its own busy loop and waiting until HW is ready. Signed-off-by: Pali Rohár <pali@kernel.org>
2023-01-02serial: Do not write additional \r before \n for dm_serial driversPali Rohár
serial-uclass.c code already puts \r before \n for all dm_serial drivers. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-02rtc: add ht1380 driverSergei Antonov
Support Holtek HT1380/HT1381 Serial Timekeeper Chip. It provides seconds , minutes, hours, day of the week, date, month and year information. Datasheet: https://www.holtek.com.tw/documents/10179/11842/ht1380_1v130.pdf Signed-off-by: Sergei Antonov <saproj@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-02arm: uniphier: use DM_TIMER of arm a9 global timerDai Okamura
All uniphier v7 SoCs have cortex-a9 and use cortex-a9 global timer in a simple implementation. Now DM_TIMER of it is available on 35751c7f3f ("timer: sti: convert sti-timer to arm a9 global timer"), so let's switch to it. The old driver reads the lower 32bits of counter field and sets the prescaler as 50 with PERIPHCLK(=50MHz), so the global timer works as a 32-bit 1MHz timer. The DM_TIMER uses the whole 64bits with no prescaler, so the global timer works as a 64-bit PERIPHCLK timer. CONFIG_SYS_HZ_CLOCK is set as the default PERIPHCLK frequency, if there is no 'clocks' property in devicetree. Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
2023-01-02pinctrl: uniphier: add ethernet TX pin data for PXs3Dai Okamura
PXs3 Ref boards need to change the strength of ethernet ports for stability, like LD20's one. This adds the table data and fixes the boot issue on PXs3 Ref board. Fixes: 0852033309 ("ARM: uniphier: sync with Linux 5.8-rc4") Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
2023-01-02pinctrl: uniphier: add check if pins are validDai Okamura
The pinctrl datas of uniphier SoCs are the minimal subsets of kernel's one, and some tables has no data to save the footprint size. If the board dts tries to match a pin name on no pins defined SoC, the footprint magic code causes "Synchronous Abort". This checks if the 'pins' data is valid, and if empty, avoids the abort with the warning as follows: WARNING at drivers/pinctrl/uniphier/pinctrl-uniphier-core.c:36/uniphier_pinctrl_get_pins_count()! pinctrl_select_state_full: pinctrl_config_one: err=-38 Signed-off-by: Dai Okamura <okamura.dai@socionext.com>
2023-01-02dts: synquacer: Drop unused and undocumented GPIO 'base' propertyRob Herring
The 'base' GPIO controller property is unused in u-boot and Linux. It is also not documented in the binding. So drop it. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-01-02dts: synquacer: Drop unused and undocumented SPI propertiesRob Herring
'active_clk_edges' and 'chipselect_num' SPI controller properties are unused in u-boot and Linux. They are also not documented in the binding. So drop them. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-01-02powerpc: dts: keymile: Deduplicate binman codePali Rohár
kmcent2-u-boot.dtsi file contains copy of powerpc u-boot.dtsi binman file. So remove code duplication and replace it by including u-boot.dtsi file. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-01-02dts: synquacer: Fix idle-states 'entry-method' valueRob Herring
The correct value for 'entry-method' in the idle-states binding is 'psci', not 'arm,psci'. It hasn't mattered because it isn't used by the OS. Signed-off-by: Rob Herring <robh@kernel.org>
2023-01-02dts: synquacer: Fix "arm, armv7-timer-mem" node address sizesRob Herring
The "arm,armv7-timer-mem" schema defines the address sizes for child nodes to be 32-bit as there's no need for 64-bit offsets and sizes of the child 'frame' nodes. Signed-off-by: Rob Herring <robh@kernel.org>
2023-01-02dts: synquacer: Use generic node namesRob Herring
DT node names should follow generic names defined in the DT spec. These are also now checked by dtschema tools. Signed-off-by: Rob Herring <robh@kernel.org>
2023-01-02dts: synquacer: Drop CPU 'arm,armv8' compatiblesRob Herring
'arm,armv8' compatible is for software models only. so drop it from cpu nodes. Signed-off-by: Rob Herring <robh@kernel.org>
2023-01-02arm: dts: ti: k3-am64-mcu: Add pinctrlChristian Gmeiner
Add the definition of the pinctrl for the MCU domain. Same as kernel commit 500e6dfbb465531150ac6e2ff0856dd357ddc8a4 Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Nishanth Menon <nm@ti.com>
2022-12-31Merge branch '2022-12-31-cmd-source-support-specifying-config-name' into nextTom Rini
To quote the author: This series adds support for using configs with the source command. And to paraphrase the rest, see the patch commit messages for more details.
2022-12-31cmd: source: Support specifying config nameSean Anderson
As discussed previously [1,2], the source command is not safe to use with verified boot unless there is a key with required = "images" (which has its own problems). This is because if such a key is absent, signatures are verified but not required. It is assumed that configuration nodes will provide the signature. Because the source command does not use configurations to determine the image to source, effectively no verification takes place. To address this, allow specifying configuration nodes. We use the same syntax as the bootm command (helpfully provided for us by fit_parse_conf). By default, we first try the default config and then the default image. To force using a config, # must be present in the command (e.g. `source $loadaddr#my-conf`). For convenience, the config may be omitted, just like the address may be (e.g. `source \#`). This also works for images (`source :` behaves exactly like `source` currently does). [1] https://lore.kernel.org/u-boot/7d711133-d513-5bcb-52f2-a9dbaa9eeded@prevas.dk/ [2] https://lore.kernel.org/u-boot/042dcb34-f85f-351e-1b0e-513f89005fdd@gmail.com/ Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-31cmd: source: Clean up a few linesSean Anderson
This simplifies a few lines and corrects an error message. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-31treewide: Use NULL for script image nameSean Anderson
Two callers of image_source_script specify an image name. However, both use the deprecated @ syntax, indicating that they have not been updated in a while. If CONFIG_FIT_SIGNATURE is enabled, we will reject such names outright. Back in commit 152576a598c ("stm32mp: stm32prog: handle U-Boot script in flashlayout alternate"), we even renamed one of the nodes. Instead of hard-coding a script image name, just use the default image. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2022-12-31test: Add test for source commandSean Anderson
This adds a basic test for FIT image handling by the source command. It's a python test becase we need to run mkimage. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-31image: Add fallback for fit_config_verifySean Anderson
Add a fallback for this function so it can be used without regard to whether FIT_SIGNATURE is enabled or not. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-23Merge branch '2022-12-23-complete-phase1-CONFIG-migration' into nextTom Rini
- Bring in the final series to complete the main portion of migrating CONFIG symbols to either Kconfig or CFG namespace (or removing / renaming entirely). With this, we have stricter CI tests as well now.
2022-12-23common/spl/spl_ram: Remove unused defaultTom Rini
We ask for CONFIG_SPL_LOAD_FIT_ADDRESS in Kconfig, so we cannot define it in C as a fall-back. However, this option previously was buried under "if ... endif" Kconfig logic. Rework a number of config options to now have more robust dependency lines so that we can ask this address when needed. With that done, we can remove the fallback in spl_ram.c. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23cf_spi.c: Rename CONFIG_SPI_IDLE_VAL to SPI_IDLE_VALTom Rini
This value is never changed by boards, so just rename it to SPI_IDLE_VAL to fit with the rest of the code. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23pci-rcar-gen3: Rename CONFIG_SEND_ENABLETom Rini
We rename the symbol CONFIG_SEND_ENABLE to just SEND_ENABLE, and remove the second whitespace following the define. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23post: Move CONFIG_SYS_POST to CFG_SYS_POSTTom Rini
Migrate the rest of the CONFIG_SYS_POST macros over to CFG_SYS_POST namespace. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23kbuild: Remove checking for adhoc CONFIG symbolsTom Rini
At this point all listed adhoc CONFIG symbols have been migrated to Kconfig or removed from the tree or renamed to CFG (or similar). We also now have CI tests that will error on any new introductions, and checkpatch.pl also looks. We can now remove these hooks and related scripts. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23CI: Replace unmigrated symbol test with non-Kconfig introduction testTom Rini
Now that all symbols have been migrated to Kconfig, or are part of the CFG namespace we do not need a complex check for unmigrated CONFIG symbols. Any instance of #define (or #undef) or a CONFIG value is wrong, so cause CI to fail. This test is not as strict as possible yet as we have more symbols that were not previously caught to deal with. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23checkpatch.pl: Update CONFIG logic in U-Boot sectionTom Rini
Now that all CONFIG symbols are in Kconfig, checkpatch.pl should check for and error on any case of define/undef CONFIG_*. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23kbuild: Remove uncmd_spl logicTom Rini
At this point in the conversion there should be no need to have logic to disable some symbol during the SPL build as all symbols should have an SPL counterpart. The main real changes done here are that we now must make proper use of CONFIG_IS_ENABLED(DM_SERIAL) rather than many of the odd tricks we developed prior to CONFIG_IS_ENABLED() being available. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23bcmcygnus: Convert CONFIG_IPROC to KconfigTom Rini
Select this symbol as needed. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23configs: Remove unused or redundant CONFIG symbolsTom Rini
A number of CONFIG symbols have crept in that are never referenced in code, so drop them here. Further, we have two symbols being enabled in headers while already enabled correctly in Kconfig, so these lines can also be removed. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23librem5: Rename CONFIG_POWER_BD71837 symbolsTom Rini
Rename the CONFIG_POWER_BD71837_I2C_* symbols to not have the CONFIG prefix and be local to the file they are used in. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_X86_REFCODE_RUN_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_X86_REFCODE_RUN_ADDR to CFG_X86_REFCODE_RUN_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_X86_REFCODE_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_X86_REFCODE_ADDR to CFG_X86_REFCODE_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_X86_MRC_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_X86_MRC_ADDR to CFG_X86_MRC_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_WATCHDOG_PRESC et al to CFGTom Rini
Perform simple renames of: CONFIG_WATCHDOG_PRESC to CFG_WATCHDOG_PRESC CONFIG_WATCHDOG_RC to CFG_WATCHDOG_RC Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_VSC7385_IMAGE et al to CFGTom Rini
Perform simple renames of: CONFIG_VSC7385_IMAGE to CFG_VSC7385_IMAGE CONFIG_VSC7385_IMAGE_SIZE to CFG_VSC7385_IMAGE_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_USB_ISP1301_I2C_ADDR to CFGTom Rini
Perform a simple rename of CONFIG_USB_ISP1301_I2C_ADDR to CFG_USB_ISP1301_I2C_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>