~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/dt-bindings/pinctrl/pinctrl-starfive-jh7100.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 OR MIT */
  2 /*
  3  * Copyright (C) 2021 Emil Renner Berthing <kernel@esmil.dk>
  4  */
  5 
  6 #ifndef __DT_BINDINGS_PINCTRL_STARFIVE_JH7100_H__
  7 #define __DT_BINDINGS_PINCTRL_STARFIVE_JH7100_H__
  8 
  9 #define PAD_GPIO_OFFSET         0
 10 #define PAD_FUNC_SHARE_OFFSET   64
 11 #define PAD_GPIO(x)             (PAD_GPIO_OFFSET + (x))
 12 #define PAD_FUNC_SHARE(x)       (PAD_FUNC_SHARE_OFFSET + (x))
 13 
 14 /*
 15  * GPIOMUX bits:
 16  *  | 31 - 24 | 23 - 16 | 15 - 8 |     7    |     6    |  5 - 0  |
 17  *  |  dout   |  doen   |  din   | dout rev | doen rev | gpio nr |
 18  *
 19  * dout:     output signal
 20  * doen:     output enable signal
 21  * din:      optional input signal, 0xff = none
 22  * dout rev: output signal reverse bit
 23  * doen rev: output enable signal reverse bit
 24  * gpio nr:  gpio number, 0 - 63
 25  */
 26 #define GPIOMUX(n, dout, doen, din) ( \
 27                 (((dout) & 0x80000000) >> (31 - 7)) | (((dout) & 0xff) << 24) | \
 28                 (((doen) & 0x80000000) >> (31 - 6)) | (((doen) & 0xff) << 16) | \
 29                 (((din) & 0xff) << 8) | \
 30                 ((n) & 0x3f))
 31 
 32 #define GPO_REVERSE                             0x80000000
 33 
 34 #define GPO_LOW                                 0
 35 #define GPO_HIGH                                1
 36 #define GPO_ENABLE                              0
 37 #define GPO_DISABLE                             1
 38 #define GPO_CLK_GMAC_PAPHYREF                   2
 39 #define GPO_JTAG_TDO                            3
 40 #define GPO_JTAG_TDO_OEN                        4
 41 #define GPO_DMIC_CLK_OUT                        5
 42 #define GPO_DSP_JTDOEN_PAD                      6
 43 #define GPO_DSP_JTDO_PAD                        7
 44 #define GPO_I2C0_PAD_SCK_OE                     8
 45 #define GPO_I2C0_PAD_SCK_OEN                    (GPO_I2C0_PAD_SCK_OE | GPO_REVERSE)
 46 #define GPO_I2C0_PAD_SDA_OE                     9
 47 #define GPO_I2C0_PAD_SDA_OEN                    (GPO_I2C0_PAD_SDA_OE | GPO_REVERSE)
 48 #define GPO_I2C1_PAD_SCK_OE                     10
 49 #define GPO_I2C1_PAD_SCK_OEN                    (GPO_I2C1_PAD_SCK_OE | GPO_REVERSE)
 50 #define GPO_I2C1_PAD_SDA_OE                     11
 51 #define GPO_I2C1_PAD_SDA_OEN                    (GPO_I2C1_PAD_SDA_OE | GPO_REVERSE)
 52 #define GPO_I2C2_PAD_SCK_OE                     12
 53 #define GPO_I2C2_PAD_SCK_OEN                    (GPO_I2C2_PAD_SCK_OE | GPO_REVERSE)
 54 #define GPO_I2C2_PAD_SDA_OE                     13
 55 #define GPO_I2C2_PAD_SDA_OEN                    (GPO_I2C2_PAD_SDA_OE | GPO_REVERSE)
 56 #define GPO_I2C3_PAD_SCK_OE                     14
 57 #define GPO_I2C3_PAD_SCK_OEN                    (GPO_I2C3_PAD_SCK_OE | GPO_REVERSE)
 58 #define GPO_I2C3_PAD_SDA_OE                     15
 59 #define GPO_I2C3_PAD_SDA_OEN                    (GPO_I2C3_PAD_SDA_OE | GPO_REVERSE)
 60 #define GPO_I2SRX_BCLK_OUT                      16
 61 #define GPO_I2SRX_BCLK_OUT_OEN                  17
 62 #define GPO_I2SRX_LRCK_OUT                      18
 63 #define GPO_I2SRX_LRCK_OUT_OEN                  19
 64 #define GPO_I2SRX_MCLK_OUT                      20
 65 #define GPO_I2STX_BCLK_OUT                      21
 66 #define GPO_I2STX_BCLK_OUT_OEN                  22
 67 #define GPO_I2STX_LRCK_OUT                      23
 68 #define GPO_I2STX_LRCK_OUT_OEN                  24
 69 #define GPO_I2STX_MCLK_OUT                      25
 70 #define GPO_I2STX_SDOUT0                        26
 71 #define GPO_I2STX_SDOUT1                        27
 72 #define GPO_LCD_PAD_CSM_N                       28
 73 #define GPO_PWM_PAD_OE_N_BIT0                   29
 74 #define GPO_PWM_PAD_OE_N_BIT1                   30
 75 #define GPO_PWM_PAD_OE_N_BIT2                   31
 76 #define GPO_PWM_PAD_OE_N_BIT3                   32
 77 #define GPO_PWM_PAD_OE_N_BIT4                   33
 78 #define GPO_PWM_PAD_OE_N_BIT5                   34
 79 #define GPO_PWM_PAD_OE_N_BIT6                   35
 80 #define GPO_PWM_PAD_OE_N_BIT7                   36
 81 #define GPO_PWM_PAD_OUT_BIT0                    37
 82 #define GPO_PWM_PAD_OUT_BIT1                    38
 83 #define GPO_PWM_PAD_OUT_BIT2                    39
 84 #define GPO_PWM_PAD_OUT_BIT3                    40
 85 #define GPO_PWM_PAD_OUT_BIT4                    41
 86 #define GPO_PWM_PAD_OUT_BIT5                    42
 87 #define GPO_PWM_PAD_OUT_BIT6                    43
 88 #define GPO_PWM_PAD_OUT_BIT7                    44
 89 #define GPO_PWMDAC_LEFT_OUT                     45
 90 #define GPO_PWMDAC_RIGHT_OUT                    46
 91 #define GPO_QSPI_CSN1_OUT                       47
 92 #define GPO_QSPI_CSN2_OUT                       48
 93 #define GPO_QSPI_CSN3_OUT                       49
 94 #define GPO_REGISTER23_SCFG_CMSENSOR_RST0       50
 95 #define GPO_REGISTER23_SCFG_CMSENSOR_RST1       51
 96 #define GPO_REGISTER32_SCFG_GMAC_PHY_RSTN       52
 97 #define GPO_SDIO0_PAD_CARD_POWER_EN             53
 98 #define GPO_SDIO0_PAD_CCLK_OUT                  54
 99 #define GPO_SDIO0_PAD_CCMD_OE                   55
