Skip to content

Conversation

@JohnAZoidberg
Copy link
Member

@JohnAZoidberg JohnAZoidberg commented Apr 28, 2025

Tested i2c_read:

Note that the port number does not seem to always match the right one.

# Framework 13 - Ryzen AI 300
# ALS Sensor - different every time if ambient light changes
# Should actually be port number 7, but it seems the zephyr DT mapping changes it to 5, probably because 5 and 6 are unused
i2c_read(0x05, 0x29, 0x04, 0x08)

# Framework 12
# BMA4XX
# ID, returns 0x18
i2c_read(ec, 0x07, 0x18, 0x00, 0x01)
# Time, every time different
i2c_read(ec, 0x07, 0x18, 0x18, 0x01)
# Temperature, usually same
i2c_read(ec, 0x07, 0x18, 0x22, 0x01)
# Temp
i2c_read(ec, 0x06, 0x4D, 0xFD, 0x01)

@JohnAZoidberg
Copy link
Member Author

On windows and Linux should use kernel driver by default and fallback to manual host commands if not available.

@JohnAZoidberg JohnAZoidberg changed the title I2c refactor Split I2C tunneling out of ccgx module Apr 29, 2025
TODO: Split out port and address code also

Signed-off-by: Daniel Schaefer <dhs@frame.work>
Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg JohnAZoidberg marked this pull request as ready for review April 30, 2025 08:50
@JohnAZoidberg
Copy link
Member Author

The current changes to not change any behavior, purely refactoring.

@JohnAZoidberg
Copy link
Member Author

Merging now to avoid accumulating merge conflicts.

@JohnAZoidberg JohnAZoidberg merged commit 3e819a2 into main May 4, 2025
6 checks passed
@JohnAZoidberg JohnAZoidberg deleted the i2c-refactor branch May 4, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants