Refactored the i2c driver to parse register values from the device tree rather than hardcoding them. But still the clocks have to initialized manually.