100 #define GPO_SDIO0_PAD_CCMD_OEN                  (GPO_SDIO0_PAD_CCMD_OE | GPO_REVERSE)
101 #define GPO_SDIO0_PAD_CCMD_OUT                  56
102 #define GPO_SDIO0_PAD_CDATA_OE_BIT0             57
103 #define GPO_SDIO0_PAD_CDATA_OEN_BIT0            (GPO_SDIO0_PAD_CDATA_OE_BIT0 | GPO_REVERSE)
104 #define GPO_SDIO0_PAD_CDATA_OE_BIT1             58
105 #define GPO_SDIO0_PAD_CDATA_OEN_BIT1            (GPO_SDIO0_PAD_CDATA_OE_BIT1 | GPO_REVERSE)
106 #define GPO_SDIO0_PAD_CDATA_OE_BIT2             59
107 #define GPO_SDIO0_PAD_CDATA_OEN_BIT2            (GPO_SDIO0_PAD_CDATA_OE_BIT2 | GPO_REVERSE)
108 #define GPO_SDIO0_PAD_CDATA_OE_BIT3             60
109 #define GPO_SDIO0_PAD_CDATA_OEN_BIT3            (GPO_SDIO0_PAD_CDATA_OE_BIT3 | GPO_REVERSE)
110 #define GPO_SDIO0_PAD_CDATA_OE_BIT4             61
111 #define GPO_SDIO0_PAD_CDATA_OEN_BIT4            (GPO_SDIO0_PAD_CDATA_OE_BIT4 | GPO_REVERSE)
112 #define GPO_SDIO0_PAD_CDATA_OE_BIT5             62
113 #define GPO_SDIO0_PAD_CDATA_OEN_BIT5            (GPO_SDIO0_PAD_CDATA_OE_BIT5 | GPO_REVERSE)
114 #define GPO_SDIO0_PAD_CDATA_OE_BIT6             63
115 #define GPO_SDIO0_PAD_CDATA_OEN_BIT6            (GPO_SDIO0_PAD_CDATA_OE_BIT6 | GPO_REVERSE)
116 #define GPO_SDIO0_PAD_CDATA_OE_BIT7             64
117 #define GPO_SDIO0_PAD_CDATA_OEN_BIT7            (GPO_SDIO0_PAD_CDATA_OE_BIT7 | GPO_REVERSE)
118 #define GPO_SDIO0_PAD_CDATA_OUT_BIT0            65
119 #define GPO_SDIO0_PAD_CDATA_OUT_BIT1            66
120 #define GPO_SDIO0_PAD_CDATA_OUT_BIT2            67
121 #define GPO_SDIO0_PAD_CDATA_OUT_BIT3            68
122 #define GPO_SDIO0_PAD_CDATA_OUT_BIT4            69
123 #define GPO_SDIO0_PAD_CDATA_OUT_BIT5            70
124 #define GPO_SDIO0_PAD_CDATA_OUT_BIT6            71
125 #define GPO_SDIO0_PAD_CDATA_OUT_BIT7            72
126 #define GPO_SDIO0_PAD_RST_N                     73
127 #define GPO_SDIO1_PAD_CARD_POWER_EN             74
128 #define GPO_SDIO1_PAD_CCLK_OUT                  75
129 #define GPO_SDIO1_PAD_CCMD_OE                   76
130 #define GPO_SDIO1_PAD_CCMD_OEN                  (GPO_SDIO1_PAD_CCMD_OE | GPO_REVERSE)
131 #define GPO_SDIO1_PAD_CCMD_OUT                  77
132 #define GPO_SDIO1_PAD_CDATA_OE_BIT0             78
133 #define GPO_SDIO1_PAD_CDATA_OEN_BIT0            (GPO_SDIO1_PAD_CDATA_OE_BIT0 | GPO_REVERSE)
134 #define GPO_SDIO1_PAD_CDATA_OE_BIT1             79
135 #define GPO_SDIO1_PAD_CDATA_OEN_BIT1            (GPO_SDIO1_PAD_CDATA_OE_BIT1 | GPO_REVERSE)
136 #define GPO_SDIO1_PAD_CDATA_OE_BIT2             80
137 #define GPO_SDIO1_PAD_CDATA_OEN_BIT2            (GPO_SDIO1_PAD_CDATA_OE_BIT2 | GPO_REVERSE)
138 #define GPO_SDIO1_PAD_CDATA_OE_BIT3             81
139 #define GPO_SDIO1_PAD_CDATA_OEN_BIT3            (GPO_SDIO1_PAD_CDATA_OE_BIT3 | GPO_REVERSE)
140 #define GPO_SDIO1_PAD_CDATA_OE_BIT4             82
141 #define GPO_SDIO1_PAD_CDATA_OEN_BIT4            (GPO_SDIO1_PAD_CDATA_OE_BIT4 | GPO_REVERSE)
142 #define GPO_SDIO1_PAD_CDATA_OE_BIT5             83
143 #define GPO_SDIO1_PAD_CDATA_OEN_BIT5            (GPO_SDIO1_PAD_CDATA_OE_BIT5 | GPO_REVERSE)
144 #define GPO_SDIO1_PAD_CDATA_OE_BIT6             84
145 #define GPO_SDIO1_PAD_CDATA_OEN_BIT6            (GPO_SDIO1_PAD_CDATA_OE_BIT6 | GPO_REVERSE)
146 #define GPO_SDIO1_PAD_CDATA_OE_BIT7             85
147 #define GPO_SDIO1_PAD_CDATA_OEN_BIT7            (GPO_SDIO1_PAD_CDATA_OE_BIT7 | GPO_REVERSE)
148 #define GPO_SDIO1_PAD_CDATA_OUT_BIT0            86
149 #define GPO_SDIO1_PAD_CDATA_OUT_BIT1            87
150 #define GPO_SDIO1_PAD_CDATA_OUT_BIT2            88
151 #define GPO_SDIO1_PAD_CDATA_OUT_BIT3            89
152 #define GPO_SDIO1_PAD_CDATA_OUT_BIT4            90
153 #define GPO_SDIO1_PAD_CDATA_OUT_BIT5            91
154 #define GPO_SDIO1_PAD_CDATA_OUT_BIT6            92
155 #define GPO_SDIO1_PAD_CDATA_OUT_BIT7            93
156 #define GPO_SDIO1_PAD_RST_N                     94
157 #define GPO_SPDIF_TX_SDOUT                      95
158 #define GPO_SPDIF_TX_SDOUT_OEN                  96
159 #define GPO_SPI0_PAD_OE_N                       97
160 #define GPO_SPI0_PAD_SCK_OUT                    98
161 #define GPO_SPI0_PAD_SS_0_N                     99
162 #define GPO_SPI0_PAD_SS_1_N                     100
163 #define GPO_SPI0_PAD_TXD                        101
164 #define GPO_SPI1_PAD_OE_N                       102
165 #define GPO_SPI1_PAD_SCK_OUT                    103
166 #define GPO_SPI1_PAD_SS_0_N                     104
167 #define GPO_SPI1_PAD_SS_1_N                     105
168 #define GPO_SPI1_PAD_TXD                        106
169 #define GPO_SPI2_PAD_OE_N                       107
170 #define GPO_SPI2_PAD_SCK_OUT                    108
171 #define GPO_SPI2_PAD_SS_0_N                     109
172 #define GPO_SPI2_PAD_SS_1_N                     110
173 #define GPO_SPI2_PAD_TXD                        111
174 #define GPO_SPI2AHB_PAD_OE_N_BIT0               112
175 #define GPO_SPI2AHB_PAD_OE_N_BIT1               113
176 #define GPO_SPI2AHB_PAD_OE_N_BIT2               114
177 #define GPO_SPI2AHB_PAD_OE_N_BIT3               115
178 #define GPO_SPI2AHB_PAD_TXD_BIT0                116
179 #define GPO_SPI2AHB_PAD_TXD_BIT1                117
180 #define GPO_SPI2AHB_PAD_TXD_BIT2                118
181 #define GPO_SPI2AHB_PAD_TXD_BIT3                119
182 #define GPO_SPI3_PAD_OE_N                       120
183 #define GPO_SPI3_PAD_SCK_OUT                    121
184 #define GPO_SPI3_PAD_SS_0_N                     122
185 #define GPO_SPI3_PAD_SS_1_N                     123
186 #define GPO_SPI3_PAD_TXD                        124
187 #define GPO_UART0_PAD_DTRN                      125
188 #define GPO_UART0_PAD_RTSN                      126
189 #define GPO_UART0_PAD_SOUT                      127
190 #define GPO_UART1_PAD_SOUT                      128
191 #define GPO_UART2_PAD_DTR_N                     129
192 #define GPO_UART2_PAD_RTS_N                     130
193 #define GPO_UART2_PAD_SOUT                      131
194 #define GPO_UART3_PAD_SOUT                      132
195 #define GPO_USB_DRV_BUS                         133
196 
197 #define GPI_CPU_JTAG_TCK                        0
198 #define GPI_CPU_JTAG_TDI                        1
199 #define GPI_CPU_JTAG_TMS                        2
200 #define GPI_CPU_JTAG_TRST                       3
201 #define GPI_DMIC_SDIN_BIT0                      4
202 #define GPI_DMIC_SDIN_BIT1                      5
203 #define GPI_DSP_JTCK_PAD                        6
204 #define GPI_DSP_JTDI_PAD                        7
205 #define GPI_DSP_JTMS_PAD                        8
206 #define GPI_DSP_TRST_PAD                        9
207 #define GPI_I2C0_PAD_SCK_IN                     10
208 #define GPI_I2C0_PAD_SDA_IN                     11
209 #define GPI_I2C1_PAD_SCK_IN                     12
210 #define GPI_I2C1_PAD_SDA_IN                     13
211 #define GPI_I2C2_PAD_SCK_IN                     14
212 #define GPI_I2C2_PAD_SDA_IN                     15
213 #define GPI_I2C3_PAD_SCK_IN                     16
214 #define GPI_I2C3_PAD_SDA_IN                     17
215 #define GPI_I2SRX_BCLK_IN                       18
216 #define GPI_I2SRX_LRCK_IN                       19
217 #define GPI_I2SRX_SDIN_BIT0                     20
218 #define GPI_I2SRX_SDIN_BIT1                     21
219 #define GPI_I2SRX_SDIN_BIT2                     22
220 #define GPI_I2STX_BCLK_IN                       23
221 #define GPI_I2STX_LRCK_IN                       24
222 #define GPI_SDIO0_PAD_CARD_DETECT_N             25
223 #define GPI_SDIO0_PAD_CARD_WRITE_PRT            26
224 #define GPI_SDIO0_PAD_CCMD_IN                   27
225 #define GPI_SDIO0_PAD_CDATA_IN_BIT0             28
226 #define GPI_SDIO0_PAD_CDATA_IN_BIT1             29
227 #define GPI_SDIO0_PAD_CDATA_IN_BIT2             30
228 #define GPI_SDIO0_PAD_CDATA_IN_BIT3             31
229 #define GPI_SDIO0_PAD_CDATA_IN_BIT4             32
230 #define GPI_SDIO0_PAD_CDATA_IN_BIT5             33
231 #define GPI_SDIO0_PAD_CDATA_IN_BIT6             34
232 #define GPI_SDIO0_PAD_CDATA_IN_BIT7             35
233 #define GPI_SDIO1_PAD_CARD_DETECT_N             36
234 #define GPI_SDIO1_PAD_CARD_WRITE_PRT            37
235 #define GPI_SDIO1_PAD_CCMD_IN                   38
236 #define GPI_SDIO1_PAD_CDATA_IN_BIT0             39
237 #define GPI_SDIO1_PAD_CDATA_IN_BIT1             40
238 #define GPI_SDIO1_PAD_CDATA_IN_BIT2             41
239 #define GPI_SDIO1_PAD_CDATA_IN_BIT3             42
240 #define GPI_SDIO1_PAD_CDATA_IN_BIT4             43
241 #define GPI_SDIO1_PAD_CDATA_IN_BIT5             44
242 #define GPI_SDIO1_PAD_CDATA_IN_BIT6             45
243 #define GPI_SDIO1_PAD_CDATA_IN_BIT7             46
244 #define GPI_SPDIF_RX_SDIN                       47
245 #define GPI_SPI0_PAD_RXD                        48
246 #define GPI_SPI0_PAD_SS_IN_N                    49
247 #define GPI_SPI1_PAD_RXD                        50
248 #define GPI_SPI1_PAD_SS_IN_N                    51
249 #define GPI_SPI2_PAD_RXD                        52
250 #define GPI_SPI2_PAD_SS_IN_N                    53
251 #define GPI_SPI2AHB_PAD_RXD_BIT0                54
252 #define GPI_SPI2AHB_PAD_RXD_BIT1                55
253 #define GPI_SPI2AHB_PAD_RXD_BIT2                56
254 #define GPI_SPI2AHB_PAD_RXD_BIT3                57
255 #define GPI_SPI2AHB_PAD_SS_N                    58
256 #define GPI_SPI2AHB_SLV_SCLKIN                  59
257 #define GPI_SPI3_PAD_RXD                        60
258 #define GPI_SPI3_PAD_SS_IN_N                    61
259 #define GPI_UART0_PAD_CTSN                      62
260 #define GPI_UART0_PAD_DCDN                      63
261 #define GPI_UART0_PAD_DSRN                      64
262 #define GPI_UART0_PAD_RIN                       65
263 #define GPI_UART0_PAD_SIN                       66
264 #define GPI_UART1_PAD_SIN                       67
265 #define GPI_UART2_PAD_CTS_N                     68
266 #define GPI_UART2_PAD_DCD_N                     69
267 #define GPI_UART2_PAD_DSR_N                     70
268 #define GPI_UART2_PAD_RI_N                      71
269 #define GPI_UART2_PAD_SIN                       72
270 #define GPI_UART3_PAD_SIN                       73
271 #define GPI_USB_OVER_CURRENT                    74
272 
273 #define GPI_NONE                                0xff
274 
275 #endif /* __DT_BINDINGS_PINCTRL_STARFIVE_JH7100_H__ */
276 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php