Skip to content

arm: socfpga: arria10: Enable and fix I2C support

[email protected] u-boot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3arm: dts: a10: Correct i2c scl falling timearch/arm/dts/socfpga_arria10_socdk-u-boot.dtsi+5 -01 reply
2/3i2c: designware_i2c: Remove clk disabled codesdrivers/i2c/designware_i2c.c+0 -42 replies
3/3configs: socfpga_arria10_defconfig: Enable I2C as defaultconfigs/socfpga_arria10_defconfig+2 -01 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchHeiko Schocher
1/3R-b
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] arm: socfpga: arria10: Enable and fix I2C support

From: Dinesh Maniyam <[email protected]>

This series enables I2C support on the Intel Arria 10 SoCDK and fixes two related issues observed when the I2C controller is actually used:

1. The Linux DTS sets i2c-scl-falling-time-ns to a value that the U-Boot designware_i2c driver cannot consume on Arria 10. Override it in the U-Boot SoC dtsi to the maximum value allowed by the HW spec so the driver computes correct timings.

2. The designware_i2c remove() callback disables l4_sp_clk, which is shared with several other peripherals on Arria 10/Cyclone V/etc. Disabling it on i2c removal corrupts those peripherals. Drop the clk_disable() call.

3. Enable CONFIG_SYS_I2C_DW (which selects DM_I2C) and CONFIG_CMD_I2C in socfpga_arria10_defconfig so the driver is actually built and exercised by U-Boot's CI.

The patches originate from the Altera SoCFPGA downstream tree and have been carried internally for several years. Tested on Arria 10 SoCDK (sdmmc boot variant); SPL/U-Boot build clean. 'make savedefconfig' shows no diff introduced by these patches.

Dinesh Maniyam (3):
arm: dts: a10: Correct i2c scl falling time
i2c: designware_i2c: Remove clk disabled codes
configs: socfpga_arria10_defconfig: Enable I2C as default

 arch/arm/dts/socfpga_arria10_socdk-u-boot.dtsi | 5 +++++
 configs/socfpga_arria10_defconfig              | 2 ++
 drivers/i2c/designware_i2c.c                   | 4 ----
 3 files changed, 7 insertions(+), 4 deletions(-)
Signature · 1 line
2.43.7