Lines Matching +full:pps +full:- +full:gpio
1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/drivers/pinctrl/pinmux-falcon.c
4 * based on linux/drivers/pinctrl/pinmux-pxa910.c
12 #include <linux/gpio/driver.h>
22 #include "pinctrl-lantiq.h"
107 MFP_FALCON(GPIO0, RST, GPIO, NONE, NONE),
108 MFP_FALCON(GPIO1, GPIO, GPIO, NONE, NONE),
109 MFP_FALCON(GPIO2, GPIO, GPIO, NONE, NONE),
110 MFP_FALCON(GPIO3, GPIO, GPIO, NONE, NONE),
111 MFP_FALCON(GPIO4, NTR, GPIO, NONE, NONE),
112 MFP_FALCON(GPIO5, NTR, GPIO, PPS, NONE),
113 MFP_FALCON(GPIO6, RST, GPIO, NONE, NONE),
114 MFP_FALCON(GPIO7, MDIO, GPIO, NONE, NONE),
115 MFP_FALCON(GPIO8, MDIO, GPIO, NONE, NONE),
116 MFP_FALCON(GPIO9, LED, GPIO, NONE, NONE),
117 MFP_FALCON(GPIO10, LED, GPIO, NONE, NONE),
118 MFP_FALCON(GPIO11, LED, GPIO, NONE, NONE),
119 MFP_FALCON(GPIO12, LED, GPIO, NONE, NONE),
120 MFP_FALCON(GPIO13, LED, GPIO, NONE, NONE),
121 MFP_FALCON(GPIO14, LED, GPIO, NONE, NONE),
122 MFP_FALCON(GPIO32, ASC, GPIO, NONE, NONE),
123 MFP_FALCON(GPIO33, ASC, GPIO, NONE, NONE),
124 MFP_FALCON(GPIO34, SPI, GPIO, NONE, NONE),
125 MFP_FALCON(GPIO35, SPI, GPIO, NONE, NONE),
126 MFP_FALCON(GPIO36, SPI, GPIO, NONE, NONE),
127 MFP_FALCON(GPIO37, SPI, GPIO, NONE, NONE),
128 MFP_FALCON(GPIO38, SPI, GPIO, NONE, NONE),
129 MFP_FALCON(GPIO39, I2C, GPIO, NONE, NONE),
130 MFP_FALCON(GPIO40, I2C, GPIO, NONE, NONE),
131 MFP_FALCON(GPIO41, HOSTIF, GPIO, HOSTIF, JTAG),
132 MFP_FALCON(GPIO42, HOSTIF, GPIO, HOSTIF, NONE),
133 MFP_FALCON(GPIO43, SLIC, GPIO, NONE, NONE),
134 MFP_FALCON(GPIO44, SLIC, GPIO, PCM, ASC),
135 MFP_FALCON(GPIO45, SLIC, GPIO, PCM, ASC),
136 MFP_FALCON(GPIO64, MII, GPIO, NONE, NONE),
137 MFP_FALCON(GPIO65, MII, GPIO, NONE, NONE),
138 MFP_FALCON(GPIO66, MII, GPIO, NONE, NONE),
139 MFP_FALCON(GPIO67, MII, GPIO, NONE, NONE),
140 MFP_FALCON(GPIO68, MII, GPIO, NONE, NONE),
141 MFP_FALCON(GPIO69, MII, GPIO, NONE, NONE),
142 MFP_FALCON(GPIO70, MII, GPIO, NONE, NONE),
143 MFP_FALCON(GPIO71, MII, GPIO, NONE, NONE),
144 MFP_FALCON(GPIO72, MII, GPIO, NONE, NONE),
145 MFP_FALCON(GPIO73, MII, GPIO, NONE, NONE),
146 MFP_FALCON(GPIO74, MII, GPIO, NONE, NONE),
147 MFP_FALCON(GPIO75, MII, GPIO, NONE, NONE),
148 MFP_FALCON(GPIO76, MII, GPIO, NONE, NONE),
149 MFP_FALCON(GPIO77, MII, GPIO, NONE, NONE),
150 MFP_FALCON(GPIO78, MII, GPIO, NONE, NONE),
151 MFP_FALCON(GPIO79, MII, GPIO, NONE, NONE),
152 MFP_FALCON(GPIO80, MII, GPIO, NONE, NONE),
153 MFP_FALCON(GPIO81, MII, GPIO, NONE, NONE),
154 MFP_FALCON(GPIO82, MII, GPIO, NONE, NONE),
155 MFP_FALCON(GPIO83, MII, GPIO, NONE, NONE),
156 MFP_FALCON(GPIO84, MII, GPIO, NONE, NONE),
157 MFP_FALCON(GPIO85, MII, GPIO, NONE, NONE),
158 MFP_FALCON(GPIO86, MII, GPIO, NONE, NONE),
159 MFP_FALCON(GPIO87, MII, GPIO, NONE, NONE),
160 MFP_FALCON(GPIO88, PHY, GPIO, NONE, NONE),
185 GRP_MUX("pps", PPS, pins_pps),
201 static const char * const ltq_ntr_grps[] = {"ntr", "ntr8k", "pps"};
227 /* --------- pinconf related code --------- */
231 return -ENOTSUPP; in falcon_pinconf_group_get()
238 return -ENOTSUPP; in falcon_pinconf_group_set()
246 void __iomem *mem = info->membase[PORT(pin)]; in falcon_pinconf_get()
270 return -ENOTSUPP; in falcon_pinconf_get()
283 void __iomem *mem = info->membase[PORT(pin)]; in falcon_pinconf_set()
310 return -ENOTSUPP; in falcon_pinconf_set()
315 return -ENOTSUPP; in falcon_pinconf_set()
330 seq_printf(s, " (port %d) mux %d -- ", port, in falcon_pinconf_dbg_show()
331 pad_r32(info->membase[port], LTQ_PADC_MUX(PORT_PIN(offset)))); in falcon_pinconf_dbg_show()
340 seq_printf(s, "drive-current %d ", in falcon_pinconf_dbg_show()
345 seq_printf(s, "slew-rate %d ", in falcon_pinconf_dbg_show()
350 if (desc->gpio_owner) in falcon_pinconf_dbg_show()
351 seq_printf(s, " owner: %s", desc->gpio_owner); in falcon_pinconf_dbg_show()
381 int port = PORT(info->mfp[mfp].pin); in falcon_mux_apply()
383 if ((port >= PORTS) || (!info->membase[port])) in falcon_mux_apply()
384 return -ENODEV; in falcon_mux_apply()
386 pad_w32(info->membase[port], mux, in falcon_mux_apply()
387 LTQ_PADC_MUX(PORT_PIN(info->mfp[mfp].pin))); in falcon_mux_apply()
393 {"lantiq,drive-current", LTQ_PINCONF_PARAM_DRIVE_CURRENT},
394 {"lantiq,slew-rate", LTQ_PINCONF_PARAM_SLEW_RATE},
407 /* --------- register the pinctrl layer --------- */
414 return -EINVAL; in pinctrl_falcon_get_range_size()
433 for_each_compatible_node(np, NULL, "lantiq,pad-falcon") { in pinctrl_falcon_probe()
450 dev_err(&pdev->dev, "failed to find pad pdev\n"); in pinctrl_falcon_probe()
454 falcon_info.clk[*bank] = clk_get(&ppdev->dev, NULL); in pinctrl_falcon_probe()
455 put_device(&ppdev->dev); in pinctrl_falcon_probe()
457 dev_err(&ppdev->dev, "failed to get clock\n"); in pinctrl_falcon_probe()
461 falcon_info.membase[*bank] = devm_ioremap_resource(&pdev->dev, in pinctrl_falcon_probe()
474 dev_dbg(&pdev->dev, "found %s with %d pads\n", in pinctrl_falcon_probe()
477 dev_dbg(&pdev->dev, "found a total of %d pads\n", pad_count); in pinctrl_falcon_probe()
478 falcon_pctrl_desc.name = dev_name(&pdev->dev); in pinctrl_falcon_probe()
490 dev_info(&pdev->dev, "Init done\n"); in pinctrl_falcon_probe()
495 { .compatible = "lantiq,pinctrl-falcon" },
503 .name = "pinctrl-falcon",