mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 03:28:45 +07:00
35780e860f
According to "KeyStone Architecture Inter-IC Control Bus User Guide", fixed additive part of frequency divisors (referred as "d" in the code and datasheet) always equals to 6, independent of module clock prescaler. module clock frequency master clock frequency = ---------------------- (ICCL + 6) + (ICCH + 6) It was not the case with original Davinci IP. Introduce new compatible property "ti,keystone-i2c", which triggers special handling in the driver. Without this change Keystone-based systems (having 204.8MHz input clock) choose prescaler 29 (PSC=28). Using d=5 in this case leads to bus bitrate ~353kHz instead of requested 400kHz. After correction, assuming d=6 bus rate is ~392kHz. This gives ~11% transfer rate increase. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com> Tested-by: Hemanth Guruva Reddy <hemanth.guruva_reddy@nokia.com> Tested-by: Lukasz Gemborowski <lukasz.gemborowski@nokia.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
32 lines
890 B
Plaintext
32 lines
890 B
Plaintext
* Texas Instruments Davinci/Keystone I2C
|
|
|
|
This file provides information, what the device node for the
|
|
davinci/keystone i2c interface contains.
|
|
|
|
Required properties:
|
|
- compatible: "ti,davinci-i2c" or "ti,keystone-i2c";
|
|
- reg : Offset and length of the register set for the device
|
|
|
|
Recommended properties :
|
|
- interrupts : standard interrupt property.
|
|
- clock-frequency : desired I2C bus clock frequency in Hz.
|
|
- ti,has-pfunc: boolean; if defined, it indicates that SoC supports PFUNC
|
|
registers. PFUNC registers allow to switch I2C pins to function as
|
|
GPIOs, so they can by toggled manually.
|
|
|
|
Example (enbw_cmc board):
|
|
i2c@1c22000 {
|
|
compatible = "ti,davinci-i2c";
|
|
reg = <0x22000 0x1000>;
|
|
clock-frequency = <100000>;
|
|
interrupts = <15>;
|
|
interrupt-parent = <&intc>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
dtt@48 {
|
|
compatible = "national,lm75";
|
|
reg = <0x48>;
|
|
};
|
|
};
|