diff options
-rw-r--r-- | arch/blackfin/mach-bf518/Kconfig | 78 | ||||
-rw-r--r-- | arch/blackfin/mach-bf518/include/mach/portmux.h | 54 |
2 files changed, 87 insertions, 45 deletions
diff --git a/arch/blackfin/mach-bf518/Kconfig b/arch/blackfin/mach-bf518/Kconfig index 1d9f631a7f94..bde92a19970e 100644 --- a/arch/blackfin/mach-bf518/Kconfig +++ b/arch/blackfin/mach-bf518/Kconfig | |||
@@ -11,55 +11,75 @@ menu "BF518 Specific Configuration" | |||
11 | comment "Alternative Multiplexing Scheme" | 11 | comment "Alternative Multiplexing Scheme" |
12 | 12 | ||
13 | choice | 13 | choice |
14 | prompt "SPORT0" | 14 | prompt "PWM Channel Pins" |
15 | default BF518_SPORT0_PORTG | 15 | default BF518_PWM_ALL_PORTF |
16 | help | 16 | help |
17 | Select PORT used for SPORT0. See Hardware Reference Manual | 17 | Select pins used for the PWM channels: |
18 | PWM_AH PWM_AL PWM_BH PWM_BL PWM_CH PWM_CL | ||
18 | 19 | ||
19 | config BF518_SPORT0_PORTF | 20 | See the Hardware Reference Manual for more details. |
20 | bool "PORT F" | 21 | |
22 | config BF518_PWM_ALL_PORTF | ||
23 | bool "PF1 - PF6" | ||
21 | help | 24 | help |
22 | PORT F | 25 | PF{1,2,3,4,5,6} <-> PWM_{AH,AL,BH,BL,CH,CL} |
23 | 26 | ||
24 | config BF518_SPORT0_PORTG | 27 | config BF518_PWM_PORTF_PORTG |
25 | bool "PORT G" | 28 | bool "PF11 - PF14 / PG1 - PG2" |
26 | help | 29 | help |
27 | PORT G | 30 | PF{11,12,13,14} <-> PWM_{AH,AL,BH,BL} |
31 | PG{1,2} <-> PWM_{CH,CL} | ||
32 | |||
28 | endchoice | 33 | endchoice |
29 | 34 | ||
30 | choice | 35 | choice |
31 | prompt "SPORT0 TSCLK Location" | 36 | prompt "PWM Sync Pin" |
32 | depends on BF518_SPORT0_PORTG | 37 | default BF518_PWM_SYNC_PF7 |
33 | default BF518_SPORT0_TSCLK_PG10 | ||
34 | help | 38 | help |
35 | Select PIN used for SPORT0_TSCLK. See Hardware Reference Manual | 39 | Select the pin used for PWM_SYNC. |
36 | 40 | ||
37 | config BF518_SPORT0_TSCLK_PG10 | 41 | See the Hardware Reference Manual for more details. |
38 | bool "PORT PG10" | 42 | |
39 | help | 43 | config BF518_PWM_SYNC_PF7 |
40 | PORT PG10 | 44 | bool "PF7" |
45 | config BF518_PWM_SYNC_PF15 | ||
46 | bool "PF15" | ||
47 | endchoice | ||
41 | 48 | ||
42 | config BF518_SPORT0_TSCLK_PG14 | 49 | choice |
43 | bool "PORT PG14" | 50 | prompt "PWM Trip B Pin" |
51 | default BF518_PWM_TRIPB_PG10 | ||
44 | help | 52 | help |
45 | PORT PG14 | 53 | Select the pin used for PWM_TRIPB. |
54 | |||
55 | See the Hardware Reference Manual for more details. | ||
56 | |||
57 | config BF518_PWM_TRIPB_PG10 | ||
58 | bool "PG10" | ||
59 | config BF518_PWM_TRIPB_PG14 | ||
60 | bool "PG14" | ||
46 | endchoice | 61 | endchoice |
47 | 62 | ||
48 | choice | 63 | choice |
49 | prompt "UART1" | 64 | prompt "PPI / Timer Pins" |
50 | default BF518_UART1_PORTF | 65 | default BF518_PPI_TMR_PG5 |
51 | help | 66 | help |
52 | Select PORT used for UART1. See Hardware Reference Manual | 67 | Select pins used for PPI/Timer: |
68 | PPICLK PPIFS1 PPIFS2 | ||
69 | TMRCLK TMR0 TMR1 | ||
53 | 70 | ||
54 | config BF518_UART1_PORTF | 71 | See the Hardware Reference Manual for more details. |
55 | bool "PORT F" | 72 | |
73 | config BF518_PPI_TMR_PG5 | ||
74 | bool "PG5 - PG7" | ||
56 | help | 75 | help |
57 | PORT F | 76 | PG{5,6,7} <-> {PPICLK/TMRCLK,TMR0/PPIFS1,TMR1/PPIFS2} |
58 | 77 | ||
59 | config BF518_UART1_PORTG | 78 | config BF518_PPI_TMR_PG12 |
60 | bool "PORT G" | 79 | bool "PG12 - PG14" |
61 | help | 80 | help |
62 | PORT G | 81 | PG{12,13,14} <-> {PPICLK/TMRCLK,TMR0/PPIFS1,TMR1/PPIFS2} |
82 | |||
63 | endchoice | 83 | endchoice |
64 | 84 | ||
65 | comment "Hysteresis/Schmitt Trigger Control" | 85 | comment "Hysteresis/Schmitt Trigger Control" |
diff --git a/arch/blackfin/mach-bf518/include/mach/portmux.h b/arch/blackfin/mach-bf518/include/mach/portmux.h index cd84a569b04e..b3b806f468da 100644 --- a/arch/blackfin/mach-bf518/include/mach/portmux.h +++ b/arch/blackfin/mach-bf518/include/mach/portmux.h | |||
@@ -81,9 +81,15 @@ | |||
81 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) | 81 | #define P_PPI0_D14 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) |
82 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) | 82 | #define P_PPI0_D15 (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) |
83 | 83 | ||
84 | #ifndef CONFIG_BF518_PPI_TMR_PG12 | ||
85 | #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(1)) | ||
86 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(1)) | ||
87 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(1)) | ||
88 | #else | ||
84 | #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1)) | 89 | #define P_PPI0_CLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(1)) |
85 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) | 90 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(1)) |
86 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1)) | 91 | #define P_PPI0_FS2 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(1)) |
92 | #endif | ||
87 | #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) | 93 | #define P_PPI0_FS3 (P_DEFINED | P_IDENT(GPIO_PG15) | P_FUNCT(1)) |
88 | 94 | ||
89 | /* SPI Port Mux */ | 95 | /* SPI Port Mux */ |
@@ -139,9 +145,15 @@ | |||
139 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1)) | 145 | #define P_UART1_RX (P_DEFINED | P_IDENT(GPIO_PH7) | P_FUNCT(1)) |
140 | 146 | ||
141 | /* Timer */ | 147 | /* Timer */ |
148 | #ifndef CONFIG_BF518_PPI_TMR_PG12 | ||
142 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2)) | 149 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG5) | P_FUNCT(2)) |
143 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2)) | 150 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG6) | P_FUNCT(2)) |
144 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2)) | 151 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG7) | P_FUNCT(2)) |
152 | #else | ||
153 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PG12) | P_FUNCT(2)) | ||
154 | #define P_TMR0 (P_DEFINED | P_IDENT(GPIO_PG13) | P_FUNCT(2)) | ||
155 | #define P_TMR1 (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) | ||
156 | #endif | ||
145 | #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2)) | 157 | #define P_TMR2 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(2)) |
146 | #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2)) | 158 | #define P_TMR3 (P_DEFINED | P_IDENT(GPIO_PF10) | P_FUNCT(2)) |
147 | #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(2)) | 159 | #define P_TMR4 (P_DEFINED | P_IDENT(GPIO_PG9) | P_FUNCT(2)) |
@@ -158,23 +170,33 @@ | |||
158 | #define P_TWI0_SDA (P_DONTCARE) | 170 | #define P_TWI0_SDA (P_DONTCARE) |
159 | 171 | ||
160 | /* PWM */ | 172 | /* PWM */ |
161 | #define P_PWM0_AH (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2)) | 173 | #ifndef CONFIG_BF518_PWM_PORTF_PORTG |
162 | #define P_PWM0_AL (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2)) | 174 | #define P_PWM_AH (P_DEFINED | P_IDENT(GPIO_PF1) | P_FUNCT(2)) |
163 | #define P_PWM0_BH (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2)) | 175 | #define P_PWM_AL (P_DEFINED | P_IDENT(GPIO_PF2) | P_FUNCT(2)) |
164 | #define P_PWM0_BL (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2)) | 176 | #define P_PWM_BH (P_DEFINED | P_IDENT(GPIO_PF3) | P_FUNCT(2)) |
165 | #define P_PWM0_CH (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2)) | 177 | #define P_PWM_BL (P_DEFINED | P_IDENT(GPIO_PF4) | P_FUNCT(2)) |
166 | #define P_PWM0_CL (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2)) | 178 | #define P_PWM_CH (P_DEFINED | P_IDENT(GPIO_PF5) | P_FUNCT(2)) |
167 | #define P_PWM0_SYNC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2)) | 179 | #define P_PWM_CL (P_DEFINED | P_IDENT(GPIO_PF6) | P_FUNCT(2)) |
168 | 180 | #else | |
169 | #define P_PWM1_AH (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(2)) | 181 | #define P_PWM_AH (P_DEFINED | P_IDENT(GPIO_PF11) | P_FUNCT(2)) |
170 | #define P_PWM1_AL (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2)) | 182 | #define P_PWM_AL (P_DEFINED | P_IDENT(GPIO_PF12) | P_FUNCT(2)) |
171 | #define P_PWM1_BH (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2)) | 183 | #define P_PWM_BH (P_DEFINED | P_IDENT(GPIO_PF13) | P_FUNCT(2)) |
172 | #define P_PWM1_BL (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2)) | 184 | #define P_PWM_BL (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(2)) |
173 | #define P_PWM1_CH (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) | 185 | #define P_PWM_CH (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) |
174 | #define P_PWM1_CL (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) | 186 | #define P_PWM_CL (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) |
175 | #define P_PWM1_SYNC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2)) | 187 | #endif |
176 | 188 | ||
189 | #ifndef CONFIG_BF518_PWM_SYNC_PF15 | ||
190 | #define P_PWM_SYNC (P_DEFINED | P_IDENT(GPIO_PF7) | P_FUNCT(2)) | ||
191 | #else | ||
192 | #define P_PWM_SYNC (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(2)) | ||
193 | #endif | ||
194 | |||
195 | #ifndef CONFIG_BF518_PWM_TRIPB_PG14 | ||
196 | #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG10) | P_FUNCT(2)) | ||
197 | #else | ||
177 | #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) | 198 | #define P_PWM_TRIPB (P_DEFINED | P_IDENT(GPIO_PG14) | P_FUNCT(2)) |
199 | #endif | ||
178 | 200 | ||
179 | /* RSI */ | 201 | /* RSI */ |
180 | #define P_RSI_DATA0 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1)) | 202 | #define P_RSI_DATA0 (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(1)) |