1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2023 Neil Armstrong <neil.armstrong@linaro.org>
8 #include "meson-g12b-bananapi-cm4.dtsi"
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/leds/common.h>
11 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
14 compatible = "bananapi,bpi-cm4io", "bananapi,bpi-cm4", "amlogic,a311d", "amlogic,g12b";
15 model = "BananaPi BPI-CM4IO Baseboard with BPI-CM4 Module";
24 compatible = "adc-keys";
25 io-channels = <&saradc 2>;
26 io-channel-names = "buttons";
27 keyup-threshold-microvolt = <1710000>;
31 linux,code = <KEY_FN>;
32 press-threshold-microvolt = <10000>;
36 hdmi_connector: hdmi-connector {
37 compatible = "hdmi-connector";
41 hdmi_connector_in: endpoint {
42 remote-endpoint = <&hdmi_tx_tmds_out>;
48 compatible = "gpio-leds";
51 color = <LED_COLOR_ID_BLUE>;
52 function = LED_FUNCTION_STATUS;
53 gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
54 linux,default-trigger = "heartbeat";
58 color = <LED_COLOR_ID_GREEN>;
59 function = LED_FUNCTION_STATUS;
60 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
65 compatible = "amlogic,axg-sound-card";
67 audio-aux-devs = <&tdmout_b>;
68 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
69 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
70 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
71 "TDM_B Playback", "TDMOUT_B OUT";
73 assigned-clocks = <&clkc CLKID_MPLL2>,
76 assigned-clock-parents = <0>, <0>, <0>;
77 assigned-clock-rates = <294912000>,
82 sound-dai = <&frddr_a>;
86 sound-dai = <&frddr_b>;
90 sound-dai = <&frddr_c>;
93 /* 8ch hdmi interface */
95 sound-dai = <&tdmif_b>;
97 dai-tdm-slot-tx-mask-0 = <1 1>;
98 dai-tdm-slot-tx-mask-1 = <1 1>;
99 dai-tdm-slot-tx-mask-2 = <1 1>;
100 dai-tdm-slot-tx-mask-3 = <1 1>;
104 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
110 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
113 sound-dai = <&hdmi_tx>;
132 hdmi_tx_tmds_out: endpoint {
133 remote-endpoint = <&hdmi_connector_in>;
142 /* DSI port for touchscreen */
147 /* miniPCIe port with USB + SIM slot */
160 /* Peripheral Only USB-C port */
162 dr_mode = "peripheral";