Repository navigation
Conversation
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D125125901. (Because this pull request was imported automatically, there will not be any future comments.) |
Summary: - add patch to support dynamic I2C bus speed configuration Test Plan: - Build code:Pass
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Description
i2c speedshell command to change the bus speed at runtime.Motivation
scllt/sclhtpair, and it is applied to both 400 kHz and 1 MHz.Design
scllt_fpandsclht_fp, for fast-plus mode.i2c_npcm4xx_set_baudrate()selects the timing pair by the requested speed:bus_freq> 400 kHz:scllt_fp/sclht_fpscllt/sclhti2c speed <device> <freq_hz>, which callsi2c_configure()with the matching speed.scllt/sclht; it usesscllt_fp/sclht_fp, or the computed value if they are not set. All buses that setscllt/sclhtin this repo (sb-el, sb-rb) run at 400 kHz, so no existing platform is affected.Usage
DTS (optional, only needed when 1 MHz requires special timing):
Shell:
freq_hz<= 100000 selects standard mode, <= 400000 fast mode, <= 1000000 fast-plus mode.Code:
Test Plan
<measured frequency><measured frequency / SCL low / SCL high><measured frequency / SCL low / SCL high>