M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions
+75
View File
@@ -0,0 +1,75 @@
/*
* Copyright (c) 2006 Brian Swetland
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __HW_MII_H
#define __HW_MII_H
#define MII_REG_BCR 0x00
#define MII_REG_BSR 0x01
#define MII_REG_PHY_ID1 0x02
#define MII_REG_PHY_ID2 0x03
#define MII_REG_AUTO_ADV 0x04
#define MII_REG_AUTO_LINK 0x05
#define MII_REG_AUTO_EXPN 0x06
#define MII_REG_AUTO_NEXT 0x07
#define MII_REG_LINK_NEXT 0x08
#define MII_REG_RXER_CNT 0x15
#define MII_REG_ICSR 0x1b
#define MII_REG_100TX_PHY 0x1f
#define MII_BCR_RESET 0x8000
#define MII_BCR_LOOPBACK 0x4000
#define MII_BCR_100MBPS 0x2000
#define MII_BCR_AUTO_ENABLE 0x1000
#define MII_BCR_PWR_DOWN 0x0800
#define MII_BCR_ISOLATE 0x0400
#define MII_BCR_AUTO_RESTART 0x0200
#define MII_BCR_FULL_DUPLEX 0x0100
#define MII_BCR_COL_TEST 0x0080
#define MII_BCR_TX_DISABLE 0x0001
#define MII_BSR_T4 0x8000
#define MII_BSR_100TX_FULL 0x4000
#define MII_BSR_100TX_HALF 0x2000
#define MII_BSR_10T_FULL 0x1000
#define MII_BSR_10T_HALF 0x0800
#define MII_BSR_NO_PREAMBLE 0x0040
#define MII_BSR_AUTO_COMPLETE 0x0020
#define MII_BSR_REMOTE_FAULT 0x0010
#define MII_BSR_AUTO_ABLE 0x0008
#define MII_BSR_LINK_UP 0x0004
#define MII_BSR_JABBER 0x0002
#define MII_BSR_EXTEND 0x0001
#define MII_100TX_PHY_ISOLATE 0x0040
#define MII_100TX_MODE_MASK 0x001C
#define MII_100TX_MODE_AUTO 0x0000
#define MII_100TX_MODE_10T_H 0x0004
#define MII_100TX_MODE_100TX_H 0x0008
#define MII_100TX_MODE_10T_F 0x0014
#define MII_100TX_MODE_100TX_F 0x0018
#define MII_100TX_MODE_ISOLATE 0x001C
#define MII_100TX_SQE_TEST 0x0002
#define MII_100TX_NO_SCRAMBLE 0x0001
#endif
+106
View File
@@ -0,0 +1,106 @@
/*
* Copyright (c) 2008 Travis Geiselbrecht
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
* publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __HW_USB_H
#define __HW_USB_H
#include <sys/types.h>
#include <compiler.h>
/* GLOBAL STATUS VALUES */
#define STD_COMMAND 0x00
#define SETUP_COMMAND_PHASE 0x40
#define FUNCTION_ERROR 0x7F /* Used when we are stalling the function EP0 */
#define HUB_ERROR 0xFF /* Used when we are stalling the HUB EP0 */
/* Request Types */
#define DIR_OUT (0 << 7)
#define DIR_IN (1 << 7)
#define DIR_MASK (1 << 7)
#define TYPE_STANDARD (0 << 5)
#define TYPE_CLASS (1 << 5)
#define TYPE_VENDOR (2 << 5)
#define TYPE_MASK (3 << 5)
#define RECIP_DEVICE (0 << 0)
#define RECIP_INTERFACE (1 << 0)
#define RECIP_ENDPOINT (2 << 0)
#define RECIP_OTHER (3 << 0)
#define RECIP_MASK (0x1f << 0)
/* 1.0 Request Values */
#define GET_STATUS 0x00
#define CLEAR_FEATURE 0x01
#define SET_FEATURE 0x03
#define SET_ADDRESS 0x05
#define GET_DESCRIPTOR 0x06
#define SET_DESCRIPTOR 0x07
#define GET_CONFIGURATION 0x08
#define SET_CONFIGURATION 0x09
#define GET_INTERFACE 0x0A
#define SET_INTERFACE 0x0B
#define SYNCH_FRAME 0x0C
/* Mass storage requests */
#define MASS_STORAGE_GET_MAX_LUN 0xfe
#define MASS_STORAGE_RESET 0xff
/* DFU requests */
#define DFU_DETACH 0x00
#define DFU_DNLOAD 0x01
#define DFU_UPLOAD 0x02
#define DFU_GETSTATUS 0x03
#define DFU_CLRSTATUS 0x04
#define DFU_GETSTATE 0x05
#define DFU_ABORT 0x06
/* HID Request Values */
#define GET_REPORT 0x01
#define GET_IDLE 0x02
#define GET_PROTOCOL 0x03
#define SET_REPORT 0x09
#define SET_IDLE 0x0A
#define SET_PROTOCOL 0x0B
/* Descriptor Types */
#define DEVICE 0x01
#define CONFIGURATION 0x02
#define STRING 0x03
#define INTERFACE 0x04
#define ENDPOINT 0x05
#define DEVICE_QUALIFIER 0x06
#define OTHER_SPEED_CONFIGURATION 0x07
#define INTERFACE_POWER 0x08
#define HID 0x21
#define HIDREPORT 0x22
#define HIDPHYSICAL 0x23
/* general USB defines */
struct usb_setup {
uint8_t request_type;
uint8_t request;
uint16_t value;
uint16_t index;
uint16_t length;
} __PACKED;
#endif