1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2019 BayLibre, SAS. 4 * Author: Fabien Parent <fparent@baylibre.com> 5 */ 6 7#include <dt-bindings/gpio/gpio.h> 8 9/ { 10 aliases { 11 serial0 = &uart0; 12 ethernet0 = ðernet; 13 }; 14 15 chosen { 16 stdout-path = "serial0:921600n8"; 17 }; 18 19 firmware { 20 optee: optee { 21 compatible = "linaro,optee-tz"; 22 method = "smc"; 23 }; 24 }; 25 26 gpio-keys { 27 compatible = "gpio-keys"; 28 pinctrl-names = "default"; 29 pinctrl-0 = <&gpio_keys_default>; 30 31 key-volume-up { 32 gpios = <&pio 42 GPIO_ACTIVE_LOW>; 33 label = "volume_up"; 34 linux,code = <115>; 35 wakeup-source; 36 debounce-interval = <15>; 37 }; 38 39 key-volume-down { 40 gpios = <&pio 43 GPIO_ACTIVE_LOW>; 41 label = "volume_down"; 42 linux,code = <114>; 43 wakeup-source; 44 debounce-interval = <15>; 45 }; 46 }; 47}; 48 49&i2c0 { 50 pinctrl-names = "default"; 51 pinctrl-0 = <&i2c0_pins_a>; 52 status = "okay"; 53 54 tca6416: gpio@20 { 55 compatible = "ti,tca6416"; 56 reg = <0x20>; 57 reset-gpios = <&pio 65 GPIO_ACTIVE_LOW>; 58 pinctrl-names = "default"; 59 pinctrl-0 = <&tca6416_pins>; 60 61 gpio-controller; 62 #gpio-cells = <2>; 63 64 eint20-mux-sel0-hog { 65 gpio-hog; 66 gpios = <0 0>; 67 input; 68 line-name = "eint20_mux_sel0"; 69 }; 70 71 expcon-mux-sel1-hog { 72 gpio-hog; 73 gpios = <1 0>; 74 input; 75 line-name = "expcon_mux_sel1"; 76 }; 77 78 mrg-di-mux-sel2-hog { 79 gpio-hog; 80 gpios = <2 0>; 81 input; 82 line-name = "mrg_di_mux_sel2"; 83 }; 84 85 sd-sdio-mux-sel3-hog { 86 gpio-hog; 87 gpios = <3 0>; 88 input; 89 line-name = "sd_sdio_mux_sel3"; 90 }; 91 92 sd-sdio-mux-ctrl7-hog { 93 gpio-hog; 94 gpios = <7 0>; 95 output-low; 96 line-name = "sd_sdio_mux_ctrl7"; 97 }; 98 99 hw-id0-hog { 100 gpio-hog; 101 gpios = <8 0>; 102 input; 103 line-name = "hw_id0"; 104 }; 105 106 hw-id1-hog { 107 gpio-hog; 108 gpios = <9 0>; 109 input; 110 line-name = "hw_id1"; 111 }; 112 113 hw-id2-hog { 114 gpio-hog; 115 gpios = <10 0>; 116 input; 117 line-name = "hw_id2"; 118 }; 119 120 fg-int-n-hog { 121 gpio-hog; 122 gpios = <11 0>; 123 input; 124 line-name = "fg_int_n"; 125 }; 126 127 usba-pwr-en-hog { 128 gpio-hog; 129 gpios = <12 0>; 130 output-high; 131 line-name = "usba_pwr_en"; 132 }; 133 134 wifi-3v3-pg-hog { 135 gpio-hog; 136 gpios = <13 0>; 137 input; 138 line-name = "wifi_3v3_pg"; 139 }; 140 141 cam-rst-hog { 142 gpio-hog; 143 gpios = <14 0>; 144 output-low; 145 line-name = "cam_rst"; 146 }; 147 148 cam-pwdn-hog { 149 gpio-hog; 150 gpios = <15 0>; 151 output-low; 152 line-name = "cam_pwdn"; 153 }; 154 }; 155}; 156 157&i2c2 { 158 pinctrl-names = "default"; 159 pinctrl-0 = <&i2c2_pins_a>; 160 status = "okay"; 161}; 162 163&uart0 { 164 status = "okay"; 165}; 166 167ðernet { 168 pinctrl-names = "default"; 169 pinctrl-0 = <ðernet_pins_default>; 170 phy-handle = <ð_phy>; 171 phy-mode = "rmii"; 172 mac-address = [00 00 00 00 00 00]; 173 status = "okay"; 174 175 mdio { 176 #address-cells = <1>; 177 #size-cells = <0>; 178 179 eth_phy: ethernet-phy@0 { 180 reg = <0>; 181 }; 182 }; 183}; 184 185&usb0 { 186 status = "okay"; 187 dr_mode = "peripheral"; 188 usb-role-switch; 189 190 usb_con: connector { 191 compatible = "usb-c-connector"; 192 label = "USB-C"; 193 }; 194}; 195 196&usb_phy { 197 status = "okay"; 198}; 199 200&pio { 201 gpio_keys_default: gpiodefault { 202 pins_cmd_dat { 203 pinmux = <MT8516_PIN_42_KPCOL0__FUNC_GPIO42>, 204 <MT8516_PIN_43_KPCOL1__FUNC_GPIO43>; 205 bias-pull-up; 206 input-enable; 207 }; 208 }; 209 210 i2c0_pins_a: i2c0 { 211 pins1 { 212 pinmux = <MT8516_PIN_58_SDA0__FUNC_SDA0_0>, 213 <MT8516_PIN_59_SCL0__FUNC_SCL0_0>; 214 bias-disable; 215 }; 216 }; 217 218 i2c2_pins_a: i2c2 { 219 pins1 { 220 pinmux = <MT8516_PIN_60_SDA2__FUNC_SDA2_0>, 221 <MT8516_PIN_61_SCL2__FUNC_SCL2_0>; 222 bias-disable; 223 }; 224 }; 225 226 tca6416_pins: pinmux_tca6416_pins { 227 gpio_mux_rst_n_pin { 228 pinmux = <MT8516_PIN_65_UTXD1__FUNC_GPIO65>; 229 output-high; 230 }; 231 232 gpio_mux_int_n_pin { 233 pinmux = <MT8516_PIN_64_URXD1__FUNC_GPIO64>; 234 input-enable; 235 bias-pull-up; 236 }; 237 }; 238 239 ethernet_pins_default: ethernet { 240 pins_ethernet { 241 pinmux = <MT8516_PIN_0_EINT0__FUNC_EXT_TXD0>, 242 <MT8516_PIN_1_EINT1__FUNC_EXT_TXD1>, 243 <MT8516_PIN_5_EINT5__FUNC_EXT_RXER>, 244 <MT8516_PIN_6_EINT6__FUNC_EXT_RXC>, 245 <MT8516_PIN_7_EINT7__FUNC_EXT_RXDV>, 246 <MT8516_PIN_8_EINT8__FUNC_EXT_RXD0>, 247 <MT8516_PIN_9_EINT9__FUNC_EXT_RXD1>, 248 <MT8516_PIN_12_EINT12__FUNC_EXT_TXEN>, 249 <MT8516_PIN_38_MRG_DI__FUNC_EXT_MDIO>, 250 <MT8516_PIN_39_MRG_DO__FUNC_EXT_MDC>; 251 }; 252 }; 253}; 254