developer | 56ed64c | 2022-09-09 19:59:13 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (c) 2022 MediaTek Inc. |
| 4 | * Author: Sam Shih <sam.shih@mediatek.com> |
| 5 | */ |
| 6 | |
| 7 | /dts-v1/; |
| 8 | #include "mt7986.dtsi" |
| 9 | #include <dt-bindings/gpio/gpio.h> |
| 10 | |
| 11 | / { |
| 12 | #address-cells = <1>; |
| 13 | #size-cells = <1>; |
| 14 | model = "mt7986-rfb"; |
| 15 | compatible = "mediatek,mt7986", "mediatek,mt7986-rfb"; |
| 16 | chosen { |
| 17 | stdout-path = &uart0; |
| 18 | tick-timer = &timer0; |
| 19 | }; |
| 20 | |
| 21 | reg_1p8v: regulator-1p8v { |
| 22 | compatible = "regulator-fixed"; |
| 23 | regulator-name = "fixed-1.8V"; |
| 24 | regulator-min-microvolt = <1800000>; |
| 25 | regulator-max-microvolt = <1800000>; |
| 26 | regulator-boot-on; |
| 27 | regulator-always-on; |
| 28 | }; |
| 29 | |
| 30 | reg_3p3v: regulator-3p3v { |
| 31 | compatible = "regulator-fixed"; |
| 32 | regulator-name = "fixed-3.3V"; |
| 33 | regulator-min-microvolt = <3300000>; |
| 34 | regulator-max-microvolt = <3300000>; |
| 35 | regulator-boot-on; |
| 36 | regulator-always-on; |
| 37 | }; |
| 38 | }; |
| 39 | |
| 40 | &uart0 { |
| 41 | status = "okay"; |
| 42 | }; |
| 43 | |
| 44 | &uart1 { |
| 45 | pinctrl-names = "default"; |
| 46 | pinctrl-0 = <&uart1_pins>; |
| 47 | status = "disabled"; |
| 48 | }; |
| 49 | |
| 50 | ð { |
| 51 | status = "okay"; |
| 52 | mediatek,gmac-id = <0>; |
| 53 | phy-mode = "sgmii"; |
| 54 | mediatek,switch = "mt7531"; |
| 55 | reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; |
| 56 | |
| 57 | fixed-link { |
| 58 | speed = <1000>; |
| 59 | full-duplex; |
| 60 | }; |
| 61 | }; |
| 62 | |
| 63 | &pinctrl { |
| 64 | spi_flash_pins: spi0-pins-func-1 { |
| 65 | mux { |
| 66 | function = "flash"; |
| 67 | groups = "spi0", "spi0_wp_hold"; |
| 68 | }; |
| 69 | |
| 70 | conf-pu { |
| 71 | pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; |
| 72 | drive-strength = <MTK_DRIVE_8mA>; |
| 73 | bias-pull-up = <MTK_PUPD_SET_R1R0_11>; |
| 74 | }; |
| 75 | |
| 76 | conf-pd { |
| 77 | pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; |
| 78 | drive-strength = <MTK_DRIVE_8mA>; |
| 79 | bias-pull-down = <MTK_PUPD_SET_R1R0_11>; |
| 80 | }; |
| 81 | }; |
| 82 | |
| 83 | snfi_pins: snfi-pins-func-1 { |
| 84 | mux { |
| 85 | function = "flash"; |
| 86 | groups = "snfi"; |
| 87 | }; |
| 88 | |
| 89 | clk { |
| 90 | pins = "SPI0_CLK"; |
| 91 | drive-strength = <MTK_DRIVE_8mA>; |
| 92 | bias-pull-down = <MTK_PUPD_SET_R1R0_00>; |
| 93 | }; |
| 94 | |
| 95 | conf-pu { |
| 96 | pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; |
| 97 | drive-strength = <MTK_DRIVE_6mA>; |
| 98 | bias-pull-up = <MTK_PUPD_SET_R1R0_00>; |
| 99 | }; |
| 100 | |
| 101 | conf-pd { |
| 102 | pins = "SPI0_MOSI", "SPI0_MISO"; |
| 103 | drive-strength = <MTK_DRIVE_6mA>; |
| 104 | bias-pull-down = <MTK_PUPD_SET_R1R0_00>; |
| 105 | }; |
| 106 | }; |
| 107 | |
| 108 | spic_pins: spi1-pins-func-1 { |
| 109 | mux { |
| 110 | function = "spi"; |
| 111 | groups = "spi1_2"; |
| 112 | }; |
| 113 | }; |
| 114 | |
| 115 | uart1_pins: spi1-pins-func-3 { |
| 116 | mux { |
| 117 | function = "uart"; |
| 118 | groups = "uart1_2"; |
| 119 | }; |
| 120 | }; |
| 121 | |
| 122 | pwm_pins: pwm0-pins-func-1 { |
| 123 | mux { |
| 124 | function = "pwm"; |
| 125 | groups = "pwm0"; |
| 126 | }; |
| 127 | }; |
| 128 | |
| 129 | mmc0_pins_default: mmc0default { |
| 130 | mux { |
| 131 | function = "flash"; |
| 132 | groups = "emmc_51"; |
| 133 | }; |
| 134 | |
| 135 | conf-cmd-dat { |
| 136 | pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", |
| 137 | "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", |
| 138 | "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; |
| 139 | input-enable; |
| 140 | drive-strength = <MTK_DRIVE_4mA>; |
| 141 | bias-pull-up = <MTK_PUPD_SET_R1R0_01>; |
| 142 | }; |
| 143 | |
| 144 | conf-clk { |
| 145 | pins = "EMMC_CK"; |
| 146 | drive-strength = <MTK_DRIVE_6mA>; |
| 147 | bias-pull-down = <MTK_PUPD_SET_R1R0_10>; |
| 148 | }; |
| 149 | |
| 150 | conf-dsl { |
| 151 | pins = "EMMC_DSL"; |
| 152 | bias-pull-down = <MTK_PUPD_SET_R1R0_10>; |
| 153 | }; |
| 154 | |
| 155 | conf-rst { |
| 156 | pins = "EMMC_RSTB"; |
| 157 | drive-strength = <MTK_DRIVE_4mA>; |
| 158 | bias-pull-up = <MTK_PUPD_SET_R1R0_01>; |
| 159 | }; |
| 160 | }; |
| 161 | }; |
| 162 | |
| 163 | &snand { |
| 164 | pinctrl-names = "default"; |
| 165 | pinctrl-0 = <&snfi_pins>; |
| 166 | status = "okay"; |
| 167 | quad-spi; |
| 168 | }; |
| 169 | |
| 170 | &spi0 { |
| 171 | #address-cells = <1>; |
| 172 | #size-cells = <0>; |
| 173 | pinctrl-names = "default"; |
| 174 | pinctrl-0 = <&spi_flash_pins>; |
| 175 | status = "okay"; |
| 176 | must_tx; |
| 177 | enhance_timing; |
| 178 | dma_ext; |
| 179 | ipm_design; |
| 180 | support_quad; |
| 181 | tick_dly = <2>; |
| 182 | sample_sel = <0>; |
| 183 | |
| 184 | spi_nor@0 { |
| 185 | compatible = "jedec,spi-nor"; |
| 186 | reg = <0>; |
| 187 | spi-max-frequency = <52000000>; |
| 188 | }; |
| 189 | |
| 190 | spi_nand@1 { |
| 191 | compatible = "spi-nand"; |
| 192 | reg = <1>; |
| 193 | spi-max-frequency = <52000000>; |
| 194 | }; |
| 195 | }; |
| 196 | |
| 197 | &pwm { |
| 198 | pinctrl-names = "default"; |
| 199 | pinctrl-0 = <&pwm_pins>; |
| 200 | status = "okay"; |
| 201 | }; |
| 202 | |
| 203 | &watchdog { |
| 204 | status = "disabled"; |
| 205 | }; |
| 206 | |
| 207 | &mmc0 { |
| 208 | pinctrl-names = "default"; |
| 209 | pinctrl-0 = <&mmc0_pins_default>; |
| 210 | bus-width = <8>; |
| 211 | max-frequency = <52000000>; |
| 212 | cap-mmc-highspeed; |
| 213 | cap-mmc-hw-reset; |
| 214 | vmmc-supply = <®_3p3v>; |
| 215 | vqmmc-supply = <®_1p8v>; |
| 216 | non-removable; |
| 217 | status = "okay"; |
| 218 | }; |