2 * Copyright (c) 2016 Jared McNeill <jmcneill@invisible.ca>
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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
29 * Ingenic JZ4780 SMB Controller
32 #ifndef __JZ4780_SMB_H__
33 #define __JZ4780_SMB_H__
36 #define SMBCON_STPHLD (1 << 7)
37 #define SMBCON_SLVDIS (1 << 6)
38 #define SMBCON_REST (1 << 5)
39 #define SMBCON_MATP (1 << 4)
40 #define SMBCON_SATP (1 << 3)
41 #define SMBCON_SPD (3 << 1)
42 #define SMBCON_SPD_STANDARD (1 << 1)
43 #define SMBCON_SPD_FAST (2 << 1)
44 #define SMBCON_MD (1 << 0)
46 #define SMBTAR_MATP (1 << 12)
47 #define SMBTAR_SPECIAL (1 << 11)
48 #define SMBTAR_GC_OR_START (1 << 10)
49 #define SMBTAR_SMBTAR (0x3ff << 0)
52 #define SMBDC_CMD (1 << 8)
53 #define SMBDC_DAT (0xff << 0)
66 #define SMBCRXREQ 0x50
67 #define SMBCTXABT 0x54
74 #define SMBENB_SMBENB (1 << 0)
76 #define SMBST_SLVACT (1 << 6)
77 #define SMBST_MSTACT (1 << 5)
78 #define SMBST_RFF (1 << 4)
79 #define SMBST_RFNE (1 << 3)
80 #define SMBST_TFE (1 << 2)
81 #define SMBST_TFNF (1 << 1)
82 #define SMBST_ACT (1 << 0)
83 #define SMBABTSRC 0x80
85 #define SMBDMATDLR 0x8c
86 #define SMBDMARDLR 0x90
90 #define SMBENBST_SLVRDLST (1 << 2)
91 #define SMBENBST_SLVDISB (1 << 1)
92 #define SMBENBST_SMBEN (1 << 0)
94 #define SMBSDAHD_HDENB (1 << 8)
95 #define SMBSDAHD_SDAHD (0xff << 0)
97 #endif /* !__JZ4780_SMB_H__ */