Linux Audio

Check our new training course

Loading...
v4.17
  1// SPDX-License-Identifier: GPL-2.0
  2/*
  3 * TOPEET's Exynos4412 based itop board device tree source
  4 *
  5 * Copyright (c) 2016 SUMOMO Computer Association
  6 *			https://www.sumomo.mobi
  7 *			Randy Li <ayaka@soulik.info>
  8 *
  9 * Device tree source file for TOPEET iTop Exynos 4412 core board
 10 * which is based on Samsung's Exynos4412 SoC.
 
 
 
 
 11 */
 12
 13/dts-v1/;
 14#include <dt-bindings/pwm/pwm.h>
 15#include <dt-bindings/sound/samsung-i2s.h>
 16#include "exynos4412-itop-scp-core.dtsi"
 17
 18/ {
 19	model = "TOPEET iTop 4412 Elite board based on Exynos4412";
 20	compatible = "topeet,itop4412-elite", "samsung,exynos4412", "samsung,exynos4";
 21
 22	chosen {
 23		bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootdelay=1 rootwait";
 24		stdout-path = "serial2:115200n8";
 25	};
 26
 27	leds {
 28		compatible = "gpio-leds";
 29
 30		led2 {
 31			label = "red:system";
 32			gpios = <&gpx1 0 GPIO_ACTIVE_HIGH>;
 33			default-state = "off";
 34			linux,default-trigger = "heartbeat";
 35		};
 36
 37		led3 {
 38			label = "red:user";
 39			gpios = <&gpk1 1 GPIO_ACTIVE_HIGH>;
 40			default-state = "off";
 41		};
 42	};
 43
 44	gpio-keys {
 45		compatible = "gpio-keys";
 46
 47		home {
 48			label = "GPIO Key Home";
 49			linux,code = <KEY_HOME>;
 50			gpios = <&gpx1 1 GPIO_ACTIVE_LOW>;
 51		};
 52
 53		back {
 54			label = "GPIO Key Back";
 55			linux,code = <KEY_BACK>;
 56			gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
 57		};
 58
 59		sleep {
 60			label = "GPIO Key Sleep";
 61			linux,code = <KEY_POWER>;
 62			gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
 63		};
 64
 65		vol-up {
 66			label = "GPIO Key Vol+";
 67			linux,code = <KEY_UP>;
 68			gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
 69		};
 70
 71		vol-down {
 72			label = "GPIO Key Vol-";
 73			linux,code = <KEY_DOWN>;
 74			gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
 75		};
 76	};
 77
 78	sound {
 79		compatible = "simple-audio-card";
 80		simple-audio-card,name = "wm-sound";
 81
 
 
 
 
 
 
 
 
 
 
 
 82		simple-audio-card,format = "i2s";
 83		simple-audio-card,bitclock-master = <&link0_codec>;
 84		simple-audio-card,frame-master = <&link0_codec>;
 85
 86		simple-audio-card,widgets =
 87			"Microphone", "Mic Jack",
 88			"Line", "Line In",
 89			"Line", "Line Out",
 90			"Speaker", "Speaker",
 91			"Headphone", "Headphone Jack";
 92		simple-audio-card,routing =
 93			"Headphone Jack", "HP_L",
 94			"Headphone Jack", "HP_R",
 95			"Speaker", "SPK_LP",
 96			"Speaker", "SPK_LN",
 97			"Speaker", "SPK_RP",
 98			"Speaker", "SPK_RN",
 99			"LINPUT1", "Mic Jack",
100			"LINPUT3", "Mic Jack",
101			"RINPUT1", "Mic Jack",
102			"RINPUT2", "Mic Jack";
103
104		simple-audio-card,cpu {
105			sound-dai = <&i2s0 0>;
106		};
107
108		link0_codec: simple-audio-card,codec {
109			sound-dai = <&codec>;
110			clocks = <&i2s0 CLK_I2S_CDCLK>;
111			system-clock-frequency = <11289600>;
112		};
113	};
114
115	beep {
116		compatible = "pwm-beeper";
117		pwms = <&pwm 0 4000000 PWM_POLARITY_INVERTED>;
118	};
 
 
 
 
 
 
 
 
119};
120
121&adc {
122	vdd-supply = <&ldo3_reg>;
123	status = "okay";
124};
125
126&camera {
127	pinctrl-0 = <&cam_port_a_clk_active>;
128	pinctrl-names = "default";
129	status = "okay";
130	assigned-clocks = <&clock CLK_MOUT_CAM0>;
131	assigned-clock-parents = <&clock CLK_XUSBXTI>;
132};
133
134&clock_audss {
135	assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
136			<&clock_audss EXYNOS_MOUT_I2S>,
137			<&clock_audss EXYNOS_DOUT_SRP>,
138			<&clock_audss EXYNOS_DOUT_AUD_BUS>;
139	assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
140			<&clock_audss EXYNOS_MOUT_AUDSS>;
141	assigned-clock-rates = <0>, <0>, <112896000>, <11289600>;
142};
143
144&ehci {
145	status = "okay";
146	/* In order to reset USB ethernet */
147	samsung,vbus-gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>;
148
149	port@0 {
150		status = "okay";
151	};
152
153	port@2 {
154		status = "okay";
155	};
156};
157
158&exynos_usbphy {
159	status = "okay";
160};
161
162&fimc_0 {
163	status = "okay";
164	assigned-clocks = <&clock CLK_MOUT_FIMC0>,
165			<&clock CLK_SCLK_FIMC0>;
166	assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
167	assigned-clock-rates = <0>, <176000000>;
168};
169
170&hsotg {
171	dr_mode = "peripheral";
172	status = "okay";
173};
174
175&i2c_4 {
176	samsung,i2c-sda-delay = <100>;
177	samsung,i2c-slave-addr = <0x10>;
178	samsung,i2c-max-bus-freq = <100000>;
179	pinctrl-0 = <&i2c4_bus>;
180	pinctrl-names = "default";
181	status = "okay";
182
183	codec: wm8960@1a {
184		compatible = "wlf,wm8960";
185		reg = <0x1a>;
186		clocks = <&pmu_system_controller 0>;
187		clock-names = "MCLK1";
188		wlf,shared-lrclk;
189		#sound-dai-cells = <0>;
190	};
191};
192
193&i2s0 {
194	pinctrl-0 = <&i2s0_bus>;
195	pinctrl-names = "default";
196	status = "okay";
 
 
 
 
197};
198
199&pinctrl_1 {
200	ether-reset {
201		samsung,pins = "gpc0-1";
202		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
203		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
204		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
205	};
206};
207
208&pwm {
209	status = "okay";
210	pinctrl-0 = <&pwm0_out>;
211	pinctrl-names = "default";
212	samsung,pwm-outputs = <0>;
213};
214
215&sdhci_2 {
216	bus-width = <4>;
217	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
218	pinctrl-names = "default";
219	cd-gpio = <&gpx0 7 GPIO_ACTIVE_LOW>;
220	cap-sd-highspeed;
221	vmmc-supply = <&ldo23_reg>;
222	vqmmc-supply = <&ldo17_reg>;
223	status = "okay";
224};
225
226&serial_1 {
227	status = "okay";
228};
229
230&serial_2 {
231	status = "okay";
232};
v4.10.11
 
  1/*
  2 * TOPEET's Exynos4412 based itop board device tree source
  3 *
  4 * Copyright (c) 2016 SUMOMO Computer Association
  5 *			https://www.sumomo.mobi
  6 *			Randy Li <ayaka@soulik.info>
  7 *
  8 * Device tree source file for TOPEET iTop Exynos 4412 core board
  9 * which is based on Samsung's Exynos4412 SoC.
 10 *
 11 * This program is free software; you can redistribute it and/or modify
 12 * it under the terms of the GNU General Public License version 2 as
 13 * published by the Free Software Foundation.
 14 */
 15
 16/dts-v1/;
 17#include <dt-bindings/pwm/pwm.h>
 18#include <dt-bindings/sound/samsung-i2s.h>
 19#include "exynos4412-itop-scp-core.dtsi"
 20
 21/ {
 22	model = "TOPEET iTop 4412 Elite board based on Exynos4412";
 23	compatible = "topeet,itop4412-elite", "samsung,exynos4412", "samsung,exynos4";
 24
 25	chosen {
 26		bootargs = "root=/dev/mmcblk0p2 rw rootfstype=ext4 rootdelay=1 rootwait";
 27		stdout-path = "serial2:115200n8";
 28	};
 29
 30	leds {
 31		compatible = "gpio-leds";
 32
 33		led2 {
 34			label = "red:system";
 35			gpios = <&gpx1 0 GPIO_ACTIVE_HIGH>;
 36			default-state = "off";
 37			linux,default-trigger = "heartbeat";
 38		};
 39
 40		led3 {
 41			label = "red:user";
 42			gpios = <&gpk1 1 GPIO_ACTIVE_HIGH>;
 43			default-state = "off";
 44		};
 45	};
 46
 47	gpio-keys {
 48		compatible = "gpio-keys";
 49
 50		home {
 51			label = "GPIO Key Home";
 52			linux,code = <KEY_HOME>;
 53			gpios = <&gpx1 1 GPIO_ACTIVE_LOW>;
 54		};
 55
 56		back {
 57			label = "GPIO Key Back";
 58			linux,code = <KEY_BACK>;
 59			gpios = <&gpx1 2 GPIO_ACTIVE_LOW>;
 60		};
 61
 62		sleep {
 63			label = "GPIO Key Sleep";
 64			linux,code = <KEY_POWER>;
 65			gpios = <&gpx3 3 GPIO_ACTIVE_LOW>;
 66		};
 67
 68		vol-up {
 69			label = "GPIO Key Vol+";
 70			linux,code = <KEY_UP>;
 71			gpios = <&gpx2 1 GPIO_ACTIVE_LOW>;
 72		};
 73
 74		vol-down {
 75			label = "GPIO Key Vol-";
 76			linux,code = <KEY_DOWN>;
 77			gpios = <&gpx2 0 GPIO_ACTIVE_LOW>;
 78		};
 79	};
 80
 81	sound {
 82		compatible = "simple-audio-card";
 83		simple-audio-card,name = "wm-sound";
 84
 85		assigned-clocks = <&clock_audss EXYNOS_MOUT_AUDSS>,
 86				<&clock_audss EXYNOS_MOUT_I2S>,
 87				<&clock_audss EXYNOS_DOUT_SRP>,
 88				<&clock_audss EXYNOS_DOUT_AUD_BUS>;
 89		assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
 90				<&clock_audss EXYNOS_MOUT_AUDSS>;
 91		assigned-clock-rates = <0>,
 92				<0>,
 93				<112896000>,
 94				<11289600>;
 95
 96		simple-audio-card,format = "i2s";
 97		simple-audio-card,bitclock-master = <&link0_codec>;
 98		simple-audio-card,frame-master = <&link0_codec>;
 99
100		simple-audio-card,widgets =
101			"Microphone", "Mic Jack",
102			"Line", "Line In",
103			"Line", "Line Out",
104			"Speaker", "Speaker",
105			"Headphone", "Headphone Jack";
106		simple-audio-card,routing =
107			"Headphone Jack", "HP_L",
108			"Headphone Jack", "HP_R",
109			"Speaker", "SPK_LP",
110			"Speaker", "SPK_LN",
111			"Speaker", "SPK_RP",
112			"Speaker", "SPK_RN",
113			"LINPUT1", "Mic Jack",
114			"LINPUT3", "Mic Jack",
115			"RINPUT1", "Mic Jack",
116			"RINPUT2", "Mic Jack";
117
118		simple-audio-card,cpu {
119			sound-dai = <&i2s0 0>;
120		};
121
122		link0_codec: simple-audio-card,codec {
123			sound-dai = <&codec>;
124			clocks = <&i2s0 CLK_I2S_CDCLK>;
125			system-clock-frequency = <11289600>;
126		};
127	};
128
129	beep {
130		compatible = "pwm-beeper";
131		pwms = <&pwm 0 4000000 PWM_POLARITY_INVERTED>;
132	};
133
134	camera: camera {
135		pinctrl-0 = <&cam_port_a_clk_active>;
136		pinctrl-names = "default";
137		status = "okay";
138		assigned-clocks = <&clock CLK_MOUT_CAM0>;
139		assigned-clock-parents = <&clock CLK_XUSBXTI>;
140	};
141};
142
143&adc {
144	vdd-supply = <&ldo3_reg>;
145	status = "okay";
146};
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148&ehci {
149	status = "okay";
150	/* In order to reset USB ethernet */
151	samsung,vbus-gpio = <&gpc0 1 GPIO_ACTIVE_HIGH>;
152
153	port@0 {
154		status = "okay";
155	};
156
157	port@2 {
158		status = "okay";
159	};
160};
161
162&exynos_usbphy {
163	status = "okay";
164};
165
166&fimc_0 {
167	status = "okay";
168	assigned-clocks = <&clock CLK_MOUT_FIMC0>,
169			<&clock CLK_SCLK_FIMC0>;
170	assigned-clock-parents = <&clock CLK_MOUT_MPLL_USER_T>;
171	assigned-clock-rates = <0>, <176000000>;
172};
173
174&hsotg {
175	dr_mode = "peripheral";
176	status = "okay";
177};
178
179&i2c_4 {
180	samsung,i2c-sda-delay = <100>;
181	samsung,i2c-slave-addr = <0x10>;
182	samsung,i2c-max-bus-freq = <100000>;
183	pinctrl-0 = <&i2c4_bus>;
184	pinctrl-names = "default";
185	status = "okay";
186
187	codec: wm8960@1a {
188		compatible = "wlf,wm8960";
189		reg = <0x1a>;
190		clocks = <&pmu_system_controller 0>;
191		clock-names = "MCLK1";
192		wlf,shared-lrclk;
193		#sound-dai-cells = <0>;
194	};
195};
196
197&i2s0 {
198	pinctrl-0 = <&i2s0_bus>;
199	pinctrl-names = "default";
200	status = "okay";
201	clocks = <&clock_audss EXYNOS_I2S_BUS>,
202		 <&clock_audss EXYNOS_DOUT_AUD_BUS>,
203		 <&clock_audss EXYNOS_SCLK_I2S>;
204	clock-names = "iis", "i2s_opclk0", "i2s_opclk1";
205};
206
207&pinctrl_1 {
208	ether-reset {
209		samsung,pins = "gpc0-1";
210		samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
211		samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
212		samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
213	};
214};
215
216&pwm {
217	status = "okay";
218	pinctrl-0 = <&pwm0_out>;
219	pinctrl-names = "default";
220	samsung,pwm-outputs = <0>;
221};
222
223&sdhci_2 {
224	bus-width = <4>;
225	pinctrl-0 = <&sd2_clk &sd2_cmd &sd2_bus4>;
226	pinctrl-names = "default";
227	cd-gpio = <&gpx0 7 GPIO_ACTIVE_LOW>;
228	cap-sd-highspeed;
229	vmmc-supply = <&ldo23_reg>;
230	vqmmc-supply = <&ldo17_reg>;
231	status = "okay";
232};
233
234&serial_1 {
235	status = "okay";
236};
237
238&serial_2 {
239	status = "okay";
240};