From: Ioana Ciornei ioana.ciornei@nxp.com
[ Upstream commit 81a2c31257411296862487aaade98b7d9e25dc72 ]
The QIXIS FPGA found on Layerscape boards such as LX2160AQDS, LS1028AQDS etc deals with power-on-reset timing, muxing etc. Use the simple-mfd-i2c as its core driver by adding its compatible string (already found in some dt files). By using the simple-mfd-i2c driver, any child device will have access to the i2c regmap created by it.
Signed-off-by: Ioana Ciornei ioana.ciornei@nxp.com Link: https://lore.kernel.org/r/20250707153120.1371719-1-ioana.ciornei@nxp.com Signed-off-by: Lee Jones lee@kernel.org Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
YES
- What changed - Adds two OF match entries to `simple_mfd_i2c_of_match[]` so the `simple-mfd-i2c` driver binds to the QIXIS FPGA on Layerscape QDS boards: - `fsl,lx2160aqds-fpga` - `fsl,ls1028aqds-fpga` - Location: drivers/mfd/simple-mfd-i2c.c:96
- Why this is a bugfix (not a feature) - These compatibles already exist in mainline DTS and the binding schema, but there is no I2C driver matching them, so the node does not bind and its children aren’t instantiated. - DTS examples: - arch/arm64/boot/dts/freescale/fsl-lx2160a-qds.dts:263 - arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts:341 - Binding: Documentation/devicetree/bindings/board/fsl,fpga- qixis-i2c.yaml:21 - Without a bound parent driver, the child `reg-mux` node under the FPGA can’t get a regmap from its parent and won’t probe, leaving board muxing controls non-functional. This is a user-visible deficiency rather than new functionality.
- Code path and behavior after the change - Probe obtains match data and falls back safely when `.data` is NULL: - Default 8-bit register/8-bit value regmap is used when no custom config is provided: drivers/mfd/simple-mfd-i2c.c:41-45 - If no MFD cells are supplied via `.data`, it populates children from DT: drivers/mfd/simple-mfd-i2c.c:51-53 - The child `reg-mux` driver will successfully fetch the regmap from the parent if no MMIO/syscon region is present (fallback to `dev_get_regmap(dev->parent, NULL)`), enabling mux control: - drivers/mux/mmio.c:20
- Scope and risk assessment - Small, contained change: two ID table entries only; no logic changes; no ABI churn. - Conservative matching: only board-specific compatibles are added; the generic `fsl,fpga-qixis-i2c` is not matched, avoiding unintended binding on other QIXIS variants (e.g., PowerPC boards). - The default regmap path (8/8) aligns with how these DTs describe the QIXIS registers (e.g., `mux-reg-masks = <0x54 ...>` uses 8-bit offsets), so there is no width mismatch. - Touches MFD over I2C only; no architectural or cross-subsystem impact; minimal regression risk.
- Stable policy fit - Fixes a real, user-facing problem: existing DTs/bindings reference devices that currently don’t bind to any driver, leaving board- control functionality inoperative. - Change is trivial, low risk, and does not introduce features or architectural alterations. - No side effects beyond enabling the intended binding and population of DT-described child devices.
Given the above, this is a textbook stable backport candidate enabling existing DT descriptions to function by adding missing compatible strings in the driver’s match table.
drivers/mfd/simple-mfd-i2c.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c index 22159913bea03..f7798bd922224 100644 --- a/drivers/mfd/simple-mfd-i2c.c +++ b/drivers/mfd/simple-mfd-i2c.c @@ -99,6 +99,8 @@ static const struct of_device_id simple_mfd_i2c_of_match[] = { { .compatible = "maxim,max5970", .data = &maxim_max5970}, { .compatible = "maxim,max5978", .data = &maxim_max5970}, { .compatible = "maxim,max77705-battery", .data = &maxim_mon_max77705}, + { .compatible = "fsl,lx2160aqds-fpga" }, + { .compatible = "fsl,ls1028aqds-fpga" }, {} }; MODULE_DEVICE_TABLE(of, simple_mfd_i2c_of_match);