[PATCH v4 1/4] dt-bindings: i2c: aspeed: add transfer mode support
Rob Herring
robh at kernel.org
Wed Mar 10 13:15:34 AEDT 2021
On Tue, Mar 9, 2021 at 10:02 AM Jae Hyun Yoo
<jae.hyun.yoo at linux.intel.com> wrote:
>
> Hi Rob,
>
> On 3/6/2021 12:30 PM, Rob Herring wrote:
> > On Wed, Feb 24, 2021 at 11:17:17AM -0800, Jae Hyun Yoo wrote:
> >> Append bindings to support transfer mode.
> >>
> >> Signed-off-by: Jae Hyun Yoo <jae.hyun.yoo at linux.intel.com>
> >> Reviewed-by: Brendan Higgins <brendanhiggins at google.com>
> >> ---
> >> Changes since v3:
> >> - None
> >>
> >> Changes since v2:
> >> - Moved SRAM resources back to default dtsi and added mode selection
> >> property.
> >>
> >> Changes since v1:
> >> - Removed buffer reg settings from default device tree and added the settings
> >> into here to show the predefined buffer range per each bus.
> >>
> >> .../devicetree/bindings/i2c/i2c-aspeed.txt | 37 +++++++++++++++----
> >> 1 file changed, 30 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt b/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt
> >> index b47f6ccb196a..242343177324 100644
> >> --- a/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt
> >> +++ b/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt
> >> @@ -17,6 +17,20 @@ Optional Properties:
> >> - bus-frequency : frequency of the bus clock in Hz defaults to 100 kHz when not
> >> specified
> >> - multi-master : states that there is another master active on this bus.
> >> +- aspeed,i2c-xfer-mode : should be "byte", "buf" or "dma" to select transfer
> >> + mode defaults to "byte" mode when not specified.
> >> +
> >> + I2C DMA mode on AST2500 has these restrictions:
> >> + - If one of these controllers is enabled
> >> + * UHCI host controller
> >> + * MCTP controller
> >> + I2C has to use buffer mode or byte mode instead
> >> + since these controllers run only in DMA mode and
> >> + I2C is sharing the same DMA H/W with them.
> >> + - If one of these controllers uses DMA mode, I2C
> >> + can't use DMA mode
> >> + * SD/eMMC
> >> + * Port80 snoop
> >
> > How does one decide between byte or buf mode?
>
> If a given system makes just one byte r/w transactions most of the time
> then byte mode will be a right setting. Otherwise, buf mode is more
> efficient because it doesn't generate a bunch of interrupts on every
> byte handling.
Then why doesn't the driver do byte transactions when it gets small
1-4? byte transactions and buffer transactions when it gets larger
sized transactions.
Rob
More information about the openbmc
mailing list