diff mbox

[2/3] Documentation: dt: i2c: Add Altera I2C Controller

Message ID 1491926547-29510-3-git-send-email-thor.thayer@linux.intel.com
State Superseded
Headers show

Commit Message

Thor Thayer April 11, 2017, 4:02 p.m. UTC
From: Thor Thayer <thor.thayer@linux.intel.com>

Add the documentation to support the Altera I2C Controller.

Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
---
 .../devicetree/bindings/i2c/i2c-altera.txt         | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txt

Comments

Rob Herring April 13, 2017, 9:22 p.m. UTC | #1
On Tue, Apr 11, 2017 at 11:02:26AM -0500, thor.thayer@linux.intel.com wrote:
> From: Thor Thayer <thor.thayer@linux.intel.com>
> 
> Add the documentation to support the Altera I2C Controller.

"dt-bindings: i2c: ..." for the subject.

> 
> Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
> ---
>  .../devicetree/bindings/i2c/i2c-altera.txt         | 37 ++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txt
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-altera.txt b/Documentation/devicetree/bindings/i2c/i2c-altera.txt
> new file mode 100644
> index 0000000..a67241c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/i2c-altera.txt
> @@ -0,0 +1,37 @@
> +* Altera I2C Controller

This is the only one? For synthesizable logic or a hard block in 
socfpga?

> +
> +Required properties :
> + - compatible : should be "altr,sip-i2c"

Seems kind of generic.

> + - reg        : Offset and length of the register set for the device
> + - interrupts : <IRQ> where IRQ is the interrupt number.
> + - clocks     : phandles to input clocks.

Need to specify how many clocks.

> + - #address-cells = <1>;
> + - #size-cells = <0>;
> +
> +Recommended properties :
> + - clock-frequency : desired I2C bus clock frequency in Hz.
> +
> +Optional properties :
> + - altr,fifo-size : Size of the RX and TX FIFOs.

in bytes?

Just "fifo-size" is already fairly common, so drop the vendor prefix.

> + - Child nodes conforming to i2c bus binding
> +
> +Example :
> +
> +	i2c@100080000 {
> +		compatible = "altr,sip-i2c";
> +		reg = <0x00000001 0x00080000 0x00000040>;
> +		interrupt-parent = <&intc>;
> +		interrupts = <0 43 4>;
> +		clocks = <&clk_0>;
> +		clock-frequency = <100000>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		altr,fifo-size = <4>;
> +
> +		eeprom@51 {
> +			compatible = "atmel,24c32";
> +			reg = <0x51>;
> +			pagesize = <32>;
> +		};
> +	};
> +
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thor Thayer April 14, 2017, 1:46 p.m. UTC | #2
Hi Rob,

On 04/13/2017 04:22 PM, Rob Herring wrote:
> On Tue, Apr 11, 2017 at 11:02:26AM -0500, thor.thayer@linux.intel.com wrote:
>> From: Thor Thayer <thor.thayer@linux.intel.com>
>>
>> Add the documentation to support the Altera I2C Controller.
>
> "dt-bindings: i2c: ..." for the subject.
>
Got it. Thanks.

>>
>> Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
>> ---
>>  .../devicetree/bindings/i2c/i2c-altera.txt         | 37 ++++++++++++++++++++++
>>  1 file changed, 37 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txt
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-altera.txt b/Documentation/devicetree/bindings/i2c/i2c-altera.txt
>> new file mode 100644
>> index 0000000..a67241c
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-altera.txt
>> @@ -0,0 +1,37 @@
>> +* Altera I2C Controller
>
> This is the only one? For synthesizable logic or a hard block in
> socfpga?
>
This is synthesizable logic in an FPGA.

>> +
>> +Required properties :
>> + - compatible : should be "altr,sip-i2c"
>
> Seems kind of generic.
>
I'm using sip for soft IP - right now we only offer 1 flavor.

>> + - reg        : Offset and length of the register set for the device
>> + - interrupts : <IRQ> where IRQ is the interrupt number.
>> + - clocks     : phandles to input clocks.
>
> Need to specify how many clocks.
>
OK. There is only 1 so I'll change to singular. phandle to input clock.

