vf610: add a clock driver, ehci-vf takes its clocks from it
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | clk: imx: pllv3: add the PLL types of the VF610drivers/ | +37 | 0 replies | |
| 2/8 | clk: imx: add a clock driver for the VF610drivers/ drivers/ drivers/ | +475 | 0 replies | |
| 3/8 | serial: lpuart: take the ipg clock on the VF610drivers/ | +1 | 0 replies | |
| 4/8 | colibri_vf: use the VF610 clock driverarch/ configs/ | +15 | 0 replies | |
| 5/8 | usb: ehci-vf: enable the PHY clock through the clock driverdrivers/ drivers/ | +10 | 3 replies | |
| 6/8 | usb: ehci-vf: drop the port numberdrivers/ | +0 | 1 reply | |
| 7/8 | usb: ehci-vf: enable the controller clockdrivers/ | +9 | 0 replies | |
| 8/8 | colibri_vf: leave the USB clocks to the driversboard/ | +0 | 0 replies |
Reviews trailers per patch
1 of 8 patches has a Reviewed-by or Acked-by.
| Patch | Marek Vasut |
|---|---|
| 1/8 | |
| 2/8 | |
| 3/8 | |
| 4/8 | |
| 5/8 | |
| 6/8 | R-b |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/8] vf610: add a clock driver, ehci-vf takes its clocks from it
From: Mehmet Fide <[email protected]>
The follow-up to the ehci-vf series [1] that Marek and I agreed on in its review: the Vybrid gets a clock driver, and ehci-vf takes its clocks from it instead of setting the PLL bits of its port by hand, so the port number it kept for that goes as well, with the board_ehci_hcd_init() call no Vybrid board implements.
The driver is a port of the Linux one to the common clock framework, like those of the i.MX6, with the clock tree up to the devices U-Boot drives.
- patch 1 adds the two PLL types of the VF610 to the PLLv3 driver
- patch 2 adds the clock driver
- patch 3 makes the LPUART driver read the rate of the clock the VF610 device tree names, "ipg"; without it the baud rate is not set once CONFIG_CLK is on
- patch 4 turns the driver on for colibri_vf
- patches 5 and 6 move ehci-vf to the clock of its PHY and drop the port number and board_ehci_hcd_init()
- patches 7 and 8 have ehci-vf enable the controller clock as well and drop the USB clock setup from the board code
The series applies on next, which has the DCD change of colibri_vf (2fe1b27ba5e). colibri_vf grows from 478656 to 495672 bytes; with the DCD it has no size limit any more.
Tested on a Colibri VF50 V1.2B and a Colibri VF61 V1.2B on Iris carriers, booted from NAND and from the serial downloader of the ROM:
console, SD card, NAND and UBI, the USB host port, the DFU and mass storage gadgets, the FEC with DHCP and TFTP, the environment in NAND, and Linux 6.18 booting from NAND, with 10 power cycles and 10 resets on each module. Files read from the SD card, a UBI volume, UBIFS and over TFTP have the CRC32 of the same files read in Linux or on the server, and a file on a USB stick reads back with the same CRC32 on both modules and after a USB reset.
The clocks stay as they were: the CPU, bus and IPG rates, the 162 registers of the DDR controller and the clock tree Linux reports (rates and enable state of its 190 clocks) are the same as without the series on both modules. In U-Boot only these CCM and ANADIG fields
differ: PLL4 and PLL6, both off, leave bypass as in Linux, the FEC timestamp clock follows the assigned clocks of the device tree, and until USB starts, PLL3 stays on as the ROM left it (patch 8) and the USB controller clocks are still gated.
With I2C and DSPI built in for the test, the M41T0 on the Iris answers and a DSPI loopback returns its data at 8, 16 and 32 bits, with and without the series.
Outside the Vybrid only patch 1 reaches other boards: it adds the VF610 PLL types to the PLLv3 driver, about 210 bytes on the i.MX6 and i.MX RT boards (buildman -B), without changing the existing types. buildman builds the 58 boards with the LPUART or the PLLv3 driver at every patch without new warnings, and "ut dm" on sandbox gives the same result as without the series. I have no i.MX6 hardware to boot it on.
[1] https://lore.kernel.org/u-boot/[email protected]/
Mehmet Fide (8):
clk: imx: pllv3: add the PLL types of the VF610
clk: imx: add a clock driver for the VF610
serial: lpuart: take the ipg clock on the VF610
colibri_vf: use the VF610 clock driver
usb: ehci-vf: enable the PHY clock through the clock driver
usb: ehci-vf: drop the port number
usb: ehci-vf: enable the controller clock
colibri_vf: leave the USB clocks to the drivers
.../arm/dts/vf610-colibri-eval-v3-u-boot.dtsi | 13 + board/toradex/colibri_vf/colibri_vf.c | 14 - configs/colibri_vf_defconfig | 2 + drivers/clk/imx/Kconfig | 9 + drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-pllv3.c | 37 ++ drivers/clk/imx/clk-vf610.c | 465 ++++++++++++++++++ drivers/serial/serial_lpuart.c | 2 +- drivers/usb/host/Kconfig | 2 +- drivers/usb/host/ehci-vf.c | 77 +-- 10 files changed, 543 insertions(+), 79 deletions(-) create mode 100644 drivers/clk/imx/clk-vf610.c
base-commit: 8e939402ab242b02e50cea8b98c51cb4c51546fc
Signature · 1 line
2.56.0