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			"IN12", "Headphone Jack",
26			"Speakers", "SPKL",
27			"Speakers", "SPKR",
28			"I2S Playback", "Mixer DAI TX",
29			"HiFi Playback", "Mixer DAI TX",
30			"Mixer DAI RX", "HiFi Capture";
31
32		cpu {
33			sound-dai = <&i2s0 0>, <&i2s0 1>;
34		};
35		codec {
36			sound-dai = <&hdmi>, <&max98090>;
37		};
38	};
39};
40
41&hsi2c_5 {
42	status = "okay";
43	max98090: audio-codec@10 {
44		compatible = "maxim,max98090";
45		reg = <0x10>;
46		interrupt-parent = <&gpx3>;
47		interrupts = <2 IRQ_TYPE_NONE>;
48		clocks = <&i2s0 CLK_I2S_CDCLK>;
49		clock-names = "mclk";
50		#sound-dai-cells = <0>;
51	};
52};
53
54&i2s0 {
55	status = "okay";
56	assigned-clocks = <&clock CLK_MOUT_EPLL>,
57			<&clock CLK_MOUT_MAU_EPLL>,
58			<&clock CLK_MOUT_USER_MAU_EPLL>,
59			<&clock_audss EXYNOS_MOUT_AUDSS>,
60			<&clock_audss EXYNOS_MOUT_I2S>,
61			<&i2s0 CLK_I2S_RCLK_SRC>,
62			<&clock_audss EXYNOS_DOUT_SRP>,
63			<&clock_audss EXYNOS_DOUT_AUD_BUS>,
64			<&clock_audss EXYNOS_DOUT_I2S>;
65
66	assigned-clock-parents = <&clock CLK_FOUT_EPLL>,
67			<&clock CLK_MOUT_EPLL>,
68			<&clock CLK_MOUT_MAU_EPLL>,
69			<&clock CLK_MAU_EPLL>,
70			<&clock_audss EXYNOS_MOUT_AUDSS>,
71			<&clock_audss EXYNOS_SCLK_I2S>;
72
73	assigned-clock-rates = <0>,
74			<0>,
75			<0>,
76			<0>,
77			<0>,
78			<0>,
79			<196608001>,
80			<(196608002 / 2)>,
81			<196608000>;
82
83};
84