Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright (c) 2019 BayLibre, SAS.
0004  * Author: Fabien Parent <fparent@baylibre.com>
0005  */
0006 
0007 #include <dt-bindings/gpio/gpio.h>
0008 
0009 / {
0010         aliases {
0011                 serial0 = &uart0;
0012                 ethernet0 = &ethernet;
0013         };
0014 
0015         chosen {
0016                 stdout-path = "serial0:921600n8";
0017         };
0018 
0019         firmware {
0020                 optee: optee@4fd00000 {
0021                         compatible = "linaro,optee-tz";
0022                         method = "smc";
0023                 };
0024         };
0025 
0026         gpio-keys {
0027                 compatible = "gpio-keys";
0028                 pinctrl-names = "default";
0029                 pinctrl-0 = <&gpio_keys_default>;
0030 
0031                 key-volume-up {
0032                         gpios = <&pio 42 GPIO_ACTIVE_LOW>;
0033                         label = "volume_up";
0034                         linux,code = <115>;
0035                         wakeup-source;
0036                         debounce-interval = <15>;
0037                 };
0038 
0039                 key-volume-down {
0040                         gpios = <&pio 43 GPIO_ACTIVE_LOW>;
0041                         label = "volume_down";
0042                         linux,code = <114>;
0043                         wakeup-source;
0044                         debounce-interval = <15>;
0045                 };
0046         };
0047 };
0048 
0049 &i2c0 {
0050         clock-div = <2>;
0051         pinctrl-names = "default";
0052         pinctrl-0 = <&i2c0_pins_a>;
0053         status = "okay";
0054 
0055         tca6416: gpio@20 {
0056                 compatible = "ti,tca6416";
0057                 reg = <0x20>;
0058                 reset-gpios = <&pio 65 GPIO_ACTIVE_LOW>;
0059                 pinctrl-names = "default";
0060                 pinctrl-0 = <&tca6416_pins>;
0061 
0062                 gpio-controller;
0063                 #gpio-cells = <2>;
0064 
0065                 eint20-mux-sel0-hog {
0066                         gpio-hog;
0067                         gpios = <0 0>;
0068                         input;
0069                         line-name = "eint20_mux_sel0";
0070                 };
0071 
0072                 expcon-mux-sel1-hog {
0073                         gpio-hog;
0074                         gpios = <1 0>;
0075                         input;
0076                         line-name = "expcon_mux_sel1";
0077                 };
0078 
0079                 mrg-di-mux-sel2-hog {
0080                         gpio-hog;
0081                         gpios = <2 0>;
0082                         input;
0083                         line-name = "mrg_di_mux_sel2";
0084                 };
0085 
0086                 sd-sdio-mux-sel3-hog {
0087                         gpio-hog;
0088                         gpios = <3 0>;
0089                         input;
0090                         line-name = "sd_sdio_mux_sel3";
0091                 };
0092 
0093                 sd-sdio-mux-ctrl7-hog {
0094                         gpio-hog;
0095                         gpios = <7 0>;
0096                         output-low;
0097                         line-name = "sd_sdio_mux_ctrl7";
0098                 };
0099 
0100                 hw-id0-hog {
0101                         gpio-hog;
0102                         gpios = <8 0>;
0103                         input;
0104                         line-name = "hw_id0";
0105                 };
0106 
0107                 hw-id1-hog {
0108                         gpio-hog;
0109                         gpios = <9 0>;
0110                         input;
0111                         line-name = "hw_id1";
0112                 };
0113 
0114                 hw-id2-hog {
0115                         gpio-hog;
0116                         gpios = <10 0>;
0117                         input;
0118                         line-name = "hw_id2";
0119                 };
0120 
0121                 fg-int-n-hog {
0122                         gpio-hog;
0123                         gpios = <11 0>;
0124                         input;
0125                         line-name = "fg_int_n";
0126                 };
0127 
0128                 usba-pwr-en-hog {
0129                         gpio-hog;
0130                         gpios = <12 0>;
0131                         output-high;
0132                         line-name = "usba_pwr_en";
0133                 };
0134 
0135                 wifi-3v3-pg-hog {
0136                         gpio-hog;
0137                         gpios = <13 0>;
0138                         input;
0139                         line-name = "wifi_3v3_pg";
0140                 };
0141 
0142                 cam-rst-hog {
0143                         gpio-hog;
0144                         gpios = <14 0>;
0145                         output-low;
0146                         line-name = "cam_rst";
0147                 };
0148 
0149                 cam-pwdn-hog {
0150                         gpio-hog;
0151                         gpios = <15 0>;
0152                         output-low;
0153                         line-name = "cam_pwdn";
0154                 };
0155         };
0156 };
0157 
0158 &i2c2 {
0159         clock-div = <2>;
0160         pinctrl-names = "default";
0161         pinctrl-0 = <&i2c2_pins_a>;
0162         status = "okay";
0163 };
0164 
0165 &uart0 {
0166         status = "okay";
0167 };
0168 
0169 &ethernet {
0170         pinctrl-names = "default";
0171         pinctrl-0 = <&ethernet_pins_default>;
0172         phy-handle = <&eth_phy>;
0173         phy-mode = "rmii";
0174         mac-address = [00 00 00 00 00 00];
0175         status = "okay";
0176 
0177         mdio {
0178                 #address-cells = <1>;
0179                 #size-cells = <0>;
0180 
0181                 eth_phy: ethernet-phy@0 {
0182                         reg = <0>;
0183                 };
0184         };
0185 };
0186 
0187 &usb0 {
0188         status = "okay";
0189         dr_mode = "peripheral";
0190         usb-role-switch;
0191 
0192         usb_con: connector {
0193                 compatible = "usb-c-connector";
0194                 label = "USB-C";
0195         };
0196 };
0197 
0198 &usb_phy {
0199         status = "okay";
0200 };
0201 
0202 &pio {
0203         gpio_keys_default: gpiodefault {
0204                 pins_cmd_dat {
0205                         pinmux = <MT8516_PIN_42_KPCOL0__FUNC_GPIO42>,
0206                                  <MT8516_PIN_43_KPCOL1__FUNC_GPIO43>;
0207                         bias-pull-up;
0208                         input-enable;
0209                 };
0210         };
0211 
0212         i2c0_pins_a: i2c0@0 {
0213                 pins1 {
0214                         pinmux = <MT8516_PIN_58_SDA0__FUNC_SDA0_0>,
0215                                  <MT8516_PIN_59_SCL0__FUNC_SCL0_0>;
0216                         bias-disable;
0217                 };
0218         };
0219 
0220         i2c2_pins_a: i2c2@0 {
0221                 pins1 {
0222                         pinmux = <MT8516_PIN_60_SDA2__FUNC_SDA2_0>,
0223                                  <MT8516_PIN_61_SCL2__FUNC_SCL2_0>;
0224                         bias-disable;
0225                 };
0226         };
0227 
0228         tca6416_pins: pinmux_tca6416_pins {
0229                 gpio_mux_rst_n_pin {
0230                         pinmux = <MT8516_PIN_65_UTXD1__FUNC_GPIO65>;
0231                         output-high;
0232                 };
0233 
0234                 gpio_mux_int_n_pin {
0235                         pinmux = <MT8516_PIN_64_URXD1__FUNC_GPIO64>;
0236                         input-enable;
0237                         bias-pull-up;
0238                 };
0239         };
0240 
0241         ethernet_pins_default: ethernet {
0242                 pins_ethernet {
0243                         pinmux = <MT8516_PIN_0_EINT0__FUNC_EXT_TXD0>,
0244                                  <MT8516_PIN_1_EINT1__FUNC_EXT_TXD1>,
0245                                  <MT8516_PIN_5_EINT5__FUNC_EXT_RXER>,
0246                                  <MT8516_PIN_6_EINT6__FUNC_EXT_RXC>,
0247                                  <MT8516_PIN_7_EINT7__FUNC_EXT_RXDV>,
0248                                  <MT8516_PIN_8_EINT8__FUNC_EXT_RXD0>,
0249                                  <MT8516_PIN_9_EINT9__FUNC_EXT_RXD1>,
0250                                  <MT8516_PIN_12_EINT12__FUNC_EXT_TXEN>,
0251                                  <MT8516_PIN_38_MRG_DI__FUNC_EXT_MDIO>,
0252                                  <MT8516_PIN_39_MRG_DO__FUNC_EXT_MDC>;
0253                 };
0254         };
0255 };