diff options
| author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-05-17 17:59:42 +0200 |
|---|---|---|
| committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-05-17 18:09:41 +0200 |
| commit | 4ce59cba53f324a7ecf577ca7aab28b69eb461fc (patch) | |
| tree | e032e7048653e7721c162997fc5cab654d30e256 | |
| parent | eaae40b66801bd7a6ffc07377e90002dc2b1d7b7 (diff) | |
| download | exynos-gpio-tool-4ce59cba53f324a7ecf577ca7aab28b69eb461fc.tar.gz exynos-gpio-tool-4ce59cba53f324a7ecf577ca7aab28b69eb461fc.tar.bz2 exynos-gpio-tool-4ce59cba53f324a7ecf577ca7aab28b69eb461fc.zip | |
Add data from exynos4412-midas-3g.dtsi from the Replicant 11 kernel
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
| -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 */ |
