1 /*- 2 * Copyright (c) 2016 Jared McNeill <jmcneill@invisible.ca> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 18 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 20 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 */ 25 26 /* 27 * Ingenic JZ4780 SMB Controller 28 */ 29 30 #ifndef __JZ4780_SMB_H__ 31 #define __JZ4780_SMB_H__ 32 33 #define SMBCON 0x00 34 #define SMBCON_STPHLD (1 << 7) 35 #define SMBCON_SLVDIS (1 << 6) 36 #define SMBCON_REST (1 << 5) 37 #define SMBCON_MATP (1 << 4) 38 #define SMBCON_SATP (1 << 3) 39 #define SMBCON_SPD (3 << 1) 40 #define SMBCON_SPD_STANDARD (1 << 1) 41 #define SMBCON_SPD_FAST (2 << 1) 42 #define SMBCON_MD (1 << 0) 43 #define SMBTAR 0x04 44 #define SMBTAR_MATP (1 << 12) 45 #define SMBTAR_SPECIAL (1 << 11) 46 #define SMBTAR_GC_OR_START (1 << 10) 47 #define SMBTAR_SMBTAR (0x3ff << 0) 48 #define SMBSAR 0x08 49 #define SMBDC 0x10 50 #define SMBDC_CMD (1 << 8) 51 #define SMBDC_DAT (0xff << 0) 52 #define SMBSHCNT 0x14 53 #define SMBSLCNT 0x18 54 #define SMBFHCNT 0x1c 55 #define SMBFLCNT 0x20 56 #define SMBINTST 0x2c 57 #define SMBINTM 0x30 58 #define SMBRXTL 0x38 59 #define SMBTXTL 0x3c 60 #define SMBCINT 0x40 61 #define SMBCRXUF 0x44 62 #define SMBCRXOF 0x48 63 #define SMBCTXOF 0x4c 64 #define SMBCRXREQ 0x50 65 #define SMBCTXABT 0x54 66 #define SMBCRXDN 0x58 67 #define SMBCACT 0x5c 68 #define SMBCSTP 0x60 69 #define SMBCSTT 0x64 70 #define SMBCGC 0x68 71 #define SMBENB 0x6c 72 #define SMBENB_SMBENB (1 << 0) 73 #define SMBST 0x70 74 #define SMBST_SLVACT (1 << 6) 75 #define SMBST_MSTACT (1 << 5) 76 #define SMBST_RFF (1 << 4) 77 #define SMBST_RFNE (1 << 3) 78 #define SMBST_TFE (1 << 2) 79 #define SMBST_TFNF (1 << 1) 80 #define SMBST_ACT (1 << 0) 81 #define SMBABTSRC 0x80 82 #define SMBDMACR 0x88 83 #define SMBDMATDLR 0x8c 84 #define SMBDMARDLR 0x90 85 #define SMBSDASU 0x94 86 #define SMBACKGC 0x98 87 #define SMBENBST 0x9c 88 #define SMBENBST_SLVRDLST (1 << 2) 89 #define SMBENBST_SLVDISB (1 << 1) 90 #define SMBENBST_SMBEN (1 << 0) 91 #define SMBSDAHD 0xd0 92 #define SMBSDAHD_HDENB (1 << 8) 93 #define SMBSDAHD_SDAHD (0xff << 0) 94 95 #endif /* !__JZ4780_SMB_H__ */ 96