Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Device Tree file for NETGEAR ReadyNAS 2120
0004  *
0005  * Copyright (C) 2013, Arnaud EBALARD <arno@natisbad.org>
0006  */
0007 
0008 /dts-v1/;
0009 
0010 #include <dt-bindings/input/input.h>
0011 #include <dt-bindings/gpio/gpio.h>
0012 #include "armada-xp-mv78230.dtsi"
0013 
0014 / {
0015         model = "NETGEAR ReadyNAS 2120";
0016         compatible = "netgear,readynas-2120", "marvell,armadaxp-mv78230", "marvell,armadaxp", "marvell,armada-370-xp";
0017 
0018         chosen {
0019                 stdout-path = "serial0:115200n8";
0020         };
0021 
0022         memory@0 {
0023                 device_type = "memory";
0024                 reg = <0 0x00000000 0 0x80000000>; /* 2GB */
0025         };
0026 
0027         soc {
0028                 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
0029                           MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
0030                           MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
0031                           MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
0032 
0033                 internal-regs {
0034 
0035                         /* RTC is provided by Intersil ISL12057 I2C RTC chip */
0036                         rtc@10300 {
0037                                 status = "disabled";
0038                         };
0039 
0040                         i2c@11000 {
0041                                 clock-frequency = <400000>;
0042                                 status = "okay";
0043 
0044                                 /* Controller for rear fan #1 of 3 (Protechnic
0045                                  * MGT4012XB-O20, 8000RPM) near eSATA port */
0046                                 g762_fan1: g762@3e {
0047                                         compatible = "gmt,g762";
0048                                         reg = <0x3e>;
0049                                         clocks = <&g762_clk>; /* input clock */
0050                                         fan_gear_mode = <0>;
0051                                         fan_startv = <1>;
0052                                         pwm_polarity = <0>;
0053                                 };
0054 
0055                                 /*  Controller for rear (center) fan #2 of 3 */
0056                                 g762_fan2: g762@48 {
0057                                         compatible = "gmt,g762";
0058                                         reg = <0x48>;
0059                                         clocks = <&g762_clk>; /* input clock */
0060                                         fan_gear_mode = <0>;
0061                                         fan_startv = <1>;
0062                                         pwm_polarity = <0>;
0063                                 };
0064 
0065                                 /*  Controller for rear fan #3 of 3 */
0066                                 g762_fan3: g762@49 {
0067                                         compatible = "gmt,g762";
0068                                         reg = <0x49>;
0069                                         clocks = <&g762_clk>; /* input clock */
0070                                         fan_gear_mode = <0>;
0071                                         fan_startv = <1>;
0072                                         pwm_polarity = <0>;
0073                                 };
0074 
0075                                 /* Temperature sensor */
0076                                 g751: g751@4c {
0077                                         compatible = "gmt,g751";
0078                                         reg = <0x4c>;
0079                                 };
0080 
0081                                 isl12057: rtc@68 {
0082                                         compatible = "isil,isl12057";
0083                                         reg = <0x68>;
0084                                         wakeup-source;
0085                                 };
0086                         };
0087 
0088                         serial@12000 {
0089                                 status = "okay";
0090                         };
0091 
0092                         /* Front USB 2.0 port */
0093                         usb@50000 {
0094                                 status = "okay";
0095                         };
0096 
0097                         ethernet@70000 {
0098                                 pinctrl-0 = <&ge0_rgmii_pins>;
0099                                 pinctrl-names = "default";
0100 
0101                                 status = "okay";
0102                                 phy = <&phy0>;
0103                                 phy-mode = "rgmii-id";
0104                         };
0105 
0106                         ethernet@74000 {
0107                                 pinctrl-0 = <&ge1_rgmii_pins>;
0108                                 pinctrl-names = "default";
0109 
0110                                 status = "okay";
0111                                 phy = <&phy1>;
0112                                 phy-mode = "rgmii-id";
0113                         };
0114 
0115                         /* Two rear eSATA ports */
0116                         sata@a0000 {
0117                                 nr-ports = <2>;
0118                                 status = "okay";
0119                         };
0120                 };
0121         };
0122 
0123         clocks {
0124                g762_clk: g762-oscillator {
0125                          compatible = "fixed-clock";
0126                          #clock-cells = <0>;
0127                          clock-frequency = <32768>;
0128                };
0129         };
0130 
0131         gpio-leds {
0132                 compatible = "gpio-leds";
0133                 pinctrl-0 = <&sata1_led_pin &sata2_led_pin &err_led_pin
0134                              &sata3_led_pin &sata4_led_pin>;
0135                 pinctrl-names = "default";
0136 
0137                 red-sata1-led {
0138                         label = "rn2120:red:sata1";
0139                         gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
0140                         default-state = "off";
0141                 };
0142 
0143                 red-sata2-led {
0144                         label = "rn2120:red:sata2";
0145                         gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
0146                         default-state = "off";
0147                 };
0148 
0149                 red-sata3-led {
0150                         label = "rn2120:red:sata3";
0151                         gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
0152                         default-state = "off";
0153                 };
0154 
0155                 red-sata4-led {
0156                         label = "rn2120:red:sata4";
0157                         gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
0158                         default-state = "off";
0159                 };
0160 
0161                 red-err-led {
0162                         label = "rn2120:red:err";
0163                         gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
0164                         default-state = "off";
0165                 };
0166         };
0167 
0168         gpio-keys {
0169                 compatible = "gpio-keys";
0170                 pinctrl-0 = <&power_button_pin &reset_button_pin>;
0171                 pinctrl-names = "default";
0172 
0173                 power-button {
0174                         label = "Power Button";
0175                         linux,code = <KEY_POWER>;
0176                         gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
0177                 };
0178 
0179                 reset-button {
0180                         label = "Reset Button";
0181                         linux,code = <KEY_RESTART>;
0182                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
0183                 };
0184         };
0185 
0186         gpio-poweroff {
0187                 compatible = "gpio-poweroff";
0188                 pinctrl-0 = <&poweroff>;
0189                 pinctrl-names = "default";
0190                 gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
0191         };
0192 };
0193 
0194 &pciec {
0195         status = "okay";
0196 
0197         /* Connected to first Marvell 88SE9170 SATA controller */
0198         pcie@1,0 {
0199                 /* Port 0, Lane 0 */
0200                 status = "okay";
0201         };
0202 
0203         /* Connected to second Marvell 88SE9170 SATA controller */
0204         pcie@2,0 {
0205                 /* Port 0, Lane 1 */
0206                 status = "okay";
0207         };
0208 
0209         /* Connected to Fresco Logic FL1009 USB 3.0 controller */
0210         pcie@5,0 {
0211                 /* Port 1, Lane 0 */
0212                 status = "okay";
0213         };
0214 };
0215 
0216 &mdio {
0217         phy0: ethernet-phy@0 { /* Marvell 88E1318 */
0218                 reg = <0>;
0219         };
0220 
0221         phy1: ethernet-phy@1 { /* Marvell 88E1318 */
0222                 reg = <1>;
0223         };
0224 };
0225 
0226 
0227 &pinctrl {
0228         poweroff: poweroff {
0229                 marvell,pins = "mpp42";
0230                 marvell,function = "gpio";
0231         };
0232 
0233         power_button_pin: power-button-pin {
0234                 marvell,pins = "mpp27";
0235                 marvell,function = "gpio";
0236         };
0237 
0238         reset_button_pin: reset-button-pin {
0239                 marvell,pins = "mpp41";
0240                 marvell,function = "gpio";
0241         };
0242 
0243         sata1_led_pin: sata1-led-pin {
0244                 marvell,pins = "mpp31";
0245                 marvell,function = "gpio";
0246         };
0247 
0248         sata2_led_pin: sata2-led-pin {
0249                 marvell,pins = "mpp40";
0250                 marvell,function = "gpio";
0251         };
0252 
0253         sata3_led_pin: sata3-led-pin {
0254                 marvell,pins = "mpp44";
0255                 marvell,function = "gpio";
0256         };
0257 
0258         sata4_led_pin: sata4-led-pin {
0259                 marvell,pins = "mpp47";
0260                 marvell,function = "gpio";
0261         };
0262 
0263         sata1_power_pin: sata1-power-pin {
0264                 marvell,pins = "mpp24";
0265                 marvell,function = "gpio";
0266         };
0267 
0268         sata2_power_pin: sata2-power-pin {
0269                 marvell,pins = "mpp25";
0270                 marvell,function = "gpio";
0271         };
0272 
0273         sata3_power_pin: sata3-power-pin {
0274                 marvell,pins = "mpp26";
0275                 marvell,function = "gpio";
0276         };
0277 
0278         sata4_power_pin: sata4-power-pin {
0279                 marvell,pins = "mpp28";
0280                 marvell,function = "gpio";
0281         };
0282 
0283         sata1_pres_pin: sata1-pres-pin {
0284                 marvell,pins = "mpp32";
0285                 marvell,function = "gpio";
0286         };
0287 
0288         sata2_pres_pin: sata2-pres-pin {
0289                 marvell,pins = "mpp33";
0290                 marvell,function = "gpio";
0291         };
0292 
0293         sata3_pres_pin: sata3-pres-pin {
0294                 marvell,pins = "mpp34";
0295                 marvell,function = "gpio";
0296         };
0297 
0298         sata4_pres_pin: sata4-pres-pin {
0299                 marvell,pins = "mpp35";
0300                 marvell,function = "gpio";
0301         };
0302 
0303         err_led_pin: err-led-pin {
0304                 marvell,pins = "mpp45";
0305                 marvell,function = "gpio";
0306         };
0307 };
0308 
0309 &nand_controller {
0310         status = "okay";
0311 
0312         nand@0 {
0313                 reg = <0>;
0314                 label = "pxa3xx_nand-0";
0315                 nand-rb = <0>;
0316                 marvell,nand-keep-config;
0317                 nand-on-flash-bbt;
0318 
0319                 /* Use Hardware BCH ECC */
0320                 nand-ecc-strength = <4>;
0321                 nand-ecc-step-size = <512>;
0322 
0323                 partitions {
0324                         compatible = "fixed-partitions";
0325                         #address-cells = <1>;
0326                         #size-cells = <1>;
0327 
0328                         partition@0 {
0329                                 label = "u-boot";
0330                                 reg = <0x0000000 0x180000>;  /* 1.5MB */
0331                                 read-only;
0332                         };
0333 
0334                         partition@180000 {
0335                                 label = "u-boot-env";
0336                                 reg = <0x180000 0x20000>;    /* 128KB */
0337                                 read-only;
0338                         };
0339 
0340                         partition@200000 {
0341                                 label = "uImage";
0342                                 reg = <0x0200000 0x600000>;    /* 6MB */
0343                         };
0344 
0345                         partition@800000 {
0346                                 label = "minirootfs";
0347                                 reg = <0x0800000 0x400000>;    /* 4MB */
0348                         };
0349 
0350                         /* Last MB is for the BBT, i.e. not writable */
0351                         partition@c00000 {
0352                                 label = "ubifs";
0353                                 reg = <0x0c00000 0x7400000>; /* 116MB */
0354                         };
0355                 };
0356         };
0357 };