1// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) 2/* 3 * Copyright 2020-2021 TQ-Systems GmbH 4 */ 5 6#include <dt-bindings/net/ti-dp83867.h> 7 8/* TQ-Systems GmbH MBa8Mx baseboard */ 9 10/ { 11 backlight_lvds: backlight { 12 compatible = "pwm-backlight"; 13 pwms = <&pwm3 0 5000000 0>; 14 brightness-levels = <0 4 8 16 32 64 128 255>; 15 default-brightness-level = <7>; 16 power-supply = <®_12v>; 17 enable-gpios = <&expander2 2 GPIO_ACTIVE_HIGH>; 18 status = "disabled"; 19 }; 20 21 beeper { 22 compatible = "pwm-beeper"; 23 pwms = <&pwm4 0 250000 0>; 24 beeper-hz = <4000>; 25 amp-supply = <®_vcc_3v3>; 26 }; 27 28 chosen { 29 stdout-path = &uart3; 30 }; 31 32 gpio-keys { 33 compatible = "gpio-keys"; 34 pinctrl-names = "default"; 35 pinctrl-0 = <&pinctrl_gpiobutton>; 36 autorepeat; 37 38 switch-1 { 39 label = "switch1"; 40 linux,code = <BTN_0>; 41 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; 42 wakeup-source; 43 }; 44 45 btn2: switch-2 { 46 label = "switch2"; 47 linux,code = <BTN_1>; 48 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; 49 wakeup-source; 50 }; 51 52 switch-3 { 53 label = "switch3"; 54 linux,code = <BTN_2>; 55 gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; 56 wakeup-source; 57 }; 58 }; 59 60 gpio_leds: gpio-leds { 61 compatible = "gpio-leds"; 62 pinctrl-names = "default"; 63 pinctrl-0 = <&pinctrl_gpioled>; 64 65 led1 { 66 label = "led1"; 67 gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; 68 linux,default-trigger = "default-on"; 69 }; 70 71 led2: led2 { 72 label = "led2"; 73 gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; 74 linux,default-trigger = "heartbeat"; 75 }; 76 }; 77 78 gpio_delays: gpio-delays { 79 compatible = "gpio-delay"; 80 #gpio-cells = <3>; 81 gpio-controller; 82 gpios = <&expander0 6 GPIO_ACTIVE_HIGH>; 83 gpio-line-names = "LVDS_BRIDGE_EN_1V8"; 84 }; 85 86 panel: panel-lvds { 87 /* 88 * Display is not fixed, so compatible has to be added from 89 * DT overlay 90 */ 91 backlight = <&backlight_lvds>; 92 power-supply = <®_vcc_3v3>; 93 status = "disabled"; 94 95 port { 96 panel_in_lvds: endpoint { 97 data-lanes = <1 2 3 4>; 98 remote-endpoint = <&lvds_bridge_out>; 99 }; 100 }; 101 }; 102 103 pcie0_refclk: pcie0-refclk { 104 compatible = "fixed-clock"; 105 #clock-cells = <0>; 106 clock-frequency = <100000000>; 107 }; 108 109 reg_12v: regulator-12v { 110 compatible = "regulator-fixed"; 111 regulator-name = "MBA8MX_12V"; 112 regulator-min-microvolt = <12000000>; 113 regulator-max-microvolt = <12000000>; 114 regulator-always-on; 115 }; 116 117 reg_hub_vbus: regulator-hub-vbus { 118 compatible = "regulator-fixed"; 119 regulator-name = "MBA8MX_HUB_VBUS"; 120 regulator-min-microvolt = <5000000>; 121 regulator-max-microvolt = <5000000>; 122 }; 123 124 reg_sn65dsi83_1v8: regulator-sn65dsi83-1v8 { 125 compatible = "regulator-fixed"; 126 regulator-name = "SN65DSI83_1V8"; 127 regulator-min-microvolt = <1800000>; 128 regulator-max-microvolt = <1800000>; 129 gpio = <&expander0 5 GPIO_ACTIVE_HIGH>; 130 enable-active-high; 131 }; 132 133 reg_vcc_3v3: regulator-3v3 { 134 compatible = "regulator-fixed"; 135 regulator-name = "MBA8MX_3V3"; 136 regulator-min-microvolt = <3300000>; 137 regulator-max-microvolt = <3300000>; 138 }; 139 140 sound { 141 compatible = "fsl,imx-audio-tlv320aic32x4"; 142 model = "imx-audio-tlv320aic32x4"; 143 ssi-controller = <&sai3>; 144 audio-codec = <&tlv320aic3x04>; 145 }; 146}; 147 148&ecspi1 { 149 pinctrl-names = "default"; 150 pinctrl-0 = <&pinctrl_ecspi1>; 151 cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>; 152 status = "okay"; 153}; 154 155&ecspi2 { 156 pinctrl-names = "default"; 157 pinctrl-0 = <&pinctrl_ecspi2>; 158 cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; 159 status = "okay"; 160}; 161 162&fec1 { 163 pinctrl-names = "default"; 164 pinctrl-0 = <&pinctrl_fec1>; 165 phy-mode = "rgmii-id"; 166 phy-handle = <ðphy0>; 167 phy-supply = <®_vcc_3v3>; 168 fsl,magic-packet; 169 mac-address = [ 00 00 00 00 00 00 ]; 170 status = "okay"; 171 172 mdio { 173 #address-cells = <1>; 174 #size-cells = <0>; 175 176 ethphy0: ethernet-phy@e { 177 compatible = "ethernet-phy-ieee802.3-c22"; 178 reg = <0xe>; 179 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>; 180 ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>; 181 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; 182 ti,dp83867-rxctrl-strap-quirk; 183 ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>; 184 enet-phy-lane-no-swap; 185 reset-gpios = <&expander2 7 GPIO_ACTIVE_LOW>; 186 reset-assert-us = <500000>; 187 reset-deassert-us = <500>; 188 }; 189 }; 190}; 191 192&i2c1 { 193 expander0: gpio@23 { 194 compatible = "nxp,pca9555"; 195 reg = <0x23>; 196 gpio-controller; 197 #gpio-cells = <2>; 198 vcc-supply = <®_vcc_3v3>; 199 interrupt-parent = <&gpio1>; 200 interrupts = <9 IRQ_TYPE_EDGE_FALLING>; 201 interrupt-controller; 202 #interrupt-cells = <2>; 203 gpio-line-names = "", "", "", "", 204 "", "", "LVDS_BRIDGE_EN", "", 205 "", "", "", "", 206 "", "", "", ""; 207 208 sd-mux-oe-hog { 209 gpio-hog; 210 gpios = <8 0>; 211 output-low; 212 line-name = "SD_MUX_EN#"; 213 }; 214 215 boot-cfg-oe-hog { 216 gpio-hog; 217 gpios = <12 0>; 218 output-high; 219 line-name = "BOOT_CFG_OE#"; 220 }; 221 222 rst-usb-hub-hog { 223 gpio-hog; 224 gpios = <13 0>; 225 output-high; 226 line-name = "RST_USB_HUB#"; 227 }; 228 }; 229 230 expander1: gpio@24 { 231 compatible = "nxp,pca9555"; 232 reg = <0x24>; 233 gpio-controller; 234 #gpio-cells = <2>; 235 vcc-supply = <®_vcc_3v3>; 236 }; 237}; 238 239&i2c2 { 240 clock-frequency = <100000>; 241 pinctrl-names = "default", "gpio"; 242 pinctrl-0 = <&pinctrl_i2c2>; 243 pinctrl-1 = <&pinctrl_i2c2_gpio>; 244 scl-gpios = <&gpio5 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 245 sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 246 status = "okay"; 247 248 tlv320aic3x04: audio-codec@18 { 249 compatible = "ti,tlv320aic32x4"; 250 reg = <0x18>; 251 reset-gpios = <&expander2 0 GPIO_ACTIVE_LOW>; 252 iov-supply = <®_vcc_3v3>; 253 ldoin-supply = <®_vcc_3v3>; 254 }; 255 256 sensor1: temperator-sensor@1f { 257 compatible = "nxp,se97b", "jedec,jc-42.4-temp"; 258 reg = <0x1f>; 259 }; 260 261 eeprom3: eeprom@57 { 262 compatible = "nxp,se97b", "atmel,24c02"; 263 reg = <0x57>; 264 pagesize = <16>; 265 vcc-supply = <®_vcc_3v3>; 266 }; 267}; 268 269&i2c3 { 270 clock-frequency = <100000>; 271 pinctrl-names = "default", "gpio"; 272 pinctrl-0 = <&pinctrl_i2c3>; 273 pinctrl-1 = <&pinctrl_i2c3_gpio>; 274 scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 275 sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 276 status = "okay"; 277 278 dsi_lvds_bridge: bridge@2d { 279 compatible = "ti,sn65dsi84"; 280 reg = <0x2d>; 281 enable-gpios = <&gpio_delays 0 130000 0>; 282 vcc-supply = <®_sn65dsi83_1v8>; 283 status = "disabled"; 284 285 ports { 286 #address-cells = <1>; 287 #size-cells = <0>; 288 289 port@0 { 290 reg = <0>; 291 292 lvds_bridge_in: endpoint { 293 data-lanes = <1 2 3 4>; 294 remote-endpoint = <&mipi_dsi_out>; 295 }; 296 }; 297 298 port@2 { 299 reg = <2>; 300 301 lvds_bridge_out: endpoint { 302 remote-endpoint = <&panel_in_lvds>; 303 }; 304 }; 305 }; 306 }; 307}; 308 309&mipi_dsi { 310 samsung,burst-clock-frequency = <891000000>; 311 samsung,esc-clock-frequency = <20000000>; 312 313 ports { 314 port@1 { 315 reg = <1>; 316 317 mipi_dsi_out: endpoint { 318 data-lanes = <1 2 3 4>; 319 remote-endpoint = <&lvds_bridge_in>; 320 }; 321 }; 322 }; 323}; 324 325&pwm3 { 326 pinctrl-names = "default"; 327 pinctrl-0 = <&pinctrl_pwm3>; 328 status = "okay"; 329}; 330 331&pwm4 { 332 pinctrl-names = "default"; 333 pinctrl-0 = <&pinctrl_pwm4>; 334 status = "okay"; 335}; 336 337&sai3 { 338 pinctrl-names = "default"; 339 pinctrl-0 = <&pinctrl_sai3>; 340 #sound-dai-cells = <0>; 341 assigned-clock-rates = <49152000>; 342 status = "okay"; 343}; 344 345&snvs_pwrkey { 346 status = "okay"; 347}; 348 349&uart1 { 350 pinctrl-names = "default"; 351 pinctrl-0 = <&pinctrl_uart1>; 352 status = "okay"; 353}; 354 355&uart2 { 356 pinctrl-names = "default"; 357 pinctrl-0 = <&pinctrl_uart2>; 358 status = "okay"; 359}; 360 361/* console */ 362&uart3 { 363 pinctrl-names = "default"; 364 pinctrl-0 = <&pinctrl_uart3>; 365 status = "okay"; 366}; 367 368&usdhc2 { 369 pinctrl-names = "default", "state_100mhz", "state_200mhz"; 370 pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; 371 pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>; 372 pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>; 373 bus-width = <4>; 374 cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; 375 disable-wp; 376 no-mmc; 377 no-sdio; 378 vmmc-supply = <®_usdhc2_vmmc>; 379 status = "okay"; 380}; 381