RE: [PATCH 1/3] dt-bindings: pci: rcar-pci-host: convert bindings to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Rob,

Thank you for your review!

> From: Rob Herring, Sent: Wednesday, October 28, 2020 11:49 PM
> 
> On Wed, Oct 28, 2020 at 11:05:49AM +0900, Yoshihiro Shimoda wrote:
> > Convert Renesas PCIe Host controller bindings documentation to
> > json-schema. Note that some compatible doesn't contain on
> > the original documantation so that incremental patches are required
> > for it.
> >
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> > ---
> >  .../devicetree/bindings/pci/rcar-pci-host.yaml     | 146 +++++++++++++++++++++
> >  Documentation/devicetree/bindings/pci/rcar-pci.txt |  72 ----------
> >  2 files changed, 146 insertions(+), 72 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/pci/rcar-pci-host.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/pci/rcar-pci.txt
> >
> > diff --git a/Documentation/devicetree/bindings/pci/rcar-pci-host.yaml
> b/Documentation/devicetree/bindings/pci/rcar-pci-host.yaml
> > new file mode 100644
> > index 0000000..d286454
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/pci/rcar-pci-host.yaml
> > @@ -0,0 +1,146 @@
<snip>
> > +maintainers:
> > +  - Marek Vasut <marek.vasut+renesas@xxxxxxxxx>
> > +  - Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> 
> allOf:
>   - $ref: pci-bus.yaml#

I got it.

<snip>
> > +  '#address-cells':
> > +    const: 3
> > +
> > +  '#size-cells':
> > +    const: 2
> 
> No need to define these here as pci-bus.yaml does.

I'll remove these.

> > +
> > +  bus-range: true
> > +
> > +  device_type:
> > +    const: pci
> 
> Same here.

I got it.

> > +
> > +  ranges:
> > +    minItems: 4
> > +    maxItems: 4
> > +
> > +  dma-ranges:
> > +    minItems: 1
> > +    maxItems: 2
> > +
> > +  interrupts:
> > +    minItems: 3
> > +    maxItems: 3
> > +
> > +  '#interrupt-cells':
> > +    const: 1
> 
> And this.

I got it. I'll remove it.

> > +
> > +  interrupt-map-mask: true
> > +
> > +  interrupt-map: true
> > +
> > +  clocks:
> > +    maxItems: 2
> > +
> > +  clock-names:
> > +    items:
> > +      - const: pcie
> > +      - const: pcie_bus
> > +
> > +  power-domains:
> > +    maxItems: 1
> > +
> > +  resets:
> > +    maxItems: 1
> > +
> > +  phys:
> > +    maxItems: 1
> > +
> > +  phy-names:
> > +    const: pcie
> > +
> > +required:
> > +  - compatible
> > +  - reg
> 
> > +  - '#address-cells'
> > +  - '#size-cells'
> 
> Already required by pci-bus.yaml

I'll remove it.

> > +  - bus-range
> 
> This generally shouldn't be required if 0-255 is supported.

I got it.

> > +  - device_type
> > +  - ranges
> 
> Both already required by pci-bus.yaml

I'll remove it.

> > +  - dma-ranges
> > +  - interrupts
> 
> > +  - '#interrupt-cells'
> > +  - interrupt-map-mask
> > +  - interrupt-map
> 
> And these.

I got it.

> > +  - clocks
> > +  - clock-names
> > +  - power-domains
> > +  - resets
> > +
> > +additionalProperties: false
> 
> Use unevaluatedProperties instead.

I'll fix it.

> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
> > +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> > +    #include <dt-bindings/power/r8a7791-sysc.h>
> > +
> > +    soc {
> > +        #address-cells = <2>;
> > +        #size-cells = <2>;
> > +
> > +        pcie: pcie@fe000000 {
> > +            compatible = "renesas,pcie-r8a7791", "renesas,pcie-rcar-gen2";
> > +            reg = <0 0xfe000000 0 0x80000>;
> > +             #address-cells = <3>;
> > +             #size-cells = <2>;
> > +             bus-range = <0x00 0xff>;
> > +             device_type = "pci";
> > +             ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000>,
> > +                      <0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000>,
> > +                      <0x02000000 0 0x30000000 0 0x30000000 0 0x08000000>,
> > +                      <0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
> > +             dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000>,
> > +                          <0x42000000 2 0x00000000 2 0x00000000 0 0x40000000>;
> > +             interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
> > +                          <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
> > +                          <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
> > +             #interrupt-cells = <1>;
> > +             interrupt-map-mask = <0 0 0 0>;
> > +             interrupt-map = <0 0 0 0 &gic GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
> > +             clocks = <&cpg CPG_MOD 319>, <&pcie_bus_clk>;
> > +             clock-names = "pcie", "pcie_bus";
> > +             power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
> > +             resets = <&cpg 319>;
> > +             status = "disabled";
> 
> Don't show status in examples.

Oops. I'll remove it.

Best regards,
Yoshihiro Shimoda





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux