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