Commit graph

1492 commits

Author SHA1 Message Date
Geert Uytterhoeven
08806a6e52 clk: renesas: r8a779h0: Drop CLK_PLL2_DIV2 to clarify ZCn clocks
Early revisions of the R-Car V4M Series Hardware User’s Manual
contained an incorrect formula for the CPU core clocks:

    ZCnφ = (PLL2VCO x 1/2) x mult/32

Dang-san fixed this by using CLK_PLL2_DIV2 instead of CLK_PLL2 as the
parent clock.

In Rev.0.70 of the documentation, the formula was corrected to:

    ZCnφ = (PLL2VCO x 1/4) x mult/32

As the CPG Block Diagram now shows a separate 1/4 post-divider for PLL2,
the use of CLK_PLL2_DIV2 is a recurring source of confusion.  Hence get
rid of CLK_PLL2_DIV2, and include the proper 1/4 post-divider in the
invocation of the DEF_GEN4_Z() macro, like is done on other R-Car Gen4
(and Gen3) SoCs.

Ported from Linux commit
92850bed9d4d ("clk: renesas: r8a779h0: Drop CLK_PLL2_DIV2 to clarify ZCn clocks")

Reported-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/0d2789cac2bf306145fe0bbf269c2da5942bb68f.1728377724.git.geert+renesas@glider.be
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-20 22:20:37 +01:00
Svyatoslav Ryhel
b46bd4f874 driver: clk: tegra: init basic clocks on probe
In case DM drivers probe earlier than board clock setup is done
init of basic clocks should be done in CAR driver probe as well.
Add it to avoid possible clock related problems.

Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-12-16 17:07:39 -06:00
Svyatoslav Ryhel
1db256a347 driver: clk: tegra: partially support PLL clocks
Return PLL id into struct clk if PLL is parsed from device
tree instead of throwing an error. Allow requesting PLL
clock rate via get_rate op.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2024-12-16 17:07:39 -06:00
J. Neuschäfer
69ec7f35e0 clk: mpc83xx: Fix typo in "Coherent System Bus"
Cosmetic change.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
2024-12-15 02:03:52 +01:00
Marek Vasut
d774197bb0 clk: renesas: Fix R-Car spelling
The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-11 08:36:24 +01:00
Paul Barker
9a699a0a0d clk: rzg2l: Ignore enable for core clocks
In the RZ/G2L family, core clocks are always on and can't be disabled.
However, drivers which are shared with other SoCs may call clk_enable()
or clk_enable_bulk() for a clock referenced in the device tree which
happens to be a core clock on the RZ/G2L. To avoid the need for
conditionals in these drivers, simply ignore attempts to enable a core
clock.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-12-08 23:06:52 +01:00
Simon Glass
924a5e4e41 Revert "global_data: Drop spl_handoff"
This breaks chromebook_coral which says:

   Video: No video mode configured in FSP!

This reverts commit 2e9313179a.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-02 07:40:39 -06:00
Marek Vasut
c78a81396a clk: renesas: Fix missing unbind on driver look up failure
In case lists_driver_lookup_name("rst_gen3") fails, the clk_gen3 driver
has to be unbound before erroring out. Reorder the function such that
both clk_gen3 and rst_gen3 drivers are looked up first, if either look
up fails then the function errors out right away. Second, the clk_gen3
is bound, if binding fails, the function still errors out right away
because there is nothing to undo after either lists_driver_lookup_name()
call. Finally, rst_gen3 is bound and if this binding fails, then that
is the only place where clk_gen3 has to be unbound before erroring out.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-11-03 12:25:57 +01:00
Conor Dooley
084367be4d clk: microchip: mpfs: support new syscon based devicetree configuration
Why get a devicetree description wrong once when you can get it wrong
twice? The original mistake, which the driver supports was failing to
describe the main PLL that the "cfg" and "periph" clocks parented by.
The second mistake was describing the "cfg" and "periph" clocks a
reg region within the clock controller, rather as two registers within
a syscon region that also contains pinctrl, interrupt muxing controls
and other functions.

Make up for lost time and describe these regions as they should have
been originally, preserving support for the existing two configurations
for the sake of existing systems with firmware-provided devicetrees.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-10-29 19:58:22 +08:00
Tom Rini
8963d433eb Merge tag 'u-boot-rockchip-20241026' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/22993

- New boards:
        rk3566: Hardkernel ODROID-M1S
        rk3588s: Hardkernel ODROID-M2
        rk3588: NanoPC-T6 LTS
