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