From nobody Wed Feb 11 09:19:16 2026 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 DDB43350297 for ; Wed, 29 Oct 2025 17:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761758833; cv=none; b=USFGexs+c/A2kZfBPJQ8efyLy/IjPlLe4GVUim8Mvop8cbagkaxgcNeuCYHEMSy6oHzDew47x6N4i3lESU11+ViE4Cyd6rwYMMdzDQT13adB4Hybhawx6kgb9Gs173xftopJ8uLG+2DZ2rc51K97SQz3Ep19CwRvu4YWDNgcgQI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761758833; c=relaxed/simple; bh=ublZXiwdKoY00f9XPGws+wBdMsEf+N9ZiS2fyMTJqV0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=H4XLhSkI8TwBK4Wfd4kMnxs55r8hW+I0uFtuEgSe3Q3bSIDOXKZkV0HFLaf2YOMKnDoZxRhk5PvYcm8bhCKzTVpc+sc+1Gwm9faUGjcxzsBbmOmHXXD96hnzgcp/1Qm81sU73ErTlU+twTZyg2XsOsgdrI1K3iTjZoxs+448tzs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PPeqo9/A; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PPeqo9/A" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-42966ce6dbdso84620f8f.0 for ; Wed, 29 Oct 2025 10:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761758830; x=1762363630; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=2Ia7dy7OugzoaAdNmxRXs6VrxDzNCl9Ybf9VuqbvbOU=; b=PPeqo9/ApuJLe54IwDv2W/cmnB9hjjtLv7IDp2MlxOIUkW4kTaZ65jhy7yROVGib3I FkBxYQzOIvcz5VrwK3x055m+DOXkus9ZO+XvkABJZsKEkyHuELxKWdPuXKa8gmzNCnFg QIDOsFJj30K8mxodouBhGoVGfmocPwPVWgTDmRvPENHLgK3EW88VIANh+ddZ3r6U/u1e h+PmAn2GIatEyz80Toz/sts1i39+gvqvYevQNW2dRbCcALQVlLWP/tQdlmzG0P+1Aapp VTXzor56PFRnBrmSIyqQXLTCXIdH4/qkgTsoxx+TognTzxq6FV26gH+19NFNamSF5F2T HySQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761758830; x=1762363630; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2Ia7dy7OugzoaAdNmxRXs6VrxDzNCl9Ybf9VuqbvbOU=; b=bqviQXjgHCFrK+tX2IBd7wD8y0yijuq9WWK4K9YOxK+HQG9UO8TkLtTuvoHA1CpUj8 QwOz+z6kQdFWaX8zm++OoKiUjeNZhYvJjTTz8pqJpPHnkTjr75NUd4rJ3iTo1VSUOkhD DEnUZVrNwv6gJO0TMnc8Z1q1XwcoKEuFBthaj3H+/+0tjiFkdU5J67HWhvNn3i+No5/D Kw38A4ujJxMRNL3WKZk1e0tTQmzrD7y6dwYNNnbP/Q52dk3KayVXL+I8Ne/BNtSNC3zV /hWwr6qaOdDhWlBK3z8tFWIeYbPbz/RqMo+5zqiFAH6JXE9cYPydMRNSNbdK+Aja2v1I 3HIA== X-Forwarded-Encrypted: i=1; AJvYcCW9bgX9SYNbQrY073xNT46m2YixqxIefBquZXshO60LtqbfFjyZz+bcVNqEp6hNhx+OaDaApheTNTbIabQ=@vger.kernel.org X-Gm-Message-State: AOJu0YwCnAEVSX2Kas03CZPK+skrjcw90vbrV9hfQXip7kSZnVuhYTid 2+aWCN1eMWnUv/cF31Jf3MZiTSn510vzX3JNCzGx1u3ha42Um2js0+blb87ffeBGrwI= X-Gm-Gg: ASbGncvlUUtyoh/cqPijkxostRQF/utC4EX7+AnO4NguJNvn7dQHADqcfn3B9ak4GRn a7BHEfreIRaPpKVF8GvyAVX+if4HJQXfO58wlzzf1ILqddnbb107KE+/2XSCNh5W8SEB9xHwqTH k/CmO9EpjsbArckpqCCUGfd5AL+AlQSu4C3hbXogpVkg7clnMRYpTUIJCnvlqce3eLYWSbhO2HQ ciSeLNKQ/3925sadw4w1bExVrGj+dsFtyl4GZuWOYcVb9jV6phvGUhM8Lubwj+0RvTJN/u9Q0Hr Eak4nRLYsVoY0qlQVR+ztq9vATcIBnK54ppO8Mq4pX1I0oPVIqOeUWYImdeMuQScC8AzIMWjSdm NB3jktILOHNMRC+FmdFCcIwbxlEmppiyEqzj1YFsYIsjrP75jw3bgqwk/Vwf43dp9RgftHqB9pH Lr08w7z9ECg21CsYRg X-Google-Smtp-Source: AGHT+IGJ3IMd1rSv4GAClinjHOiEReAmo/f52Hk4MgE0Q6oLLDOo6tjGWO/OOryyv4rktxjVDV+Nhw== X-Received: by 2002:a05:6000:2388:b0:425:86ca:98c with SMTP id ffacd0b85a97d-429b4c8cbabmr389095f8f.28.1761758830020; Wed, 29 Oct 2025 10:27:10 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-429952cbc55sm28319303f8f.10.2025.10.29.10.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 10:27:09 -0700 (PDT) Date: Wed, 29 Oct 2025 20:27:05 +0300 From: Dan Carpenter To: Lee Jones Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: mfd: syscon: introduce no-auto-mmio property for syscons Message-ID: <230cf12861a4f0b9effc72522444d3e28c1de2c9.1761753288.git.dan.carpenter@linaro.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Generally, syscons are created automatically and accessed direclty via MMIO however sometimes syscons might only be accessible from the secure partition or through SCMI etc. Introduce the no-auto-mmio property to tell the operating system that the syscon needs to be handled manually. Signed-off-by: Dan Carpenter Acked-by: Rob Herring (Arm) Reviewed-by: Arnd Bergmann Reviewed-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/mfd/syscon.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentat= ion/devicetree/bindings/mfd/syscon.yaml index 657c38175fba..a0ad12ae0bee 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml @@ -245,6 +245,10 @@ properties: resets: maxItems: 1 =20 + no-auto-mmio: + type: boolean + description: Prevents the syscon from being created automatically + required: - compatible - reg --=20 2.51.0 From nobody Wed Feb 11 09:19:16 2026 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.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 740ED34F461 for ; Wed, 29 Oct 2025 17:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761758838; cv=none; b=Tx9ujNTQcrtd5N1fSC4r4xTcobM1fK7nSaZ3SrN4ulnqC0g+rUh9KmpiollUUYn4gToVKaUrPq5SOn3ltqUzT7vgNcpEuqgsIX+4KCZFXDyisrQEn2H0kxYbpasesD8phIBn5wDdWqq84/zxjvdTDA3nDbX4Lh2XrrMHJJ5NLng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761758838; c=relaxed/simple; bh=UQrZCV0Pxucy/paO9oIYk44QqsywogrGoVLEjPeYwYA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PF1A13XXe6I42qeNqkdzHrcgqau294z4R4Tk0yeGPVOS9qpxcJ1kBRHaTmxA6sJrwbSIch9y9k6G4/f7VTh5eNz+vWY3fMrTaCrxhUlrNQ+c3puV3kL6P4gv6PJqmj+N+ZhKSUMZYsthE1mLSygsygTBwB1f4Jxg5kuzfe4q3ng= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=wJG7nB8o; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wJG7nB8o" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-3ee130237a8so94196f8f.0 for ; Wed, 29 Oct 2025 10:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1761758835; x=1762363635; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LERQGbpK6sWnegCCieprtsVkNrIrpJVXxod/FzSq1lk=; b=wJG7nB8oT2/2KNvwn1h952p1IAmFdEQ8YWK/pbOxkyeokvqCX/bmF/0M6nXGf7xJXF Owj/abnKfQxZkSjHviLn1erA4RLG+/HTwSVSodMAUjXddbRvi+QAr4zUF4atjeSR7NI/ ycxixns0xnVwwGUgi88G03DzAWM2BaggOAolZhCEF4r1FxElIFDukiXsebLqUaGFieLe cLxN8pGRDQpwXZKO4hrNfB3an57/y5WHQ3miKUG4L/lAdQhx5S+7olD4MNC4iBHJ9VG9 Z3dRlTNpm8YBzYdIKT5RCtroyfpo7csegul22hi/5H53GUsYr1B4mnqYusDvwjkwvscc ZN8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761758835; x=1762363635; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LERQGbpK6sWnegCCieprtsVkNrIrpJVXxod/FzSq1lk=; b=NpvHKGcyXvjGwQhB2gaU/C5+MpDMVygKDxICNYUsnnqlyifsjwXDD1hmuBwX934SBN VW7a8pQlVAsKlz2ngOqV3wAzyERPYrkGaabJfayyWiWgLaaItTRenmIBu4reDJIB/POU 1bdBf4rCL0Cz80he7T9aI1XC6DfompZphrWVxmXKTHojUU8ucbMuUxEjCj7+k9H/zD5g 2isYx9Wp0K8BMypClWkogJxeEVyyU6YOT1g3+raB0CrgoCgeQUqruaOCmzRbFsTrfXXi K5UFWe1XFmVSernrYH1rjWts9MRWzlzLfPlkcyxzKPdUYoVMUjYnu++w/SbyZR6IO0eo tNlg== X-Forwarded-Encrypted: i=1; AJvYcCVkysaM0nu3biKqFGCIswRGdX1NIdvOFWd3QZxI9F6k4y793CM8PeRV6nMBGS4r6mZwyExUep9QLmrevqs=@vger.kernel.org X-Gm-Message-State: AOJu0YxqbBmyv+8lWqPU52lW5Mbgt6iVJHYEpbdbugLo7Uqg8G4aTSNg CTf42M5+3xvxVQwucjIe8YiLI4B5xFbnLu70cOkbuvzrQG4akOoNuf4+o1luA48iZns= X-Gm-Gg: ASbGncvstUR1BM0tIJB+51JKmUkJkSxyNbVJRsWyDNE3OeiDRDQITsGIRZTT8A5uwnV 6YIf2qKhbmJljH44fNPQen3v09lHilwEHV73BNOGKIV7VqAr/D1npfUZr538Osst1iwTcPAH6oh KzuJ9Bl+9n+b7ZUDrg8JHEPbZIav35rfxDxqqpAXLjRs40bSIQpAl3JNYLXNZblKJIPsW6lkZfl aeA/cifQ7635sfjV6WvFYEovWq3igNKodMmCcn6WjFYUJWgr8bV8tL3sOS/Ft+HpZ1ajpOwHKDJ +S3QkYZ6P1KGg42x/IvCQZr2LbwByPC3yA5H/jhQzOXcgg4zMhGWwCuUR3HXxEaT35oInAfZKva 2iHzZ1YKXB+yJnvCiZP13v9lLVTvtWz/YcMBUghyirEWxEj+qkhYDMhRkqhtxFAX1sme27KElrP f3HaREAvRaiw9AtLcy/Pa3Fx7jlJw= X-Google-Smtp-Source: AGHT+IGxe4jpxUouMWLVsRenjuSxsjsZQUPcxK4QeyI1E3yc3B3LTUrsFOqkuU1/nPk4T3qkDUAkIA== X-Received: by 2002:a05:6000:1863:b0:3df:c5e3:55f8 with SMTP id ffacd0b85a97d-429aefccbc6mr2723649f8f.54.1761758834656; Wed, 29 Oct 2025 10:27:14 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4771906714dsm46330015e9.13.2025.10.29.10.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 10:27:14 -0700 (PDT) Date: Wed, 29 Oct 2025 20:27:10 +0300 From: Dan Carpenter To: Lee Jones Cc: Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] mfd: syscon: Don't auto create "no-auto-mmio" syscons Message-ID: <5d94d26b71dc74c6891a2c2b22fcee879e3737b1.1761753288.git.dan.carpenter@linaro.org> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Most syscons are created automaticall and accessed via MMIO. However, some syscons can only be accessed via a custom regmap because they are only accessible via the secure partition or via SCMI etc. We register these custom syscons by calling the of_syscon_register_regmap() function. However, the problem is that syscons are generally used by looking up the phandle and if the syscon does not exist it is automatically created as an MMIO syscon. This creates an ordering problem where we need to register the syscon before any other driver looks up a phandle. The fix is to add a "no-auto-mmio" property to the device tree. That will prevent the syscon from being created as an MMIO syscon. When the driver looks up the phandle it will get -EPROBE_DEFER if the syscon has not been registered yet. Signed-off-by: Dan Carpenter Acked-by: Rob Herring (Arm) Reviewed-by: Arnd Bergmann Reviewed-by: Chen-Yu Tsai --- drivers/mfd/syscon.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index ae71a2710bed..063526f039d0 100644 --- a/drivers/mfd/syscon.c +++ b/drivers/mfd/syscon.c @@ -183,7 +183,7 @@ static struct regmap *device_node_get_regmap(struct dev= ice_node *np, if (create_regmap) syscon =3D of_syscon_register(np, check_res); else - syscon =3D ERR_PTR(-EINVAL); + syscon =3D ERR_PTR(-EPROBE_DEFER); } mutex_unlock(&syscon_list_lock); =20 @@ -271,7 +271,13 @@ EXPORT_SYMBOL_GPL(device_node_to_regmap); */ struct regmap *syscon_node_to_regmap(struct device_node *np) { - return device_node_get_regmap(np, of_device_is_compatible(np, "syscon"), = true); + bool create =3D false; + + if (of_device_is_compatible(np, "syscon") && + !of_get_property(np, "no-auto-mmio", NULL)) + create =3D true; + + return device_node_get_regmap(np, create, true); } EXPORT_SYMBOL_GPL(syscon_node_to_regmap); =20 --=20 2.51.0