Commit graph

7 commits

Author SHA1 Message Date
Stephen Boyd
cd72dbb2a7 clk-eyeq: Add support for Mobileye EyeQ7H
This patchset brings the support of the Other Logic Blocks (OLB)
 found in the first Mobileye SoC based on the RISC-V architecture, the
 EyeQ7H. Despite the change from MIPS to RISC-V, the Other Logic Blocks
 provide similar clock and reset functions to the controllers of the
 chip. This series introduces the device tree bindings of the SoC and
 the necessary changes to the clock and reset eyeq drivers.
 
 Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEy6c1E9KFcNpKUem2OLE8WZ9QiKgFAmpZ6HEbFIAAAAAABAAO
 bWFudTIsMi41KzEuMTIsMiwyAAoJEDixPFmfUIioZPEP/3m6axQcd5jsnpGnIsjf
 mR/5MbWEJFHjs4rxtWD9xeIqu2NEW1rz1lbw4wWr1Tp4KgrtOTFlkt7hRVzW7QV9
 BHOMM85Ssaolk50iMSSDhINkBQtWBd4Xg+fVE18ZrZbMW781lnOsp5wlQK81KUy1
 BST5QCIuEssJZkI2sDaI1DSf1hQkUPZmIgfA8i+QlQUq16u/e6mu9Y4eR4CWT0gr
 VBSiFACjPnucSSVu9vxYvcrrq5QqKsvtsfAUucmI23JmuA65OTUuJLwdHqQod+6n
 R99om1zc7z2CQITuTDrSQVO9yGmxpDaAu6jVl4SKTax+KJBVt05CWOle8kyO2Mew
 2k+yGb2PgW87HwompCU6y1R7BcuStjxs11dWs9XP75rhzxD8/wluOr1Mah7w7Z/P
 mkBoB0KLwtPZsfeEQwFTOWK6ox+joGGAN/7VoGSgQvzbK4rJbfVh+AEa81aV6MxV
 J9kMZLC+Y7b/QqM1KG5p57IyVVeY7XWRQe/VPK/Uqvm1B8QwhGRPVI4ihnB+MLkp
 WDli4KVlaWmXmS1jT29nVqWxjvCS0AnWe6hNgVIIFg+jwRtMhoQZx8xxRIEVcFai
 YvjgX+0eG49f2MKtLssaQ6DyttqSGFMT6OTrMfWw/xM4Y0ehic+1oTz9APUow1WX
 0RNW9PRZv9ylFpxAE8XfJ0FR
 =w3Sh
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmp782EUHHN3Ym95ZEBj
 aHJvbWl1bS5vcmcACgkQrQKIl8bklSVoWxAAmsUHIZEsHi+O+oKY5WIxBWzKk4d3
 WarkDQcYYnL/YCK6N4luG35yVj52hAdrGT5sFERaNgq1dlfKrSvCOO3Tzwn8ZFzf
 LMawqnQ5hdPigHQTiU9rj+ET77s9w/dXZ5NRP28+oX3Zs8uNszgrJqDKVuYyC3zJ
 fzXJbhrL8W/JK1VSmX3IkEy9bAutX+Ct+CBF4dQfbwiEQZut6KZubPjWS78acu56
 VL4hC0I4X/b3z4W8D3yAGPdH9asiUuKyghQTYjUF5xi68V+hTlMxMI2W8daLbdAQ
 8chl96p5OARNzukNbM7rGf0SNywmHhWWaQYBNaVtj8gb1FjPv8lLyM1eEDaBrn8H
 U3eVobyLtPsy6oAioN+qWU4a8npKqQvHL9Dmn2XyRq3kcLxDy8/8z3tbeAiwVMa4
 v51PsPNnogfnefgrTKsPmOsLr+5Cg/d5mnTkqxIQYYYxliCERXquS3IoWB5iPHVD
 uMfxpCaFRKqMEEtMmrBFPSPCwdhhHGHQDkKDcfEpCFCjC27BXWorcERruedrVMrZ
 NM6TrYEYu69FFpWfpiGYy/ruuS6lRoqpBylH8aczyqNTwuIsUgq3FHhz3qLKD2iY
 8eN25pu4C2D3O9FRr1lDEVuwVaH9JRY3Eq7izEUCQWq8pQ4kUf+aJ/3W3RE82bIW
 BEdrCQp3pdv3EcU=
 =izC9
 -----END PGP SIGNATURE-----

Merge tag 'clk-eyeq7h-7.3' of ssh://github.com/benoitmonin/linux into clk-mobileye

Pull Mobileye clk driver updates from Benoît Monin:

 - Add support for Mobileye EyeQ7H

