aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-05ns16550: Rework the logic behind SYS_NS16550_REG_SIZE dependenciesWIP/fixup-serial-stuffTom Rini2-13/+5
While it's unfortunate that we need to define a SYS_NS16550_REG_SIZE for DM_SERIAL, we can now clean up the Kconfig logic here slightly to enforce that when using NS16650 we are either using NS16550_DYNAMIC or need to specify a value here. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-05ns16650: Correct CONFIG_SYS_NS16550_MEM32 platformsTom Rini1-3/+1
There are currently no platform that are both CONFIG_SYS_NS16550_MEM32 and not (per how the logic was prior to being broken in 0478dac62a9a ("kbuild: Remove uncmd_spl logic")) enabled in CONFIG_DM_SERIAL. We drop this line out now so that platforms which do use CONFIG_SYS_NS16550_MEM32 and depending on stage may or may not have DM_SERIAL set. Fixes: 0478dac62a9a ("kbuild: Remove uncmd_spl logic") Reported-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-02Merge branch '2023-01-02-platform-updates' into nextTom Rini40-204/+731
- 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 Bosch4-36/+9
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 Bosch3-2/+12
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 Bosch3-0/+117
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 Bosch2-0/+95
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 Brunck4-8/+16
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 Francis1-12/+34
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, Raaj1-0/+1
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ár4-36/+28
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ár2-6/+0
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 Antonov4-0/+340
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 Okamura7-43/+10
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 Okamura1-1/+19
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 Okamura1-0/+3
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 Herring1-1/+0
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 Herring1-2/+0
'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ár1-20/+2
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 Herring1-1/+1
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 Herring1-5/+5
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 Herring3-7/+7
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 Herring1-24/+24
'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 Gmeiner1-0/+8
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 Rini8-33/+162
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 nameWIP/2022-12-31-cmd-source-support-specifying-config-nameSean Anderson7-28/+81
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 Anderson1-6/+4
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 Anderson2-2/+2
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 Anderson2-0/+71
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 Anderson1-0/+7
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 Rini679-2325/+1760
- 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 Rini2-18/+15
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 Rini2-10/+6
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 Rini1-3/+3
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 Rini40-138/+138
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 Rini5-391/+2
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 Rini2-48/+12
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 Rini2-5/+5
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 Rini19-85/+25
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 Rini2-3/+4
Select this symbol as needed. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23configs: Remove unused or redundant CONFIG symbolsTom Rini13-27/+1
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 Rini2-7/+5
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 Rini2-3/+3
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 Rini3-3/+3
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 Rini4-4/+4
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 Rini2-3/+3
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 Rini4-7/+7
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 Rini2-2/+2
Perform a simple rename of CONFIG_USB_ISP1301_I2C_ADDR to CFG_USB_ISP1301_I2C_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_USART_ID to CFGTom Rini7-7/+7
Perform a simple rename of CONFIG_USART_ID to CFG_USART_ID Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_USART_BASE to CFGTom Rini7-11/+11
Perform a simple rename of CONFIG_USART_BASE to CFG_USART_BASE Signed-off-by: Tom Rini <trini@konsulko.com>