summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'u-boot-atmel-2021.10-a' of ↵Tom Rini2021-06-1734-161/+109
|\ | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-atmel into next First set of u-boot-atmel features for the 2021.10 cycle: This feature set converts the boards pm9261 and pm9263 Ethernet support to DM; enables hash command for all SAM boards; fixes the NAND pmecc bit-flips correction; adds Falcon boot for sama5d3_xplained board; and other minor adjustments.
| * board: sama5d3_xplained: add Falcon boot supportMichael Opdenacker2021-06-142-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This supports Falcon boot support for Microchip SAMA5D3 Xplained, tested on raw MMC, and on raw NAND. spl_start_uboot() is has the simplest possible implementation. It doesn't test the environment because enabling environment support currently causes the SPL to exceed its maximum size (64 KiB). It doesn't check the serial for incoming characters either because this functionality currently doesn't seem to work from the SPL on this board. Settings for Falcon boot from at FAT partition are also added to avoid compile failures when CONFIG_SPL_OS_BOOT is enabled, but this particular case is currently not functional as adding FAT and partition support cause the SPL to be too big again. Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
| * configs: sam boards: add hash commandEugen Hristev2021-06-1422-0/+44
| | | | | | | | | | | | | | Add hash and hash verify commands. These would be useful for verifying copied data. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| * configs: sam9x60ek: Enable NAND on mmc defconfigTudor Ambarus2021-06-071-0/+7
| | | | | | | | | | | | | | | | Enable NAND on mmc defconfig for greater flexibility and for consistency reasons. All our other boards that have a NAND flash integrated, enable NAND regardless of the type of the defconfig. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * nand: atmel: Correct bitflips in erased pagesKai Stuhlemmer (ebee Engineering)2021-06-071-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not correcting anything in case of empty ECC data area is not an appropriate strategy, because an uncorrected bit-flip in an empty sector may cause upper layers (namely UBI) fail to work properly. Therefore the approach chosen in Linux kernel and other u-boot mtd drivers has been adopted, where a heuristic implemented by nand_check_erased_ecc_chunk() is used in order to detect and correct empty sectors. Tested with sama5d3_xplained and sam9x60-ek. Signed-off-by: Kai Stuhlemmer (ebee Engineering) <kai.stuhlemmer@ebee.de> Tested-by: Tudor Ambarus <tudor.ambarus@microchip.com> [ta: reorder if conditions, change commit subject, s/uint8_t/u8.] Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * Revert "sama5d3: Fix Galois Field Table offsets"Tudor Ambarus2021-06-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 786f888b743e9b83c9095cb9b5548ebe2e29afc5. Looks like the datasheet at https://ww1.microchip.com/downloads/en/DeviceDoc/SAMA5D3-Series-Data-sheet-DS60001609b.pdf is wrong, and the testing was poorly done, because the PMECC did not raise any error, but also didn't correct any bitflips. Restoring the offsets as they were before, makes the PMECC on sama5d3x capable of correcting bitflips. Fixes: 786f888b74 ("sama5d3: Fix Galois Field Table offsets") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
| * configs: sama5d27_wlsom1_ek_mmc: add default bootargsEugen Hristev2021-06-021-0/+1
| | | | | | | | | | | | | | | | Add default bootarguments with booting from mmc0 for this configuration. This will allow a default Linux boot for this board. Suggested-by: Jarvis Chen <jarvis.chen@microchip.com> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| * configs: sama7g5ek: increase bootm lenEugen Hristev2021-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Increase the BOOTM_LEN to 32M . This would allow a bigger kernel image to be booted, for example the multi_v7_defconfig. Loading Kernel Image Image too large: increase CONFIG_SYS_BOOTM_LEN Must RESET board to recover resetting ... Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
| * board: pm9263: fix some typos in commentsIlko Iliev2021-05-132-6/+6
| | | | | | | | | | | | Fix comment typos Signed-off-by: Ilko Iliev <iliev@ronetix.at>
| * board: pm9263: switch to use DM_ETHIlko Iliev2021-05-133-63/+2
| | | | | | | | | | | | | | | | Enable CONFIG_DM_ETH in configs/pm9263_defconfig Drop legacy initialization in board/ronetix/pm9263.c Remove network related setting from include/configs/pm9263.h Signed-off-by: Ilko Iliev <iliev@ronetix.at>
| * board: pm9261: remove network supportIlko Iliev2021-05-133-65/+2
| | | | | | | | | | | | | | The network support is removed because there is no DM for Davicom DM9000. Signed-off-by: Ilko Iliev <iliev@ronetix.at>
| * configs: gardena-smart-gateway-at91sam: Adjust to production valuesReto Schneider2021-05-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit updates the default config with the values that are actually used "in the wild" and which are close to what is used on the MediaTek MT7688 based, 2nd generation of the GARDENA smart gateway: - Reduce startup time by setting bootdelay to 0 (still allows accessing the shell, one just has to send a key press quicker) - Adjusting U-Boot environment volume names and MTD partitions to the actual layout Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com> Reviewed-by: Stefan Roese <sr@denx.de>
* | Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv ↵Tom Rini2021-06-1724-1711/+1437
|\ \ | | | | | | | | | | | | | | | into next - K210 updates
| * | test: Add K210 PLL tests to sandbox defconfigsSean Anderson2021-06-173-0/+6
| | | | | | | | | | | | | | | | | | | | | This adds the unit test for the K210 PLL to the sandbox defconfigs. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | k210: Don't imply CCFSean Anderson2021-06-172-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the k210 clock driver does not depend on CCF, we should no longer imply it (and probably should not have in the first place). We can also reduce the pre-relocation malloc arena back to something sensible. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | k210: dts: Set PLL1 to the same rate as PLL0Sean Anderson2021-06-172-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Linux has had some stability issues when using AISRAM with a different frequency from SRAM. Mirror their change here now that we relocate into AISRAM. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | clk: k210: Move k210 clock out of its own subdirectorySean Anderson2021-06-176-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have only one clock driver, we don't need to have our own subdirectory. Move the driver back with the rest of the clock drivers. The MAINTAINERS for kendryte pinctrl is also fixed since it has always been wrong. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | clk: k210: Remove bypass driverSean Anderson2021-06-173-305/+1
| | | | | | | | | | | | | | | | | | | | | | | | This driver no longer serves a purpose now that we have moved away from CCF. Drop it. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | clk: k210: Don't set PLL rates if we are already at the correct rateSean Anderson2021-06-171-7/+8
| | | | | | | | | | | | | | | | | | | | | This speeds up boot by preventing multiple reconfigurations of the PLLs. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | clk: k210: Re-add support for setting rateSean Anderson2021-06-171-5/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for setting clock rates, which was left out of the initial CCF expunging. There are several tricky bits here, mostly related to the PLLS: * The PLL's bypass is broken. If the PLL is reconfigured, any child clocks will be stopped. * PLL0 is the parent of ACLK which is the CPU and SRAM's clock. To prevent stopping the CPU while we configure PLL0's rate, ACLK is reparented to IN0 while PLL0 is disabled. * PLL1 is the parent of the AISRAM clock. This clock cannot be reparented, so we instead just disallow changing PLL1's rate after relocation (when we are using the AISRAM). Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | clk: k210: Implement soc_clk_dumpSean Anderson2021-06-171-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | Since we are no longer using CCF we cannot use the default soc_clk_dump. Instead, implement our own. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | clk: k210: Move pll into the rest of the driverSean Anderson2021-06-175-663/+601
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that there no separate PLL driver, we can no longer make the PLL functions static. By moving the PLL driver in with the rest of the clock code, we can make these functions static again. We still keep the pll header for unit testing, but it is pretty reduced. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | clk: k210: Rewrite to remove CCFSean Anderson2021-06-175-584/+498
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is effectively a complete rewrite to remove all dependency on CCF. The code is now smaller, and so is the binary. It also takes up less memory at runtime (since we don't have to create 40 udevices). In general, I am much happier with this driver as much of the complexity and late binding has been removed. The k210_*_params structs which were previously used to initialize CCF clocks are now used as the complete configuration. Since we can write our own division logic, we can now do away with several "half" clocks which only existed to provide constant factors of two. The clock IDs have been renumbered to remove unused clocks. This may not be the last time they are renumbered, since we have diverged with Linux. There are also still a few clocks left out which may need to be added back in. In general, I have tried to leave out behavioral changes. However, there is a small bugfix regarding ACLK. According to the technical reference manual, its mux comes *after* its divider (which is present only for PLL0). This would have required yet another intermediate clock to fix with CCF, but with the new driver it is just 2 lines of code :) Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
| * | clk: Allow force setting clock defaults before relocationSean Anderson2021-06-175-17/+46
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 291da96b8e ("clk: Allow clock defaults to be set during re-reloc state for SPL only") it has been impossible to set clock defaults before relocation. This is annoying on boards without SPL, since there is no way to set clock defaults before U-Boot proper. In particular, the aisram rate must be changed before relocation on the K210, since U-Boot will hang if we try and change the rate while we are using aisram. To get around this, extend the stage parameter to allow force setting defaults, even if they would be otherwise postponed for later. A device tree property was decided against because of the concerns in the original commit thread about the overhead of repeatedly parsing the device tree. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge tag 'ti-v2021.10-next-v2' of ↵Tom Rini2021-06-1383-358/+5167
|\ \ | | | | | | | | | | | | | | | | | | | | | https://source.denx.de/u-boot/custodians/u-boot-ti into next - HSM re-architecture support for all K3 platforms - AM64 USB support - Driver model support for Davinci RTC
| * | dma: ti: k3-udma: Add support for native configuration of chan/flowVignesh Raghavendra2021-06-112-4/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In absence of Device Manager (DM) services such as at R5 SPL stage, driver will have to natively setup TCHAN/RCHAN/RFLOW cfg registers. Add support for the same. Note that we still need to send chan/flow cfg message to TIFS via TISCI client driver in order to open up firewalls around chan/flow but setting up of cfg registers is handled locally. U-Boot specific code is in a separate file included in main driver so as to maintain similarity with kernel driver in order to ease porting of code in future. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210607141753.28796-8-vigneshr@ti.com
| * | soc: ti: k3-navss-ringacc: Add support for native configuration of ringsVignesh Raghavendra2021-06-112-3/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In absence of Device Manager (DM) services such as at R5 SPL stage, driver will have to natively setup Ring Cfg registers. Add support for the same. Note that we still need to send RING_CFG message to TIFS via TISCI client driver in order to open up firewalls around Rings. U-Boot specific code is in a separate file included in main driver so as to maintain similarity with kernel driver in order to ease porting of code in future. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210607141753.28796-7-vigneshr@ti.com
| * | ARM: dts: k3: Add cfg register space for ringacc and udmapVignesh Raghavendra2021-06-113-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | R5 SPL needs access to cfg space of Rings and UDMAP, therefore add RING CFG, TCHAN CFG and RCHAN CFG address ranges. Note that these registers are present within respective IPs but are not populated in Linux DT nodes (as they are configured via TISCI APIs) and hence are added to -u-boot.dtsi for now. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210607141753.28796-6-vigneshr@ti.com
| * | ARM: dts: j72xx-r5-common-proc-board: Add DM firmware nodeVignesh Raghavendra2021-06-112-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | Add DM firmware node which will provide DM services during R5 SPL stage. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210607141753.28796-5-vigneshr@ti.com
| * | firmware: ti_sci: Add support for Resoure Management at R5 SPL stage.Vignesh Raghavendra2021-06-112-10/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On J721e and J7200, MCU R5 core (boot master) itself would run Device Manager (DM) Firmware and interact with TI Foundational Security (TIFS) firmware to enable DMA and such other Resource Management (RM) services. So, during R5 SPL stage there is no such RM service available and ti_sci driver will have to directly interact with TIFS using DM to DMSC channels to request RM resources. Therefore add DT binding and driver for the same. This driver will handle Resource Management services at R5 SPL stage. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210607141753.28796-4-vigneshr@ti.com
| * | firmware: ti_sci: Implement GET_RANGE with static dataVignesh Raghavendra2021-06-112-0/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of R5 SPL, GET_RANGE API service is not available (as DM services are not yet up), therefore service such calls locally using per SoC static data. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210607141753.28796-3-vigneshr@ti.com
| * | mailbox: k3-sec-proxy: Add DM to DMSC communication threadVignesh Raghavendra2021-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | R5 SPL would need to talk to DMSC using DM to DMSC sec-proxy threads. Mark these as valid threads in the driver. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Link: https://lore.kernel.org/r/20210607141753.28796-2-vigneshr@ti.com
| * | arm: dts: k3-j72xx: correct MCU timer1 frequencyTero Kristo2021-06-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MCU timer1 is used as the tick timer for MCU R5 SPL, and the clock-frequency defined in DT appears to be incorrect at the moment. Actual clock source for the timer is MCU_SYSCLK0 / 4 which is 250MHz. Earlier setup of 25MHz went unnoticed, as there was a separate issue with omap-timer, which caused an error to the clock by a factor of 8 with j7 devices. This problem surfaced once the omap-timer was fixed. Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | board: ti: j72xx: README: update build instructions and image formatsTero Kristo2021-06-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update build instructions and image formats based on HSM rearch. A new DM image is added into the build, which gets executed right after R5 SPL finishes its job. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | configs: j7200_evm_r5: Enable raw access power management featuresDave Gerlach2021-06-111-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sysfw is not going to provide access to power management features in the new architecture, so SPL must implement these itself. Enable all the raw register access based clock + power domain drivers. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | configs: j721e_evm_r5: Enable raw access power management featuresTero Kristo2021-06-111-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sysfw is not going to provide access to power management features in the new architecture, so SPL must implement these itself. Enable all the raw register access based clock + power domain drivers. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | arm: mach-k3: j721e_init: Force early probe of clk-k3 driverDave Gerlach2021-06-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Force the clk-k3 driver to probe early during R5 SPL boot to ensure the default system clock configuration is completed. Many other drivers assume a default state of the clock tree and it is currently possible for them to probe before clk-k3 depending on the exact system configuration. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Reported-by: Keerthy <j-keerthy@ti.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | arm: mach-k3: sysfw-loader: pass boardcfg to sciserverTero Kristo2021-06-111-7/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | Copy the contents of the board config loaded from sysfw.itb into an EXTBOOT shared memory buffer that gets passed to sciserver. This only needs to be done if EXTBOOT area has not been populated by ROM code yet. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | arm: mach-k3: common: Drop main r5 startDave Gerlach2021-06-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Only start-up the non-linux remote cores if we are running in legacy boot mode. HSM rearch is not yet supporting this. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | arm: mach-k3: do board config for PM only if supportedTero Kristo2021-06-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the raw PM support is built in, we are operating in the split firmware approach mode where PM support is not available. In this case, skip the board config for this. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | arm: mach-k3: add support for detecting firmware images from FITTero Kristo2021-06-113-10/+78
| | | | | | | | | | | | | | | | | | | | | | | | Add callback routines for parsing the firmware info from FIT image, and use the data to boot up ATF and the MCU R5 firmware. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | arm: mach-k3: Add platform data for j721e and j7200Dave Gerlach2021-06-117-1/+1491
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add platform clock and powerdomain data for J721e and J7200. This data is used by the corresponding drivers to register all the required device clocks and powerdomains. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | tools: k3_fit_atf: add DM binary to the FIT imageTero Kristo2021-06-112-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add DM (device manager) firmware image to the fit image that is loaded by R5 SPL. This is needed with the HSM rearch where the firmware allocation has been changed slightly. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | cmd: ti: pd: Add debug command for K3 power domainsTero Kristo2021-06-115-3/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support command for debugging K3 power domains. This is useful with the HSM rearch setup, where power domains are directly controlled by SPL instead of going through the TI SCI layer. The debugging support is only available in the u-boot codebase though, so the raw register access power domain layer must be enabled on u-boot side for this to work. By default, u-boot side uses the TI SCI layer, and R5 SPL only uses the direct access methods. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * | power: domain: Introduce driver for raw TI K3 PDsTero Kristo2021-06-114-0/+452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, power domains are handled via TI-SCI in K3 SoCs. However, SPL is not going to have access to sysfw resources, so it must control them directly. Add driver for supporting this. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * | clk: add support for TI K3 SoC clocksTero Kristo2021-06-114-0/+548
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add driver to support TI K3 generation SoC clocks. This driver registers the clocks provided via platform data, and adds support for controlling the clocks via DT handles. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | clk: add support for TI K3 SoC PLLTero Kristo2021-06-114-0/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for TI K3 SoC PLLs. This clock type supports enabling/disabling/setting and querying the clock rate for the PLL. The euclidean library routine is used to calculate divider/multiplier rates for the PLLs. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | clk: fix set_rate to clean up cached rates for the hierarchyTero Kristo2021-06-111-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clock rates are cached within the individual clock nodes, and right now if one changes a clock rate somewhere in the middle of the tree, none of its child clocks notice the change. To fix this, clear up all the cached rates for us and our child clocks. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | clk: fix assigned-clocks to pass with deferring providerTero Kristo2021-06-111-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a clock provider is not ready for assigning default rates/parents during its probe, it may return -EPROBE_DEFER directly from xlate. Handle this special case properly by skipping the entry and adjusting the return value to pass. The defaults will be handled properly in post probe phase then. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>
| * | clk: sci-clk: fix return value of set_rateTero Kristo2021-06-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Set rate should return the new clock rate on success, and negative error value on failure. Fix this, as currently set_rate returns 0 on success. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Tero Kristo <kristo@kernel.org>