Commit 92a85b7c authored by Tim Lunn's avatar Tim Lunn Committed by Wolfram Sang

i2c: rk3x: Adjust mask/value offset for i2c2 on rv1126

Rockchip RV1126 is using old style i2c controller, the i2c2
bus uses a non-sequential offset in the grf register for the
mask/value bits for this bus.

This patch fixes i2c2 bus on rv1126 SoCs.
Signed-off-by: default avatarTim Lunn <tim@feathertop.org>
Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 187432b8
......@@ -1288,6 +1288,10 @@ static int rk3x_i2c_probe(struct platform_device *pdev)
return -EINVAL;
}
/* rv1126 i2c2 uses non-sequential write mask 20, value 4 */
if (i2c->soc_data == &rv1126_soc_data && bus_nr == 2)
value = BIT(20) | BIT(4);
else
/* 27+i: write mask, 11+i: value */
value = BIT(27 + bus_nr) | BIT(11 + bus_nr);
......
Markdown is supported
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