- Migrate to use USB_DWC3_GENERIC for rk3328
- Other board level config and dts update
2024-10-26 08:10:31 -06:00
Jesse Taube
1a8d89b7ab imx: imxrt1050-evk: Fix missing clocks for mmc
Two of the clocks required by the usdhc1 controller are missing from the
clock controller node. A recent change enables all the clocks in the
esdhc node, which fails as they are not defined in the clock controller.

Fixes: 76332fae76 ("mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API")
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
2024-10-25 20:11:24 -03:00
Lukasz Czechowski
609e71e68e rockchip: px30: clk: add UART0 clock getter/setter
Add dedicated getter and setter for SCLK_UART0_PMU.
This allows the driver to correctly handle UART0 clocks, and thus
it fixes the issues with UART0 not working in case DEBUG_UART is
disabled.
Unlike other Rockchip SoCs, i.e. rk3399, in the PX30 the default
clock source for UART is GPLL, instead of external oscillator.
If the DEBUG_UART is enabled, the clock source is changed in
board_debug_uart_init function to 24Mhz oscillator, which also
matches the fallback value obtained from DT node.
In case the DEBUG_UART is disabled, the UART clock source remains
default, and the DM serial driver wrongly configures the baud rate,
resulting in broken communication.
By implementing the UART clock getter/setter, the serial driver
can probe the actual configuration and corectly configure itself.
The DEBUG_UART settings now should not affect it.

The driver supports GPLL and 24M oscillator. NPLL and USBPHY480M
sources, that are managed by CRU, are not yet handled, as likely
they won't be used in real scenarios.

Signed-off-by: Lukasz Czechowski <lukasz.czechowski@thaumatec.com>

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2024-10-25 20:47:44 +08:00
Peng Fan
6846a5b23d clk: imx8: Add dummy clk
There is a dummy clk entry for i.MX8QM/QXP, so add the dummy clk enable
and get rate. Otherwise "__imx8_clk_enable(Invalid clk ID #0)".

Fixes: 76332fae76 ("mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API")
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Heiko Schocher <hs@denx.de>
2024-10-18 09:41:09 -03:00
Tom Rini
c676fc3710 - Add Libre Computer boards into proper libre-computer board directory
- Add new Boards:
  - Libre Computer aml-s905d3-cc
  - Libre Computer aml-a311d-cc
 - Add capsule update to libretech-ac and the new boards since they have an onboard SPI nor flash
 - Fix HDMI support after sync to v6.11 and regulator enable from Marek
 - Fix khadas-vim3 android config for android-mainline kernel
 - Disable meson64 boot targets when configs are not eavailable
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmcM2SEACgkQd9zb2sjI
 SdEIVg/+L13M9cmUalXygG0T0duaOLdg9a65cqGkX6pOPGEE0MGiwsnXOakKijuf
 mIRHGHsiH/n6wGQSztZLiPp5m/g8VXxmrxjgU1nraZV1VaFgXTG0DQwuAGvY1XKh
 tvnejmELtPLP0UwSZFqJGWkTwLntz1vuysO1B2Xt/bUEOkufK9XhoKyjuyUSX2z2
 KKZH9sDf9t3eWgtDxPuFDDL0sw/y610dBxIpYh/gHk24xE2TRM4S2ccVvQ1d+35B
 MtSzZauPsnBFRL5jMSJ0TbI42I9fzlRMjWTXHw3Yi469T07XBpn9oN/mZvufa4/j
 3aJBRlC+miQZ+m0wfE1oL4AvmA/jxZDi5vhmDVZgd0Irzl390uuZnUfgFI3+cN1H
 Dzua+E/+6rx4BvUV2f6JBCAZwBBT80CMxu5MzKARIworkrK5u2eXZbcN6kJ0GjBg
 Um/c+RrUfgDpfoNLoQ3T0oIqOmdItK+LE07hHHe+aM5JlOOhr5e8n3L3pJMeroyQ
 ckJ4mEKA8ly6a72YVxsfc+sa453qH5p3QHXfvlSuP7l4zjm1F5MELRtGHlR8JXUS
 hbWx3P0ZB7ynJvoONXriIoypff8ZGavgQfoRTupCQfPvB5dh7hJTBKGBZABeXY4R
 caYDBmsZ2Nuk8Co0HwBmLq3Bx2dqehG7Mip95R9B4zNH42gPhqk=
 =oq4w
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-next-20241014' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- Add Libre Computer boards into proper libre-computer board directory
- Add new Boards:
 - Libre Computer aml-s905d3-cc
 - Libre Computer aml-a311d-cc
