cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

jourdan_thomas
Journeyman III

ADL_Display_WriteAndReadI2C

Hi

I'm struggling with ADL SDK and the AMD M96 Evaluation board to use the ADL_Display_WriteAndReadI2C function. I have some questions, any help would be appreciated.

On the M96 evaluation board, using ADL SDK 3.0, I try to read LM63 temperature sensor registers. This component has a fixed 0x4C address (7-bit address) and is connected to I2C bus (SCL/SDA) function of the M96 (cf M96 evaluation board schematics, doc 105-b864xx-00b, pages 3 and 10). I don't care of the temperature sensor itself, I'm only concerned with having a working application to read/write data on I2C with ADL SDK. I'm not concerned either with DDC/EDID. I try to use the ADL_Display_WriteAndReadI2C function without any success. The ADL SDK documentation is really poor and doesn't help at all.

What is the meaning of the following defines in adl_defines.h :

- ADL_DL_I2C_MAXDATASIZE

- ADL_DL_I2C_MAXWRITEDATASIZE

- ADL_DL_I2C_MAXADDRESSLENGTH

- ADL_DL_I2C_MAXOFFSETLENGTH

Also can someone explain the following fields of the ADLI2C structure :

- iLine: it seems the available values are ADL_DL_I2C_LINE_OEM, ADL_DL_I2C_LINE_OD_CONTROL, ADL_DL_I2C_LINE_OEM2. But which I2C bus do they match ? I2C SCL/SDA, GPIO_3_SMBDATA/GPIO_4_SMBCLK, DDC6CLK/DD6DATA... ???

- iAddress : doc says 'The 7-bit I2C slave device address, shifted one bit to the left.' so for the LM63 with fixed 7-bit address 0x4C the correct value is 0x98 (0x4C << 1) ?

- iSpeed : doc says 'I2C clock speed in KHz.' but what is the valid speed range ?

In ATOMWorks, what is the meaning of the following options :

- ProcessI2CChannelTransaction

- WriteOneByteToHWAssistedI2C

- ReadHWAssistedI2CStatus

- SetupHWAssistedI2CStatus

Why can't I change WriteOneByteToHWAssistedI2C and ReadHWAssistedI2CStatus from Disabled to Enabled (cf screenshot) ?

If those options are disabled, are there any side effects in ADL SDK I2C functions ?

Enclosed with this mail is our very simple linux sample application for reading LM63 I2C registers. Whatever the line/speed/slave address I try, I can't read anything : the ADL_Display_WriteAndReadI2C always returns '-1' (Generic Error: not very helpfull...). With a scope, no I2C signals are moving at all. What is wrong ?

Regards,

Thomas

PS : the platform is a typical desktop PC with AMD M96 evaluation board running CentOS 6.0 (64-bits) and Catalyst driver 12.1

0 Likes
5 Replies
jourdan_thomas
Journeyman III

Hi

A little help would be appreciated.

Regards,

Thomas

0 Likes
Septor
Staff

Hi Thomas,

Please see some answers below in green:

jourdan_thomas wrote:

What is the meaning of the following defines in adl_defines.h :

- ADL_DL_I2C_MAXDATASIZE

> Maximum read data size

- ADL_DL_I2C_MAXWRITEDATASIZE

> Maximum write data size

- ADL_DL_I2C_MAXADDRESSLENGTH

> Not used

- ADL_DL_I2C_MAXOFFSETLENGTH

> Not used

Also can someone explain the following fields of the ADLI2C structure :

- iLine: it seems the available values are ADL_DL_I2C_LINE_OEM, ADL_DL_I2C_LINE_OD_CONTROL, ADL_DL_I2C_LINE_OEM2. But which I2C bus do they match ? I2C SCL/SDA, GPIO_3_SMBDATA/GPIO_4_SMBCLK, DDC6CLK/DD6DATA... ???

> This depends on BIOS object table.  Usually external I2C devices are mapped to one of the OEM lines.  DDC lines are usually mapped to display connectors.  You need to compare VBIOS table to schematic.

- iAddress : doc says 'The 7-bit I2C slave device address, shifted one bit to the left.' so for the LM63 with fixed 7-bit address 0x4C the correct value is 0x98 (0x4C << 1) ?

> Yes, I believe 0x98 is correct

- iSpeed : doc says 'I2C clock speed in KHz.' but what is the valid speed range ?

> 50kHz is normal.  Range is 1-100kHz

There are also samples in the SDK under Samples/I2C which might be of help.

Regards,

  Aric

0 Likes

Hi Aric

Thanks for the answer. I contacted (again) the AMD tech support hoping they'll have some explanations about the VBios settings regarding I2C.

Regards,

Thomas

0 Likes

Hi Thomas,

Did you ever get any useful information about the SMbus programming and how to talk to the LM63 on the reference board?

Victor

0 Likes

Hi Aric,

I looked in the 2006 Archive SDK and the current SDK and neither has a directory for Samples/I2C.  Can you please direct me to the correct file archive?

Thanks!!

Victor

0 Likes