xref: /linux/Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qe-tsa.yaml (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1*a0bbe77fSHerve Codina# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*a0bbe77fSHerve Codina%YAML 1.2
3*a0bbe77fSHerve Codina---
4*a0bbe77fSHerve Codina$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qe-tsa.yaml#
5*a0bbe77fSHerve Codina$schema: http://devicetree.org/meta-schemas/core.yaml#
6*a0bbe77fSHerve Codina
7*a0bbe77fSHerve Codinatitle: PowerQUICC QE Time-slot assigner (TSA) controller
8*a0bbe77fSHerve Codina
9*a0bbe77fSHerve Codinamaintainers:
10*a0bbe77fSHerve Codina  - Herve Codina <herve.codina@bootlin.com>
11*a0bbe77fSHerve Codina
12*a0bbe77fSHerve Codinadescription:
13*a0bbe77fSHerve Codina  The TSA is the time-slot assigner that can be found on some PowerQUICC SoC.
14*a0bbe77fSHerve Codina  Its purpose is to route some TDM time-slots to other internal serial
15*a0bbe77fSHerve Codina  controllers.
16*a0bbe77fSHerve Codina
17*a0bbe77fSHerve Codinaproperties:
18*a0bbe77fSHerve Codina  compatible:
19*a0bbe77fSHerve Codina    items:
20*a0bbe77fSHerve Codina      - enum:
21*a0bbe77fSHerve Codina          - fsl,mpc8321-tsa
22*a0bbe77fSHerve Codina      - const: fsl,qe-tsa
23*a0bbe77fSHerve Codina
24*a0bbe77fSHerve Codina  reg:
25*a0bbe77fSHerve Codina    items:
26*a0bbe77fSHerve Codina      - description: SI (Serial Interface) register base
27*a0bbe77fSHerve Codina      - description: SI RAM base
28*a0bbe77fSHerve Codina
29*a0bbe77fSHerve Codina  reg-names:
30*a0bbe77fSHerve Codina    items:
31*a0bbe77fSHerve Codina      - const: si_regs
32*a0bbe77fSHerve Codina      - const: si_ram
33*a0bbe77fSHerve Codina
34*a0bbe77fSHerve Codina  '#address-cells':
35*a0bbe77fSHerve Codina    const: 1
36*a0bbe77fSHerve Codina
37*a0bbe77fSHerve Codina  '#size-cells':
38*a0bbe77fSHerve Codina    const: 0
39*a0bbe77fSHerve Codina
40*a0bbe77fSHerve CodinapatternProperties:
41*a0bbe77fSHerve Codina  '^tdm@[0-3]$':
42*a0bbe77fSHerve Codina    description:
43*a0bbe77fSHerve Codina      The TDM managed by this controller
44*a0bbe77fSHerve Codina    type: object
45*a0bbe77fSHerve Codina
46*a0bbe77fSHerve Codina    additionalProperties: false
47*a0bbe77fSHerve Codina
48*a0bbe77fSHerve Codina    properties:
49*a0bbe77fSHerve Codina      reg:
50*a0bbe77fSHerve Codina        minimum: 0
51*a0bbe77fSHerve Codina        maximum: 3
52*a0bbe77fSHerve Codina        description:
53*a0bbe77fSHerve Codina          The TDM number for this TDM, 0 for TDMa, 1 for TDMb, 2 for TDMc and 3
54*a0bbe77fSHerve Codina          for TDMd.
55*a0bbe77fSHerve Codina
56*a0bbe77fSHerve Codina      fsl,common-rxtx-pins:
57*a0bbe77fSHerve Codina        $ref: /schemas/types.yaml#/definitions/flag
58*a0bbe77fSHerve Codina        description:
59*a0bbe77fSHerve Codina          The hardware can use four dedicated pins for Tx clock, Tx sync, Rx
60*a0bbe77fSHerve Codina          clock and Rx sync or use only two pins, Tx/Rx clock and Tx/Rx sync.
61*a0bbe77fSHerve Codina          Without the 'fsl,common-rxtx-pins' property, the four pins are used.
62*a0bbe77fSHerve Codina          With the 'fsl,common-rxtx-pins' property, two pins are used.
63*a0bbe77fSHerve Codina
64*a0bbe77fSHerve Codina      clocks:
65*a0bbe77fSHerve Codina        minItems: 2
66*a0bbe77fSHerve Codina        items:
67*a0bbe77fSHerve Codina          - description: Receive sync clock
68*a0bbe77fSHerve Codina          - description: Receive data clock
69*a0bbe77fSHerve Codina          - description: Transmit sync clock
70*a0bbe77fSHerve Codina          - description: Transmit data clock
71*a0bbe77fSHerve Codina
72*a0bbe77fSHerve Codina      clock-names:
73*a0bbe77fSHerve Codina        minItems: 2
74*a0bbe77fSHerve Codina        items:
75*a0bbe77fSHerve Codina          - const: rsync
76*a0bbe77fSHerve Codina          - const: rclk
77*a0bbe77fSHerve Codina          - const: tsync
78*a0bbe77fSHerve Codina          - const: tclk
79*a0bbe77fSHerve Codina
80*a0bbe77fSHerve Codina      fsl,rx-frame-sync-delay-bits:
81*a0bbe77fSHerve Codina        enum: [0, 1, 2, 3]
82*a0bbe77fSHerve Codina        default: 0
83*a0bbe77fSHerve Codina        description: |
84*a0bbe77fSHerve Codina          Receive frame sync delay in number of bits.
85*a0bbe77fSHerve Codina          Indicates the delay between the Rx sync and the first bit of the Rx
86*a0bbe77fSHerve Codina          frame.
87*a0bbe77fSHerve Codina
88*a0bbe77fSHerve Codina      fsl,tx-frame-sync-delay-bits:
89*a0bbe77fSHerve Codina        enum: [0, 1, 2, 3]
90*a0bbe77fSHerve Codina        default: 0
91*a0bbe77fSHerve Codina        description: |
92*a0bbe77fSHerve Codina          Transmit frame sync delay in number of bits.
93*a0bbe77fSHerve Codina          Indicates the delay between the Tx sync and the first bit of the Tx
94*a0bbe77fSHerve Codina          frame.
95*a0bbe77fSHerve Codina
96*a0bbe77fSHerve Codina      fsl,clock-falling-edge:
97*a0bbe77fSHerve Codina        $ref: /schemas/types.yaml#/definitions/flag
98*a0bbe77fSHerve Codina        description:
99*a0bbe77fSHerve Codina          Data is sent on falling edge of the clock (and received on the rising
100*a0bbe77fSHerve Codina          edge). If not present, data is sent on the rising edge (and received
101*a0bbe77fSHerve Codina          on the falling edge).
102*a0bbe77fSHerve Codina
103*a0bbe77fSHerve Codina      fsl,fsync-rising-edge:
104*a0bbe77fSHerve Codina        $ref: /schemas/types.yaml#/definitions/flag
105*a0bbe77fSHerve Codina        description:
106*a0bbe77fSHerve Codina          Frame sync pulses are sampled with the rising edge of the channel
107*a0bbe77fSHerve Codina          clock. If not present, pulses are sampled with the falling edge.
108*a0bbe77fSHerve Codina
109*a0bbe77fSHerve Codina      fsl,fsync-active-low:
110*a0bbe77fSHerve Codina        $ref: /schemas/types.yaml#/definitions/flag
111*a0bbe77fSHerve Codina        description:
112*a0bbe77fSHerve Codina          Frame sync signals are active on low logic level.
113*a0bbe77fSHerve Codina          If not present, sync signals are active on high level.
114*a0bbe77fSHerve Codina
115*a0bbe77fSHerve Codina      fsl,double-speed-clock:
116*a0bbe77fSHerve Codina        $ref: /schemas/types.yaml#/definitions/flag
117*a0bbe77fSHerve Codina        description:
118*a0bbe77fSHerve Codina          The channel clock is twice the data rate.
119*a0bbe77fSHerve Codina
120*a0bbe77fSHerve Codina    patternProperties:
121*a0bbe77fSHerve Codina      '^fsl,[rt]x-ts-routes$':
122*a0bbe77fSHerve Codina        $ref: /schemas/types.yaml#/definitions/uint32-matrix
123*a0bbe77fSHerve Codina        description: |
124*a0bbe77fSHerve Codina          A list of tuple that indicates the Tx or Rx time-slots routes.
125*a0bbe77fSHerve Codina        items:
126*a0bbe77fSHerve Codina          items:
127*a0bbe77fSHerve Codina            - description:
128*a0bbe77fSHerve Codina                The number of time-slots
129*a0bbe77fSHerve Codina              minimum: 1
130*a0bbe77fSHerve Codina              maximum: 64
131*a0bbe77fSHerve Codina            - description: |
132*a0bbe77fSHerve Codina                The source (Tx) or destination (Rx) serial interface
133*a0bbe77fSHerve Codina                (dt-bindings/soc/qe-fsl,tsa.h defines these values)
134*a0bbe77fSHerve Codina                 - 0: No destination
135*a0bbe77fSHerve Codina                 - 1: UCC1
136*a0bbe77fSHerve Codina                 - 2: UCC2
137*a0bbe77fSHerve Codina                 - 3: UCC3
138*a0bbe77fSHerve Codina                 - 4: UCC4
139*a0bbe77fSHerve Codina                 - 5: UCC5
140*a0bbe77fSHerve Codina              enum: [0, 1, 2, 3, 4, 5]
141*a0bbe77fSHerve Codina        minItems: 1
142*a0bbe77fSHerve Codina        maxItems: 64
143*a0bbe77fSHerve Codina
144*a0bbe77fSHerve Codina    allOf:
145*a0bbe77fSHerve Codina      # If fsl,common-rxtx-pins is present, only 2 clocks are needed.
146*a0bbe77fSHerve Codina      # Else, the 4 clocks must be present.
147*a0bbe77fSHerve Codina      - if:
148*a0bbe77fSHerve Codina          required:
149*a0bbe77fSHerve Codina            - fsl,common-rxtx-pins
150*a0bbe77fSHerve Codina        then:
151*a0bbe77fSHerve Codina          properties:
152*a0bbe77fSHerve Codina            clocks:
153*a0bbe77fSHerve Codina              maxItems: 2
154*a0bbe77fSHerve Codina            clock-names:
155*a0bbe77fSHerve Codina              maxItems: 2
156*a0bbe77fSHerve Codina        else:
157*a0bbe77fSHerve Codina          properties:
158*a0bbe77fSHerve Codina            clocks:
159*a0bbe77fSHerve Codina              minItems: 4
160*a0bbe77fSHerve Codina            clock-names:
161*a0bbe77fSHerve Codina              minItems: 4
162*a0bbe77fSHerve Codina
163*a0bbe77fSHerve Codina    required:
164*a0bbe77fSHerve Codina      - reg
165*a0bbe77fSHerve Codina      - clocks
166*a0bbe77fSHerve Codina      - clock-names
167*a0bbe77fSHerve Codina
168*a0bbe77fSHerve Codinarequired:
169*a0bbe77fSHerve Codina  - compatible
170*a0bbe77fSHerve Codina  - reg
171*a0bbe77fSHerve Codina  - reg-names
172*a0bbe77fSHerve Codina  - '#address-cells'
173*a0bbe77fSHerve Codina  - '#size-cells'
174*a0bbe77fSHerve Codina
175*a0bbe77fSHerve CodinaadditionalProperties: false
176*a0bbe77fSHerve Codina
177*a0bbe77fSHerve Codinaexamples:
178*a0bbe77fSHerve Codina  - |
179*a0bbe77fSHerve Codina    #include <dt-bindings/soc/qe-fsl,tsa.h>
180*a0bbe77fSHerve Codina
181*a0bbe77fSHerve Codina    tsa@ae0 {
182*a0bbe77fSHerve Codina        compatible = "fsl,mpc8321-tsa", "fsl,qe-tsa";
183*a0bbe77fSHerve Codina        reg = <0xae0 0x10>,
184*a0bbe77fSHerve Codina              <0xc00 0x200>;
185*a0bbe77fSHerve Codina        reg-names = "si_regs", "si_ram";
186*a0bbe77fSHerve Codina
187*a0bbe77fSHerve Codina        #address-cells = <1>;
188*a0bbe77fSHerve Codina        #size-cells = <0>;
189*a0bbe77fSHerve Codina
190*a0bbe77fSHerve Codina        tdm@0 {
191*a0bbe77fSHerve Codina            /* TDMa */
192*a0bbe77fSHerve Codina            reg = <0>;
193*a0bbe77fSHerve Codina
194*a0bbe77fSHerve Codina            clocks = <&clk_l1rsynca>, <&clk_l1rclka>;
195*a0bbe77fSHerve Codina            clock-names = "rsync", "rclk";
196*a0bbe77fSHerve Codina
197*a0bbe77fSHerve Codina            fsl,common-rxtx-pins;
198*a0bbe77fSHerve Codina            fsl,fsync-rising-edge;
199*a0bbe77fSHerve Codina
200*a0bbe77fSHerve Codina            fsl,tx-ts-routes = <2 0>,             /* TS 0..1 */
201*a0bbe77fSHerve Codina                           <24 FSL_QE_TSA_UCC4>, /* TS 2..25 */
202*a0bbe77fSHerve Codina                           <1 0>,                 /* TS 26 */
203*a0bbe77fSHerve Codina                           <5 FSL_QE_TSA_UCC3>;  /* TS 27..31 */
204*a0bbe77fSHerve Codina
205*a0bbe77fSHerve Codina            fsl,rx-ts-routes = <2 0>,             /* TS 0..1 */
206*a0bbe77fSHerve Codina                           <24 FSL_QE_TSA_UCC4>, /* 2..25 */
207*a0bbe77fSHerve Codina                           <1 0>,                 /* TS 26 */
208*a0bbe77fSHerve Codina                           <5 FSL_QE_TSA_UCC3>;  /* TS 27..31 */
209*a0bbe77fSHerve Codina        };
210*a0bbe77fSHerve Codina    };
211