Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright (c) 2019 MediaTek Inc.
0004  * Author: Ryder Lee <ryder.lee@mediatek.com>
0005  */
0006 
0007 /dts-v1/;
0008 #include <dt-bindings/input/input.h>
0009 #include "mt7629.dtsi"
0010 
0011 / {
0012         model = "MediaTek MT7629 reference board";
0013         compatible = "mediatek,mt7629-rfb", "mediatek,mt7629";
0014 
0015         aliases {
0016                 serial0 = &uart0;
0017         };
0018 
0019         chosen {
0020                 stdout-path = "serial0:115200n8";
0021         };
0022 
0023         gpio-keys {
0024                 compatible = "gpio-keys";
0025 
0026                 button-reset {
0027                         label = "factory";
0028                         linux,code = <KEY_RESTART>;
0029                         gpios = <&pio 60 GPIO_ACTIVE_LOW>;
0030                 };
0031 
0032                 button-wps {
0033                         label = "wps";
0034                         linux,code = <KEY_WPS_BUTTON>;
0035                         gpios = <&pio 58 GPIO_ACTIVE_LOW>;
0036                 };
0037         };
0038 
0039         memory@40000000 {
0040                 device_type = "memory";
0041                 reg = <0x40000000 0x10000000>;
0042         };
0043 
0044         reg_3p3v: regulator-3p3v {
0045                 compatible = "regulator-fixed";
0046                 regulator-name = "fixed-3.3V";
0047                 regulator-min-microvolt = <3300000>;
0048                 regulator-max-microvolt = <3300000>;
0049                 regulator-boot-on;
0050                 regulator-always-on;
0051         };
0052 
0053         reg_5v: regulator-5v {
0054                 compatible = "regulator-fixed";
0055                 regulator-name = "fixed-5V";
0056                 regulator-min-microvolt = <5000000>;
0057                 regulator-max-microvolt = <5000000>;
0058                 regulator-boot-on;
0059                 regulator-always-on;
0060         };
0061 };
0062 
0063 &eth {
0064         pinctrl-names = "default";
0065         pinctrl-0 = <&eth_pins>;
0066         pinctrl-1 = <&ephy_leds_pins>;
0067         status = "okay";
0068 
0069         gmac0: mac@0 {
0070                 compatible = "mediatek,eth-mac";
0071                 reg = <0>;
0072                 phy-mode = "2500base-x";
0073                 fixed-link {
0074                         speed = <2500>;
0075                         full-duplex;
0076                         pause;
0077                 };
0078         };
0079 
0080         gmac1: mac@1 {
0081                 compatible = "mediatek,eth-mac";
0082                 reg = <1>;
0083                 phy-mode = "gmii";
0084                 phy-handle = <&phy0>;
0085         };
0086 
0087         mdio: mdio-bus {
0088                 #address-cells = <1>;
0089                 #size-cells = <0>;
0090 
0091                 phy0: ethernet-phy@0 {
0092                         reg = <0>;
0093                 };
0094         };
0095 };
0096 
0097 &i2c {
0098         pinctrl-names = "default";
0099         pinctrl-0 = <&i2c_pins>;
0100         status = "okay";
0101 };
0102 
0103 &qspi {
0104         pinctrl-names = "default";
0105         pinctrl-0 = <&qspi_pins>;
0106         status = "okay";
0107 
0108         flash@0 {
0109                 compatible = "jedec,spi-nor";
0110                 reg = <0>;
0111 
0112                 partitions {
0113                         compatible = "fixed-partitions";
0114                         #address-cells = <1>;
0115                         #size-cells = <1>;
0116 
0117                         partition@0 {
0118                                 label = "u-boot";
0119                                 reg = <0x00000 0x60000>;
0120                                 read-only;
0121                         };
0122 
0123                         partition@60000 {
0124                                 label = "u-boot-env";
0125                                 reg = <0x60000 0x10000>;
0126                                 read-only;
0127                         };
0128 
0129                         factory: partition@70000 {
0130                                 label = "factory";
0131                                 reg = <0x70000 0x40000>;
0132                                 read-only;
0133                         };
0134 
0135                         partition@b0000 {
0136                                 label = "kernel";
0137                                 reg = <0xb0000 0xb50000>;
0138                         };
0139                 };
0140         };
0141 };
0142 
0143 &pcie1 {
0144         pinctrl-names = "default";
0145         pinctrl-0 = <&pcie_pins>;
0146         status = "okay";
0147 };
0148 
0149 &pciephy1 {
0150         status = "okay";
0151 };
0152 
0153 &pio {
0154         eth_pins: eth-pins {
0155                 mux {
0156                         function = "eth";
0157                         groups = "mdc_mdio";
0158                 };
0159         };
0160 
0161         ephy_leds_pins: ephy-leds-pins {
0162                 mux {
0163                         function = "led";
0164                         groups = "gphy_leds_0", "ephy_leds";
0165                 };
0166         };
0167 
0168         i2c_pins: i2c-pins {
0169                 mux {
0170                         function = "i2c";
0171                         groups =  "i2c_0";
0172                 };
0173 
0174                 conf {
0175                         pins = "I2C_SDA", "I2C_SCL";
0176                         drive-strength = <4>;
0177                         bias-disable;
0178                 };
0179         };
0180 
0181         pcie_pins: pcie-pins {
0182                 mux {
0183                         function = "pcie";
0184                         groups = "pcie_clkreq",
0185                                  "pcie_pereset",
0186                                  "pcie_wake";
0187                 };
0188         };
0189 
0190         pwm_pins: pwm-pins {
0191                 mux {
0192                         function = "pwm";
0193                         groups = "pwm_0";
0194                 };
0195         };
0196 
0197         /* SPI-NOR is shared pin with serial NAND */
0198         qspi_pins: qspi-pins {
0199                 mux {
0200                         function = "flash";
0201                         groups = "spi_nor";
0202                 };
0203         };
0204 
0205         /* Serial NAND is shared pin with SPI-NOR */
0206         serial_nand_pins: serial-nand-pins {
0207                 mux {
0208                         function = "flash";
0209                         groups = "snfi";
0210                 };
0211         };
0212 
0213         spi_pins: spi-pins {
0214                 mux {
0215                         function = "spi";
0216                         groups = "spi_0";
0217                 };
0218         };
0219 
0220         uart0_pins: uart0-pins {
0221                 mux {
0222                         function = "uart";
0223                         groups = "uart0_txd_rxd" ;
0224                 };
0225         };
0226 
0227         uart1_pins: uart1-pins {
0228                 mux {
0229                         function = "uart";
0230                         groups = "uart1_0_tx_rx" ;
0231                 };
0232         };
0233 
0234         uart2_pins: uart2-pins {
0235                 mux {
0236                         function = "uart";
0237                         groups = "uart2_0_txd_rxd" ;
0238                 };
0239         };
0240 
0241         watchdog_pins: watchdog-pins {
0242                 mux {
0243                         function = "watchdog";
0244                         groups = "watchdog";
0245                 };
0246         };
0247 };
0248 
0249 &spi {
0250         pinctrl-names = "default";
0251         pinctrl-0 = <&spi_pins>;
0252         status = "okay";
0253 };
0254 
0255 &ssusb {
0256         vusb33-supply = <&reg_3p3v>;
0257         vbus-supply = <&reg_5v>;
0258         status = "okay";
0259 };
0260 
0261 &u3phy0 {
0262         status = "okay";
0263 };
0264 
0265 &uart0 {
0266         pinctrl-names = "default";
0267         pinctrl-0 = <&uart0_pins>;
0268         status = "okay";
0269 };
0270 
0271 &watchdog {
0272         pinctrl-names = "default";
0273         pinctrl-0 = <&watchdog_pins>;
0274         status = "okay";
0275 };