xref: /freebsd/sys/contrib/device-tree/Bindings/sound/atmel,sama5d2-classd.yaml (revision b97ee269eae3cbaf35c18f51a459aea581c2a7dc)
1*b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2*b97ee269SEmmanuel Vadot# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
3*b97ee269SEmmanuel Vadot%YAML 1.2
4*b97ee269SEmmanuel Vadot---
5*b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/sound/atmel,sama5d2-classd.yaml#
6*b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7*b97ee269SEmmanuel Vadot
8*b97ee269SEmmanuel Vadottitle: Atmel ClassD Amplifier
9*b97ee269SEmmanuel Vadot
10*b97ee269SEmmanuel Vadotmaintainers:
11*b97ee269SEmmanuel Vadot  - Nicolas Ferre <nicolas.ferre@microchip.com>
12*b97ee269SEmmanuel Vadot  - Alexandre Belloni <alexandre.belloni@bootlin.com>
13*b97ee269SEmmanuel Vadot  - Claudiu Beznea <claudiu.beznea@microchip.com>
14*b97ee269SEmmanuel Vadot
15*b97ee269SEmmanuel Vadotdescription:
16*b97ee269SEmmanuel Vadot  The Audio Class D Amplifier (CLASSD) is a digital input, Pulse Width
17*b97ee269SEmmanuel Vadot  Modulated (PWM) output stereo Class D amplifier.
18*b97ee269SEmmanuel Vadot
19*b97ee269SEmmanuel Vadotproperties:
20*b97ee269SEmmanuel Vadot  compatible:
21*b97ee269SEmmanuel Vadot    const: atmel,sama5d2-classd
22*b97ee269SEmmanuel Vadot
23*b97ee269SEmmanuel Vadot  reg:
24*b97ee269SEmmanuel Vadot    maxItems: 1
25*b97ee269SEmmanuel Vadot
26*b97ee269SEmmanuel Vadot  interrupts:
27*b97ee269SEmmanuel Vadot    maxItems: 1
28*b97ee269SEmmanuel Vadot
29*b97ee269SEmmanuel Vadot  dmas:
30*b97ee269SEmmanuel Vadot    maxItems: 1
31*b97ee269SEmmanuel Vadot
32*b97ee269SEmmanuel Vadot  dma-names:
33*b97ee269SEmmanuel Vadot    const: tx
34*b97ee269SEmmanuel Vadot
35*b97ee269SEmmanuel Vadot  clocks:
36*b97ee269SEmmanuel Vadot    maxItems: 2
37*b97ee269SEmmanuel Vadot
38*b97ee269SEmmanuel Vadot  clock-names:
39*b97ee269SEmmanuel Vadot    items:
40*b97ee269SEmmanuel Vadot      - const: pclk
41*b97ee269SEmmanuel Vadot      - const: gclk
42*b97ee269SEmmanuel Vadot
43*b97ee269SEmmanuel Vadot  atmel,model:
44*b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
45*b97ee269SEmmanuel Vadot    default: CLASSD
46*b97ee269SEmmanuel Vadot    description: The user-visible name of this sound complex.
47*b97ee269SEmmanuel Vadot
48*b97ee269SEmmanuel Vadot  atmel,pwm-type:
49*b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/string
50*b97ee269SEmmanuel Vadot    enum:
51*b97ee269SEmmanuel Vadot      - single
52*b97ee269SEmmanuel Vadot      - diff
53*b97ee269SEmmanuel Vadot    default: single
54*b97ee269SEmmanuel Vadot    description: PWM modulation type.
55*b97ee269SEmmanuel Vadot
56*b97ee269SEmmanuel Vadot  atmel,non-overlap-time:
57*b97ee269SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
58*b97ee269SEmmanuel Vadot    enum:
59*b97ee269SEmmanuel Vadot      - 5
60*b97ee269SEmmanuel Vadot      - 10
61*b97ee269SEmmanuel Vadot      - 15
62*b97ee269SEmmanuel Vadot      - 20
63*b97ee269SEmmanuel Vadot    default: 10
64*b97ee269SEmmanuel Vadot    description:
65*b97ee269SEmmanuel Vadot      Set non-overlapping time, the unit is nanosecond(ns).
66*b97ee269SEmmanuel Vadot      Non-overlapping will be disabled if not specified.
67*b97ee269SEmmanuel Vadot
68*b97ee269SEmmanuel Vadotrequired:
69*b97ee269SEmmanuel Vadot  - compatible
70*b97ee269SEmmanuel Vadot  - reg
71*b97ee269SEmmanuel Vadot  - interrupts
72*b97ee269SEmmanuel Vadot  - dmas
73*b97ee269SEmmanuel Vadot  - dma-names
74*b97ee269SEmmanuel Vadot  - clock-names
75*b97ee269SEmmanuel Vadot  - clocks
76*b97ee269SEmmanuel Vadot
77*b97ee269SEmmanuel VadotadditionalProperties: false
78*b97ee269SEmmanuel Vadot
79*b97ee269SEmmanuel Vadotexamples:
80*b97ee269SEmmanuel Vadot  - |
81*b97ee269SEmmanuel Vadot    #include <dt-bindings/dma/at91.h>
82*b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
83*b97ee269SEmmanuel Vadot
84*b97ee269SEmmanuel Vadot    classd: sound@fc048000 {
85*b97ee269SEmmanuel Vadot        compatible = "atmel,sama5d2-classd";
86*b97ee269SEmmanuel Vadot        reg = <0xfc048000 0x100>;
87*b97ee269SEmmanuel Vadot        interrupts = <59 IRQ_TYPE_LEVEL_HIGH 7>;
88*b97ee269SEmmanuel Vadot        dmas = <&dma0
89*b97ee269SEmmanuel Vadot            (AT91_XDMAC_DT_MEM_IF(0) | AT91_XDMAC_DT_PER_IF(1)
90*b97ee269SEmmanuel Vadot            | AT91_XDMAC_DT_PERID(47))>;
91*b97ee269SEmmanuel Vadot        dma-names = "tx";
92*b97ee269SEmmanuel Vadot        clocks = <&classd_clk>, <&classd_gclk>;
93*b97ee269SEmmanuel Vadot        clock-names = "pclk", "gclk";
94*b97ee269SEmmanuel Vadot        assigned-clocks = <&classd_gclk>;
95*b97ee269SEmmanuel Vadot        pinctrl-names = "default";
96*b97ee269SEmmanuel Vadot        pinctrl-0 = <&pinctrl_classd_default>;
97*b97ee269SEmmanuel Vadot        atmel,model = "classd @ SAMA5D2-Xplained";
98*b97ee269SEmmanuel Vadot        atmel,pwm-type = "diff";
99*b97ee269SEmmanuel Vadot        atmel,non-overlap-time = <10>;
100*b97ee269SEmmanuel Vadot    };
101