Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * kirkwood-viper.dts - Device Tree file for Linksys viper (E4200v2 / EA4500)
0004  *
0005  * (c) 2013 Jonas Gorski <jogo@openwrt.org>
0006  * (c) 2013 Deutsche Telekom Innovation Laboratories
0007  * (c) 2014 Luka Perkov <luka@openwrt.org>
0008  * (c) 2014 Randy C. Will <randall.will@gmail.com>
0009  *
0010  */
0011 
0012 /dts-v1/;
0013 
0014 #include "kirkwood.dtsi"
0015 #include "kirkwood-6282.dtsi"
0016 
0017 / {
0018         model = "Linksys Viper (E4200v2 / EA4500)";
0019         compatible = "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";
0020 
0021         memory {
0022                 device_type = "memory";
0023                 reg = <0x00000000 0x8000000>;
0024         };
0025 
0026         aliases {
0027                 serial0 = &uart0;
0028         };
0029 
0030         chosen {
0031                 stdout-path = "serial0:115200n8";
0032         };
0033 
0034         gpio_keys {
0035                 compatible = "gpio-keys";
0036                 #address-cells = <1>;
0037                 #size-cells = <0>;
0038                 pinctrl-0 = < &pmx_btn_wps &pmx_btn_reset >;
0039                 pinctrl-names = "default";
0040 
0041                 wps {
0042                         label = "WPS Button";
0043                         linux,code = <KEY_WPS_BUTTON>;
0044                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
0045                 };
0046 
0047                 reset {
0048                         label = "Reset Button";
0049                         linux,code = <KEY_RESTART>;
0050                         gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
0051                 };
0052         };
0053 
0054         gpio-leds {
0055                 compatible = "gpio-leds";
0056                 pinctrl-0 = < &pmx_led_white_health &pmx_led_white_pulse >;
0057                 pinctrl-names = "default";
0058 
0059                 white-health {
0060                         label = "viper:white:health";
0061                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
0062                 };
0063 
0064                 white-pulse {
0065                         label = "viper:white:pulse";
0066                         gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
0067                 };
0068         };
0069 };
0070 
0071 &pinctrl {
0072         pmx_led_white_health: pmx-led-white-health {
0073                 marvell,pins = "mpp7";
0074                 marvell,function = "gpo";
0075         };
0076         pmx_led_white_pulse: pmx-led-white-pulse {
0077                 marvell,pins = "mpp14";
0078                 marvell,function = "gpio";
0079         };
0080         pmx_btn_wps: pmx-btn-wps {
0081                 marvell,pins = "mpp47";
0082                 marvell,function = "gpio";
0083         };
0084         pmx_btn_reset: pmx-btn-reset {
0085                 marvell,pins = "mpp48";
0086                 marvell,function = "gpio";
0087         };
0088 };
0089 
0090 &nand {
0091         status = "okay";
0092         pinctrl-0 = <&pmx_nand>;
0093         pinctrl-names = "default";
0094 
0095         partitions {
0096                 compatible = "fixed-partitions";
0097                 #address-cells = <1>;
0098                 #size-cells = <1>;
0099 
0100                 partition@0 {
0101                         label = "u-boot";
0102                         reg = <0x0 0x80000>;
0103                         read-only;
0104                 };
0105 
0106                 partition@80000 {
0107                         label = "u_env";
0108                         reg = <0x80000 0x20000>;
0109                 };
0110 
0111                 partition@a0000 {
0112                         label = "s_env";
0113                         reg = <0xA0000 0x20000>;
0114                 };
0115 
0116                 partition@200000 {
0117                         label = "kernel";
0118                         reg = <0x200000 0x2A0000>;
0119                 };
0120 
0121                 partition@4a0000 {
0122                         label = "rootfs";
0123                         reg = <0x4A0000 0x1760000>;
0124                 };
0125 
0126                 partition@1c00000 {
0127                         label = "alt_kernel";
0128                         reg = <0x1C00000 0x2A0000>;
0129                 };
0130 
0131                 partition@1ea0000 {
0132                         label = "alt_rootfs";
0133                         reg = <0x1EA0000 0x1760000>;
0134                 };
0135 
0136                 partition@3600000 {
0137                         label = "syscfg";
0138                         reg = <0x3600000 0x4A00000>;
0139                 };
0140 
0141                 partition@c0000 {
0142                         label = "unused";
0143                         reg = <0xC0000 0x140000>;
0144                 };
0145 
0146         };
0147 };
0148 
0149 &pciec {
0150         status = "okay";
0151 };
0152 
0153 &pcie0 {
0154         status = "okay";
0155 };
0156 
0157 &pcie1 {
0158         status = "okay";
0159 };
0160 
0161 &mdio {
0162         status = "okay";
0163 
0164         switch@10 {
0165                 compatible = "marvell,mv88e6085";
0166                 #address-cells = <1>;
0167                 #size-cells = <0>;
0168                 reg = <16>;
0169 
0170                 ports {
0171                         #address-cells = <1>;
0172                         #size-cells = <0>;
0173 
0174                         port@0 {
0175                                 reg = <0>;
0176                                 label = "ethernet1";
0177                         };
0178 
0179                         port@1 {
0180                                 reg = <1>;
0181                                 label = "ethernet2";
0182                         };
0183 
0184                         port@2 {
0185                                 reg = <2>;
0186                                 label = "ethernet3";
0187                         };
0188 
0189                         port@3 {
0190                                 reg = <3>;
0191                                 label = "ethernet4";
0192                         };
0193 
0194                         port@4 {
0195                                 reg = <4>;
0196                                 label = "internet";
0197                         };
0198 
0199                         port@5 {
0200                                 reg = <5>;
0201                                 label = "cpu";
0202                                 ethernet = <&eth0port>;
0203                                 fixed-link {
0204                                         speed = <1000>;
0205                                         full-duplex;
0206                                 };
0207                         };
0208                 };
0209         };
0210 };
0211 
0212 &uart0 {
0213         status = "okay";
0214 };
0215 
0216 /* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
0217  * fixed speed and duplex.
0218  */
0219 &eth0 {
0220         status = "okay";
0221         ethernet0-port@0 {
0222                 speed = <1000>;
0223                 duplex = <1>;
0224         };
0225 };
0226 
0227 /* eth1 is connected to the switch at port 6. However DSA only supports a
0228  * single CPU port. So leave this port disabled to avoid confusion.
0229  */
0230 &eth1 {
0231         status = "disabled";
0232 };
0233 
0234 /* There is no battery on the board, so the RTC does not keep
0235  * time when there is no power, making it useless.
0236  */
0237 &rtc {
0238         status = "disabled";
0239 };
0240