nvmem: sfp: Add support for TA 2.1 devices

This adds support for Trust Architecture (TA) 2.1 devices to the SFP driver.
There are few differences between TA 2.1 and TA 3.0, especially for
read-only support, so just re-use the existing data.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220429162701.2222-17-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sean Anderson 2022-04-29 17:27:01 +01:00 committed by Greg Kroah-Hartman
parent 943eadbdb1
commit 33a1c66186
1 changed files with 6 additions and 0 deletions

View File

@ -78,12 +78,18 @@ static int layerscape_sfp_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(nvmem); return PTR_ERR_OR_ZERO(nvmem);
} }
static const struct layerscape_sfp_data ls1021a_data = {
.size = 0x88,
.endian = REGMAP_ENDIAN_BIG,
};
static const struct layerscape_sfp_data ls1028a_data = { static const struct layerscape_sfp_data ls1028a_data = {
.size = 0x88, .size = 0x88,
.endian = REGMAP_ENDIAN_LITTLE, .endian = REGMAP_ENDIAN_LITTLE,
}; };
static const struct of_device_id layerscape_sfp_dt_ids[] = { static const struct of_device_id layerscape_sfp_dt_ids[] = {
{ .compatible = "fsl,ls1021a-sfp", .data = &ls1021a_data },
{ .compatible = "fsl,ls1028a-sfp", .data = &ls1028a_data }, { .compatible = "fsl,ls1028a-sfp", .data = &ls1028a_data },
{}, {},
}; };