This patchset brings the support of the Other Logic Blocks (OLB)
found in the first Mobileye SoC based on the RISC-V architecture, the
EyeQ7H. Despite the change from MIPS to RISC-V, the Other Logic Blocks
provide similar clock and reset functions to the controllers of the
chip. This series introduces the device tree bindings of the SoC and
the necessary changes to the clock and reset eyeq drivers.

Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>

* tag 'clk-eyeq7h-7.3' of ssh://github.com/benoitmonin/linux:
  clk: eyeq: Add EyeQ7H compatibles
  clk: eyeq: Drop PLL, dividers, and fixed factors structs
  clk: eyeq: Convert clocks declaration to eqc_clock
  clk: eyeq: Introduce a generic clock type
  clk: eyeq: Prefix the PLL registers with the PLL type
  clk: fixed-factor: Export __clk_hw_register_fixed_factor()
  clk: fixed-factor: Rework initialization with parent clocks
  reset: eyeq: Add EyeQ7H compatibles
  dt-bindings: soc: mobileye: Add EyeQ7H OLB
2026-08-11 21:14:53 -07:00
Benoît Monin
379fc3b26b reset: eyeq: Add EyeQ7H compatibles
Add support for the reset controllers found in the EyeQ7H OLB. For
this, three new types of reset domain are added to the driver.

The EQR_EYEQ7H_ACRP reset domain is similar to the EQR_EYEQ5_ACRP domain,
sharing the same register address calculation but featuring a different
register layout. When writing to the register, MBIST bits are set to
zero to ensure normal device operation.

The EQR_EYEQ7H_CFG reset domain is similar to the EQR_EYEQ5_PCIE domain,
with two bits per device instead of one. These two bits, clock enable and
nreset, are kept in sync when asserting and deasserting the device reset.

The EQR_EYEQ7H_ACC reset domain is similar to the EQR_EYEQ6H_SARCR domain,
with a different registers layout and no busy waiting.

Alongside these new reset domains, add EQR_NB_DOM_TYPES at the end of the
eqr_domain_type enumeration and use it to declare the eqr_timings array.
This ensures that we have the expected number of entries when using the
timings in eqr_busy_wait_locked().

Add and order the auxiliary_device_id entries in eqr_id_table.

Originally-by: Sari Khoury <sari.khoury@mobileye.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
2026-07-17 10:09:56 +02:00
Uwe Kleine-König (The Capable Hub)
995832b2ce Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files)
Replace the #include of <linux/mod_devicetable.h> by the more specific
<linux/device-id/*.h> where applicable. For most cases the include
can be dropped completely, only a few drivers need one or two headers
added.

Acked-by: Danilo Krummrich <dakr@kernel.org>
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
2026-07-03 07:38:17 +02:00
Théo Lebrun
4ac170432c
reset: eyeq: drop device_set_of_node_from_dev() done by parent
Our parent driver (clk-eyeq) now does the
	device_set_of_node_from_dev(dev, dev->parent)
call through the newly introduced devm_auxiliary_device_create() helper.

Doing it again in the reset-eyeq probe would be redundant.
Drop both the WARN_ON() and the device_set_of_node_from_dev() call.
Also fix the following comment that talks about "our newfound OF node".

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-04-28 19:03:50 -07:00
Benoît Monin
36cab4bd8b reset: eyeq: Add Mobileye EyeQ6Lplus OLB
Declare the two reset domains found in the EyeQ6Lplus OLB and add
them to the data matched by 'mobileye,eyeq6lplus-olb' compatible.

Those reset domains are identical to those present in the EyeQ5
OLB, so no changes are needed to support them.

Also select reset-eyeq for all EYEQ SoCs instead of listing each one
individually, as it is needed by all Mobileye EyeQ SoC.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2026-04-13 15:31:40 +02:00
Johan Hovold
9a52827a9b reset: eyeq: fix OF node leak
Make sure to drop the OF node reference taken when probing the auxiliary
device when the device is later unbound.

Fixes: 487b1b32e3 ("reset: eyeq: add platform driver")
Cc: Théo Lebrun <theo.lebrun@bootlin.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20250708085613.15823-1-johan@kernel.org
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2025-08-27 16:40:13 +02:00
Théo Lebrun
487b1b32e3 reset: eyeq: add platform driver
Add Mobileye EyeQ reset controller driver, for EyeQ5, EyeQ6L and EyeQ6H
SoCs. Instances belong to a shared register region called OLB and gets
spawned as auxiliary device to the platform driver for clock.

There is one OLB instance for EyeQ5 and EyeQ6L. There are seven OLB
instances on EyeQ6H; three have a reset controller embedded:
 - West and east get handled by the same compatible.
 - Acc (accelerator) is another one.

Each instance vary in the number and types of reset domains.
Instances with single domain expect a single cell, others two.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://lore.kernel.org/r/20240730-mbly-reset-v2-2-00b870a6a2ff@bootlin.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2024-09-02 12:12:41 +02:00