Add the PowerQUICC audio support using the QMC
Subsystems (11)
Herve Codina
maintainerv3 cover Add the PowerQUICC audio support using the QMC
Hi,
This series adds support for audio using the QMC controller available in some Freescale PowerQUICC SoCs.
This series contains three parts in order to show the different blocks hierarchy and their usage in this support.
The first one is related to TSA (Time Slot Assigner). The TSA handles the data present at the pin level (TDM with up to 64 time slots) and dispatchs them to one or more serial controller (SCC).
The second is related to QMC (QUICC Multichannel Controller). The QMC handles the data at the serial controller (SCC) level and splits again the data to creates some virtual channels.
The last one is related to the audio component (QMC audio). It is the glue between the QMC controller and the ASoC component. It handles one or more QMC virtual channels and creates one DAI per QMC virtual channels handled.
Compared to the v2 series, this v3 series mainly:
- adds modification in the DT bindings,
- uses generic io{read,write}be{16,32} for registers accesses instead of the specific PowerPC ones.
- updates some commit subjects and logs (CPM1 SoCs supports).
Best regards,
Herve Codina
Changes v2 -> v3
- All bindings
Rename fsl-tsa.h to fsl,tsa.h
Add missing vendor prefix
Various fixes (quotes, node names, upper/lower case)
- patches 1 and 2 (TSA binding specific)
Remove 'reserved' values in the routing tables Remove fsl,grant-mode
Add a better description for 'fsl,common-rxtx-pins' Fix clocks/clocks-name handling against fsl,common-rxtx-pins Add information related to the delays unit
Removed FSL_CPM_TSA_NBCELL
Fix license in binding header file fsl,tsa.h
- patches 5 and 6 (QMC binding specific)
Remove fsl,cpm-command property
Add interrupt property constraint
- patches 8 and 9 (QMC audio binding specific) Remove 'items' in compatible property definition Add missing 'dai-common.yaml' reference Fix the qmc_chan phandle definition
- patch 2 and 6
Use io{read,write}be{32,16}
Change commit subjects and logs
- patch 4
Add 'Acked-by: Christophe Leroy <[email protected]>'
Changes v1 -> v2:
- patch 2 and 6
Fix kernel test robot errors
- other patches
No changes
Herve Codina (10):
dt-bindings: soc: fsl: cpm_qe: Add TSA controller
soc: fsl: cpm1: Add support for TSA
MAINTAINERS: add the Freescale TSA controller entry powerpc/8xx: Use a larger CPM1 command check mask
dt-bindings: soc: fsl: cpm_qe: Add QMC controller
soc: fsl: cmp1: Add support for QMC
MAINTAINERS: add the Freescale QMC controller entry
dt-bindings: sound: Add support for QMC audio
ASoC: fsl: Add support for QMC audio
MAINTAINERS: add the Freescale QMC audio entry
.../bindings/soc/fsl/cpm_qe/fsl,qmc.yaml | 164 ++ .../bindings/soc/fsl/cpm_qe/fsl,tsa.yaml | 260 +++ .../bindings/sound/fsl,qmc-audio.yaml | 117 ++ MAINTAINERS | 25 + arch/powerpc/platforms/8xx/cpm1.c | 2 +- drivers/soc/fsl/qe/Kconfig | 23 + drivers/soc/fsl/qe/Makefile | 2 + drivers/soc/fsl/qe/qmc.c | 1531 +++++++++++++++++ drivers/soc/fsl/qe/tsa.c | 810 +++++++++ drivers/soc/fsl/qe/tsa.h | 43 + include/dt-bindings/soc/fsl,tsa.h | 13 + include/soc/fsl/qe/qmc.h | 71 + sound/soc/fsl/Kconfig | 9 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_qmc_audio.c | 732 ++++++++ 15 files changed, 3803 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml create mode 100644 Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml create mode 100644 drivers/soc/fsl/qe/qmc.c create mode 100644 drivers/soc/fsl/qe/tsa.c create mode 100644 drivers/soc/fsl/qe/tsa.h create mode 100644 include/dt-bindings/soc/fsl,tsa.h create mode 100644 include/soc/fsl/qe/qmc.h create mode 100644 sound/soc/fsl/fsl_qmc_audio.c
Signature · 1 line
2.38.1
Herve Codina
maintainerPATCH v3 1/10 dt-bindings: soc: fsl: cpm_qe: Add TSA controller
Add support for the time slot assigner (TSA)
available in some PowerQUICC SoC such as MPC885
or MPC866.
--- .../bindings/soc/fsl/cpm_qe/fsl,tsa.yaml | 260 ++++++++++++++++++ include/dt-bindings/soc/fsl,tsa.h | 13 + 2 files changed, 273 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml create mode 100644 include/dt-bindings/soc/fsl,tsa.h
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +260 -0
@@ -0,0 +1,260 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,tsa.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM Time-slot assigner (TSA) controller + +maintainers: + - Herve Codina <[email protected]> + +description: | + The TSA is the time-slot assigner that can be found on some + PowerQUICC SoC. + Its purpose is to route some TDM time-slots to other internal + serial controllers. + +properties: + compatible: + items: + - enum: + - fsl,mpc885-tsa + - fsl,mpc866-tsa + - const: fsl,cpm1-tsa + + reg: + items: + - description: SI (Serial Interface) register base + - description: SI RAM base + + reg-names: + items: + - const: si_regs + - const: si_ram + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + '^tdm@[0-1]$': + description: + The TDM managed by this controller + type: object + + properties: + reg: + minimum: 0 + maximum: 1 + description: + The TDM number for this TDM, 0 for TDMa and 1 for TDMb + + fsl,common-rxtx-pins: + $ref: /schemas/types.yaml#/definitions/flag + description: + The hardware can use four dedicated pins for Tx clock, + Tx sync, Rx clock and Rx sync or use only two pins, + Tx/Rx clock and Rx/Rx sync. + Without the 'fsl,common-rxtx-pins' property, the four + pins are used. With the 'fsl,common-rxtx-pins' property, + two pins are used. + + clocks: + minItems: 2 + maxItems: 4 + + clock-names: + minItems: 2 + maxItems: 4 + + fsl,mode: + $ref: /schemas/types.yaml#/definitions/string + enum: [normal, echo, internal-loopback, control-loopback] + default: normal + description: | + Operational mode: + - normal: + Normal operation + - echo: + Automatic echo. Rx data is resent on Tx + - internal-loopback: + The TDM transmitter is connected to the receiver. + Data appears on Tx pin. + - control-loopback: + The TDM transmitter is connected to the receiver. + The Tx pin is disconnected. + + fsl,rx-frame-sync-delay-bits: + enum: [0, 1, 2, 3] + default: 0 + description: | + Receive frame sync delay in number of bits. + Indicates the delay between the Rx sync and the first bit of the + Rx frame. 0 for no bit delay. 1, 2 or 3 for 1, 2 or 3 bits delay. + + fsl,tx-frame-sync-delay-bits: + enum: [0, 1, 2, 3] + default: 0 + description: | + Transmit frame sync delay in number of bits. + Indicates the delay between the Tx sync and the first bit of the + Tx frame. 0 for no bit delay. 1, 2 or 3 for 1, 2 or 3 bits delay. + + fsl,clock-falling-edge: + $ref: /schemas/types.yaml#/definitions/flag + description: | + Data is sent on falling edge of the clock (and received on the + rising edge). + If 'clock-falling-edge' is not present, data is sent on the + rising edge (and received on the falling edge). + + fsl,fsync-rising-edge: + $ref: /schemas/types.yaml#/definitions/flag + description: + Frame sync pulses are sampled with the rising edge of the channel + clock. If 'fsync-rising-edge' is not present, pulses are sample + with e falling edge. + + fsl,double-speed-clock: + $ref: /schemas/types.yaml#/definitions/flag + description: + The channel clock is twice the data rate. + + fsl,tx-ts-routes: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: | + A list of tupple that indicates the Tx time-slots routes. + tx_ts_routes = + < 2 0 >, /* The first 2 time slots are not used */ + < 3 1 >, /* The next 3 ones are route to SCC2 */ + < 4 0 >, /* The next 4 ones are not used */ + < 2 2 >; /* The nest 2 ones are route to SCC3 */ + items: + items: + - description: + The number of time-slots + minimum: 1 + maximum: 64 + - description: | + The source serial interface (dt-bindings/soc/fsl,tsa.h + defines these values) + - 0: No destination + - 1: SCC2 + - 2: SCC3 + - 3: SCC4 + - 4: SMC1 + - 5: SMC2 + enum: [0, 1, 2, 3, 4, 5] + minItems: 1 + maxItems: 64 + + fsl,rx-ts-routes: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: | + A list of tupple that indicates the Rx time-slots routes. + tx_ts_routes = + < 2 0 >, /* The first 2 time slots are not used */ + < 3 1 >, /* The next 3 ones are route from SCC2 */ + < 4 0 >, /* The next 4 ones are not used */ + < 2 2 >; /* The nest 2 ones are route from SCC3 */ + items: + items: + - description: + The number of time-slots + minimum: 1 + maximum: 64 + - description: | + The destination serial interface (dt-bindings/soc/fsl,tsa.h + defines these values) + - 0: No destination + - 1: SCC2 + - 2: SCC3 + - 3: SCC4 + - 4: SMC1 + - 5: SMC2 + enum: [0, 1, 2, 3, 4, 5] + minItems: 1 + maxItems: 64 + + allOf: + # If fsl,common-rxtx-pins is present, only 2 clocks are needed. + # Else, the 4 clocks must be present. + - if: + required: + - fsl,common-rxtx-pins + then: + properties: + clocks: + items: + - description: External clock connected to L1RSYNC pin + - description: External clock connected to L1RCLK pin + clock-names: + items: + - const: l1rsync + - const: l1rclk + else: + properties: + clocks: + items: + - description: External clock connected to L1RSYNC pin + - description: External clock connected to L1RCLK pin + - description: External clock connected to L1TSYNC pin + - description: External clock connected to L1TCLK pin + clock-names: + items: + - const: l1rsync + - const: l1rclk + - const: l1tsync + - const: l1tclk + + required: + - reg + - clocks + - clock-names + +required: + - compatible + - reg + - reg-names + - '#address-cells' + - '#size-cells' + +additionalProperties: false + +examples: + - | + #include <dt-bindings/soc/fsl,tsa.h> + + tsa@ae0 { + compatible = "fsl,mpc885-tsa", "fsl,cpm1-tsa"; + reg = <0xae0 0x10>, + <0xc00 0x200>; + reg-names = "si_regs", "si_ram"; + + #address-cells = <1>; + #size-cells = <0>; + + tdm@0 { + /* TDMa */ + reg = <0>; + + clocks = <&clk_l1rsynca>, <&clk_l1rclka>; + clock-names = "l1rsync", "l1rclk"; + + fsl,common-rxtx-pins; + fsl,fsync-rising-edge; + + fsl,tx-ts-routes = < 2 0 >, /* TS 0..1 */ + < 24 FSL_CPM_TSA_SCC4 >, /* TS 2..25 */ + < 1 0 >, /* TS 26 */ + < 5 FSL_CPM_TSA_SCC3 >; /* TS 27..31 */ + + fsl,rx-ts-routes = < 2 0 >, /* TS 0..1 */ + < 24 FSL_CPM_TSA_SCC4 >, /* 2..25 */ + < 1 0 >, /* TS 26 */ + < 5 FSL_CPM_TSA_SCC3 >; /* TS 27..31 */ + }; + };
include/dt-bindings/soc/fsl,tsa.h new file +13 -0
@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ + +#ifndef __DT_BINDINGS_SOC_FSL_TSA_H +#define __DT_BINDINGS_SOC_FSL_TSA_H + +#define FSL_CPM_TSA_NU 0/* Pseuso Cell Id for not used item */ +#define FSL_CPM_TSA_SCC2 1 +#define FSL_CPM_TSA_SCC3 2 +#define FSL_CPM_TSA_SCC4 3 +#define FSL_CPM_TSA_SMC1 4 +#define FSL_CPM_TSA_SMC2 5 + +#endif
Signature · 7 lines
2.38.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH v3 01/10] dt-bindings: soc: fsl: cpm_qe: Add TSA controller
Quoted 4 lines · Herve Codina
Add support for the time slot assigner (TSA)
available in some PowerQUICC SoC such as MPC885
or MPC866.
Quoted 8 lines
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,tsa.yaml | 260 ++++++++++++++++++ include/dt-bindings/soc/fsl,tsa.h | 13 + 2 files changed, 273 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml create mode 100644 include/dt-bindings/soc/fsl,tsa.h
Best regards,
Krzysztof
Rob Herring
maintainerRe: [PATCH v3 01/10] dt-bindings: soc: fsl: cpm_qe: Add TSA controller
In reply to Herve CodinaQuoted 3 lines · Herve Codina
Add support for the time slot assigner (TSA)
available in some PowerQUICC SoC such as MPC885
or MPC866.
An odd line wrap length...
Quoted 17 lines
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,tsa.yaml | 260 ++++++++++++++++++ include/dt-bindings/soc/fsl,tsa.h | 13 + 2 files changed, 273 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml create mode 100644 include/dt-bindings/soc/fsl,tsa.hDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +2
-0@@ -0,0 +1,260 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 12
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +10
-0+--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,tsa.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM Time-slot assigner (TSA) controller + +maintainers: + - Herve Codina <[email protected]> + +description: |
Don't need '|' if no formatting.
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 16
Quoted 4 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +4
-0+ The TSA is the time-slot assigner that can be found on some + PowerQUICC SoC. + Its purpose is to route some TDM time-slots to other internal + serial controllers.
Wrap at 80.
Quoted 20 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +20
-0+ +properties: + compatible: + items: + - enum: + - fsl,mpc885-tsa + - fsl,mpc866-tsa + - const: fsl,cpm1-tsa + + reg: + items: + - description: SI (Serial Interface) register base + - description: SI RAM base + + reg-names: + items: + - const: si_regs + - const: si_ram + + '#address-cells':
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 46
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +10
-0+ const: 1 + + '#size-cells': + const: 0 + +patternProperties: + '^tdm@[0-1]$': + description: + The TDM managed by this controller + type: object
additionalProperties: false
Quoted 17 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +17
-0+ + properties: + reg: + minimum: 0 + maximum: 1 + description: + The TDM number for this TDM, 0 for TDMa and 1 for TDMb + + fsl,common-rxtx-pins: + $ref: /schemas/types.yaml#/definitions/flag + description: + The hardware can use four dedicated pins for Tx clock, + Tx sync, Rx clock and Rx sync or use only two pins, + Tx/Rx clock and Rx/Rx sync. + Without the 'fsl,common-rxtx-pins' property, the four + pins are used. With the 'fsl,common-rxtx-pins' property, + two pins are used.
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 73
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +10
-0+ + clocks: + minItems: 2 + maxItems: 4 + + clock-names: + minItems: 2 + maxItems: 4 + + fsl,mode:
'mode' is a bit vague. It's already used as well which can be a problem if there are differing types. (There's not in this case)
Quoted 128 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +128
-0+ $ref: /schemas/types.yaml#/definitions/string + enum: [normal, echo, internal-loopback, control-loopback] + default: normal + description: | + Operational mode: + - normal: + Normal operation + - echo: + Automatic echo. Rx data is resent on Tx + - internal-loopback: + The TDM transmitter is connected to the receiver. + Data appears on Tx pin. + - control-loopback: + The TDM transmitter is connected to the receiver. + The Tx pin is disconnected. + + fsl,rx-frame-sync-delay-bits: + enum: [0, 1, 2, 3] + default: 0 + description: | + Receive frame sync delay in number of bits. + Indicates the delay between the Rx sync and the first bit of the + Rx frame. 0 for no bit delay. 1, 2 or 3 for 1, 2 or 3 bits delay. + + fsl,tx-frame-sync-delay-bits: + enum: [0, 1, 2, 3] + default: 0 + description: | + Transmit frame sync delay in number of bits. + Indicates the delay between the Tx sync and the first bit of the + Tx frame. 0 for no bit delay. 1, 2 or 3 for 1, 2 or 3 bits delay. + + fsl,clock-falling-edge: + $ref: /schemas/types.yaml#/definitions/flag + description: | + Data is sent on falling edge of the clock (and received on the + rising edge). + If 'clock-falling-edge' is not present, data is sent on the + rising edge (and received on the falling edge). + + fsl,fsync-rising-edge: + $ref: /schemas/types.yaml#/definitions/flag + description: + Frame sync pulses are sampled with the rising edge of the channel + clock. If 'fsync-rising-edge' is not present, pulses are sample + with e falling edge. + + fsl,double-speed-clock: + $ref: /schemas/types.yaml#/definitions/flag + description: + The channel clock is twice the data rate. + + fsl,tx-ts-routes: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: | + A list of tupple that indicates the Tx time-slots routes. + tx_ts_routes = + < 2 0 >, /* The first 2 time slots are not used */ + < 3 1 >, /* The next 3 ones are route to SCC2 */ + < 4 0 >, /* The next 4 ones are not used */ + < 2 2 >; /* The nest 2 ones are route to SCC3 */ + items: + items: + - description: + The number of time-slots + minimum: 1 + maximum: 64 + - description: | + The source serial interface (dt-bindings/soc/fsl,tsa.h + defines these values) + - 0: No destination + - 1: SCC2 + - 2: SCC3 + - 3: SCC4 + - 4: SMC1 + - 5: SMC2 + enum: [0, 1, 2, 3, 4, 5] + minItems: 1 + maxItems: 64 + + fsl,rx-ts-routes: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: | + A list of tupple that indicates the Rx time-slots routes. + tx_ts_routes = + < 2 0 >, /* The first 2 time slots are not used */ + < 3 1 >, /* The next 3 ones are route from SCC2 */ + < 4 0 >, /* The next 4 ones are not used */ + < 2 2 >; /* The nest 2 ones are route from SCC3 */ + items: + items: + - description: + The number of time-slots + minimum: 1 + maximum: 64 + - description: | + The destination serial interface (dt-bindings/soc/fsl,tsa.h + defines these values) + - 0: No destination + - 1: SCC2 + - 2: SCC3 + - 3: SCC4 + - 4: SMC1 + - 5: SMC2 + enum: [0, 1, 2, 3, 4, 5] + minItems: 1 + maxItems: 64 + + allOf: + # If fsl,common-rxtx-pins is present, only 2 clocks are needed. + # Else, the 4 clocks must be present. + - if: + required: + - fsl,common-rxtx-pins + then: + properties: + clocks: + items: + - description: External clock connected to L1RSYNC pin + - description: External clock connected to L1RCLK pin + clock-names: + items: + - const: l1rsync + - const: l1rclk + else: + properties: + clocks: + items:
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 211
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +10
-0+ - description: External clock connected to L1RSYNC pin + - description: External clock connected to L1RCLK pin + - description: External clock connected to L1TSYNC pin + - description: External clock connected to L1TCLK pin + clock-names: + items: + - const: l1rsync + - const: l1rclk + - const: l1tsync + - const: l1tclk
As the names are the same, just the length varies between 2 or 4, move all this to the main definition and here just put constraints on the length.
Quoted 71 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +49
-0+ + required: + - reg + - clocks + - clock-names + +required: + - compatible + - reg + - reg-names + - '#address-cells' + - '#size-cells' + +additionalProperties: false + +examples: + - | + #include <dt-bindings/soc/fsl,tsa.h> + + tsa@ae0 { + compatible = "fsl,mpc885-tsa", "fsl,cpm1-tsa"; + reg = <0xae0 0x10>, + <0xc00 0x200>; + reg-names = "si_regs", "si_ram"; + + #address-cells = <1>; + #size-cells = <0>; + + tdm@0 { + /* TDMa */ + reg = <0>; + + clocks = <&clk_l1rsynca>, <&clk_l1rclka>; + clock-names = "l1rsync", "l1rclk"; + + fsl,common-rxtx-pins; + fsl,fsync-rising-edge; + + fsl,tx-ts-routes = < 2 0 >, /* TS 0..1 */ + < 24 FSL_CPM_TSA_SCC4 >, /* TS 2..25 */ + < 1 0 >, /* TS 26 */ + < 5 FSL_CPM_TSA_SCC3 >; /* TS 27..31 */ + + fsl,rx-ts-routes = < 2 0 >, /* TS 0..1 */ + < 24 FSL_CPM_TSA_SCC4 >, /* 2..25 */ + < 1 0 >, /* TS 26 */ + < 5 FSL_CPM_TSA_SCC3 >; /* TS 27..31 */ + }; + };include/dt-bindings/soc/fsl,tsa.h new file +13
-0@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ + +#ifndef __DT_BINDINGS_SOC_FSL_TSA_H +#define __DT_BINDINGS_SOC_FSL_TSA_H + +#define FSL_CPM_TSA_NU 0/* Pseuso Cell Id for not used item */ +#define FSL_CPM_TSA_SCC2 1 +#define FSL_CPM_TSA_SCC3 2 +#define FSL_CPM_TSA_SCC4 3 +#define FSL_CPM_TSA_SMC1 4 +#define FSL_CPM_TSA_SMC2 5 + +#endif Signature · 1 line
2.38.1
Herve Codina
maintainerRe: [PATCH v3 01/10] dt-bindings: soc: fsl: cpm_qe: Add TSA controller
Hi Rob,
Quoted 6 lines · On Tue, 17 Jan 2023 08:55:29 -0600 Rob Herring <[email protected]> wrote:
Quoted 3 lines · Herve Codina
Add support for the time slot assigner (TSA)
available in some PowerQUICC SoC such as MPC885
or MPC866.An odd line wrap length...
Will be changed in v4.
Quoted 22 lines
Quoted 22 lines
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,tsa.yaml | 260 ++++++++++++++++++ include/dt-bindings/soc/fsl,tsa.h | 13 + 2 files changed, 273 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml create mode 100644 include/dt-bindings/soc/fsl,tsa.hDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +6
-0@@ -0,0 +1,260 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,tsa.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# +
Quoted 8 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 12
Quoted 6 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +6
-0+title: PowerQUICC CPM Time-slot assigner (TSA) controller + +maintainers: + - Herve Codina <[email protected]> + +description: |Don't need '|' if no formatting.
Will be changed in v4.
Quoted 7 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 16
Quoted 5 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +4
-0+ The TSA is the time-slot assigner that can be found on some + PowerQUICC SoC. + Its purpose is to route some TDM time-slots to other internal + serial controllers.Wrap at 80.
Will be fixed in v4.
Quoted 25 lines
Quoted 25 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +24
-0+ +properties: + compatible: + items: + - enum: + - fsl,mpc885-tsa + - fsl,mpc866-tsa + - const: fsl,cpm1-tsa + + reg: + items: + - description: SI (Serial Interface) register base + - description: SI RAM base + + reg-names: + items: + - const: si_regs + - const: si_ram + + '#address-cells': + const: 1 + + '#size-cells': + const: 0
Quoted 8 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 46
Quoted 6 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +6
-0+ +patternProperties: + '^tdm@[0-1]$': + description: + The TDM managed by this controller + type: objectadditionalProperties: false
Will be added in v4.
Quoted 23 lines
Quoted 23 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +22
-0+ + properties: + reg: + minimum: 0 + maximum: 1 + description: + The TDM number for this TDM, 0 for TDMa and 1 for TDMb + + fsl,common-rxtx-pins: + $ref: /schemas/types.yaml#/definitions/flag + description: + The hardware can use four dedicated pins for Tx clock, + Tx sync, Rx clock and Rx sync or use only two pins, + Tx/Rx clock and Rx/Rx sync. + Without the 'fsl,common-rxtx-pins' property, the four + pins are used. With the 'fsl,common-rxtx-pins' property, + two pins are used. + + clocks: + minItems: 2 + maxItems: 4 +
Quoted 8 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 73
Quoted 5 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +5
-0+ clock-names: + minItems: 2 + maxItems: 4 + + fsl,mode:'mode' is a bit vague. It's already used as well which can be a problem if there are differing types. (There's not in this case)
What do you think about:
fsl,diagnostic-mode:
$ref: /schemas/types.yaml#/definitions/string
enum: [disabled, echo, internal-loopback, control-loopback]
default: disabled
description: |
The diagnostic mode can be used to diagnose some communication issues. It should not be present (or set to 'disabled') when diagnostic is not needed.
Diagnostic mode:
- disabled:
Diagnostic disabled (ie. normal operation)
- echo:
Automatic echo. Rx data is resent on Tx
- internal-loopback:
The TDM transmitter is connected to the receiver. Data appears on Tx pin.
- control-loopback:
The TDM transmitter is connected to the receiver. The Tx pin is disconnected.
Quoted 135 lines
Quoted 135 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +134
-0+ $ref: /schemas/types.yaml#/definitions/string + enum: [normal, echo, internal-loopback, control-loopback] + default: normal + description: | + Operational mode: + - normal: + Normal operation + - echo: + Automatic echo. Rx data is resent on Tx + - internal-loopback: + The TDM transmitter is connected to the receiver. + Data appears on Tx pin. + - control-loopback: + The TDM transmitter is connected to the receiver. + The Tx pin is disconnected. + + fsl,rx-frame-sync-delay-bits: + enum: [0, 1, 2, 3] + default: 0 + description: | + Receive frame sync delay in number of bits. + Indicates the delay between the Rx sync and the first bit of the + Rx frame. 0 for no bit delay. 1, 2 or 3 for 1, 2 or 3 bits delay. + + fsl,tx-frame-sync-delay-bits: + enum: [0, 1, 2, 3] + default: 0 + description: | + Transmit frame sync delay in number of bits. + Indicates the delay between the Tx sync and the first bit of the + Tx frame. 0 for no bit delay. 1, 2 or 3 for 1, 2 or 3 bits delay. + + fsl,clock-falling-edge: + $ref: /schemas/types.yaml#/definitions/flag + description: | + Data is sent on falling edge of the clock (and received on the + rising edge). + If 'clock-falling-edge' is not present, data is sent on the + rising edge (and received on the falling edge). + + fsl,fsync-rising-edge: + $ref: /schemas/types.yaml#/definitions/flag + description: + Frame sync pulses are sampled with the rising edge of the channel + clock. If 'fsync-rising-edge' is not present, pulses are sample + with e falling edge. + + fsl,double-speed-clock: + $ref: /schemas/types.yaml#/definitions/flag + description: + The channel clock is twice the data rate. + + fsl,tx-ts-routes: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: | + A list of tupple that indicates the Tx time-slots routes. + tx_ts_routes = + < 2 0 >, /* The first 2 time slots are not used */ + < 3 1 >, /* The next 3 ones are route to SCC2 */ + < 4 0 >, /* The next 4 ones are not used */ + < 2 2 >; /* The nest 2 ones are route to SCC3 */ + items: + items: + - description: + The number of time-slots + minimum: 1 + maximum: 64 + - description: | + The source serial interface (dt-bindings/soc/fsl,tsa.h + defines these values) + - 0: No destination + - 1: SCC2 + - 2: SCC3 + - 3: SCC4 + - 4: SMC1 + - 5: SMC2 + enum: [0, 1, 2, 3, 4, 5] + minItems: 1 + maxItems: 64 + + fsl,rx-ts-routes: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: | + A list of tupple that indicates the Rx time-slots routes. + tx_ts_routes = + < 2 0 >, /* The first 2 time slots are not used */ + < 3 1 >, /* The next 3 ones are route from SCC2 */ + < 4 0 >, /* The next 4 ones are not used */ + < 2 2 >; /* The nest 2 ones are route from SCC3 */ + items: + items: + - description: + The number of time-slots + minimum: 1 + maximum: 64 + - description: | + The destination serial interface (dt-bindings/soc/fsl,tsa.h + defines these values) + - 0: No destination + - 1: SCC2 + - 2: SCC3 + - 3: SCC4 + - 4: SMC1 + - 5: SMC2 + enum: [0, 1, 2, 3, 4, 5] + minItems: 1 + maxItems: 64 + + allOf: + # If fsl,common-rxtx-pins is present, only 2 clocks are needed. + # Else, the 4 clocks must be present. + - if: + required: + - fsl,common-rxtx-pins + then: + properties: + clocks: + items: + - description: External clock connected to L1RSYNC pin + - description: External clock connected to L1RCLK pin + clock-names: + items: + - const: l1rsync + - const: l1rclk + else: + properties: + clocks: + items: + - description: External clock connected to L1RSYNC pin + - description: External clock connected to L1RCLK pin + - description: External clock connected to L1TSYNC pin + - description: External clock connected to L1TCLK pin + clock-names: + items:
Quoted 8 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml line 211
Quoted 4 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +4
-0+ - const: l1rsync + - const: l1rclk + - const: l1tsync + - const: l1tclkAs the names are the same, just the length varies between 2 or 4, move all this to the main definition and here just put constraints on the length.
Ok, will be done in v4.
Quoted 64 lines
Quoted 64 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml new file +49
-0+ + required: + - reg + - clocks + - clock-names + +required: + - compatible + - reg + - reg-names + - '#address-cells' + - '#size-cells' + +additionalProperties: false + +examples: + - | + #include <dt-bindings/soc/fsl,tsa.h> + + tsa@ae0 { + compatible = "fsl,mpc885-tsa", "fsl,cpm1-tsa"; + reg = <0xae0 0x10>, + <0xc00 0x200>; + reg-names = "si_regs", "si_ram"; + + #address-cells = <1>; + #size-cells = <0>; + + tdm@0 { + /* TDMa */ + reg = <0>; + + clocks = <&clk_l1rsynca>, <&clk_l1rclka>; + clock-names = "l1rsync", "l1rclk"; + + fsl,common-rxtx-pins; + fsl,fsync-rising-edge; + + fsl,tx-ts-routes = < 2 0 >, /* TS 0..1 */ + < 24 FSL_CPM_TSA_SCC4 >, /* TS 2..25 */ + < 1 0 >, /* TS 26 */ + < 5 FSL_CPM_TSA_SCC3 >; /* TS 27..31 */ + + fsl,rx-ts-routes = < 2 0 >, /* TS 0..1 */ + < 24 FSL_CPM_TSA_SCC4 >, /* 2..25 */ + < 1 0 >, /* TS 26 */ + < 5 FSL_CPM_TSA_SCC3 >; /* TS 27..31 */ + }; + };include/dt-bindings/soc/fsl,tsa.h new file +8
-0@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ + +#ifndef __DT_BINDINGS_SOC_FSL_TSA_H +#define __DT_BINDINGS_SOC_FSL_TSA_H + +#define FSL_CPM_TSA_NU 0/* Pseuso Cell Id for not used item */ +#define FSL_CPM_TSA_SCC2 1 +#define FSL_CPM_TSA_SCC3 2
Quoted 8 lines
Quoted 8 lines
include/dt-bindings/soc/fsl,tsa.h new file +5
-0+#define FSL_CPM_TSA_SCC4 3 +#define FSL_CPM_TSA_SMC1 4 +#define FSL_CPM_TSA_SMC2 5 + +#endif Signature · 1 line
2.38.1
Thanks for the review,
Hervé
Signature · 3 lines
Hervé Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Herve Codina
maintainerPATCH v3 2/10 soc: fsl: cpm1: Add support for TSA
In reply to Herve CodinaThe TSA (Time Slot Assigner) purpose is to route some TDM time-slots to other internal serial controllers.
It is available in some PowerQUICC SoC such as the MPC885 or MPC866.
It is also available on some Quicc Engine SoCs. This current version support CPM1 SoCs only and some enhancement are needed to support Quicc Engine SoCs.
--- drivers/soc/fsl/qe/Kconfig | 11 + drivers/soc/fsl/qe/Makefile | 1 + drivers/soc/fsl/qe/tsa.c | 810 ++++++++++++++++++++++++++++++++++++ drivers/soc/fsl/qe/tsa.h | 43 ++ 4 files changed, 865 insertions(+) create mode 100644 drivers/soc/fsl/qe/tsa.c create mode 100644 drivers/soc/fsl/qe/tsa.h
drivers/soc/fsl/qe/Kconfig +11 -0
@@ -33,6 +33,17 @@ config UCC bool default y if UCC_FAST || UCC_SLOW +config CPM_TSA + tristate "CPM TSA support" + depends on OF && HAS_IOMEM + depends on CPM1 || (PPC && COMPILE_TEST) + help + Freescale CPM Time Slot Assigner (TSA) + controller. + + This option enables support for this + controller + config QE_TDM bool default y if FSL_UCC_HDLC
drivers/soc/fsl/qe/Makefile +1 -0
@@ -4,6 +4,7 @@ # obj-$(CONFIG_QUICC_ENGINE)+= qe.o qe_common.o qe_ic.o qe_io.o obj-$(CONFIG_CPM) += qe_common.o +obj-$(CONFIG_CPM_TSA) += tsa.o obj-$(CONFIG_UCC) += ucc.o obj-$(CONFIG_UCC_SLOW) += ucc_slow.o obj-$(CONFIG_UCC_FAST) += ucc_fast.o
drivers/soc/fsl/qe/tsa.c new file +810 -0
810 lines not on this page · raw message
drivers/soc/fsl/qe/tsa.h new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
2.38.1
Herve Codina
maintainerPATCH v3 3/10 MAINTAINERS: add the Freescale TSA controller entry
In reply to Herve CodinaAfter contributing the driver, add myself as the maintainer for the Freescale TSA controller.
--- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+)
MAINTAINERS +9 -0
@@ -8372,6 +8372,15 @@ S: Maintained F: drivers/soc/fsl/qe/ F: include/soc/fsl/qe/ +FREESCALE QUICC ENGINE TSA DRIVER +M: Herve Codina <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,tsa.yaml +F: drivers/soc/fsl/qe/tsa.c +F: drivers/soc/fsl/qe/tsa.h +F: include/dt-bindings/soc/fsl,tsa.h + FREESCALE QUICC ENGINE UCC ETHERNET DRIVER M: Li Yang <[email protected]> L: [email protected]
Signature · 1 line
2.38.1
Herve Codina
maintainerPATCH v3 4/10 powerpc/8xx: Use a larger CPM1 command check mask
In reply to Herve CodinaThe CPM1 command mask is defined for use with the standard CPM1 command register as described in the user's manual:
0 |1 3|4 7|8 11|12 14| 15| RST| - |OPCODE|CH_NUM| - |FLG|
In the QMC extension the CPM1 command register is redefined (QMC supplement user's manuel) with the following mapping:
0 |1 3|4 7|8 13|14| 15| RST|QMC OPCODE| 1110|CHANNEL_NUMBER| -|FLG|
Extend the check command mask in order to support both the standard CH_NUM field and the QMC extension CHANNEL_NUMBER field.
--- arch/powerpc/platforms/8xx/cpm1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/8xx/cpm1.c +1 -1
@@ -100,7 +100,7 @@ int cpm_command(u32 command, u8 opcode)int i, ret;unsigned long flags; -if (command &0xffffff0f ) +if (command &0xffffff03 )return -EINVAL ;spin_lock_irqsave (&cmd_lock, flags);
Signature · 1 line
2.38.1
Herve Codina
maintainerPATCH v3 5/10 dt-bindings: soc: fsl: cpm_qe: Add QMC controller
In reply to Herve CodinaAdd support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866.
--- .../bindings/soc/fsl/cpm_qe/fsl,qmc.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +164 -0
@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM QUICC Multichannel Controller (QMC) + +maintainers: + - Herve Codina <[email protected]> + +description: | + The QMC (QUICC Multichannel Controller) emulates up to 64 channels within + one serial controller using the same TDM physical interface routed from + TSA. + +properties: + compatible: + items: + - enum: + - fsl,mpc885-scc-qmc + - fsl,mpc866-scc-qmc + - const: fsl,cpm1-scc-qmc + + reg: + items: + - description: SCC (Serial communication controller) register base + - description: SCC parameter ram base + - description: Dual port ram base + + reg-names: + items: + - const: scc_regs + - const: scc_pram + - const: dpram + + interrupts: + maxItems: 1 + description: SCC interrupt line in the CPM interrupt controller + + fsl,tsa: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the TSA + + fsl,tsa-cell-id: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3] + description: | + TSA cell ID (dt-bindings/soc/fsl,tsa.h defines these values) + - 1: SCC2 + - 2: SCC3 + - 3: SCC4 + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + '#chan-cells': + const: 1 + +patternProperties: + '^channel@([0-9]|[1-5][0-9]|6[0-3])$': + description: + A channel managed by this controller + type: object + + properties: + reg: + minimum: 0 + maximum: 63 + description: + The channel number + + fsl,mode: + $ref: /schemas/types.yaml#/definitions/string + enum: [transparent, hdlc] + default: transparent + description: Operational mode + + fsl,reverse-data: + $ref: /schemas/types.yaml#/definitions/flag + description: + The bit order as seen on the channels is reversed, + transmitting/receiving the MSB of each octet first. + This flag is used only in 'transparent' mode. + + fsl,tx-ts-mask: + $ref: /schemas/types.yaml#/definitions/uint64 + description: + Channel assigned Tx time-slots within the Tx time-slots routed + by the TSA to this cell. + + fsl,rx-ts-mask: + $ref: /schemas/types.yaml#/definitions/uint64 + description: + Channel assigned Rx time-slots within the Rx time-slots routed + by the TSA to this cell. + + required: + - reg + - fsl,tx-ts-mask + - fsl,rx-ts-mask + +required: + - compatible + - reg + - reg-names + - interrupts + - fsl,tsa + - fsl,tsa-cell-id + - '#address-cells' + - '#size-cells' + - '#chan-cells' + +additionalProperties: false + +examples: + - | + #include <dt-bindings/soc/fsl,tsa.h> + + qmc@a60 { + compatible = "fsl,mpc885-scc-qmc", "fsl,cpm1-scc-qmc"; + reg = <0xa60 0x20>, + <0x3f00 0xc0>, + <0x2000 0x1000>; + reg-names = "scc_regs", "scc_pram", "dpram"; + interrupts = <27>; + interrupt-parent = <&CPM_PIC>; + + #address-cells = <1>; + #size-cells = <0>; + #chan-cells = <1>; + + fsl,tsa = <&tsa>; + fsl,tsa-cell-id = <FSL_CPM_TSA_SCC4>; + + channel@16 { + /* Ch16 : First 4 even TS from all routed from TSA */ + reg = <16>; + fsl,mode = "transparent"; + fsl,reverse-data; + fsl,tx-ts-mask = <0x00000000 0x000000aa>; + fsl,rx-ts-mask = <0x00000000 0x000000aa>; + }; + + channel@17 { + /* Ch17 : First 4 odd TS from all routed from TSA */ + reg = <17>; + fsl,mode = "transparent"; + fsl,reverse-data; + fsl,tx-ts-mask = <0x00000000 0x00000055>; + fsl,rx-ts-mask = <0x00000000 0x00000055>; + }; + + channel@19 { + /* Ch19 : 8 TS (TS 8..15) from all routed from TSA */ + reg = <19>; + fsl,mode = "hdlc"; + fsl,tx-ts-mask = <0x00000000 0x0000ff00>; + fsl,rx-ts-mask = <0x00000000 0x0000ff00>; + }; + };
Signature · 1 line
2.38.1
Re: [PATCH v3 05/10] dt-bindings: soc: fsl: cpm_qe: Add QMC controller
Quoted 57 lines · Herve Codina
Add support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866.
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,qmc.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yamlDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +42
-0@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM QUICC Multichannel Controller (QMC) + +maintainers: + - Herve Codina <[email protected]> + +description: | + The QMC (QUICC Multichannel Controller) emulates up to 64 channels within + one serial controller using the same TDM physical interface routed from + TSA. + +properties: + compatible: + items: + - enum: + - fsl,mpc885-scc-qmc + - fsl,mpc866-scc-qmc + - const: fsl,cpm1-scc-qmc + + reg: + items: + - description: SCC (Serial communication controller) register base + - description: SCC parameter ram base + - description: Dual port ram base + + reg-names: + items: + - const: scc_regs + - const: scc_pram + - const: dpram + + interrupts: + maxItems: 1 + description: SCC interrupt line in the CPM interrupt controller + + fsl,tsa: + $ref: /schemas/types.yaml#/definitions/phandle
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 52
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +10
-0+ description: phandle to the TSA + + fsl,tsa-cell-id: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3] + description: | + TSA cell ID (dt-bindings/soc/fsl,tsa.h defines these values) + - 1: SCC2 + - 2: SCC3 + - 3: SCC4
Is this used as argument to tsa? If so, this should be part of fsl,tsa property, just like we do for all syscon-like phandles.
Quoted 18 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +18
-0+ + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + '#chan-cells': + const: 1 + +patternProperties: + '^channel@([0-9]|[1-5][0-9]|6[0-3])$': + description: + A channel managed by this controller + type: object + + properties: + reg:
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 80
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +10
-0+ minimum: 0 + maximum: 63 + description: + The channel number + + fsl,mode: + $ref: /schemas/types.yaml#/definitions/string + enum: [transparent, hdlc] + default: transparent + description: Operational mode
You still need to explain what do transparent and hdlc mean.
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 81
Quoted 1 line
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +1
-0+
Best regards,
Krzysztof
Herve Codina
maintainerRe: [PATCH v3 05/10] dt-bindings: soc: fsl: cpm_qe: Add QMC controller
Hi Krzysztof,
Quoted 63 lines · On Tue, 17 Jan 2023 12:31:09 +0100 Krzysztof Kozlowski…
Quoted 62 lines · Herve Codina
Add support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866.
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,qmc.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yamlDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +47
-0@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM QUICC Multichannel Controller (QMC) + +maintainers: + - Herve Codina <[email protected]> + +description: | + The QMC (QUICC Multichannel Controller) emulates up to 64 channels within + one serial controller using the same TDM physical interface routed from + TSA. + +properties: + compatible: + items: + - enum: + - fsl,mpc885-scc-qmc + - fsl,mpc866-scc-qmc + - const: fsl,cpm1-scc-qmc + + reg: + items: + - description: SCC (Serial communication controller) register base + - description: SCC parameter ram base + - description: Dual port ram base + + reg-names: + items: + - const: scc_regs + - const: scc_pram + - const: dpram + + interrupts: + maxItems: 1 + description: SCC interrupt line in the CPM interrupt controller + + fsl,tsa: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the TSA + + fsl,tsa-cell-id: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3]
Quoted 8 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 52
Quoted 5 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +5
-0+ description: | + TSA cell ID (dt-bindings/soc/fsl,tsa.h defines these values) + - 1: SCC2 + - 2: SCC3 + - 3: SCC4Is this used as argument to tsa? If so, this should be part of fsl,tsa property, just like we do for all syscon-like phandles.
Yes, indeed.
I will move 'fsl,tsa' to 'fsl,tsa-cell' with 'fsl,tsa-cell' a phandle/number pair (the phandle to TSA node and the TSA cell id to use)
Quoted 23 lines
Quoted 23 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +22
-0+ + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + + '#chan-cells': + const: 1 + +patternProperties: + '^channel@([0-9]|[1-5][0-9]|6[0-3])$': + description: + A channel managed by this controller + type: object + + properties: + reg: + minimum: 0 + maximum: 63 + description: + The channel number
Quoted 8 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 80
Quoted 6 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +6
-0+ + fsl,mode: + $ref: /schemas/types.yaml#/definitions/string + enum: [transparent, hdlc] + default: transparent + description: Operational modeYou still need to explain what do transparent and hdlc mean.
Oups, my bad (already mentioned in the previous version review).
Also, I will rename the property to 'fsl,operational-mode' to be more precise than just 'fsl,mode'
Quoted 7 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 81
Quoted 2 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +1
-0+Best regards,
Krzysztof
Thanks for the review,
Hervé
Signature · 3 lines
Hervé Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [PATCH v3 05/10] dt-bindings: soc: fsl: cpm_qe: Add QMC controller
Quoted 77 lines · Herve Codina
Hi Krzysztof,
Quoted 63 lines · On Tue, 17 Jan 2023 12:31:09 +0100 Krzysztof Kozlowski…
Quoted 62 lines · Herve Codina
Add support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866.
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,qmc.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yamlDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +47
-0@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM QUICC Multichannel Controller (QMC) + +maintainers: + - Herve Codina <[email protected]> + +description: | + The QMC (QUICC Multichannel Controller) emulates up to 64 channels within + one serial controller using the same TDM physical interface routed from + TSA. + +properties: + compatible: + items: + - enum: + - fsl,mpc885-scc-qmc + - fsl,mpc866-scc-qmc + - const: fsl,cpm1-scc-qmc + + reg: + items: + - description: SCC (Serial communication controller) register base + - description: SCC parameter ram base + - description: Dual port ram base + + reg-names: + items: + - const: scc_regs + - const: scc_pram + - const: dpram + + interrupts: + maxItems: 1 + description: SCC interrupt line in the CPM interrupt controller + + fsl,tsa: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to the TSA + + fsl,tsa-cell-id: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3]Quoted 8 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 52
Quoted 5 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +5
-0+ description: | + TSA cell ID (dt-bindings/soc/fsl,tsa.h defines these values) + - 1: SCC2 + - 2: SCC3 + - 3: SCC4Is this used as argument to tsa? If so, this should be part of fsl,tsa property, just like we do for all syscon-like phandles.
Quoted 3 lines
Yes, indeed.
I will move 'fsl,tsa' to 'fsl,tsa-cell' with 'fsl,tsa-cell' a phandle/number pair (the phandle to TSA node and the TSA cell id to use)
Move to fsl,tsa, not from.
Best regards,
Krzysztof
Herve Codina
maintainerRe: [PATCH v3 05/10] dt-bindings: soc: fsl: cpm_qe: Add QMC controller
Quoted 78 lines · On Tue, 24 Jan 2023 11:02:52 +0100 Krzysztof Kozlowski…
Quoted 77 lines · Herve Codina
Hi Krzysztof,
Quoted 71 lines · On Tue, 17 Jan 2023 12:31:09 +0100 Krzysztof Kozlowski…
Quoted 57 lines · Herve Codina
Add support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866.
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,qmc.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yamlDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +42
-0@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM QUICC Multichannel Controller (QMC) + +maintainers: + - Herve Codina <[email protected]> + +description: | + The QMC (QUICC Multichannel Controller) emulates up to 64 channels within + one serial controller using the same TDM physical interface routed from + TSA. + +properties: + compatible: + items: + - enum: + - fsl,mpc885-scc-qmc + - fsl,mpc866-scc-qmc + - const: fsl,cpm1-scc-qmc + + reg: + items: + - description: SCC (Serial communication controller) register base + - description: SCC parameter ram base + - description: Dual port ram base + + reg-names: + items: + - const: scc_regs + - const: scc_pram + - const: dpram + + interrupts: + maxItems: 1 + description: SCC interrupt line in the CPM interrupt controller + + fsl,tsa: + $ref: /schemas/types.yaml#/definitions/phandleDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 52
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +10
-0+ description: phandle to the TSA + + fsl,tsa-cell-id: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3] + description: | + TSA cell ID (dt-bindings/soc/fsl,tsa.h defines these values) + - 1: SCC2 + - 2: SCC3 + - 3: SCC4Is this used as argument to tsa? If so, this should be part of fsl,tsa property, just like we do for all syscon-like phandles.
Quoted 5 lines
Quoted 3 lines
Yes, indeed.
I will move 'fsl,tsa' to 'fsl,tsa-cell' with 'fsl,tsa-cell' a phandle/number pair (the phandle to TSA node and the TSA cell id to use)Move to fsl,tsa, not from.
Well, I plan to remove both fsl,tsa and fsl,tsa-cell-id and use this:
fsl,tsa-cell:
$ref: /schemas/types.yaml#/definitions/phandle-array items:
- items:
- description: phandle to TSA node
- enum: [1, 2, 3]
description: |
TSA cell ID (dt-bindings/soc/fsl,tsa.h defines these values)
- 1: SCC2
- 2: SCC3
- 3: SCC4
description:
Should be a phandle/number pair. The phandle to TSA node and the TSA cell ID to use.
Is that what you were thinking about ?
Best regards,
Hervé
Signature · 3 lines
Hervé Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [PATCH v3 05/10] dt-bindings: soc: fsl: cpm_qe: Add QMC controller
Quoted 103 lines · Herve Codina
Quoted 78 lines · On Tue, 24 Jan 2023 11:02:52 +0100 Krzysztof Kozlowski…
Quoted 77 lines · Herve Codina
Hi Krzysztof,
Quoted 71 lines · On Tue, 17 Jan 2023 12:31:09 +0100 Krzysztof Kozlowski…
Quoted 57 lines · Herve Codina
Add support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866.
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,qmc.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yamlDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +42
-0@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM QUICC Multichannel Controller (QMC) + +maintainers: + - Herve Codina <[email protected]> + +description: | + The QMC (QUICC Multichannel Controller) emulates up to 64 channels within + one serial controller using the same TDM physical interface routed from + TSA. + +properties: + compatible: + items: + - enum: + - fsl,mpc885-scc-qmc + - fsl,mpc866-scc-qmc + - const: fsl,cpm1-scc-qmc + + reg: + items: + - description: SCC (Serial communication controller) register base + - description: SCC parameter ram base + - description: Dual port ram base + + reg-names: + items: + - const: scc_regs + - const: scc_pram + - const: dpram + + interrupts: + maxItems: 1 + description: SCC interrupt line in the CPM interrupt controller + + fsl,tsa: + $ref: /schemas/types.yaml#/definitions/phandleDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 52
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +10
-0+ description: phandle to the TSA + + fsl,tsa-cell-id: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3] + description: | + TSA cell ID (dt-bindings/soc/fsl,tsa.h defines these values) + - 1: SCC2 + - 2: SCC3 + - 3: SCC4Is this used as argument to tsa? If so, this should be part of fsl,tsa property, just like we do for all syscon-like phandles.
Quoted 5 lines
Quoted 3 lines
Yes, indeed.
I will move 'fsl,tsa' to 'fsl,tsa-cell' with 'fsl,tsa-cell' a phandle/number pair (the phandle to TSA node and the TSA cell id to use)Move to fsl,tsa, not from.
Well, I plan to remove both fsl,tsa and fsl,tsa-cell-id and use this:
fsl,tsa-cell:
$ref: /schemas/types.yaml#/definitions/phandle-array items:
- items:
- description: phandle to TSA node
- enum: [1, 2, 3]
description: |
TSA cell ID (dt-bindings/soc/fsl,tsa.hdefines these values)
- 1: SCC2
- 2: SCC3
- 3: SCC4
description:
Should be a phandle/number pair. The phandle to TSA node and the TSA cell ID to use.
Quoted 1 line
Is that what you were thinking about ?
Yes, except again, so third time, why calling this "cell"? Move it to fsl,tsa.
Best regards,
Krzysztof
Herve Codina
maintainerRe: [PATCH v3 05/10] dt-bindings: soc: fsl: cpm_qe: Add QMC controller
Quoted 104 lines · On Tue, 24 Jan 2023 13:24:48 +0100 Krzysztof Kozlowski…
Quoted 103 lines · Herve Codina
Quoted 78 lines · On Tue, 24 Jan 2023 11:02:52 +0100 Krzysztof Kozlowski…
Quoted 77 lines · Herve Codina
Hi Krzysztof,
Quoted 71 lines · On Tue, 17 Jan 2023 12:31:09 +0100 Krzysztof Kozlowski…
Quoted 57 lines · Herve Codina
Add support for the QMC (QUICC Multichannel Controller) available in some PowerQUICC SoC such as MPC885 or MPC866.
Signed-off-by Herve Codina <[email protected]>--- .../bindings/soc/fsl/cpm_qe/fsl,qmc.yaml | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yamlDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +42
-0@@ -0,0 +1,164 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/fsl/cpm_qe/fsl,qmc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PowerQUICC CPM QUICC Multichannel Controller (QMC) + +maintainers: + - Herve Codina <[email protected]> + +description: | + The QMC (QUICC Multichannel Controller) emulates up to 64 channels within + one serial controller using the same TDM physical interface routed from + TSA. + +properties: + compatible: + items: + - enum: + - fsl,mpc885-scc-qmc + - fsl,mpc866-scc-qmc + - const: fsl,cpm1-scc-qmc + + reg: + items: + - description: SCC (Serial communication controller) register base + - description: SCC parameter ram base + - description: Dual port ram base + + reg-names: + items: + - const: scc_regs + - const: scc_pram + - const: dpram + + interrupts: + maxItems: 1 + description: SCC interrupt line in the CPM interrupt controller + + fsl,tsa: + $ref: /schemas/types.yaml#/definitions/phandleDocumentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml line 52
Quoted 10 lines
Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml new file +10
-0+ description: phandle to the TSA + + fsl,tsa-cell-id: + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [1, 2, 3] + description: | + TSA cell ID (dt-bindings/soc/fsl,tsa.h defines these values) + - 1: SCC2 + - 2: SCC3 + - 3: SCC4Is this used as argument to tsa? If so, this should be part of fsl,tsa property, just like we do for all syscon-like phandles.
Quoted 5 lines
Quoted 3 lines
Yes, indeed.
I will move 'fsl,tsa' to 'fsl,tsa-cell' with 'fsl,tsa-cell' a phandle/number pair (the phandle to TSA node and the TSA cell id to use)Move to fsl,tsa, not from.
Well, I plan to remove both fsl,tsa and fsl,tsa-cell-id and use this:
fsl,tsa-cell:
$ref: /schemas/types.yaml#/definitions/phandle-array items:
- items:
- description: phandle to TSA node
- enum: [1, 2, 3]
description: |
TSA cell ID (dt-bindings/soc/fsl,tsa.hdefines these values)
- 1: SCC2
- 2: SCC3
- 3: SCC4
description:
Should be a phandle/number pair. The phandle to TSA node and the TSA cell ID to use.
Quoted 5 lines
Quoted 1 line
Is that what you were thinking about ?
Yes, except again, so third time, why calling this "cell"? Move it to fsl,tsa.
Why calling this "cell" ? Just because we reference a "cell" using the TSA cell ID inside TSA and not the TSA itself.
Maybe the problem is the term "cell" as it is not the DT definition of "cell" but the source/destination of the TSA routing.
TSA can route data from/to some "serial controller". These serial controllers are :
- SCC (Serial Communication Controller)
- SMC (Serial Management Controller)
- UCC (Unified Communication Controller)
Only SCCs are handled here.
Maybe the term "serial" makes more sense which will lead to
fsl,tsa-serial = <&tsa, SCC4>;
Best regards,
Hervé
Signature · 3 lines
Hervé Codina, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [PATCH v3 05/10] dt-bindings: soc: fsl: cpm_qe: Add QMC controller
Quoted 18 lines · Herve Codina
Quoted 5 lines
Quoted 1 line
Is that what you were thinking about ?
Yes, except again, so third time, why calling this "cell"? Move it to fsl,tsa.
Why calling this "cell" ? Just because we reference a "cell" using the TSA cell ID inside TSA and not the TSA itself.
Maybe the problem is the term "cell" as it is not the DT definition of "cell" but the source/destination of the TSA routing.
TSA can route data from/to some "serial controller". These serial controllers are :
- SCC (Serial Communication Controller)
- SMC (Serial Management Controller)
- UCC (Unified Communication Controller)
Quoted 4 lines
Only SCCs are handled here.
Maybe the term "serial" makes more sense which will lead to
fsl,tsa-serial = <&tsa, SCC4>;
Yes, that's better. Thanks.
Best regards,
Krzysztof
Herve Codina
maintainerPATCH v3 6/10 soc: fsl: cmp1: Add support for QMC
In reply to Herve CodinaThe QMC (QUICC Multichannel Controller) emulates up to 64 channels within one serial controller using the same TDM physical interface routed from the TSA.
It is available in some PowerQUICC SoC such as the
MPC885 or MPC866.
It is also available on some Quicc Engine SoCs. This current version support CPM1 SoCs only and some enhancement are needed to support Quicc Engine SoCs.
--- drivers/soc/fsl/qe/Kconfig | 12 + drivers/soc/fsl/qe/Makefile | 1 + drivers/soc/fsl/qe/qmc.c | 1531 +++++++++++++++++++++++++++++++++++ include/soc/fsl/qe/qmc.h | 71 ++ 4 files changed, 1615 insertions(+) create mode 100644 drivers/soc/fsl/qe/qmc.c create mode 100644 include/soc/fsl/qe/qmc.h
drivers/soc/fsl/qe/Kconfig +12 -0
@@ -44,6 +44,18 @@ config CPM_TSA This option enables support for this controller +config CPM_QMC + tristate "CPM QMC support" + depends on OF && HAS_IOMEM + depends on CPM1 || (PPC && COMPILE_TEST) + depends on CPM_TSA + help + Freescale CPM QUICC Multichannel Controller + (QMC) + + This option enables support for this + controller + config QE_TDM bool default y if FSL_UCC_HDLC
drivers/soc/fsl/qe/Makefile +1 -0
@@ -5,6 +5,7 @@ obj-$(CONFIG_QUICC_ENGINE)+= qe.o qe_common.o qe_ic.o qe_io.o obj-$(CONFIG_CPM) += qe_common.o obj-$(CONFIG_CPM_TSA) += tsa.o +obj-$(CONFIG_CPM_QMC) += qmc.o obj-$(CONFIG_UCC) += ucc.o obj-$(CONFIG_UCC_SLOW) += ucc_slow.o obj-$(CONFIG_UCC_FAST) += ucc_fast.o
drivers/soc/fsl/qe/qmc.c new file +1531 -0
1,531 lines not on this page · raw message
include/soc/fsl/qe/qmc.h new file +71 -0
71 lines not on this page · raw message
Signature · 1 line
2.38.1
Herve Codina
maintainerPATCH v3 7/10 MAINTAINERS: add the Freescale QMC controller entry
In reply to Herve CodinaAfter contributing the driver, add myself as the maintainer for the Freescale QMC controller.
--- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
@@ -8372,6 +8372,14 @@ S: Maintained F: drivers/soc/fsl/qe/ F: include/soc/fsl/qe/ +FREESCALE QUICC ENGINE QMC DRIVER +M: Herve Codina <[email protected]> +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,qmc.yaml +F: drivers/soc/fsl/qe/qmc.c +F: include/soc/fsl/qe/qmc.h + FREESCALE QUICC ENGINE TSA DRIVER M: Herve Codina <[email protected]> L: [email protected]
Signature · 1 line
2.38.1
Herve Codina
maintainerPATCH v3 8/10 dt-bindings: sound: Add support for QMC audio
In reply to Herve CodinaThe QMC (QUICC mutichannel controller) is a controller present in some PowerQUICC SoC such as MPC885. The QMC audio is an ASoC component that uses the QMC controller to transfer the audio data.
--- .../bindings/sound/fsl,qmc-audio.yaml | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml
Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml new file +117 -0
@@ -0,0 +1,117 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/fsl,qmc-audio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: QMC audio + +maintainers: + - Herve Codina <[email protected]> + +description: | + The QMC audio is an ASoC component which uses QMC (QUICC Multichannel + Controller) channels to transfer the audio data. + It provides as many DAI as the number of QMC channel used. + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + const: fsl,qmc-audio + + '#address-cells': + const: 1 + '#size-cells': + const: 0 + '#sound-dai-cells': + const: 1 + +patternProperties: + '^dai@([0-9]|[1-5][0-9]|6[0-3])$': + description: + A DAI managed by this controller + type: object + + properties: + reg: + minimum: 0 + maximum: 63 + description: + The DAI number + + fsl,qmc-chan: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to QMC node + - description: Channel number + description: + Should be a phandle/number pair. The phandle to QMC node and the QMC + channel to use for this DAI. + + required: + - reg + - fsl,qmc-chan + +required: + - compatible + - '#address-cells' + - '#size-cells' + - '#sound-dai-cells' + +additionalProperties: false + +examples: + - | + audio_controller: audio-controller { + compatible = "fsl,qmc-audio"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + dai@16 { + reg = <16>; + fsl,qmc-chan = <&qmc 16>; + }; + dai@17 { + reg = <17>; + fsl,qmc-chan = <&qmc 17>; + }; + }; + + sound { + compatible = "simple-audio-card"; + #address-cells = <1>; + #size-cells = <0>; + simple-audio-card,dai-link@0 { + reg = <0>; + format = "dsp_b"; + cpu { + sound-dai = <&audio_controller 16>; + }; + codec { + sound-dai = <&codec1>; + dai-tdm-slot-num = <4>; + dai-tdm-slot-width = <8>; + /* TS 3, 5, 7, 9 */ + dai-tdm-slot-tx-mask = <0 0 0 1 0 1 0 1 0 1>; + dai-tdm-slot-rx-mask = <0 0 0 1 0 1 0 1 0 1>; + }; + }; + simple-audio-card,dai-link@1 { + reg = <1>; + format = "dsp_b"; + cpu { + sound-dai = <&audio_controller 17>; + }; + codec { + sound-dai = <&codec2>; + dai-tdm-slot-num = <4>; + dai-tdm-slot-width = <8>; + /* TS 2, 4, 6, 8 */ + dai-tdm-slot-tx-mask = <0 0 1 0 1 0 1 0 1>; + dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>; + }; + }; + };
Signature · 1 line
2.38.1
Re: [PATCH v3 08/10] dt-bindings: sound: Add support for QMC audio
Quoted 6 lines · Herve Codina
The QMC (QUICC mutichannel controller) is a controller present in some PowerQUICC SoC such as MPC885. The QMC audio is an ASoC component that uses the QMC controller to transfer the audio data.
Signed-off-by Herve Codina <[email protected]>
Best regards,
Krzysztof
Herve Codina
maintainerPATCH v3 9/10 ASoC: fsl: Add support for QMC audio
In reply to Herve CodinaThe QMC audio is an ASoC component which provides DAIs that use the QMC (QUICC Multichannel Controller) to transfer the audio data.
It provides as many DAIs as the number of QMC channels it references.
--- sound/soc/fsl/Kconfig | 9 + sound/soc/fsl/Makefile | 2 + sound/soc/fsl/fsl_qmc_audio.c | 732 ++++++++++++++++++++++++++++++++++ 3 files changed, 743 insertions(+) create mode 100644 sound/soc/fsl/fsl_qmc_audio.c
sound/soc/fsl/Kconfig +9 -0
@@ -172,6 +172,15 @@ config SND_MPC52xx_DMA config SND_SOC_POWERPC_DMA tristate +config SND_SOC_POWERPC_QMC_AUDIO + tristate "QMC ALSA SoC support" + depends on CPM_QMC + help + ALSA SoC Audio support using the Freescale QUICC Multichannel + Controller (QMC). + Say Y or M if you want to add support for SoC audio using Freescale + QMC. + comment "SoC Audio support for Freescale PPC boards:" config SND_SOC_MPC8610_HPCD
sound/soc/fsl/Makefile +2 -0
@@ -28,6 +28,7 @@ snd-soc-fsl-easrc-objs := fsl_easrc.o snd-soc-fsl-xcvr-objs := fsl_xcvr.o snd-soc-fsl-aud2htx-objs := fsl_aud2htx.o snd-soc-fsl-rpmsg-objs := fsl_rpmsg.o +snd-soc-fsl-qmc-audio-objs := fsl_qmc_audio.o obj-$(CONFIG_SND_SOC_FSL_AUDMIX) += snd-soc-fsl-audmix.o obj-$(CONFIG_SND_SOC_FSL_ASOC_CARD) += snd-soc-fsl-asoc-card.o
@@ -44,6 +45,7 @@ obj-$(CONFIG_SND_SOC_POWERPC_DMA) += snd-soc-fsl-dma.o obj-$(CONFIG_SND_SOC_FSL_XCVR) += snd-soc-fsl-xcvr.o obj-$(CONFIG_SND_SOC_FSL_AUD2HTX) += snd-soc-fsl-aud2htx.o obj-$(CONFIG_SND_SOC_FSL_RPMSG) += snd-soc-fsl-rpmsg.o +obj-$(CONFIG_SND_SOC_POWERPC_QMC_AUDIO) += snd-soc-fsl-qmc-audio.o # MPC5200 Platform Support obj-$(CONFIG_SND_MPC52xx_DMA) += mpc5200_dma.o
sound/soc/fsl/fsl_qmc_audio.c new file +732 -0
732 lines not on this page · raw message
Signature · 1 line
2.38.1
Herve Codina
maintainerPATCH v3 10/10 MAINTAINERS: add the Freescale QMC audio entry
In reply to Herve CodinaAfter contributing the component, add myself as the maintainer for the Freescale QMC audio ASoC component.
--- MAINTAINERS | 8 ++++++++ 1 file changed, 8 insertions(+)
MAINTAINERS +8 -0
@@ -8440,6 +8440,14 @@ F: sound/soc/fsl/fsl* F: sound/soc/fsl/imx* F: sound/soc/fsl/mpc8610_hpcd.c +FREESCALE SOC SOUND QMC DRIVER +M: Herve Codina <[email protected]> +L: [email protected] (moderated for non-subscribers) +L: [email protected] +S: Maintained +F: Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml +F: sound/soc/fsl/fsl_qmc_audio.c + FREESCALE USB PERIPHERAL DRIVERS M: Li Yang <[email protected]> L: [email protected]
Signature · 1 line
2.38.1