Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Device Tree common file for kirkwood-6282 based Buffalo Linkstation
0004  *
0005  * Copyright (C) 2015, 2016
0006  * Roger Shimizu <rogershimizu@gmail.com>
0007  */
0008 
0009 #include "kirkwood.dtsi"
0010 #include "kirkwood-6282.dtsi"
0011 #include "kirkwood-linkstation.dtsi"
0012 
0013 / {
0014         ocp@f1000000 {
0015                 pinctrl: pin-controller@10000 {
0016                         pmx_power_hdd0: pmx-power-hdd0 {
0017                                 marvell,pins = "mpp8";
0018                                 marvell,function = "gpio";
0019                         };
0020                         pmx_usb_vbus: pmx-usb-vbus {
0021                                 marvell,pins = "mpp12";
0022                                 marvell,function = "gpio";
0023                         };
0024                         pmx_fan_high: pmx-fan-high {
0025                                 marvell,pins = "mpp16";
0026                                 marvell,function = "gpio";
0027                         };
0028                         pmx_fan_low: pmx-fan-low {
0029                                 marvell,pins = "mpp17";
0030                                 marvell,function = "gpio";
0031                         };
0032                         pmx_led_alarm: pmx-led-alarm {
0033                                 marvell,pins = "mpp36";
0034                                 marvell,function = "gpio";
0035                         };
0036                         pmx_led_function_red: pmx-led-function-red {
0037                                 marvell,pins = "mpp37";
0038                                 marvell,function = "gpio";
0039                         };
0040                         pmx_led_info: pmx-led-info {
0041                                 marvell,pins = "mpp38";
0042                                 marvell,function = "gpio";
0043                         };
0044                         pmx_led_function_blue: pmx-led-function-blue {
0045                                 marvell,pins = "mpp39";
0046                                 marvell,function = "gpio";
0047                         };
0048                         pmx_led_power: pmx-led-power {
0049                                 marvell,pins = "mpp40";
0050                                 marvell,function = "gpio";
0051                         };
0052                         pmx_fan_lock: pmx-fan-lock {
0053                                 marvell,pins = "mpp43";
0054                                 marvell,function = "gpio";
0055                         };
0056                         pmx_button_function: pmx-button-function {
0057                                 marvell,pins = "mpp45";
0058                                 marvell,function = "gpio";
0059                         };
0060                         pmx_power_switch: pmx-power-switch {
0061                                 marvell,pins = "mpp46";
0062                                 marvell,function = "gpio";
0063                         };
0064                         pmx_power_auto_switch: pmx-power-auto-switch {
0065                                 marvell,pins = "mpp47";
0066                                 marvell,function = "gpio";
0067                         };
0068                 };
0069         };
0070 
0071         gpio_keys {
0072                 function-button {
0073                         gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
0074                 };
0075 
0076                 power-on-switch {
0077                         gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
0078                 };
0079 
0080                 power-auto-switch {
0081                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
0082                 };
0083         };
0084 
0085         gpio_leds {
0086                 red-alarm-led {
0087                         label = "linkstation:red:alarm";
0088                         gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
0089                 };
0090 
0091                 red-function-led {
0092                         label = "linkstation:red:function";
0093                         gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
0094                 };
0095 
0096                 amber-info-led {
0097                         label = "linkstation:amber:info";
0098                         gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
0099                 };
0100 
0101                 blue-function-led {
0102                         label = "linkstation:blue:function";
0103                         gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
0104                 };
0105 
0106                 blue-power-led {
0107                         label = "linkstation:blue:power";
0108                         gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
0109                         default-state = "keep";
0110                 };
0111         };
0112 
0113         gpio_fan {
0114                 compatible = "gpio-fan";
0115                 pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
0116                 pinctrl-names = "default";
0117 
0118                 gpios = <&gpio0 17 GPIO_ACTIVE_LOW
0119                          &gpio0 16 GPIO_ACTIVE_LOW>;
0120 
0121                 gpio-fan,speed-map = <0 3
0122                                 1500 2
0123                                 3250 1
0124                                 5000 0>;
0125 
0126                 alarm-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
0127         };
0128 
0129         regulators {
0130                 usb_power: regulator@1 {
0131                         gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
0132                 };
0133 
0134                 hdd_power0: regulator@2 {
0135                         gpio = <&gpio0 8 GPIO_ACTIVE_HIGH>;
0136                 };
0137         };
0138 };
0139 
0140 &mdio {
0141         status = "okay";
0142 
0143         ethphy0: ethernet-phy@0 {
0144                 device_type = "ethernet-phy";
0145                 reg = <0>;
0146         };
0147 };
0148 
0149 &eth0 {
0150         status = "okay";
0151 
0152         ethernet0-port@0 {
0153                 phy-handle = <&ethphy0>;
0154         };
0155 };