diff options
author | Jamie Lentin <jm@lentin.co.uk> | 2016-05-19 17:40:32 -0400 |
---|---|---|
committer | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2016-09-21 05:49:18 -0400 |
commit | c336dc7dac0747f6a4901bcd5a497e1b3fb265d7 (patch) | |
tree | 0aae7d1e3b8ab8d451dc1712e0a1e9227077efd0 /drivers/pinctrl/mvebu | |
parent | 57d0ee077af5621102b3d1a0a701150b56e9747c (diff) |
pinctrl: mvebu: orion5x: Generalise mv88f5181l support for 88f5181
As far as I'm aware the mv88f5181-b1 and mv88f5181l are the same at the
pinctrl level, so re-use the definitions for both.
[gregory.clement@free-electrons.com: fix commit title]
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Diffstat (limited to 'drivers/pinctrl/mvebu')
-rw-r--r-- | drivers/pinctrl/mvebu/pinctrl-orion.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/pinctrl/mvebu/pinctrl-orion.c b/drivers/pinctrl/mvebu/pinctrl-orion.c index 345c3df669a0..84e144167b44 100644 --- a/drivers/pinctrl/mvebu/pinctrl-orion.c +++ b/drivers/pinctrl/mvebu/pinctrl-orion.c | |||
@@ -64,11 +64,11 @@ static int orion_mpp_ctrl_set(unsigned pid, unsigned long config) | |||
64 | return 0; | 64 | return 0; |
65 | } | 65 | } |
66 | 66 | ||
67 | #define V(f5181l, f5182, f5281) \ | 67 | #define V(f5181, f5182, f5281) \ |
68 | ((f5181l << 0) | (f5182 << 1) | (f5281 << 2)) | 68 | ((f5181 << 0) | (f5182 << 1) | (f5281 << 2)) |
69 | 69 | ||
70 | enum orion_variant { | 70 | enum orion_variant { |
71 | V_5181L = V(1, 0, 0), | 71 | V_5181 = V(1, 0, 0), |
72 | V_5182 = V(0, 1, 0), | 72 | V_5182 = V(0, 1, 0), |
73 | V_5281 = V(0, 0, 1), | 73 | V_5281 = V(0, 0, 1), |
74 | V_ALL = V(1, 1, 1), | 74 | V_ALL = V(1, 1, 1), |
@@ -103,13 +103,13 @@ static struct mvebu_mpp_mode orion_mpp_modes[] = { | |||
103 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL), | 103 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL), |
104 | MPP_VAR_FUNCTION(0x2, "pci", "req5", V_ALL), | 104 | MPP_VAR_FUNCTION(0x2, "pci", "req5", V_ALL), |
105 | MPP_VAR_FUNCTION(0x4, "nand", "re0", V_5182 | V_5281), | 105 | MPP_VAR_FUNCTION(0x4, "nand", "re0", V_5182 | V_5281), |
106 | MPP_VAR_FUNCTION(0x5, "pci-1", "clk", V_5181L), | 106 | MPP_VAR_FUNCTION(0x5, "pci-1", "clk", V_5181), |
107 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V_5182)), | 107 | MPP_VAR_FUNCTION(0x5, "sata0", "act", V_5182)), |
108 | MPP_MODE(7, | 108 | MPP_MODE(7, |
109 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL), | 109 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL), |
110 | MPP_VAR_FUNCTION(0x2, "pci", "gnt5", V_ALL), | 110 | MPP_VAR_FUNCTION(0x2, "pci", "gnt5", V_ALL), |
111 | MPP_VAR_FUNCTION(0x4, "nand", "we0", V_5182 | V_5281), | 111 | MPP_VAR_FUNCTION(0x4, "nand", "we0", V_5182 | V_5281), |
112 | MPP_VAR_FUNCTION(0x5, "pci-1", "clk", V_5181L), | 112 | MPP_VAR_FUNCTION(0x5, "pci-1", "clk", V_5181), |
113 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V_5182)), | 113 | MPP_VAR_FUNCTION(0x5, "sata1", "act", V_5182)), |
114 | MPP_MODE(8, | 114 | MPP_MODE(8, |
115 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL), | 115 | MPP_VAR_FUNCTION(0x0, "gpio", NULL, V_ALL), |
@@ -165,7 +165,7 @@ static struct mvebu_mpp_ctrl orion_mpp_controls[] = { | |||
165 | MPP_FUNC_CTRL(0, 19, NULL, orion_mpp_ctrl), | 165 | MPP_FUNC_CTRL(0, 19, NULL, orion_mpp_ctrl), |
166 | }; | 166 | }; |
167 | 167 | ||
168 | static struct pinctrl_gpio_range mv88f5181l_gpio_ranges[] = { | 168 | static struct pinctrl_gpio_range mv88f5181_gpio_ranges[] = { |
169 | MPP_GPIO_RANGE(0, 0, 0, 16), | 169 | MPP_GPIO_RANGE(0, 0, 0, 16), |
170 | }; | 170 | }; |
171 | 171 | ||
@@ -177,14 +177,14 @@ static struct pinctrl_gpio_range mv88f5281_gpio_ranges[] = { | |||
177 | MPP_GPIO_RANGE(0, 0, 0, 16), | 177 | MPP_GPIO_RANGE(0, 0, 0, 16), |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static struct mvebu_pinctrl_soc_info mv88f5181l_info = { | 180 | static struct mvebu_pinctrl_soc_info mv88f5181_info = { |
181 | .variant = V_5181L, | 181 | .variant = V_5181, |
182 | .controls = orion_mpp_controls, | 182 | .controls = orion_mpp_controls, |
183 | .ncontrols = ARRAY_SIZE(orion_mpp_controls), | 183 | .ncontrols = ARRAY_SIZE(orion_mpp_controls), |
184 | .modes = orion_mpp_modes, | 184 | .modes = orion_mpp_modes, |
185 | .nmodes = ARRAY_SIZE(orion_mpp_modes), | 185 | .nmodes = ARRAY_SIZE(orion_mpp_modes), |
186 | .gpioranges = mv88f5181l_gpio_ranges, | 186 | .gpioranges = mv88f5181_gpio_ranges, |
187 | .ngpioranges = ARRAY_SIZE(mv88f5181l_gpio_ranges), | 187 | .ngpioranges = ARRAY_SIZE(mv88f5181_gpio_ranges), |
188 | }; | 188 | }; |
189 | 189 | ||
190 | static struct mvebu_pinctrl_soc_info mv88f5182_info = { | 190 | static struct mvebu_pinctrl_soc_info mv88f5182_info = { |
@@ -212,7 +212,8 @@ static struct mvebu_pinctrl_soc_info mv88f5281_info = { | |||
212 | * muxing, they are identical. | 212 | * muxing, they are identical. |
213 | */ | 213 | */ |
214 | static const struct of_device_id orion_pinctrl_of_match[] = { | 214 | static const struct of_device_id orion_pinctrl_of_match[] = { |
215 | { .compatible = "marvell,88f5181l-pinctrl", .data = &mv88f5181l_info }, | 215 | { .compatible = "marvell,88f5181-pinctrl", .data = &mv88f5181_info }, |
216 | { .compatible = "marvell,88f5181l-pinctrl", .data = &mv88f5181_info }, | ||
216 | { .compatible = "marvell,88f5182-pinctrl", .data = &mv88f5182_info }, | 217 | { .compatible = "marvell,88f5182-pinctrl", .data = &mv88f5182_info }, |
217 | { .compatible = "marvell,88f5281-pinctrl", .data = &mv88f5281_info }, | 218 | { .compatible = "marvell,88f5281-pinctrl", .data = &mv88f5281_info }, |
218 | { } | 219 | { } |