xref: /freebsd/sys/arm/allwinner/h3/h3_r_padconf.c (revision 0aa4b81381682487894527abff8561416c0c7412)
1*0aa4b813SEmmanuel Vadot /*-
2*0aa4b813SEmmanuel Vadot  * Copyright (c) 2016 Emmanuel Vadot <manu@freebsd.org>
3*0aa4b813SEmmanuel Vadot  * All rights reserved.
4*0aa4b813SEmmanuel Vadot  *
5*0aa4b813SEmmanuel Vadot  * Redistribution and use in source and binary forms, with or without
6*0aa4b813SEmmanuel Vadot  * modification, are permitted provided that the following conditions
7*0aa4b813SEmmanuel Vadot  * are met:
8*0aa4b813SEmmanuel Vadot  * 1. Redistributions of source code must retain the above copyright
9*0aa4b813SEmmanuel Vadot  *    notice, this list of conditions and the following disclaimer.
10*0aa4b813SEmmanuel Vadot  * 2. Redistributions in binary form must reproduce the above copyright
11*0aa4b813SEmmanuel Vadot  *    notice, this list of conditions and the following disclaimer in the
12*0aa4b813SEmmanuel Vadot  *    documentation and/or other materials provided with the distribution.
13*0aa4b813SEmmanuel Vadot  *
14*0aa4b813SEmmanuel Vadot  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15*0aa4b813SEmmanuel Vadot  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16*0aa4b813SEmmanuel Vadot  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17*0aa4b813SEmmanuel Vadot  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18*0aa4b813SEmmanuel Vadot  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19*0aa4b813SEmmanuel Vadot  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20*0aa4b813SEmmanuel Vadot  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21*0aa4b813SEmmanuel Vadot  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22*0aa4b813SEmmanuel Vadot  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23*0aa4b813SEmmanuel Vadot  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24*0aa4b813SEmmanuel Vadot  * SUCH DAMAGE.
25*0aa4b813SEmmanuel Vadot  *
26*0aa4b813SEmmanuel Vadot  */
27*0aa4b813SEmmanuel Vadot 
28*0aa4b813SEmmanuel Vadot #include <sys/cdefs.h>
29*0aa4b813SEmmanuel Vadot __FBSDID("$FreeBSD$");
30*0aa4b813SEmmanuel Vadot 
31*0aa4b813SEmmanuel Vadot #include <sys/param.h>
32*0aa4b813SEmmanuel Vadot #include <sys/systm.h>
33*0aa4b813SEmmanuel Vadot #include <sys/kernel.h>
34*0aa4b813SEmmanuel Vadot #include <sys/types.h>
35*0aa4b813SEmmanuel Vadot 
36*0aa4b813SEmmanuel Vadot #include <arm/allwinner/allwinner_pinctrl.h>
37*0aa4b813SEmmanuel Vadot 
38*0aa4b813SEmmanuel Vadot #ifdef SOC_ALLWINNER_H3
39*0aa4b813SEmmanuel Vadot 
40*0aa4b813SEmmanuel Vadot const static struct allwinner_pins h3_r_pins[] = {
41*0aa4b813SEmmanuel Vadot 	{"PL0",  0, 0,  {"gpio_in", "gpio_out", "s_twi", NULL, NULL, NULL, NULL, "eint"}},
42*0aa4b813SEmmanuel Vadot 	{"PL1",  0, 1,  {"gpio_in", "gpio_out", "s_twi", NULL, NULL, NULL, NULL, "eint"}},
43*0aa4b813SEmmanuel Vadot 	{"PL2",  0, 2,  {"gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, NULL, "eint"}},
44*0aa4b813SEmmanuel Vadot 	{"PL3",  0, 3,  {"gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, NULL, "eint"}},
45*0aa4b813SEmmanuel Vadot 	{"PL4",  0, 4,  {"gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, NULL, "eint"}},
46*0aa4b813SEmmanuel Vadot 	{"PL5",  0, 5,  {"gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, NULL, "eint"}},
47*0aa4b813SEmmanuel Vadot 	{"PL6",  0, 6,  {"gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, NULL, "eint"}},
48*0aa4b813SEmmanuel Vadot 	{"PL7",  0, 7,  {"gpio_in", "gpio_out", "s_jtag", NULL, NULL, NULL, NULL, "eint"}},
49*0aa4b813SEmmanuel Vadot 	{"PL8",  0, 8,  {"gpio_in", "gpio_out", NULL, NULL, NULL, NULL, NULL, "eint"}},
50*0aa4b813SEmmanuel Vadot 	{"PL9",  0, 9,  {"gpio_in", "gpio_out", NULL, NULL, NULL, NULL, NULL, "eint"}},
51*0aa4b813SEmmanuel Vadot 	{"PL10", 0, 10, {"gpio_in", "gpio_out", "s_pwm", NULL, NULL, NULL, NULL, "eint"}},
52*0aa4b813SEmmanuel Vadot 	{"PL11", 0, 11, {"gpio_in", "gpio_out", "s_cir_rx", NULL, NULL, NULL, NULL, "eint"}},
53*0aa4b813SEmmanuel Vadot };
54*0aa4b813SEmmanuel Vadot 
55*0aa4b813SEmmanuel Vadot const struct allwinner_padconf h3_r_padconf = {
56*0aa4b813SEmmanuel Vadot 	.npins = nitems(h3_r_pins),
57*0aa4b813SEmmanuel Vadot 	.pins = h3_r_pins,
58*0aa4b813SEmmanuel Vadot };
59*0aa4b813SEmmanuel Vadot 
60*0aa4b813SEmmanuel Vadot #endif /* SOC_ALLWINNER_H3 */
61