Alexander Stein | dfcd1b6 | 2021-12-01 08:29:43 +0100 | [diff] [blame] | 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 | beeper { |
| 12 | compatible = "pwm-beeper"; |
| 13 | pwms = <&pwm4 0 250000 0>; |
| 14 | beeper-hz = <4000>; |
| 15 | amp-supply = <®_vcc_3v3>; |
| 16 | }; |
| 17 | |
| 18 | chosen { |
| 19 | // bootargs = "console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200"; |
| 20 | stdout-path = &uart3; |
| 21 | }; |
| 22 | |
| 23 | gpio-keys { |
| 24 | compatible = "gpio-keys"; |
| 25 | pinctrl-names = "default"; |
| 26 | pinctrl-0 = <&pinctrl_gpiobutton>; |
| 27 | autorepeat; |
| 28 | |
| 29 | switch1 { |
| 30 | label = "switch1"; |
| 31 | linux,code = <BTN_0>; |
| 32 | gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; |
| 33 | wakeup-source; |
| 34 | }; |
| 35 | |
| 36 | btn2: switch2 { |
| 37 | label = "switch2"; |
| 38 | linux,code = <BTN_1>; |
| 39 | gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; |
| 40 | wakeup-source; |
| 41 | }; |
| 42 | |
| 43 | switch3 { |
| 44 | label = "switch3"; |
| 45 | linux,code = <BTN_2>; |
| 46 | gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; |
| 47 | wakeup-source; |
| 48 | }; |
| 49 | }; |
| 50 | |
| 51 | gpio_leds: gpio-leds { |
| 52 | compatible = "gpio-leds"; |
| 53 | pinctrl-names = "default"; |
| 54 | pinctrl-0 = <&pinctrl_gpioled>; |
| 55 | |
| 56 | led1 { |
| 57 | label = "led1"; |
| 58 | gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; |
| 59 | linux,default-trigger = "default-on"; |
| 60 | }; |
| 61 | |
| 62 | led2: led2 { |
| 63 | label = "led2"; |
| 64 | gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; |
| 65 | linux,default-trigger = "heartbeat"; |
| 66 | }; |
| 67 | }; |
| 68 | |
| 69 | reg_hub_vbus: regulator-hub-vbus { |
| 70 | compatible = "regulator-fixed"; |
| 71 | regulator-name = "MBA8MX_HUB_VBUS"; |
| 72 | regulator-min-microvolt = <5000000>; |
| 73 | regulator-max-microvolt = <5000000>; |
| 74 | }; |
| 75 | |
| 76 | reg_sn65dsi83_1v8: regulator-sn65dsi83-1v8 { |
| 77 | compatible = "regulator-fixed"; |
| 78 | regulator-name = "SN65DSI83_1V8"; |
| 79 | regulator-min-microvolt = <1800000>; |
| 80 | regulator-max-microvolt = <1800000>; |
| 81 | gpio = <&expander0 5 GPIO_ACTIVE_HIGH>; |
| 82 | enable-active-high; |
| 83 | }; |
| 84 | |
| 85 | reg_vcc_3v3: regulator-3v3 { |
| 86 | compatible = "regulator-fixed"; |
| 87 | regulator-name = "MBA8MX_3V3"; |
| 88 | regulator-min-microvolt = <3300000>; |
| 89 | regulator-max-microvolt = <3300000>; |
| 90 | }; |
| 91 | |
| 92 | sound { |
| 93 | compatible = "fsl,imx-audio-tlv320aic32x4"; |
| 94 | model = "tqm-tlv320aic32"; |
| 95 | ssi-controller = <&sai3>; |
| 96 | audio-codec = <&tlv320aic3x04>; |
| 97 | }; |
| 98 | }; |
| 99 | |
| 100 | &ecspi1 { |
| 101 | pinctrl-names = "default"; |
| 102 | pinctrl-0 = <&pinctrl_ecspi1>; |
| 103 | cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>; |
| 104 | status = "okay"; |
| 105 | }; |
| 106 | |
| 107 | &ecspi2 { |
| 108 | pinctrl-names = "default"; |
| 109 | pinctrl-0 = <&pinctrl_ecspi2>; |
| 110 | cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; |
| 111 | status = "okay"; |
| 112 | }; |
| 113 | |
| 114 | &fec1 { |
| 115 | pinctrl-names = "default"; |
| 116 | pinctrl-0 = <&pinctrl_fec1>; |
| 117 | phy-mode = "rgmii-id"; |
| 118 | phy-handle = <ðphy0>; |
| 119 | phy-supply = <®_vcc_3v3>; |
| 120 | fsl,magic-packet; |
| 121 | mac-address = [ 00 00 00 00 00 00 ]; |
| 122 | status = "okay"; |
| 123 | |
| 124 | mdio { |
| 125 | #address-cells = <1>; |
| 126 | #size-cells = <0>; |
| 127 | |
| 128 | ethphy0: ethernet-phy@e { |
| 129 | compatible = "ethernet-phy-ieee802.3-c22"; |
| 130 | reg = <0xe>; |
| 131 | ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>; |
| 132 | ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>; |
| 133 | ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; |
| 134 | ti,dp83867-rxctrl-strap-quirk; |
| 135 | ti,clk-output-sel = <DP83867_CLK_O_SEL_OFF>; |
| 136 | enet-phy-lane-no-swap; |
| 137 | reset-gpios = <&expander2 7 GPIO_ACTIVE_LOW>; |
| 138 | reset-assert-us = <500000>; |
| 139 | reset-deassert-us = <500>; |
| 140 | }; |
| 141 | }; |
| 142 | }; |
| 143 | |
| 144 | &i2c1 { |
| 145 | expander0: gpio@23 { |
| 146 | compatible = "nxp,pca9555"; |
| 147 | reg = <0x23>; |
| 148 | gpio-controller; |
| 149 | #gpio-cells = <2>; |
| 150 | vcc-supply = <®_vcc_3v3>; |
| 151 | interrupt-parent = <&gpio1>; |
| 152 | interrupts = <9 IRQ_TYPE_EDGE_FALLING>; |
| 153 | interrupt-controller; |
| 154 | #interrupt-cells = <2>; |
| 155 | |
| 156 | sd-mux-oe-hog { |
| 157 | gpio-hog; |
| 158 | gpios = <8 0>; |
| 159 | output-low; |
| 160 | line-name = "SD_MUX_EN#"; |
| 161 | }; |
| 162 | |
| 163 | boot-cfg-oe-hog { |
| 164 | gpio-hog; |
| 165 | gpios = <12 0>; |
| 166 | output-high; |
| 167 | line-name = "BOOT_CFG_OE#"; |
| 168 | }; |
| 169 | |
| 170 | rst-usb-hub-hog { |
| 171 | gpio-hog; |
| 172 | gpios = <13 0>; |
| 173 | output-high; |
| 174 | line-name = "RST_USB_HUB#"; |
| 175 | }; |
| 176 | }; |
| 177 | |
| 178 | expander1: gpio@24 { |
| 179 | compatible = "nxp,pca9555"; |
| 180 | reg = <0x24>; |
| 181 | gpio-controller; |
| 182 | #gpio-cells = <2>; |
| 183 | vcc-supply = <®_vcc_3v3>; |
| 184 | }; |
| 185 | }; |
| 186 | |
| 187 | &i2c2 { |
| 188 | clock-frequency = <100000>; |
| 189 | pinctrl-names = "default", "gpio"; |
| 190 | pinctrl-0 = <&pinctrl_i2c2>; |
| 191 | pinctrl-1 = <&pinctrl_i2c2_gpio>; |
| 192 | scl-gpios = <&gpio5 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 193 | sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 194 | status = "okay"; |
| 195 | |
| 196 | tlv320aic3x04: audio-codec@18 { |
| 197 | compatible = "ti,tlv320aic32x4"; |
| 198 | reg = <0x18>; |
| 199 | reset-gpios = <&expander2 0 GPIO_ACTIVE_LOW>; |
| 200 | iov-supply = <®_vcc_3v3>; |
| 201 | ldoin-supply = <®_vcc_3v3>; |
| 202 | }; |
| 203 | |
| 204 | sensor1: sensor@1f { |
| 205 | compatible = "nxp,se97", "jedec,jc-42.4-temp"; |
| 206 | reg = <0x1f>; |
| 207 | }; |
| 208 | |
| 209 | eeprom3: eeprom@57 { |
| 210 | compatible = "nxp,se97b", "atmel,24c02"; |
| 211 | reg = <0x57>; |
| 212 | pagesize = <16>; |
| 213 | }; |
| 214 | }; |
| 215 | |
| 216 | &i2c3 { |
| 217 | clock-frequency = <100000>; |
| 218 | pinctrl-names = "default", "gpio"; |
| 219 | pinctrl-0 = <&pinctrl_i2c3>; |
| 220 | pinctrl-1 = <&pinctrl_i2c3_gpio>; |
| 221 | scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 222 | sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; |
| 223 | status = "okay"; |
| 224 | }; |
| 225 | |
| 226 | &pwm3 { |
| 227 | pinctrl-names = "default"; |
| 228 | pinctrl-0 = <&pinctrl_pwm3>; |
| 229 | status = "okay"; |
| 230 | }; |
| 231 | |
| 232 | &pwm4 { |
| 233 | pinctrl-names = "default"; |
| 234 | pinctrl-0 = <&pinctrl_pwm4>; |
| 235 | status = "okay"; |
| 236 | }; |
| 237 | |
| 238 | &sai3 { |
| 239 | pinctrl-names = "default"; |
| 240 | pinctrl-0 = <&pinctrl_sai3>; |
| 241 | #sound-dai-cells = <0>; |
| 242 | assigned-clock-rates = <49152000>; |
| 243 | status = "okay"; |
| 244 | }; |
| 245 | |
| 246 | &snvs_pwrkey { |
| 247 | status = "okay"; |
| 248 | }; |
| 249 | |
| 250 | &uart1 { |
| 251 | pinctrl-names = "default"; |
| 252 | pinctrl-0 = <&pinctrl_uart1>; |
| 253 | status = "okay"; |
| 254 | }; |
| 255 | |
| 256 | &uart2 { |
| 257 | pinctrl-names = "default"; |
| 258 | pinctrl-0 = <&pinctrl_uart2>; |
| 259 | status = "okay"; |
| 260 | }; |
| 261 | |
| 262 | /* console */ |
| 263 | &uart3 { |
| 264 | pinctrl-names = "default"; |
| 265 | pinctrl-0 = <&pinctrl_uart3>; |
| 266 | status = "okay"; |
| 267 | }; |
| 268 | |
| 269 | /* UART4 is assigned to Cortex-M4 */ |
| 270 | &usdhc2 { |
| 271 | pinctrl-names = "default", "state_100mhz", "state_200mhz"; |
| 272 | pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>; |
| 273 | pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>; |
| 274 | pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>; |
| 275 | bus-width = <4>; |
| 276 | cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; |
| 277 | disable-wp; |
| 278 | no-mmc; |
| 279 | no-sdio; |
| 280 | vmmc-supply = <®_usdhc2_vmmc>; |
| 281 | status = "okay"; |
| 282 | }; |