- Add capsule update to libretech-ac and the new boards since they have an onboard SPI nor flash
- Fix HDMI support after sync to v6.11 and regulator enable from Marek
- Fix khadas-vim3 android config for android-mainline kernel
- Disable meson64 boot targets when configs are not eavailable
2024-10-14 08:14:46 -06:00
Neil Armstrong
53a9baeefb clk: meson: gxbb: add HDMI clocks
Align with g12a driver to handle the CLKID_HDMI, CLKID_HDMI_SEL
and CLKID_HDMI_DIV clocks since they were added to the upstream
GXBB/GXL Devicetree on v6.11 with [1]

[1] https://lore.kernel.org/all/20240626152733.1350376-1-jbrunet@baylibre.com/

Link: https://lore.kernel.org/r/20241009-u-boot-topic-fix-hdmi-v1-1-2479cd90c4ea@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-10-14 09:06:16 +02:00
Tom Rini
29e5dbc55c Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
This switches all boards with the Allwinner H616/H618/H313/H700 SoCs over to
use OF_UPSTREAM. We are doing it for this SoC family only since the DTs
between the U-Boot and the kernel repo are exactly identical, whereas other
families have one compatibility fix in U-Boot to allow booting older kernels.
Other will follow if this plays out well.

The biggest chunk otherwise is adding support for an Anbernic game console,
using the H700 SoC. For that we need to enhance the DRAM support code, and
pick two DT commits from the mainline kernel/DT rebasing repo, followed
by the defconfig patch.

On top of that two small fixes for the old Allwinner A80.

Gitlab CI passed, and I booted that briefly on some boards, including an
H616 and an H618 one (with LPDDR4).
2024-10-13 20:25:41 -06:00
Tom Rini
96573a1312 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh 2024-10-13 20:25:22 -06:00
Marek Vasut
edcb15c583 clk: renesas: Synchronize R-Car R8A779H0 V4M clock tables with Linux 6.10.9
Synchronize R-Car R8A779H0 V4M clock tables with Linux 6.10.9,
commit 1611860f184a2c9e74ed593948d43657734a7098 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-13 23:21:26 +02:00
Marek Vasut
47fc273ee2 clk: renesas: Synchronize R-Car R8A779G0 V4H clock tables with Linux 6.10.9
Synchronize R-Car R8A779G0 V4H clock tables with Linux 6.10.9,
commit 1611860f184a2c9e74ed593948d43657734a7098 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-13 23:21:26 +02:00
Marek Vasut
8c417ceaed clk: renesas: Synchronize R-Car R8A779F0 S4 clock tables with Linux 6.10.9
Synchronize R-Car R8A779F0 S4 clock tables with Linux 6.10.9,
commit 1611860f184a2c9e74ed593948d43657734a7098 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-13 23:21:26 +02:00
Marek Vasut
d46a040e73 clk: renesas: Synchronize R-Car R8A779A0 V3U clock tables with Linux 6.10.9
Synchronize R-Car R8A779A0 V3U clock tables with Linux 6.10.9,
commit 1611860f184a2c9e74ed593948d43657734a7098 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-13 23:21:26 +02:00
Peng Fan
19c0e50a69 clk: imx8mp: Add i.MX8MP Dummy clk
i.MX8MP SDHC use CLK_IMX8MP_DUMMY clk entry. Without the clk, the bulk
api will return failure.

The correct entry should be replaced with IMX8MP_IPG_ROOT clk in device
tree. This will be done in Kernel device tree and sync to U-Boot in
future:
https://lore.kernel.org/all/20241012025221.1728438-1-peng.fan@oss.nxp.com/

Fixes: 76332fae76 ("mmc: fsl_esdhc_imx: Enable AHB/IPG clk with clk bulk API")
Reported-by: Gilles Talis <gilles.talis@nxp.com>
Tested-by: Gilles TALIS <gilles.talis@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-10-13 09:46:05 -03:00
Tom Rini
47e544f576 Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD"
Simon Glass <sjg@chromium.org> says:

When the SPL build-phase was first created it was designed to solve a
particular problem (the need to init SDRAM so that U-Boot proper could
be loaded). It has since expanded to become an important part of U-Boot,
with three phases now present: TPL, VPL and SPL

