xref: /freebsd-src/sys/contrib/device-tree/Bindings/memory-controllers/arm,pl35x-smc.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
18bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28bab661aSEmmanuel Vadot%YAML 1.2
38bab661aSEmmanuel Vadot---
48bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/memory-controllers/arm,pl35x-smc.yaml#
58bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68bab661aSEmmanuel Vadot
78bab661aSEmmanuel Vadottitle: Arm PL35x Series Static Memory Controller (SMC)
88bab661aSEmmanuel Vadot
98bab661aSEmmanuel Vadotmaintainers:
108bab661aSEmmanuel Vadot  - Miquel Raynal <miquel.raynal@bootlin.com>
118bab661aSEmmanuel Vadot
128bab661aSEmmanuel Vadotdescription: |
138bab661aSEmmanuel Vadot  The PL35x Static Memory Controller is a bus where you can connect two kinds
148bab661aSEmmanuel Vadot  of memory interfaces, which are NAND and memory mapped interfaces (such as
158bab661aSEmmanuel Vadot  SRAM or NOR) depending on the specific configuration.
168bab661aSEmmanuel Vadot
178bab661aSEmmanuel Vadot  The TRM is available here:
188bab661aSEmmanuel Vadot  https://documentation-service.arm.com/static/5e8e2524fd977155116a58aa
198bab661aSEmmanuel Vadot
208bab661aSEmmanuel Vadot# We need a select here so we don't match all nodes with 'arm,primecell'
218bab661aSEmmanuel Vadotselect:
228bab661aSEmmanuel Vadot  properties:
238bab661aSEmmanuel Vadot    compatible:
248bab661aSEmmanuel Vadot      contains:
258bab661aSEmmanuel Vadot        enum:
268bab661aSEmmanuel Vadot          - arm,pl353-smc-r2p1
278bab661aSEmmanuel Vadot          - arm,pl354
288bab661aSEmmanuel Vadot  required:
298bab661aSEmmanuel Vadot    - compatible
308bab661aSEmmanuel Vadot
318bab661aSEmmanuel Vadotproperties:
328bab661aSEmmanuel Vadot  $nodename:
338bab661aSEmmanuel Vadot    pattern: "^memory-controller@[0-9a-f]+$"
348bab661aSEmmanuel Vadot
358bab661aSEmmanuel Vadot  compatible:
368bab661aSEmmanuel Vadot    items:
378bab661aSEmmanuel Vadot      - enum:
388bab661aSEmmanuel Vadot          - arm,pl353-smc-r2p1
398bab661aSEmmanuel Vadot          - arm,pl354
408bab661aSEmmanuel Vadot      - const: arm,primecell
418bab661aSEmmanuel Vadot
428bab661aSEmmanuel Vadot  "#address-cells":
438bab661aSEmmanuel Vadot    const: 2
448bab661aSEmmanuel Vadot
458bab661aSEmmanuel Vadot  "#size-cells":
468bab661aSEmmanuel Vadot    const: 1
478bab661aSEmmanuel Vadot
488bab661aSEmmanuel Vadot  reg:
498bab661aSEmmanuel Vadot    items:
508bab661aSEmmanuel Vadot      - description:
518bab661aSEmmanuel Vadot          Configuration registers for the host and sub-controllers.
528bab661aSEmmanuel Vadot          The three chip select regions are defined in 'ranges'.
538bab661aSEmmanuel Vadot
548bab661aSEmmanuel Vadot  clocks:
558bab661aSEmmanuel Vadot    minItems: 1
568bab661aSEmmanuel Vadot    maxItems: 2
578bab661aSEmmanuel Vadot
588bab661aSEmmanuel Vadot  clock-names:
598bab661aSEmmanuel Vadot    minItems: 1
608bab661aSEmmanuel Vadot    maxItems: 2
618bab661aSEmmanuel Vadot
628bab661aSEmmanuel Vadot  ranges:
638bab661aSEmmanuel Vadot    minItems: 1
648bab661aSEmmanuel Vadot    maxItems: 8
658bab661aSEmmanuel Vadot
668bab661aSEmmanuel Vadot  interrupts:
678bab661aSEmmanuel Vadot    minItems: 1
688bab661aSEmmanuel Vadot    items:
698bab661aSEmmanuel Vadot      - description: Combined or Memory interface 0 IRQ
708bab661aSEmmanuel Vadot      - description: Memory interface 1 IRQ
718bab661aSEmmanuel Vadot
728bab661aSEmmanuel VadotpatternProperties:
738bab661aSEmmanuel Vadot  "@[0-7],[a-f0-9]+$":
748bab661aSEmmanuel Vadot    type: object
75*fac71e4eSEmmanuel Vadot    additionalProperties: true
768bab661aSEmmanuel Vadot    description: |
778bab661aSEmmanuel Vadot      The child device node represents the controller connected to the SMC
788bab661aSEmmanuel Vadot      bus. The controller can be a NAND controller or a pair of any memory
798bab661aSEmmanuel Vadot      mapped controllers such as NOR and SRAM controllers.
808bab661aSEmmanuel Vadot
818bab661aSEmmanuel Vadot    properties:
828bab661aSEmmanuel Vadot      compatible:
838bab661aSEmmanuel Vadot        description:
848bab661aSEmmanuel Vadot          Compatible of memory controller.
858bab661aSEmmanuel Vadot
868bab661aSEmmanuel Vadot      reg:
878bab661aSEmmanuel Vadot        items:
888bab661aSEmmanuel Vadot          - items:
898bab661aSEmmanuel Vadot              - description: |
908bab661aSEmmanuel Vadot                  Chip-select ID, as in the parent range property.
918bab661aSEmmanuel Vadot                minimum: 0
928bab661aSEmmanuel Vadot                maximum: 7
938bab661aSEmmanuel Vadot              - description: |
948bab661aSEmmanuel Vadot                  Offset of the memory region requested by the device.
958bab661aSEmmanuel Vadot              - description: |
968bab661aSEmmanuel Vadot                  Length of the memory region requested by the device.
978bab661aSEmmanuel Vadot
988bab661aSEmmanuel Vadot    required:
998bab661aSEmmanuel Vadot      - compatible
1008bab661aSEmmanuel Vadot      - reg
1018bab661aSEmmanuel Vadot
1028bab661aSEmmanuel Vadotrequired:
1038bab661aSEmmanuel Vadot  - compatible
1048bab661aSEmmanuel Vadot  - reg
1058bab661aSEmmanuel Vadot  - clock-names
1068bab661aSEmmanuel Vadot  - clocks
1078bab661aSEmmanuel Vadot
1088bab661aSEmmanuel VadotadditionalProperties: false
1098bab661aSEmmanuel Vadot
1108bab661aSEmmanuel VadotallOf:
1118bab661aSEmmanuel Vadot  - if:
1128bab661aSEmmanuel Vadot      properties:
1138bab661aSEmmanuel Vadot        compatible:
1148bab661aSEmmanuel Vadot          contains:
1158bab661aSEmmanuel Vadot            const: arm,pl354
1168bab661aSEmmanuel Vadot    then:
1178bab661aSEmmanuel Vadot      properties:
1188bab661aSEmmanuel Vadot        clocks:
1198bab661aSEmmanuel Vadot          # According to TRM, really should be 3 clocks
1208bab661aSEmmanuel Vadot          maxItems: 1
1218bab661aSEmmanuel Vadot
1228bab661aSEmmanuel Vadot        clock-names:
1238bab661aSEmmanuel Vadot          const: apb_pclk
1248bab661aSEmmanuel Vadot
1258bab661aSEmmanuel Vadot    else:
1268bab661aSEmmanuel Vadot      properties:
1278bab661aSEmmanuel Vadot        clocks:
1288bab661aSEmmanuel Vadot          items:
1298bab661aSEmmanuel Vadot            - description: clock for the memory device bus
1308bab661aSEmmanuel Vadot            - description: main clock of the SMC
1318bab661aSEmmanuel Vadot
1328bab661aSEmmanuel Vadot        clock-names:
1338bab661aSEmmanuel Vadot          items:
1348bab661aSEmmanuel Vadot            - const: memclk
1358bab661aSEmmanuel Vadot            - const: apb_pclk
1368bab661aSEmmanuel Vadot
1378bab661aSEmmanuel Vadotexamples:
1388bab661aSEmmanuel Vadot  - |
1398bab661aSEmmanuel Vadot    smcc: memory-controller@e000e000 {
1408bab661aSEmmanuel Vadot      compatible = "arm,pl353-smc-r2p1", "arm,primecell";
1418bab661aSEmmanuel Vadot      reg = <0xe000e000 0x0001000>;
1428bab661aSEmmanuel Vadot      clock-names = "memclk", "apb_pclk";
1438bab661aSEmmanuel Vadot      clocks = <&clkc 11>, <&clkc 44>;
1448bab661aSEmmanuel Vadot      ranges = <0x0 0x0 0xe1000000 0x1000000 /* Nand CS region */
1458bab661aSEmmanuel Vadot                0x1 0x0 0xe2000000 0x2000000 /* SRAM/NOR CS0 region */
1468bab661aSEmmanuel Vadot                0x2 0x0 0xe4000000 0x2000000>; /* SRAM/NOR CS1 region */
1478bab661aSEmmanuel Vadot      #address-cells = <2>;
1488bab661aSEmmanuel Vadot      #size-cells = <1>;
1498bab661aSEmmanuel Vadot
1508bab661aSEmmanuel Vadot      nfc0: nand-controller@0,0 {
1518bab661aSEmmanuel Vadot        compatible = "arm,pl353-nand-r2p1";
1528bab661aSEmmanuel Vadot        reg = <0 0 0x1000000>;
1538bab661aSEmmanuel Vadot        #address-cells = <1>;
1548bab661aSEmmanuel Vadot        #size-cells = <0>;
1558bab661aSEmmanuel Vadot      };
1568bab661aSEmmanuel Vadot    };
157