xref: /linux/Documentation/devicetree/bindings/sound/axentia,tse850-pcm5142.txt (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
1c821d301SPeter RosinDevicetree bindings for the Axentia TSE-850 audio complex
2c821d301SPeter Rosin
3c821d301SPeter RosinRequired properties:
4c821d301SPeter Rosin  - compatible: "axentia,tse850-pcm5142"
5ca8c7f23SPeter Rosin  - axentia,cpu-dai: The phandle of the cpu dai.
6c821d301SPeter Rosin  - axentia,audio-codec: The phandle of the PCM5142 codec.
7c821d301SPeter Rosin  - axentia,add-gpios: gpio specifier that controls the mixer.
8c821d301SPeter Rosin  - axentia,loop1-gpios: gpio specifier that controls loop relays on channel 1.
9c821d301SPeter Rosin  - axentia,loop2-gpios: gpio specifier that controls loop relays on channel 2.
10c821d301SPeter Rosin  - axentia,ana-supply: Regulator that supplies the output amplifier. Must
11c821d301SPeter Rosin    support voltages in the 2V - 20V range, in 1V steps.
12c821d301SPeter Rosin
13c821d301SPeter RosinThe schematics explaining the gpios are as follows:
14c821d301SPeter Rosin
15c821d301SPeter Rosin               loop1 relays
16c821d301SPeter Rosin   IN1 +---o  +------------+  o---+ OUT1
17c821d301SPeter Rosin            \                /
18c821d301SPeter Rosin             +              +
19c821d301SPeter Rosin             |   /          |
20c821d301SPeter Rosin             +--o  +--.     |
21c821d301SPeter Rosin             |  add   |     |
22c821d301SPeter Rosin             |        V     |
23c821d301SPeter Rosin             |      .---.   |
24c821d301SPeter Rosin   DAC +----------->|Sum|---+
25c821d301SPeter Rosin             |      '---'   |
26c821d301SPeter Rosin             |              |
27c821d301SPeter Rosin             +              +
28c821d301SPeter Rosin
29c821d301SPeter Rosin   IN2 +---o--+------------+--o---+ OUT2
30c821d301SPeter Rosin               loop2 relays
31c821d301SPeter Rosin
32*47aab533SBjorn HelgaasThe 'loop1' gpio pin controls two relays, which are either in loop position,
33c821d301SPeter Rosinmeaning that input and output are directly connected, or they are in mixer
34c821d301SPeter Rosinposition, meaning that the signal is passed through the 'Sum' mixer. Similarly
35c821d301SPeter Rosinfor 'loop2'.
36c821d301SPeter Rosin
37c821d301SPeter RosinIn the above, the 'loop1' relays are inactive, thus feeding IN1 to the mixer
38c821d301SPeter Rosin(if 'add' is active) and feeding the mixer output to OUT1. The 'loop2' relays
39c821d301SPeter Rosinare active, short-cutting the TSE-850 from channel 2. IN1, IN2, OUT1 and OUT2
40c821d301SPeter Rosinare TSE-850 connectors and DAC is the PCB name of the (filtered) output from
41c821d301SPeter Rosinthe PCM5142 codec.
42c821d301SPeter Rosin
43c821d301SPeter RosinExample:
44c821d301SPeter Rosin
45ca8c7f23SPeter Rosin	&ssc0 {
46ca8c7f23SPeter Rosin		#sound-dai-cells = <0>;
47ca8c7f23SPeter Rosin
48ca8c7f23SPeter Rosin	};
49ca8c7f23SPeter Rosin
50c821d301SPeter Rosin	&i2c {
51c821d301SPeter Rosin		codec: pcm5142@4c {
52c821d301SPeter Rosin			compatible = "ti,pcm5142";
53c821d301SPeter Rosin
54c821d301SPeter Rosin			reg = <0x4c>;
55c821d301SPeter Rosin
56c821d301SPeter Rosin			AVDD-supply = <&reg_3v3>;
57c821d301SPeter Rosin			DVDD-supply = <&reg_3v3>;
58c821d301SPeter Rosin			CPVDD-supply = <&reg_3v3>;
59c821d301SPeter Rosin
60c821d301SPeter Rosin			clocks = <&sck>;
61c821d301SPeter Rosin
62c821d301SPeter Rosin			pll-in = <3>;
63c821d301SPeter Rosin			pll-out = <6>;
64c821d301SPeter Rosin		};
65c821d301SPeter Rosin	};
66c821d301SPeter Rosin
67c821d301SPeter Rosin	ana: ana-reg {
68c821d301SPeter Rosin		compatible = "pwm-regulator";
69c821d301SPeter Rosin
70c821d301SPeter Rosin		regulator-name = "ANA";
71c821d301SPeter Rosin
72c821d301SPeter Rosin		pwms = <&pwm0 2 1000 PWM_POLARITY_INVERTED>;
73c821d301SPeter Rosin		pwm-dutycycle-unit = <1000>;
74c821d301SPeter Rosin		pwm-dutycycle-range = <100 1000>;
75c821d301SPeter Rosin
76c821d301SPeter Rosin		regulator-min-microvolt = <2000000>;
77c821d301SPeter Rosin		regulator-max-microvolt = <20000000>;
78c821d301SPeter Rosin		regulator-ramp-delay = <1000>;
79c821d301SPeter Rosin	};
80c821d301SPeter Rosin
81c821d301SPeter Rosin	sound {
82c821d301SPeter Rosin		compatible = "axentia,tse850-pcm5142";
83c821d301SPeter Rosin
84ca8c7f23SPeter Rosin		axentia,cpu-dai = <&ssc0>;
85c821d301SPeter Rosin		axentia,audio-codec = <&codec>;
86c821d301SPeter Rosin
87c821d301SPeter Rosin		axentia,add-gpios = <&pioA 8 GPIO_ACTIVE_LOW>;
88c821d301SPeter Rosin		axentia,loop1-gpios = <&pioA 10 GPIO_ACTIVE_LOW>;
89c821d301SPeter Rosin		axentia,loop2-gpios = <&pioA 11 GPIO_ACTIVE_LOW>;
90c821d301SPeter Rosin
91c821d301SPeter Rosin		axentia,ana-supply = <&ana>;
92c821d301SPeter Rosin	};
93