>> + - #address-cells = <1>;
>> + - #size-cells = <0>;
>> +
>> +Recommended properties :
>> + - clock-frequency : desired I2C bus clock frequency in Hz.
>> +
>> +Optional properties :
>> + - altr,fifo-size : Size of the RX and TX FIFOs.
>
> in bytes?
>
> Just "fifo-size" is already fairly common, so drop the vendor prefix.
>
Yes, it is in bytes. I'll make the change.

Thanks for reviewing!

>> + - Child nodes conforming to i2c bus binding
>> +
>> +Example :
>> +
>> +	i2c@100080000 {
>> +		compatible = "altr,sip-i2c";
>> +		reg = <0x00000001 0x00080000 0x00000040>;
>> +		interrupt-parent = <&intc>;
>> +		interrupts = <0 43 4>;
>> +		clocks = <&clk_0>;
>> +		clock-frequency = <100000>;
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +		altr,fifo-size = <4>;
>> +
>> +		eeprom@51 {
>> +			compatible = "atmel,24c32";
>> +			reg = <0x51>;
>> +			pagesize = <32>;
>> +		};
>> +	};
>> +
>> --
>> 1.9.1
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring April 20, 2017, 3:47 p.m. UTC | #3
On Fri, Apr 14, 2017 at 8:46 AM, Thor Thayer
<thor.thayer@linux.intel.com> wrote:
> Hi Rob,
>
> On 04/13/2017 04:22 PM, Rob Herring wrote:
>>
>> On Tue, Apr 11, 2017 at 11:02:26AM -0500, thor.thayer@linux.intel.com
>> wrote:
>>>
>>> From: Thor Thayer <thor.thayer@linux.intel.com>

[...]

>>> +Required properties :
>>> + - compatible : should be "altr,sip-i2c"
>>
>>
>> Seems kind of generic.
>>
> I'm using sip for soft IP - right now we only offer 1 flavor.

There is no versioning or release numbering associated with it?

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thor Thayer May 5, 2017, 2:55 p.m. UTC | #4
On 04/20/2017 10:47 AM, Rob Herring wrote:
> On Fri, Apr 14, 2017 at 8:46 AM, Thor Thayer
> <thor.thayer@linux.intel.com> wrote:
>> Hi Rob,
>>
>> On 04/13/2017 04:22 PM, Rob Herring wrote:
>>>
>>> On Tue, Apr 11, 2017 at 11:02:26AM -0500, thor.thayer@linux.intel.com
>>> wrote:
>>>>
>>>> From: Thor Thayer <thor.thayer@linux.intel.com>
>
> [...]
>
>>>> +Required properties :
>>>> + - compatible : should be "altr,sip-i2c"
>>>
>>>
>>> Seems kind of generic.
>>>
>> I'm using sip for soft IP - right now we only offer 1 flavor.
>
> There is no versioning or release numbering associated with it?
>
> Rob
>
Hi Rob,

No. After double checking with the soft IP owners, there isn't any 
versioning or release number for this.

Thanks,

Thor
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c-altera.txt b/Documentation/devicetree/bindings/i2c/i2c-altera.txt
new file mode 100644
index 0000000..a67241c
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/i2c-altera.txt
@@ -0,0 +1,37 @@ 
+* Altera I2C Controller
+
+Required properties :
+ - compatible : should be "altr,sip-i2c"
+ - reg        : Offset and length of the register set for the device
+ - interrupts : <IRQ> where IRQ is the interrupt number.
+ - clocks     : phandles to input clocks.
+ - #address-cells = <1>;
+ - #size-cells = <0>;
+
+Recommended properties :
+ - clock-frequency : desired I2C bus clock frequency in Hz.
+
+Optional properties :
+ - altr,fifo-size : Size of the RX and TX FIFOs.
+ - Child nodes conforming to i2c bus binding
+
+Example :
+
+	i2c@100080000 {
+		compatible = "altr,sip-i2c";
+		reg = <0x00000001 0x00080000 0x00000040>;
+		interrupt-parent = <&intc>;
+		interrupts = <0 43 4>;
+		clocks = <&clk_0>;
+		clock-frequency = <100000>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		altr,fifo-size = <4>;
+
+		eeprom@51 {
+			compatible = "atmel,24c32";
+			reg = <0x51>;
+			pagesize = <32>;
+		};
+	};
+