Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright (c) 2015 MediaTek Inc.
0004  * Author: Erin Lo <erin.lo@mediatek.com>
0005  *
0006  */
0007 
0008 /dts-v1/;
0009 #include <dt-bindings/gpio/gpio.h>
0010 #include "mt2701.dtsi"
0011 
0012 / {
0013         model = "MediaTek MT2701 evaluation board";
0014         compatible = "mediatek,mt2701-evb", "mediatek,mt2701";
0015 
0016         memory {
0017                 device_type = "memory";
0018                 reg = <0 0x80000000 0 0x40000000>;
0019         };
0020 
0021         sound:sound {
0022                 compatible = "mediatek,mt2701-cs42448-machine";
0023                 mediatek,platform = <&afe>;
0024                 /* CS42448 Machine name */
0025                 audio-routing =
0026                 "Line Out Jack", "AOUT1L",
0027                 "Line Out Jack", "AOUT1R",
0028                 "Line Out Jack", "AOUT2L",
0029                 "Line Out Jack", "AOUT2R",
0030                 "Line Out Jack", "AOUT3L",
0031                 "Line Out Jack", "AOUT3R",
0032                 "Line Out Jack", "AOUT4L",
0033                 "Line Out Jack", "AOUT4R",
0034                 "AIN1L", "AMIC",
0035                 "AIN1R", "AMIC",
0036                 "AIN2L", "Tuner In",
0037                 "AIN2R", "Tuner In",
0038                 "AIN3L", "Satellite Tuner In",
0039                 "AIN3R", "Satellite Tuner In",
0040                 "AIN3L", "AUX In",
0041                 "AIN3R", "AUX In";
0042                 mediatek,audio-codec = <&cs42448>;
0043                 mediatek,audio-codec-bt-mrg = <&bt_sco_codec>;
0044                 pinctrl-names = "default";
0045                 pinctrl-0 = <&aud_pins_default>;
0046                 i2s1-in-sel-gpio1 = <&pio 53 0>;
0047                 i2s1-in-sel-gpio2 = <&pio 54 0>;
0048                 status = "okay";
0049         };
0050 
0051         bt_sco_codec:bt_sco_codec {
0052                 compatible = "linux,bt-sco";
0053         };
0054 
0055         backlight_lcd: backlight_lcd {
0056                 compatible = "pwm-backlight";
0057                 pwms = <&bls 0 100000>;
0058                 brightness-levels = <
0059                           0  16  32  48  64  80  96 112
0060                         128 144 160 176 192 208 224 240
0061                         255
0062                 >;
0063                 default-brightness-level = <9>;
0064         };
0065 
0066         usb_vbus: regulator@0 {
0067                 compatible = "regulator-fixed";
0068                 regulator-name = "usb_vbus";
0069                 regulator-min-microvolt = <5000000>;
0070                 regulator-max-microvolt = <5000000>;
0071                 gpio = <&pio 45 GPIO_ACTIVE_HIGH>;
0072                 enable-active-high;
0073         };
0074 };
0075 
0076 &auxadc {
0077         status = "okay";
0078 };
0079 
0080 &bls {
0081         status = "okay";
0082         pinctrl-names = "default";
0083         pinctrl-0 = <&pwm_bls_gpio>;
0084 };
0085 
0086 &i2c0 {
0087         pinctrl-names = "default";
0088         pinctrl-0 = <&i2c0_pins_a>;
0089         status = "okay";
0090 };
0091 
0092 &i2c1 {
0093         pinctrl-names = "default";
0094         pinctrl-0 = <&i2c1_pins_a>;
0095         status = "okay";
0096 };
0097 
0098 &i2c2 {
0099         pinctrl-names = "default";
0100         pinctrl-0 = <&i2c2_pins_a>;
0101         status = "okay";
0102         cs42448: cs42448@48 {
0103                 compatible = "cirrus,cs42448";
0104                 reg = <0x48>;
0105                 clocks = <&topckgen CLK_TOP_AUD_I2S1_MCLK>;
0106                 clock-names = "mclk";
0107         };
0108 };
0109 
0110 &pio {
0111         i2c0_pins_a: i2c0@0 {
0112                 pins1 {
0113                         pinmux = <MT2701_PIN_75_SDA0__FUNC_SDA0>,
0114                                  <MT2701_PIN_76_SCL0__FUNC_SCL0>;
0115                         bias-disable;
0116                 };
0117         };
0118 
0119         i2c1_pins_a: i2c1@0 {
0120                 pins1 {
0121                         pinmux = <MT2701_PIN_57_SDA1__FUNC_SDA1>,
0122                                  <MT2701_PIN_58_SCL1__FUNC_SCL1>;
0123                         bias-disable;
0124                 };
0125         };
0126 
0127         i2c2_pins_a: i2c2@0 {
0128                 pins1 {
0129                         pinmux = <MT2701_PIN_77_SDA2__FUNC_SDA2>,
0130                                  <MT2701_PIN_78_SCL2__FUNC_SCL2>;
0131                         bias-disable;
0132                 };
0133         };
0134 
0135         pwm_bls_gpio: pwm_bls_gpio {
0136                 pins_cmd_dat {
0137                         pinmux = <MT2701_PIN_208_AUD_EXT_CK1__FUNC_DISP_PWM>;
0138                 };
0139         };
0140 
0141         spi_pins_a: spi0@0 {
0142                 pins_spi {
0143                         pinmux = <MT2701_PIN_53_SPI0_CSN__FUNC_SPI0_CS>,
0144                                  <MT2701_PIN_54_SPI0_CK__FUNC_SPI0_CK>,
0145                                  <MT2701_PIN_55_SPI0_MI__FUNC_SPI0_MI>,
0146                                  <MT2701_PIN_56_SPI0_MO__FUNC_SPI0_MO>;
0147                         bias-disable;
0148                 };
0149         };
0150 
0151         aud_pins_default: audiodefault {
0152                 pins_cmd_dat {
0153                         pinmux = <MT2701_PIN_49_I2S0_DATA__FUNC_I2S0_DATA>,
0154                                  <MT2701_PIN_72_I2S0_DATA_IN__FUNC_I2S0_DATA_IN>,
0155                                  <MT2701_PIN_73_I2S0_LRCK__FUNC_I2S0_LRCK>,
0156                                  <MT2701_PIN_74_I2S0_BCK__FUNC_I2S0_BCK>,
0157                                  <MT2701_PIN_126_I2S0_MCLK__FUNC_I2S0_MCLK>,
0158                                  <MT2701_PIN_33_I2S1_DATA__FUNC_I2S1_DATA>,
0159                                  <MT2701_PIN_34_I2S1_DATA_IN__FUNC_I2S1_DATA_IN>,
0160                                  <MT2701_PIN_35_I2S1_BCK__FUNC_I2S1_BCK>,
0161                                  <MT2701_PIN_36_I2S1_LRCK__FUNC_I2S1_LRCK>,
0162                                  <MT2701_PIN_37_I2S1_MCLK__FUNC_I2S1_MCLK>,
0163                                  <MT2701_PIN_203_PWM0__FUNC_I2S2_DATA>,
0164                                  <MT2701_PIN_204_PWM1__FUNC_I2S3_DATA>,
0165                                  <MT2701_PIN_53_SPI0_CSN__FUNC_GPIO53>,
0166                                  <MT2701_PIN_54_SPI0_CK__FUNC_GPIO54>,
0167                                  <MT2701_PIN_18_PCM_CLK__FUNC_MRG_CLK>,
0168                                  <MT2701_PIN_19_PCM_SYNC__FUNC_MRG_SYNC>,
0169                                  <MT2701_PIN_20_PCM_RX__FUNC_MRG_TX>,
0170                                  <MT2701_PIN_21_PCM_TX__FUNC_MRG_RX>;
0171                         drive-strength = <MTK_DRIVE_12mA>;
0172                         bias-pull-down;
0173                 };
0174         };
0175 
0176         spi_pins_b: spi1@0 {
0177                 pins_spi {
0178                         pinmux = <MT2701_PIN_7_SPI1_CSN__FUNC_SPI1_CS>,
0179                                  <MT2701_PIN_8_SPI1_MI__FUNC_SPI1_MI>,
0180                                  <MT2701_PIN_9_SPI1_MO__FUNC_SPI1_MO>,
0181                                  <MT2701_PIN_199_SPI1_CLK__FUNC_SPI1_CK>;
0182                         bias-disable;
0183                 };
0184         };
0185 
0186         spi_pins_c: spi2@0 {
0187                 pins_spi {
0188                         pinmux = <MT2701_PIN_101_SPI2_CSN__FUNC_SPI2_CS>,
0189                                  <MT2701_PIN_102_SPI2_MI__FUNC_SPI2_MI>,
0190                                  <MT2701_PIN_103_SPI2_MO__FUNC_SPI2_MO>,
0191                                  <MT2701_PIN_104_SPI2_CLK__FUNC_SPI2_CK>;
0192                         bias-disable;
0193                 };
0194         };
0195 };
0196 
0197 &spi0 {
0198         pinctrl-names = "default";
0199         pinctrl-0 = <&spi_pins_a>;
0200         status = "disabled";
0201 };
0202 
0203 &spi1 {
0204         pinctrl-names = "default";
0205         pinctrl-0 = <&spi_pins_b>;
0206         status = "disabled";
0207 };
0208 
0209 &spi2 {
0210         pinctrl-names = "default";
0211         pinctrl-0 = <&spi_pins_c>;
0212         status = "disabled";
0213 };
0214 
0215 &nor_flash {
0216         pinctrl-names = "default";
0217         pinctrl-0 = <&nor_pins_default>;
0218         status = "okay";
0219         flash@0 {
0220                 compatible = "jedec,spi-nor";
0221                 reg = <0>;
0222         };
0223 };
0224 
0225 &pio {
0226         nor_pins_default: nor {
0227                 pins1 {
0228                         pinmux = <MT2701_PIN_240_EXT_XCS__FUNC_EXT_XCS>,
0229                                  <MT2701_PIN_241_EXT_SCK__FUNC_EXT_SCK>,
0230                                  <MT2701_PIN_239_EXT_SDIO0__FUNC_EXT_SDIO0>,
0231                                  <MT2701_PIN_238_EXT_SDIO1__FUNC_EXT_SDIO1>,
0232                                  <MT2701_PIN_237_EXT_SDIO2__FUNC_EXT_SDIO2>,
0233                                  <MT2701_PIN_236_EXT_SDIO3__FUNC_EXT_SDIO3>;
0234                         drive-strength = <MTK_DRIVE_4mA>;
0235                         bias-pull-up;
0236                 };
0237         };
0238 };
0239 
0240 &uart0 {
0241         status = "okay";
0242 };
0243 
0244 &usb2 {
0245         status = "okay";
0246         usb-role-switch;
0247         connector{
0248                 compatible = "gpio-usb-b-connector", "usb-b-connector";
0249                 type = "micro";
0250                 id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
0251                 vbus-supply = <&usb_vbus>;
0252         };
0253 };