blob: 586034316ec3a667ebef928a7165aee8ff3d805c [file] [log] [blame]
Christian Hewittcd9e6962023-03-23 14:31:31 +00001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 BayLibre SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
5 */
6
7/dts-v1/;
8
9#include "meson-sm1-bananapi.dtsi"
10#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
11
12/ {
13 compatible = "bananapi,bpi-m2-pro", "amlogic,sm1";
14 model = "Banana Pi BPI-M2-PRO";
15
16 sound {
17 compatible = "amlogic,axg-sound-card";
18 model = "BPI-M2-PRO";
19 audio-aux-devs = <&tdmout_b>;
20 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
21 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
22 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
23 "TDM_B Playback", "TDMOUT_B OUT";
24
25 assigned-clocks = <&clkc CLKID_MPLL2>,
26 <&clkc CLKID_MPLL0>,
27 <&clkc CLKID_MPLL1>;
28 assigned-clock-parents = <0>, <0>, <0>;
29 assigned-clock-rates = <294912000>,
30 <270950400>,
31 <393216000>;
32
33 dai-link-0 {
34 sound-dai = <&frddr_a>;
35 };
36
37 dai-link-1 {
38 sound-dai = <&frddr_b>;
39 };
40
41 dai-link-2 {
42 sound-dai = <&frddr_c>;
43 };
44
45 /* 8ch hdmi interface */
46 dai-link-3 {
47 sound-dai = <&tdmif_b>;
48 dai-format = "i2s";
49 dai-tdm-slot-tx-mask-0 = <1 1>;
50 dai-tdm-slot-tx-mask-1 = <1 1>;
51 dai-tdm-slot-tx-mask-2 = <1 1>;
52 dai-tdm-slot-tx-mask-3 = <1 1>;
53 mclk-fs = <256>;
54
55 codec {
56 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
57 };
58 };
59
60 /* hdmi glue */
61 dai-link-4 {
62 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
63
64 codec {
65 sound-dai = <&hdmi_tx>;
66 };
67 };
68 };
69};
70
71&clkc_audio {
72 status = "okay";
73};
74
75&frddr_a {
76 status = "okay";
77};
78
79&frddr_b {
80 status = "okay";
81};
82
83&frddr_c {
84 status = "okay";
85};
86
87&tdmif_b {
88 status = "okay";
89};
90
91&tdmout_b {
92 status = "okay";
93};
94
95&tohdmitx {
96 status = "okay";
97};