Frank Wunderlich | 9b6a5b2 | 2020-08-10 16:45:46 +0200 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (c) 2019 MediaTek Inc. |
| 4 | * Author: Sam Shih <sam.shih@mediatek.com> |
| 5 | */ |
| 6 | |
| 7 | /dts-v1/; |
| 8 | #include "mt7622.dtsi" |
| 9 | #include "mt7622-u-boot.dtsi" |
| 10 | |
| 11 | / { |
| 12 | #address-cells = <1>; |
| 13 | #size-cells = <1>; |
| 14 | model = "mt7622-bpi-r64"; |
| 15 | compatible = "mediatek,mt7622", "mediatek,mt7622-rfb"; |
| 16 | chosen { |
| 17 | stdout-path = &uart0; |
| 18 | tick-timer = &timer0; |
| 19 | }; |
| 20 | |
| 21 | aliases { |
| 22 | spi0 = &snfi; |
| 23 | }; |
| 24 | |
| 25 | memory@40000000 { |
| 26 | device_type = "memory"; |
| 27 | reg = <0x40000000 0x40000000>; |
| 28 | }; |
| 29 | |
| 30 | reg_1p8v: regulator-1p8v { |
| 31 | compatible = "regulator-fixed"; |
| 32 | regulator-name = "fixed-1.8V"; |
| 33 | regulator-min-microvolt = <1800000>; |
| 34 | regulator-max-microvolt = <1800000>; |
| 35 | regulator-boot-on; |
| 36 | regulator-always-on; |
| 37 | }; |
| 38 | |
| 39 | reg_3p3v: regulator-3p3v { |
| 40 | compatible = "regulator-fixed"; |
| 41 | regulator-name = "fixed-3.3V"; |
| 42 | regulator-min-microvolt = <3300000>; |
| 43 | regulator-max-microvolt = <3300000>; |
| 44 | regulator-boot-on; |
| 45 | regulator-always-on; |
| 46 | }; |
| 47 | }; |
| 48 | |
| 49 | |
| 50 | &pinctrl { |
| 51 | snfi_pins: snfi-pins { |
| 52 | mux { |
| 53 | function = "flash"; |
| 54 | groups = "snfi"; |
| 55 | }; |
| 56 | }; |
| 57 | |
| 58 | snor_pins: snor-pins { |
| 59 | mux { |
| 60 | function = "flash"; |
| 61 | groups = "spi_nor"; |
| 62 | }; |
| 63 | }; |
| 64 | |
| 65 | uart0_pins: uart0 { |
| 66 | mux { |
| 67 | function = "uart"; |
| 68 | groups = "uart0_0_tx_rx" ; |
| 69 | }; |
| 70 | }; |
| 71 | |
| 72 | pwm_pins: pwm1 { |
| 73 | mux { |
| 74 | function = "pwm"; |
| 75 | groups = "pwm_ch1_0" ; |
| 76 | }; |
| 77 | }; |
| 78 | |
| 79 | watchdog_pins: watchdog-default { |
| 80 | mux { |
| 81 | function = "watchdog"; |
| 82 | groups = "watchdog"; |
| 83 | }; |
| 84 | }; |
| 85 | |
| 86 | mmc0_pins_default: mmc0default { |
| 87 | mux { |
| 88 | function = "emmc"; |
| 89 | groups = "emmc"; |
| 90 | }; |
| 91 | |
| 92 | /* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7", |
| 93 | * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4, |
| 94 | * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively |
| 95 | */ |
| 96 | conf-cmd-dat { |
| 97 | pins = "NDL0", "NDL1", "NDL2", |
| 98 | "NDL3", "NDL4", "NDL5", |
| 99 | "NDL6", "NDL7", "NRB"; |
| 100 | input-enable; |
| 101 | bias-pull-up; |
| 102 | }; |
| 103 | |
| 104 | conf-clk { |
| 105 | pins = "NCLE"; |
| 106 | bias-pull-down; |
| 107 | }; |
| 108 | |
| 109 | }; |
| 110 | |
| 111 | mmc1_pins_default: mmc1default { |
| 112 | mux { |
| 113 | function = "sd"; |
| 114 | groups = "sd_0"; |
| 115 | }; |
| 116 | /* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN", |
| 117 | * "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1, |
| 118 | * DAT2, DAT3, CMD, CLK for SD respectively. |
| 119 | */ |
| 120 | conf-cmd-data { |
| 121 | pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN", |
| 122 | "I2S2_IN","I2S4_OUT"; |
| 123 | input-enable; |
| 124 | drive-strength = <8>; |
| 125 | bias-pull-up; |
| 126 | }; |
| 127 | conf-clk { |
| 128 | pins = "I2S3_OUT"; |
| 129 | drive-strength = <12>; |
| 130 | bias-pull-down; |
| 131 | }; |
| 132 | conf-cd { |
| 133 | pins = "TXD3"; |
| 134 | bias-pull-up; |
| 135 | }; |
| 136 | |
| 137 | }; |
| 138 | }; |
| 139 | |
| 140 | &snfi { |
| 141 | pinctrl-names = "default", "snfi"; |
| 142 | pinctrl-0 = <&snor_pins>; |
| 143 | pinctrl-1 = <&snfi_pins>; |
| 144 | status = "okay"; |
| 145 | |
| 146 | spi-flash@0{ |
| 147 | compatible = "jedec,spi-nor"; |
| 148 | reg = <0>; |
| 149 | u-boot,dm-pre-reloc; |
| 150 | }; |
| 151 | }; |
| 152 | |
| 153 | &uart0 { |
| 154 | pinctrl-names = "default"; |
| 155 | pinctrl-0 = <&uart0_pins>; |
| 156 | status = "okay"; |
| 157 | }; |
| 158 | |
| 159 | &pwm { |
| 160 | pinctrl-names = "default"; |
| 161 | pinctrl-0 = <&pwm_pins>; |
| 162 | status = "okay"; |
| 163 | }; |
| 164 | |
| 165 | &mmc0 { |
| 166 | pinctrl-names = "default"; |
| 167 | pinctrl-0 = <&mmc0_pins_default>; |
| 168 | status = "okay"; |
| 169 | bus-width = <8>; |
| 170 | max-frequency = <50000000>; |
| 171 | cap-sd-highspeed; |
| 172 | vmmc-supply = <®_3p3v>; |
| 173 | vqmmc-supply = <®_3p3v>; |
| 174 | non-removable; |
| 175 | }; |
| 176 | |
| 177 | &mmc1 { |
| 178 | pinctrl-names = "default"; |
| 179 | pinctrl-0 = <&mmc1_pins_default>; |
| 180 | status = "okay"; |
| 181 | bus-width = <4>; |
| 182 | max-frequency = <50000000>; |
| 183 | cap-sd-highspeed; |
| 184 | r_smpl = <1>; |
| 185 | vmmc-supply = <®_3p3v>; |
| 186 | vqmmc-supply = <®_3p3v>; |
| 187 | }; |
| 188 | |
| 189 | &watchdog { |
| 190 | pinctrl-names = "default"; |
| 191 | pinctrl-0 = <&watchdog_pins>; |
| 192 | status = "okay"; |
| 193 | }; |
| 194 | |
| 195 | ð { |
| 196 | status = "okay"; |
| 197 | mediatek,gmac-id = <0>; |
| 198 | phy-mode = "sgmii"; |
| 199 | mediatek,switch = "mt7531"; |
| 200 | reset-gpios = <&gpio 54 GPIO_ACTIVE_HIGH>; |
| 201 | |
| 202 | fixed-link { |
| 203 | speed = <1000>; |
| 204 | full-duplex; |
| 205 | }; |
| 206 | }; |