1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2 /* 2 /* 3 * Copyright (c) 2023 Neil Armstrong <neil.arms 3 * Copyright (c) 2023 Neil Armstrong <neil.armstrong@linaro.org> 4 * Copyright 2023 MNT Research GmbH 4 * Copyright 2023 MNT Research GmbH 5 */ 5 */ 6 6 7 /dts-v1/; 7 /dts-v1/; 8 8 9 #include "meson-g12b-bananapi-cm4.dtsi" 9 #include "meson-g12b-bananapi-cm4.dtsi" 10 #include <dt-bindings/input/input.h> 10 #include <dt-bindings/input/input.h> 11 #include <dt-bindings/leds/common.h> 11 #include <dt-bindings/leds/common.h> 12 #include <dt-bindings/sound/meson-g12a-tohdmit 12 #include <dt-bindings/sound/meson-g12a-tohdmitx.h> 13 13 14 / { 14 / { 15 model = "MNT Reform 2 with BPI-CM4 Mod 15 model = "MNT Reform 2 with BPI-CM4 Module"; 16 compatible = "mntre,reform2-cm4", "ban 16 compatible = "mntre,reform2-cm4", "bananapi,bpi-cm4", "amlogic,a311d", "amlogic,g12b"; 17 chassis-type = "laptop"; 17 chassis-type = "laptop"; 18 18 19 aliases { 19 aliases { 20 ethernet0 = ðmac; 20 ethernet0 = ðmac; 21 i2c0 = &i2c1; 21 i2c0 = &i2c1; 22 i2c1 = &i2c3; 22 i2c1 = &i2c3; 23 }; 23 }; 24 24 25 hdmi_connector: hdmi-connector { 25 hdmi_connector: hdmi-connector { 26 compatible = "hdmi-connector"; 26 compatible = "hdmi-connector"; 27 type = "a"; 27 type = "a"; 28 28 29 port { 29 port { 30 hdmi_connector_in: end 30 hdmi_connector_in: endpoint { 31 remote-endpoin 31 remote-endpoint = <&hdmi_tx_tmds_out>; 32 }; 32 }; 33 }; 33 }; 34 }; 34 }; 35 35 36 leds { 36 leds { 37 compatible = "gpio-leds"; 37 compatible = "gpio-leds"; 38 38 39 led-blue { 39 led-blue { 40 color = <LED_COLOR_ID_ 40 color = <LED_COLOR_ID_BLUE>; 41 function = LED_FUNCTIO 41 function = LED_FUNCTION_STATUS; 42 gpios = <&gpio_ao GPIO 42 gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>; 43 linux,default-trigger 43 linux,default-trigger = "heartbeat"; 44 }; 44 }; 45 45 46 led-green { 46 led-green { 47 color = <LED_COLOR_ID_ 47 color = <LED_COLOR_ID_GREEN>; 48 function = LED_FUNCTIO 48 function = LED_FUNCTION_STATUS; 49 gpios = <&gpio_ao GPIO 49 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; 50 }; 50 }; 51 }; 51 }; 52 52 53 sound { 53 sound { 54 compatible = "amlogic,axg-soun 54 compatible = "amlogic,axg-sound-card"; 55 model = "MNT-REFORM2-BPI-CM4"; 55 model = "MNT-REFORM2-BPI-CM4"; 56 audio-widgets = "Headphone", " 56 audio-widgets = "Headphone", "Headphone Jack", 57 "Speaker", "Ex 57 "Speaker", "External Speaker", 58 "Microphone", 58 "Microphone", "Mic Jack"; 59 audio-aux-devs = <&tdmout_a>, 59 audio-aux-devs = <&tdmout_a>, <&tdmout_b>, <&tdmin_b>; 60 audio-routing = "TDMOUT_A IN 0 60 audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", 61 "TDMOUT_A IN 1 61 "TDMOUT_A IN 1", "FRDDR_B OUT 0", 62 "TDMOUT_A IN 2 62 "TDMOUT_A IN 2", "FRDDR_C OUT 0", 63 "TDM_A Playbac 63 "TDM_A Playback", "TDMOUT_A OUT", 64 "TDMOUT_B IN 0 64 "TDMOUT_B IN 0", "FRDDR_A OUT 1", 65 "TDMOUT_B IN 1 65 "TDMOUT_B IN 1", "FRDDR_B OUT 1", 66 "TDMOUT_B IN 2 66 "TDMOUT_B IN 2", "FRDDR_C OUT 1", 67 "TDM_B Playbac 67 "TDM_B Playback", "TDMOUT_B OUT", 68 "TDMIN_B IN 1" 68 "TDMIN_B IN 1", "TDM_B Capture", 69 "TDMIN_B IN 4" 69 "TDMIN_B IN 4", "TDM_B Loopback", 70 "TODDR_A IN 1" 70 "TODDR_A IN 1", "TDMIN_B OUT", 71 "TODDR_B IN 1" 71 "TODDR_B IN 1", "TDMIN_B OUT", 72 "TODDR_C IN 1" 72 "TODDR_C IN 1", "TDMIN_B OUT", 73 "Headphone Jac 73 "Headphone Jack", "HP_L", 74 "Headphone Jac 74 "Headphone Jack", "HP_R", 75 "External Spea 75 "External Speaker", "SPK_LP", 76 "External Spea 76 "External Speaker", "SPK_LN", 77 "External Spea 77 "External Speaker", "SPK_RP", 78 "External Spea 78 "External Speaker", "SPK_RN", 79 "LINPUT1", "Mi 79 "LINPUT1", "Mic Jack", 80 "Mic Jack", "M 80 "Mic Jack", "MICB"; 81 81 82 clocks = <&clkc CLKID_MPLL2>, 82 clocks = <&clkc CLKID_MPLL2>, 83 <&clkc CLKID_MPLL0>, 83 <&clkc CLKID_MPLL0>, 84 <&clkc CLKID_MPLL1>; 84 <&clkc CLKID_MPLL1>; 85 85 86 assigned-clocks = <&clkc CLKID 86 assigned-clocks = <&clkc CLKID_MPLL2>, 87 <&clkc 87 <&clkc CLKID_MPLL0>, 88 <&clkc 88 <&clkc CLKID_MPLL1>; 89 assigned-clock-parents = <0>, 89 assigned-clock-parents = <0>, <0>, <0>; 90 assigned-clock-rates = <294912 90 assigned-clock-rates = <294912000>, 91 <270950 91 <270950400>, 92 <393216 92 <393216000>; 93 93 94 dai-link-0 { 94 dai-link-0 { 95 sound-dai = <&frddr_a> 95 sound-dai = <&frddr_a>; 96 }; 96 }; 97 97 98 dai-link-1 { 98 dai-link-1 { 99 sound-dai = <&frddr_b> 99 sound-dai = <&frddr_b>; 100 }; 100 }; 101 101 102 dai-link-2 { 102 dai-link-2 { 103 sound-dai = <&frddr_c> 103 sound-dai = <&frddr_c>; 104 }; 104 }; 105 105 106 dai-link-3 { 106 dai-link-3 { 107 sound-dai = <&toddr_a> 107 sound-dai = <&toddr_a>; 108 }; 108 }; 109 109 110 dai-link-4 { 110 dai-link-4 { 111 sound-dai = <&toddr_b> 111 sound-dai = <&toddr_b>; 112 }; 112 }; 113 113 114 dai-link-5 { 114 dai-link-5 { 115 sound-dai = <&toddr_c> 115 sound-dai = <&toddr_c>; 116 }; 116 }; 117 117 118 /* 8ch hdmi interface */ 118 /* 8ch hdmi interface */ 119 dai-link-6 { 119 dai-link-6 { 120 sound-dai = <&tdmif_a> 120 sound-dai = <&tdmif_a>; 121 dai-format = "i2s"; 121 dai-format = "i2s"; 122 dai-tdm-slot-tx-mask-0 122 dai-tdm-slot-tx-mask-0 = <1 1>; 123 dai-tdm-slot-tx-mask-1 123 dai-tdm-slot-tx-mask-1 = <1 1>; 124 dai-tdm-slot-tx-mask-2 124 dai-tdm-slot-tx-mask-2 = <1 1>; 125 dai-tdm-slot-tx-mask-3 125 dai-tdm-slot-tx-mask-3 = <1 1>; 126 mclk-fs = <256>; 126 mclk-fs = <256>; 127 127 128 codec { 128 codec { 129 sound-dai = <& 129 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>; 130 }; 130 }; 131 }; 131 }; 132 132 133 /* Analog Audio */ 133 /* Analog Audio */ 134 dai-link-7 { 134 dai-link-7 { 135 sound-dai = <&tdmif_b> 135 sound-dai = <&tdmif_b>; 136 dai-format = "i2s"; 136 dai-format = "i2s"; 137 dai-tdm-slot-tx-mask-0 137 dai-tdm-slot-tx-mask-0 = <1 1>; 138 mclk-fs = <256>; 138 mclk-fs = <256>; 139 139 140 codec { 140 codec { 141 sound-dai = <& 141 sound-dai = <&wm8960>; 142 }; 142 }; 143 }; 143 }; 144 144 145 /* hdmi glue */ 145 /* hdmi glue */ 146 dai-link-8 { 146 dai-link-8 { 147 sound-dai = <&tohdmitx 147 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; 148 148 149 codec { 149 codec { 150 sound-dai = <& 150 sound-dai = <&hdmi_tx>; 151 }; 151 }; 152 }; 152 }; 153 }; 153 }; 154 154 155 reg_main_1v8: regulator-main-1v8 { 155 reg_main_1v8: regulator-main-1v8 { 156 compatible = "regulator-fixed" 156 compatible = "regulator-fixed"; 157 regulator-name = "1V8"; 157 regulator-name = "1V8"; 158 regulator-min-microvolt = <180 158 regulator-min-microvolt = <1800000>; 159 regulator-max-microvolt = <180 159 regulator-max-microvolt = <1800000>; 160 vin-supply = <®_main_3v3>; 160 vin-supply = <®_main_3v3>; 161 }; 161 }; 162 162 163 reg_main_1v2: regulator-main-1v2 { 163 reg_main_1v2: regulator-main-1v2 { 164 compatible = "regulator-fixed" 164 compatible = "regulator-fixed"; 165 regulator-name = "1V2"; 165 regulator-name = "1V2"; 166 regulator-min-microvolt = <120 166 regulator-min-microvolt = <1200000>; 167 regulator-max-microvolt = <120 167 regulator-max-microvolt = <1200000>; 168 vin-supply = <®_main_5v>; 168 vin-supply = <®_main_5v>; 169 }; 169 }; 170 170 171 reg_main_3v3: regulator-main-3v3 { 171 reg_main_3v3: regulator-main-3v3 { 172 compatible = "regulator-fixed" 172 compatible = "regulator-fixed"; 173 regulator-name = "3V3"; 173 regulator-name = "3V3"; 174 regulator-min-microvolt = <330 174 regulator-min-microvolt = <3300000>; 175 regulator-max-microvolt = <330 175 regulator-max-microvolt = <3300000>; 176 }; 176 }; 177 177 178 reg_main_5v: regulator-main-5v { 178 reg_main_5v: regulator-main-5v { 179 compatible = "regulator-fixed" 179 compatible = "regulator-fixed"; 180 regulator-name = "5V"; 180 regulator-name = "5V"; 181 regulator-min-microvolt = <500 181 regulator-min-microvolt = <5000000>; 182 regulator-max-microvolt = <500 182 regulator-max-microvolt = <5000000>; 183 }; 183 }; 184 184 185 reg_main_usb: regulator-main-usb { 185 reg_main_usb: regulator-main-usb { 186 compatible = "regulator-fixed" 186 compatible = "regulator-fixed"; 187 regulator-name = "USB_PWR"; 187 regulator-name = "USB_PWR"; 188 regulator-min-microvolt = <500 188 regulator-min-microvolt = <5000000>; 189 regulator-max-microvolt = <500 189 regulator-max-microvolt = <5000000>; 190 vin-supply = <®_main_5v>; 190 vin-supply = <®_main_5v>; 191 }; 191 }; 192 192 193 backlight: backlight { 193 backlight: backlight { 194 compatible = "pwm-backlight"; 194 compatible = "pwm-backlight"; 195 pwms = <&pwm_AO_ab 0 10000 0>; 195 pwms = <&pwm_AO_ab 0 10000 0>; 196 power-supply = <®_main_usb> 196 power-supply = <®_main_usb>; 197 enable-gpios = <&gpio 58 GPIO_ 197 enable-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>; 198 brightness-levels = <0 32 64 1 198 brightness-levels = <0 32 64 128 160 200 255>; 199 default-brightness-level = <6> 199 default-brightness-level = <6>; 200 }; 200 }; 201 201 202 panel { 202 panel { 203 compatible = "innolux,n125hce- 203 compatible = "innolux,n125hce-gn1"; 204 power-supply = <®_main_3v3> 204 power-supply = <®_main_3v3>; 205 backlight = <&backlight>; 205 backlight = <&backlight>; 206 no-hpd; 206 no-hpd; 207 207 208 port { 208 port { 209 panel_in: endpoint { 209 panel_in: endpoint { 210 remote-endpoin 210 remote-endpoint = <&edp_bridge_out>; 211 }; 211 }; 212 }; 212 }; 213 }; 213 }; 214 214 215 clock_12288: clock_12288 { 215 clock_12288: clock_12288 { 216 compatible = "fixed-clock"; 216 compatible = "fixed-clock"; 217 #clock-cells = <0>; 217 #clock-cells = <0>; 218 clock-frequency = <12288000>; 218 clock-frequency = <12288000>; 219 }; 219 }; 220 }; 220 }; 221 221 222 &mipi_analog_dphy { 222 &mipi_analog_dphy { 223 status = "okay"; 223 status = "okay"; 224 }; 224 }; 225 225 226 &mipi_dphy { 226 &mipi_dphy { 227 status = "okay"; 227 status = "okay"; 228 }; 228 }; 229 229 230 &mipi_dsi { 230 &mipi_dsi { 231 status = "okay"; 231 status = "okay"; 232 232 233 assigned-clocks = <&clkc CLKID_GP0_PLL 233 assigned-clocks = <&clkc CLKID_GP0_PLL>, 234 <&clkc CLKID_MIPI_DS 234 <&clkc CLKID_MIPI_DSI_PXCLK_SEL>, 235 <&clkc CLKID_MIPI_DS 235 <&clkc CLKID_MIPI_DSI_PXCLK>, 236 <&clkc CLKID_CTS_ENC 236 <&clkc CLKID_CTS_ENCL_SEL>, 237 <&clkc CLKID_VCLK2_S 237 <&clkc CLKID_VCLK2_SEL>; 238 assigned-clock-parents = <0>, 238 assigned-clock-parents = <0>, 239 <&clkc CLKID_ 239 <&clkc CLKID_GP0_PLL>, 240 <0>, 240 <0>, 241 <&clkc CLKID_ 241 <&clkc CLKID_VCLK2_DIV1>, 242 <&clkc CLKID_ 242 <&clkc CLKID_GP0_PLL>; 243 assigned-clock-rates = <936000000>, 243 assigned-clock-rates = <936000000>, 244 <0>, 244 <0>, 245 <936000000>, 245 <936000000>, 246 <0>, 246 <0>, 247 <0>; 247 <0>; 248 }; 248 }; 249 249 250 &mipi_dsi_panel_port { 250 &mipi_dsi_panel_port { 251 mipi_dsi_out: endpoint { 251 mipi_dsi_out: endpoint { 252 remote-endpoint = <&edp_bridge 252 remote-endpoint = <&edp_bridge_in>; 253 }; 253 }; 254 }; 254 }; 255 255 256 &cecb_AO { 256 &cecb_AO { 257 status = "okay"; 257 status = "okay"; 258 }; 258 }; 259 259 260 ðmac { 260 ðmac { 261 status = "okay"; 261 status = "okay"; 262 }; 262 }; 263 263 264 &hdmi_tx { 264 &hdmi_tx { 265 status = "okay"; 265 status = "okay"; 266 }; 266 }; 267 267 268 &hdmi_tx_tmds_port { 268 &hdmi_tx_tmds_port { 269 hdmi_tx_tmds_out: endpoint { 269 hdmi_tx_tmds_out: endpoint { 270 remote-endpoint = <&hdmi_conne 270 remote-endpoint = <&hdmi_connector_in>; 271 }; 271 }; 272 }; 272 }; 273 273 274 &pwm_AO_ab { 274 &pwm_AO_ab { 275 pinctrl-names = "default"; 275 pinctrl-names = "default"; 276 pinctrl-0 = <&pwm_ao_a_pins>; 276 pinctrl-0 = <&pwm_ao_a_pins>; 277 status = "okay"; 277 status = "okay"; 278 }; 278 }; 279 279 280 &i2c0 { 280 &i2c0 { 281 status = "okay"; 281 status = "okay"; 282 }; 282 }; 283 283 284 &i2c3 { 284 &i2c3 { 285 status = "okay"; 285 status = "okay"; 286 286 287 edp_bridge: bridge@2c { 287 edp_bridge: bridge@2c { 288 compatible = "ti,sn65dsi86"; 288 compatible = "ti,sn65dsi86"; 289 reg = <0x2c>; 289 reg = <0x2c>; 290 enable-gpios = <&gpio GPIOX_10 290 enable-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>; // PIN_24 / GPIO8 291 vccio-supply = <®_main_1v8> 291 vccio-supply = <®_main_1v8>; 292 vpll-supply = <®_main_1v8>; 292 vpll-supply = <®_main_1v8>; 293 vcca-supply = <®_main_1v2>; 293 vcca-supply = <®_main_1v2>; 294 vcc-supply = <®_main_1v2>; 294 vcc-supply = <®_main_1v2>; 295 295 296 ports { 296 ports { 297 #address-cells = <1>; 297 #address-cells = <1>; 298 #size-cells = <0>; 298 #size-cells = <0>; 299 299 300 port@0 { 300 port@0 { 301 reg = <0>; 301 reg = <0>; 302 302 303 edp_bridge_in: 303 edp_bridge_in: endpoint { 304 remote 304 remote-endpoint = <&mipi_dsi_out>; 305 }; 305 }; 306 }; 306 }; 307 307 308 port@1 { 308 port@1 { 309 reg = <1>; 309 reg = <1>; 310 310 311 edp_bridge_out 311 edp_bridge_out: endpoint { 312 remote 312 remote-endpoint = <&panel_in>; 313 }; 313 }; 314 }; 314 }; 315 }; 315 }; 316 }; 316 }; 317 }; 317 }; 318 318 319 &i2c2 { 319 &i2c2 { 320 status = "okay"; 320 status = "okay"; 321 321 322 wm8960: codec@1a { 322 wm8960: codec@1a { 323 compatible = "wlf,wm8960"; 323 compatible = "wlf,wm8960"; 324 reg = <0x1a>; 324 reg = <0x1a>; 325 clocks = <&clock_12288>; 325 clocks = <&clock_12288>; 326 clock-names = "mclk"; 326 clock-names = "mclk"; 327 #sound-dai-cells = <0>; 327 #sound-dai-cells = <0>; 328 wlf,shared-lrclk; 328 wlf,shared-lrclk; 329 }; 329 }; 330 330 331 rtc@68 { 331 rtc@68 { 332 compatible = "nxp,pcf8523"; 332 compatible = "nxp,pcf8523"; 333 reg = <0x68>; 333 reg = <0x68>; 334 }; 334 }; 335 }; 335 }; 336 336 337 &pcie { 337 &pcie { 338 status = "okay"; 338 status = "okay"; 339 }; 339 }; 340 340 341 &sd_emmc_b { 341 &sd_emmc_b { 342 status = "okay"; 342 status = "okay"; 343 }; 343 }; 344 344 345 &tdmif_a { 345 &tdmif_a { 346 status = "okay"; 346 status = "okay"; 347 }; 347 }; 348 348 349 &tdmout_a { 349 &tdmout_a { 350 status = "okay"; 350 status = "okay"; 351 }; 351 }; 352 352 353 &tdmif_b { 353 &tdmif_b { 354 pinctrl-0 = <&tdm_b_dout0_pins>, <&tdm 354 pinctrl-0 = <&tdm_b_dout0_pins>, <&tdm_b_fs_pins>, <&tdm_b_sclk_pins>, <&tdm_b_din1_pins>; 355 pinctrl-names = "default"; 355 pinctrl-names = "default"; 356 356 357 assigned-clocks = <&clkc_audio AUD_CLK 357 assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD1>, 358 <&clkc_audio AUD_CLK 358 <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD1>; 359 assigned-clock-parents = <&clkc_audio 359 assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_B_SCLK>, 360 <&clkc_audio 360 <&clkc_audio AUD_CLKID_MST_B_LRCLK>; 361 assigned-clock-rates = <0>, <0>; 361 assigned-clock-rates = <0>, <0>; 362 }; 362 }; 363 363 364 &tdmin_b { 364 &tdmin_b { 365 status = "okay"; 365 status = "okay"; 366 }; 366 }; 367 367 368 &toddr_a { 368 &toddr_a { 369 status = "okay"; 369 status = "okay"; 370 }; 370 }; 371 371 372 &toddr_b { 372 &toddr_b { 373 status = "okay"; 373 status = "okay"; 374 }; 374 }; 375 375 376 &toddr_c { 376 &toddr_c { 377 status = "okay"; 377 status = "okay"; 378 }; 378 }; 379 379 380 &tohdmitx { 380 &tohdmitx { 381 status = "okay"; 381 status = "okay"; 382 }; 382 }; 383 383 384 &usb { 384 &usb { 385 dr_mode = "host"; 385 dr_mode = "host"; 386 386 387 status = "okay"; 387 status = "okay"; 388 }; 388 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.