-
Notifications
You must be signed in to change notification settings - Fork 14
/
BB-CTAG-SW-8CH-00A0.dts
136 lines (121 loc) · 3.63 KB
/
BB-CTAG-SW-8CH-00A0.dts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*
* Device Tree Overlay for CTAG face2|4 multichannel soundcard - 8 audio channels
*
* Author: Henrik Langer <henni19790@googlemail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green";
/* identification */
part-number = "BB-CTAG-SW-8CH";
version = "00A0", "A0";
/* state the resources this cape uses */
exclusive-use =
/* audio */
"P9.30", /* mcasp0_axr0 audio in */
"P9.28", /* mcasp0_axr2 audio out */
"P9.31", /* mcasp0_ahclkx transmit bitclock */
"P9.29", /* mcasp0_fsx transmit frameclock */
"P9.12", /* mcasp0_aclkr receive bitclock */
"P9.27", /* mcasp0_fsr receive frameclock */
"P9.25", /* mcasp0_ahclkx masterclock */
/* spi */
"P8.32", /* spi_sclk */
"P8.33", /* spi_mosi */
"P8.14", /* spi_miso */
"P8.17", /* spi_cs0 */
/* the hardware ip uses */
"mcasp0", "spi_gpio";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
mcasp0_pins: pinmix_mcasp0_pins {
pinctrl-single,pins = <
0x1ac 0x20 /* mcasp0_ahclkx, MODE0 | INPUT_PULLDOWN | P9_25 */
0x19c 0x02 /* mcasp0_axr2, MODE2 | OUTPUT_PULLDOWN | P9_28 */
0x194 0x20 /* mcasp0_fsx, MODE0 | INPUT_PULLDOWN | P9_29 */
0x190 0x20 /* mcasp0_aclkx, MODE0 | INPUT_PULLDOWN | P9_31 */
0x1a4 0x20 /* mcasp0_fsr, MODE0 | INPUT_PULLDOWN | P9_27 */
0x078 0x26 /* mcasp0_aclkr, MODE6 | INPUT_PULLDOWN | P9_12 */
0x198 0x20 /* mcasp0_axr0, MODE0 | INPUT_PULLDOWN | P9_30 */
>;
};
audiocard_spi_pins: pinmux_audiocard_spi_pins {
pinctrl-single,pins = <
0x0DC 0x37 /* spi_sclk, MODE7 | INPUT_PULLUP | SPI_SCLK P8_32 */
0x028 0x37 /* spi_miso, MODE7 | INPUT_PULLUP | SPI_MISO P8_14 */
0x0D4 0x17 /* spi_mosi, MODE7 | OUTPUT_PULLUP | SPI_MOSI P8_33 */
0x02C 0x17 /* spi_cs0, MODE7 | OUTPUT_PULLUP | SPI_CS0 P8_17 */
>;
};
};
};
fragment@1 {
target = <&spi_gpio>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&audiocard_spi_pins>;
status = "okay";
/* avoid dtc warnings */
#address-cells = <1>;
#size-cells = <0>;
ad193x: ad193x@0{
#address-cells = <1>;
#size-cells = <0>;
compatible = "analog,ad1938";
reg = <0>; //corresponds to cs
spi-max-frequency = <100000>;
};
};
};
fragment@2 {
target = <&mcasp0>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&mcasp0_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <8>;
num-serializer = <16>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
2 0 1 0
0 0 0 0
0 0 0 0
0 0 0 0
>;
tx-num-evt = <1>;
rx-num-evt = <1>;
};
};
fragment@3 {
target = <&ocp>;
__overlay__ {
sound {
compatible = "ctag,face-2-4";
model = "CTAG face-2-4 8CH";
audio-codec = <&ad193x>;
mcasp-controller = <&mcasp0>;
audiocard-tdm-slots = <8>;
codec-clock-rate = <24576000>;
cpu-clock-rate = <24576000>;
audio-codec-bit-delay-dac = <1>; //currently only supports 1 or 0 bit delay
audio-codec-bit-delay-adc = <1>;
mcasp-controller-bit-delay-tx = <1>;
mcasp-controller-bit-delay-rx = <1>;
bb-device = <0>; //BBB/BBG
audio-routing =
"Line Out", "DAC1OUT",
"Line Out", "DAC2OUT",
"Line Out", "DAC3OUT",
"Line Out", "DAC4OUT",
"ADC1IN", "Line In",
"ADC2IN", "Line In";
};
};
};
};