diff mbox series

[v2,2/4] spi: Add devicetree bindings documentation for Loongson SPI

Message ID 1607413467-17698-2-git-send-email-zhangqing@loongson.cn (mailing list archive)
State Superseded
Headers show
Series [v2,1/4] spi: LS7A: Add Loongson LS7A SPI controller driver support | expand

Commit Message

Qing Zhang Dec. 8, 2020, 7:44 a.m. UTC
Add spi-ls7a binding documentation.

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
---
 Documentation/devicetree/bindings/spi/spi-ls7a.txt | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/spi-ls7a.txt

Comments

Jiaxun Yang Dec. 8, 2020, 7:49 a.m. UTC | #1
在 2020/12/8 15:44, Qing Zhang 写道:
> Add spi-ls7a binding documentation.
>
> Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
> ---
>   Documentation/devicetree/bindings/spi/spi-ls7a.txt | 31 ++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/spi/spi-ls7a.txt


Hi Qing,

Please use dt schema instead.

Thanks.

- Jiaxun


> diff --git a/Documentation/devicetree/bindings/spi/spi-ls7a.txt b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
> new file mode 100644
> index 0000000..56247b5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
> @@ -0,0 +1,31 @@
> +Binding for LOONGSON LS7A SPI controller
> +
> +Required properties:
> +- compatible: should be "pci0014,7a0b.0","pci0014,7a0b","pciclass088000","pciclass0880".
> +- reg: reference IEEE Std 1275-1994.
> +- #address-cells: <1>, as required by generic SPI binding.
> +- #size-cells: <0>, also as required by generic SPI binding.
> +- #interrupts: No hardware interrupt.
> +
> +Child nodes as per the generic SPI binding.
> +
> +Example:
> +
> +			spi@16,0 {
> +				compatible = "pci0014,7a0b.0",
> +						"pci0014,7a0b",
> +						"pciclass088000",
> +						"pciclass0880";
> +
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				reg = <0xb000 0x0 0x0 0x0 0x0>;
> +				num-chipselects = <0>;
> +				spiflash: s25fl016k@0 {
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				compatible ="spansion,s25fl016k","jedec,spi-nor";
> +				spi-max-frequency=<50000000>;
> +				reg=<0>;
> +				};
> +			};
Sergei Shtylyov Dec. 8, 2020, 8:40 a.m. UTC | #2
Hello!

On 08.12.2020 10:44, Qing Zhang wrote:

> Add spi-ls7a binding documentation.
> 
> Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
> ---
>   Documentation/devicetree/bindings/spi/spi-ls7a.txt | 31 ++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/spi/spi-ls7a.txt
> 
> diff --git a/Documentation/devicetree/bindings/spi/spi-ls7a.txt b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
> new file mode 100644
> index 0000000..56247b5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
> @@ -0,0 +1,31 @@
> +Binding for LOONGSON LS7A SPI controller
> +
> +Required properties:
> +- compatible: should be "pci0014,7a0b.0","pci0014,7a0b","pciclass088000","pciclass0880".
> +- reg: reference IEEE Std 1275-1994.
> +- #address-cells: <1>, as required by generic SPI binding.
> +- #size-cells: <0>, also as required by generic SPI binding.
> +- #interrupts: No hardware interrupt.

    You say it's a required prop, yet yuoe example doesn't have it...

> +
> +Child nodes as per the generic SPI binding.
> +
> +Example:
> +
> +			spi@16,0 {
> +				compatible = "pci0014,7a0b.0",
> +						"pci0014,7a0b",
> +						"pciclass088000",
> +						"pciclass0880";
> +
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				reg = <0xb000 0x0 0x0 0x0 0x0>;
> +				num-chipselects = <0>;
> +				spiflash: s25fl016k@0 {
> +				#address-cells = <1>;
> +				#size-cells = <1>;

    Once more?

> +				compatible ="spansion,s25fl016k","jedec,spi-nor";

    Once more?

> +				spi-max-frequency=<50000000>;
> +				reg=<0>;

    Once more? Did you mean this for a child node?

> +				};
> +			};

MBR, Sergei
Qing Zhang Dec. 8, 2020, 10:47 a.m. UTC | #3
Hi Sergei Shtylyov,


On 12/08/2020 04:40 PM, Sergei Shtylyov wrote:
> Hello!
>
> On 08.12.2020 10:44, Qing Zhang wrote:
>
>> Add spi-ls7a binding documentation.
>>
>> Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
>> ---
>>   Documentation/devicetree/bindings/spi/spi-ls7a.txt | 31 
>> ++++++++++++++++++++++
>>   1 file changed, 31 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/spi/spi-ls7a.txt
>>
>> diff --git a/Documentation/devicetree/bindings/spi/spi-ls7a.txt 
>> b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
>> new file mode 100644
>> index 0000000..56247b5
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
>> @@ -0,0 +1,31 @@
>> +Binding for LOONGSON LS7A SPI controller
>> +
>> +Required properties:
>> +- compatible: should be 
>> "pci0014,7a0b.0","pci0014,7a0b","pciclass088000","pciclass0880".
>> +- reg: reference IEEE Std 1275-1994.
>> +- #address-cells: <1>, as required by generic SPI binding.
>> +- #size-cells: <0>, also as required by generic SPI binding.
>> +- #interrupts: No hardware interrupt.
>
>    You say it's a required prop, yet yuoe example doesn't have it...
         I want to emphasize here that LS7A SPI has no hardware 
