From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 942DC39021D for ; Thu, 20 Aug 2026 21:47:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787262449; cv=none; b=SkqZMOqC7im1er+7HONQr7u1Kbyt77GARbVhDB22IwQgYL2lwdpgb2zyqA+1JUO8lSJiCYzcCVKeneeNX5ecti7YEmcYfQ1u/cBxdj6lj6QBn92TY6FPS5qDJo425BNxrgWYKoSfYbc/h9QpfLaUTG5YBkamyKw3LYb00n3yXOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787262449; c=relaxed/simple; bh=JhG4NqL6xdCiPKoBwOJleJchuXI/zA+DtNmBh2rXsdU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qNlZjfKvnHmTzgZ3mMeKpRc63Ml1C37eDIEss60elGF9Ijy/PdGV7E6RHA7SUrbSK4zbyZ9WKai1hLRbBLR1q6rCtdu5tmgfUItGk7g2tYz6ieQG8KreqsP51LvukUkyzbVkWDu+1QazABbqBQEebk9biVfRBCDbtNd7LhG31f4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=R8X0U5iT; arc=none smtp.client-ip=209.85.208.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R8X0U5iT" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-6a3fda88184so689042a12.3 for ; Thu, 20 Aug 2026 14:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787262446; x=1787867246; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=S5ocIiFd6KFZwrrDp1pILTG65RoVNAY9CNuzSL/XjFc=; b=R8X0U5iTyj4YLJNTjwomSzEa8h/d3k39WKeb2xK+Nd3vlxRrfoM0l8A0W1YXtxlHjw bcK6UgBFuqojx+2ANek3YDsKBZT6nDEpXhjNYr+iE6C0HsYQ+Blxj58qHd28+e9iZVb3 ZYgqJxNO4aqmaFsUE9javw8AcoyFJjN/2NJzOxViBJ9nuhjFoxNjpTnE1kyCGT7VQQVi 8Ua3cz2dmLwDKbb4joBl0TU0uUsIZKXKaYoS8qsHUf7/NFDkcigXjEZ/XvyU30VhF4RQ bcvFDgpToid0bArLMAxri0QNAR5rk1Rx5diIJvUXDoW1fQJ8jjEBknYY6jX/Tky0zJSH ij1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787262446; x=1787867246; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=S5ocIiFd6KFZwrrDp1pILTG65RoVNAY9CNuzSL/XjFc=; b=j4Y9NRRlWmLkyfuJXQfinp7gn8qX+WlMWA+BM/IPgrOCGSUBJo3xIQS7Ni4MeKX4QK DDxo66SOj4SSqJLFaMYtu19bv33YXyqXSiUHLZBZwAb7yUtyzDth5QHr9DXqEQgizO7H yVoJzDlwzdMhrnjAb/KCqZweLpDbKVZVSVYjusfLLybIBb7IfIicXhGE+j/WKfJpjtLo eZ6pjuocUB1GJCwv4HSEaBQAH7wsxvpzorqz09tF3bBimIsVH5TlHv99brkqYX0V3iX3 ccTQzPwzdgKGD2iBwtWESoZudzwCfT2t7bg4xJsqbn+CSuzgtPObZPSZ6Rn9LiAFuhsG 4RQQ== X-Forwarded-Encrypted: i=1; AHgh+RqcT6b8QoUb8o+mwyqzQEkWfOkdV4vWwJgu5WsQ9sFBERkbujfBHuw1047IU+wmPmdwJT1Hvz2fycs85S0=@vger.kernel.org X-Gm-Message-State: AFuF++kGDdge9Etqpb/9+xdYrmbPxL4dQ6/AtzB1LNuSzpaK30mYdMPM dm4X9n2WWQzAzxdWo4XJIhAoe+1+exWfDObZExr+MIuj8vc/6+k1Zhdx X-Gm-Gg: AR+sD11cqXbX3Mwy47MwOczbBBBljS3Uc8YnK0eWLR/kWkmD3Uf6ZlJFESjmtv0qNgS UCghBAwjZ/cHsfPSniISMPltaVKjmZlmLNF4vXk+ZjGCssRX6BdgBy8PPPYwxxPxiy9dgva8N15 ORfXw0zBMLTCkINj0u3C5EKXSO44JsOG8lfsNmcBBZtBy5K3Q1w1kwG3tYQJGg2wRgMK/wdJpgP Bf7DCD68ce5fM114VyL9JEO1tki0rv8Xjb6PBz889iCp3FDD36YYa0cxRunOxlPeB7HV36oUSkj sz9YumfZ3pkaKcwzCpsK+EKMY2N8psrPeIlH2tbRW7+J7SCf4t+ruYWBrWhMnp6KD652n56dzZ6 6nSUYkheOu09cJUvu1m8OWPJDI6821f6v1lwIL+VpfkretP0I1EabHUovwRXzHYw8GBX2n/u5je RHVFOJfKnXSuozp6s3lmBpcaKsVZdU+hluuU9FZwYu718HeTNaAjjTw57251GFdEW5goRggIjxu 9cA5kavHcrSB9k5wxhyj5r0ULukW9n41IoA0v5cgkC+Ezkqv8i9X9oMFA== X-Received: by 2002:a05:6402:24c8:b0:6a3:f4fe:9d5f with SMTP id 4fb4d7f45d1cf-6a42f1a34e6mr1355647a12.11.1787262445589; Thu, 20 Aug 2026 14:47:25 -0700 (PDT) Received: from GOLDENAXE.office-radnicka.localarea.network (c82-214-103-74.loc.akton.net. [82.214.103.74]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a3ff1563c5sm3288724a12.14.2026.08.20.14.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2026 14:47:25 -0700 (PDT) From: Bruno Banelli To: Michael Turquette , Stephen Boyd Cc: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Ben Peled , Miquel Raynal , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bruno Banelli Subject: [PATCH] clk: mvebu: ap806: fix legacy binding failing to probe Date: Thu, 20 Aug 2026 23:47:21 +0200 Message-ID: <20260820214721.11879-1-bbanelli@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Commit be69e55df9af ("clk: mvebu: ap806: Prepare the introduction of AP807 clock support") factored the probe path into ap806_syscon_common_probe() and added a test that picks the Sample at Reset decoding table from the device node's compatible string: if (of_device_is_compatible(pdev->dev.of_node, "marvell,ap806-clock")) { ret = ap806_get_sar_clocks(freq_mode, &cpuclk_freq, &dclk_freq); } else if (of_device_is_compatible(pdev->dev.of_node, "marvell,ap807-clock")) { ret = ap807_get_sar_clocks(freq_mode, &cpuclk_freq, &dclk_freq); } else { dev_err(dev, "compatible not supported\n"); return -EINVAL; } That is correct for the current binding, where the clock node carries "marvell,ap806-clock" or "marvell,ap807-clock". It is however also reached from ap806_syscon_legacy_probe(), whose device node carries "marvell,ap806-system-controller" and "syscon" - neither of the two compatibles being tested for. The legacy path therefore prints its three deprecation warnings and then fails unconditionally: marvell-ap806-system-controller f06f4000.system-controller: [Firmware Warn]: Using legacy device tree binding [Firmware Warn]: Update your device tree: [Firmware Warn]: This binding won't be supported in future kernel compatible not supported probe with driver marvell-ap806-system-controller failed, error -22 The AP806 system controller is the provider of the AP clocks, so no clock is registered at all and every consumer defers indefinitely. On an Armada 8040 that includes the console UART: platform f0512000.serial: deferred probe pending: platform: supplier f06f4000.system-controller not ready which turns the failure into an apparent silent hang once userspace starts, rather than a visible probe error. Before v5.4, ap806_syscon_common_probe() had no compatible test and went straight from reading Sample at Reset to decoding freq_mode, so the legacy binding did work. The commit introducing the test described itself as "No functional changes", ap806_syscon_legacy_of_match[] still advertises the legacy compatible, and the warnings above state only that the binding is deprecated. The breakage therefore looks unintentional. Accept the legacy compatible in the AP806 branch so that the legacy binding works again as it did before v5.4, keeping the deprecation warnings intact. Fixes: be69e55df9af ("clk: mvebu: ap806: Prepare the introduction of AP807 clock support") Signed-off-by: Bruno Banelli --- drivers/clk/mvebu/ap806-system-controller.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Found while booting mainline Linux with U-Boot's control FDT on a SolidRun MACCHIATObin (Armada 8040). U-Boot's arch/arm/dts/armada-ap80x.dtsi still uses the legacy binding, so any board booting Linux via U-Boot's EFI handover with the firmware-supplied FDT hits this. diff --git a/drivers/clk/mvebu/ap806-system-controller.c b/drivers/clk/mvebu/ap806-system-controller.c index 948bd1e71aea..332e7c21ea07 100644 --- a/drivers/clk/mvebu/ap806-system-controller.c +++ b/drivers/clk/mvebu/ap806-system-controller.c @@ -152,7 +152,9 @@ static int ap806_syscon_common_probe(struct platform_device *pdev, freq_mode = reg & AP806_SAR_CLKFREQ_MODE_MASK; if (of_device_is_compatible(pdev->dev.of_node, - "marvell,ap806-clock")) { + "marvell,ap806-clock") || + of_device_is_compatible(pdev->dev.of_node, + "marvell,ap806-system-controller")) { ret = ap806_get_sar_clocks(freq_mode, &cpuclk_freq, &dclk_freq); } else if (of_device_is_compatible(pdev->dev.of_node, "marvell,ap807-clock")) { -- 2.43.0