Linux Audio

Check our new training course

Loading...
v4.17
 1// SPDX-License-Identifier: GPL-2.0
 2/*
 3 * Hardkernel Odroid XU3 audio subsystem device tree source
 4 *
 5 * Copyright (c) 2015 Krzysztof Kozlowski
 6 * Copyright (c) 2014 Collabora Ltd.
 7 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
 8 *		http://www.samsung.com
 9 */
10
11#include <dt-bindings/sound/samsung-i2s.h>
 
 
12
13/ {
14	sound: sound {
15		compatible = "samsung,odroid-xu3-audio";
16		model = "Odroid-XU3";
17
18		samsung,audio-widgets =
 
19			"Headphone", "Headphone Jack",
20			"Speakers", "Speakers";
21		samsung,audio-routing =
22			"Headphone Jack", "HPL",
23			"Headphone Jack", "HPR",
24			"Headphone Jack", "MICBIAS",
25			"IN1", "Headphone Jack",
26			"Speakers", "SPKL",
27			"Speakers", "SPKR";
28
29		assigned-clocks = <&i2s0 CLK_I2S_RCLK_SRC>,
30				<&clock CLK_MOUT_EPLL>,
31				<&clock CLK_MOUT_MAU_EPLL>,
32				<&clock CLK_MOUT_USER_MAU_EPLL>,
33				<&clock_audss EXYNOS_MOUT_AUDSS>,
34				<&clock_audss EXYNOS_MOUT_I2S>,
35				<&clock_audss EXYNOS_DOUT_SRP>,
36				<&clock_audss EXYNOS_DOUT_AUD_BUS>,
37				<&clock_audss EXYNOS_DOUT_I2S>;
38
39		assigned-clock-parents = <&clock_audss EXYNOS_SCLK_I2S>,
40				<&clock CLK_FOUT_EPLL>,
41				<&clock CLK_MOUT_EPLL>,
42				<&clock CLK_MOUT_MAU_EPLL>,
43				<&clock CLK_MAU_EPLL>,
44				<&clock_audss EXYNOS_MOUT_AUDSS>;
45
46		assigned-clock-rates = <0>,
47				<0>,
48				<0>,
49				<0>,
50				<0>,
51				<0>,
52				<196608001>,
53				<(196608002 / 2)>,
54				<196608000>;
55
56		cpu {
57			sound-dai = <&i2s0 0>;
 
58		};
59		codec {
60			sound-dai = <&hdmi>, <&max98090>;
 
 
61		};
62	};
63};
64
65&clock_audss {
66	assigned-clocks = <&clock_audss EXYNOS_DOUT_SRP>,
67			  <&clock CLK_FOUT_EPLL>;
68	assigned-clock-rates = <(196608000 / 256)>,
69			       <196608000>;
70};
71
72&hsi2c_5 {
73	status = "okay";
74	max98090: max98090@10 {
75		compatible = "maxim,max98090";
76		reg = <0x10>;
77		interrupt-parent = <&gpx3>;
78		interrupts = <2 IRQ_TYPE_NONE>;
79		clocks = <&i2s0 CLK_I2S_CDCLK>;
80		clock-names = "mclk";
81		#sound-dai-cells = <0>;
82	};
83};
84
85&i2s0 {
86	status = "okay";
87};
v4.6
 
 1/*
 2 * Hardkernel Odroid XU3 Audio Codec device tree source
 3 *
 4 * Copyright (c) 2015 Krzysztof Kozlowski
 5 * Copyright (c) 2014 Collabora Ltd.
 6 * Copyright (c) 2013 Samsung Electronics Co., Ltd.
 7 *		http://www.samsung.com
 8 *
 9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
13
14/ {
15	sound: sound {
16		compatible = "simple-audio-card";
 
17
18		simple-audio-card,name = "Odroid-XU3";
19		simple-audio-card,widgets =
20			"Headphone", "Headphone Jack",
21			"Speakers", "Speakers";
22		simple-audio-card,routing =
23			"Headphone Jack", "HPL",
24			"Headphone Jack", "HPR",
25			"Headphone Jack", "MICBIAS",
26			"IN1", "Headphone Jack",
27			"Speakers", "SPKL",
28			"Speakers", "SPKR";
29
30		simple-audio-card,format = "i2s";
31		simple-audio-card,bitclock-master = <&link0_codec>;
32		simple-audio-card,frame-master = <&link0_codec>;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
34		simple-audio-card,cpu {
35			sound-dai = <&i2s0 0>;
36			system-clock-frequency = <19200000>;
37		};
38
39		link0_codec: simple-audio-card,codec {
40			sound-dai = <&max98090>;
41			clocks = <&i2s0 CLK_I2S_CDCLK>;
42		};
43	};
44};
45
 
 
 
 
 
 
 
46&hsi2c_5 {
47	status = "okay";
48	max98090: max98090@10 {
49		compatible = "maxim,max98090";
50		reg = <0x10>;
51		interrupt-parent = <&gpx3>;
52		interrupts = <2 0>;
53		clocks = <&i2s0 CLK_I2S_CDCLK>;
54		clock-names = "mclk";
55		#sound-dai-cells = <0>;
56	};
57};
58
59&i2s0 {
60	status = "okay";
61};