diff options
author | Pritesh Raithatha <praithatha@nvidia.com> | 2013-01-08 02:32:36 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-01-18 10:13:52 -0500 |
commit | 348d1bf75c09f854630e9bd161dc2a88aebe2149 (patch) | |
tree | b7f3fd0f286d8191584c8d2f0200a29121e1acf2 /drivers/pinctrl/pinctrl-tegra.h | |
parent | b2083062a3b4035e85349120b426ecef2b6d155f (diff) |
pinctrl: tegra: add support for rcv-sel and drive type
NVIDIA's Tegra114 added two more configuration parameter in pinmux i.e.
rcv-sel and drive type.
rcv-sel: Select between High and Normal VIL/VIH receivers.
RCVR_SEL=1: High VIL/VIH
RCVR_SEL=0: Normal VIL/VIH
drv_type: Ouptput drive type:
33-50 ohm driver: 0x1
66-100ohm driver: 0x0
Add support of these parameters to be configure from DTS file.
Tegra20 and Tegra30 does not support this configuration and hence initialize their
pinmux structure with reg = -1.
Originally written by Pritesh Raithatha.
Changes by ldewangan:
- remove drvtype_width as it is always 2.
- Better describe the change.
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-tegra.h')
-rw-r--r-- | drivers/pinctrl/pinctrl-tegra.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-tegra.h b/drivers/pinctrl/pinctrl-tegra.h index 62e380965c68..817f7061dc4c 100644 --- a/drivers/pinctrl/pinctrl-tegra.h +++ b/drivers/pinctrl/pinctrl-tegra.h | |||
@@ -30,6 +30,8 @@ enum tegra_pinconf_param { | |||
30 | /* argument: Boolean */ | 30 | /* argument: Boolean */ |
31 | TEGRA_PINCONF_PARAM_IORESET, | 31 | TEGRA_PINCONF_PARAM_IORESET, |
32 | /* argument: Boolean */ | 32 | /* argument: Boolean */ |
33 | TEGRA_PINCONF_PARAM_RCV_SEL, | ||
34 | /* argument: Boolean */ | ||
33 | TEGRA_PINCONF_PARAM_HIGH_SPEED_MODE, | 35 | TEGRA_PINCONF_PARAM_HIGH_SPEED_MODE, |
34 | /* argument: Boolean */ | 36 | /* argument: Boolean */ |
35 | TEGRA_PINCONF_PARAM_SCHMITT, | 37 | TEGRA_PINCONF_PARAM_SCHMITT, |
@@ -43,6 +45,8 @@ enum tegra_pinconf_param { | |||
43 | TEGRA_PINCONF_PARAM_SLEW_RATE_FALLING, | 45 | TEGRA_PINCONF_PARAM_SLEW_RATE_FALLING, |
44 | /* argument: Integer, range is HW-dependant */ | 46 | /* argument: Integer, range is HW-dependant */ |
45 | TEGRA_PINCONF_PARAM_SLEW_RATE_RISING, | 47 | TEGRA_PINCONF_PARAM_SLEW_RATE_RISING, |
48 | /* argument: Integer, range is HW-dependant */ | ||
49 | TEGRA_PINCONF_PARAM_DRIVE_TYPE, | ||
46 | }; | 50 | }; |
47 | 51 | ||
48 | enum tegra_pinconf_pull { | 52 | enum tegra_pinconf_pull { |
@@ -95,6 +99,9 @@ struct tegra_function { | |||
95 | * @ioreset_reg: IO reset register offset. -1 if unsupported. | 99 | * @ioreset_reg: IO reset register offset. -1 if unsupported. |
96 | * @ioreset_bank: IO reset register bank. 0 if unsupported. | 100 | * @ioreset_bank: IO reset register bank. 0 if unsupported. |
97 | * @ioreset_bit: IO reset register bit. 0 if unsupported. | 101 | * @ioreset_bit: IO reset register bit. 0 if unsupported. |
102 | * @rcv_sel_reg: Receiver select offset. -1 if unsupported. | ||
103 | * @rcv_sel_bank: Receiver select bank. 0 if unsupported. | ||
104 | * @rcv_sel_bit: Receiver select bit. 0 if unsupported. | ||
98 | * @drv_reg: Drive fields register offset. -1 if unsupported. | 105 | * @drv_reg: Drive fields register offset. -1 if unsupported. |
99 | * This register contains the hsm, schmitt, lpmd, drvdn, | 106 | * This register contains the hsm, schmitt, lpmd, drvdn, |
100 | * drvup, slwr, and slwf parameters. | 107 | * drvup, slwr, and slwf parameters. |
@@ -110,6 +117,9 @@ struct tegra_function { | |||
110 | * @slwr_width: Slew Rising field width. 0 if unsupported. | 117 | * @slwr_width: Slew Rising field width. 0 if unsupported. |
111 | * @slwf_bit: Slew Falling register bit. 0 if unsupported. | 118 | * @slwf_bit: Slew Falling register bit. 0 if unsupported. |
112 | * @slwf_width: Slew Falling field width. 0 if unsupported. | 119 | * @slwf_width: Slew Falling field width. 0 if unsupported. |
120 | * @drvtype_reg: Drive type fields register offset. -1 if unsupported. | ||
121 | * @drvtype_bank: Drive type fields register bank. 0 if unsupported. | ||
122 | * @drvtype_bit: Drive type register bit. 0 if unsupported. | ||
113 | * | 123 | * |
114 | * A representation of a group of pins (possibly just one pin) in the Tegra | 124 | * A representation of a group of pins (possibly just one pin) in the Tegra |
115 | * pin controller. Each group allows some parameter or parameters to be | 125 | * pin controller. Each group allows some parameter or parameters to be |
@@ -131,15 +141,19 @@ struct tegra_pingroup { | |||
131 | s16 odrain_reg; | 141 | s16 odrain_reg; |
132 | s16 lock_reg; | 142 | s16 lock_reg; |
133 | s16 ioreset_reg; | 143 | s16 ioreset_reg; |
144 | s16 rcv_sel_reg; | ||
134 | s16 drv_reg; | 145 | s16 drv_reg; |
146 | s16 drvtype_reg; | ||
135 | u32 mux_bank:2; | 147 | u32 mux_bank:2; |
136 | u32 pupd_bank:2; | 148 | u32 pupd_bank:2; |
137 | u32 tri_bank:2; | 149 | u32 tri_bank:2; |
138 | u32 einput_bank:2; | 150 | u32 einput_bank:2; |
139 | u32 odrain_bank:2; | 151 | u32 odrain_bank:2; |
140 | u32 ioreset_bank:2; | 152 | u32 ioreset_bank:2; |
153 | u32 rcv_sel_bank:2; | ||
141 | u32 lock_bank:2; | 154 | u32 lock_bank:2; |
142 | u32 drv_bank:2; | 155 | u32 drv_bank:2; |
156 | u32 drvtype_bank:2; | ||
143 | u32 mux_bit:5; | 157 | u32 mux_bit:5; |
144 | u32 pupd_bit:5; | 158 | u32 pupd_bit:5; |
145 | u32 tri_bit:5; | 159 | u32 tri_bit:5; |
@@ -147,6 +161,7 @@ struct tegra_pingroup { | |||
147 | u32 odrain_bit:5; | 161 | u32 odrain_bit:5; |
148 | u32 lock_bit:5; | 162 | u32 lock_bit:5; |
149 | u32 ioreset_bit:5; | 163 | u32 ioreset_bit:5; |
164 | u32 rcv_sel_bit:5; | ||
150 | u32 hsm_bit:5; | 165 | u32 hsm_bit:5; |
151 | u32 schmitt_bit:5; | 166 | u32 schmitt_bit:5; |
152 | u32 lpmd_bit:5; | 167 | u32 lpmd_bit:5; |
@@ -154,6 +169,7 @@ struct tegra_pingroup { | |||
154 | u32 drvup_bit:5; | 169 | u32 drvup_bit:5; |
155 | u32 slwr_bit:5; | 170 | u32 slwr_bit:5; |
156 | u32 slwf_bit:5; | 171 | u32 slwf_bit:5; |
172 | u32 drvtype_bit:5; | ||
157 | u32 drvdn_width:6; | 173 | u32 drvdn_width:6; |
158 | u32 drvup_width:6; | 174 | u32 drvup_width:6; |
159 | u32 slwr_width:6; | 175 | u32 slwr_width:6; |