Skip to content

Commit

Permalink
aspeed/i2c: Add working driver for multiple buses
Browse files Browse the repository at this point in the history
We do not support DMA, and have not tested any slave support, however
master mode byte-at-a-time is working.

The device tree currently includes the first and second buses.

Signed-off-by: Joel Stanley <joel@jms.id.au>
  • Loading branch information
Joel Stanley committed Oct 30, 2015
1 parent 0e0ca76 commit 5a9be1d
Show file tree
Hide file tree
Showing 2 changed files with 477 additions and 538 deletions.
34 changes: 16 additions & 18 deletions arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,26 @@
reg = <0x1e789140 0x18>;
};

i2c0: i2c@1e78a040 {
compatible = "aspeed,ast2400-i2c", "i2c";
reg = <0x1e78a040 0x40>, <0x1e78a000 0x40>;
i2c: i2c@1e78a040 {
compatible = "aspeed,ast2400-i2c-common";
reg = <0x1e78a000 0x40>;
ranges = <0 0x1e78a000 0x1000>;
interrupts = <12>;
clocks = <&clk_apb>;
clock-frequency = <100000>;

#address-cells = <1>;
#size-cells = <0>;
rtc@68 {
compatible = "dallas,ds3231";
reg = <0x68>;
// interrupts = <GPIOF0>

i2c0: i2c-bus@0x40 {
reg = <0x40 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
bus = <0>;
clock-frequency = <100000>;
};
};

i2c1: i2c@1e78a080 {
compatible = "aspeed,ast2400-i2c", "i2c";
reg = <0x1e78a080 0x40>, <0x1e78a000 0x40>;
interrupts = <12>;
clocks = <&clk_apb>;
clock-frequency = <100000>;
i2c1: i2c-bus@0x80 {
reg = <0x80 0x40>;
compatible = "aspeed,ast2400-i2c-bus";
bus = <1>;
clock-frequency = <100000>;
};
};

syscon: syscon@1e6e2000 {
Expand Down
Loading

0 comments on commit 5a9be1d

Please sign in to comment.