blob: ae68fb85834dd372e5055b377bab0bb657c5b9b9 [file] [log] [blame]
Angel Ponsaf4ecc22020-04-05 13:21:45 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Patrick Georgi04746fc2015-06-05 18:53:43 +02002
3#ifndef ONBOARD_H
4#define ONBOARD_H
5
6#ifndef __ACPI__
7void lan_init(void);
Matt DeVillier0148fcb2016-12-17 17:13:23 -06008
9void set_power_led(int state);
10
11enum {
12 LED_OFF = 0,
13 LED_ON,
14 LED_BLINK,
15};
Patrick Georgi04746fc2015-06-05 18:53:43 +020016#endif
17
18/* defines for programming the MAC address */
19#define JECHT_NIC_VENDOR_ID 0x10EC
20#define JECHT_NIC_DEVICE_ID 0x8168
21
22/* 0x00: White LINK LED and Amber ACTIVE LED */
23#define JECHT_NIC_LED_MODE 0x00
24
25/* NIC wake is GPIO 8 */
26#define JECHT_NIC_WAKE_GPIO 8
27
28/* WLAN wake is GPIO 10 */
29#define JECHT_WLAN_WAKE_GPIO 10
30
Matt DeVillier0148fcb2016-12-17 17:13:23 -060031/* USB Charger Control: GPIO26 */
32#define GPIO_USB_CTL_1 26
33
34/* IT8772F defs */
35#define IT8772F_BASE 0x2e
36#define IT8772F_SERIAL_DEV PNP_DEV(IT8772F_BASE, IT8772F_SP1)
37#define IT8772F_GPIO_DEV PNP_DEV(IT8772F_BASE, IT8772F_GPIO)
Joel Linnfb516612024-03-29 14:08:35 +010038#define IT8772F_EC_DEV PNP_DEV(IT8772F_BASE, IT8772F_EC)
Matt DeVillier0148fcb2016-12-17 17:13:23 -060039
Kyösti Mälkki8355e6e2021-11-06 20:51:58 +020040/* Write Protect: GPIO58 = GPIO_SPI_WP, active high */
41#define GPIO_SPI_WP 58
42
43/* Recovery: GPIO12 = RECOVERY_L, active low */
44#define GPIO_REC_MODE 12
45
Patrick Georgi04746fc2015-06-05 18:53:43 +020046#endif