linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@seco.com>
To: Michael Walle <michael@walle.cc>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Shawn Guo <shawnguo@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Li Yang <leoyang.li@nxp.com>,
	linux-kernel@vger.kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: Re: [PATCH 4/8] dt-bindings: nvmem: sfp: Add compatible binding for TA 2.1 SFPs
Date: Thu, 21 Apr 2022 14:47:59 -0400	[thread overview]
Message-ID: <e05b5a9f-2049-73be-e9cc-9640eb014e01@seco.com> (raw)
In-Reply-To: <816dad4a1fd6869d89fc143030dd4ff9@walle.cc>



On 4/21/22 2:18 PM, Michael Walle wrote:
> Am 2022-04-21 19:56, schrieb Sean Anderson:
>> Trust Architecture (TA) 2.1 devices include the LS1012A, LS1021A,
>> LS1043A, and LS1046A. The SFP device on TA 2.1 devices is very similar
>> to the SFP on TA 3.0 devices. The primary difference is a few fields in
>> the control register. Add a compatible string.
>>
>> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
>> ---
>>
>>  .../devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml    | 9 +++++++--
>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> diff --git
>> a/Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml
>> b/Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml
>> index e7d1232fcd41..aa277f1eee7e 100644
>> --- a/Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml
>> +++ b/Documentation/devicetree/bindings/nvmem/fsl,layerscape-sfp.yaml
>> @@ -18,8 +18,13 @@ allOf:
>>
>>  properties:
>>    compatible:
>> -    enum:
>> -      - fsl,ls1028a-sfp
>> +    oneOf:
>> +      - description: Trust architecture 2.1 SFP
>> +        items:
>> +          - const: fsl,ls1021a-sfp
>> +      - description: Trust architecture 3.0 SFP
>> +        items:
>> +          - const: fsl,ls1028a-sfp
> 
> I'm unsure about this one. Esp. if you reuse the fsl,ls1028a-sfp
> compatible on other SoCs, there were some endianess issues with
> other IP blocks on the ls1028a. So it might be that on the LS1028A
> the IP has to accessed in little endian order and for other devices
> in big endian. I think we should add one compatible per SoC unless
> we know better.

It looks like I overlooked this. As you pointed out, there is indeed an
endianness difference between TA 2.1 and 3.0 platforms (see e.g. [1]).
Patch 8/8 will need to be updated. I think the easiest way to support
this may be to convert the driver to regmap and set the endiannes in the
config based on the compatible. We could also use the little-endian/
big-endian properties.

--Sean

[1] https://docs.nxp.com/bundle/GUID-487B2E69-BB19-42CB-AC38-7EF18C0FE3AE/page/GUID-EFF8FF41-C8C0-4A3B-AF95-E801D585B7C6.html

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-04-21 18:49 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 17:56 [PATCH 0/8] nvmem: sfp: binding updates and additions Sean Anderson
2022-04-21 17:56 ` [PATCH 1/8] dt-bindings: nvmem: sfp: Fix typo Sean Anderson
2022-04-21 18:03   ` Michael Walle
2022-04-21 21:55   ` Andrew Lunn
2022-04-21 17:56 ` [PATCH 2/8] dt-bindings: nvmem: sfp: Add clock properties Sean Anderson
2022-04-21 18:12   ` Michael Walle
2022-04-22 21:27     ` Rob Herring
2022-04-22 13:36   ` Rob Herring
2022-04-22 14:33     ` Sean Anderson
2022-04-21 17:56 ` [PATCH 3/8] dt-bindings: nvmem: sfp: Add TA_PROG_SFP supply Sean Anderson
2022-04-21 21:59   ` Andrew Lunn
2022-04-21 22:06     ` Sean Anderson
2022-04-21 23:02       ` Andrew Lunn
2022-04-21 17:56 ` [PATCH 4/8] dt-bindings: nvmem: sfp: Add compatible binding for TA 2.1 SFPs Sean Anderson
2022-04-21 18:18   ` Michael Walle
2022-04-21 18:47     ` Sean Anderson [this message]
2022-04-21 17:56 ` [PATCH 5/8] arm64: dts: ls1028a: Update SFP binding to include clock Sean Anderson
2022-04-21 18:44   ` Michael Walle
2022-04-21 17:56 ` [PATCH 6/8] ARM: dts: layerscape: Add SFP binding for TA 2.1 devices Sean Anderson
2022-04-21 17:56 ` [PATCH 7/8] ARM: dts: Add SFP binding for TA 3.0 devices Sean Anderson
2022-04-21 17:56 ` [PATCH 8/8] nvmem: sfp: Add support for TA 2.1 devices Sean Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e05b5a9f-2049-73be-e9cc-9640eb014e01@seco.com \
    --to=sean.anderson@seco.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@walle.cc \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).