blob: 2589400c1a2fc1b2db6f3020a68903280a4dd0c6 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Marek Vasut54088bf2009-03-24 00:29:29 +01002/*
3 * GPIOs and interrupts for Palm Tungsten|E2 Handheld Computer
4 *
5 * Author:
6 * Carlos Eduardo Medaglia Dyonisio <cadu@nerdfeliz.com>
Marek Vasut54088bf2009-03-24 00:29:29 +01007 */
8
9#ifndef _INCLUDE_PALMTE2_H_
10#define _INCLUDE_PALMTE2_H_
11
12/** HERE ARE GPIOs **/
13
14/* GPIOs */
Marek Vasut8c8aa5f2009-03-24 21:23:39 +010015#define GPIO_NR_PALMTE2_POWER_DETECT 9
16#define GPIO_NR_PALMTE2_HOTSYNC_BUTTON_N 4
17#define GPIO_NR_PALMTE2_EARPHONE_DETECT 15
18
19/* SD/MMC */
Marek Vasut54088bf2009-03-24 00:29:29 +010020#define GPIO_NR_PALMTE2_SD_DETECT_N 10
21#define GPIO_NR_PALMTE2_SD_POWER 55
22#define GPIO_NR_PALMTE2_SD_READONLY 51
23
Marek Vasut8c8aa5f2009-03-24 21:23:39 +010024/* IRDA - disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */
25#define GPIO_NR_PALMTE2_IR_DISABLE 48
26
27/* USB */
28#define GPIO_NR_PALMTE2_USB_DETECT_N 35
29#define GPIO_NR_PALMTE2_USB_PULLUP 53
30
31/* LCD/BACKLIGHT */
32#define GPIO_NR_PALMTE2_BL_POWER 56
33#define GPIO_NR_PALMTE2_LCD_POWER 37
34
Marek Vasut54088bf2009-03-24 00:29:29 +010035/* KEYS */
36#define GPIO_NR_PALMTE2_KEY_NOTES 5
37#define GPIO_NR_PALMTE2_KEY_TASKS 7
38#define GPIO_NR_PALMTE2_KEY_CALENDAR 11
39#define GPIO_NR_PALMTE2_KEY_CONTACTS 13
40#define GPIO_NR_PALMTE2_KEY_CENTER 14
41#define GPIO_NR_PALMTE2_KEY_LEFT 19
42#define GPIO_NR_PALMTE2_KEY_RIGHT 20
43#define GPIO_NR_PALMTE2_KEY_DOWN 21
44#define GPIO_NR_PALMTE2_KEY_UP 22
45
46/** HERE ARE INIT VALUES **/
47
48/* BACKLIGHT */
49#define PALMTE2_MAX_INTENSITY 0xFE
50#define PALMTE2_DEFAULT_INTENSITY 0x7E
51#define PALMTE2_LIMIT_MASK 0x7F
52#define PALMTE2_PRESCALER 0x3F
53#define PALMTE2_PERIOD_NS 3500
54
Marek Vasut8c8aa5f2009-03-24 21:23:39 +010055/* BATTERY */
56#define PALMTE2_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */
57#define PALMTE2_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */
André Goddard Rosaaf901ca2009-11-14 13:09:05 -020058#define PALMTE2_BAT_MAX_CURRENT 0 /* unknown */
Marek Vasut8c8aa5f2009-03-24 21:23:39 +010059#define PALMTE2_BAT_MIN_CURRENT 0 /* unknown */
60#define PALMTE2_BAT_MAX_CHARGE 1 /* unknown */
61#define PALMTE2_BAT_MIN_CHARGE 1 /* unknown */
62#define PALMTE2_MAX_LIFE_MINS 360 /* on-life in minutes */
63
Marek Vasut54088bf2009-03-24 00:29:29 +010064#endif