Due to this history, the term 'SPL' is used to mean both a particular
phase (the one before U-Boot proper) and all the non-proper phases.
This has become confusing.

For a similar reason CONFIG_SPL_BUILD is set to 'y' for all 'SPL'
phases, not just SPL. So code which can only be compiled for actual SPL,
for example, must use something like this:

   #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD)

In Makefiles we have similar issues. SPL_ has been used as a variable
which expands to either SPL_ or nothing, to chose between options like
CONFIG_BLK and CONFIG_SPL_BLK. When TPL appeared, a new SPL_TPL variable
was created which expanded to 'SPL_', 'TPL_' or nothing. Later it was
updated to support 'VPL_' as well.

This series starts a change in terminology and usage to resolve the
above issues:

- The word 'xPL' is used instead of 'SPL' to mean a non-proper build
- A new CONFIG_XPL_BUILD define indicates that the current build is an
  'xPL' build
- The existing CONFIG_SPL_BUILD is changed to mean SPL; it is not now
  defined for TPL and VPL phases
- The existing SPL_ Makefile variable is renamed to SPL_
- The existing SPL_TPL Makefile variable is renamed to PHASE_

It should be noted that xpl_phase() can generally be used instead of
the above CONFIGs without a code-space or run-time penalty.

This series does not attempt to convert all of U-Boot to use this new
terminology but it makes a start. In particular, renaming spl.h and
common/spl seems like a bridge too far at this point.

The series is fully bisectable. It has also been checked to ensure there
are no code-size changes on any commit.
2024-10-11 12:23:25 -06:00
Simon Glass
5c10c8badf global: Rename SPL_TPL_ to PHASE_
Use PHASE_ as the symbol to select a particular XPL build. This means
that SPL_TPL_ is no-longer set.

Update the comment in bootstage to refer to this symbol, instead of
SPL_

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11 11:44:48 -06:00
Simon Glass
371dc068bb drivers: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD
Use the new symbol to refer to any 'SPL' build, including TPL and VPL

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11 11:44:48 -06:00
Andre Przywara
7db2f11eb0 clk: sunxi: a80: Fix reset description
Clock gates and reset lines share a common structure in the sunxi clock
driver descriptions, but use different flags to tell them apart.

