Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Device Tree file for Lenovo Iomega ix4-300d
0004  *
0005  * Copyright (C) 2014, Benoit Masson <yahoo@perenite.com>
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 = "Lenovo Iomega ix4-300d";
0016         compatible = "lenovo,ix4-300d", "marvell,armadaxp-mv78230",
0017                      "marvell,armadaxp", "marvell,armada-370-xp";
0018 
0019         chosen {
0020                 stdout-path = "serial0:115200n8";
0021         };
0022 
0023         memory@0 {
0024                 device_type = "memory";
0025                 reg = <0 0x00000000 0 0x20000000>; /* 512MB */
0026         };
0027 
0028         soc {
0029                 ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000
0030                         MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
0031                         MBUS_ID(0x09, 0x09) 0 0 0xf1100000 0x10000
0032                         MBUS_ID(0x09, 0x05) 0 0 0xf1110000 0x10000>;
0033 
0034                 internal-regs {
0035                         serial@12000 {
0036                                 status = "okay";
0037                         };
0038 
0039                         ethernet@70000 {
0040                                 pinctrl-0 = <&ge0_rgmii_pins>;
0041                                 pinctrl-names = "default";
0042                                 status = "okay";
0043                                 phy = <&phy0>;
0044                                 phy-mode = "rgmii-id";
0045                         };
0046 
0047                         ethernet@74000 {
0048                                 pinctrl-0 = <&ge1_rgmii_pins>;
0049                                 pinctrl-names = "default";
0050                                 status = "okay";
0051                                 phy = <&phy1>;
0052                                 phy-mode = "rgmii-id";
0053                         };
0054 
0055                         usb@50000 {
0056                                 status = "okay";
0057                         };
0058 
0059                         usb@51000 {
0060                                 status = "okay";
0061                         };
0062 
0063                         i2c@11000 {
0064                                 clock-frequency = <400000>;
0065                                 status = "okay";
0066 
0067                                 adt7473@2e {
0068                                         compatible = "adi,adt7473";
0069                                         reg = <0x2e>;
0070                                 };
0071 
0072                                 eeprom@50 {
0073                                         compatible = "atmel,24c64";
0074                                         reg = <0x50>;
0075                                 };
0076 
0077                                 pcf8563@51 {
0078                                         compatible = "nxp,pcf8563";
0079                                         reg = <0x51>;
0080                                 };
0081 
0082                         };
0083 
0084                         nand-controller@d0000 {
0085                                 status = "okay";
0086 
0087                                 nand@0 {
0088                                         reg = <0>;
0089                                         label = "pxa3xx_nand-0";
0090                                         nand-rb = <0>;
0091                                         nand-on-flash-bbt;
0092 
0093                                         partitions {
0094                                                 compatible = "fixed-partitions";
0095                                                 #address-cells = <1>;
0096                                                 #size-cells = <1>;
0097 
0098                                                 partition@0 {
0099                                                         label = "u-boot";
0100                                                         reg = <0x00000000 0x000e0000>;
0101                                                         read-only;
0102                                                 };
0103 
0104                                                 partition@e0000 {
0105                                                         label = "u-boot-env";
0106                                                         reg = <0x000e0000 0x00020000>;
0107                                                         read-only;
0108                                                 };
0109 
0110                                                 partition@100000 {
0111                                                         label = "u-boot-env2";
0112                                                         reg = <0x00100000 0x00020000>;
0113                                                         read-only;
0114                                                 };
0115 
0116                                                 partition@120000 {
0117                                                         label = "zImage";
0118                                                         reg = <0x00120000 0x00400000>;
0119                                                 };
0120 
0121                                                 partition@520000 {
0122                                                         label = "initrd";
0123                                                         reg = <0x00520000 0x00400000>;
0124                                                 };
0125 
0126                                                 partition@e00000 {
0127                                                         label = "boot";
0128                                                         reg = <0x00e00000 0x3f200000>;
0129                                                 };
0130                                         };
0131                                 };
0132                         };
0133                 };
0134         };
0135 
0136         gpio-keys {
0137                 compatible = "gpio-keys";
0138                 pinctrl-0 = <&power_button_pin &reset_button_pin
0139                         &select_button_pin &scroll_button_pin>;
0140                 pinctrl-names = "default";
0141 
0142                 power-button {
0143                         label = "Power Button";
0144                         linux,code = <KEY_POWER>;
0145                         gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
0146                 };
0147 
0148                 reset-button {
0149                         label = "Reset Button";
0150                         linux,code = <KEY_RESTART>;
0151                         gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
0152                 };
0153 
0154                 select-button {
0155                         label = "Select Button";
0156                         linux,code = <BTN_SELECT>;
0157                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
0158                 };
0159 
0160                 scroll-button {
0161                         label = "Scroll Button";
0162                         linux,code = <KEY_SCROLLDOWN>;
0163                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
0164                 };
0165         };
0166 
0167         spi3 {
0168                 compatible = "spi-gpio";
0169                 status = "okay";
0170                 gpio-sck = <&gpio0 25 GPIO_ACTIVE_LOW>;
0171                 gpio-mosi = <&gpio1 15 GPIO_ACTIVE_LOW>; /*gpio 47*/
0172                 cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
0173                 num-chipselects = <1>;
0174                 #address-cells = <1>;
0175                 #size-cells = <0>;
0176 
0177                 gpio_spi: gpio_spi@0 {
0178                         compatible = "fairchild,74hc595";
0179                         gpio-controller;
0180                         #gpio-cells = <2>;
0181                         reg = <0>;
0182                         registers-number = <1>;
0183                         spi-max-frequency = <100000>;
0184                 };
0185         };
0186 
0187         gpio-leds {
0188                 compatible = "gpio-leds";
0189                 pinctrl-0 = <&hdd_led_pin>;
0190                 pinctrl-names = "default";
0191 
0192                 hdd-led {
0193                         label = "ix4-300d:hdd:blue";
0194                         gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
0195                         default-state = "off";
0196                 };
0197 
0198                 power-led {
0199                         label = "ix4-300d:power:white";
0200                         gpios = <&gpio_spi 1 GPIO_ACTIVE_LOW>;
0201                         /* init blinking while booting */
0202                         linux,default-trigger = "timer";
0203                         default-state = "on";
0204                 };
0205 
0206                 sysfail-led {
0207                         label = "ix4-300d:sysfail:red";
0208                         gpios = <&gpio_spi 2 GPIO_ACTIVE_HIGH>;
0209                         default-state = "off";
0210                 };
0211 
0212                 sys-led {
0213                         label = "ix4-300d:sys:blue";
0214                         gpios = <&gpio_spi 3 GPIO_ACTIVE_HIGH>;
0215                         default-state = "off";
0216                 };
0217 
0218                 hddfail-led {
0219                         label = "ix4-300d:hddfail:red";
0220                         gpios = <&gpio_spi 4 GPIO_ACTIVE_HIGH>;
0221                         default-state = "off";
0222                 };
0223 
0224         };
0225 
0226         /*
0227          * Warning: you need both eth1 & 0 PHY initialized (i.e having
0228          * them up does the tweak) for poweroff to shutdown otherwise it
0229          * reboots
0230          */
0231         gpio-poweroff {
0232                 compatible = "gpio-poweroff";
0233                 pinctrl-0 = <&poweroff_pin>;
0234                 pinctrl-names = "default";
0235                 gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
0236         };
0237 };
0238 &pciec {
0239         status = "okay";
0240 
0241         /* Quad port sata: Marvell 88SX7042 */
0242         pcie@1,0 {
0243                 /* Port 0, Lane 0 */
0244                 status = "okay";
0245         };
0246 
0247         /* USB 3.0 xHCI controller: NEC D720200F1 */
0248         pcie@5,0 {
0249                 /* Port 1, Lane 0 */
0250                 status = "okay";
0251         };
0252 };
0253 
0254 &mdio {
0255         phy0: ethernet-phy@0 { /* Marvell 88E1318 */
0256                 reg = <0>;
0257         };
0258 
0259         phy1: ethernet-phy@1 { /* Marvell 88E1318 */
0260                 reg = <1>;
0261         };
0262 };
0263 
0264 &pinctrl {
0265         poweroff_pin: poweroff-pin {
0266                 marvell,pins = "mpp24";
0267                 marvell,function = "gpio";
0268         };
0269 
0270         power_button_pin: power-button-pin {
0271                 marvell,pins = "mpp44";
0272                 marvell,function = "gpio";
0273         };
0274 
0275         reset_button_pin: reset-button-pin {
0276                 marvell,pins = "mpp45";
0277                 marvell,function = "gpio";
0278         };
0279         select_button_pin: select-button-pin {
0280                 marvell,pins = "mpp41";
0281                 marvell,function = "gpio";
0282         };
0283 
0284         scroll_button_pin: scroll-button-pin {
0285                 marvell,pins = "mpp42";
0286                 marvell,function = "gpio";
0287         };
0288 
0289         hdd_led_pin: hdd-led-pin {
0290                 marvell,pins = "mpp26";
0291                 marvell,function = "gpio";
0292         };
0293 };