diff mbox series

[v3,01/14] dt-bindings: spi: Document the IBM Power SPI controller

Message ID 20240425213701.655540-2-eajames@linux.ibm.com
State Superseded
Headers show
Series ARM: dts: aspeed: Add IBM P11 BMC Boards | expand

Commit Message

Eddie James April 25, 2024, 9:36 p.m. UTC
The IBM Power chips have a basic SPI controller. Document it.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
 .../devicetree/bindings/spi/ibm,p10-spi.yaml  | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml

Comments

Krzysztof Kozlowski April 26, 2024, 6:15 a.m. UTC | #1
On 25/04/2024 23:36, Eddie James wrote:
> The IBM Power chips have a basic SPI controller. Document it.

Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching.

> 
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
>  .../devicetree/bindings/spi/ibm,p10-spi.yaml  | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml
> 
> diff --git a/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml b/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml
> new file mode 100644
> index 000000000000..9bf57b621c1f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/spi/ibm,p10-spi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: IBM SPI Controller

IBM P10 SPI Controller

> +
> +maintainers:
> +  - Eddie James <eajames@linux.ibm.com>
> +
> +description:
> +  A basic SPI controller found on IBM Power chips, accessed over FSI. This
> +  node will always be a child node of an ibm,fsi2spi node.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ibm,p10-spi
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +allOf:
> +  - $ref: spi-controller.yaml#
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    fsi2spi@1c00 {
> +        compatible = "ibm,fsi2spi";
> +        reg = <0x1c00 0x400>;
> +        #address-cells = <1>;
> +        #size-cells = <0>;

Use rather some simple wrapper instead of node causing warnings, e.g.
fsi {} with only address/size cells.



Best regards,
Krzysztof
Eddie James April 26, 2024, 2:49 p.m. UTC | #2
On 4/26/24 01:15, Krzysztof Kozlowski wrote:
> On 25/04/2024 23:36, Eddie James wrote:
>> The IBM Power chips have a basic SPI controller. Document it.
> Please use subject prefixes matching the subsystem. You can get them for
> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
> your patch is touching.


Isn't spi the right subsystem here?


>
>> Signed-off-by: Eddie James <eajames@linux.ibm.com>
>> ---
>>   .../devicetree/bindings/spi/ibm,p10-spi.yaml  | 56 +++++++++++++++++++
>>   1 file changed, 56 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml b/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml
>> new file mode 100644
>> index 000000000000..9bf57b621c1f
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml
>> @@ -0,0 +1,56 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/spi/ibm,p10-spi.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: IBM SPI Controller
> IBM P10 SPI Controller


Ack.


>
>> +
>> +maintainers:
>> +  - Eddie James <eajames@linux.ibm.com>
>> +
>> +description:
>> +  A basic SPI controller found on IBM Power chips, accessed over FSI. This
>> +  node will always be a child node of an ibm,fsi2spi node.
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - ibm,p10-spi
>> +
>> +  reg:
>> +    maxItems: 1
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +allOf:
>> +  - $ref: spi-controller.yaml#
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    fsi2spi@1c00 {
>> +        compatible = "ibm,fsi2spi";
>> +        reg = <0x1c00 0x400>;
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
> Use rather some simple wrapper instead of node causing warnings, e.g.
> fsi {} with only address/size cells.


Will do, thanks.


>
>
>
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski April 28, 2024, 4:39 p.m. UTC | #3
On 26/04/2024 16:49, Eddie James wrote:
> 
> On 4/26/24 01:15, Krzysztof Kozlowski wrote:
>> On 25/04/2024 23:36, Eddie James wrote:
>>> The IBM Power chips have a basic SPI controller. Document it.
>> Please use subject prefixes matching the subsystem. You can get them for
>> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
>> your patch is touching.
> 
> 
> Isn't spi the right subsystem here?

And what prefix shall be for SPI bindings? Did you run the command or
just replying to disagree with me?


Best regards,
Krzysztof
Krzysztof Kozlowski April 29, 2024, 6:17 p.m. UTC | #4
On 29/04/2024 16:38, Eddie James wrote:
> 
> On 4/28/24 11:39, Krzysztof Kozlowski wrote:
>> On 26/04/2024 16:49, Eddie James wrote:
>>> On 4/26/24 01:15, Krzysztof Kozlowski wrote:
>>>> On 25/04/2024 23:36, Eddie James wrote:
>>>>> The IBM Power chips have a basic SPI controller. Document it.
>>>> Please use subject prefixes matching the subsystem. You can get them for
>>>> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
>>>> your patch is touching.
>>>
>>> Isn't spi the right subsystem here?
>> And what prefix shall be for SPI bindings? Did you run the command or
>> just replying to disagree with me?
> 
> 
> The correct prefix is either dt-bindings: spi or spi: dt-bindings. I 
> used the former. Would you prefer I use the latter? I followed your 

The correct is the latter, although I see now Mark stopped stripping
dt-bindings in such case. Log is still suggesting that (git log
--oneline -- Documentation/devicetree/bindings/spi/ | grep "^[0-9a-f]\+
spi:" | wc -l gives 370 vs 130), although I understand now different
approach.

It's also mentioned here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml b/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml
new file mode 100644
index 000000000000..9bf57b621c1f
--- /dev/null
+++ b/Documentation/devicetree/bindings/spi/ibm,p10-spi.yaml
@@ -0,0 +1,56 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/spi/ibm,p10-spi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: IBM SPI Controller
+
+maintainers:
+  - Eddie James <eajames@linux.ibm.com>
+
+description:
+  A basic SPI controller found on IBM Power chips, accessed over FSI. This
+  node will always be a child node of an ibm,fsi2spi node.
+
+properties:
+  compatible:
+    enum:
+      - ibm,p10-spi
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+allOf:
+  - $ref: spi-controller.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    fsi2spi@1c00 {
+        compatible = "ibm,fsi2spi";
+        reg = <0x1c00 0x400>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        spi@0 {
+            compatible = "ibm,p10-spi";
+            reg = <0>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+
+            eeprom@0 {
+                compatible = "atmel,at25";
+                reg = <0>;
+                size = <0x80000>;
+                address-width = <24>;
+                pagesize = <256>;
+                spi-max-frequency = <1000000>;
+            };
+        };
+    };