1013cb2e9SJared McNeill /*- 2*15b2342cSEmmanuel Vadot * Copyright (c) 2016 Emmanuel Vadot <manu@freebsd.org> 3013cb2e9SJared McNeill * 4013cb2e9SJared McNeill * Redistribution and use in source and binary forms, with or without 5013cb2e9SJared McNeill * modification, are permitted provided that the following conditions 6013cb2e9SJared McNeill * are met: 7013cb2e9SJared McNeill * 1. Redistributions of source code must retain the above copyright 8013cb2e9SJared McNeill * notice, this list of conditions and the following disclaimer. 9013cb2e9SJared McNeill * 2. Redistributions in binary form must reproduce the above copyright 10013cb2e9SJared McNeill * notice, this list of conditions and the following disclaimer in the 11013cb2e9SJared McNeill * documentation and/or other materials provided with the distribution. 12013cb2e9SJared McNeill * 13013cb2e9SJared McNeill * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14013cb2e9SJared McNeill * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15013cb2e9SJared McNeill * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16013cb2e9SJared McNeill * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 17013cb2e9SJared McNeill * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18013cb2e9SJared McNeill * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19013cb2e9SJared McNeill * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20013cb2e9SJared McNeill * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21013cb2e9SJared McNeill * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22013cb2e9SJared McNeill * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23013cb2e9SJared McNeill * SUCH DAMAGE. 24013cb2e9SJared McNeill * 25013cb2e9SJared McNeill */ 26013cb2e9SJared McNeill 27013cb2e9SJared McNeill #include <sys/param.h> 28013cb2e9SJared McNeill #include <sys/systm.h> 29013cb2e9SJared McNeill #include <sys/kernel.h> 30013cb2e9SJared McNeill #include <sys/types.h> 31013cb2e9SJared McNeill 32013cb2e9SJared McNeill #include <arm/allwinner/allwinner_pinctrl.h> 33013cb2e9SJared McNeill 34013cb2e9SJared McNeill #if defined(SOC_ALLWINNER_A31) || defined(SOC_ALLWINNER_A31S) 35013cb2e9SJared McNeill 36013cb2e9SJared McNeill const static struct allwinner_pins a31_r_pins[] = { 37013cb2e9SJared McNeill {"PL0", 0, 0, {"gpio_in", "gpio_out", "s_twi", "s_p2wi", NULL, NULL, NULL, NULL}}, 38013cb2e9SJared McNeill {"PL1", 0, 1, {"gpio_in", "gpio_out", "s_twi", "s_p2wi", NULL, NULL, NULL, NULL}}, 39013cb2e9SJared McNeill {"PL2", 0, 2, {"gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, NULL, NULL}}, 40013cb2e9SJared McNeill {"PL3", 0, 3, {"gpio_in", "gpio_out", "s_uart", NULL, NULL, NULL, NULL, NULL}}, 41013cb2e9SJared McNeill {"PL4", 0, 4, {"gpio_in", "gpio_out", "s_ir", NULL, NULL, NULL, NULL, NULL}}, 42*15b2342cSEmmanuel Vadot {"PL5", 0, 5, {"gpio_in", "gpio_out", "pl_eint0", "s_jtag", NULL, NULL, NULL, NULL}, 2, 0}, 43*15b2342cSEmmanuel Vadot {"PL6", 0, 6, {"gpio_in", "gpio_out", "pl_eint1", "s_jtag", NULL, NULL, NULL, NULL}, 2, 1}, 44*15b2342cSEmmanuel Vadot {"PL7", 0, 7, {"gpio_in", "gpio_out", "pl_eint2", "s_jtag", NULL, NULL, NULL, NULL}, 2, 2}, 45*15b2342cSEmmanuel Vadot {"PL8", 0, 8, {"gpio_in", "gpio_out", "pl_eint3", "s_jtag", NULL, NULL, NULL, NULL}, 2, 3}, 46013cb2e9SJared McNeill 47*15b2342cSEmmanuel Vadot {"PM0", 1, 0, {"gpio_in", "gpio_out", "pm_eint0", NULL, NULL, NULL, NULL, NULL}, 2, 0}, 48*15b2342cSEmmanuel Vadot {"PM1", 1, 1, {"gpio_in", "gpio_out", "pm_eint1", NULL, NULL, NULL, NULL, NULL}, 2, 1}, 49*15b2342cSEmmanuel Vadot {"PM2", 1, 2, {"gpio_in", "gpio_out", "pm_eint2", "1wire", NULL, NULL, NULL, NULL}, 2, 2}, 50*15b2342cSEmmanuel Vadot {"PM3", 1, 3, {"gpio_in", "gpio_out", "pm_eint3", NULL, NULL, NULL, NULL, NULL}, 2, 3}, 51*15b2342cSEmmanuel Vadot {"PM4", 1, 4, {"gpio_in", "gpio_out", "pm_eint4", NULL, NULL, NULL, NULL, NULL}, 2, 4}, 52*15b2342cSEmmanuel Vadot {"PM5", 1, 5, {"gpio_in", "gpio_out", "pm_eint5", NULL, NULL, NULL, NULL, NULL}, 2, 5}, 53*15b2342cSEmmanuel Vadot {"PM6", 1, 6, {"gpio_in", "gpio_out", "pm_eint6", NULL, NULL, NULL, NULL, NULL}, 2, 6}, 54*15b2342cSEmmanuel Vadot {"PM7", 1, 7, {"gpio_in", "gpio_out", "pm_eint7", "rtc", NULL, NULL, NULL, NULL}, 2, 7}, 55013cb2e9SJared McNeill }; 56013cb2e9SJared McNeill 57013cb2e9SJared McNeill const struct allwinner_padconf a31_r_padconf = { 58013cb2e9SJared McNeill .npins = nitems(a31_r_pins), 59013cb2e9SJared McNeill .pins = a31_r_pins, 60013cb2e9SJared McNeill }; 61013cb2e9SJared McNeill 62013cb2e9SJared McNeill #endif 63