Message ID | ca3122511b201a0da0a3f930c0f894bf11954423.1701768028.git.ysato@users.sourceforge.jp (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | Device Tree support for SH7751 based board | expand |
Hi Sato-san, On Tue, Dec 5, 2023 at 10:46 AM Yoshinori Sato <ysato@users.sourceforge.jp> wrote: > Renesas SH7751 PCI Controller json-schema. > > Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Thanks for your patch! > --- /dev/null > +++ b/Documentation/devicetree/bindings/pci/renesas,sh7751-pci.yaml > @@ -0,0 +1,128 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pci/renesas,sh7751-pci.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas SH7751 PCI Host controller > + > +maintainers: > + - Yoshinori Sato <ysato@users.sourceforge.jp> > + > +allOf: > + - $ref: /schemas/pci/pci-bus.yaml# > + > +properties: > + compatible: > + items: > + - enum: > + - renesas,sh7751-pci > + > + reg: > + minItems: 2 > + maxItems: 2 Please add "reg-names", as there is more than one entry. If that is not sufficient to document what each entry means, please add "description"s, too. > + renesas,memory: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: | > + PCI BMDMA src/dst memory area. Isn't that the purpose of the "dma-ranges" property? > + > + renesas,bcr1: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + SH7751 PCIC PCIBCR1 value. This value makes add the value of BSC's BCR1. What does this mean? > + > + renesas,mcrmask: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + SH7751 PCIC PCIMCR value. This value makes clear bit in the value of BSC's MCR. What does this mean? > + > + renesas,intm: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + SH7751 PCIC PCIINTM value. > + > + renesas,aintm: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + SH7751 PCIC PCIIANTM value. > + > + renesas,lsr: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + SH7751 PCIC PCILSR0 and PCILSR1 values. > + First word is PCILSR0, Second word is PCILSR1. > + > + renesas,lar: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + SH7751 PCIC PCILSA0 and PCILAR1 values. > + First word is PCILAR0, Second word is PCILAR1. > + > + renesas,dmabt: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + SH7751 PCIC PCIDMABT value. > + > + renesas,pintm: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + SH7751 PCIC PCIPINTM value. > + > + renesas,config: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: | > + SH7751 PCIC PCICONFIG values array. Register Number and value pair list. Several of these properties look like pure hardware programming. Can these values be derived from other (standard) DT properties? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
diff --git a/Documentation/devicetree/bindings/pci/renesas,sh7751-pci.yaml b/Documentation/devicetree/bindings/pci/renesas,sh7751-pci.yaml new file mode 100644 index 000000000000..c71ed56b7210 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/renesas,sh7751-pci.yaml @@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pci/renesas,sh7751-pci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas SH7751 PCI Host controller + +maintainers: + - Yoshinori Sato <ysato@users.sourceforge.jp> + +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + +properties: + compatible: + items: + - enum: + - renesas,sh7751-pci + + reg: + minItems: 2 + maxItems: 2 + + "#interrupt-cells": + const: 1 + + "#address-cells": + const: 3 + + "#size-cells": + const: 2 + + ranges: true + + interrupt-controller: true + + renesas,memory: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + PCI BMDMA src/dst memory area. + + renesas,bcr1: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SH7751 PCIC PCIBCR1 value. This value makes add the value of BSC's BCR1. + + renesas,mcrmask: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SH7751 PCIC PCIMCR value. This value makes clear bit in the value of BSC's MCR. + + renesas,intm: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SH7751 PCIC PCIINTM value. + + renesas,aintm: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SH7751 PCIC PCIIANTM value. + + renesas,lsr: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SH7751 PCIC PCILSR0 and PCILSR1 values. + First word is PCILSR0, Second word is PCILSR1. + + renesas,lar: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SH7751 PCIC PCILSA0 and PCILAR1 values. + First word is PCILAR0, Second word is PCILAR1. + + renesas,dmabt: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SH7751 PCIC PCIDMABT value. + + renesas,pintm: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + SH7751 PCIC PCIPINTM value. + + renesas,config: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + SH7751 PCIC PCICONFIG values array. Register Number and value pair list. + +required: + - compatible + - reg + - "#interrupt-cells" + - "#address-cells" + - "#size-cells" + - ranges + - interrupt-map + - interrupt-map-mask + +unevaluatedProperties: false + +examples: + - | + pci@fe200000 { + compatible = "renesas,sh7751-pci"; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + device_type = "pci"; + bus-range = <0 0>; + ranges = <0x02000000 0 0xfd000000 0xfd000000 0 0x01000000>, + <0x01000000 0 0x00000000 0xfe240000 0 0x00040000>; + reg = <0xfe200000 0x0400>, + <0xff800000 0x0100>; + interrupt-map = <0x0000 0 0 1 &julianintc 5>, + <0x0000 0 0 2 &julianintc 6>, + <0x0000 0 0 3 &julianintc 7>, + <0x0000 0 0 4 &julianintc 8>, + <0x0800 0 0 1 &julianintc 6>, + <0x0800 0 0 2 &julianintc 7>, + <0x0800 0 0 3 &julianintc 8>, + <0x0800 0 0 4 &julianintc 5>, + <0x1000 0 0 1 &julianintc 7>, + <0x1000 0 0 2 &julianintc 8>, + <0x1000 0 0 3 &julianintc 5>, + <0x1000 0 0 4 &julianintc 6>; + interrupt-map-mask = <0x1800 0 0 7>; + };
Renesas SH7751 PCI Controller json-schema. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> --- .../bindings/pci/renesas,sh7751-pci.yaml | 128 ++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Documentation/devicetree/bindings/pci/renesas,sh7751-pci.yaml