How to enable i2c adapters in riscv kernel,in SiFive Freedom U540

I want to enable the i2c adapters in SiFive unleashed Freedom U540 ,and how to add new i2c slave(EEPROM) to communication

Try to enable corresponding i2c peripherals in your device tree blob

But riscv architecture doesn’t have device tree blob

I don’t know how it works now, but the board I worked with does have DTB. In my case it is located inside FSBL.

Also SiFive HiFive Unleashed Getting Started Guide v1p1 tells that:

The FSBL contains an embedded DTB describing both the Freedom U500 SoC and HiFive Unleashed board.

There is a ‘new’ DTS/DTB format for the 5.2 kernel series, you can test it with the ‘dev/new-dts’ branch of freedom-u-sdk. If you are lucky it will just work, otherwise follow some of the threads here:

Also if this is not merged into the kernel that dev/new-dts is pointing at let me know and I’ll add the patch.