Last active
May 26, 2023 14:13
-
-
Save mntmn/cf144ea470e1293c39c1e19764f26f5f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) | |
/* | |
* Copyright (c) 2023 Neil Armstrong <neil.armstrong@linaro.org> | |
*/ | |
/dts-v1/; | |
#include "meson-g12b-bananapi-cm4.dtsi" | |
#include <dt-bindings/input/input.h> | |
#include <dt-bindings/leds/common.h> | |
#include <dt-bindings/sound/meson-g12a-tohdmitx.h> | |
/ { | |
model = "MNT Reform 2 with BPI-CM4 Module"; | |
compatible = "mntre,reform2-bpi", "bananapi,bpi-cm4io", "bananapi,bpi-cm4", "amlogic,a311d", "amlogic,g12b"; | |
chassis-type = "laptop"; | |
aliases { | |
ethernet0 = ðmac; | |
i2c0 = &i2c1; | |
i2c1 = &i2c3; | |
}; | |
hdmi_connector: hdmi-connector { | |
compatible = "hdmi-connector"; | |
type = "a"; | |
port { | |
hdmi_connector_in: endpoint { | |
remote-endpoint = <&hdmi_tx_tmds_out>; | |
}; | |
}; | |
}; | |
leds { | |
compatible = "gpio-leds"; | |
led-blue { | |
color = <LED_COLOR_ID_BLUE>; | |
function = LED_FUNCTION_STATUS; | |
gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>; | |
linux,default-trigger = "heartbeat"; | |
}; | |
led-green { | |
color = <LED_COLOR_ID_GREEN>; | |
function = LED_FUNCTION_STATUS; | |
gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; | |
}; | |
}; | |
sound { | |
compatible = "amlogic,axg-sound-card"; | |
model = "BPI-CM4IO"; | |
audio-aux-devs = <&tdmout_b>; | |
audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1", | |
"TDMOUT_B IN 1", "FRDDR_B OUT 1", | |
"TDMOUT_B IN 2", "FRDDR_C OUT 1", | |
"TDM_B Playback", "TDMOUT_B OUT"; | |
assigned-clocks = <&clkc CLKID_MPLL2>, | |
<&clkc CLKID_MPLL0>, | |
<&clkc CLKID_MPLL1>; | |
assigned-clock-parents = <0>, <0>, <0>; | |
assigned-clock-rates = <294912000>, | |
<270950400>, | |
<393216000>; | |
status = "okay"; | |
dai-link-0 { | |
sound-dai = <&frddr_a>; | |
}; | |
dai-link-1 { | |
sound-dai = <&frddr_b>; | |
}; | |
dai-link-2 { | |
sound-dai = <&frddr_c>; | |
}; | |
/* 8ch hdmi interface */ | |
dai-link-3 { | |
sound-dai = <&tdmif_b>; | |
dai-format = "i2s"; | |
dai-tdm-slot-tx-mask-0 = <1 1>; | |
dai-tdm-slot-tx-mask-1 = <1 1>; | |
dai-tdm-slot-tx-mask-2 = <1 1>; | |
dai-tdm-slot-tx-mask-3 = <1 1>; | |
mclk-fs = <256>; | |
codec { | |
sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; | |
}; | |
}; | |
/* hdmi glue */ | |
dai-link-4 { | |
sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; | |
codec { | |
sound-dai = <&hdmi_tx>; | |
}; | |
}; | |
dai-link-6 { | |
sound-dai = <&tdmif_a>; | |
dai-format = "i2s"; | |
dai-tdm-slot-tx-mask-0 = <1 1>; | |
mclk-fs = <256>; | |
codec-0 { | |
sound-dai = <&wm8960>; | |
}; | |
}; | |
}; | |
reg_main_1v8: regulator-main-1v8 { | |
compatible = "regulator-fixed"; | |
regulator-name = "1V8"; | |
regulator-min-microvolt = <1800000>; | |
regulator-max-microvolt = <1800000>; | |
vin-supply = <®_main_3v3>; | |
}; | |
reg_main_1v2: regulator-main-1v2 { | |
compatible = "regulator-fixed"; | |
regulator-name = "1V2"; | |
regulator-min-microvolt = <1200000>; | |
regulator-max-microvolt = <1200000>; | |
vin-supply = <®_main_5v>; | |
}; | |
reg_main_3v3: regulator-main-3v3 { | |
compatible = "regulator-fixed"; | |
regulator-name = "3V3"; | |
regulator-min-microvolt = <3300000>; | |
regulator-max-microvolt = <3300000>; | |
}; | |
reg_main_5v: regulator-main-5v { | |
compatible = "regulator-fixed"; | |
regulator-name = "5V"; | |
regulator-min-microvolt = <5000000>; | |
regulator-max-microvolt = <5000000>; | |
}; | |
reg_main_usb: regulator-main-usb { | |
compatible = "regulator-fixed"; | |
regulator-name = "USB_PWR"; | |
regulator-min-microvolt = <5000000>; | |
regulator-max-microvolt = <5000000>; | |
vin-supply = <®_main_5v>; | |
}; | |
backlight: backlight { | |
compatible = "pwm-backlight"; | |
//pinctrl-names = "default"; | |
//pinctrl-0 = <&pinctrl_backlight>; | |
pwms = <&pwm_AO_ab 0 10000 0>; | |
power-supply = <®_main_usb>; | |
enable-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>; // PIN_11 | |
brightness-levels = <0 32 64 128 160 200 255>; | |
default-brightness-level = <6>; | |
status = "okay"; | |
}; | |
panel { | |
compatible = "innolux,n125hce-gn1", "simple-panel"; | |
power-supply = <®_main_3v3>; | |
backlight = <&backlight>; | |
no-hpd; | |
status = "okay"; | |
port { | |
panel_in: endpoint { | |
remote-endpoint = <&edp_bridge_out>; | |
}; | |
}; | |
}; | |
clock_12288: clock_12288 { | |
compatible = "fixed-clock"; | |
#clock-cells = <0>; | |
clock-frequency = <12288000>; | |
}; | |
}; | |
&mipi_analog_dphy { | |
status = "okay"; | |
}; | |
&mipi_dphy { | |
status = "okay"; | |
}; | |
&mipi_dsi { | |
status = "okay"; | |
assigned-clocks = <&clkc CLKID_GP0_PLL>, | |
<&clkc CLKID_MIPI_DSI_PXCLK_SEL>, | |
<&clkc CLKID_MIPI_DSI_PXCLK>, | |
<&clkc CLKID_CTS_ENCL_SEL>, | |
<&clkc CLKID_VCLK2_SEL>; | |
assigned-clock-parents = <0>, | |
<&clkc CLKID_GP0_PLL>, | |
<0>, | |
<&clkc CLKID_VCLK2_DIV1>, | |
<&clkc CLKID_GP0_PLL>; | |
assigned-clock-rates = <936000000>, | |
<0>, | |
<936000000>, | |
<0>, | |
<0>; | |
}; | |
&mipi_dsi_panel_port { | |
mipi_dsi_out: endpoint { | |
remote-endpoint = <&edp_bridge_in>; | |
}; | |
}; | |
&cecb_AO { | |
status = "okay"; | |
}; | |
ðmac { | |
status = "okay"; | |
}; | |
&hdmi_tx { | |
status = "okay"; | |
}; | |
&hdmi_tx_tmds_port { | |
hdmi_tx_tmds_out: endpoint { | |
remote-endpoint = <&hdmi_connector_in>; | |
}; | |
}; | |
&pwm_AO_ab { | |
pinctrl-names = "default"; | |
pinctrl-0 = <&pwm_ao_a_pins>; | |
status = "okay"; | |
}; | |
// eDP reset: GPIOX_10, (rpi: GPIO8), PIN_24, gpioset -m wait 0 75=1 | |
// hub reset: GPIOX_8, (rpi: GPIO10), PIN_19, gpioset -m wait 0 73=1 | |
&i2c0 { | |
status = "okay"; | |
}; | |
&i2c3 { | |
status = "okay"; | |
edp_bridge: bridge@2c { | |
compatible = "ti,sn65dsi86"; | |
//pinctrl-names = "default"; | |
//pinctrl-0 = <&pinctrl_edp_bridge>; | |
reg = <0x2c>; | |
enable-gpios = <&gpio 75 GPIO_ACTIVE_HIGH>; // PIN_24 / GPIO8 | |
vccio-supply = <®_main_1v8>; | |
vpll-supply = <®_main_1v8>; | |
vcca-supply = <®_main_1v2>; | |
vcc-supply = <®_main_1v2>; | |
ports { | |
#address-cells = <1>; | |
#size-cells = <0>; | |
port@0 { | |
reg = <0>; | |
edp_bridge_in: endpoint { | |
remote-endpoint = <&mipi_dsi_out>; | |
}; | |
}; | |
port@1 { | |
reg = <1>; | |
edp_bridge_out: endpoint { | |
remote-endpoint = <&panel_in>; | |
}; | |
}; | |
}; | |
}; | |
}; | |
&i2c2 { | |
status = "okay"; | |
wm8960: codec@1a { | |
compatible = "wlf,wm8960"; | |
reg = <0x1a>; | |
clocks = <&clock_12288>; | |
clock-names = "mclk"; | |
#sound-dai-cells = <0>; | |
wlf,shared-lrclk; | |
}; | |
rtc@68 { | |
compatible = "nxp,pcf8523"; | |
reg = <0x68>; | |
}; | |
}; | |
&pcie { | |
status = "okay"; | |
}; | |
&sd_emmc_b { | |
status = "okay"; | |
}; | |
&tohdmitx { | |
status = "okay"; | |
}; | |
&usb { | |
dr_mode = "host"; | |
status = "okay"; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment