| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for the NVIDIA Tegra pinmux |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2011, NVIDIA CORPORATION. All rights reserved. |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 7 | | - * under the terms and conditions of the GNU General Public License, |
|---|
| 8 | | - * version 2, as published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope it will be useful, but WITHOUT |
|---|
| 11 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 12 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 13 | | - * more details. |
|---|
| 14 | 6 | */ |
|---|
| 15 | 7 | |
|---|
| 16 | 8 | #ifndef __PINMUX_TEGRA_H__ |
|---|
| .. | .. |
|---|
| 25 | 17 | |
|---|
| 26 | 18 | int nbanks; |
|---|
| 27 | 19 | void __iomem **regs; |
|---|
| 20 | + u32 *backup_regs; |
|---|
| 28 | 21 | }; |
|---|
| 29 | 22 | |
|---|
| 30 | 23 | enum tegra_pinconf_param { |
|---|
| .. | .. |
|---|
| 104 | 97 | * @tri_reg: Tri-state register offset. |
|---|
| 105 | 98 | * @tri_bank: Tri-state register bank. |
|---|
| 106 | 99 | * @tri_bit: Tri-state register bit. |
|---|
| 107 | | - * @parked_bit: Parked register bit. -1 if unsupported. |
|---|
| 108 | 100 | * @einput_bit: Enable-input register bit. |
|---|
| 109 | 101 | * @odrain_bit: Open-drain register bit. |
|---|
| 110 | 102 | * @lock_bit: Lock register bit. |
|---|
| .. | .. |
|---|
| 115 | 107 | * drvup, slwr, slwf, and drvtype parameters. |
|---|
| 116 | 108 | * @drv_bank: Drive fields register bank. |
|---|
| 117 | 109 | * @hsm_bit: High Speed Mode register bit. |
|---|
| 118 | | - * @schmitt_bit: Scmitt register bit. |
|---|
| 110 | + * @sfsel_bit: GPIO/SFIO selection register bit. |
|---|
| 111 | + * @schmitt_bit: Schmitt register bit. |
|---|
| 119 | 112 | * @lpmd_bit: Low Power Mode register bit. |
|---|
| 120 | 113 | * @drvdn_bit: Drive Down register bit. |
|---|
| 121 | 114 | * @drvdn_width: Drive Down field width. |
|---|
| .. | .. |
|---|
| 126 | 119 | * @slwf_bit: Slew Falling register bit. |
|---|
| 127 | 120 | * @slwf_width: Slew Falling field width. |
|---|
| 128 | 121 | * @drvtype_bit: Drive type register bit. |
|---|
| 122 | + * @parked_bitmask: Parked register mask. 0 if unsupported. |
|---|
| 129 | 123 | * |
|---|
| 130 | 124 | * -1 in a *_reg field means that feature is unsupported for this group. |
|---|
| 131 | 125 | * *_bank and *_reg values are irrelevant when *_reg is -1. |
|---|
| .. | .. |
|---|
| 143 | 137 | const unsigned *pins; |
|---|
| 144 | 138 | u8 npins; |
|---|
| 145 | 139 | u8 funcs[4]; |
|---|
| 146 | | - s16 mux_reg; |
|---|
| 147 | | - s16 pupd_reg; |
|---|
| 148 | | - s16 tri_reg; |
|---|
| 149 | | - s16 drv_reg; |
|---|
| 140 | + s32 mux_reg; |
|---|
| 141 | + s32 pupd_reg; |
|---|
| 142 | + s32 tri_reg; |
|---|
| 143 | + s32 drv_reg; |
|---|
| 150 | 144 | u32 mux_bank:2; |
|---|
| 151 | 145 | u32 pupd_bank:2; |
|---|
| 152 | 146 | u32 tri_bank:2; |
|---|
| .. | .. |
|---|
| 154 | 148 | s32 mux_bit:6; |
|---|
| 155 | 149 | s32 pupd_bit:6; |
|---|
| 156 | 150 | s32 tri_bit:6; |
|---|
| 157 | | - s32 parked_bit:6; |
|---|
| 158 | 151 | s32 einput_bit:6; |
|---|
| 159 | 152 | s32 odrain_bit:6; |
|---|
| 160 | 153 | s32 lock_bit:6; |
|---|
| 161 | 154 | s32 ioreset_bit:6; |
|---|
| 162 | 155 | s32 rcv_sel_bit:6; |
|---|
| 163 | 156 | s32 hsm_bit:6; |
|---|
| 157 | + s32 sfsel_bit:6; |
|---|
| 164 | 158 | s32 schmitt_bit:6; |
|---|
| 165 | 159 | s32 lpmd_bit:6; |
|---|
| 166 | 160 | s32 drvdn_bit:6; |
|---|
| .. | .. |
|---|
| 172 | 166 | s32 drvup_width:6; |
|---|
| 173 | 167 | s32 slwr_width:6; |
|---|
| 174 | 168 | s32 slwf_width:6; |
|---|
| 169 | + u32 parked_bitmask; |
|---|
| 175 | 170 | }; |
|---|
| 176 | 171 | |
|---|
| 177 | 172 | /** |
|---|
| .. | .. |
|---|
| 199 | 194 | bool hsm_in_mux; |
|---|
| 200 | 195 | bool schmitt_in_mux; |
|---|
| 201 | 196 | bool drvtype_in_mux; |
|---|
| 197 | + bool sfsel_in_mux; |
|---|
| 202 | 198 | }; |
|---|
| 203 | 199 | |
|---|
| 200 | +extern const struct dev_pm_ops tegra_pinctrl_pm; |
|---|
| 201 | + |
|---|
| 204 | 202 | int tegra_pinctrl_probe(struct platform_device *pdev, |
|---|
| 205 | 203 | const struct tegra_pinctrl_soc_data *soc_data); |
|---|
| 206 | 204 | #endif |
|---|