interrupts, and DT is not actually used.
>
>> +
>> +Child nodes as per the generic SPI binding.
>> +
>> +Example:
>> +
>> +            spi@16,0 {
>> +                compatible = "pci0014,7a0b.0",
>> +                        "pci0014,7a0b",
>> +                        "pciclass088000",
>> +                        "pciclass0880";
>> +
>> +                #address-cells = <1>;
>> +                #size-cells = <0>;
>> +                reg = <0xb000 0x0 0x0 0x0 0x0>;
>> +                num-chipselects = <0>;
>> +                spiflash: s25fl016k@0 {
>> +                #address-cells = <1>;
>> +                #size-cells = <1>;
>
>    Once more?
>
>> +                compatible ="spansion,s25fl016k","jedec,spi-nor";
>
>    Once more?
>
>> + spi-max-frequency=<50000000>;
>> +                reg=<0>;
>
>    Once more? Did you mean this for a child node?
        Yes, these are child node attributes, the child node splash is 
not necessary.
>
>> +                };
>> +            };
>
      Thanks

      -Qing
> MBR, Sergei
Mark Brown Dec. 8, 2020, 1:58 p.m. UTC | #4
On Tue, Dec 08, 2020 at 06:47:10PM +0800, zhangqing wrote:
> On 12/08/2020 04:40 PM, Sergei Shtylyov wrote:

> > > +Required properties:

> > > +- #interrupts: No hardware interrupt.

> >    You say it's a required prop, yet yuoe example doesn't have it...

>         I want to emphasize here that LS7A SPI has no hardware interrupts,
> and DT is not actually used.

There is no need to do this, and documenting the property as required
just makes things confusing here.
Sergei Shtylyov Dec. 8, 2020, 2:48 p.m. UTC | #5
On 12/8/20 1:47 PM, zhangqing wrote:

>>> Add spi-ls7a binding documentation.
>>>
>>> Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
>>> ---
>>>   Documentation/devicetree/bindings/spi/spi-ls7a.txt | 31 ++++++++++++++++++++++
>>>   1 file changed, 31 insertions(+)
>>>   create mode 100644 Documentation/devicetree/bindings/spi/spi-ls7a.txt
>>>
>>> diff --git a/Documentation/devicetree/bindings/spi/spi-ls7a.txt b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
>>> new file mode 100644
>>> index 0000000..56247b5
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
>>> @@ -0,0 +1,31 @@
>>> +Binding for LOONGSON LS7A SPI controller
>>> +
>>> +Required properties:
>>> +- compatible: should be "pci0014,7a0b.0","pci0014,7a0b","pciclass088000","pciclass0880".
>>> +- reg: reference IEEE Std 1275-1994.
>>> +- #address-cells: <1>, as required by generic SPI binding.
>>> +- #size-cells: <0>, also as required by generic SPI binding.
>>> +- #interrupts: No hardware interrupt.
>>
>>    You say it's a required prop, yet yuoe example doesn't have it...
>         I want to emphasize here that LS7A SPI has no hardware interrupts, and DT is not actually used.

   The why document the property at all?

>>> +
>>> +Child nodes as per the generic SPI binding.
>>> +
>>> +Example:
>>> +
>>> +            spi@16,0 {
>>> +                compatible = "pci0014,7a0b.0",
>>> +                        "pci0014,7a0b",
>>> +                        "pciclass088000",
>>> +                        "pciclass0880";
>>> +
>>> +                #address-cells = <1>;
>>> +                #size-cells = <0>;
>>> +                reg = <0xb000 0x0 0x0 0x0 0x0>;
>>> +                num-chipselects = <0>;
>>> +                spiflash: s25fl016k@0 {
>>> +                #address-cells = <1>;
>>> +                #size-cells = <1>;
>>
>>    Once more?
>>
>>> +                compatible ="spansion,s25fl016k","jedec,spi-nor";
>>
>>    Once more?
>>
>>> + spi-max-frequency=<50000000>;
>>> +                reg=<0>;
>>
>>    Once more? Did you mean this for a child node?
>        Yes, these are child node attributes, the child node splash is not necessary.

   You should indent the child nodes with 1 more tab...

>>
>>> +                };
>>> +            };
>>
>      Thanks
> 
>      -Qing

