Neil Armstrong | e9a12e1 | 2019-08-20 16:40:52 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2019 BayLibre SAS. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "meson-sm1.dtsi" |
| 9 | #include <dt-bindings/gpio/gpio.h> |
| 10 | #include <dt-bindings/input/input.h> |
| 11 | #include <dt-bindings/gpio/meson-g12a-gpio.h> |
| 12 | |
| 13 | / { |
| 14 | compatible = "seirobotics,sei610", "amlogic,sm1"; |
| 15 | model = "SEI Robotics SEI610"; |
| 16 | |
| 17 | aliases { |
| 18 | serial0 = &uart_AO; |
| 19 | ethernet0 = ðmac; |
| 20 | }; |
| 21 | |
Neil Armstrong | b09d116 | 2019-08-29 15:27:28 +0200 | [diff] [blame] | 22 | chosen { |
| 23 | stdout-path = "serial0:115200n8"; |
| 24 | }; |
| 25 | |
Neil Armstrong | e9a12e1 | 2019-08-20 16:40:52 +0200 | [diff] [blame] | 26 | emmc_pwrseq: emmc-pwrseq { |
| 27 | compatible = "mmc-pwrseq-emmc"; |
| 28 | reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; |
| 29 | }; |
| 30 | |
| 31 | gpio-keys { |
| 32 | compatible = "gpio-keys-polled"; |
| 33 | poll-interval = <100>; |
| 34 | |
| 35 | key1 { |
| 36 | label = "A"; |
| 37 | linux,code = <BTN_0>; |
| 38 | gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>; |
| 39 | }; |
| 40 | |
| 41 | key2 { |
| 42 | label = "B"; |
| 43 | linux,code = <BTN_1>; |
| 44 | gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>; |
| 45 | }; |
| 46 | |
| 47 | key3 { |
| 48 | label = "C"; |
| 49 | linux,code = <BTN_2>; |
| 50 | gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; |
| 51 | }; |
| 52 | }; |
| 53 | |
Neil Armstrong | 96a386b | 2019-08-23 11:04:17 +0200 | [diff] [blame] | 54 | hdmi-connector { |
| 55 | compatible = "hdmi-connector"; |
| 56 | type = "a"; |
| 57 | |
| 58 | port { |
| 59 | hdmi_connector_in: endpoint { |
| 60 | remote-endpoint = <&hdmi_tx_tmds_out>; |
| 61 | }; |
| 62 | }; |
| 63 | }; |
| 64 | |
Neil Armstrong | e9a12e1 | 2019-08-20 16:40:52 +0200 | [diff] [blame] | 65 | leds { |
| 66 | compatible = "gpio-leds"; |
| 67 | |
| 68 | bluetooth { |
| 69 | label = "sei610:blue:bt"; |
| 70 | gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; |
| 71 | default-state = "off"; |
| 72 | }; |
| 73 | }; |
| 74 | |
| 75 | pwmleds { |
| 76 | compatible = "pwm-leds"; |
| 77 | |
| 78 | power { |
| 79 | label = "sei610:red:power"; |
| 80 | pwms = <&pwm_AO_ab 0 30518 0>; |
| 81 | max-brightness = <255>; |
| 82 | linux,default-trigger = "default-on"; |
| 83 | active-low; |
| 84 | }; |
| 85 | }; |
| 86 | |
| 87 | memory@0 { |
| 88 | device_type = "memory"; |
| 89 | reg = <0x0 0x0 0x0 0x40000000>; |
| 90 | }; |
| 91 | |
| 92 | ao_5v: regulator-ao_5v { |
| 93 | compatible = "regulator-fixed"; |
| 94 | regulator-name = "AO_5V"; |
| 95 | regulator-min-microvolt = <5000000>; |
| 96 | regulator-max-microvolt = <5000000>; |
| 97 | vin-supply = <&dc_in>; |
| 98 | regulator-always-on; |
| 99 | }; |
| 100 | |
| 101 | dc_in: regulator-dc_in { |
| 102 | compatible = "regulator-fixed"; |
| 103 | regulator-name = "DC_IN"; |
| 104 | regulator-min-microvolt = <5000000>; |
| 105 | regulator-max-microvolt = <5000000>; |
| 106 | regulator-always-on; |
| 107 | }; |
| 108 | |
| 109 | emmc_1v8: regulator-emmc_1v8 { |
| 110 | compatible = "regulator-fixed"; |
| 111 | regulator-name = "EMMC_1V8"; |
| 112 | regulator-min-microvolt = <1800000>; |
| 113 | regulator-max-microvolt = <1800000>; |
| 114 | vin-supply = <&vddao_3v3>; |
| 115 | regulator-always-on; |
| 116 | }; |
| 117 | |
| 118 | vddao_3v3: regulator-vddao_3v3 { |
| 119 | compatible = "regulator-fixed"; |
| 120 | regulator-name = "VDDAO_3V3"; |
| 121 | regulator-min-microvolt = <3300000>; |
| 122 | regulator-max-microvolt = <3300000>; |
| 123 | vin-supply = <&dc_in>; |
| 124 | regulator-always-on; |
| 125 | }; |
| 126 | |
| 127 | /* Used by Tuner, RGB Led & IR Emitter LED array */ |
| 128 | vddao_3v3_t: regulator-vddao_3v3_t { |
| 129 | compatible = "regulator-fixed"; |
| 130 | regulator-name = "VDDAO_3V3_T"; |
| 131 | regulator-min-microvolt = <3300000>; |
| 132 | regulator-max-microvolt = <3300000>; |
| 133 | vin-supply = <&vddao_3v3>; |
| 134 | gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; |
| 135 | enable-active-low; |
| 136 | regulator-always-on; |
| 137 | }; |
| 138 | |
Neil Armstrong | 3d9e764 | 2019-08-26 09:25:39 +0200 | [diff] [blame] | 139 | vddcpu: regulator-vddcpu { |
| 140 | /* |
| 141 | * SY8120B1ABC DC/DC Regulator. |
| 142 | */ |
| 143 | compatible = "pwm-regulator"; |
| 144 | |
| 145 | regulator-name = "VDDCPU"; |
| 146 | regulator-min-microvolt = <690000>; |
| 147 | regulator-max-microvolt = <1050000>; |
| 148 | |
| 149 | vin-supply = <&dc_in>; |
| 150 | |
| 151 | pwms = <&pwm_AO_cd 1 1500 0>; |
| 152 | pwm-dutycycle-range = <100 0>; |
| 153 | |
| 154 | regulator-boot-on; |
| 155 | regulator-always-on; |
| 156 | }; |
| 157 | |
Neil Armstrong | e9a12e1 | 2019-08-20 16:40:52 +0200 | [diff] [blame] | 158 | vddio_ao1v8: regulator-vddio_ao1v8 { |
| 159 | compatible = "regulator-fixed"; |
| 160 | regulator-name = "VDDIO_AO1V8"; |
| 161 | regulator-min-microvolt = <1800000>; |
| 162 | regulator-max-microvolt = <1800000>; |
| 163 | vin-supply = <&vddao_3v3>; |
| 164 | regulator-always-on; |
| 165 | }; |
| 166 | |
| 167 | reserved-memory { |
| 168 | /* TEE Reserved Memory */ |
| 169 | bl32_reserved: bl32@5000000 { |
| 170 | reg = <0x0 0x05300000 0x0 0x2000000>; |
| 171 | no-map; |
| 172 | }; |
| 173 | }; |
| 174 | |
| 175 | sdio_pwrseq: sdio-pwrseq { |
| 176 | compatible = "mmc-pwrseq-simple"; |
| 177 | reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; |
| 178 | clocks = <&wifi32k>; |
| 179 | clock-names = "ext_clock"; |
| 180 | }; |
| 181 | |
| 182 | wifi32k: wifi32k { |
| 183 | compatible = "pwm-clock"; |
| 184 | #clock-cells = <0>; |
| 185 | clock-frequency = <32768>; |
| 186 | pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ |
| 187 | }; |
| 188 | }; |
| 189 | |
| 190 | &cec_AO { |
| 191 | pinctrl-0 = <&cec_ao_a_h_pins>; |
| 192 | pinctrl-names = "default"; |
| 193 | status = "disabled"; |
| 194 | hdmi-phandle = <&hdmi_tx>; |
| 195 | }; |
| 196 | |
| 197 | &cecb_AO { |
| 198 | pinctrl-0 = <&cec_ao_b_h_pins>; |
| 199 | pinctrl-names = "default"; |
| 200 | status = "okay"; |
| 201 | hdmi-phandle = <&hdmi_tx>; |
| 202 | }; |
| 203 | |
Neil Armstrong | 3d9e764 | 2019-08-26 09:25:39 +0200 | [diff] [blame] | 204 | &cpu0 { |
| 205 | cpu-supply = <&vddcpu>; |
| 206 | operating-points-v2 = <&cpu_opp_table>; |
| 207 | clocks = <&clkc CLKID_CPU_CLK>; |
| 208 | clock-latency = <50000>; |
| 209 | }; |
| 210 | |
| 211 | &cpu1 { |
| 212 | cpu-supply = <&vddcpu>; |
| 213 | operating-points-v2 = <&cpu_opp_table>; |
| 214 | clocks = <&clkc CLKID_CPU1_CLK>; |
| 215 | clock-latency = <50000>; |
| 216 | }; |
| 217 | |
| 218 | &cpu2 { |
| 219 | cpu-supply = <&vddcpu>; |
| 220 | operating-points-v2 = <&cpu_opp_table>; |
| 221 | clocks = <&clkc CLKID_CPU2_CLK>; |
| 222 | clock-latency = <50000>; |
| 223 | }; |
| 224 | |
| 225 | &cpu3 { |
| 226 | cpu-supply = <&vddcpu>; |
| 227 | operating-points-v2 = <&cpu_opp_table>; |
| 228 | clocks = <&clkc CLKID_CPU3_CLK>; |
| 229 | clock-latency = <50000>; |
| 230 | }; |
| 231 | |
Neil Armstrong | e9a12e1 | 2019-08-20 16:40:52 +0200 | [diff] [blame] | 232 | ðmac { |
| 233 | status = "okay"; |
| 234 | phy-handle = <&internal_ephy>; |
| 235 | phy-mode = "rmii"; |
| 236 | }; |
| 237 | |
Neil Armstrong | 96a386b | 2019-08-23 11:04:17 +0200 | [diff] [blame] | 238 | &hdmi_tx { |
| 239 | status = "okay"; |
| 240 | pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; |
| 241 | pinctrl-names = "default"; |
| 242 | }; |
| 243 | |
| 244 | &hdmi_tx_tmds_port { |
| 245 | hdmi_tx_tmds_out: endpoint { |
| 246 | remote-endpoint = <&hdmi_connector_in>; |
| 247 | }; |
| 248 | }; |
| 249 | |
Neil Armstrong | e9a12e1 | 2019-08-20 16:40:52 +0200 | [diff] [blame] | 250 | &i2c3 { |
| 251 | status = "okay"; |
| 252 | pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; |
| 253 | pinctrl-names = "default"; |
| 254 | }; |
| 255 | |
| 256 | &ir { |
| 257 | status = "okay"; |
| 258 | pinctrl-0 = <&remote_input_ao_pins>; |
| 259 | pinctrl-names = "default"; |
| 260 | }; |
| 261 | |
| 262 | &pwm_AO_ab { |
| 263 | status = "okay"; |
| 264 | pinctrl-0 = <&pwm_ao_a_pins>; |
| 265 | pinctrl-names = "default"; |
| 266 | clocks = <&xtal>; |
| 267 | clock-names = "clkin0"; |
| 268 | }; |
| 269 | |
Neil Armstrong | 3d9e764 | 2019-08-26 09:25:39 +0200 | [diff] [blame] | 270 | &pwm_AO_cd { |
| 271 | pinctrl-0 = <&pwm_ao_d_e_pins>; |
| 272 | pinctrl-names = "default"; |
| 273 | clocks = <&xtal>; |
| 274 | clock-names = "clkin1"; |
| 275 | status = "okay"; |
| 276 | }; |
| 277 | |
Neil Armstrong | e9a12e1 | 2019-08-20 16:40:52 +0200 | [diff] [blame] | 278 | &pwm_ef { |
| 279 | status = "okay"; |
| 280 | pinctrl-0 = <&pwm_e_pins>; |
| 281 | pinctrl-names = "default"; |
| 282 | clocks = <&xtal>; |
| 283 | clock-names = "clkin0"; |
| 284 | }; |
| 285 | |
| 286 | &saradc { |
| 287 | status = "okay"; |
| 288 | vref-supply = <&vddio_ao1v8>; |
| 289 | }; |
| 290 | |
| 291 | /* SDIO */ |
| 292 | &sd_emmc_a { |
| 293 | status = "okay"; |
| 294 | pinctrl-0 = <&sdio_pins>; |
| 295 | pinctrl-1 = <&sdio_clk_gate_pins>; |
| 296 | pinctrl-names = "default", "clk-gate"; |
| 297 | #address-cells = <1>; |
| 298 | #size-cells = <0>; |
| 299 | |
| 300 | bus-width = <4>; |
| 301 | cap-sd-highspeed; |
| 302 | sd-uhs-sdr50; |
| 303 | max-frequency = <100000000>; |
| 304 | |
| 305 | non-removable; |
| 306 | disable-wp; |
| 307 | |
Neil Armstrong | 2e09574 | 2019-08-29 17:23:42 +0200 | [diff] [blame^] | 308 | /* WiFi firmware requires power to be kept while in suspend */ |
| 309 | keep-power-in-suspend; |
| 310 | |
Neil Armstrong | e9a12e1 | 2019-08-20 16:40:52 +0200 | [diff] [blame] | 311 | mmc-pwrseq = <&sdio_pwrseq>; |
| 312 | |
| 313 | vmmc-supply = <&vddao_3v3>; |
| 314 | vqmmc-supply = <&vddio_ao1v8>; |
| 315 | |
| 316 | brcmf: wifi@1 { |
| 317 | reg = <1>; |
| 318 | compatible = "brcm,bcm4329-fmac"; |
| 319 | }; |
| 320 | }; |
| 321 | |
| 322 | /* SD card */ |
| 323 | &sd_emmc_b { |
| 324 | status = "okay"; |
| 325 | pinctrl-0 = <&sdcard_c_pins>; |
| 326 | pinctrl-1 = <&sdcard_clk_gate_c_pins>; |
| 327 | pinctrl-names = "default", "clk-gate"; |
| 328 | |
| 329 | bus-width = <4>; |
| 330 | cap-sd-highspeed; |
| 331 | max-frequency = <50000000>; |
| 332 | disable-wp; |
| 333 | |
| 334 | cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; |
| 335 | vmmc-supply = <&vddao_3v3>; |
| 336 | vqmmc-supply = <&vddao_3v3>; |
| 337 | }; |
| 338 | |
| 339 | /* eMMC */ |
| 340 | &sd_emmc_c { |
| 341 | status = "okay"; |
| 342 | pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; |
| 343 | pinctrl-1 = <&emmc_clk_gate_pins>; |
| 344 | pinctrl-names = "default", "clk-gate"; |
| 345 | |
| 346 | bus-width = <8>; |
| 347 | cap-mmc-highspeed; |
| 348 | mmc-ddr-1_8v; |
| 349 | mmc-hs200-1_8v; |
| 350 | max-frequency = <200000000>; |
| 351 | non-removable; |
| 352 | disable-wp; |
| 353 | |
| 354 | mmc-pwrseq = <&emmc_pwrseq>; |
| 355 | vmmc-supply = <&vddao_3v3>; |
| 356 | vqmmc-supply = <&emmc_1v8>; |
| 357 | }; |
| 358 | |
| 359 | &uart_A { |
| 360 | status = "okay"; |
| 361 | pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; |
| 362 | pinctrl-names = "default"; |
| 363 | uart-has-rtscts; |
| 364 | |
| 365 | bluetooth { |
| 366 | compatible = "brcm,bcm43438-bt"; |
| 367 | shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; |
| 368 | max-speed = <2000000>; |
| 369 | clocks = <&wifi32k>; |
| 370 | clock-names = "lpo"; |
| 371 | vbat-supply = <&vddao_3v3>; |
| 372 | vddio-supply = <&vddio_ao1v8>; |
| 373 | }; |
| 374 | }; |
| 375 | |
| 376 | /* Exposed via the on-board USB to Serial FT232RL IC */ |
| 377 | &uart_AO { |
| 378 | status = "okay"; |
| 379 | pinctrl-0 = <&uart_ao_a_pins>; |
| 380 | pinctrl-names = "default"; |
| 381 | }; |
Neil Armstrong | 24fe3e9 | 2019-08-23 11:04:18 +0200 | [diff] [blame] | 382 | |
| 383 | &usb { |
| 384 | status = "okay"; |
| 385 | dr_mode = "otg"; |
| 386 | }; |