<div dir="ltr">First off, someone pointed out to me that the mapping that I used between addresses and bus numbers is not actually valid for busses 8-14.<div><br></div><div>This could be fixed by checking the offset, but I am wondering if that is the right way to do it. It seems like this is not completely trivial so maybe this should be specified in the device tree? If that is the case, should I do this as another reg entry or go back to the way I was doing it before?</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 19, 2016 at 4:26 PM Brendan Higgins <<a href="mailto:brendanhiggins@google.com">brendanhiggins@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Addressed in v3.<br class="gmail_msg">
<br class="gmail_msg">
Thanks!<br class="gmail_msg">
<br class="gmail_msg">
On Mon, Sep 19, 2016 at 2:35 PM, Rob Herring <<a href="mailto:robh@kernel.org" class="gmail_msg" target="_blank">robh@kernel.org</a>> wrote:<br class="gmail_msg">
> On Fri, Sep 09, 2016 at 06:55:51PM -0700, Brendan Higgins wrote:<br class="gmail_msg">
>> Added device tree binding documentation for Aspeed I2C controller and<br class="gmail_msg">
>> busses.<br class="gmail_msg">
>><br class="gmail_msg">
>> Signed-off-by: Brendan Higgins <<a href="mailto:brendanhiggins@google.com" class="gmail_msg" target="_blank">brendanhiggins@google.com</a>><br class="gmail_msg">
>> ---<br class="gmail_msg">
>> Changes for v2:<br class="gmail_msg">
>> - None<br class="gmail_msg">
>> ---<br class="gmail_msg">
>> .../devicetree/bindings/i2c/i2c-aspeed.txt | 63 ++++++++++++++++++++++<br class="gmail_msg">
>> 1 file changed, 63 insertions(+)<br class="gmail_msg">
>> create mode 100644 Documentation/devicetree/bindings/i2c/i2c-aspeed.txt<br class="gmail_msg">
>><br class="gmail_msg">
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt b/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt<br class="gmail_msg">
>> new file mode 100644<br class="gmail_msg">
>> index 0000000..df68f2a<br class="gmail_msg">
>> --- /dev/null<br class="gmail_msg">
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-aspeed.txt<br class="gmail_msg">
>> @@ -0,0 +1,63 @@<br class="gmail_msg">
>> +Device tree configuration for the I2C controller and busses on the AST24XX<br class="gmail_msg">
>> +and AST25XX SoCs.<br class="gmail_msg">
>> +<br class="gmail_msg">
>> +Controller:<br class="gmail_msg">
>> +<br class="gmail_msg">
>> + Required Properties:<br class="gmail_msg">
>> + - #address-cells : should be 1<br class="gmail_msg">
>> + - #size-cells : should be 1<br class="gmail_msg">
>> + - #interrupt-cells : should be 1<br class="gmail_msg">
>> + - compatible : should be "aspeed,ast2400-i2c-controller"<br class="gmail_msg">
>> + or "aspeed,ast2500-i2c-controller"<br class="gmail_msg">
>> + - reg : address start and range of controller<br class="gmail_msg">
>> + - ranges : defines address offset and range for busses<br class="gmail_msg">
>> + - interrupts : interrupt number<br class="gmail_msg">
>> + - clocks : root clock of bus, should reference the APB<br class="gmail_msg">
>> + clock<br class="gmail_msg">
>> + - clock-ranges : specifies that child busses can inherit clocks<br class="gmail_msg">
>> + - interrupt-controller : denotes that the controller receives and fires<br class="gmail_msg">
>> + new interrupts for child busses<br class="gmail_msg">
>> +<br class="gmail_msg">
>> +Bus:<br class="gmail_msg">
>> +<br class="gmail_msg">
>> + Required Properties:<br class="gmail_msg">
>> + - #address-cells : should be 1<br class="gmail_msg">
>> + - #size-cells : should be 0<br class="gmail_msg">
>> + - reg : address offset and range of bus<br class="gmail_msg">
>> + - compatible : should be "aspeed,ast2400-i2c-bus"<br class="gmail_msg">
>> + or "aspeed,ast2500-i2c-bus"<br class="gmail_msg">
>> + - bus : the bus's number<br class="gmail_msg">
><br class="gmail_msg">
> Don't use indexes. The reg property is enough to id which bus is which.<br class="gmail_msg">
</blockquote></div>