[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9fb4beb2-96c3-1bf6-9ee3-5b87b641c234@linaro.org>
Date: Mon, 11 Jul 2022 09:45:28 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Doug Anderson <dianders@...omium.org>
Cc: Ulf Hansson <ulf.hansson@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Bhupesh Sharma <bhupesh.sharma@...aro.org>,
Linux MMC List <linux-mmc@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>
Subject: Re: [PATCH 2/5] dt-bindings: mmc: sdhci-msm: constrain reg-names at
least for one variant
On 07/07/2022 16:31, Doug Anderson wrote:
> Hi,
>
> On Thu, Jul 7, 2022 at 1:04 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@...aro.org> wrote:
>>
>> The entries in arrays must have fixed order, so the bindings and Linux
>> driver expecting various combinations of 'reg' addresses was never
>> actually conforming to guidelines.
>>
>> Specifically Linux driver always expects 'core' reg entry as second
>> item, but some DTSes are having there 'cqhci'.
>
> This is a bit misleading and makes it sound like we've got a bug. In
> truth the Linux driver looks at the compatible string. If it sees any
> compatible listed as "v5" (or a slight variant of v5 to handle a
> workaround for sc7180 / sdm845) then it _doesn't_ expect 'core' reg as
> the second entry. See the variable `mci_removed`. The old bindings
> ".txt" file also had this to say:
>
> For SDCC version 5.0.0, MCI registers are removed from SDCC
> interface and some registers are moved to HC. New compatible
> string is added to support this change - "qcom,sdhci-msm-v5".
You're right, thanks, I missed that part.
>
> So I guess that means this is the documentation for all of the
> combinations you have listed:
>
> * hc only - v5 controller w/out CQE / ICE
>
> * hc + core - v4 controller w/out CQE / ICE
>
> * hc + cqhci - v5 controller w/ CQE and w/out ICE
>
> * hc + cqhci + ice - v5 controller w/ CQE / ICE
>
> * hc + core + cqhci + ice - v4 controller w/ CQE / ICE
>
> Said another way, before v5 the "core" range existed. After v5 it
> apparently doesn't so there's no way we could have specified it.
>
> You'll notice that one of the options above implies that a v4
> controller (with "core" specified) can have CQE and ICE. Is this
> actually true, or was it a misunderstanding in the .txt to .yaml
> conversion?
>
> If it's true that a v4 controller can have CQE and ICE then your patch
> is wrong in asserting that v4 controllers have only "hc" and "core".
>
> If a v4 controller _can't_ have CQE and ICE then your patch is right
> but incomplete. It should also be removing the option:
> - const: hc
> - const: core
> - const: cqhci
> - const: ice
>
> I am not intimately familiar with Qualcomm MMC controller history.
> That being said, the old .txt file said:
>
> - CQE register map (Optional, CQE support is present on SDHC
> instance meant
> for eMMC and version v4.2 and above)
>
> To me this implies that a v4 controller could _at least_ have "cqhci".
> I dunno about "ice". I seem to recall that this was the argument for
> why the driver had to use reg-names to begin with and why the driver
> looks for "cqhci" by name.
I checked manual and SDCC v4 already supports CQE. ICE appears at v4.1
(MSM8996, MSM8953 and some more which do not have dedicated
compatibles), so the compatibles seems inaccurate. ICE capability can be
runtime detected, but we still need to provide ICE address space. Anyway
I don't want to dig too much into SDCC versions, so I'll allow
hc+core+cqhci+ice.
Thanks for the feedback, much appreciated!
Best regards,
Krzysztof
Powered by blists - more mailing lists