xref: /freebsd/sys/contrib/device-tree/Bindings/soc/fsl/cpm_qe/fsl,qe-ucc-qmc.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1*b2d2a78aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*b2d2a78aSEmmanuel Vadot%YAML 1.2
3*b2d2a78aSEmmanuel Vadot---
4*b2d2a78aSEmmanuel Vadot$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qe-ucc-qmc.yaml#
5*b2d2a78aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*b2d2a78aSEmmanuel Vadot
7*b2d2a78aSEmmanuel Vadottitle: PowerQUICC QE QUICC Multichannel Controller (QMC)
8*b2d2a78aSEmmanuel Vadot
9*b2d2a78aSEmmanuel Vadotmaintainers:
10*b2d2a78aSEmmanuel Vadot  - Herve Codina <herve.codina@bootlin.com>
11*b2d2a78aSEmmanuel Vadot
12*b2d2a78aSEmmanuel Vadotdescription:
13*b2d2a78aSEmmanuel Vadot  The QMC (QUICC Multichannel Controller) emulates up to 64 channels within one
14*b2d2a78aSEmmanuel Vadot  serial controller using the same TDM physical interface routed from TSA.
15*b2d2a78aSEmmanuel Vadot
16*b2d2a78aSEmmanuel Vadotproperties:
17*b2d2a78aSEmmanuel Vadot  compatible:
18*b2d2a78aSEmmanuel Vadot    items:
19*b2d2a78aSEmmanuel Vadot      - enum:
20*b2d2a78aSEmmanuel Vadot          - fsl,mpc8321-ucc-qmc
21*b2d2a78aSEmmanuel Vadot      - const: fsl,qe-ucc-qmc
22*b2d2a78aSEmmanuel Vadot
23*b2d2a78aSEmmanuel Vadot  reg:
24*b2d2a78aSEmmanuel Vadot    items:
25*b2d2a78aSEmmanuel Vadot      - description: UCC (Unified communication controller) register base
26*b2d2a78aSEmmanuel Vadot      - description: Dual port ram base
27*b2d2a78aSEmmanuel Vadot
28*b2d2a78aSEmmanuel Vadot  reg-names:
29*b2d2a78aSEmmanuel Vadot    items:
30*b2d2a78aSEmmanuel Vadot      - const: ucc_regs
31*b2d2a78aSEmmanuel Vadot      - const: dpram
32*b2d2a78aSEmmanuel Vadot
33*b2d2a78aSEmmanuel Vadot  interrupts:
34*b2d2a78aSEmmanuel Vadot    maxItems: 1
35*b2d2a78aSEmmanuel Vadot    description: UCC interrupt line in the QE interrupt controller
36*b2d2a78aSEmmanuel Vadot
37*b2d2a78aSEmmanuel Vadot  fsl,tsa-serial:
38*b2d2a78aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle-array
39*b2d2a78aSEmmanuel Vadot    items:
40*b2d2a78aSEmmanuel Vadot      - items:
41*b2d2a78aSEmmanuel Vadot          - description: phandle to TSA node
42*b2d2a78aSEmmanuel Vadot          - enum: [1, 2, 3, 4, 5]
43*b2d2a78aSEmmanuel Vadot            description: |
44*b2d2a78aSEmmanuel Vadot              TSA serial interface (dt-bindings/soc/qe-fsl,tsa.h defines these
45*b2d2a78aSEmmanuel Vadot              values)
46*b2d2a78aSEmmanuel Vadot               - 1: UCC1
47*b2d2a78aSEmmanuel Vadot               - 2: UCC2
48*b2d2a78aSEmmanuel Vadot               - 3: UCC3
49*b2d2a78aSEmmanuel Vadot               - 4: UCC4
50*b2d2a78aSEmmanuel Vadot               - 5: UCC5
51*b2d2a78aSEmmanuel Vadot    description:
52*b2d2a78aSEmmanuel Vadot      Should be a phandle/number pair. The phandle to TSA node and the TSA
53*b2d2a78aSEmmanuel Vadot      serial interface to use.
54*b2d2a78aSEmmanuel Vadot
55*b2d2a78aSEmmanuel Vadot  fsl,soft-qmc:
56*b2d2a78aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
57*b2d2a78aSEmmanuel Vadot    description:
58*b2d2a78aSEmmanuel Vadot      Soft QMC firmware name to load. If this property is omitted, no firmware
59*b2d2a78aSEmmanuel Vadot      are used.
60*b2d2a78aSEmmanuel Vadot
61*b2d2a78aSEmmanuel Vadot  '#address-cells':
62*b2d2a78aSEmmanuel Vadot    const: 1
63*b2d2a78aSEmmanuel Vadot
64*b2d2a78aSEmmanuel Vadot  '#size-cells':
65*b2d2a78aSEmmanuel Vadot    const: 0
66*b2d2a78aSEmmanuel Vadot
67*b2d2a78aSEmmanuel VadotpatternProperties:
68*b2d2a78aSEmmanuel Vadot  '^channel@([0-9]|[1-5][0-9]|6[0-3])$':
69*b2d2a78aSEmmanuel Vadot    description:
70*b2d2a78aSEmmanuel Vadot      A channel managed by this controller
71*b2d2a78aSEmmanuel Vadot    type: object
72*b2d2a78aSEmmanuel Vadot    additionalProperties: false
73*b2d2a78aSEmmanuel Vadot
74*b2d2a78aSEmmanuel Vadot    properties:
75*b2d2a78aSEmmanuel Vadot      compatible:
76*b2d2a78aSEmmanuel Vadot        items:
77*b2d2a78aSEmmanuel Vadot          - enum:
78*b2d2a78aSEmmanuel Vadot              - fsl,mpc8321-ucc-qmc-hdlc
79*b2d2a78aSEmmanuel Vadot          - const: fsl,qe-ucc-qmc-hdlc
80*b2d2a78aSEmmanuel Vadot          - const: fsl,qmc-hdlc
81*b2d2a78aSEmmanuel Vadot
82*b2d2a78aSEmmanuel Vadot      reg:
83*b2d2a78aSEmmanuel Vadot        minimum: 0
84*b2d2a78aSEmmanuel Vadot        maximum: 63
85*b2d2a78aSEmmanuel Vadot        description:
86*b2d2a78aSEmmanuel Vadot          The channel number
87*b2d2a78aSEmmanuel Vadot
88*b2d2a78aSEmmanuel Vadot      fsl,operational-mode:
89*b2d2a78aSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/string
90*b2d2a78aSEmmanuel Vadot        enum: [transparent, hdlc]
91*b2d2a78aSEmmanuel Vadot        default: transparent
92*b2d2a78aSEmmanuel Vadot        description: |
93*b2d2a78aSEmmanuel Vadot          The channel operational mode
94*b2d2a78aSEmmanuel Vadot            - hdlc: The channel handles HDLC frames
95*b2d2a78aSEmmanuel Vadot            - transparent: The channel handles raw data without any processing
96*b2d2a78aSEmmanuel Vadot
97*b2d2a78aSEmmanuel Vadot      fsl,reverse-data:
98*b2d2a78aSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/flag
99*b2d2a78aSEmmanuel Vadot        description:
100*b2d2a78aSEmmanuel Vadot          The bit order as seen on the channels is reversed,
101*b2d2a78aSEmmanuel Vadot          transmitting/receiving the MSB of each octet first.
102*b2d2a78aSEmmanuel Vadot          This flag is used only in 'transparent' mode.
103*b2d2a78aSEmmanuel Vadot
104*b2d2a78aSEmmanuel Vadot      fsl,tx-ts-mask:
105*b2d2a78aSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint64
106*b2d2a78aSEmmanuel Vadot        description:
107*b2d2a78aSEmmanuel Vadot          Channel assigned Tx time-slots within the Tx time-slots routed by the
108*b2d2a78aSEmmanuel Vadot          TSA to this cell.
109*b2d2a78aSEmmanuel Vadot
110*b2d2a78aSEmmanuel Vadot      fsl,rx-ts-mask:
111*b2d2a78aSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint64
112*b2d2a78aSEmmanuel Vadot        description:
113*b2d2a78aSEmmanuel Vadot          Channel assigned Rx time-slots within the Rx time-slots routed by the
114*b2d2a78aSEmmanuel Vadot          TSA to this cell.
115*b2d2a78aSEmmanuel Vadot
116*b2d2a78aSEmmanuel Vadot      fsl,framer:
117*b2d2a78aSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/phandle
118*b2d2a78aSEmmanuel Vadot        description:
119*b2d2a78aSEmmanuel Vadot          phandle to the framer node. The framer is in charge of an E1/T1 line
120*b2d2a78aSEmmanuel Vadot          interface connected to the TDM bus. It can be used to get the E1/T1 line
121*b2d2a78aSEmmanuel Vadot          status such as link up/down.
122*b2d2a78aSEmmanuel Vadot
123*b2d2a78aSEmmanuel Vadot    allOf:
124*b2d2a78aSEmmanuel Vadot      - if:
125*b2d2a78aSEmmanuel Vadot          properties:
126*b2d2a78aSEmmanuel Vadot            compatible:
127*b2d2a78aSEmmanuel Vadot              not:
128*b2d2a78aSEmmanuel Vadot                contains:
129*b2d2a78aSEmmanuel Vadot                  const: fsl,qmc-hdlc
130*b2d2a78aSEmmanuel Vadot        then:
131*b2d2a78aSEmmanuel Vadot          properties:
132*b2d2a78aSEmmanuel Vadot            fsl,framer: false
133*b2d2a78aSEmmanuel Vadot
134*b2d2a78aSEmmanuel Vadot    required:
135*b2d2a78aSEmmanuel Vadot      - reg
136*b2d2a78aSEmmanuel Vadot      - fsl,tx-ts-mask
137*b2d2a78aSEmmanuel Vadot      - fsl,rx-ts-mask
138*b2d2a78aSEmmanuel Vadot
139*b2d2a78aSEmmanuel Vadotrequired:
140*b2d2a78aSEmmanuel Vadot  - compatible
141*b2d2a78aSEmmanuel Vadot  - reg
142*b2d2a78aSEmmanuel Vadot  - reg-names
143*b2d2a78aSEmmanuel Vadot  - interrupts
144*b2d2a78aSEmmanuel Vadot  - fsl,tsa-serial
145*b2d2a78aSEmmanuel Vadot  - '#address-cells'
146*b2d2a78aSEmmanuel Vadot  - '#size-cells'
147*b2d2a78aSEmmanuel Vadot
148*b2d2a78aSEmmanuel VadotadditionalProperties: false
149*b2d2a78aSEmmanuel Vadot
150*b2d2a78aSEmmanuel Vadotexamples:
151*b2d2a78aSEmmanuel Vadot  - |
152*b2d2a78aSEmmanuel Vadot    #include <dt-bindings/soc/qe-fsl,tsa.h>
153*b2d2a78aSEmmanuel Vadot
154*b2d2a78aSEmmanuel Vadot    qmc@a60 {
155*b2d2a78aSEmmanuel Vadot        compatible = "fsl,mpc8321-ucc-qmc", "fsl,qe-ucc-qmc";
156*b2d2a78aSEmmanuel Vadot        reg = <0x3200 0x200>,
157*b2d2a78aSEmmanuel Vadot              <0x10000 0x1000>;
158*b2d2a78aSEmmanuel Vadot        reg-names = "ucc_regs", "dpram";
159*b2d2a78aSEmmanuel Vadot        interrupts = <35>;
160*b2d2a78aSEmmanuel Vadot        interrupt-parent = <&qeic>;
161*b2d2a78aSEmmanuel Vadot        fsl,soft-qmc = "fsl_qe_ucode_qmc_8321_11.bin";
162*b2d2a78aSEmmanuel Vadot
163*b2d2a78aSEmmanuel Vadot        #address-cells = <1>;
164*b2d2a78aSEmmanuel Vadot        #size-cells = <0>;
165*b2d2a78aSEmmanuel Vadot
166*b2d2a78aSEmmanuel Vadot        fsl,tsa-serial = <&tsa FSL_QE_TSA_UCC4>;
167*b2d2a78aSEmmanuel Vadot
168*b2d2a78aSEmmanuel Vadot        channel@16 {
169*b2d2a78aSEmmanuel Vadot            /* Ch16 : First 4 even TS from all routed from TSA */
170*b2d2a78aSEmmanuel Vadot            reg = <16>;
171*b2d2a78aSEmmanuel Vadot            fsl,operational-mode = "transparent";
172*b2d2a78aSEmmanuel Vadot            fsl,reverse-data;
173*b2d2a78aSEmmanuel Vadot            fsl,tx-ts-mask = <0x00000000 0x000000aa>;
174*b2d2a78aSEmmanuel Vadot            fsl,rx-ts-mask = <0x00000000 0x000000aa>;
175*b2d2a78aSEmmanuel Vadot        };
176*b2d2a78aSEmmanuel Vadot
177*b2d2a78aSEmmanuel Vadot        channel@17 {
178*b2d2a78aSEmmanuel Vadot            /* Ch17 : First 4 odd TS from all routed from TSA */
179*b2d2a78aSEmmanuel Vadot            reg = <17>;
180*b2d2a78aSEmmanuel Vadot            fsl,operational-mode = "transparent";
181*b2d2a78aSEmmanuel Vadot            fsl,reverse-data;
182*b2d2a78aSEmmanuel Vadot            fsl,tx-ts-mask = <0x00000000 0x00000055>;
183*b2d2a78aSEmmanuel Vadot            fsl,rx-ts-mask = <0x00000000 0x00000055>;
184*b2d2a78aSEmmanuel Vadot        };
185*b2d2a78aSEmmanuel Vadot
186*b2d2a78aSEmmanuel Vadot        channel@19 {
187*b2d2a78aSEmmanuel Vadot            /* Ch19 : 8 TS (TS 8..15) from all routed from TSA */
188*b2d2a78aSEmmanuel Vadot            compatible = "fsl,mpc8321-ucc-qmc-hdlc",
189*b2d2a78aSEmmanuel Vadot                         "fsl,qe-ucc-qmc-hdlc",
190*b2d2a78aSEmmanuel Vadot                         "fsl,qmc-hdlc";
191*b2d2a78aSEmmanuel Vadot            reg = <19>;
192*b2d2a78aSEmmanuel Vadot            fsl,operational-mode = "hdlc";
193*b2d2a78aSEmmanuel Vadot            fsl,tx-ts-mask = <0x00000000 0x0000ff00>;
194*b2d2a78aSEmmanuel Vadot            fsl,rx-ts-mask = <0x00000000 0x0000ff00>;
195*b2d2a78aSEmmanuel Vadot            fsl,framer = <&framer>;
196*b2d2a78aSEmmanuel Vadot        };
197*b2d2a78aSEmmanuel Vadot    };
198