Message ID | 1557147240-29551-2-git-send-email-sagar.kadam@sifive.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add dt bindings to support I2C on sifive devices and a fix for polling mode i2c transfers. | expand |
On Mon, May 06, 2019 at 06:23:58PM +0530, Sagar Shrikant Kadam wrote: > Add DT binding for OpenCore's based i2c device as found in > FU540 Chipset on HiFive Unleashed Platform (Rev A00). > > The doc explains, how to add DT support for I2C devices. > > Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com> > --- > .../devicetree/bindings/i2c/i2c-sifive.txt | 29 ++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sifive.txt Hi Sagar Please extend the existing i2c-ocores.txt file, not add a new file. Andrew
On Mon, May 6, 2019 at 6:49 PM Andrew Lunn <andrew@lunn.ch> wrote: > > On Mon, May 06, 2019 at 06:23:58PM +0530, Sagar Shrikant Kadam wrote: > > Add DT binding for OpenCore's based i2c device as found in > > FU540 Chipset on HiFive Unleashed Platform (Rev A00). > > > > The doc explains, how to add DT support for I2C devices. > > > > Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com> > > --- > > .../devicetree/bindings/i2c/i2c-sifive.txt | 29 ++++++++++++++++++++++ > > 1 file changed, 29 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sifive.txt > > Hi Sagar > > Please extend the existing i2c-ocores.txt file, not add a new file. Hi Andrew, Thanks for your review. Yes I will extend the i2c-ocores.txt to support sifive devices, and will submit a v2 of this patch. > > Andrew
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sifive.txt b/Documentation/devicetree/bindings/i2c/i2c-sifive.txt new file mode 100644 index 0000000..2a0fc9b --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-sifive.txt @@ -0,0 +1,29 @@ +SiFive I2C controller Device Tree Bindings +------------------------------------------------- + +Required properties: + +- compatible : Should be "sifive,<chipset>-i2c" for a particular chip or + "sifive,i2c<ver>" for a general I2C block. + For FU540 chipset the supported compatible string is "sifive,fu540-c000-i2c". +- reg : Physical base address and size of I2C registers map. +- reg-names : Should contain the resource reg names. +- clocks : Must reference the frequency given to the controller. +- #address-cells : Must be '1'. +- #size-cells : Must be '0'. +- clock-frequency : desired I2C bus clock frequency. + +Example: + i2c@10030000 { + compatible = "sifive,i2c0","sifive,fu540-c000-i2c"; + reg = <0x0 0x10030000 0x0 0x1000>; + reg-names = "i2c-control"; + clocks = <&tlclk>; + clock-frequency = <100000>; + + reg-shift = <2>; + reg-io-width = <1>; + + #address-cells = <1>; + #size-cells = <0>; + };
Add DT binding for OpenCore's based i2c device as found in FU540 Chipset on HiFive Unleashed Platform (Rev A00). The doc explains, how to add DT support for I2C devices. Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com> --- .../devicetree/bindings/i2c/i2c-sifive.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-sifive.txt