Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Copyright (C) 2014 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
0004  * Copyright (C) 2009 Simon Guinot <sguinot@lacie.com>
0005  */
0006 
0007 /dts-v1/;
0008 
0009 #include <dt-bindings/gpio/gpio.h>
0010 #include <dt-bindings/input/input.h>
0011 #include <dt-bindings/interrupt-controller/irq.h>
0012 #include "orion5x-mv88f5182.dtsi"
0013 
0014 / {
0015         model = "LaCie d2 Network";
0016         compatible = "lacie,d2-network", "marvell,orion5x-88f5182", "marvell,orion5x";
0017 
0018         memory {
0019                 device_type = "memory";
0020                 reg = <0x00000000 0x4000000>; /* 64 MB */
0021         };
0022 
0023         chosen {
0024                 bootargs = "console=ttyS0,115200n8 earlyprintk";
0025                 stdout-path = &uart0;
0026         };
0027 
0028         soc {
0029                 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000>,
0030                          <MBUS_ID(0x09, 0x00) 0 0xf2200000 0x800>,
0031                          <MBUS_ID(0x01, 0x0f) 0 0xfff80000 0x80000>;
0032         };
0033 
0034         gpio-keys {
0035                 compatible = "gpio-keys";
0036                 pinctrl-0 = <&pmx_buttons>;
0037                 pinctrl-names = "default";
0038                 #address-cells = <1>;
0039                 #size-cells = <0>;
0040                 front_button {
0041                         label = "Front Push Button";
0042                         linux,code = <KEY_POWER>;
0043                         gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
0044                 };
0045 
0046                 power_rocker_sw_on {
0047                         label = "Power rocker switch (on|auto)";
0048                         linux,input-type = <5>; /* EV_SW */
0049                         linux,code = <1>; /* D2NET_SWITCH_POWER_ON */
0050                         gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
0051                 };
0052 
0053                 power_rocker_sw_off {
0054                         label = "Power rocker switch (auto|off)";
0055                         linux,input-type = <5>; /* EV_SW */
0056                         linux,code = <2>; /* D2NET_SWITCH_POWER_OFF */
0057                         gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
0058                 };
0059         };
0060 
0061         regulators {
0062                 compatible = "simple-bus";
0063                 #address-cells = <1>;
0064                 #size-cells = <0>;
0065                 pinctrl-0 = <&pmx_sata0_power &pmx_sata1_power>;
0066                 pinctrl-names = "default";
0067 
0068                 sata0_power: regulator@0 {
0069                         compatible = "regulator-fixed";
0070                         reg = <0>;
0071                         regulator-name = "SATA0 Power";
0072                         regulator-min-microvolt = <5000000>;
0073                         regulator-max-microvolt = <5000000>;
0074                         enable-active-high;
0075                         regulator-always-on;
0076                         regulator-boot-on;
0077                         gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>;
0078                 };
0079 
0080                 sata1_power: regulator@1 {
0081                         compatible = "regulator-fixed";
0082                         reg = <1>;
0083                         regulator-name = "SATA1 Power";
0084                         regulator-min-microvolt = <5000000>;
0085                         regulator-max-microvolt = <5000000>;
0086                         enable-active-high;
0087                         regulator-always-on;
0088                         regulator-boot-on;
0089                         gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
0090                 };
0091         };
0092 };
0093 
0094 &devbus_bootcs {
0095         status = "okay";
0096 
0097         devbus,keep-config;
0098 
0099         /*
0100          * Currently the MTD code does not recognize the MX29LV400CBCT
0101          * as a bottom-type device. This could cause risks of
0102          * accidentally erasing critical flash sectors. We thus define
0103          * a single, write-protected partition covering the whole
0104          * flash.  TODO: once the flash part TOP/BOTTOM detection
0105          * issue is sorted out in the MTD code, break this into at
0106          * least three partitions: 'u-boot code', 'u-boot environment'
0107          * and 'whatever is left'.
0108          */
0109         flash@0 {
0110                 compatible = "cfi-flash";
0111                 reg = <0 0x80000>;
0112                 bank-width = <1>;
0113                 #address-cells = <1>;
0114                 #size-cells = <1>;
0115 
0116                 partition@0 {
0117                         label = "Full512Kb";
0118                         reg = <0 0x80000>;
0119                         read-only;
0120                 };
0121         };
0122 };
0123 
0124 &mdio {
0125         status = "okay";
0126 
0127         ethphy: ethernet-phy {
0128                 reg = <8>;
0129         };
0130 };
0131 
0132 &ehci0 {
0133         status = "okay";
0134 };
0135 
0136 &eth {
0137         status = "okay";
0138 
0139         ethernet-port@0 {
0140                 phy-handle = <&ethphy>;
0141         };
0142 };
0143 
0144 &i2c {
0145         status = "okay";
0146         clock-frequency = <100000>;
0147         #address-cells = <1>;
0148 
0149         rtc@32 {
0150                 compatible = "ricoh,rs5c372b";
0151                 reg = <0x32>;
0152         };
0153 
0154         fan@3e {
0155                 compatible = "gmt,g762";
0156                 reg = <0x3e>;
0157 
0158                 /* Not enough HW info */
0159                 status = "disabled";
0160         };
0161 
0162         eeprom@50 {
0163                 compatible = "atmel,24c08";
0164                 reg = <0x50>;
0165         };
0166 };
0167 
0168 &pinctrl {
0169         pinctrl-0 = <&pmx_leds &pmx_board_id &pmx_fan_fail>;
0170         pinctrl-names = "default";
0171 
0172         pmx_board_id: pmx-board-id {
0173                 marvell,pins = "mpp0", "mpp1", "mpp2";
0174                 marvell,function = "gpio";
0175         };
0176 
0177         pmx_buttons: pmx-buttons {
0178                 marvell,pins = "mpp8", "mpp9", "mpp18";
0179                 marvell,function = "gpio";
0180         };
0181 
0182         pmx_fan_fail: pmx-fan-fail {
0183                 marvell,pins = "mpp5";
0184                 marvell,function = "gpio";
0185         };
0186 
0187         /*
0188          * MPP6: Red front LED
0189          * MPP16: Blue front LED blink control
0190          */
0191         pmx_leds: pmx-leds {
0192                 marvell,pins = "mpp6", "mpp16";
0193                 marvell,function = "gpio";
0194         };
0195 
0196         pmx_sata0_led_active: pmx-sata0-led-active {
0197                 marvell,pins = "mpp14";
0198                 marvell,function = "sata0";
0199         };
0200 
0201         pmx_sata0_power: pmx-sata0-power {
0202                 marvell,pins = "mpp3";
0203                 marvell,function = "gpio";
0204         };
0205 
0206         pmx_sata1_led_active: pmx-sata1-led-active {
0207                 marvell,pins = "mpp15";
0208                 marvell,function = "sata1";
0209         };
0210 
0211         pmx_sata1_power: pmx-sata1-power {
0212                 marvell,pins = "mpp12";
0213                 marvell,function = "gpio";
0214         };
0215 
0216         /*
0217          * Non MPP GPIOs:
0218          *  GPIO 22: USB port 1 fuse (0 = Fail, 1 = Ok)
0219          *  GPIO 23: Blue front LED off
0220          *  GPIO 24: Inhibit board power off (0 = Disabled, 1 = Enabled)
0221          */
0222 };
0223 
0224 &sata {
0225         pinctrl-0 = <&pmx_sata0_led_active
0226                      &pmx_sata1_led_active>;
0227         pinctrl-names = "default";
0228         status = "okay";
0229         nr-ports = <2>;
0230 };
0231 
0232 &uart0 {
0233         status = "okay";
0234 };