xref: /aosp_15_r20/external/coreboot/src/mainboard/pcengines/apu2/gpio_ftns.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef GPIO_FTNS_H
4 #define GPIO_FTNS_H
5 
6 int get_spd_offset(void);
7 
8 /*
9  * Based on PC Engines APU2C and APU3A schematics
10  * http://www.pcengines.ch/schema/apu2c.pdf
11  * http://www.pcengines.ch/schema/apu3a.pdf
12  * Beware that the GPIO pin numbers on the package don't match the internal GPIO numbers
13  */
14 #define GPIO_22   0x09    // MODESW (APU5)
15 #define GPIO_32   0x59    // MODESW (SIMSWAP2 on APU5)
16 #define GPIO_33   0x5A    // SIMSWAP (SIMSWAP3 on APU5)
17 #define GPIO_49   0x40    // STRAP0
18 #define GPIO_50   0x41    // STRAP1
19 #define GPIO_51   0x42    // PE3 Reset (SIM1 Reset on APU5)
20 #define GPIO_55   0x43    // PE4 Reset (SIM2 Reset on APU5)
21 #define GPIO_57   0x44    // LED1#
22 #define GPIO_58   0x45    // LED2#
23 #define GPIO_59   0x46    // LED3#
24 #define GPIO_64   0x47    // PE3_WDIS (SIM3 Reset on APU5)
25 #define GPIO_66   0x5B    // SPKR
26 #define GPIO_68   0x48    // PE4_WDIS (SIMSWAP1 on APU5)
27 #define GPIO_71   0x4D    // PROCHOT
28 
29 #define GPIO_22_IOMUX_GPIOxx	0
30 #define GPIO_32_IOMUX_GPIOxx	0
31 #define GPIO_33_IOMUX_GPIOxx	0
32 #define GPIO_49_IOMUX_GPIOxx	2
33 #define GPIO_50_IOMUX_GPIOxx	2
34 #define GPIO_51_IOMUX_GPIOxx	2
35 #define GPIO_55_IOMUX_GPIOxx	3
36 #define GPIO_57_IOMUX_GPIOxx	1
37 #define GPIO_58_IOMUX_GPIOxx	1
38 #define GPIO_59_IOMUX_GPIOxx	3
39 #define GPIO_64_IOMUX_GPIOxx	2
40 #define GPIO_68_IOMUX_GPIOxx	0
41 #define GPIO_71_IOMUX_GPIOxx	0
42 
43 #endif /* GPIO_FTNS_H */
44