• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1root {
2    platform {
3        spi_config {
4            template spi_controller {
5                match_attr = "rockchip_rk2206_spi_0";
6                bus = 0;
7                id = 38;
8                func_mode = 1;
9                cs_gpio = 16;
10                cs_func = 4;
11                cs_type = 1;
12                cs_drv = 8;
13                cs_dir = 2;
14                cs_val = 2;
15                clk_gpio = 17;
16                clk_func = 4;
17                clk_type = 1;
18                clk_drv = 8;
19                clk_dir = 2;
20                clk_val = 2;
21                mosi_gpio = 18;
22                mosi_func = 4;
23                mosi_type = 1;
24                mosi_drv = 8;
25                mosi_dir = 2;
26                mosi_val = 2;
27                miso_gpio = 160; /* 160表示该引脚不用为spi_miso,如果要用则应为19 */
28                miso_func = 4;
29                miso_type = 1;
30                miso_drv = 7;
31                miso_dir = 2;
32                miso_val = 2;
33                bitsPerWord = 0;
34                firstBit = 4;
35                mode = 3;
36                csm = 2;
37                speed = 50000000;
38                isSlave = 0;
39            }
40
41            spi_controller_0x12070000 :: spi_controller {
42                /* lcd的spi接口 */
43                match_attr = "rockchip_rk2206_spi_0";
44                bus = 0;
45                id = 38;
46                func_mode = 1;
47                cs_gpio = 16;
48                cs_func = 4;
49                cs_type = 1;
50                cs_drv = 8;
51                cs_dir = 2;
52                cs_val = 2;
53                clk_gpio = 17;
54                clk_func = 4;
55                clk_type = 1;
56                clk_drv = 8;
57                clk_dir = 2;
58                clk_val = 2;
59                mosi_gpio = 18;
60                mosi_func = 4;
61                mosi_type = 1;
62                mosi_drv = 8;
63                mosi_dir = 2;
64                mosi_val = 2;
65                miso_gpio = 160;
66                miso_func = 4;
67                miso_type = 1;
68                miso_drv = 7;
69                miso_dir = 2;
70                miso_val = 2;
71                bitsPerWord = 0;
72                firstBit = 4;
73                mode = 3;
74                csm = 2;
75                speed = 50000000;
76                isSlave = 0;
77            }
78        }
79    }
80}
81