]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/chipidea/bits.h
usb: chipidea: add chipidea revision information
[karo-tx-linux.git] / drivers / usb / chipidea / bits.h
index 83d06c1455b7bd93875b3562dcbbe30f7b4f7f9c..e69424d6e42325f806849cb60d3763f53e220de5 100644 (file)
 
 #include <linux/usb/ehci_def.h>
 
+/*
+ * ID
+ * For 1.x revision, bit24 - bit31 are reserved
+ * For 2.x revision, bit25 - bit28 are 0x2
+ */
+#define TAG                  (0x1F << 16)
+#define REVISION             (0xF << 21)
+#define VERSION                      (0xF << 25)
+#define CIVERSION            (0x7 << 29)
+
 /* HCCPARAMS */
 #define HCCPARAMS_LEN         BIT(17)
 
 #define DEVICEADDR_USBADR     (0x7FUL << 25)
 
 /* PORTSC */
+#define PORTSC_CCS            BIT(0)
+#define PORTSC_CSC            BIT(1)
+#define PORTSC_PEC            BIT(3)
+#define PORTSC_OCC            BIT(5)
 #define PORTSC_FPR            BIT(6)
 #define PORTSC_SUSP           BIT(7)
 #define PORTSC_HSP            BIT(9)
+#define PORTSC_PP             BIT(12)
 #define PORTSC_PTC            (0x0FUL << 16)
 #define PORTSC_PHCD(d)       ((d) ? BIT(22) : BIT(23))
 /* PTS and PTW for non lpm version only */
@@ -56,6 +71,9 @@
 #define PORTSC_PTW            BIT(28)
 #define PORTSC_STS            BIT(29)
 
+#define PORTSC_W1C_BITS                                                \
+       (PORTSC_CSC | PORTSC_PEC | PORTSC_OCC)
+
 /* DEVLC */
 #define DEVLC_PFSC            BIT(23)
 #define DEVLC_PSPD            (0x03UL << 25)
@@ -72,6 +90,8 @@
 
 /* OTGSC */
 #define OTGSC_IDPU           BIT(5)
+#define OTGSC_HADP           BIT(6)
+#define OTGSC_HABA           BIT(7)
 #define OTGSC_ID             BIT(8)
 #define OTGSC_AVV            BIT(9)
 #define OTGSC_ASV            BIT(10)