Skip to content

adsp: dwmac-adi: fix improper configuration of PHYISEL on sc58x #3419

Description

@sipraga

@qasim-ijaz points out that this field is only 1 bit wide: #3396 (comment)

As discussed in that thread, this means the logic only succeeds for RGMII mode, by a stroke of dumb luck.

Fix this by introducing more granular compatible strings, and keying off that with some driver data.

I also originally wrote this comment in the code, but decided it's pointless to commit. We can just track it here:


			/*
			 * FIXME: The PHYISEL field on SC58x is only 1 bit
			 * wide. This code only works for RGMII. It will fail
			 * for RMII, and SC58x does not even support MII. This
			 * should be fixed by using proper per-compatible driver
			 * data.
			 */
			ret = regmap_update_bits(
				regmap, REG_PADS_PCFG0,
				PADS_PCFG0_EMAC0_PHYISEL_MASK,
				FIELD_PREP(PADS_PCFG0_EMAC0_PHYISEL_MASK, val));
			if (ret)
				return ret;


Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions