Skip to content
Commit 6d8ffbe6 authored by Raviteja Narayanam's avatar Raviteja Narayanam Committed by Wolfram Sang
Browse files

i2c: xiic: Add SCL frequency configuration support



From 'clock-frequency' device tree property, configure I2C SCL
frequency by calculating the timing register values according to
input clock.

After soft reset in reinit function, the timing registers are set
to default values (configured in design tool). So, setting SCL
frequency is done inside reinit function after the soft reset.
This allows configuration of SCL frequency exclusively through
software via device tree property, overriding the design.
If the clock-frequency parameter is not specified in DT, driver
doesn't configure frequency, making it backward compatible.

Signed-off-by: default avatarRaviteja Narayanam <raviteja.narayanam@xilinx.com>
Signed-off-by: default avatarManikanta Guntupalli <manikanta.guntupalli@amd.com>
Acked-by: default avatarMichal Simek <michal.simek@amd.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 9b97cd61
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment