xref: /linux/scripts/dtc/include-prefixes/arm/marvell/mvebu-linkstation-fan.dtsi (revision 06d07429858317ded2db7986113a9e0129cd599b)
1724ba675SRob Herring/*
2724ba675SRob Herring * Device Tree common file for gpio-fan on Buffalo Linkstation
3724ba675SRob Herring *
4724ba675SRob Herring * Copyright (C) 2015, 2016
5724ba675SRob Herring * Roger Shimizu <rogershimizu@gmail.com>
6724ba675SRob Herring *
7724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms
8724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual
9724ba675SRob Herring * licensing only applies to this file, and not this project as a
10724ba675SRob Herring * whole.
11724ba675SRob Herring *
12724ba675SRob Herring *  a) This file is free software; you can redistribute it and/or
13724ba675SRob Herring *     modify it under the terms of the GNU General Public License as
14724ba675SRob Herring *     published by the Free Software Foundation; either version 2 of the
15724ba675SRob Herring *     License, or (at your option) any later version.
16724ba675SRob Herring *
17724ba675SRob Herring *     This file is distributed in the hope that it will be useful,
18724ba675SRob Herring *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19724ba675SRob Herring *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20724ba675SRob Herring *     GNU General Public License for more details.
21724ba675SRob Herring *
22724ba675SRob Herring * Or, alternatively,
23724ba675SRob Herring *
24724ba675SRob Herring *  b) Permission is hereby granted, free of charge, to any person
25724ba675SRob Herring *     obtaining a copy of this software and associated documentation
26724ba675SRob Herring *     files (the "Software"), to deal in the Software without
27724ba675SRob Herring *     restriction, including without limitation the rights to use,
28724ba675SRob Herring *     copy, modify, merge, publish, distribute, sublicense, and/or
29724ba675SRob Herring *     sell copies of the Software, and to permit persons to whom the
30724ba675SRob Herring *     Software is furnished to do so, subject to the following
31724ba675SRob Herring *     conditions:
32724ba675SRob Herring *
33724ba675SRob Herring *     The above copyright notice and this permission notice shall be
34724ba675SRob Herring *     included in all copies or substantial portions of the Software.
35724ba675SRob Herring *
36724ba675SRob Herring *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37724ba675SRob Herring *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38724ba675SRob Herring *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39724ba675SRob Herring *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40724ba675SRob Herring *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41724ba675SRob Herring *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42724ba675SRob Herring *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43724ba675SRob Herring *     OTHER DEALINGS IN THE SOFTWARE.
44724ba675SRob Herring */
45724ba675SRob Herring
46724ba675SRob Herring/ {
47724ba675SRob Herring	gpio_fan {
48724ba675SRob Herring		compatible = "gpio-fan";
49724ba675SRob Herring		pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
50724ba675SRob Herring		pinctrl-names = "default";
51724ba675SRob Herring
52724ba675SRob Herring		gpio-fan,speed-map =
53*62f34e3eSDavid Heidelberg			<   0 3>,
54*62f34e3eSDavid Heidelberg			<1500 2>,
55*62f34e3eSDavid Heidelberg			<3250 1>,
56*62f34e3eSDavid Heidelberg			<5000 0>;
57724ba675SRob Herring	};
58724ba675SRob Herring};
59724ba675SRob Herring
60724ba675SRob Herring&pinctrl {
61724ba675SRob Herring	pmx_fan_low: pmx-fan-low {
62724ba675SRob Herring		marvell,function = "gpio";
63724ba675SRob Herring	};
64724ba675SRob Herring
65724ba675SRob Herring	pmx_fan_high: pmx-fan-high {
66724ba675SRob Herring		marvell,function = "gpio";
67724ba675SRob Herring	};
68724ba675SRob Herring
69724ba675SRob Herring	pmx_fan_lock: pmx-fan-lock {
70724ba675SRob Herring		marvell,function = "gpio";
71724ba675SRob Herring	};
72724ba675SRob Herring};
73