1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0 2*f126890aSEmmanuel Vadot/* 3*f126890aSEmmanuel Vadot * Copyright (c) 2015 MediaTek Inc. 4*f126890aSEmmanuel Vadot * Author: Erin Lo <erin.lo@mediatek.com> 5*f126890aSEmmanuel Vadot * 6*f126890aSEmmanuel Vadot */ 7*f126890aSEmmanuel Vadot 8*f126890aSEmmanuel Vadot/dts-v1/; 9*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 10*f126890aSEmmanuel Vadot#include "mt2701.dtsi" 11*f126890aSEmmanuel Vadot 12*f126890aSEmmanuel Vadot/ { 13*f126890aSEmmanuel Vadot model = "MediaTek MT2701 evaluation board"; 14*f126890aSEmmanuel Vadot compatible = "mediatek,mt2701-evb", "mediatek,mt2701"; 15*f126890aSEmmanuel Vadot 16*f126890aSEmmanuel Vadot memory { 17*f126890aSEmmanuel Vadot device_type = "memory"; 18*f126890aSEmmanuel Vadot reg = <0 0x80000000 0 0x40000000>; 19*f126890aSEmmanuel Vadot }; 20*f126890aSEmmanuel Vadot 21*f126890aSEmmanuel Vadot sound:sound { 22*f126890aSEmmanuel Vadot compatible = "mediatek,mt2701-cs42448-machine"; 23*f126890aSEmmanuel Vadot mediatek,platform = <&afe>; 24*f126890aSEmmanuel Vadot /* CS42448 Machine name */ 25*f126890aSEmmanuel Vadot audio-routing = 26*f126890aSEmmanuel Vadot "Line Out Jack", "AOUT1L", 27*f126890aSEmmanuel Vadot "Line Out Jack", "AOUT1R", 28*f126890aSEmmanuel Vadot "Line Out Jack", "AOUT2L", 29*f126890aSEmmanuel Vadot "Line Out Jack", "AOUT2R", 30*f126890aSEmmanuel Vadot "Line Out Jack", "AOUT3L", 31*f126890aSEmmanuel Vadot "Line Out Jack", "AOUT3R", 32*f126890aSEmmanuel Vadot "Line Out Jack", "AOUT4L", 33*f126890aSEmmanuel Vadot "Line Out Jack", "AOUT4R", 34*f126890aSEmmanuel Vadot "AIN1L", "AMIC", 35*f126890aSEmmanuel Vadot "AIN1R", "AMIC", 36*f126890aSEmmanuel Vadot "AIN2L", "Tuner In", 37*f126890aSEmmanuel Vadot "AIN2R", "Tuner In", 38*f126890aSEmmanuel Vadot "AIN3L", "Satellite Tuner In", 39*f126890aSEmmanuel Vadot "AIN3R", "Satellite Tuner In", 40*f126890aSEmmanuel Vadot "AIN3L", "AUX In", 41*f126890aSEmmanuel Vadot "AIN3R", "AUX In"; 42*f126890aSEmmanuel Vadot mediatek,audio-codec = <&cs42448>; 43*f126890aSEmmanuel Vadot mediatek,audio-codec-bt-mrg = <&bt_sco_codec>; 44*f126890aSEmmanuel Vadot pinctrl-names = "default"; 45*f126890aSEmmanuel Vadot pinctrl-0 = <&aud_pins_default>; 46*f126890aSEmmanuel Vadot i2s1-in-sel-gpio1 = <&pio 53 0>; 47*f126890aSEmmanuel Vadot i2s1-in-sel-gpio2 = <&pio 54 0>; 48*f126890aSEmmanuel Vadot status = "okay"; 49*f126890aSEmmanuel Vadot }; 50*f126890aSEmmanuel Vadot 51*f126890aSEmmanuel Vadot bt_sco_codec:bt_sco_codec { 52*f126890aSEmmanuel Vadot compatible = "linux,bt-sco"; 53*f126890aSEmmanuel Vadot }; 54*f126890aSEmmanuel Vadot 55*f126890aSEmmanuel Vadot backlight_lcd: backlight_lcd { 56*f126890aSEmmanuel Vadot compatible = "pwm-backlight"; 57*f126890aSEmmanuel Vadot pwms = <&bls 0 100000>; 58*f126890aSEmmanuel Vadot brightness-levels = < 59*f126890aSEmmanuel Vadot 0 16 32 48 64 80 96 112 60*f126890aSEmmanuel Vadot 128 144 160 176 192 208 224 240 61*f126890aSEmmanuel Vadot 255 62*f126890aSEmmanuel Vadot >; 63*f126890aSEmmanuel Vadot default-brightness-level = <9>; 64*f126890aSEmmanuel Vadot }; 65*f126890aSEmmanuel Vadot 66*f126890aSEmmanuel Vadot usb_vbus: regulator@0 { 67*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 68*f126890aSEmmanuel Vadot regulator-name = "usb_vbus"; 69*f126890aSEmmanuel Vadot regulator-min-microvolt = <5000000>; 70*f126890aSEmmanuel Vadot regulator-max-microvolt = <5000000>; 71*f126890aSEmmanuel Vadot gpio = <&pio 45 GPIO_ACTIVE_HIGH>; 72*f126890aSEmmanuel Vadot enable-active-high; 73*f126890aSEmmanuel Vadot }; 74*f126890aSEmmanuel Vadot}; 75*f126890aSEmmanuel Vadot 76*f126890aSEmmanuel Vadot&auxadc { 77*f126890aSEmmanuel Vadot status = "okay"; 78*f126890aSEmmanuel Vadot}; 79*f126890aSEmmanuel Vadot 80*f126890aSEmmanuel Vadot&bls { 81*f126890aSEmmanuel Vadot status = "okay"; 82*f126890aSEmmanuel Vadot pinctrl-names = "default"; 83*f126890aSEmmanuel Vadot pinctrl-0 = <&pwm_bls_gpio>; 84*f126890aSEmmanuel Vadot}; 85*f126890aSEmmanuel Vadot 86*f126890aSEmmanuel Vadot&i2c0 { 87*f126890aSEmmanuel Vadot pinctrl-names = "default"; 88*f126890aSEmmanuel Vadot pinctrl-0 = <&i2c0_pins_a>; 89*f126890aSEmmanuel Vadot status = "okay"; 90*f126890aSEmmanuel Vadot}; 91*f126890aSEmmanuel Vadot 92*f126890aSEmmanuel Vadot&i2c1 { 93*f126890aSEmmanuel Vadot pinctrl-names = "default"; 94*f126890aSEmmanuel Vadot pinctrl-0 = <&i2c1_pins_a>; 95*f126890aSEmmanuel Vadot status = "okay"; 96*f126890aSEmmanuel Vadot}; 97*f126890aSEmmanuel Vadot 98*f126890aSEmmanuel Vadot&i2c2 { 99*f126890aSEmmanuel Vadot pinctrl-names = "default"; 100*f126890aSEmmanuel Vadot pinctrl-0 = <&i2c2_pins_a>; 101*f126890aSEmmanuel Vadot status = "okay"; 102*f126890aSEmmanuel Vadot cs42448: cs42448@48 { 103*f126890aSEmmanuel Vadot compatible = "cirrus,cs42448"; 104*f126890aSEmmanuel Vadot reg = <0x48>; 105*f126890aSEmmanuel Vadot clocks = <&topckgen CLK_TOP_AUD_I2S1_MCLK>; 106*f126890aSEmmanuel Vadot clock-names = "mclk"; 107*f126890aSEmmanuel Vadot }; 108*f126890aSEmmanuel Vadot}; 109*f126890aSEmmanuel Vadot 110*f126890aSEmmanuel Vadot&pio { 111*f126890aSEmmanuel Vadot i2c0_pins_a: i2c0@0 { 112*f126890aSEmmanuel Vadot pins1 { 113*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_75_SDA0__FUNC_SDA0>, 114*f126890aSEmmanuel Vadot <MT2701_PIN_76_SCL0__FUNC_SCL0>; 115*f126890aSEmmanuel Vadot bias-disable; 116*f126890aSEmmanuel Vadot }; 117*f126890aSEmmanuel Vadot }; 118*f126890aSEmmanuel Vadot 119*f126890aSEmmanuel Vadot i2c1_pins_a: i2c1@0 { 120*f126890aSEmmanuel Vadot pins1 { 121*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_57_SDA1__FUNC_SDA1>, 122*f126890aSEmmanuel Vadot <MT2701_PIN_58_SCL1__FUNC_SCL1>; 123*f126890aSEmmanuel Vadot bias-disable; 124*f126890aSEmmanuel Vadot }; 125*f126890aSEmmanuel Vadot }; 126*f126890aSEmmanuel Vadot 127*f126890aSEmmanuel Vadot i2c2_pins_a: i2c2@0 { 128*f126890aSEmmanuel Vadot pins1 { 129*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_77_SDA2__FUNC_SDA2>, 130*f126890aSEmmanuel Vadot <MT2701_PIN_78_SCL2__FUNC_SCL2>; 131*f126890aSEmmanuel Vadot bias-disable; 132*f126890aSEmmanuel Vadot }; 133*f126890aSEmmanuel Vadot }; 134*f126890aSEmmanuel Vadot 135*f126890aSEmmanuel Vadot pwm_bls_gpio: pwm_bls_gpio { 136*f126890aSEmmanuel Vadot pins_cmd_dat { 137*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_208_AUD_EXT_CK1__FUNC_DISP_PWM>; 138*f126890aSEmmanuel Vadot }; 139*f126890aSEmmanuel Vadot }; 140*f126890aSEmmanuel Vadot 141*f126890aSEmmanuel Vadot spi_pins_a: spi0@0 { 142*f126890aSEmmanuel Vadot pins_spi { 143*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_53_SPI0_CSN__FUNC_SPI0_CS>, 144*f126890aSEmmanuel Vadot <MT2701_PIN_54_SPI0_CK__FUNC_SPI0_CK>, 145*f126890aSEmmanuel Vadot <MT2701_PIN_55_SPI0_MI__FUNC_SPI0_MI>, 146*f126890aSEmmanuel Vadot <MT2701_PIN_56_SPI0_MO__FUNC_SPI0_MO>; 147*f126890aSEmmanuel Vadot bias-disable; 148*f126890aSEmmanuel Vadot }; 149*f126890aSEmmanuel Vadot }; 150*f126890aSEmmanuel Vadot 151*f126890aSEmmanuel Vadot aud_pins_default: audiodefault { 152*f126890aSEmmanuel Vadot pins_cmd_dat { 153*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_49_I2S0_DATA__FUNC_I2S0_DATA>, 154*f126890aSEmmanuel Vadot <MT2701_PIN_72_I2S0_DATA_IN__FUNC_I2S0_DATA_IN>, 155*f126890aSEmmanuel Vadot <MT2701_PIN_73_I2S0_LRCK__FUNC_I2S0_LRCK>, 156*f126890aSEmmanuel Vadot <MT2701_PIN_74_I2S0_BCK__FUNC_I2S0_BCK>, 157*f126890aSEmmanuel Vadot <MT2701_PIN_126_I2S0_MCLK__FUNC_I2S0_MCLK>, 158*f126890aSEmmanuel Vadot <MT2701_PIN_33_I2S1_DATA__FUNC_I2S1_DATA>, 159*f126890aSEmmanuel Vadot <MT2701_PIN_34_I2S1_DATA_IN__FUNC_I2S1_DATA_IN>, 160*f126890aSEmmanuel Vadot <MT2701_PIN_35_I2S1_BCK__FUNC_I2S1_BCK>, 161*f126890aSEmmanuel Vadot <MT2701_PIN_36_I2S1_LRCK__FUNC_I2S1_LRCK>, 162*f126890aSEmmanuel Vadot <MT2701_PIN_37_I2S1_MCLK__FUNC_I2S1_MCLK>, 163*f126890aSEmmanuel Vadot <MT2701_PIN_203_PWM0__FUNC_I2S2_DATA>, 164*f126890aSEmmanuel Vadot <MT2701_PIN_204_PWM1__FUNC_I2S3_DATA>, 165*f126890aSEmmanuel Vadot <MT2701_PIN_53_SPI0_CSN__FUNC_GPIO53>, 166*f126890aSEmmanuel Vadot <MT2701_PIN_54_SPI0_CK__FUNC_GPIO54>, 167*f126890aSEmmanuel Vadot <MT2701_PIN_18_PCM_CLK__FUNC_MRG_CLK>, 168*f126890aSEmmanuel Vadot <MT2701_PIN_19_PCM_SYNC__FUNC_MRG_SYNC>, 169*f126890aSEmmanuel Vadot <MT2701_PIN_20_PCM_RX__FUNC_MRG_TX>, 170*f126890aSEmmanuel Vadot <MT2701_PIN_21_PCM_TX__FUNC_MRG_RX>; 171*f126890aSEmmanuel Vadot drive-strength = <MTK_DRIVE_12mA>; 172*f126890aSEmmanuel Vadot bias-pull-down; 173*f126890aSEmmanuel Vadot }; 174*f126890aSEmmanuel Vadot }; 175*f126890aSEmmanuel Vadot 176*f126890aSEmmanuel Vadot spi_pins_b: spi1@0 { 177*f126890aSEmmanuel Vadot pins_spi { 178*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_7_SPI1_CSN__FUNC_SPI1_CS>, 179*f126890aSEmmanuel Vadot <MT2701_PIN_8_SPI1_MI__FUNC_SPI1_MI>, 180*f126890aSEmmanuel Vadot <MT2701_PIN_9_SPI1_MO__FUNC_SPI1_MO>, 181*f126890aSEmmanuel Vadot <MT2701_PIN_199_SPI1_CLK__FUNC_SPI1_CK>; 182*f126890aSEmmanuel Vadot bias-disable; 183*f126890aSEmmanuel Vadot }; 184*f126890aSEmmanuel Vadot }; 185*f126890aSEmmanuel Vadot 186*f126890aSEmmanuel Vadot spi_pins_c: spi2@0 { 187*f126890aSEmmanuel Vadot pins_spi { 188*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_101_SPI2_CSN__FUNC_SPI2_CS>, 189*f126890aSEmmanuel Vadot <MT2701_PIN_102_SPI2_MI__FUNC_SPI2_MI>, 190*f126890aSEmmanuel Vadot <MT2701_PIN_103_SPI2_MO__FUNC_SPI2_MO>, 191*f126890aSEmmanuel Vadot <MT2701_PIN_104_SPI2_CLK__FUNC_SPI2_CK>; 192*f126890aSEmmanuel Vadot bias-disable; 193*f126890aSEmmanuel Vadot }; 194*f126890aSEmmanuel Vadot }; 195*f126890aSEmmanuel Vadot}; 196*f126890aSEmmanuel Vadot 197*f126890aSEmmanuel Vadot&spi0 { 198*f126890aSEmmanuel Vadot pinctrl-names = "default"; 199*f126890aSEmmanuel Vadot pinctrl-0 = <&spi_pins_a>; 200*f126890aSEmmanuel Vadot status = "disabled"; 201*f126890aSEmmanuel Vadot}; 202*f126890aSEmmanuel Vadot 203*f126890aSEmmanuel Vadot&spi1 { 204*f126890aSEmmanuel Vadot pinctrl-names = "default"; 205*f126890aSEmmanuel Vadot pinctrl-0 = <&spi_pins_b>; 206*f126890aSEmmanuel Vadot status = "disabled"; 207*f126890aSEmmanuel Vadot}; 208*f126890aSEmmanuel Vadot 209*f126890aSEmmanuel Vadot&spi2 { 210*f126890aSEmmanuel Vadot pinctrl-names = "default"; 211*f126890aSEmmanuel Vadot pinctrl-0 = <&spi_pins_c>; 212*f126890aSEmmanuel Vadot status = "disabled"; 213*f126890aSEmmanuel Vadot}; 214*f126890aSEmmanuel Vadot 215*f126890aSEmmanuel Vadot&nor_flash { 216*f126890aSEmmanuel Vadot pinctrl-names = "default"; 217*f126890aSEmmanuel Vadot pinctrl-0 = <&nor_pins_default>; 218*f126890aSEmmanuel Vadot status = "okay"; 219*f126890aSEmmanuel Vadot flash@0 { 220*f126890aSEmmanuel Vadot compatible = "jedec,spi-nor"; 221*f126890aSEmmanuel Vadot reg = <0>; 222*f126890aSEmmanuel Vadot }; 223*f126890aSEmmanuel Vadot}; 224*f126890aSEmmanuel Vadot 225*f126890aSEmmanuel Vadot&pio { 226*f126890aSEmmanuel Vadot nor_pins_default: nor { 227*f126890aSEmmanuel Vadot pins1 { 228*f126890aSEmmanuel Vadot pinmux = <MT2701_PIN_240_EXT_XCS__FUNC_EXT_XCS>, 229*f126890aSEmmanuel Vadot <MT2701_PIN_241_EXT_SCK__FUNC_EXT_SCK>, 230*f126890aSEmmanuel Vadot <MT2701_PIN_239_EXT_SDIO0__FUNC_EXT_SDIO0>, 231*f126890aSEmmanuel Vadot <MT2701_PIN_238_EXT_SDIO1__FUNC_EXT_SDIO1>, 232*f126890aSEmmanuel Vadot <MT2701_PIN_237_EXT_SDIO2__FUNC_EXT_SDIO2>, 233*f126890aSEmmanuel Vadot <MT2701_PIN_236_EXT_SDIO3__FUNC_EXT_SDIO3>; 234*f126890aSEmmanuel Vadot drive-strength = <MTK_DRIVE_4mA>; 235*f126890aSEmmanuel Vadot bias-pull-up; 236*f126890aSEmmanuel Vadot }; 237*f126890aSEmmanuel Vadot }; 238*f126890aSEmmanuel Vadot}; 239*f126890aSEmmanuel Vadot 240*f126890aSEmmanuel Vadot&uart0 { 241*f126890aSEmmanuel Vadot status = "okay"; 242*f126890aSEmmanuel Vadot}; 243*f126890aSEmmanuel Vadot 244*f126890aSEmmanuel Vadot&usb2 { 245*f126890aSEmmanuel Vadot status = "okay"; 246*f126890aSEmmanuel Vadot usb-role-switch; 247*f126890aSEmmanuel Vadot connector { 248*f126890aSEmmanuel Vadot compatible = "gpio-usb-b-connector", "usb-b-connector"; 249*f126890aSEmmanuel Vadot type = "micro"; 250*f126890aSEmmanuel Vadot id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>; 251*f126890aSEmmanuel Vadot vbus-supply = <&usb_vbus>; 252*f126890aSEmmanuel Vadot }; 253*f126890aSEmmanuel Vadot}; 254