developer | 15dd2c8 | 2022-09-09 19:59:16 +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 "mt7981.dtsi" |
| 9 | #include <dt-bindings/gpio/gpio.h> |
| 10 | |
| 11 | / { |
| 12 | #address-cells = <1>; |
| 13 | #size-cells = <1>; |
| 14 | model = "mt7981-rfb"; |
| 15 | compatible = "mediatek,mt7981", "mediatek,mt7981-rfb"; |
| 16 | chosen { |
| 17 | stdout-path = &uart0; |
| 18 | tick-timer = &timer0; |
| 19 | }; |
| 20 | }; |
| 21 | |
| 22 | &uart0 { |
| 23 | status = "okay"; |
| 24 | }; |
| 25 | |
| 26 | &uart1 { |
| 27 | pinctrl-names = "default"; |
| 28 | pinctrl-0 = <&uart1_pins>; |
| 29 | status = "disabled"; |
| 30 | }; |
| 31 | |
| 32 | ð { |
| 33 | status = "okay"; |
| 34 | mediatek,gmac-id = <0>; |
| 35 | phy-mode = "sgmii"; |
| 36 | mediatek,switch = "mt7531"; |
| 37 | reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>; |
| 38 | |
| 39 | fixed-link { |
| 40 | speed = <1000>; |
| 41 | full-duplex; |
| 42 | }; |
| 43 | }; |
| 44 | |
| 45 | &pinctrl { |
| 46 | spi_flash_pins: spi0-pins-func-1 { |
| 47 | mux { |
| 48 | function = "flash"; |
| 49 | groups = "spi0", "spi0_wp_hold"; |
| 50 | }; |
| 51 | |
| 52 | conf-pu { |
| 53 | pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP"; |
| 54 | drive-strength = <MTK_DRIVE_8mA>; |
| 55 | bias-pull-up = <MTK_PUPD_SET_R1R0_11>; |
| 56 | }; |
| 57 | |
| 58 | conf-pd { |
| 59 | pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO"; |
| 60 | drive-strength = <MTK_DRIVE_8mA>; |
| 61 | bias-pull-down = <MTK_PUPD_SET_R1R0_11>; |
| 62 | }; |
| 63 | }; |
| 64 | |
| 65 | spi2_flash_pins: spi2-spi2-pins { |
| 66 | mux { |
| 67 | function = "spi"; |
| 68 | groups = "spi2", "spi2_wp_hold"; |
| 69 | }; |
| 70 | |
| 71 | conf-pu { |
| 72 | pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; |
| 73 | drive-strength = <MTK_DRIVE_8mA>; |
| 74 | bias-pull-down = <MTK_PUPD_SET_R1R0_00>; |
| 75 | }; |
| 76 | |
| 77 | conf-pd { |
| 78 | pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; |
| 79 | drive-strength = <MTK_DRIVE_8mA>; |
| 80 | bias-pull-down = <MTK_PUPD_SET_R1R0_00>; |
| 81 | }; |
| 82 | }; |
| 83 | |
| 84 | spic_pins: spi1-pins-func-1 { |
| 85 | mux { |
| 86 | function = "spi"; |
| 87 | groups = "spi1_1"; |
| 88 | }; |
| 89 | }; |
| 90 | |
| 91 | uart1_pins: spi1-pins-func-3 { |
| 92 | mux { |
| 93 | function = "uart"; |
| 94 | groups = "uart1_2"; |
| 95 | }; |
| 96 | }; |
| 97 | |
| 98 | /* pin15 as pwm0 */ |
| 99 | one_pwm_pins: one-pwm-pins { |
| 100 | mux { |
| 101 | function = "pwm"; |
| 102 | groups = "pwm0_1"; |
| 103 | }; |
| 104 | }; |
| 105 | |
| 106 | /* pin15 as pwm0 and pin14 as pwm1 */ |
| 107 | two_pwm_pins: two-pwm-pins { |
| 108 | mux { |
| 109 | function = "pwm"; |
| 110 | groups = "pwm0_1", "pwm1_0"; |
| 111 | }; |
| 112 | }; |
| 113 | |
| 114 | /* pin15 as pwm0, pin14 as pwm1, pin7 as pwm2 */ |
| 115 | three_pwm_pins: three-pwm-pins { |
| 116 | mux { |
| 117 | function = "pwm"; |
| 118 | groups = "pwm0_1", "pwm1_0", "pwm2"; |
| 119 | }; |
| 120 | }; |
| 121 | }; |
| 122 | |
| 123 | &spi0 { |
| 124 | #address-cells = <1>; |
| 125 | #size-cells = <0>; |
| 126 | pinctrl-names = "default"; |
| 127 | pinctrl-0 = <&spi_flash_pins>; |
| 128 | status = "okay"; |
| 129 | must_tx; |
| 130 | enhance_timing; |
| 131 | dma_ext; |
| 132 | ipm_design; |
| 133 | support_quad; |
| 134 | tick_dly = <2>; |
| 135 | sample_sel = <0>; |
| 136 | |
| 137 | spi_nand@0 { |
| 138 | compatible = "spi-nand"; |
| 139 | reg = <0>; |
| 140 | spi-max-frequency = <52000000>; |
| 141 | }; |
| 142 | }; |
| 143 | |
| 144 | &spi2 { |
| 145 | #address-cells = <1>; |
| 146 | #size-cells = <0>; |
| 147 | pinctrl-names = "default"; |
| 148 | pinctrl-0 = <&spi2_flash_pins>; |
| 149 | status = "okay"; |
| 150 | must_tx; |
| 151 | enhance_timing; |
| 152 | dma_ext; |
| 153 | ipm_design; |
| 154 | support_quad; |
| 155 | tick_dly = <2>; |
| 156 | sample_sel = <0>; |
| 157 | |
| 158 | spi_nor@0 { |
| 159 | compatible = "jedec,spi-nor"; |
| 160 | reg = <0>; |
| 161 | spi-max-frequency = <52000000>; |
| 162 | }; |
| 163 | }; |
| 164 | |
| 165 | &pwm { |
| 166 | pinctrl-names = "default"; |
| 167 | pinctrl-0 = <&two_pwm_pins>; |
| 168 | status = "okay"; |
| 169 | }; |
| 170 | |
| 171 | &watchdog { |
| 172 | status = "disabled"; |
| 173 | }; |