| Message ID | 20250516134945.14692-1-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBAMFTXAQMGQESC7UHWQ@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com
[209.85.208.69])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B030D3F260
for <linux-amarula@patchwork.amarulasolutions.com>;
Fri, 16 May 2025 15:49:54 +0200 (CEST)
Received: by mail-ed1-f69.google.com with SMTP id
4fb4d7f45d1cf-5ffe81b2ec9sf2086359a12.1
for <linux-amarula@patchwork.amarulasolutions.com>;
Fri, 16 May 2025 06:49:54 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1747403394; cv=pass;
d=google.com; s=arc-20240605;
b=VfmGhqqtdjLzEZa9Vf1P1FI9QkYRBfSf0lYbX/O/qgjfWqGieXu/UdtGtH6LOV8XvS
6+aqP7nMoLqxwHhT7MGT47Sa7sJcIZ3WVNMon8QYoJf6PK5hw+siP3wqfcqgU/0F/KZ6
Ujl1JE6RUw1ZA6j80t1AJeZkaXBf4O01sUz7ljD5tvA+kvjQZXwTe9okA5mIM0hWp7qZ
djrb2QZAqPI9Dp2JAsGRBGxwyDC6QsavWSXBnObaLjBr724W/wgfE7Q7KsPbbBqG1CYp
HYKrDQlFTpPpPU3pPrVtNIGJtkapoFR8yWrx4pAY66Vm7tpoSZWwmgfhLlUhM0utAr/h
ZHZA==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:message-id:date:subject:cc:to
:from:dkim-signature;
bh=q1/R9HTgoZZpRmEIVs5j+uRng1zm3/nt8QR7ZSnCq0s=;
fh=jszglQYfcxKRuHt2czmPt2KX3ryEY4JKnnuVMFhNXCA=;
b=GZ6N1YMAY6zPJZRMMbiIfFo8r2kCIcHWblwUKBulY/wbaykqvcx0pfMoJDn0sFLXWo
1m8R03YeRv82hXLJvJMGvozeV7sVNKNJbgCyDQfRmbimC+wmBARWsWV8RvbgAfovHj7S
+K0RVHRv2Q/HgMCnnJLAJGiNWxdq16/FkcsBHZBzdWuRXGv6GXJTE+hXOdCl5BOIxDNn
1PwnCJA9MWonqDicshLA9UT3naZuZdR2oV2/ntj9b3xOD02nUPxo1C6e1924OmTIJwub
x5/CfC9jD4dvhRaTtXx/B2Cxwmp8kFlzP910mx5HQCn1Jfx5r+SZm5qveq/1uRh+/GyI
Qaew==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=SMws9hiM;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1747403394; x=1748008194;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:x-original-authentication-results
:x-original-sender:mime-version:message-id:date:subject:cc:to:from
:from:to:cc:subject:date:message-id:reply-to;
bh=q1/R9HTgoZZpRmEIVs5j+uRng1zm3/nt8QR7ZSnCq0s=;
b=RdxHUKoIkriPn6Jeh1WGuJ/Xh+FXHCjIm9gbrJY1+6z0+RHP0s38qmvZeSsH9W8D/e
lc+BMKnZOuRIucvscDGs0i9bF3nvE+QDsj4dIcSlZM0rTMqkL12tuE8/nW+92l4oc8hY
NlSBdD0Qtw4KGoz/jo9f4LaVnwwaj7abbDWbc=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1747403394; x=1748008194;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender:mime-version
:message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=q1/R9HTgoZZpRmEIVs5j+uRng1zm3/nt8QR7ZSnCq0s=;
b=IKUIuyOEKyLaiR6vRxjdNGhb9hTpaByYcwum+0rtmqfLLcTt4w6nDFndnoWldF/Mkb
gnm8SFWRorwFhBVfwcRunuSnJq9pxZJ8r1HcbVBuRaljbUk2BDiJ/n/azcLUg61RMs6T
ejH4yVoTWmSnXlm9P08dAn0EnM012uteyASlCN2aNN3YwRajWkDSQ4cbjlEWk/cUFfk3
9aMF+ihbQ4qb0e3zy/x3boFZogmj9JtY5SZZjCCZOmDkKLyhDearqg1X6rexFq/B1REl
kqZD3r/utcVBzUimnv1mnr+gkM20tQBR5lcnlfehlfTMQtgLJF3bqW60kXIx3eeC20TR
BQUA==
X-Forwarded-Encrypted: i=2;
AJvYcCUM3pH7qUkaXX201meCHp70JZGVxIat9rbE+rw4sEQcaW/3ayvgkbSLdO+/g8BEmCeRvge/xBOXAAaMBhL6@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0YzDYy0K6mJY9qcOpv2Tzjr3vaz7mGULafHc9m8GW4kL/rV1EzBo
QanKwm1c+pj0OWkeky5W1F+1z11obxmRO9JcAvqJU7e+HpZcxTuyYhMqKVNRbhG/Yc2itA==
X-Google-Smtp-Source:
AGHT+IHczhzUA3rmnU6kVMBHugHBSO1KgwSw3FJ4bExhO7ioE2yR+HQkwC7/JEGVi6JBKSCXJGAO/Q==
X-Received: by 2002:a05:6402:2102:b0:5fd:2069:bbbb with SMTP id
4fb4d7f45d1cf-6008a39ca8bmr3276224a12.3.1747403393925;
Fri, 16 May 2025 06:49:53 -0700 (PDT)
X-BeenThere: linux-amarula@amarulasolutions.com;
h=AVT/gBHTw2ENzbKmbYRs5JYkKHn+mSiqlezpADqa8JAj5jAEfA==
Received: by 2002:a05:6402:234b:b0:601:956f:a0c3 with SMTP id
4fb4d7f45d1cf-601956fa54dls104504a12.1.-pod-prod-03-eu; Fri, 16 May 2025
06:49:52 -0700 (PDT)
X-Received: by 2002:a05:6402:d0e:b0:5f3:fbb4:b258 with SMTP id
4fb4d7f45d1cf-6008a7abbaemr2953403a12.14.1747403391670;
Fri, 16 May 2025 06:49:51 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1747403391; cv=none;
d=google.com; s=arc-20240605;
b=YQ9T+52Oo/kE4t6XqbgfnQTl/Tp7m35u7YBaC/UOGazt/COCp8Bnx9i6T5Is0zTknT
v9L8CGh5yV+RTJ39ZhTFfqVGtbjslcemShnmwfRmWKu9FtVfbrdKHjoiF6/elWQdK5jH
fD3bKkIO74AAsHCVTcL3v2KGmBWkmxTgWaR0+aRzodVQ5EHzv059QqWZeDTG3car6Rfy
/RoMw2TKa/fWEYxzCS4VG3v/sYazi0SLdrfAT/L4pLObwxZD9mC0bx8HMP3X1X9kUhLe
r5OC8gq00UTaCL1ZdrSKRrDBs9lu/wJAEqe2Nv+dTcAIQFtInTOgg/hYxYiAVIBm2lkq
4gjw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:dkim-signature;
bh=1+uWwuTYRifAYGUlGh3WRUvzHiTmLTWvHkuePmubcIY=;
fh=DcWFND7B6qs6EwjFs+a/iNQVt+cBAor//TrAdNllrRk=;
b=KvoNV0BD1q/5Yt2zGrs/t9hm7NHCJRfEMkQeEXvIZKyqhVzjFNVdWGuiMcHkU27aRh
KN4t989yjCmyZhHUrmUFaErf8E4pVINR/civERlFsWKOpzS+YvlLfjrWphHytriAHg58
FgetN1t6g3EC9T96SEZNvDrQNVjkBfHT+H4xccHhsq07SZtxeaW4/n/36wu9+5cQ+Am4
zzgZ5bL2HyVgWw3dpCT+L8G/ufZc6Q3gwate0Izaxnge9Q5iwAjToPb6tnRY7oCnlpV7
/fEAZhWYnDrnWRn6Lq7g7CuWkjWXDeL56dh3INIu1qLrCi7ttvGPE7mFtHAnw2bFTbCl
y0dA==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=SMws9hiM;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com.
[209.85.220.41])
by mx.google.com with SMTPS id
4fb4d7f45d1cf-6005a8e5973sor929277a12.2.2025.05.16.06.49.51
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Fri, 16 May 2025 06:49:51 -0700 (PDT)
Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Gm-Gg: ASbGncsBMJk4IoO2j/3aS6Y9LxwL00y/PuguXM/wfcNjxMfM0U8Qsg759nC0z2MDV8Y
p6ds6orFbfHyUQoabKZYPN0PBF8zTIlr/jgWQLojeeIcudH/QoQPv+F30z5AYzzxZioCebhoc4d
/7M20MzstfCZPj8QzEOJHkPkDGJEV6D3Lb7kIo8fqw4us3TEiP4NVhuoKp1yo5Pc3kaLG1hWWot
BMW+zuksLsqYxgu2NLIxN+EeaarEbe1cdgUOj8WKI6B5uMDZZQeWQ8lcojjEbaI5Vz5uA/b6fyU
KCWpQbs+ik7qRBTtW3Sqp6cdDXkkzzU6fwNL5+0q27oYdpUHmvPZpiIk7oDQrWDypCkCDfLPzXS
ifnXZUsYzyPEuWe4bayUDLMjJ3U8=
X-Received: by 2002:a05:6402:27d1:b0:5fc:966b:23fa with SMTP id
4fb4d7f45d1cf-6008a39c9b8mr2906162a12.4.1747403391082;
Fri, 16 May 2025 06:49:51 -0700 (PDT)
Received: from dario-ThinkPad-T14s-Gen-2i.. ([62.19.60.137])
by smtp.gmail.com with ESMTPSA id
4fb4d7f45d1cf-6005a6e6389sm1562951a12.45.2025.05.16.06.49.49
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 16 May 2025 06:49:50 -0700 (PDT)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: linux-amarula@amarulasolutions.com,
Mark Brown <broonie@kernel.org>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Abel Vesa <abelvesa@kernel.org>,
Fabio Estevam <festevam@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Peng Fan <peng.fan@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
Stephen Boyd <sboyd@kernel.org>,
imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-clk@vger.kernel.org
Subject: [linux-next,
1/1] clk: imx: imx8mm-anatop: probe only on i.MX8MM platforms
Date: Fri, 16 May 2025 15:49:27 +0200
Message-ID: <20250516134945.14692-1-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
MIME-Version: 1.0
X-Original-Sender: dario.binacchi@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b=SMws9hiM;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=pass header.i=@amarulasolutions.com
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list linux-amarula@amarulasolutions.com;
contact linux-amarula+owners@amarulasolutions.com
List-ID: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
[linux-next,1/1] clk: imx: imx8mm-anatop: probe only on i.MX8MM platforms
|
|
Commit Message
Dario Binacchi
May 16, 2025, 1:49 p.m. UTC
Commit 9c1e388af87c ("clk: imx: add support for i.MX8MM anatop clock
driver") breaks boot on i.MX8M{P,N} platforms.
Here's the log for a board based on the i.MX8MP platform:
[ 1.439320] i.MX clk 1: register failed with -2
[ 1.441014] i.MX clk 2: register failed with -2
[ 1.445610] imx8mm-anatop 30360000.clock-controller: NXP i.MX8MM anatop clock driver probed
[ 1.455068] Unable to handle kernel paging request at virtual address fffffffffffffffe
...
[ 1.634650] Call trace:
[ 1.637102] __clk_get_hw+0x4/0x18 (P)
[ 1.640862] imx8mp_clocks_probe+0xdc/0x2f50
[ 1.645152] platform_probe+0x68/0xc4
[ 1.648827] really_probe+0xbc/0x298
[ 1.652413] __driver_probe_device+0x78/0x12c
In the imx8mp.dtsi device tree, the anatop compatible string is:
compatible = "fsl,imx8mp-anatop", "fsl,imx8mm-anatop";
So, in configurations like arm64 defconfig, where CONFIG_CLK_IMX8MP and
CONFIG_CLK_IMX8MM as well as CONFIG_CLK_IMX8MN are enabled, the driver
for the i.MX8MM anatop is incorrectly loaded.
The patch fixes the regression by ensuring that the i.MX8MM anatop
driver only probes on i.MX8MM platforms.
Fixes: 9c1e388af87c ("clk: imx: add support for i.MX8MM anatop clock driver")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
drivers/clk/imx/clk-imx8mm-anatop.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
Comments
On Fri, May 16, 2025 at 03:49:27PM +0200, Dario Binacchi wrote: > Commit 9c1e388af87c ("clk: imx: add support for i.MX8MM anatop clock > driver") breaks boot on i.MX8M{P,N} platforms. ... > In the imx8mp.dtsi device tree, the anatop compatible string is: > > compatible = "fsl,imx8mp-anatop", "fsl,imx8mm-anatop"; > > So, in configurations like arm64 defconfig, where CONFIG_CLK_IMX8MP and > CONFIG_CLK_IMX8MM as well as CONFIG_CLK_IMX8MN are enabled, the driver > for the i.MX8MM anatop is incorrectly loaded. > > The patch fixes the regression by ensuring that the i.MX8MM anatop > driver only probes on i.MX8MM platforms. This *works* so Tested-by: Mark Brown <broonie@kernel.org> and we probably need it for existing built DTs, but shouldn't there also be a patch to the DT source since the two blocks clearly don't seem to be compatible. To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
> Subject: [linux-next, 1/1] clk: imx: imx8mm-anatop: probe only on > i.MX8MM platforms DT Maintainer Krzysztof NACKed [1] because of ABI break. Are we continuing breaking the ABI? [1] https://lore.kernel.org/imx/6a28f9bb-05fa-45ff-8c0b-790c0caf3252@kernel.org/T/#u Regards, Peng. > > Commit 9c1e388af87c ("clk: imx: add support for i.MX8MM anatop > clock > driver") breaks boot on i.MX8M{P,N} platforms. > > Here's the log for a board based on the i.MX8MP platform: > > [ 1.439320] i.MX clk 1: register failed with -2 > [ 1.441014] i.MX clk 2: register failed with -2 > [ 1.445610] imx8mm-anatop 30360000.clock-controller: NXP > i.MX8MM anatop clock driver probed > [ 1.455068] Unable to handle kernel paging request at virtual address > fffffffffffffffe > > ... > > [ 1.634650] Call trace: > [ 1.637102] __clk_get_hw+0x4/0x18 (P) > [ 1.640862] imx8mp_clocks_probe+0xdc/0x2f50 > [ 1.645152] platform_probe+0x68/0xc4 > [ 1.648827] really_probe+0xbc/0x298 > [ 1.652413] __driver_probe_device+0x78/0x12c > > In the imx8mp.dtsi device tree, the anatop compatible string is: > > compatible = "fsl,imx8mp-anatop", "fsl,imx8mm-anatop"; > > So, in configurations like arm64 defconfig, where > CONFIG_CLK_IMX8MP and CONFIG_CLK_IMX8MM as well as > CONFIG_CLK_IMX8MN are enabled, the driver for the i.MX8MM > anatop is incorrectly loaded. > > The patch fixes the regression by ensuring that the i.MX8MM anatop > driver only probes on i.MX8MM platforms. > > Fixes: 9c1e388af87c ("clk: imx: add support for i.MX8MM anatop clock > driver") > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > > --- > > drivers/clk/imx/clk-imx8mm-anatop.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/drivers/clk/imx/clk-imx8mm-anatop.c b/drivers/clk/imx/clk- > imx8mm-anatop.c > index 4ac870df6370..90ff11a93fe5 100644 > --- a/drivers/clk/imx/clk-imx8mm-anatop.c > +++ b/drivers/clk/imx/clk-imx8mm-anatop.c > @@ -37,6 +37,19 @@ static const char * const clkout_sels[] = > {"audio_pll1_out", "audio_pll2_out", " > static struct clk_hw_onecell_data *clk_hw_data; static struct clk_hw > **hws; > > +static int is_really_imx8mm(struct device_node *np) { > + const char *compat; > + struct property *p; > + > + of_property_for_each_string(np, "compatible", p, compat) { > + if (strcmp(compat, "fsl,imx8mm-anatop")) > + return -EFAULT; > + } > + > + return 0; > +} > + > static int imx8mm_anatop_clocks_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > @@ -44,6 +57,10 @@ static int imx8mm_anatop_clocks_probe(struct > platform_device *pdev) > void __iomem *base; > int ret; > > + ret = is_really_imx8mm(np); > + if (ret) > + return ret; > + > base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(base)) { > dev_err(dev, "failed to get base address\n"); > -- > 2.43.0 > > base-commit: 8566fc3b96539e3235909d6bdda198e1282beaed > branch: fix-imx8mm-probing To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Mon, May 19, 2025 at 12:58:48PM +0000, Peng Fan wrote: > > Subject: [linux-next, 1/1] clk: imx: imx8mm-anatop: probe only on > > i.MX8MM platforms > DT Maintainer Krzysztof NACKed [1] because of ABI break. > Are we continuing breaking the ABI? > [1] https://lore.kernel.org/imx/6a28f9bb-05fa-45ff-8c0b-790c0caf3252@kernel.org/T/#u As I've reported a couple of times now (including in the thread you link above) i.MX8MP platforms haven't booted -next for several weeks: https://lore.kernel.org/imx/6a28f9bb-05fa-45ff-8c0b-790c0caf3252@kernel.org/T/#m8f7886b2f57fe80e2d87e2242bc88389dedf2ae4a These patches need to be either fixed or dropped. To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On 19/05/2025 14:58, Peng Fan wrote: >> Subject: [linux-next, 1/1] clk: imx: imx8mm-anatop: probe only on >> i.MX8MM platforms > > DT Maintainer Krzysztof NACKed [1] because of ABI break. > > Are we continuing breaking the ABI? > > [1] https://lore.kernel.org/imx/6a28f9bb-05fa-45ff-8c0b-790c0caf3252@kernel.org/T/#u > > Regards, > Peng. > >> >> Commit 9c1e388af87c ("clk: imx: add support for i.MX8MM anatop >> clock >> driver") breaks boot on i.MX8M{P,N} platforms. >> >> Here's the log for a board based on the i.MX8MP platform: >> >> [ 1.439320] i.MX clk 1: register failed with -2 >> [ 1.441014] i.MX clk 2: register failed with -2 >> [ 1.445610] imx8mm-anatop 30360000.clock-controller: NXP >> i.MX8MM anatop clock driver probed >> [ 1.455068] Unable to handle kernel paging request at virtual address >> fffffffffffffffe >> >> ... >> >> [ 1.634650] Call trace: >> [ 1.637102] __clk_get_hw+0x4/0x18 (P) >> [ 1.640862] imx8mp_clocks_probe+0xdc/0x2f50 >> [ 1.645152] platform_probe+0x68/0xc4 >> [ 1.648827] really_probe+0xbc/0x298 >> [ 1.652413] __driver_probe_device+0x78/0x12c >> >> In the imx8mp.dtsi device tree, the anatop compatible string is: >> >> compatible = "fsl,imx8mp-anatop", "fsl,imx8mm-anatop"; >> >> So, in configurations like arm64 defconfig, where >> CONFIG_CLK_IMX8MP and CONFIG_CLK_IMX8MM as well as >> CONFIG_CLK_IMX8MN are enabled, the driver for the i.MX8MM >> anatop is incorrectly loaded. >> >> The patch fixes the regression by ensuring that the i.MX8MM anatop >> driver only probes on i.MX8MM platforms. >> >> Fixes: 9c1e388af87c ("clk: imx: add support for i.MX8MM anatop clock >> driver") >> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> >> >> --- >> >> drivers/clk/imx/clk-imx8mm-anatop.c | 17 +++++++++++++++++ >> 1 file changed, 17 insertions(+) >> >> diff --git a/drivers/clk/imx/clk-imx8mm-anatop.c b/drivers/clk/imx/clk- >> imx8mm-anatop.c >> index 4ac870df6370..90ff11a93fe5 100644 >> --- a/drivers/clk/imx/clk-imx8mm-anatop.c >> +++ b/drivers/clk/imx/clk-imx8mm-anatop.c >> @@ -37,6 +37,19 @@ static const char * const clkout_sels[] = >> {"audio_pll1_out", "audio_pll2_out", " >> static struct clk_hw_onecell_data *clk_hw_data; static struct clk_hw >> **hws; >> >> +static int is_really_imx8mm(struct device_node *np) { >> + const char *compat; >> + struct property *p; >> + >> + of_property_for_each_string(np, "compatible", p, compat) { >> + if (strcmp(compat, "fsl,imx8mm-anatop")) >> + return -EFAULT; EFAULT does not seem like proper error code for ignoring probe. I am pretty sure it leaves you with dmesg regression. Probably you wanted to fix driver matching. Otherwise your compatibles are just wrong. You claim with this: compatible = "fsl,imx8mp-anatop", "fsl,imx8mm-anatop"; That 8mp is fully compatible with 8mm, yet here you claim that 8mm is not handled. So it is both compatible and not compatible. There is some gross misunderstanding what the compatibles mean. Please look at DT spec. Shortly explaining: fallback (8mm) means new device will work somehow correctly, but maybe with limited features, with the driver when bound by the fallback. Other meanings are most likely wrong. I consider that "Support spread spectrum clocking for i.MX8M PLLs" patchset broken (to which I was pointing on early discussions) and should be dropped. Don't fix broken stuff with more broken code. Best regards, Krzysztof To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Mon, May 19, 2025 at 04:13:14PM +0200, Krzysztof Kozlowski wrote: > You claim with this: > compatible = "fsl,imx8mp-anatop", "fsl,imx8mm-anatop"; > That 8mp is fully compatible with 8mm, yet here you claim that 8mm is > not handled. So it is both compatible and not compatible. Note that binding for anatop and the above compatible list are in mainline so this is a preexisting issue, whatever differences there are in the versions in the two SoCs aren't triggering problems with the code that's in mainline. The series adding actual clock drivers triggers the issue but the claim that the two were compatible wasn't introduced by it. Given this if people are shipping DTBs based on the existing kernel we might need something like this patch to work around them, even if we fix the existing binding and .dtsi files. To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
diff --git a/drivers/clk/imx/clk-imx8mm-anatop.c b/drivers/clk/imx/clk-imx8mm-anatop.c index 4ac870df6370..90ff11a93fe5 100644 --- a/drivers/clk/imx/clk-imx8mm-anatop.c +++ b/drivers/clk/imx/clk-imx8mm-anatop.c @@ -37,6 +37,19 @@ static const char * const clkout_sels[] = {"audio_pll1_out", "audio_pll2_out", " static struct clk_hw_onecell_data *clk_hw_data; static struct clk_hw **hws; +static int is_really_imx8mm(struct device_node *np) +{ + const char *compat; + struct property *p; + + of_property_for_each_string(np, "compatible", p, compat) { + if (strcmp(compat, "fsl,imx8mm-anatop")) + return -EFAULT; + } + + return 0; +} + static int imx8mm_anatop_clocks_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -44,6 +57,10 @@ static int imx8mm_anatop_clocks_probe(struct platform_device *pdev) void __iomem *base; int ret; + ret = is_really_imx8mm(np); + if (ret) + return ret; + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { dev_err(dev, "failed to get base address\n");