1
2
3
4
5
6
7
8#ifndef __ASSEMBLY__
9
10
11#define GSC_SC_ADDR 0x20
12#define GSC_RTC_ADDR 0x68
13#define GSC_HWMON_ADDR 0x29
14#define GSC_EEPROM_ADDR 0x51
15
16
17enum {
18 GSC_SC_CTRL0 = 0x00,
19 GSC_SC_CTRL1 = 0x01,
20 GSC_SC_STATUS = 0x0a,
21 GSC_SC_FWCRC = 0x0c,
22 GSC_SC_FWVER = 0x0e,
23};
24
25
26enum {
27 GSC_SC_CTRL1_WDTIME = 4,
28 GSC_SC_CTRL1_WDEN = 5,
29 GSC_SC_CTRL1_WDDIS = 7,
30};
31
32
33enum {
34 GSC_SC_IRQ_PB = 0,
35 GSC_SC_IRQ_SECURE = 1,
36 GSC_SC_IRQ_EEPROM_WP = 2,
37 GSC_SC_IRQ_GPIO = 4,
38 GSC_SC_IRQ_TAMPER = 5,
39 GSC_SC_IRQ_WATCHDOG = 6,
40 GSC_SC_IRQ_PBLONG = 7,
41};
42
43
44enum {
45 GSC_HWMON_TEMP = 0x00,
46 GSC_HWMON_VIN = 0x02,
47 GSC_HWMON_VDD_3P3 = 0x05,
48 GSC_HWMON_VBATT = 0x08,
49 GSC_HWMON_VDD_5P0 = 0x0b,
50 GSC_HWMON_VDD_CORE = 0x0e,
51 GSC_HWMON_VDD_SOC = 0x11,
52 GSC_HWMON_VDD_HIGH = 0x14,
53 GSC_HWMON_VDD_DDR = 0x17,
54 GSC_HWMON_VDD_EXT = 0x1a,
55 GSC_HWMON_VDD_1P8 = 0x1d,
56 GSC_HWMON_VDD_IO2 = 0x20,
57 GSC_HWMON_VDD_2P5 = 0x23,
58 GSC_HWMON_VDD_IO3 = 0x26,
59 GSC_HWMON_VDD_IO4 = 0x29,
60};
61
62
63
64
65
66int gsc_i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len);
67int gsc_i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len);
68int gsc_info(int verbose);
69int gsc_boot_wd_disable(void);
70const char *gsc_get_dtb_name(int level, char *buf, int sz);
71#endif
72