xref: /freebsd-src/sys/contrib/device-tree/src/arm/intel/pxa/pxa300-raumfeld-speaker-one.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2*f126890aSEmmanuel Vadot
3*f126890aSEmmanuel Vadot/dts-v1/;
4*f126890aSEmmanuel Vadot
5*f126890aSEmmanuel Vadot#include "pxa300-raumfeld-common.dtsi"
6*f126890aSEmmanuel Vadot
7*f126890aSEmmanuel Vadot/ {
8*f126890aSEmmanuel Vadot	model = "Raumfeld Speaker One (PXA3xx)";
9*f126890aSEmmanuel Vadot	compatible = "raumfeld,raumfeld-speaker-one-pxa303", "marvell,pxa300";
10*f126890aSEmmanuel Vadot
11*f126890aSEmmanuel Vadot	wm8782: wm8782 {
12*f126890aSEmmanuel Vadot		compatible = "wm8782";
13*f126890aSEmmanuel Vadot		#sound-dai-cells = <0>;
14*f126890aSEmmanuel Vadot		Vdd-supply = <&reg_3v3>;
15*f126890aSEmmanuel Vadot		Vdda-supply = <&reg_va_5v0>;
16*f126890aSEmmanuel Vadot	};
17*f126890aSEmmanuel Vadot
18*f126890aSEmmanuel Vadot	xo_11mhz: oscillator-11mhz {
19*f126890aSEmmanuel Vadot		compatible = "fixed-clock";
20*f126890aSEmmanuel Vadot		#clock-cells = <0>;
21*f126890aSEmmanuel Vadot		clock-frequency = <11289600>;
22*f126890aSEmmanuel Vadot		clock-accuracy = <100>;
23*f126890aSEmmanuel Vadot	};
24*f126890aSEmmanuel Vadot
25*f126890aSEmmanuel Vadot	xo_audio: clock-gate {
26*f126890aSEmmanuel Vadot		compatible = "gpio-gate-clock";
27*f126890aSEmmanuel Vadot		pinctrlnames = "default";
28*f126890aSEmmanuel Vadot		pinctrl-0 = <&xo_audio_pins>;
29*f126890aSEmmanuel Vadot		clocks = <&xo_11mhz>;
30*f126890aSEmmanuel Vadot		#clock-cells = <0>;
31*f126890aSEmmanuel Vadot		enable-gpios = <&gpio 111 GPIO_ACTIVE_HIGH>;
32*f126890aSEmmanuel Vadot	};
33*f126890aSEmmanuel Vadot
34*f126890aSEmmanuel Vadot	reg_va_30v0: regulator-va-30v0 {
35*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
36*f126890aSEmmanuel Vadot		regulator-name = "va-30v0-fixed-supply";
37*f126890aSEmmanuel Vadot		regulator-min-microvolt = <30000000>;
38*f126890aSEmmanuel Vadot		regulator-max-microvolt = <30000000>;
39*f126890aSEmmanuel Vadot	};
40*f126890aSEmmanuel Vadot
41*f126890aSEmmanuel Vadot	sound {
42*f126890aSEmmanuel Vadot		compatible = "simple-audio-card";
43*f126890aSEmmanuel Vadot		simple-audio-card,name = "Raumfeld Speaker";
44*f126890aSEmmanuel Vadot		#address-cells = <1>;
45*f126890aSEmmanuel Vadot		#size-cells = <0>;
46*f126890aSEmmanuel Vadot
47*f126890aSEmmanuel Vadot		simple-audio-card,dai-link@0 {
48*f126890aSEmmanuel Vadot			reg = <0>;
49*f126890aSEmmanuel Vadot			format = "i2s";
50*f126890aSEmmanuel Vadot			bitclock-master = <&dailink_master_analog_out>;
51*f126890aSEmmanuel Vadot			frame-master = <&dailink_master_analog_out>;
52*f126890aSEmmanuel Vadot			mclk-fs = <256>;
53*f126890aSEmmanuel Vadot
54*f126890aSEmmanuel Vadot			dailink_master_analog_out: cpu {
55*f126890aSEmmanuel Vadot				sound-dai = <&ssp_dai0>;
56*f126890aSEmmanuel Vadot			};
57*f126890aSEmmanuel Vadot
58*f126890aSEmmanuel Vadot			codec {
59*f126890aSEmmanuel Vadot				sound-dai = <&sta320>;
60*f126890aSEmmanuel Vadot			};
61*f126890aSEmmanuel Vadot		};
62*f126890aSEmmanuel Vadot
63*f126890aSEmmanuel Vadot		simple-audio-card,dai-link@1 {
64*f126890aSEmmanuel Vadot			reg = <1>;
65*f126890aSEmmanuel Vadot			format = "i2s";
66*f126890aSEmmanuel Vadot			bitclock-master = <&dailink_master_analog_in>;
67*f126890aSEmmanuel Vadot			frame-master = <&dailink_master_analog_in>;
68*f126890aSEmmanuel Vadot			mclk-fs = <256>;
69*f126890aSEmmanuel Vadot
70*f126890aSEmmanuel Vadot			dailink_master_analog_in: cpu {
71*f126890aSEmmanuel Vadot				sound-dai = <&ssp_dai0>;
72*f126890aSEmmanuel Vadot			};
73*f126890aSEmmanuel Vadot
74*f126890aSEmmanuel Vadot			codec {
75*f126890aSEmmanuel Vadot				sound-dai = <&wm8782>;
76*f126890aSEmmanuel Vadot			};
77*f126890aSEmmanuel Vadot		};
78*f126890aSEmmanuel Vadot	};
79*f126890aSEmmanuel Vadot};
80*f126890aSEmmanuel Vadot
81*f126890aSEmmanuel Vadot&ssp_dai0 {
82*f126890aSEmmanuel Vadot	clocks = <&xo_audio>;
83*f126890aSEmmanuel Vadot};
84*f126890aSEmmanuel Vadot
85*f126890aSEmmanuel Vadot&spi {
86*f126890aSEmmanuel Vadot	dac@2 {
87*f126890aSEmmanuel Vadot		compatible = "ti,dac7512";
88*f126890aSEmmanuel Vadot		reg = <2>;
89*f126890aSEmmanuel Vadot		spi-max-frequency = <1000000>;
90*f126890aSEmmanuel Vadot		vcc-supply = <&reg_3v3>;
91*f126890aSEmmanuel Vadot	};
92*f126890aSEmmanuel Vadot};
93*f126890aSEmmanuel Vadot
94*f126890aSEmmanuel Vadot&rotary {
95*f126890aSEmmanuel Vadot	status = "okay";
96*f126890aSEmmanuel Vadot};
97*f126890aSEmmanuel Vadot
98*f126890aSEmmanuel Vadot&pxai2c1 {
99*f126890aSEmmanuel Vadot	sta320: codec@1a {
100*f126890aSEmmanuel Vadot		compatible = "st,sta32x";
101*f126890aSEmmanuel Vadot		reg = <0x1a>;
102*f126890aSEmmanuel Vadot		pinctrl-names = "default";
103*f126890aSEmmanuel Vadot		pinctrl-0 = <&sta320_pins>;
104*f126890aSEmmanuel Vadot		clocks = <&xo_audio>;
105*f126890aSEmmanuel Vadot		clock-names = "xti";
106*f126890aSEmmanuel Vadot		reset-gpios = <&gpio 120 GPIO_ACTIVE_HIGH>;
107*f126890aSEmmanuel Vadot		Vdda-supply = <&reg_3v3>;
108*f126890aSEmmanuel Vadot		Vdd3-supply = <&reg_3v3>;
109*f126890aSEmmanuel Vadot		Vcc-supply = <&reg_va_30v0>;
110*f126890aSEmmanuel Vadot		#sound-dai-cells = <0>;
111*f126890aSEmmanuel Vadot		st,thermal-warning-adjustment;
112*f126890aSEmmanuel Vadot		st,thermal-warning-recovery;
113*f126890aSEmmanuel Vadot		st,fault-detect-recovery;
114*f126890aSEmmanuel Vadot		st,drop-compensation-ns = <80>;
115*f126890aSEmmanuel Vadot		st,max-power-use-mpcc;
116*f126890aSEmmanuel Vadot		st,invalid-input-detect-mute;
117*f126890aSEmmanuel Vadot		/* 2 (half-bridge) and 1 (full-bridge) on-board power */
118*f126890aSEmmanuel Vadot		st,output-conf = /bits/ 8 <0x1>;
119*f126890aSEmmanuel Vadot		st,ch1-output-mapping = /bits/ 8 <0>;
120*f126890aSEmmanuel Vadot		st,ch2-output-mapping = /bits/ 8 <1>;
121*f126890aSEmmanuel Vadot		st,ch3-output-mapping = /bits/ 8 <2>;
122*f126890aSEmmanuel Vadot		st,needs_esd_watchdog;
123*f126890aSEmmanuel Vadot	};
124*f126890aSEmmanuel Vadot};
125*f126890aSEmmanuel Vadot
126*f126890aSEmmanuel Vadot&pinctrl {
127*f126890aSEmmanuel Vadot	xo_audio_pins: xo-audio-pins {
128*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
129*f126890aSEmmanuel Vadot			MFP_PIN_PXA300(111) MFP_AF0	/* ENABLE */
130*f126890aSEmmanuel Vadot		>;
131*f126890aSEmmanuel Vadot		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_LOW);
132*f126890aSEmmanuel Vadot	};
133*f126890aSEmmanuel Vadot
134*f126890aSEmmanuel Vadot	sta320_pins: sta320-pins {
135*f126890aSEmmanuel Vadot		pinctrl-single,pins = <
136*f126890aSEmmanuel Vadot			MFP_PIN_PXA300(120) MFP_AF0	/* CODEC_RESET	*/
137*f126890aSEmmanuel Vadot		>;
138*f126890aSEmmanuel Vadot		pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_FLOAT);
139*f126890aSEmmanuel Vadot	};
140*f126890aSEmmanuel Vadot};
141