The description of the Allwinner A80 MMC clock reset lines was
erroneously using the "GATE" macro, which made the reset driver ignore
that entry, complaining with:
sunxi_set_reset: (RST-reset:#0) unhandled

Change that to the correct "RESET" macro, to make the reset driver
happy.

Fixes e0c7ce7e52 ("sunxi: clk: A80: add MMC clock support")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2024-10-10 00:23:41 +01:00
Tom Rini
c530f6079c Merge branch 'next' 2024-10-07 09:06:49 -06:00
Marek Vasut
dd4d130c8e clk: renesas: rcar-gen3: Fix SSCG caching replacement with MDSEL/PE caching
The SSCG is active with MDSEL[12] is not set. Previous commit
99c7e03119 ("clk: renesas: rcar-gen3: Replace SSCG caching
with MDSEL/PE caching") inverted the conditional assignment
of priv->sscg = !(cpg_mode & BIT(12)) during conversion from
(priv->sscg ? 16 : 0) to priv->cpg_mode & BIT(core->offset) ? 16 : 0;
Invert the assignment back to the correct state.

This fixes R8A77980, R8A77990, R8A77995 and R8A774C0.

Fixes: 99c7e03119 ("clk: renesas: rcar-gen3: Replace SSCG caching with MDSEL/PE caching")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-10-05 13:15:22 -06:00
Caleb Connolly
04584089e1
clk/qcom: sm8250: add debug data
Drop in the RCG and GPLL data for debugging these clocks.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-10-04 14:57:04 +02:00
Caleb Connolly
9b93eb4049
clk/qcom: sm6115: add debug data
Add "clk dump" support for SM6115.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-10-04 14:57:04 +02:00
Caleb Connolly
7605db1809
clk/qcom: sdm845: add dump data
Add debug data to dump PLL and RCG clocks.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-10-04 14:57:03 +02:00
Caleb Connolly
ba0598bdc8
clk/qcom: implement clk dump
Add support for dumping a few of the clocks used on Qualcomm platforms.
Naming the Global PLL's, Root Clock Generators, and gate clocks.

This helps a lot with platform bringup and feature enablement by making
it easy to sanity check that the clocks are programmed correctly.

== Usage ==

Enable CONFIG_CMD_CLK and "#define LOG_DEBUG" at the top of
qcom-<soc>.c.

The "clk dump" command should print the states of all the gates, GPLLs
and RCGs for your SoC.

== Glossary ==

RCG: Root Clock Generator
* Takes in some fairly arbitrary high freq clock (configurable clock
source and options for taking just even pulses and other things)
* Output frequency = input_freq * (m/n) * (1/d) where m/n are arbitrary
8 or 16-bit values (depending on the RCG), and d is a number (with
support for .5 offsets).

GPLL: Global Phase Locked Loop
* Crystal as input
* integer multiplier + exponent part (2^-40)

Gate: Simple on/off clock
* Put between RCGs and the peripherals they power
* Required to allow for correct power sequencing

If you do the maths manually using the equations from "clk dump", the
numbers should roughly line up by they're likely to be out by a handful
of MHz. They output is formatted so that it can be pasted directly into
the python interpreter.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-10-04 14:57:03 +02:00
Julius Lehmann
035e29c4c8
clk: qcom: add driver for SM8150 SoC
Add clock, reset and power domain driver for SM8150. Driver code is
based on the similar U-Boot drivers. All constants are taken from the
corresponding Linux driver.

This driver supports clock rate setting only debug UART,
RGMII/Ethernet modules and USB controller.

Co-authored-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Julius Lehmann <lehmanju@devpi.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-10-04 14:57:01 +02:00
Tom Rini
19dbc09405 Prepare v2024.10-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmbomBcACgkQFHw5/5Y0
 tywNnAv/ZJ+EdFyNSPAWDnzFbuG5dnkkOHcgFofhqaoXCuswm3vLSO66v/MLGAgA
 LcHcwuF5IQ8RfEZOFXdhifuiEYqnEDyhK1UNXZUdhsgjbWslfSsJva1z2/3SjtOf
 WNOg6CCGeSlW0E/kW9smaxJ/sJmW2gphuNsUNa1sTlUQ+XFgtGwbcHZvdVfogwhN
 K3tmdHDNj3bFfrMON4OI9uu6qiZAmdYv42IxMxuw/1DuVzrJ/z+5ROA9wKKNOuxz
 6QwBITnUwSDs+nDIaGphjigMAHOhbK4HvTYZ0HcvmVxm44mTHgi0/PqXzbG58cM5
 jZydm4oGD1IZyXGrOrle4CfvF/vg0SvTwFlU5KqCQAmN1elqfG87Vce2OqJGW1Y8
 /HzoiiECWlC3ejj5tFg/0cr4xBT5GI8x4KeNJzT+VNwAbCUZY9JgxIABsVjEDeAF
 OKw/lYxlmBe1zn8X8Bc6BKH5ZOutCrqrRDTGq/yEWolRODKuLIyZkwH4sR0Wfm10
 W47S5AAu
 =c7Hz
 -----END PGP SIGNATURE-----

Merge tag 'v2024.10-rc5' into next

Prepare v2024.10-rc5
2024-09-16 14:48:13 -06:00
Kongyang Liu
5f364e072e clk: sophgo: cv1800b: Add clock controller driver for cv1800b SoC
Add clock controller driver for sophgo cv1800b SoC

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-11 20:32:06 +08:00
Heinrich Schuchardt
5896ac5766 clk: sifive: avoid declaring static variables in includes
The existing code is unnecessarily convoluted:

Arrays __prci_init_clocks_fu[5|7]40  are initialized with data.
In separate includes fu[5|7]40-prci.h the size of the arrays is provided as
constants.

By moving the structures prci_clk_fu[5|7]40 to the respective code modules
we can directly use ARRAY_SIZE() to access the size of the data used for
initialization.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-09-10 10:10:43 +08:00
Heinrich Schuchardt
f7fead8914 clk: sifive: append missing \n to messages
If multiple messages are written, line-feeds improve the readability.

Fixes: c40b6df87f ("clk: Add SiFive FU540 PRCI clock driver")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
2024-09-10 10:10:43 +08:00
Caleb Connolly
f50e7be6bb
clk/qcom: add initial clock driver for sc7280
We don't actually need any clocks to get UFS up and running, resets are
useful though.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06 10:47:46 +02:00
Simon Glass
2e9313179a global_data: Drop spl_handoff
Provide a function to locate this information, rather than doing it
automatically on startup, to save space in global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26 14:05:38 -06:00
Simon Glass
5f32aac98e global_data: Move pci_clk to m68k and powerpc
Only m68k and powerpc use this field, so move it to the arch-specific
info, to reduce the size for other archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-08-26 14:05:37 -06:00
Tom Rini
158cf0270c Prepare v2024.10-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmbD0g8ACgkQFHw5/5Y0
 tywZ2QwAkw9g2+FPsQGEau5LPOGAb+OUb25BItmEAjSwQ7Kjdeef8DJOePAclsEY
 VTFl1570fphFkvdnGmNdkefXZoyQqNke6GGgM8rQj3/I6Pn0jmN+QLbcfNE4V4PC
 rY2zbBQI+ChMbgGO3sFGl5rJ8viNDasGLJVFqzQpRD0qaWw3CvqLPAz+3MtGkv7K
 k31ltUoZ/NWqGO4XFwlZkJvYPSA2L3Ng4FdXQP1Ur4zrSdevSF6QQ8rHIiqamEpv
 FwLJ/AdSuwJ/CWy8HalBH7NZdqtYLM7KhdFMcYvQmJTxz4+6KY0u5rsUsvTVvs3k
 HTXkxYoeDLdLcym+Gz0yDzKKGnWUVmgVlyGPQ6m2ZM2lk/hBOhYES4f+envYPhsk
 JBvS4ojkSwzG7Tuk3b4dUMTDNwx2pEz2fwUY/6CxCJc9KXaUJXNVNPCSr6FwH6Jc
 NbZEcwblzmkS/ozBHMd6X3Qx3w5ZptyFR7qC7dusDBA3madxta7vF5U5n9juSdhI
 7txv7SuY
 =n74P
 -----END PGP SIGNATURE-----

Merge tag 'v2024.10-rc3' into next

Prepare v2024.10-rc3
2024-08-19 18:24:58 -06:00
Tom Rini
aa2efb0873 Merge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"
Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.
2024-08-19 16:15:51 -06:00
Christian Marangi
105c78844a clk: mediatek: mt7622: add missing clock PERIBUS_SEL clock
Add missing PERIBUS_SEL clock to match upstream linux clk ID order. Also
convert pericfg to mux + gate implementation as now we have also mux on
top of gates.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19 16:15:26 -06:00
Christian Marangi
a776493f4b clk: mediatek: mt7622: add missing clock PERI_UART4_PD
Add missing clock PERI_UART4_PD for peri clock gates. This is needed to
match upstream linux clk ID in preparation for OF_UPSTREAM.
Also convert infracfg to mux + gate implementation as now we have mux on
top of gates.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19 16:15:26 -06:00
Christian Marangi
a942c0c3f5 clk: mediatek: mt7622: add missing clock MUX1_SEL
Add missing infra clock MUX1_SEL needed for CPU clock. This is needed to
match the upstream clk ID order in preparation for OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19 16:15:26 -06:00
Christian Marangi
6dfa991204 clk: mediatek: mt7622: add missing clock define for MAIN_CORE_EN
Add missing clock for MAIN_CORE_EN. This is a special clock as it's a
gate for the APMIXED clocks required as a parent for CPU clocks.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19 16:15:26 -06:00
Christian Marangi
7246138958 clk: mediatek: mt7622: move INFRA_TRNG to the bottom
Move INFRA_TRNG clock to the bottom of the clk ID to match upstream
linux order. This is in preparation of OF_UPSTREAM.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19 16:15:26 -06:00
Christian Marangi
c7978fd395 clk: mediatek: mt7622: fix broken peri_cgs clk with XTAL parents
Fix broken peri_cgs clock with XTAL parents as they have wrong
definition of the parent type.

Correctly fix them and use CLK_PARENT_XTAL for them.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-08-19 16:15:26 -06:00
Tom Rini
f9e45be1a1 Merge patch series "clk: mediatek: mt7986: clk migration for OF_UPSTREAM"
Christian Marangi <ansuelsmth@gmail.com> says:

These are all the required patches to migrate clk and correctly support
OF_UPSTREAM. This will align the clk index to upstream to support the same
clk implementation with downstream and upstream DTS.
2024-08-19 16:15:13 -06:00
Christian Marangi
54f8ba658f clk: mediatek: mt7986: rename CK to CLK
Rename each entry from CK to CLK to match the include in upstream kernel
linux.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
2024-08-19 16:14:44 -06:00