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: <c780ad2a-2292-6e06-fa89-4c8a5139c253@gmail.com>
Date:   Mon, 9 Aug 2021 17:20:45 +0300
From:   Iskren Chernev <iskren.chernev@...il.com>
To:     Vinod Koul <vkoul@...nel.org>
Cc:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Kishon Vijay Abraham I <kishon@...com>,
        Manu Gautam <mgautam@...eaurora.org>,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-phy@...ts.infradead.org, phone-devel@...r.kernel.org,
        ~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH v1 2/2] phy: qcom-qmp: Add support for SM6115 UFS phy



On 8/9/21 7:48 AM, Vinod Koul wrote:
> On 06-08-21, 19:09, Iskren Chernev wrote:
>> On 8/6/21 3:57 PM, Vinod Koul wrote:
>>> On 05-08-21, 12:17, Iskren Chernev wrote:
> 
>>> why are these registers 660 specific and not V3 like we have for
>>> other generations..? Quick looks with V3 regs tells me that seem
>>> similar....
>>>
>>
>> Well, I looked at them for a long time and the only thing that is similar
>> are the first few QSERDES registers from COM_ATB_SEL1=0x000 to
>> COM_BIAS_EN_CLKBUFLR_EN=0x034. Everything else is different. So I can re-use
> 
> Is the offset different? I thought all Vn registers across chips do have
> same offsets..

Upon closer inspection, for the SERDES registers they are 19 common (the first
19), the others are different (different values, different names). About the
offsets that stay in DT -- they are the same for V3 and V3-660 (I haven't send
DT yet). Just to be clear, offset the is thing you add to each register to get
an actual register value, mainline uses relative offsets (base / offset in DT),
downstream uses a macro for each register group and the offset is hardcoded in
code. Link to the DT (will be submitted after core drivers are merged) [1]

[1] https://gitlab.com/ichernev/linux-postmarketos/-/blob/b44c853caf37dd73e059628a1831ad185356a33e/arch/arm64/boot/dts/qcom/sm4250.dtsi#L878

> 
>> the V3 for the similar regs, but they are 10%, so I figured instead of combing
>> through all of the sequences to save 10% of the constants and make it slightly
>> less readable just use new constants.
>>
>> Let me know if I should reuse the 14 regs from V3.
> 
> reuse yes, but would like to understand more why offsets are different,
> 
> Can you point me to downstream code reference for this?

As I said, the offsets are the same, the first 19 serdes relative
addresses/names are the same (can be reused), the rest is all different.
I wrote a tool to compare names and values, I can paste those as well if
needed.


This is a link to the downstream code (header) [2]


[2] https://github.com/OnePlusOSS/android_kernel_oneplus_sm4250/blob/oneplus/SM4250_Q_10.0/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v3-660.h

I will do a v2 with the 19 regs reused from the v3 bunch.

Regards,
Iskren

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