1 /* SPDX-License-Identifier: GPL-2.0+ */
4 #define GPCFG 4 /* open drain or not */
8 * gpio port and pin definitions
9 * NOTE: port number starts from 0
11 #define XL_INITN_PORT 1
12 #define XL_INITN_PIN 14
13 #define XL_RDWRN_PORT 1
14 #define XL_RDWRN_PIN 13
15 #define XL_CCLK_PORT 1
16 #define XL_CCLK_PIN 10
17 #define XL_PROGN_PORT 1
18 #define XL_PROGN_PIN 25
19 #define XL_CSIN_PORT 1
20 #define XL_CSIN_PIN 26
21 #define XL_DONE_PORT 1
22 #define XL_DONE_PIN 27
27 XL_config_D0 – gpio1_31
28 Xl_config_d1 – gpio1_30
29 Xl_config_d2 – gpio1_29
30 Xl_config_d3 – gpio1_28
31 Xl_config_d4 – gpio1_27
32 Xl_config_d5 – gpio1_26
33 Xl_config_d6 – gpio1_25
34 Xl_config_d7 – gpio1_24
35 Xl_config_d8 – gpio1_23
36 Xl_config_d9 – gpio1_22
37 Xl_config_d10 – gpio1_21
38 Xl_config_d11 – gpio1_20
39 Xl_config_d12 – gpio1_19
40 Xl_config_d13 – gpio1_18
41 Xl_config_d14 – gpio1_16
42 Xl_config_d15 – gpio1_14
47 * program bus width in bytes
54 #define MAX_WAIT_DONE 10000
61 int xl_supported_prog_bus_width(enum wbus bus_bytes);
63 void xl_program_b(int32_t i);
64 void xl_rdwr_b(int32_t i);
65 void xl_csi_b(int32_t i);
67 int xl_get_init_b(void);
68 int xl_get_done_b(void);
70 void xl_shift_cclk(int count);
71 void xl_shift_bytes_out(enum wbus bus_byte, unsigned char *pdata);