diff options
| -rw-r--r-- | Makefile | 9 | ||||
| -rw-r--r-- | modem_gpios_data.c | 96 | ||||
| -rw-r--r-- | modem_gpios_data.h | 31 |
3 files changed, 135 insertions, 1 deletions
@@ -1,10 +1,17 @@ .PHONY: clean +SOURCE := \ + compatible_devices.c \ + exynos4412_gpios.c \ + exynos4412_gpios_data.c \ + i9300-modem-pins.c \ + run: i9300-modem-pins ./$< -i9300-modem-pins: i9300-modem-pins.c compatible_devices.c exynos4412_gpios.c exynos4412_gpios_data.c +i9300-modem-pins: $(SOURCE) $(CC) $^ -o $@ + clean: rm -f i9300-modem-pins diff --git a/modem_gpios_data.c b/modem_gpios_data.c new file mode 100644 index 0000000..189fc75 --- /dev/null +++ b/modem_gpios_data.c @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2021 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +#include "modem_gpios_data.h" + +struct modem_gpio_data modem_gpio_datas[] = { + { + /* Exynos GPIO */ + bank = "gpl2", + gpio_offset = 5, + + /* Kernel and driver specific information */ + dt_gpio_name = "cp-on", + }, + { + /* Exynos GPIO */ + bank = "gpx3", + gpio_offset = 2, + + /* Kernel and driver specific information */ + dt_gpio_name = "cd-reset", + }, + { + /* Exynos GPIO */ + bank = "gpx1", + gpio_offset = 2, + + /* Kernel and driver specific information */ + dt_gpio_name = "cd-dump", + }, + { + /* Exynos GPIO */ + bank = "gpx1", + gpio_offset = 6, + + /* Kernel and driver specific information */ + dt_gpio_name = "phone-active", + }, + { + /* Exynos GPIO */ + bank = "gpm3", + gpio_offset = 3, + + /* Kernel and driver specific information */ + dt_gpio_name = "reset-req", + }, + { + /* Exynos GPIO */ + bank = "gpf1", + gpio_offset = 6, + + /* Kernel and driver specific information */ + dt_gpio_name = "pda-active", + }, + { + /* Exynos GPIO */ + bank = "gpf1", + gpio_offset = 1, + + /* Kernel and driver specific information */ + dt_gpio_name = "link-active", + }, + { + /* Exynos GPIO */ + bank = "gpx1", + gpio_offset = 0, + + /* Kernel and driver specific information */ + dt_gpio_name = "link-slavewake", + }, + { + /* Exynos GPIO */ + bank = "gpm2", + gpio_offset = 4, + + /* Kernel and driver specific information */ + dt_gpio_name = "suspend-req", + }, + { + /* Sentinel */ + }, +}; diff --git a/modem_gpios_data.h b/modem_gpios_data.h new file mode 100644 index 0000000..8f36145 --- /dev/null +++ b/modem_gpios_data.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2021 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +#ifndef MODEM_GPIOS_DATA_H +#define MODEM_GPIOS_DATA_H + +struct modem_gpio_data { + /* Exynos GPIO */ + char *bank; + uint32_t gpio_offset; + + /* Kernel and driver specific information */ + char *board_gpio_name; + char *dt_gpio_name; +}; + +#endif /* MODEM_GPIOS_DATA_H */ |
