1f126890aSEmmanuel Vadot/* 2f126890aSEmmanuel Vadot * Device Tree common file for gpio-fan on Buffalo Linkstation 3f126890aSEmmanuel Vadot * 4f126890aSEmmanuel Vadot * Copyright (C) 2015, 2016 5f126890aSEmmanuel Vadot * Roger Shimizu <rogershimizu@gmail.com> 6f126890aSEmmanuel Vadot * 7f126890aSEmmanuel Vadot * This file is dual-licensed: you can use it either under the terms 8f126890aSEmmanuel Vadot * of the GPL or the X11 license, at your option. Note that this dual 9f126890aSEmmanuel Vadot * licensing only applies to this file, and not this project as a 10f126890aSEmmanuel Vadot * whole. 11f126890aSEmmanuel Vadot * 12f126890aSEmmanuel Vadot * a) This file is free software; you can redistribute it and/or 13f126890aSEmmanuel Vadot * modify it under the terms of the GNU General Public License as 14f126890aSEmmanuel Vadot * published by the Free Software Foundation; either version 2 of the 15f126890aSEmmanuel Vadot * License, or (at your option) any later version. 16f126890aSEmmanuel Vadot * 17f126890aSEmmanuel Vadot * This file is distributed in the hope that it will be useful, 18f126890aSEmmanuel Vadot * but WITHOUT ANY WARRANTY; without even the implied warranty of 19f126890aSEmmanuel Vadot * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20f126890aSEmmanuel Vadot * GNU General Public License for more details. 21f126890aSEmmanuel Vadot * 22f126890aSEmmanuel Vadot * Or, alternatively, 23f126890aSEmmanuel Vadot * 24f126890aSEmmanuel Vadot * b) Permission is hereby granted, free of charge, to any person 25f126890aSEmmanuel Vadot * obtaining a copy of this software and associated documentation 26f126890aSEmmanuel Vadot * files (the "Software"), to deal in the Software without 27f126890aSEmmanuel Vadot * restriction, including without limitation the rights to use, 28f126890aSEmmanuel Vadot * copy, modify, merge, publish, distribute, sublicense, and/or 29f126890aSEmmanuel Vadot * sell copies of the Software, and to permit persons to whom the 30f126890aSEmmanuel Vadot * Software is furnished to do so, subject to the following 31f126890aSEmmanuel Vadot * conditions: 32f126890aSEmmanuel Vadot * 33f126890aSEmmanuel Vadot * The above copyright notice and this permission notice shall be 34f126890aSEmmanuel Vadot * included in all copies or substantial portions of the Software. 35f126890aSEmmanuel Vadot * 36f126890aSEmmanuel Vadot * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 37f126890aSEmmanuel Vadot * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 38f126890aSEmmanuel Vadot * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 39f126890aSEmmanuel Vadot * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 40f126890aSEmmanuel Vadot * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 41f126890aSEmmanuel Vadot * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 42f126890aSEmmanuel Vadot * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 43f126890aSEmmanuel Vadot * OTHER DEALINGS IN THE SOFTWARE. 44f126890aSEmmanuel Vadot */ 45f126890aSEmmanuel Vadot 46f126890aSEmmanuel Vadot/ { 47f126890aSEmmanuel Vadot gpio_fan { 48f126890aSEmmanuel Vadot compatible = "gpio-fan"; 49f126890aSEmmanuel Vadot pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>; 50f126890aSEmmanuel Vadot pinctrl-names = "default"; 51f126890aSEmmanuel Vadot 52f126890aSEmmanuel Vadot gpio-fan,speed-map = 53*8d13bc63SEmmanuel Vadot < 0 3>, 54*8d13bc63SEmmanuel Vadot <1500 2>, 55*8d13bc63SEmmanuel Vadot <3250 1>, 56*8d13bc63SEmmanuel Vadot <5000 0>; 57f126890aSEmmanuel Vadot }; 58f126890aSEmmanuel Vadot}; 59f126890aSEmmanuel Vadot 60f126890aSEmmanuel Vadot&pinctrl { 61f126890aSEmmanuel Vadot pmx_fan_low: pmx-fan-low { 62f126890aSEmmanuel Vadot marvell,function = "gpio"; 63f126890aSEmmanuel Vadot }; 64f126890aSEmmanuel Vadot 65f126890aSEmmanuel Vadot pmx_fan_high: pmx-fan-high { 66f126890aSEmmanuel Vadot marvell,function = "gpio"; 67f126890aSEmmanuel Vadot }; 68f126890aSEmmanuel Vadot 69f126890aSEmmanuel Vadot pmx_fan_lock: pmx-fan-lock { 70f126890aSEmmanuel Vadot marvell,function = "gpio"; 71f126890aSEmmanuel Vadot }; 72f126890aSEmmanuel Vadot}; 73