Re: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-15 Thread Marek Vasut
On 6/15/20 8:52 AM, Hayes Wang wrote: > Marek Vasut [mailto:ma...@denx.de] >> Sent: Friday, June 12, 2020 7:53 PM > [...] >> Try this: >> >> ocp_data = r8152_efuse_read(tp, 0x7d); >> ocp_data = (ocp_data & 0x1fff0) >> 1) | (ocp_data & 0x7); >> if (data != 0x) >>

RE: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-15 Thread Hayes Wang
Marek Vasut [mailto:ma...@denx.de] > Sent: Friday, June 12, 2020 7:53 PM [...] > Try this: > > ocp_data = r8152_efuse_read(tp, 0x7d); > ocp_data = (ocp_data & 0x1fff0) >> 1) | (ocp_data & 0x7); > if (data != 0x) > ocp_reg_write(tp, OCP_ADC_IOFFSET, data); I

Re: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-12 Thread Marek Vasut
On 6/12/20 5:50 AM, Hayes Wang wrote: > Marek Vasut [mailto:ma...@denx.de] >> Sent: Friday, June 12, 2020 8:05 AM > [...] >>> The real data (16-bit) would be inserted a dummy bit, >>> and store the 17-bit to efuse offset 0x7d. Therefore, when >>> reading the 17-bit data from efuse, we have to

RE: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-11 Thread Hayes Wang
Marek Vasut [mailto:ma...@denx.de] > Sent: Friday, June 12, 2020 8:05 AM [...] > > The real data (16-bit) would be inserted a dummy bit, > > and store the 17-bit to efuse offset 0x7d. Therefore, when > > reading the 17-bit data from efuse, we have to remove the > > dummy to get the real data. > >

Re: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-11 Thread Marek Vasut
On 6/11/20 5:18 AM, Hayes Wang wrote: > Marek Vasut [mailto:ma...@denx.de] >> Sent: Wednesday, June 10, 2020 9:21 PM > [...] >>> + /* ADC Bias Calibration: >>> +* read efuse offset 0x7d to get a 17-bit data. Remove the dummy/fake >>> +* bit (bit3) to rebuild

RE: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-10 Thread Hayes Wang
Marek Vasut [mailto:ma...@denx.de] > Sent: Wednesday, June 10, 2020 9:21 PM [...] > > + /* ADC Bias Calibration: > > +* read efuse offset 0x7d to get a 17-bit data. Remove the > >> dummy/fake > > +* bit (bit3) to rebuild the real 16-bit data. Write the data >

Re: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-10 Thread Marek Vasut
On 6/10/20 3:12 PM, Hayes Wang wrote: > Marek Vasut [mailto:ma...@denx.de] >> Sent: Wednesday, June 10, 2020 8:54 PM > [...] > + /* ADC Bias Calibration: > + * read efuse offset 0x7d to get a 17-bit data. Remove the >> dummy/fake > + * bit (bit3) to rebuild the real 16-bit data.

RE: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-10 Thread Hayes Wang
Marek Vasut [mailto:ma...@denx.de] > Sent: Wednesday, June 10, 2020 8:54 PM [...] > >>> + /* ADC Bias Calibration: > >>> + * read efuse offset 0x7d to get a 17-bit data. Remove the > dummy/fake > >>> + * bit (bit3) to rebuild the real 16-bit data. Write the data to the > >>> + * ADC ioffset. >

Re: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-10 Thread Marek Vasut
On 6/10/20 2:44 PM, Hayes Wang wrote: > Marek Vasut [mailto:ma...@denx.de] >> Sent: Tuesday, June 09, 2020 10:27 PM > [...] >>> + /* ADC Bias Calibration: >>> +* read efuse offset 0x7d to get a 17-bit data. Remove the dummy/fake >>> +* bit (bit3) to rebuild the real 16-bit data. Write

RE: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-10 Thread Hayes Wang
Marek Vasut [mailto:ma...@denx.de] > Sent: Tuesday, June 09, 2020 10:27 PM [...] > > + /* ADC Bias Calibration: > > +* read efuse offset 0x7d to get a 17-bit data. Remove the dummy/fake > > +* bit (bit3) to rebuild the real 16-bit data. Write the data to the > > +* ADC ioffset. > > +

Re: [PATCH u-boot 4/4] eth/r8152: support RTL8153B/RTL8154B

2020-06-09 Thread Marek Vasut
On 6/9/20 10:53 AM, Hayes Wang wrote: > This is used to support RTL8153B and RTL8154B. [...] > + ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_TIMEOUT, > +ocp_data); > + break; > + > + case RTL_VER_08: > + case RTL_VER_09: > +