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