Skip to content

Commit bbc89a6

Browse files
Michael WuWolfram Sang
authored andcommitted
dt-bindings: i2c: snps,designware-i2c: declare bus capacitance and clk freq optimized
Since there are no registers controlling the hardware parameters IC_CAP_LOADING and IC_CLK_FREQ_OPTIMIZATION, their values can only be declared in the device tree. snps,bus-capacitance-pf indicates the bus capacitance in picofarads (pF). It affects the high and low pulse width of SCL line in high speed mode. The legal values for this property are 100 and 400 only, and default value is 100. This property corresponds to IC_CAP_LOADING. snps,clk-freq-optimized indicates whether the hardware reduce its internal clock frequency by reducing the internal latency required to generate the high period and low period of SCL line. This property corresponds to IC_CLK_FREQ_OPTIMIZATION. The driver can calculate the high period count and low period count of SCL line for high speed mode based on these two properties. Signed-off-by: Michael Wu <michael.wu@kneron.us> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
1 parent 4fb1b64 commit bbc89a6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Documentation/devicetree/bindings/i2c/snps,designware-i2c.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,22 @@ properties:
9797
- const: tx
9898
- const: rx
9999

100+
snps,bus-capacitance-pf:
101+
$ref: /schemas/types.yaml#/definitions/uint32
102+
description:
103+
This property indicates the bus capacitance in picofarads (pF).
104+
This value is used to compute the tHIGH and tLOW periods for high speed
105+
mode.
106+
enum: [100, 400]
107+
default: 100
108+
109+
snps,clk-freq-optimized:
110+
description:
111+
This property indicates whether the hardware reduce its clock frequency
112+
by reducing the internal latency required to generate the high period and
113+
low period of SCL line.
114+
type: boolean
115+
100116
unevaluatedProperties: false
101117

102118
required:
@@ -121,6 +137,8 @@ examples:
121137
i2c-sda-hold-time-ns = <300>;
122138
i2c-sda-falling-time-ns = <300>;
123139
i2c-scl-falling-time-ns = <300>;
140+
snps,bus-capacitance-pf = <400>;
141+
snps,clk-freq-optimized;
124142
};
125143
- |
126144
i2c@2000 {

0 commit comments

Comments
 (0)