1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2019 Michal Meloun <mmel@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * 27 * $FreeBSD$ 28 */ 29 30 31 #ifndef _ACT8846_REG_H_ 32 #define _ACT8846_REG_H_ 33 34 35 /* ACT8846 registers. */ 36 #define ACT8846_SYS0 0x00 37 #define ACT8846_SYS1 0x01 38 #define ACT8846_REG1_CTRL 0x12 39 #define ACT8846_REG2_VSET0 0x20 40 #define ACT8846_REG2_VSET1 0x21 41 #define ACT8846_REG2_CTRL 0x22 42 #define ACT8846_REG3_VSET0 0x30 43 #define ACT8846_REG3_VSET1 0x31 44 #define ACT8846_REG3_CTRL 0x32 45 #define ACT8846_REG4_VSET0 0x40 46 #define ACT8846_REG4_VSET1 0x41 47 #define ACT8846_REG4_CTRL 0x42 48 #define ACT8846_REG5_VSET 0x50 49 #define ACT8846_REG5_CTRL 0x51 50 #define ACT8846_REG6_VSET 0x58 51 #define ACT8846_REG6_CTRL 0x59 52 #define ACT8846_REG7_VSET 0x60 53 #define ACT8846_REG7_CTRL 0x61 54 #define ACT8846_REG8_VSET 0x68 55 #define ACT8846_REG8_CTRL 0x69 56 #define ACT8846_REG9_VSET 0x70 57 #define ACT8846_REG9_CTRL 0x71 58 #define ACT8846_REG10_VSET 0x80 59 #define ACT8846_REG10_CTRL 0x81 60 #define ACT8846_REG11_VSET 0x90 61 #define ACT8846_REG11_CTRL 0x91 62 #define ACT8846_REG12_VSET 0xa0 63 #define ACT8846_REG12_CTRL 0xa1 64 #define ACT8846_REG13_CTRL 0xb1 65 #define ACT8846_PB0 0xc0 66 #define ACT8846_PB1 0xc1 67 #define ACT8846_PB2 0xc2 68 #define ACT8846_PB3 0xc3 69 #define ACT8846_PB4 0xc4 70 #define ACT8846_GPIO6 0xe3 71 #define ACT8846_GPIO5 0xe4 72 #define ACT8846_GPIO3 0xf4 73 #define ACT8846_GPIO4 0xf5 74 75 /* Common REGxx_CTRL bits */ 76 #define ACT8846_CTRL_ENA 0x80 77 #define ACT8846_CTRL_OK 0x01 78 79 /* Common REGxx_VSEL bits */ 80 #define ACT8846_VSEL_MASK 0x3f 81 82 83 #endif /* _ACT8846_REG_H_ */ 84