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