lkml.org 
[lkml]   [2021]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
SubjectRe: [PATCH v3 05/11] spi: dw: Add Pensando Elba SoC SPI Controller bindings
Hi Sergey,

On Wed, Nov 17, 2021 at 12:19 AM Serge Semin <fancer.lancer@gmail.com> wrote:
>
> I was wrong using that construction here (fixup patch would be very
> welcome) seeing the "snps,dw-apb-ssi" doesn't permit having a generic
> "snps,dw*" compatible string. So just const-compatible property should
> be enough:
>
> + compatible:
> + const: pensando,elba-spics
>
>
> > + then:
> > + properties:
> > + pensando,spics:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > + description:
> > + Phandle to the system control device node which provides access to
> > + the spics control register
> > + required:
>
> > + - pensando,spics
>
> Please note, I've asked to be more specific in this property naming.
> Something like this should be fine
> "pensando,elba-syscon-spics"/"pensando,syscon-spics".

I would have avoided a typo in the last reply if the spics property
was more specific. Based on needed construction like this?

DT:
spi0: spi@2800 {
compatible = "pensando,elba-spi";
reg = <0x0 0x2800 0x0 0x100>;
pensando,elba-syscon-spics = <&mssoc 0x2468>;
clocks = <&ahb_clk>;
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
#address-cells = <1>;
#size-cells = <0>;
num-cs = <2>;
status = "disabled";
};

Binding:
--- a/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
+++ b/Documentation/devicetree/bindings/spi/snps,dw-apb-ssi.yaml
@@ -37,6 +37,15 @@ allOf:
else:
required:
- interrupts
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - pensando,elba-spi
+ then:
+ required:
+ - pensando,elba-syscon-spics

properties:
compatible:
@@ -73,6 +82,8 @@ properties:
- renesas,r9a06g032-spi # RZ/N1D
- renesas,r9a06g033-spi # RZ/N1S
- const: renesas,rzn1-spi # RZ/N1
+ - description: Pensando Elba SoC SPI Controller
+ const: pensando,elba-spi

reg:
minItems: 1
Thanks,
Brad

\
 
 \ /
  Last update: 2021-11-17 22:35    [W:0.087 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site