Skip to content

Split I2C tunneling out of ccgx module #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 4, 2025
Merged

Split I2C tunneling out of ccgx module #112

merged 2 commits into from
May 4, 2025

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.

1 participant