On 20-11-06 12:42:51, Pawel Laszczak wrote:
> - * Value of the strap pins.
> + * Value of the strap pins for:
> + * CDN3:

%/CDN3/CDNS3

Peter
>   * 000 - no default configuration
>   * 010 - Controller initiall configured as Host
>   * 100 - Controller initially configured as Device
> + * CDNSP:
> + * 000 - No default configuration.
> + * 010 - Controller initiall configured as Host.
> + * 100 - Controller initially configured as Device.
>   */
>  #define OTGSTS_STRAP(p)                      (((p) & GENMASK(14, 12)) >> 12)
>  #define OTGSTS_STRAP_NO_DEFAULT_CFG  0x00
>  #define OTGSTS_STRAP_HOST_OTG                0x01
>  #define OTGSTS_STRAP_HOST            0x02
>  #define OTGSTS_STRAP_GADGET          0x04
> +#define OTGSTS_CDNSP_STRAP_HOST              0x01
> +#define OTGSTS_CDNSP_STRAP_GADGET    0x02
> +
>  /* Host mode is turned on. */
> -#define OTGSTS_XHCI_READY            BIT(26)
> +#define OTGSTS_CDNS3_XHCI_READY              BIT(26)
> +#define OTGSTS_CDNSP_XHCI_READY              BIT(27)
> +
>  /* "Device mode is turned on .*/
> -#define OTGSTS_DEV_READY             BIT(27)
> +#define OTGSTS_CDNS3_DEV_READY               BIT(27)
> +#define OTGSTS_CDNSP_DEV_READY               BIT(26)
>  
>  /* OTGSTATE- bitmasks */
>  #define OTGSTATE_DEV_STATE_MASK              GENMASK(2, 0)
> @@ -152,6 +194,8 @@ struct cdns3_otg_common_regs {
>  #define OVERRIDE_IDPULLUP            BIT(0)
>  /* Only for CDNS3_CONTROLLER_V0 version */
>  #define OVERRIDE_IDPULLUP_V0         BIT(24)
> +/* Vbusvalid/Sesvalid override select. */
> +#define OVERRIDE_SESS_VLD_SEL                BIT(10)
>  
>  /* PHYRST_CFG - bitmasks */
>  #define PHYRST_CFG_PHYRST_A_ENABLE     BIT(0)
> @@ -170,6 +214,5 @@ int cdns3_drd_gadget_on(struct cdns3 *cdns);
>  void cdns3_drd_gadget_off(struct cdns3 *cdns);
>  int cdns3_drd_host_on(struct cdns3 *cdns);
>  void cdns3_drd_host_off(struct cdns3 *cdns);
> -int cdns3_set_mode(struct cdns3 *cdns, enum usb_dr_mode mode);
>  
>  #endif /* __LINUX_CDNS3_DRD */
> -- 
> 2.17.1
> 

-- 

Thanks,
Peter Chen

Reply via email to