@@ -6,6 +6,11 @@ Required properties :
- reg : Offset and length of the register set for the device
- interrupts : <IRQ> where IRQ is the interrupt number.
+Optional properties:
+
+ - rx-fifo-size : 1 cell, Rx fifo size
+ - tx-fifo-size : 1 cell, Tx fifo size
+
Recommended properties :
- clock-frequency : desired I2C bus clock frequency in Hz.
@@ -22,6 +27,8 @@ Example :
compatible = "snps,designware-i2c";
reg = <0xf0000 0x1000>;
interrupts = <11>;
+ rx-fifo-size = <16>;
+ tx-fifo-size = <16>;
clock-frequency = <400000>;
};
@@ -86,6 +86,7 @@ static int dw_i2c_probe(struct platform_device *pdev)
struct dw_i2c_dev *dev;
struct i2c_adapter *adap;
struct resource *mem;
+ struct device_node *np = pdev->dev.of_node;
int irq, r;
irq = platform_get_irq(pdev, 0);
@@ -145,6 +146,8 @@ static int dw_i2c_probe(struct platform_device *pdev)
dev->rx_fifo_depth = ((param1 >> 8) & 0xff) + 1;
dev->adapter.nr = pdev->id;
}
+ of_property_read_u32(np, "rx-fifo-size", &dev->rx_fifo_depth);
+ of_property_read_u32(np, "tx-fifo-size", &dev->tx_fifo_depth);
r = i2c_dw_init(dev);
if (r)
return r;