Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) ========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) S3C24XX USB Host support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) ========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) Introduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) ------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)   This document details the S3C2410/S3C2440 in-built OHCI USB host support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) Configuration
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)   Enable at least the following kernel options:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)   menuconfig::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)    Device Drivers  --->
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)      USB support  --->
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)        <*> Support for Host-side USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)        <*>   OHCI HCD support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)   .config:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)     - CONFIG_USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)     - CONFIG_USB_OHCI_HCD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)   Once these options are configured, the standard set of USB device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32)   drivers can be configured and used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) Board Support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)   The driver attaches to a platform device, which will need to be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)   added by the board specific support file in linux/arch/arm/mach-s3c2410,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)   such as mach-bast.c or mach-smdk2410.c
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)   The platform device's platform_data field is only needed if the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)   board implements extra power control or over-current monitoring.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)   The OHCI driver does not ensure the state of the S3C2410's MISCCTRL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)   register, so if both ports are to be used for the host, then it is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)   the board support file's responsibility to ensure that the second
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)   port is configured to be connected to the OHCI core.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) Platform Data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) -------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54)   See arch/arm/mach-s3c2410/include/mach/usb-control.h for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)   descriptions of the platform device data. An implementation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)   can be found in linux/arch/arm/mach-s3c2410/usb-simtec.c .
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)   The `struct s3c2410_hcd_info` contains a pair of functions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59)   that get called to enable over-current detection, and to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)   control the port power status.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)   The ports are numbered 0 and 1.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)   power_control:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)     Called to enable or disable the power on the port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)   enable_oc:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68)     Called to enable or disable the over-current monitoring.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69)     This should claim or release the resources being used to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)     check the power condition on the port, such as an IRQ.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72)   report_oc:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)     The OHCI driver fills this field in for the over-current code
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)     to call when there is a change to the over-current state on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)     an port. The ports argument is a bitmask of 1 bit per port,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76)     with bit X being 1 for an over-current on port X.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)     The function s3c2410_usb_report_oc() has been provided to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79)     ensure this is called correctly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81)   port[x]:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82)     This is struct describes each port, 0 or 1. The platform driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83)     should set the flags field of each port to S3C_HCDFLG_USED if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84)     the port is enabled.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) Document Author
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) ---------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) Ben Dooks, Copyright 2005 Simtec Electronics