18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci *  BSD LICENSE
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci *  Copyright(c) 2017 Broadcom Corporation.  All rights reserved.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci *  Redistribution and use in source and binary forms, with or without
78c2ecf20Sopenharmony_ci *  modification, are permitted provided that the following conditions
88c2ecf20Sopenharmony_ci *  are met:
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci *    * Redistributions of source code must retain the above copyright
118c2ecf20Sopenharmony_ci *      notice, this list of conditions and the following disclaimer.
128c2ecf20Sopenharmony_ci *    * Redistributions in binary form must reproduce the above copyright
138c2ecf20Sopenharmony_ci *      notice, this list of conditions and the following disclaimer in
148c2ecf20Sopenharmony_ci *      the documentation and/or other materials provided with the
158c2ecf20Sopenharmony_ci *      distribution.
168c2ecf20Sopenharmony_ci *    * Neither the name of Broadcom Corporation nor the names of its
178c2ecf20Sopenharmony_ci *      contributors may be used to endorse or promote products derived
188c2ecf20Sopenharmony_ci *      from this software without specific prior written permission.
198c2ecf20Sopenharmony_ci *
208c2ecf20Sopenharmony_ci *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
218c2ecf20Sopenharmony_ci *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
228c2ecf20Sopenharmony_ci *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
238c2ecf20Sopenharmony_ci *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
248c2ecf20Sopenharmony_ci *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
258c2ecf20Sopenharmony_ci *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
268c2ecf20Sopenharmony_ci *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
278c2ecf20Sopenharmony_ci *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
288c2ecf20Sopenharmony_ci *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
298c2ecf20Sopenharmony_ci *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
308c2ecf20Sopenharmony_ci * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
318c2ecf20Sopenharmony_ci */
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#ifndef __DT_BINDINGS_PINCTRL_BRCM_STINGRAY_H__
348c2ecf20Sopenharmony_ci#define __DT_BINDINGS_PINCTRL_BRCM_STINGRAY_H__
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci/* Alternate functions available in MUX controller */
378c2ecf20Sopenharmony_ci#define MODE_NITRO				0
388c2ecf20Sopenharmony_ci#define MODE_NAND				1
398c2ecf20Sopenharmony_ci#define MODE_PNOR				2
408c2ecf20Sopenharmony_ci#define MODE_GPIO				3
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci/* Pad configuration attribute */
438c2ecf20Sopenharmony_ci#define PAD_SLEW_RATE_ENA			(1 << 0)
448c2ecf20Sopenharmony_ci#define PAD_SLEW_RATE_ENA_MASK			(1 << 0)
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_2_MA			(0 << 1)
478c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_4_MA			(1 << 1)
488c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_6_MA			(2 << 1)
498c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_8_MA			(3 << 1)
508c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_10_MA		(4 << 1)
518c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_12_MA		(5 << 1)
528c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_14_MA		(6 << 1)
538c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_16_MA		(7 << 1)
548c2ecf20Sopenharmony_ci#define PAD_DRIVE_STRENGTH_MASK			(7 << 1)
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ci#define PAD_PULL_UP_ENA				(1 << 4)
578c2ecf20Sopenharmony_ci#define PAD_PULL_UP_ENA_MASK			(1 << 4)
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci#define PAD_PULL_DOWN_ENA			(1 << 5)
608c2ecf20Sopenharmony_ci#define PAD_PULL_DOWN_ENA_MASK			(1 << 5)
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci#define PAD_INPUT_PATH_DIS			(1 << 6)
638c2ecf20Sopenharmony_ci#define PAD_INPUT_PATH_DIS_MASK			(1 << 6)
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ci#define PAD_HYSTERESIS_ENA			(1 << 7)
668c2ecf20Sopenharmony_ci#define PAD_HYSTERESIS_ENA_MASK			(1 << 7)
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci#endif
69