xref: /linux/include/dt-bindings/pinctrl/brcm,pinctrl-stingray.h (revision c25141062a82ae8bddced1b3ce2b57a1c0efabe0)
1*8aa428ccSPramod Kumar /*
2*8aa428ccSPramod Kumar  *  BSD LICENSE
3*8aa428ccSPramod Kumar  *
4*8aa428ccSPramod Kumar  *  Copyright(c) 2017 Broadcom Corporation.  All rights reserved.
5*8aa428ccSPramod Kumar  *
6*8aa428ccSPramod Kumar  *  Redistribution and use in source and binary forms, with or without
7*8aa428ccSPramod Kumar  *  modification, are permitted provided that the following conditions
8*8aa428ccSPramod Kumar  *  are met:
9*8aa428ccSPramod Kumar  *
10*8aa428ccSPramod Kumar  *    * Redistributions of source code must retain the above copyright
11*8aa428ccSPramod Kumar  *      notice, this list of conditions and the following disclaimer.
12*8aa428ccSPramod Kumar  *    * Redistributions in binary form must reproduce the above copyright
13*8aa428ccSPramod Kumar  *      notice, this list of conditions and the following disclaimer in
14*8aa428ccSPramod Kumar  *      the documentation and/or other materials provided with the
15*8aa428ccSPramod Kumar  *      distribution.
16*8aa428ccSPramod Kumar  *    * Neither the name of Broadcom Corporation nor the names of its
17*8aa428ccSPramod Kumar  *      contributors may be used to endorse or promote products derived
18*8aa428ccSPramod Kumar  *      from this software without specific prior written permission.
19*8aa428ccSPramod Kumar  *
20*8aa428ccSPramod Kumar  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21*8aa428ccSPramod Kumar  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*8aa428ccSPramod Kumar  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23*8aa428ccSPramod Kumar  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24*8aa428ccSPramod Kumar  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25*8aa428ccSPramod Kumar  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26*8aa428ccSPramod Kumar  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27*8aa428ccSPramod Kumar  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28*8aa428ccSPramod Kumar  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29*8aa428ccSPramod Kumar  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30*8aa428ccSPramod Kumar  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*8aa428ccSPramod Kumar  */
32*8aa428ccSPramod Kumar 
33*8aa428ccSPramod Kumar #ifndef __DT_BINDINGS_PINCTRL_BRCM_STINGRAY_H__
34*8aa428ccSPramod Kumar #define __DT_BINDINGS_PINCTRL_BRCM_STINGRAY_H__
35*8aa428ccSPramod Kumar 
36*8aa428ccSPramod Kumar /* Alternate functions available in MUX controller */
37*8aa428ccSPramod Kumar #define MODE_NITRO				0
38*8aa428ccSPramod Kumar #define MODE_NAND				1
39*8aa428ccSPramod Kumar #define MODE_PNOR				2
40*8aa428ccSPramod Kumar #define MODE_GPIO				3
41*8aa428ccSPramod Kumar 
42*8aa428ccSPramod Kumar /* Pad configuration attribute */
43*8aa428ccSPramod Kumar #define PAD_SLEW_RATE_ENA			(1 << 0)
44*8aa428ccSPramod Kumar #define PAD_SLEW_RATE_ENA_MASK			(1 << 0)
45*8aa428ccSPramod Kumar 
46*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_2_MA			(0 << 1)
47*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_4_MA			(1 << 1)
48*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_6_MA			(2 << 1)
49*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_8_MA			(3 << 1)
50*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_10_MA		(4 << 1)
51*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_12_MA		(5 << 1)
52*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_14_MA		(6 << 1)
53*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_16_MA		(7 << 1)
54*8aa428ccSPramod Kumar #define PAD_DRIVE_STRENGTH_MASK			(7 << 1)
55*8aa428ccSPramod Kumar 
56*8aa428ccSPramod Kumar #define PAD_PULL_UP_ENA				(1 << 4)
57*8aa428ccSPramod Kumar #define PAD_PULL_UP_ENA_MASK			(1 << 4)
58*8aa428ccSPramod Kumar 
59*8aa428ccSPramod Kumar #define PAD_PULL_DOWN_ENA			(1 << 5)
60*8aa428ccSPramod Kumar #define PAD_PULL_DOWN_ENA_MASK			(1 << 5)
61*8aa428ccSPramod Kumar 
62*8aa428ccSPramod Kumar #define PAD_INPUT_PATH_DIS			(1 << 6)
63*8aa428ccSPramod Kumar #define PAD_INPUT_PATH_DIS_MASK			(1 << 6)
64*8aa428ccSPramod Kumar 
65*8aa428ccSPramod Kumar #define PAD_HYSTERESIS_ENA			(1 << 7)
66*8aa428ccSPramod Kumar #define PAD_HYSTERESIS_ENA_MASK			(1 << 7)
67*8aa428ccSPramod Kumar 
68*8aa428ccSPramod Kumar #endif
69