blob: 37d5027a50df3848dc4c2395040a50ece6cbf728 [file] [log] [blame]
Evgeny Zinovievd54f8252018-08-01 15:53:18 +03001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2018 Evgeny Zinoviev <me@ch1p.com>
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; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef PMH7TOOL_H
17#define PMH7TOOL_H
18
19#define EC_LENOVO_PMH7_BASE 0x15e0
20#define EC_LENOVO_PMH7_ADDR_L (EC_LENOVO_PMH7_BASE + 0x0c)
21#define EC_LENOVO_PMH7_ADDR_H (EC_LENOVO_PMH7_BASE + 0x0d)
22#define EC_LENOVO_PMH7_DATA (EC_LENOVO_PMH7_BASE + 0x0e)
23
24uint8_t pmh7_register_read(uint16_t reg);
25void pmh7_register_write(uint16_t reg, uint8_t val);
26void pmh7_register_set_bit(uint16_t reg, uint8_t bit);
27void pmh7_register_clear_bit(uint16_t reg, uint8_t bit);
28
29#endif /* PMH7TOOL_H */