drm: bridge: dw-hdmi: set ddc scl clock rate according to dts
authorZheng Yang <zhengyang@rock-chips.com>
Tue, 28 Mar 2017 10:28:16 +0000 (18:28 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 31 Mar 2017 02:20:45 +0000 (10:20 +0800)
commita0b524450b5ed8541ef596a4943be97412936df3
tree456edb77705b624279dc5da04ba77243895a1835
parenteee051ca31f431a8d9b2aa6f790591ae2857b759
drm: bridge: dw-hdmi: set ddc scl clock rate according to dts

To set dw hdmi i2c bus adapter scl clock rate, we introduce two device
tree parameter, ddc-i2c-scl-high-time-ns and ddc-i2c-scl-low-time-ns.

ddc-i2c-scl-high-time-ns: how many ns SCL hold high
ddc-i2c-scl-low-time-ns: how many ns SCL hold low

After measurement, 50KHz scl clock rate recommended configuration is:

&hdmi {
ddc-i2c-scl-high-time-ns = <9625>;
ddc-i2c-scl-low-time-ns = <10000>;
};

100KHz recommended configuration is:
&hdmi {
        ddc-i2c-scl-high-time-ns = <4708>;
        ddc-i2c-scl-low-time-ns = <4916>;
};

If dts parameter is not available, the default scl rate is 100KHz.

Change-Id: I6f6b0bf1694ab59e70da789ead99e15a53c93e4d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
drivers/gpu/drm/bridge/dw-hdmi.c