lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ed62aae-126c-dbc4-49d5-f2ecfbcacd5f@roeck-us.net>
Date:   Thu, 21 Jul 2022 07:32:21 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Gene Chen <gene.chen.richtek@...il.com>,
        heikki.krogerus@...ux.intel.com, gregkh@...uxfoundation.org,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, gene_chen@...htek.com,
        cy_huang@...htek.com
Subject: Re: [PATCH v2 4/6] usb: typec: tcpci_rt1711h: Add initial phy setting

On 7/20/22 23:11, Gene Chen wrote:
> From: Gene Chen <gene_chen@...htek.com>
> 
> Add initial phy setting about phy dicard retry,
> rx filter deglitech time and BMC-encoded wait time
> 
> Signed-off-by: Gene Chen <gene_chen@...htek.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>   drivers/usb/typec/tcpm/tcpci_rt1711h.c | 15 ++++++++++++++-
>   1 file changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpci_rt1711h.c b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> index 52c9594e531d..e65b568959e9 100644
> --- a/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> +++ b/drivers/usb/typec/tcpm/tcpci_rt1711h.c
> @@ -18,6 +18,9 @@
>   #define RT1711H_VID		0x29CF
>   #define RT1711H_PID		0x1711
>   
> +#define RT1711H_PHYCTRL1	0x80
> +#define RT1711H_PHYCTRL2	0x81
> +
>   #define RT1711H_RTCTRL8		0x9B
>   
>   /* Autoidle timeout = (tout * 2 + 1) * 6.4ms */
> @@ -105,8 +108,18 @@ static int rt1711h_init(struct tcpci *tcpci, struct tcpci_data *tdata)
>   		return ret;
>   
>   	/* dcSRC.DRP : 33% */
> -	return rt1711h_write16(chip, RT1711H_RTCTRL16, 330);
> +	ret = rt1711h_write16(chip, RT1711H_RTCTRL16, 330);
> +	if (ret < 0)
> +		return ret;
> +
> +	/* Enable phy discard retry, retry count 7, rx filter deglitech 100 us */
> +	ret = rt1711h_write8(chip, RT1711H_PHYCTRL1, 0xF1);
> +	if (ret < 0)
> +		return ret;
>   
> +	/* Decrease wait time of BMC-encoded 1 bit from 2.67us to 2.55us */
> +	/* wait time : (val * .4167) us */
> +	return rt1711h_write8(chip, RT1711H_PHYCTRL2, 62);
>   }
>   
>   static int rt1711h_set_vbus(struct tcpci *tcpci, struct tcpci_data *tdata,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