<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 7, 2016 at 5:51 PM, Julius Werner <span dir="ltr"><<a href="mailto:jwerner@chromium.org" target="_blank">jwerner@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Also, I think all of these functions only work on non-x86 devices<br>
right now so they're probably not really helpful to you (I'd be<br>
surprised if they even compile and link for your board). The I2C API<br>
is unfortunately one of those areas where x86 and non-x86 coreboot<br>
still lead very separate side-by-side lives right now. For x86 you<br>
probably need the i2c_dev_xxx() functions, which should in theory work<br></blockquote><div><br></div><div><div><br></div><div>Skylake and Apollolake do support the I2C API and associated convenience functions. (finally!)  The i2c driver used is common for intel chipsets since haswell(core) and baytrail(atom), it just needs a bit of glue layer to map bus number to a base address.</div><div><br></div><div>I added the i2c_dev_* variants around the same time in order to support drivers where the bus+address comes from devicetree, but the functions that take a bus+address will work too.</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
similar but I have no experience with them. You might also need to use<br>
the smbus_xxx() functions instead (SMBUS is some<br>
kinda-the-same-but-not-quite thing related to I2C on x86 that I never<br>
bothered to fully understand).<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote><div><br></div><div><br></div><div>I agree this is likely what is needed for the ASROCK IMB-A180 as it looks like there is an smbus driver in the southbridge.  Look for i2c_smbus_send_byte() in include/device/smbus.h which is implemented in southbridge/amd/agesa/hudson/smbus.c</div><div><br></div><div><div>-duncan</div></div><div><br></div><div><div> <br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">
On Thu, Sep 29, 2016 at 3:10 PM, Haleigh Novak <<a href="mailto:haleigh@edt.com">haleigh@edt.com</a>> wrote:<br>
> Hello All,<br>
><br>
><br>
> I am currently trying to send POST codes from Coreboot (downloaded<br>
> approximately a month ago) to a Beagle I2C/SPI reader, specifically via i2c.<br>
> I don't know the register needed for i2c_writeb() so I figured I would use<br>
> i2c_raw_write(). In general since I have been unable to locate anything<br>
> explaining the difference between the two functions I would really<br>
> appriciate it if someone could explain it or direct me to where I can find<br>
> documentation. I am hoping that the explaination/resource will either tell<br>
> me where / or direct me to how I can figure out where the i2c_raw_write will<br>
> write to (if it will just write directly to the Beagle or somewhere else)?<br>
> Or would it be better to send it to a register with i2c_writeb()? I am<br>
> running Coreboot on an ASROCK Mainboard, model IMB-A180.<br>
><br>
><br>
> Thank you.<br>
><br>
><br>
> HN<br>
><br>
><br>
</div></div><span class="gmail-HOEnZb"><font color="#888888">> --<br>
> coreboot mailing list: <a href="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a><br>
> <a href="https://www.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">https://www.coreboot.org/<wbr>mailman/listinfo/coreboot</a><br>
<br>
--<br>
coreboot mailing list: <a href="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a><br>
<a href="https://www.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">https://www.coreboot.org/<wbr>mailman/listinfo/coreboot</a><br>
</font></span></blockquote></div><br></div></div>