Skip to contentSkip to conversation

i2c: added driver for Mellanox BlueField SoC

PATCH Superseded Khalil Blaiech 1 participant 2 messages Mar 29, 2019

Subsystems (2)

v5 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v5 cover i2c: added driver for Mellanox BlueField SoC

Added I2C SMBus driver and device tree bindings documentation.

Changes since v3:

* Driver source code:

- bug fix for the mlx_slave_enable routine.

Khalil Blaiech (2):
i2c: i2c-mlx: I2C SMBus driver for Mellanox BlueField SoC
dt-bindings: i2c: I2C binding for Mellanox BlueField SoC

 .../devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt |   29 +
 drivers/i2c/busses/Kconfig                         |   13 +
 drivers/i2c/busses/Makefile                        |    1 +
 drivers/i2c/busses/i2c-mlx.c                       | 2513 ++++++++++++++++++++
 4 files changed, 2556 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt
 create mode 100644 drivers/i2c/busses/i2c-mlx.c
Signature · 1 line
2.1.2
#1 lore raw

PATCH v5 2/2 dt-bindings: i2c: I2C binding for Mellanox BlueField SoC

Added device tree bindings documentation for Mellanox BlueField I2C SMBus controller.

---
 .../devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt
Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.txt new file +29 -0
new file mode 100644
index 0000000..3478bb2
@@ -0,0 +1,29 @@
+Device tree configuration for the Mellanox I2C SMBus on BlueField SoCs
+
+Required Properties:
+- compatible : should be "mellanox,i2c-mlxbf1" or "mellanox,i2c-mlxbf2".
+
+- reg : address offset and length of the device registers. The
+	registers consist of the following set of resources:
+		1) Smbus block registers.
+		2) Cause master registers.
+		3) Cause slave registers.
+
+- interrupts : interrupt number.
+
+Optional Properties:
+
+- clock-frequency : bus frequency used to configure timing registers;
+			allowed values are 100000, 400000 and 1000000;
+			those are expressed in Hz. Default is 100000.
+
+Example:
+
+i2c@2804000 {
+	compatible = "mellanox,i2c-mlxbf1";
+	reg =	<0x02804000 0x800>,
+		<0x02801200 0x020>,
+		<0x02801260 0x020>;
+	interrupts = <57>;
+	clock-frequency = <100000>;
+};
Signature · 1 line
2.1.2