Message ID | 20220421175657.1259024-5-sean.anderson@seco.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | nvmem: sfp: binding updates and additions | expand |
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. -michael
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
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 reg: maxItems: 1
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(-)