blob: e03e49b2e7704ebba22ebef8cf2acea9786f7ea0 [file] [log] [blame]
Paul Kocialkowski80ae14e2018-01-15 01:07:46 +03001/*
2 * This file is part of the flashrom project.
3 *
4 * Copyright (C) 2015 Paul Kocialkowski <contact@paulk.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
17#ifndef __ENE_H__
18#define __ENE_H__ 1
19
20#define ENE_XBI_EFA0 0xfea8
21#define ENE_XBI_EFA1 0xfea9
22#define ENE_XBI_EFA2 0xfeaa
23#define ENE_XBI_EFDAT 0xfeab
24#define ENE_XBI_EFCMD 0xfeac
25#define ENE_XBI_EFCFG 0xfead
26
27#define ENE_XBI_EFCFG_CMD_WE (1 << 3)
28#define ENE_XBI_EFCFG_BUSY (1 << 1)
29
30#define ENE_XBI_EFCMD_HVPL_LATCH 0x02
31#define ENE_XBI_EFCMD_READ 0x03
32#define ENE_XBI_EFCMD_ERASE 0x20
33#define ENE_XBI_EFCMD_PROGRAM 0x70
34#define ENE_XBI_EFCMD_HVPL_CLEAR 0x80
35
36#define ENE_EC_PXCFG 0xff14
37
38#define ENE_EC_PXCFG_8051_RESET 0x01
39
40#define ENE_EC_HWVERSION 0xff00
41#define ENE_EC_EDIID 0xff24
42
43#define ENE_KB9012_HWVERSION 0xc3
44#define ENE_KB9012_EDIID 0x04
45
46struct ene_chip {
47 unsigned char hwversion;
48 unsigned char ediid;
49};
50
51#endif