xref: /freebsd/sys/contrib/device-tree/src/arm64/amlogic/meson-sm1-bananapi-m5.dts (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
15956d97fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
25956d97fSEmmanuel Vadot/*
35956d97fSEmmanuel Vadot * Copyright (c) 2021 BayLibre SAS
45956d97fSEmmanuel Vadot * Author: Neil Armstrong <narmstrong@baylibre.com>
55956d97fSEmmanuel Vadot */
65956d97fSEmmanuel Vadot
75956d97fSEmmanuel Vadot/dts-v1/;
85956d97fSEmmanuel Vadot
9*cb7aa33aSEmmanuel Vadot#include "meson-sm1-bananapi.dtsi"
105956d97fSEmmanuel Vadot#include <dt-bindings/sound/meson-g12a-toacodec.h>
115956d97fSEmmanuel Vadot#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
125956d97fSEmmanuel Vadot
135956d97fSEmmanuel Vadot/ {
145956d97fSEmmanuel Vadot	compatible = "bananapi,bpi-m5", "amlogic,sm1";
155956d97fSEmmanuel Vadot	model = "Banana Pi BPI-M5";
165956d97fSEmmanuel Vadot
175956d97fSEmmanuel Vadot	/* TOFIX: handle CVBS_DET on SARADC channel 0 */
185956d97fSEmmanuel Vadot	cvbs-connector {
195956d97fSEmmanuel Vadot		compatible = "composite-video-connector";
205956d97fSEmmanuel Vadot
215956d97fSEmmanuel Vadot		port {
225956d97fSEmmanuel Vadot			cvbs_connector_in: endpoint {
235956d97fSEmmanuel Vadot				remote-endpoint = <&cvbs_vdac_out>;
245956d97fSEmmanuel Vadot			};
255956d97fSEmmanuel Vadot		};
265956d97fSEmmanuel Vadot	};
275956d97fSEmmanuel Vadot
285956d97fSEmmanuel Vadot	sound {
295956d97fSEmmanuel Vadot		compatible = "amlogic,axg-sound-card";
305956d97fSEmmanuel Vadot		model = "BPI-M5";
315956d97fSEmmanuel Vadot		audio-widgets = "Line", "Lineout";
325956d97fSEmmanuel Vadot		audio-aux-devs = <&tdmout_b>, <&tdmout_c>,
335956d97fSEmmanuel Vadot				 <&tdmin_a>, <&tdmin_b>, <&tdmin_c>;
345956d97fSEmmanuel Vadot		audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
355956d97fSEmmanuel Vadot				"TDMOUT_B IN 1", "FRDDR_B OUT 1",
365956d97fSEmmanuel Vadot				"TDMOUT_B IN 2", "FRDDR_C OUT 1",
375956d97fSEmmanuel Vadot				"TDM_B Playback", "TDMOUT_B OUT",
385956d97fSEmmanuel Vadot				"TDMOUT_C IN 0", "FRDDR_A OUT 2",
395956d97fSEmmanuel Vadot				"TDMOUT_C IN 1", "FRDDR_B OUT 2",
405956d97fSEmmanuel Vadot				"TDMOUT_C IN 2", "FRDDR_C OUT 2",
415956d97fSEmmanuel Vadot				"TDM_C Playback", "TDMOUT_C OUT",
425956d97fSEmmanuel Vadot				"TDMIN_A IN 4", "TDM_B Loopback",
435956d97fSEmmanuel Vadot				"TDMIN_B IN 4", "TDM_B Loopback",
445956d97fSEmmanuel Vadot				"TDMIN_C IN 4", "TDM_B Loopback",
455956d97fSEmmanuel Vadot				"TDMIN_A IN 5", "TDM_C Loopback",
465956d97fSEmmanuel Vadot				"TDMIN_B IN 5", "TDM_C Loopback",
475956d97fSEmmanuel Vadot				"TDMIN_C IN 5", "TDM_C Loopback",
485956d97fSEmmanuel Vadot				"TODDR_A IN 0", "TDMIN_A OUT",
495956d97fSEmmanuel Vadot				"TODDR_B IN 0", "TDMIN_A OUT",
505956d97fSEmmanuel Vadot				"TODDR_C IN 0", "TDMIN_A OUT",
515956d97fSEmmanuel Vadot				"TODDR_A IN 1", "TDMIN_B OUT",
525956d97fSEmmanuel Vadot				"TODDR_B IN 1", "TDMIN_B OUT",
535956d97fSEmmanuel Vadot				"TODDR_C IN 1", "TDMIN_B OUT",
545956d97fSEmmanuel Vadot				"TODDR_A IN 2", "TDMIN_C OUT",
555956d97fSEmmanuel Vadot				"TODDR_B IN 2", "TDMIN_C OUT",
565956d97fSEmmanuel Vadot				"TODDR_C IN 2", "TDMIN_C OUT",
575956d97fSEmmanuel Vadot				"Lineout", "ACODEC LOLP",
585956d97fSEmmanuel Vadot				"Lineout", "ACODEC LORP";
595956d97fSEmmanuel Vadot
605956d97fSEmmanuel Vadot		assigned-clocks = <&clkc CLKID_MPLL2>,
615956d97fSEmmanuel Vadot				  <&clkc CLKID_MPLL0>,
625956d97fSEmmanuel Vadot				  <&clkc CLKID_MPLL1>;
635956d97fSEmmanuel Vadot		assigned-clock-parents = <0>, <0>, <0>;
645956d97fSEmmanuel Vadot		assigned-clock-rates = <294912000>,
655956d97fSEmmanuel Vadot				       <270950400>,
665956d97fSEmmanuel Vadot				       <393216000>;
675956d97fSEmmanuel Vadot
685956d97fSEmmanuel Vadot		dai-link-0 {
695956d97fSEmmanuel Vadot			sound-dai = <&frddr_a>;
705956d97fSEmmanuel Vadot		};
715956d97fSEmmanuel Vadot
725956d97fSEmmanuel Vadot		dai-link-1 {
735956d97fSEmmanuel Vadot			sound-dai = <&frddr_b>;
745956d97fSEmmanuel Vadot		};
755956d97fSEmmanuel Vadot
765956d97fSEmmanuel Vadot		dai-link-2 {
775956d97fSEmmanuel Vadot			sound-dai = <&frddr_c>;
785956d97fSEmmanuel Vadot		};
795956d97fSEmmanuel Vadot
805956d97fSEmmanuel Vadot		dai-link-3 {
815956d97fSEmmanuel Vadot			sound-dai = <&toddr_a>;
825956d97fSEmmanuel Vadot		};
835956d97fSEmmanuel Vadot
845956d97fSEmmanuel Vadot		dai-link-4 {
855956d97fSEmmanuel Vadot			sound-dai = <&toddr_b>;
865956d97fSEmmanuel Vadot		};
875956d97fSEmmanuel Vadot
885956d97fSEmmanuel Vadot		dai-link-5 {
895956d97fSEmmanuel Vadot			sound-dai = <&toddr_c>;
905956d97fSEmmanuel Vadot		};
915956d97fSEmmanuel Vadot
925956d97fSEmmanuel Vadot		/* 8ch hdmi interface */
935956d97fSEmmanuel Vadot		dai-link-6 {
945956d97fSEmmanuel Vadot			sound-dai = <&tdmif_b>;
955956d97fSEmmanuel Vadot			dai-format = "i2s";
965956d97fSEmmanuel Vadot			dai-tdm-slot-tx-mask-0 = <1 1>;
975956d97fSEmmanuel Vadot			dai-tdm-slot-tx-mask-1 = <1 1>;
985956d97fSEmmanuel Vadot			dai-tdm-slot-tx-mask-2 = <1 1>;
995956d97fSEmmanuel Vadot			dai-tdm-slot-tx-mask-3 = <1 1>;
1005956d97fSEmmanuel Vadot			mclk-fs = <256>;
1015956d97fSEmmanuel Vadot
1025956d97fSEmmanuel Vadot			codec-0 {
1035956d97fSEmmanuel Vadot				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
1045956d97fSEmmanuel Vadot			};
1055956d97fSEmmanuel Vadot
1065956d97fSEmmanuel Vadot			codec-1 {
1075956d97fSEmmanuel Vadot				sound-dai = <&toacodec TOACODEC_IN_B>;
1085956d97fSEmmanuel Vadot			};
1095956d97fSEmmanuel Vadot		};
1105956d97fSEmmanuel Vadot
1115956d97fSEmmanuel Vadot		/* i2s jack output interface */
1125956d97fSEmmanuel Vadot		dai-link-7 {
1135956d97fSEmmanuel Vadot			sound-dai = <&tdmif_c>;
1145956d97fSEmmanuel Vadot			dai-format = "i2s";
1155956d97fSEmmanuel Vadot			dai-tdm-slot-tx-mask-0 = <1 1>;
1165956d97fSEmmanuel Vadot			mclk-fs = <256>;
1175956d97fSEmmanuel Vadot
1185956d97fSEmmanuel Vadot			codec-0 {
1195956d97fSEmmanuel Vadot				sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
1205956d97fSEmmanuel Vadot			};
1215956d97fSEmmanuel Vadot
1225956d97fSEmmanuel Vadot			codec-1 {
1235956d97fSEmmanuel Vadot				sound-dai = <&toacodec TOACODEC_IN_C>;
1245956d97fSEmmanuel Vadot			};
1255956d97fSEmmanuel Vadot		};
1265956d97fSEmmanuel Vadot
1275956d97fSEmmanuel Vadot		/* hdmi glue */
1285956d97fSEmmanuel Vadot		dai-link-8 {
1295956d97fSEmmanuel Vadot			sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
1305956d97fSEmmanuel Vadot
1315956d97fSEmmanuel Vadot			codec {
1325956d97fSEmmanuel Vadot				sound-dai = <&hdmi_tx>;
1335956d97fSEmmanuel Vadot			};
1345956d97fSEmmanuel Vadot		};
1355956d97fSEmmanuel Vadot
1365956d97fSEmmanuel Vadot		/* acodec glue */
1375956d97fSEmmanuel Vadot		dai-link-9 {
1385956d97fSEmmanuel Vadot			sound-dai = <&toacodec TOACODEC_OUT>;
1395956d97fSEmmanuel Vadot
1405956d97fSEmmanuel Vadot			codec {
1415956d97fSEmmanuel Vadot				sound-dai = <&acodec>;
1425956d97fSEmmanuel Vadot			};
1435956d97fSEmmanuel Vadot		};
1445956d97fSEmmanuel Vadot	};
1455956d97fSEmmanuel Vadot};
1465956d97fSEmmanuel Vadot
1475956d97fSEmmanuel Vadot&acodec {
1485956d97fSEmmanuel Vadot	AVDD-supply = <&vddao_1v8>;
1495956d97fSEmmanuel Vadot	status = "okay";
1505956d97fSEmmanuel Vadot};
1515956d97fSEmmanuel Vadot
1525956d97fSEmmanuel Vadot
1535956d97fSEmmanuel Vadot&clkc_audio {
1545956d97fSEmmanuel Vadot	status = "okay";
1555956d97fSEmmanuel Vadot};
1565956d97fSEmmanuel Vadot
1575956d97fSEmmanuel Vadot&cvbs_vdac_port {
1585956d97fSEmmanuel Vadot	cvbs_vdac_out: endpoint {
1595956d97fSEmmanuel Vadot		remote-endpoint = <&cvbs_connector_in>;
1605956d97fSEmmanuel Vadot	};
1615956d97fSEmmanuel Vadot};
1625956d97fSEmmanuel Vadot
1635956d97fSEmmanuel Vadot&frddr_a {
1645956d97fSEmmanuel Vadot	status = "okay";
1655956d97fSEmmanuel Vadot};
1665956d97fSEmmanuel Vadot
1675956d97fSEmmanuel Vadot&frddr_b {
1685956d97fSEmmanuel Vadot	status = "okay";
1695956d97fSEmmanuel Vadot};
1705956d97fSEmmanuel Vadot
1715956d97fSEmmanuel Vadot&frddr_c {
1725956d97fSEmmanuel Vadot	status = "okay";
1735956d97fSEmmanuel Vadot};
1745956d97fSEmmanuel Vadot
1755956d97fSEmmanuel Vadot&tdmif_b {
1765956d97fSEmmanuel Vadot	status = "okay";
1775956d97fSEmmanuel Vadot};
1785956d97fSEmmanuel Vadot
1795956d97fSEmmanuel Vadot&tdmif_c {
1805956d97fSEmmanuel Vadot	status = "okay";
1815956d97fSEmmanuel Vadot};
1825956d97fSEmmanuel Vadot
1835956d97fSEmmanuel Vadot&tdmin_a {
1845956d97fSEmmanuel Vadot	status = "okay";
1855956d97fSEmmanuel Vadot};
1865956d97fSEmmanuel Vadot
1875956d97fSEmmanuel Vadot&tdmin_b {
1885956d97fSEmmanuel Vadot	status = "okay";
1895956d97fSEmmanuel Vadot};
1905956d97fSEmmanuel Vadot
1915956d97fSEmmanuel Vadot&tdmin_c {
1925956d97fSEmmanuel Vadot	status = "okay";
1935956d97fSEmmanuel Vadot};
1945956d97fSEmmanuel Vadot
1955956d97fSEmmanuel Vadot&tdmout_b {
1965956d97fSEmmanuel Vadot	status = "okay";
1975956d97fSEmmanuel Vadot};
1985956d97fSEmmanuel Vadot
1995956d97fSEmmanuel Vadot&tdmout_c {
2005956d97fSEmmanuel Vadot	status = "okay";
2015956d97fSEmmanuel Vadot};
2025956d97fSEmmanuel Vadot
2035956d97fSEmmanuel Vadot&toacodec {
2045956d97fSEmmanuel Vadot	status = "okay";
2055956d97fSEmmanuel Vadot};
2065956d97fSEmmanuel Vadot
2075956d97fSEmmanuel Vadot&tohdmitx {
2085956d97fSEmmanuel Vadot	status = "okay";
2095956d97fSEmmanuel Vadot};
2105956d97fSEmmanuel Vadot
2115956d97fSEmmanuel Vadot&toddr_a {
2125956d97fSEmmanuel Vadot	status = "okay";
2135956d97fSEmmanuel Vadot};
2145956d97fSEmmanuel Vadot
2155956d97fSEmmanuel Vadot&toddr_b {
2165956d97fSEmmanuel Vadot	status = "okay";
2175956d97fSEmmanuel Vadot};
2185956d97fSEmmanuel Vadot
2195956d97fSEmmanuel Vadot&toddr_c {
2205956d97fSEmmanuel Vadot	status = "okay";
2215956d97fSEmmanuel Vadot};
222