• Johan Hovold's avatar
    USB: serial: xr: add support for XR21B1421, XR21B1422 and XR21B1424 · 607f6718
    Johan Hovold authored
    The XR21B1421, XR21B1422 and XR21B1424 are the one-, two- and four-port
    models of a second XR21B142X type of the Maxlinear/Exar USB UARTs.
    
    The XR21B142X type differs from XR21V141X in several ways, including:
    
    	- register layout
    	- register width (16-bit instead of 8-bit)
    	- vendor register requests
    	- UART enable/disable sequence
    	- custom-driver mode flag
    	- three additional GPIOs (9 instead of 6)
    
    As for XR21V141X, the XR21B142X vendor requests encode the channel index
    in the MSB of wIndex, but it lacks the UART Manager registers which
    have been replaced by regular UART registers. The new type also uses the
    interface number of the control interface (0, 2, 4, 6) as channel index
    instead of the channel number (0, 1, 2, 3).
    
    The XR21B142X lacks the divisor and format registers used by XR21V141X
    and instead uses the CDC SET_LINE_CONTROL request to configure the line
    settings.
    
    Note that the currently supported XR21V141X type lacks the custom-driver
    mode flag that prevents the device from entering CDC-ACM mode when a CDC
    requests is received. This specifically means that the SET_LINE_CONTROL
    request cannot be used with XR21V141X even though it is otherwise
    supported.
    
    The UART enable sequence for XR21B142X does not involve explicitly
    enabling the FIFOs, but according to datasheet the UART must be disabled
    when writing any register but GPIO_SET, GPIO_CLEAR, TX_BREAK and
    ERROR_STATUS.
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    607f6718
xr_serial.c 21.4 KB