i2c: aspeed: added driver for Aspeed I2C
Subsystems (4)
cover i2c: aspeed: added driver for Aspeed I2C
Added Aspeed I2C driver and device tree bindings documentation. This is patch set is based on upstream and SHOULD NOT be applied against the OpenBMC repo.
Joel, you mentioned in the previous thread
Quoted 2 lines
Add the binding in a separate commit, coming before the addition of the driver.
I am not sure what you mean by this as the binding is part of the driver, are you referring to the documentation?
Other than that, I think everything is good to go.
Cheers,
Brendan
PATCH 1/2 i2c: aspeed: added driver for Aspeed I2C
Added initial master and slave support for Aspeed I2C controller. Supports fourteen busses present in ast24xx and ast25xx BMC SoCs by Aspeed.
--- drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-aspeed.c | 812 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 823 insertions(+) create mode 100644 drivers/i2c/busses/i2c-aspeed.c
drivers/i2c/busses/Kconfig +10 -0
@@ -998,6 +998,16 @@ config I2C_RCAR This driver can also be built as a module. If so, the module will be called i2c-rcar. +config I2C_ASPEED + tristate "Aspeed AST2xxx SoC I2C Controller" + depends on (ARCH_ASPEED || COMPILE_TEST) && OF + help + If you say yes to this option, support will be included for the + Aspeed AST2xxx SoC I2C controller. + + This driver can also be built as a module. If so, the module + will be called i2c-aspeed. + comment "External I2C/SMBus adapter drivers" config I2C_DIOLAN_U2C
drivers/i2c/busses/Makefile +1 -0
@@ -96,6 +96,7 @@ obj-$(CONFIG_I2C_XILINX) += i2c-xiic.o obj-$(CONFIG_I2C_XLR) += i2c-xlr.o obj-$(CONFIG_I2C_XLP9XX) += i2c-xlp9xx.o obj-$(CONFIG_I2C_RCAR) += i2c-rcar.o +obj-$(CONFIG_I2C_ASPEED) += i2c-aspeed.o # External I2C/SMBus adapter drivers obj-$(CONFIG_I2C_DIOLAN_U2C) += i2c-diolan-u2c.o
drivers/i2c/busses/i2c-aspeed.c new file +812 -0
812 lines not on this page · raw message
Signature · 1 line
2.8.0.rc3.226.g39d4020
PATCH 2/2 i2c: aspeed: added documentation for Aspeed I2C driver
In reply to Brendan HigginsAdded device tree binding documentation for Aspeed I2C controller and busses.
--- .../devicetree/bindings/i2c/i2c-aspeed.txt | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-aspeed.txt
Documentation/devicetree/bindings/i2c/i2c-aspeed.txt new file +63 -0
@@ -0,0 +1,63 @@ +Device tree configuration for the I2C controller and busses on the AST24XX +and AST25XX SoCs. + +Controller: + + Required Properties: + - #address-cells : should be 1 + - #size-cells : should be 1 + - #interrupt-cells : should be 1 + - compatible : should be "aspeed,ast2400-i2c-controller" + or "aspeed,ast2500-i2c-controller" + - reg : address start and range of controller + - ranges : defines address offset and range for busses + - interrupts : interrupt number + - clocks : root clock of bus, should reference the APB + clock + - clock-ranges : specifies that child busses can inherit clocks + - interrupt-controller : denotes that the controller receives and fires + new interrupts for child busses + +Bus: + + Required Properties: + - #address-cells : should be 1 + - #size-cells : should be 0 + - reg : address offset and range of bus + - compatible : should be "aspeed,ast2400-i2c-bus" + or "aspeed,ast2500-i2c-bus" + - bus : the bus's number + - interrupts : interrupt number + + Optional Properties: + - clock-frequency : frequency of the bus clock in Hz + defaults to 100 kHz when not specified + +Example: + +i2c: i2c@1e78a000 { + #address-cells = <1>; + #size-cells = <1>; + #interrupt-cells = <1>; + + compatible = "aspeed,ast2400-i2c-controller"; + reg = <0x1e78a000 0x40>; + ranges = <0 0x1e78a000 0x1000>; + interrupts = <12>; + clocks = <&clk_apb>; + clock-ranges; + interrupt-controller; + + i2c0: i2c-bus@40 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x40 0x40>; + compatible = "aspeed,ast2400-i2c-bus"; + bus = <0>; + clock-frequency = <100000>; + status = "disabled"; + interrupts = <0>; + interrupt-parent = <&i2c>; + }; +}; +
Signature · 1 line
2.8.0.rc3.226.g39d4020
Joel Stanley
maintainerQuoted 11 lines · Brendan Higgins
Added Aspeed I2C driver and device tree bindings documentation. This is patch set is based on upstream and SHOULD NOT be applied against the OpenBMC repo.
Joel, you mentioned in the previous thread
Quoted 2 lines
Add the binding in a separate commit, coming before the addition of the driver.
I am not sure what you mean by this as the binding is part of the driver, are you referring to the documentation?
I was referring to the documentation.
Thanks for sending these out. I haven't had a change to take a close look yet, but will do so at the first opportunity.
Cheers,
Joel
Quoted 9 lines
Other than that, I think everything is good to go.
Cheers,
Brendan
_______________________________________________
openbmc mailing list
[email protected]
https://lists.ozlabs.org/listinfo/openbmc