Good to know it can go faster. The issue with Zephyr is the sifive driver only accepts STANDARD or FAST (rejecting other speeds) and only works at 100kHz when passed the configuration of FAST.
I2C_MODE_MASTER | I2C_SPEED_SET(I2C_SPEED_STANDARD)
!=
I2C_MODE_MASTER | I2C_SPEED_STANDARD <-- what I was doing wrong
OMFG! I hate getting caught by stuff like this. Silly me for assuming (and quickly skimming and missing the detail in the docs) since MASTER’s field mask didn’t need shifting neither did SPEED.
Nothing to do with FE310 (or the zephyr i2c driver), and totally me stubbing my toe on Zephyr’s inconsistent field macros. IMHO, there should be I2C_*_SET/GET for all the fields, rather than the current situation.
I hope my foolishness helps someone else.
Anthony
PS: I’ll poke around raising the maximum frequency (as the driver’s maximum is FAST) based on deadcommon’s comment.