MBR, Sergei
Qing Zhang Dec. 9, 2020, 1:16 a.m. UTC | #6
On 12/08/2020 10:48 PM, Sergei Shtylyov wrote:
> On 12/8/20 1:47 PM, zhangqing wrote:
>
>>>> Add spi-ls7a binding documentation.
>>>>
>>>> Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
>>>> ---
>>>>    Documentation/devicetree/bindings/spi/spi-ls7a.txt | 31 ++++++++++++++++++++++
>>>>    1 file changed, 31 insertions(+)
>>>>    create mode 100644 Documentation/devicetree/bindings/spi/spi-ls7a.txt
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/spi/spi-ls7a.txt b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
>>>> new file mode 100644
>>>> index 0000000..56247b5
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
>>>> @@ -0,0 +1,31 @@
>>>> +Binding for LOONGSON LS7A SPI controller
>>>> +
>>>> +Required properties:
>>>> +- compatible: should be "pci0014,7a0b.0","pci0014,7a0b","pciclass088000","pciclass0880".
>>>> +- reg: reference IEEE Std 1275-1994.
>>>> +- #address-cells: <1>, as required by generic SPI binding.
>>>> +- #size-cells: <0>, also as required by generic SPI binding.
>>>> +- #interrupts: No hardware interrupt.
>>>     You say it's a required prop, yet yuoe example doesn't have it...
>>          I want to emphasize here that LS7A SPI has no hardware interrupts, and DT is not actually used.
>     The why document the property at all?
           Thank you for your reply again,

           I will remove the #interrupt attribute in the third edition.
>
>>>> +
>>>> +Child nodes as per the generic SPI binding.
>>>> +
>>>> +Example:
>>>> +
>>>> +            spi@16,0 {
>>>> +                compatible = "pci0014,7a0b.0",
>>>> +                        "pci0014,7a0b",
>>>> +                        "pciclass088000",
>>>> +                        "pciclass0880";
>>>> +
>>>> +                #address-cells = <1>;
>>>> +                #size-cells = <0>;
>>>> +                reg = <0xb000 0x0 0x0 0x0 0x0>;
>>>> +                num-chipselects = <0>;
>>>> +                spiflash: s25fl016k@0 {
>>>> +                #address-cells = <1>;
>>>> +                #size-cells = <1>;
>>>     Once more?
>>>
>>>> +                compatible ="spansion,s25fl016k","jedec,spi-nor";
>>>     Once more?
>>>
>>>> + spi-max-frequency=<50000000>;
>>>> +                reg=<0>;
>>>     Once more? Did you mean this for a child node?
>>         Yes, these are child node attributes, the child node splash is not necessary.
>     You should indent the child nodes with 1 more tab...
         I will do it and send the v3 in the soon.
>
>>>> +                };
>>>> +            };
>>       Thanks
>>
>>       -Qing
> MBR, Sergei
Qing Zhang Dec. 9, 2020, 1:21 a.m. UTC | #7
On 12/08/2020 09:58 PM, Mark Brown wrote:
> On Tue, Dec 08, 2020 at 06:47:10PM +0800, zhangqing wrote:
>> On 12/08/2020 04:40 PM, Sergei Shtylyov wrote:
>>>> +Required properties:
>>>> +- #interrupts: No hardware interrupt.
>>>     You say it's a required prop, yet yuoe example doesn't have it...
>>          I want to emphasize here that LS7A SPI has no hardware interrupts,
>> and DT is not actually used.
> There is no need to do this, and documenting the property as required
> just makes things confusing here.
      Thanks for your suggestion,

     I will remove the #interrupt attribute in the third edition.

     Thanks,

     -Qing

>
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/spi-ls7a.txt b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
new file mode 100644
index 0000000..56247b5
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/spi-ls7a.txt
@@ -0,0 +1,31 @@ 
+Binding for LOONGSON LS7A SPI controller
+
+Required properties:
+- compatible: should be "pci0014,7a0b.0","pci0014,7a0b","pciclass088000","pciclass0880".
+- reg: reference IEEE Std 1275-1994.
+- #address-cells: <1>, as required by generic SPI binding.
+- #size-cells: <0>, also as required by generic SPI binding.
+- #interrupts: No hardware interrupt.
+
+Child nodes as per the generic SPI binding.
+
+Example:
+
+			spi@16,0 {
+				compatible = "pci0014,7a0b.0",
+						"pci0014,7a0b",
+						"pciclass088000",
+						"pciclass0880";
+
+				#address-cells = <1>;
+				#size-cells = <0>;
+				reg = <0xb000 0x0 0x0 0x0 0x0>;
+				num-chipselects = <0>;
+				spiflash: s25fl016k@0 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+				compatible ="spansion,s25fl016k","jedec,spi-nor";
+				spi-max-frequency=<50000000>;
+				reg=<0>;
+				};
+			};