xref: /freebsd/sys/contrib/device-tree/Bindings/sound/fsl,mqs.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1*8d13bc63SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8d13bc63SEmmanuel Vadot%YAML 1.2
3*8d13bc63SEmmanuel Vadot---
4*8d13bc63SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/fsl,mqs.yaml#
5*8d13bc63SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8d13bc63SEmmanuel Vadot
7*8d13bc63SEmmanuel Vadottitle: NXP Medium Quality Sound (MQS)
8*8d13bc63SEmmanuel Vadot
9*8d13bc63SEmmanuel Vadotmaintainers:
10*8d13bc63SEmmanuel Vadot  - Shengjiu Wang <shengjiu.wang@nxp.com>
11*8d13bc63SEmmanuel Vadot  - Chancel Liu <chancel.liu@nxp.com>
12*8d13bc63SEmmanuel Vadot
13*8d13bc63SEmmanuel Vadotdescription: |
14*8d13bc63SEmmanuel Vadot  Medium quality sound (MQS) is used to generate medium quality audio
15*8d13bc63SEmmanuel Vadot  via a standard GPIO in the pinmux, allowing the user to connect
16*8d13bc63SEmmanuel Vadot  stereo speakers or headphones to a power amplifier without an
17*8d13bc63SEmmanuel Vadot  additional DAC chip.
18*8d13bc63SEmmanuel Vadot
19*8d13bc63SEmmanuel Vadotproperties:
20*8d13bc63SEmmanuel Vadot  compatible:
21*8d13bc63SEmmanuel Vadot    enum:
22*8d13bc63SEmmanuel Vadot      - fsl,imx6sx-mqs
23*8d13bc63SEmmanuel Vadot      - fsl,imx8qm-mqs
24*8d13bc63SEmmanuel Vadot      - fsl,imx8qxp-mqs
25*8d13bc63SEmmanuel Vadot      - fsl,imx93-mqs
26*8d13bc63SEmmanuel Vadot
27*8d13bc63SEmmanuel Vadot  clocks:
28*8d13bc63SEmmanuel Vadot    minItems: 1
29*8d13bc63SEmmanuel Vadot    maxItems: 2
30*8d13bc63SEmmanuel Vadot
31*8d13bc63SEmmanuel Vadot  clock-names:
32*8d13bc63SEmmanuel Vadot    minItems: 1
33*8d13bc63SEmmanuel Vadot    maxItems: 2
34*8d13bc63SEmmanuel Vadot
35*8d13bc63SEmmanuel Vadot  gpr:
36*8d13bc63SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
37*8d13bc63SEmmanuel Vadot    description: The phandle to the General Purpose Register (GPR) node
38*8d13bc63SEmmanuel Vadot
39*8d13bc63SEmmanuel Vadot  reg:
40*8d13bc63SEmmanuel Vadot    maxItems: 1
41*8d13bc63SEmmanuel Vadot
42*8d13bc63SEmmanuel Vadot  power-domains:
43*8d13bc63SEmmanuel Vadot    maxItems: 1
44*8d13bc63SEmmanuel Vadot
45*8d13bc63SEmmanuel Vadot  resets:
46*8d13bc63SEmmanuel Vadot    maxItems: 1
47*8d13bc63SEmmanuel Vadot
48*8d13bc63SEmmanuel Vadotrequired:
49*8d13bc63SEmmanuel Vadot  - compatible
50*8d13bc63SEmmanuel Vadot  - clocks
51*8d13bc63SEmmanuel Vadot  - clock-names
52*8d13bc63SEmmanuel Vadot
53*8d13bc63SEmmanuel VadotallOf:
54*8d13bc63SEmmanuel Vadot  - if:
55*8d13bc63SEmmanuel Vadot      properties:
56*8d13bc63SEmmanuel Vadot        compatible:
57*8d13bc63SEmmanuel Vadot          contains:
58*8d13bc63SEmmanuel Vadot            enum:
59*8d13bc63SEmmanuel Vadot              - fsl,imx8qm-mqs
60*8d13bc63SEmmanuel Vadot              - fsl,imx8qxp-mqs
61*8d13bc63SEmmanuel Vadot    then:
62*8d13bc63SEmmanuel Vadot      properties:
63*8d13bc63SEmmanuel Vadot        clocks:
64*8d13bc63SEmmanuel Vadot          items:
65*8d13bc63SEmmanuel Vadot            - description: Master clock
66*8d13bc63SEmmanuel Vadot            - description: Clock for register access
67*8d13bc63SEmmanuel Vadot        clock-names:
68*8d13bc63SEmmanuel Vadot          items:
69*8d13bc63SEmmanuel Vadot            - const: mclk
70*8d13bc63SEmmanuel Vadot            - const: core
71*8d13bc63SEmmanuel Vadot      required:
72*8d13bc63SEmmanuel Vadot        - reg
73*8d13bc63SEmmanuel Vadot        - power-domains
74*8d13bc63SEmmanuel Vadot    else:
75*8d13bc63SEmmanuel Vadot      properties:
76*8d13bc63SEmmanuel Vadot        clocks:
77*8d13bc63SEmmanuel Vadot          items:
78*8d13bc63SEmmanuel Vadot            - description: Master clock
79*8d13bc63SEmmanuel Vadot        clock-names:
80*8d13bc63SEmmanuel Vadot          items:
81*8d13bc63SEmmanuel Vadot            - const: mclk
82*8d13bc63SEmmanuel Vadot      required:
83*8d13bc63SEmmanuel Vadot        - gpr
84*8d13bc63SEmmanuel Vadot
85*8d13bc63SEmmanuel VadotadditionalProperties: false
86*8d13bc63SEmmanuel Vadot
87*8d13bc63SEmmanuel Vadotexamples:
88*8d13bc63SEmmanuel Vadot  - |
89*8d13bc63SEmmanuel Vadot    #include <dt-bindings/clock/imx6sx-clock.h>
90*8d13bc63SEmmanuel Vadot    mqs0: mqs {
91*8d13bc63SEmmanuel Vadot        compatible = "fsl,imx6sx-mqs";
92*8d13bc63SEmmanuel Vadot        gpr = <&gpr>;
93*8d13bc63SEmmanuel Vadot        clocks = <&clks IMX6SX_CLK_SAI1>;
94*8d13bc63SEmmanuel Vadot        clock-names = "mclk";
95*8d13bc63SEmmanuel Vadot    };
96*8d13bc63SEmmanuel Vadot
97*8d13bc63SEmmanuel Vadot  - |
98*8d13bc63SEmmanuel Vadot    #include <dt-bindings/firmware/imx/rsrc.h>
99*8d13bc63SEmmanuel Vadot    mqs1: mqs@59850000 {
100*8d13bc63SEmmanuel Vadot        compatible = "fsl,imx8qm-mqs";
101*8d13bc63SEmmanuel Vadot        reg = <0x59850000 0x10000>;
102*8d13bc63SEmmanuel Vadot        clocks = <&mqs0_lpcg 0>, <&mqs0_lpcg 1>;
103*8d13bc63SEmmanuel Vadot        clock-names = "mclk", "core";
104*8d13bc63SEmmanuel Vadot        power-domains = <&pd IMX_SC_R_MQS_0>;
105*8d13bc63SEmmanuel Vadot    };
106