Simon Glass | 9bb743d | 2020-01-23 11:48:10 -0700 | [diff] [blame] | 1 | * Synopsys DesignWare I2C |
| 2 | |
| 3 | Required properties : |
| 4 | |
| 5 | - compatible : should be "snps,designware-i2c" |
| 6 | or "mscc,ocelot-i2c" with "snps,designware-i2c" for fallback |
| 7 | - reg : Offset and length of the register set for the device |
| 8 | - interrupts : <IRQ> where IRQ is the interrupt number. |
| 9 | - clocks : phandles for the clocks, see the description of clock-names below. |
| 10 | The phandle for the "ic_clk" clock is required. The phandle for the "pclk" |
| 11 | clock is optional. If a single clock is specified but no clock-name, it is |
| 12 | the "ic_clk" clock. If both clocks are listed, the "ic_clk" must be first. |
| 13 | |
| 14 | Recommended properties : |
| 15 | |
| 16 | - clock-frequency : desired I2C bus clock frequency in Hz. |
| 17 | |
| 18 | Optional properties : |
| 19 | |
| 20 | - clock-names : Contains the names of the clocks: |
| 21 | "ic_clk", for the core clock used to generate the external I2C clock. |
| 22 | "pclk", the interface clock, required for register access. |
| 23 | |
| 24 | - reg : for "mscc,ocelot-i2c", a second register set to configure the SDA hold |
| 25 | time, named ICPU_CFG:TWI_DELAY in the datasheet. |
| 26 | |
| 27 | - i2c-sda-hold-time-ns : should contain the SDA hold time in nanoseconds. |
| 28 | This option is only supported in hardware blocks version 1.11a or newer and |
| 29 | on Microsemi SoCs ("mscc,ocelot-i2c" compatible). |
| 30 | |
| 31 | - i2c-scl-falling-time-ns : should contain the SCL falling time in nanoseconds. |
| 32 | This value which is by default 300ns is used to compute the tLOW period. |
| 33 | |
| 34 | - i2c-sda-falling-time-ns : should contain the SDA falling time in nanoseconds. |
| 35 | This value which is by default 300ns is used to compute the tHIGH period. |
| 36 | |
| 37 | Examples : |
| 38 | |
| 39 | i2c@f0000 { |
| 40 | #address-cells = <1>; |
| 41 | #size-cells = <0>; |
| 42 | compatible = "snps,designware-i2c"; |
| 43 | reg = <0xf0000 0x1000>; |
| 44 | interrupts = <11>; |
| 45 | clock-frequency = <400000>; |
| 46 | }; |
| 47 | |
| 48 | i2c@1120000 { |
| 49 | #address-cells = <1>; |
| 50 | #size-cells = <0>; |
| 51 | compatible = "snps,designware-i2c"; |
| 52 | reg = <0x1120000 0x1000>; |
| 53 | interrupt-parent = <&ictl>; |
| 54 | interrupts = <12 1>; |
| 55 | clock-frequency = <400000>; |
| 56 | i2c-sda-hold-time-ns = <300>; |
| 57 | i2c-sda-falling-time-ns = <300>; |
| 58 | i2c-scl-falling-time-ns = <300>; |
| 59 | };x |
| 60 | |
| 61 | i2c@1120000 { |
| 62 | #address-cells = <1>; |
| 63 | #size-cells = <0>; |
| 64 | reg = <0x2000 0x100>; |
| 65 | clock-frequency = <400000>; |
| 66 | clocks = <&i2cclk>; |
| 67 | interrupts = <0>; |
| 68 | |
| 69 | eeprom@64 { |
| 70 | compatible = "linux,slave-24c02"; |
| 71 | reg = <0x40000064>; |
| 72 | }; |
| 73 | }; |