xref: /netbsd-src/sys/arch/arm/nxp/imx6_usbphyreg.h (revision 8644267a503e0f573f2833152303dbf2ce4aca52)
1 /*	$NetBSD: imx6_usbphyreg.h,v 1.1 2020/12/23 14:42:38 skrll Exp $	*/
2 
3 /*
4  * Copyright (c) 2017  Genetec Corporation.  All rights reserved.
5  * Written by Hashimoto Kenichi for Genetec Corporation.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL GENETEC CORPORATION
20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  * POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef _ARM_NXP_IMX6_USBPHYREG_H
30 #define _ARM_NXP_IMX6_USBPHYREG_H
31 
32 #include <sys/cdefs.h>
33 
34 #define USBPHY_PWD			0x00000000
35 #define USBPHY_PWD_SET			0x00000004
36 #define USBPHY_PWD_CLR			0x00000008
37 #define USBPHY_PWD_TOG			0x0000000c
38 #define USBPHY_TX			0x00000010
39 #define USBPHY_TX_SET			0x00000014
40 #define USBPHY_TX_CLR			0x00000018
41 #define USBPHY_TX_TOG			0x0000001c
42 #define  USBPHY_TX_USBPHY_TX_EDGECTRL	__BITS(28, 26)
43 #define  USBPHY_TX_TXCAL45DP		__BITS(19, 16)
44 #define  USBPHY_TX_TXCAL45DN		__BITS(11, 8)
45 #define  USBPHY_TX_D_CAL		__BITS(3, 0)
46 #define USBPHY_RX			0x00000020
47 #define USBPHY_RX_SET			0x00000024
48 #define USBPHY_RX_CLR			0x00000028
49 #define USBPHY_RX_TOG			0x0000002c
50 #define USBPHY_CTRL			0x00000030
51 #define USBPHY_CTRL_SET			0x00000034
52 #define USBPHY_CTRL_CLR			0x00000038
53 #define USBPHY_CTRL_TOG			0x0000003c
54 #define  USBPHY_CTRL_SFTRST		__BIT(31)
55 #define  USBPHY_CTRL_CLKGATE		__BIT(30)
56 #define  USBPHY_CTRL_ENUTMILEVEL3	__BIT(15)
57 #define  USBPHY_CTRL_ENUTMILEVEL2	__BIT(14)
58 #define USBPHY_STATUS			0x00000040
59 #define USBPHY_DEBUG			0x00000050
60 #define USBPHY_DEBUG0_STATUS		0x00000060
61 #define USBPHY_DEBUG1			0x00000070
62 #define USBPHY_VERSION			0x00000080
63 
64 #endif /* _ARM_NXP_IMX6_USBPHYREG_H */
65