Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / u-boot / board / egnite / ethernut5 / ethernut5_pwrman.h
1 /*
2  * (C) Copyright 2011
3  * egnite GmbH <info@egnite.de>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7
8 /*
9  * Ethernut 5 power management support
10  *
11  * For additional information visit the project home page at
12  * http://www.ethernut.de/
13  */
14
15 /* I2C address of the PMC */
16 #define PWRMAN_I2C_ADDR 0x22
17
18 /* PMC registers */
19 #define PWRMAN_REG_VERS         0       /* Version register */
20 #define PWRMAN_REG_STA          1       /* Feature status register */
21 #define PWRMAN_REG_ENA          2       /* Feature enable register */
22 #define PWRMAN_REG_DIS          3       /* Feature disable register */
23 #define PWRMAN_REG_TEMP         4       /* Board temperature */
24 #define PWRMAN_REG_VAUX         6       /* Auxiliary input voltage */
25 #define PWRMAN_REG_LEDCTL       8       /* LED blinking timer. */
26
27 /* Feature flags used in status, enable and disable registers */
28 #define PWRMAN_BOARD    0x01    /* 1.8V and 3.3V supply */
29 #define PWRMAN_VBIN     0x02    /* VBUS input at device connector */
30 #define PWRMAN_VBOUT    0x04    /* VBUS output at host connector */
31 #define PWRMAN_MMC      0x08    /* Memory card supply */
32 #define PWRMAN_RS232    0x10    /* RS-232 driver shutdown */
33 #define PWRMAN_ETHCLK   0x20    /* Ethernet clock enable */
34 #define PWRMAN_ETHRST   0x40    /* Ethernet PHY reset */
35 #define PWRMAN_WAKEUP   0x80    /* RTC wake-up */
36
37 /* Features, which are not essential to keep u-boot alive */
38 #define PWRMAN_DISPENSIBLE      (PWRMAN_VBOUT | PWRMAN_MMC | PWRMAN_ETHCLK)
39
40 /* Enable Ethernut 5 power management. */
41 extern void ethernut5_power_init(void);
42
43 /* Reset Ethernet PHY. */
44 extern void ethernut5_phy_reset(void);
45
46 extern void ethernut5_print_version(void);
47
48 #ifdef CONFIG_CMD_BSP
49 extern void ethernut5_print_power(void);
50 extern void ethernut5_print_celsius(void);
51 extern void ethernut5_print_voltage(void);
52 #endif