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