From patchwork Mon Oct 28 10:25:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3592 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7AE653F338 for ; Mon, 28 Oct 2024 11:26:14 +0100 (CET) Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539ebb67c28sf2662228e87.3 for ; Mon, 28 Oct 2024 03:26:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111174; cv=pass; d=google.com; s=arc-20240605; b=NYuZQOyq9nTd1afeLbmV9DbrV7/DG4cPQ3SZu6VN1Zw3XVB+3vZk/935eSEqzdSXE+ pPQPJ3J2RF8fyG4Qq01OGgrxPbQjxP1b51mqXZgEVW9MB/qXMgdetMHxE0xDRuJJZSRN 2yq4ye/889QLYjQSI6mbA8AEwhV55tyNmcNtCfHZ1LsPhIfNzrJ9Y4RMt0w5UUh+nfK/ 7vorPIIuETStL62TeG8ietBf9tl2jdFy4jIelAW6FR7g6KQyU0XNx2hs1uiATqnVC9TE MQ7dLSy10g5nfJkC4fY4DHPf/5aaKiBGr4tXDFw0/lYG2WCwLRisYp+pBLQq2DbXRjHG 3lpQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zBlT5RfxFi4GhBO4gYzvVd80ECn6Mws5OQfvYNtSI4A=; fh=s3ZCvQ+/3s/YbGfT2412t9ktazDdV7pmsBWNEJmFSb8=; b=Yt5FZJVSlB86wbFkL7/Wva2y0sAd2NEx6N1mx7O5CceoVfjexKJNfn6nbrEOsBhxJu gqJdqX+Ez51cIluZJT1Z9DHgV8dPTwnCwgumHuAySi+8FQ5JSbst9xv6s2JW7oXwxmD4 FUL2s414iLdmSn9MsWesK5Bm3e44B4wW1QVcUSa8+uNDkqmQ6tzh471TzO5yRDGw3/w8 2fl8p10RlnAieG4p4+L2Mh+mG66u4Vm5hVCVn5Qx27S7/qGZ9tDN37VTa+P1BTbUrYfU 5OgJ47kbXiqXv92FTWJzMLbPHbzfJuZ/oZi2epgj4fsnLNGYhl0Ci2+UMRKjiltKDfiF a9jA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=azwR668k; 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=1730111174; x=1730715974; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=zBlT5RfxFi4GhBO4gYzvVd80ECn6Mws5OQfvYNtSI4A=; b=m8IyT310IvXkZPeV3aBWmnfY5t+cKon5vIJG2iUbiDi9DSQOdoGPArfCWaXjfu5OoY CSRaPgBzGhXHmW09jBR98wno0ESE+ktZoGDZllDwdiUPVLmb4VLVV6TXYb/wDbyxJ1MK hK8sPhhfiEjjTc9AAZMID/MK3PxwngRUUTMQg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111174; x=1730715974; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zBlT5RfxFi4GhBO4gYzvVd80ECn6Mws5OQfvYNtSI4A=; b=aXwTl4QS6b/+q6o9riEiJ/p3btKKuj1Buev/ZSaw7OTS4y+yEUR0+sAZu3iAZdSGEu qsh0CaNSepql3cDftTid8je5ObIwcaqi4O4a5AhYGzwqx1aKBVTCFt4RVXcZIKLXV+uP g2SCAIPgKQYAYDCNerXaB6K+Y3fN+2/azD5brYZ+utJXlp1wB2bm/LnORKQsntYc8KR6 uBHGmrU5b5JzoxANSAA8OUByLqLeWF8ZDyqo78nXXYRHC2k9e9ATvgRWx7/MJGNbx1vs DXrUqc7sUzL3XfcsQ1akFHeMs3SNxK9sB8D+bq8fULAKF59jgQVd4OG3ybdZGD3gTwyc h+Cw== X-Forwarded-Encrypted: i=2; AJvYcCXO4AuZhUtBCUJ7mDNob6KSgk6ruzJieWLkdrhzp9B+5Jxce7IriVTeU4wsyPJLwHbJ0tZboGiqUKnOSvoS@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzHa5gPXH0t2gJnibYzxB9fp7oRJkRSpEyLfOsZoleNMYTuKnPh u1qMkn26EXYMemHLR4kpt9mxqdqu18qAo78IV7SLYBcxK5b85juBsi9IEGjY5C5vDg== X-Google-Smtp-Source: AGHT+IFxgm0JkdlVqP9yjSBLPVyijQpd0WppcnG/Uq98W6UnzMUxBbTdvoiFU9edpAgBcWCUaMouWg== X-Received: by 2002:a05:6512:1384:b0:536:a4e1:5fa2 with SMTP id 2adb3069b0e04-53b348de8c1mr2758408e87.26.1730111173444; Mon, 28 Oct 2024 03:26:13 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:10c6:b0:539:fc31:fc9a with SMTP id 2adb3069b0e04-53b213918c9ls95213e87.0.-pod-prod-06-eu; Mon, 28 Oct 2024 03:26:12 -0700 (PDT) X-Received: by 2002:a05:6512:2811:b0:535:6b9e:bcdd with SMTP id 2adb3069b0e04-53b348ebf93mr3063359e87.33.1730111171681; Mon, 28 Oct 2024 03:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111171; cv=none; d=google.com; s=arc-20240605; b=UGMHgNEhKRQLCsvz82Kz0GUt0bjgtCgXueyCrEvhb6b/7OS/nEkeRtsRqXzuXd52iW 7BWUX2bmH1R2xUeO/x5sz/S5IXxreoYRr9YW2G0yPEWvY/nFe7KOqVAWmtu8LBe30mO9 0cyzkfpUCOmblpEsDAjTvC5zsvSKprtbhrd7kJIhCs5sY3xkNH2agNcfPmmPZb90zugR N3CVwBiRWEarqW73XLkPDXBmp95sdFdVCKhU0L8rijyS6PS+s/xlhAb4aumosdE8uxOS TXv8Sua4Cq7OZzFRDpIr9HtBux54XYywvKd6M2UV7PcXZ2gAm8IW8vbNbuPLe6LG7mBp W2vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=vYexXqsopB/TorltyWtW3DQvmZVEoLO13n0GfiFkuag=; fh=nD842BF96KJ9rGCKKmmQBSphI3u3KaWY7TAsm6dMmNw=; b=e7ULgb3oe2+Yd07jeww7QAfjE/YkT4+bmDp5x49fxGtpPVa0J7iB6HShq7yF6vhwiv PDmGHWTteQXMOzJuNhrOSIJ8SWwUlaSbtFuRiDZUq42MB8yfnrjvL3WOuajhJpxhYL/h 22U4tO5G4pWLZ7Dp98cQtF2lsXA1jx0gzDaDfAhssQIdtwe4js+rLF66wyppb0FRyd7T k+m0njCYMhtJMYmd1lIdg61FnSs0nGoY1g8+qV5Z8wSy/KrnGvwRYuSTiC/7+CsDgcNP TtzP2blSnLJxLE9DZaJqOckolVWi8nCNoux0EYr7iPAVqZ7w3/Ktyh9m7fdYmQoHR+no uN8Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=azwR668k; 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 2adb3069b0e04-53b2e1cdc22sor1404194e87.22.2024.10.28.03.26.11 for (Google Transport Security); Mon, 28 Oct 2024 03:26:11 -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-Received: by 2002:ac2:4c46:0:b0:535:82eb:21d1 with SMTP id 2adb3069b0e04-53b34a3516cmr2517575e87.57.1730111171159; Mon, 28 Oct 2024 03:26:11 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:10 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Lucas Stach , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 01/10] dt-bindings: soc: imx-blk-ctrl: add 'fsl,power-domains-boot-on' property Date: Mon, 28 Oct 2024 11:25:24 +0100 Message-ID: <20241028102559.1451383-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=azwR668k; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This property lists the state of the power domains, indicating whether they have been left on or off by the bootloader/firmware. This information becomes relevant, for example, in the case of supporting the simple framebuffer. Signed-off-by: Dario Binacchi --- .../bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml index eeec9965b091..00aa0b8d8ea9 100644 --- a/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml +++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx8mn-disp-blk-ctrl.yaml @@ -56,6 +56,15 @@ properties: - const: csi-aclk - const: csi-pclk + fsl,power-domains-boot-on: + description: | + Provide the on/off (1/0) status of the power domains. It allows + specifying whether one or more power domains have already been + initialized and left powered on by the bootloader. + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 5 + maxItems: 5 + required: - compatible - reg From patchwork Mon Oct 28 10:25:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3593 Return-Path: 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 571C33F338 for ; Mon, 28 Oct 2024 11:26:15 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5cbb0b2c6e8sf2153523a12.0 for ; Mon, 28 Oct 2024 03:26:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111175; cv=pass; d=google.com; s=arc-20240605; b=EqQyYD5IFb0LpWZaSSDUpWqTn1lTQmeIlpF9NagG3U5QtLTlb4QSSR9Q4Ri3PoXR5M AmZnPDLj1hFYwZz1KVWqTQlLK8/oWPuU5LVOAkoFPvpVc19WGsN8csbgIN/yswhzmExD /v8ycqZ+foGAFnvmRDpYsCX0XmCWAWzog7khfhS6esCnQtV1/kRpZOYFOKnB/9VA77uJ SEhC/9WskZnEFH09qv9YsK40eLSXrYtvJCqblCU6SxOjJjjwId32vDJvSFVtcpxAOhVL A1wu9sgKzpv4SBowyzgPz/BFvA3WvyumO13uS19Cfi2FSs0NJ5YwHHbO+LeTj2A52MY0 bwfw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Bm4/dxyhe3GBXJsO+CGWz0hY9MjzhHmAsfv9r9xjF9A=; fh=3pv0GCGjNnwC0RSypNBWnhulyda9NoCkdRHDeATK6KY=; b=VgNd+wKJj7A9CznPeNHklygZY+MODD/fjIgX11F11j/aForqP+uCkGEw2usHghtnYe I3VFDSw04iHlAKbSBTaOvZtmsEohGl4iDLWDcdH1Ako52qUAB6HE8Trk7qRvdx0nObdK FnaWU+mC2QWwxwBOCdlUbIOm8SGqrYMCcpBkm1ONftcwuT2HBffnWuyb1gA0BWVv+IYU BSy6Pun5O+tsbWnbtKX4FRjNKocqF/JKwGXaQvAg+b2TnSNQbTSdTIfvYbInjgykwhHh 5pyxLb/4Nd4HZV7om/cK8iCFKe3G1/QGwlTjFJ79dSnmM2VcyADEUBNG8FfShSh4YisZ hJeg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=R8MrJ+6K; 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=1730111175; x=1730715975; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Bm4/dxyhe3GBXJsO+CGWz0hY9MjzhHmAsfv9r9xjF9A=; b=jMezA6iGSEkehJXZgaqO7HArOSH+SLIZbuMdQf6WkscrKf59QunfmlCk2IGGKn3y1z lHUZ32VEt6rPxdDjXA78CEksos02slx1gKS6Df75VQWi10boFdtIvDNOsPwThRUJRzGv Ka89bU+mhhgJRD8ktTA3KIA/RPw1LSFUrk6gM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111175; x=1730715975; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Bm4/dxyhe3GBXJsO+CGWz0hY9MjzhHmAsfv9r9xjF9A=; b=aDCa6HD4e4PAOaorzvnge6qXm8ILl4XDMCB3NwipYV2dvm7WgiIigI6WKOfJTfJ9AN 8tRVf4MFzQYm4C1tXigJtV5kwj74K+TOpnW6WYJlHskCuvXf2trA2o1FO3DqIVIIeiQM feOVNTGL/Bk9LO1ZHU/zbIGLLNSqvhSFAyytGRam//HLV3c6bbXNAHhyE36Vk3gpynjj 6yVeTREYLP3lmTO0axGCGFovYFHPddPuKaWI6rXhPwn8pFBSjl1s3ijDkPfDa1BlwyqC 85WZNBhn4EZP+cbfHdqzWLZhkrDginIyYpWp7MJ90T6qMeWnn375f+p0i75cUaq6t21V ZeKg== X-Forwarded-Encrypted: i=2; AJvYcCWUU+/GdIzXanqhns5YARwQBaXdr/WBCl/U046wmpfgD9myvjdI+r9TtNWMApyfZ0JwvpRhdiym3nggqYFt@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwZVTfOlPuBJI5Mfmrj5KUCJfEvqZbV0spm6STPan79BVaw0q2W U5aZ4Jf9QsWACdF515T0O6a9x9ZFxRtfabAolUSDLgvjLjaEEpi8Z0tHVWXLnw4Lcg== X-Google-Smtp-Source: AGHT+IFBBKnm2Kcv57HQ77IzATIyzy3aUfxFTUlz9F/khtCwLYa1mlPptlTq+y0Cagz3Y6DVhe4AcQ== X-Received: by 2002:a05:6402:524c:b0:5c9:7e10:4fc5 with SMTP id 4fb4d7f45d1cf-5cbbfa93ce0mr5526815a12.30.1730111174916; Mon, 28 Oct 2024 03:26:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5245:b0:5c9:85d4:d942 with SMTP id 4fb4d7f45d1cf-5cb99882f5els99414a12.0.-pod-prod-02-eu; Mon, 28 Oct 2024 03:26:13 -0700 (PDT) X-Received: by 2002:a17:907:3da4:b0:a99:f77f:b489 with SMTP id a640c23a62f3a-a9de619eb04mr746793666b.43.1730111173294; Mon, 28 Oct 2024 03:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111173; cv=none; d=google.com; s=arc-20240605; b=lkWoAXpWYYDvRatpixTf+UGDsOkPc0aliTNwdyj5ZQNB4qCJWS76a8ETF/EQzEpZt5 fwtEaEJu4kS1uOhDZmYJX68U7Yvf9aTi7J5Njh+Vw7N/4gDAiZOjCyKmDSawZ1zySUYO GRbufHBQ2u6YTe9N9EHg9Kh7SdxdjLuOR4aNzodNHGOcH+zbIlQM/4FrYZfk1CjNlFM1 xNPY1w08foq6GgDsmkk7w30ELEVunLfkVJV/r9SJqYwqvek5OnLk87W7PNneHOIqZVOa QApS3Tkj10h3oDzBAQIPHi/n3Ya7PkVwwNs/UAYdUn6jf8ob0QJbd+opFVYYRBz5ld5h AiRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ErPoXh63XrcFWpHe9zG8v9aPuGfFzlqWX+d+j6TRc4A=; fh=+53FcJ8iShPe8LYolsw1afMZMD14hl7RdVueLqfhGeI=; b=gIeFYtA0hiZlzsfviXjKie/pJTTtFmXLlmzSDG9v4tD+eXYiQGM6REUSNylGCpNBVr evrBjfFRvK/ttrLzo5LrGnc6U/gD9aOwskAHLSSSe7eKUGEl8COkmRWcsAniUPne+hjs 0uGVdiyyYqv8YERo88zSsC8+8mM96ILaAFjbQqK/lSOdL2NrvyixsxDiSRTvbY0/R5/v BLwUtRFRLcAtb+0G5na+xuhFL7aTt8GPnop9imV2JbPrr5jdGY17rDJR9GmsV9ejJrpT PvL9OGzqDe3kbX52FRo3NCqBqA2sYhkjrDSsvw8sYEfkpidnzO59tAQr4Jm/5nmVkhew 0myg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=R8MrJ+6K; 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 a640c23a62f3a-a9b1f290efbsor259085466b.15.2024.10.28.03.26.13 for (Google Transport Security); Mon, 28 Oct 2024 03:26:13 -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-Received: by 2002:a17:907:9712:b0:a9a:2afc:e4d7 with SMTP id a640c23a62f3a-a9de619d18bmr803160866b.44.1730111172695; Mon, 28 Oct 2024 03:26:12 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:12 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , Fabio Estevam , Marek Vasut , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Ulf Hansson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [RFC PATCH 02/10] pmdomain: imx8m-blk-ctrl: don't turn on a power domain already on Date: Mon, 28 Oct 2024 11:25:25 +0100 Message-ID: <20241028102559.1451383-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=R8MrJ+6K; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch, by informing pm_genpd_init() with the "is_off" parameter that the power domain is already on, prevents the power_on() callback from being called, thus avoiding the unnecessary repetition of the hardware power-on procedure. This feature is crucial when supporting the simple framebuffer, as the power domains have already been initialized by the bootloader. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/pmdomain/imx/imx8m-blk-ctrl.c | 51 ++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/drivers/pmdomain/imx/imx8m-blk-ctrl.c b/drivers/pmdomain/imx/imx8m-blk-ctrl.c index ca942d7929c2..8dc1508571dd 100644 --- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c +++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c @@ -166,6 +166,24 @@ static int imx8m_blk_ctrl_power_off(struct generic_pm_domain *genpd) static struct lock_class_key blk_ctrl_genpd_lock_class; +static bool imx8m_blk_ctrl_is_off(struct device *dev, struct generic_pm_domain *genpd) +{ + struct device_node *node = dev->of_node; + struct imx8m_blk_ctrl_domain *domain = to_imx8m_blk_ctrl_domain(genpd); + const struct imx8m_blk_ctrl_domain_data *data = domain->data; + u32 boot_on; + int index; + + index = of_property_match_string(node, "power-domain-names", + data->gpc_name); + if (index < 0 || of_property_read_u32_index(node, + "fsl,power-domains-boot-on", + index, &boot_on)) + return true; + + return !boot_on; +} + static int imx8m_blk_ctrl_probe(struct platform_device *pdev) { const struct imx8m_blk_ctrl_data *bc_data; @@ -173,6 +191,8 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) struct imx8m_blk_ctrl *bc; void __iomem *base; int i, ret; + bool init_off; + bool *pm_runtime_cleanup; struct regmap_config regmap_config = { .reg_bits = 32, @@ -221,6 +241,11 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) "failed to attach power domain \"bus\"\n"); } + pm_runtime_cleanup = devm_kcalloc(dev, bc_data->num_domains, + sizeof(*pm_runtime_cleanup), GFP_KERNEL); + if (!pm_runtime_cleanup) + return -ENOMEM; + for (i = 0; i < bc_data->num_domains; i++) { const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i]; struct imx8m_blk_ctrl_domain *domain = &bc->domains[i]; @@ -274,7 +299,8 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) domain->genpd.power_off = imx8m_blk_ctrl_power_off; domain->bc = bc; - ret = pm_genpd_init(&domain->genpd, NULL, true); + init_off = imx8m_blk_ctrl_is_off(dev, &domain->genpd); + ret = pm_genpd_init(&domain->genpd, NULL, init_off); if (ret) { dev_err_probe(dev, ret, "failed to init power domain \"%s\"\n", @@ -283,6 +309,24 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) goto cleanup_pds; } + if (!init_off) { + ret = pm_runtime_get_sync(bc->bus_power_dev); + if (ret < 0) { + pm_runtime_put_noidle(bc->bus_power_dev); + dev_err_probe(dev, ret, "failed to power up bus domain\n"); + goto cleanup_pds; + } + + ret = pm_runtime_get_sync(domain->power_dev); + if (ret < 0) { + pm_runtime_put(bc->bus_power_dev); + dev_err_probe(dev, ret, "failed to power up peripheral domain\n"); + goto cleanup_pds; + } + + pm_runtime_cleanup[i] = true; + } + /* * We use runtime PM to trigger power on/off of the upstream GPC * domain, as a strict hierarchical parent/child power domain @@ -324,6 +368,11 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) of_genpd_del_provider(dev->of_node); cleanup_pds: for (i--; i >= 0; i--) { + if (pm_runtime_cleanup[i]) { + pm_runtime_put(bc->domains[i].power_dev); + pm_runtime_put(bc->bus_power_dev); + } + pm_genpd_remove(&bc->domains[i].genpd); dev_pm_domain_detach(bc->domains[i].power_dev, true); } From patchwork Mon Oct 28 10:25:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3594 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3090D3F338 for ; Mon, 28 Oct 2024 11:26:17 +0100 (CET) Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2fb58d1da8esf20175971fa.0 for ; Mon, 28 Oct 2024 03:26:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111176; cv=pass; d=google.com; s=arc-20240605; b=l3e8PzP79i1lMYKW8YTjRp84gvHmGz/TDktijbUBOcflswtsBaAWj0ifT0Pskyizc6 QgJKw/83bR4J3zjphjd5f3LCkwBiDg5TZzilj8GVop6M7q6SZRdX3CLiey4zRc8KijgK cgGv1MusHaxqgfrjCd6tvSUVG5lTk9HSjeSsmDVUE6plLhQQuBEv9+Mqy342BBNnvN91 vcQNUA4+BCVVAh0TSR5pGNmEU5KAlegu6C0zxCdY1wFH6ZNblS8nr6iTtNvTOLsfZNKV tBQqSKqQyTd6lavPSrpgsI5IGpfO21+eUubuLHoEkEG6GXDNccAbRFKl7DRDHnbAB62d wkdA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=AtH4kTAwaNyUugGfKoGJCwVyu4u1i/6GgtUmOcmBV/o=; fh=6cbleBdQf//o6TU87OpG+SyLDosVrNsHt/LtkEJjYAE=; b=BEwew4xccod7HzdHuHCC7at4MeYsUm83DjLym0xLIEC46rmWAlTtjrlmqvU27b73Wp BUgbDnHr+k6QDB2p17FC5gwtHrScgg1Xjk/bf9A1vtANw8QBzfpesiFfwrPNP+jOFdLq BJHeNaf6psg8abr4PTVL0v8gL8y1wFD+HT6AytRipFKHWRGql2l45T50rLg/BdUtA3vv SvCkKT9n/Mx6Iegoq0USlwF+f4tHZ8gEFm0kyni2Nnv2f91d2GL1+W0KHyDhSaJ9Gois zDHpigZgXJmfLlHkl41gJGM0ljKuCwLavw83eRZmG5rHKQnugP/6b2i4Jm/0ScuDb5uc yL/Q==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IAiqZ3uy; 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=1730111176; x=1730715976; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=AtH4kTAwaNyUugGfKoGJCwVyu4u1i/6GgtUmOcmBV/o=; b=m0NVchODAoFk/HgGd6/cEd3YEEKyhguObb8NrnumaLx+kl3+c/mvLCdULbYof3UMgK c2OsIg/koSi2X4tYpyCETbPU7aAu768XL6Uk3Ep/9DhaY7udkGtc+ipwT9Uzb60OBcnm JVoA8wr+0/rdX8F9wEomE8kGouETndx98RA6o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111176; x=1730715976; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AtH4kTAwaNyUugGfKoGJCwVyu4u1i/6GgtUmOcmBV/o=; b=JNbFJPLOa5rr6ENoRAjm2dGxHLB299FeCz2MCqxHE2HC2BjfU1by+MnqCsAiLnf3Qp F18005aiVnWxQbQOMqM4rjjviSW2owwibrhVleW8n17Ga2Z1uQZS2FEeJdlyBylmreo/ YrgKUhduHM1rmtXR5PYDTvGrlaKiAFgB4J9519poi8lsspUsPS7GS/Q06wAuK73laDD9 heVp97RfeUQqkRg7p6OcwIaTgMcmhiyZ5uFxTGYYmWAyCVoEyHLFkoe3DZ2d3xPagmv5 BkPNcNFSnc+Mi7S36QRLXjzZ5gdGA/eN9fDvp+tD7nm9RmEGdrkffgd2Q/ykkIP5KFTz uu+Q== X-Forwarded-Encrypted: i=2; AJvYcCWNJcKVFMhat7awEtSij8STc9+tQoLyDYCWl7er1qmqjzOS2dbS5u2ZwX1v+HnY5KIsGCQjD1mPsWKqUBpn@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwXZVHWj118kOOJ5HvYtp1d9FfjV1WwpUECFWbNuh7hDSWsKnVU P5tEmHZ7r1RRJlJhvkS/hnlrpQJOUNpdnx6paQ5P3UlTZvTXQ6fD0/vPfGVdWH8WjA== X-Google-Smtp-Source: AGHT+IFqcHW7fv5eIv3VKuXzIu5NiJpLH/4Rww6nnnrBw2PdKim9WdnCEuN8NMTI/DtvORE3MWOFRQ== X-Received: by 2002:a2e:a98e:0:b0:2fa:bad7:70fc with SMTP id 38308e7fff4ca-2fcbe08cf5fmr26685501fa.29.1730111176318; Mon, 28 Oct 2024 03:26:16 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:3482:b0:5c9:5ec3:e515 with SMTP id 4fb4d7f45d1cf-5cb998810f6ls170926a12.0.-pod-prod-06-eu; Mon, 28 Oct 2024 03:26:15 -0700 (PDT) X-Received: by 2002:a17:907:1a4e:b0:a99:4a8f:c83f with SMTP id a640c23a62f3a-a9e0fe786f4mr141493566b.5.1730111174735; Mon, 28 Oct 2024 03:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111174; cv=none; d=google.com; s=arc-20240605; b=SNef0/NjOMjgIYiHnyf/mDQtYTEjW4ZzKv29UnrX1rsuZyS1Dmp1pUFfuXBBEFeRUj qtR5GwQQQyZ4Em97dKnHRqjIRlHGj6eIszq76cePGjpXSZceEsyuFLKg/HI0E8KhEmDc PHUqjUr1td0UhNAN40y18wukULXFA8MK7pY5tqQfHCzjj/CjdmJZN91lr123OGs5tSJh OvWWszhLnkGzNx7K9ckYQ+hyn8BbeMem36pnBumqCb2kt2tAZ95OdQh9pg8Xzp7gzcdt xEMOGdyPKiGeTLVn8x0WFm8jSB781pQccHeYmi1OCv6sx1uHoiuEM/7shkgX/NKBZkT5 47Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3kjaoDHO/Cxmm9XfSkRfXuiq2XlHBj2nIJAqnJTFngw=; fh=km8pECTwVBPVVWRpYNxZBLl3pH4iJRuDCXYCB0f/1B8=; b=jlRPB8FkkknczyO0BM1gSXKU3Tqcg5Hil+cHExYsX1TbCgITk0BwVFu8/bwBGrp8tW cfVctFJ+sswt8h8A3he1SVmFkltc9xZM4hqSmnSM26cHq7o6JZXL7juVXh5S69zQVkZK SGjNJGAPxbpI++PoW2POS9Fzh8gpbn/3S5S+WcASm3w1ht9/V2+k/HERoaNF7Y4YPp7U /GpTe6xmws/Zb7lA4K6K+PzZCA/GbDNXmgxftGCJmxIwlJVoQLrFl/jzzzwAiEKPeSVu 7LJ9GP8vsAOATkboZfsu+c2Nm26nCgu57ThZ1uIUsBvLRGMH7nFq18G/68BQO9+y2BF9 57Yg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=IAiqZ3uy; 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 a640c23a62f3a-a9b1f23dff0sor255412166b.9.2024.10.28.03.26.14 for (Google Transport Security); Mon, 28 Oct 2024 03:26:14 -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-Received: by 2002:a17:907:9721:b0:a99:89bd:d84a with SMTP id a640c23a62f3a-a9de5ee107dmr668398566b.25.1730111174240; Mon, 28 Oct 2024 03:26:14 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:13 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Andrey Smirnov , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 03/10] dt-bindings: power: gpcv2: add 'fsl,boot-on' property Date: Mon, 28 Oct 2024 11:25:26 +0100 Message-ID: <20241028102559.1451383-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=IAiqZ3uy; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The property states that the power-domain has been initialized and left on by the bootloader/firmware. This information becomes relevant, for example, in the case of supporting the simple framebuffer. Signed-off-by: Dario Binacchi --- Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml index dfdb8dfb6b65..718196f516ad 100644 --- a/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml +++ b/Documentation/devicetree/bindings/power/fsl,imx-gpcv2.yaml @@ -94,6 +94,12 @@ properties: minItems: 1 maxItems: 4 + fsl,boot-on: + description: | + The power-domain has been initialized and left on by the + bootloader/firmware. + type: boolean + required: - '#power-domain-cells' - reg From patchwork Mon Oct 28 10:25:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3595 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4F47C3F338 for ; Mon, 28 Oct 2024 11:26:18 +0100 (CET) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5c92e8b8101sf3029818a12.2 for ; Mon, 28 Oct 2024 03:26:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111178; cv=pass; d=google.com; s=arc-20240605; b=So28C/Koreg0eTssORFYwLxiyDLrZYXmC+dIGo+Lb5o262daSC6qEyc39K1w+afYBY D+7wWQA39/ZByB2/SVgSiUp30yczbysl4TaRrwfdLiHzacyyx3qjXJHUMTJCxjgQJUSf LY1hyFjlNwnIf9GPjC8CCrEtUdh9rDocEoj3nxDRq2aldDFrni+Rlz/AAQwo9zp2Y87O Qfi8soPhkmFUGRv8Qqdkk7KYf3H4II+va+ldm5c5VYfjuJ6VnLYnBWm4XLRoUo4mP0gg qioMtfyL/PGHY6bGOtYOrKCzHr/b9ExBjlaGpa8TBwYZQKrYp+/N8sOVWKzouSsrq4MU SevA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=w2hKqSM9Nl8/jbvd9hp61HEGcobReW5nVzfdVwt2988=; fh=g35dbYIIBQEc0bjeGQy4GZHON+2BwLk9i/gn36BGbJ8=; b=Ww5gYzxgDy7zKKHh5/g9EW3dB9zQvfbOtnD/APVu6Tp01iaqzRG4XJjEgoOgZ/AZLu /6FJL0xQkFMJSfmwuW+Jz3J9V1zn41P4xEJ3zquroJNvkFvNarx9S0Sq0HMA8bqtPOry Qp4el5mUoobdVZ7y2BUOgBPIlZBGFQ5keeZyRHbRV5hbs7b9gfr307M1SY6HLtPsJ0eC 4KERfhLHWOB5ZHl3UFMhlitIPShb/pNKCTcO30QTPCf9C/ejEgaplvTtNO95mvEArMtN lBwyhxsajou2rykYjcfg9i8utqnc935xlBTy64M33qCS5rj6OYPs7/Glh+vakJhqsJKK Ar3A==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=co3oWLRC; 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=1730111178; x=1730715978; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=w2hKqSM9Nl8/jbvd9hp61HEGcobReW5nVzfdVwt2988=; b=Rijr3LRKX7hd6pLFFODJM+JqTfnVeojKKwEUWfvD8+F4peke8bAB0oOgyEUxlzLyNK tyzTOa7NW1BWMiaXL5Zd7Lyv/32ErdAtwj3s/U+nlslKKoskijKkKzckPN3akyhgbsPb DVRsM8KEqa1cVP9HrIO50yNdqRXbxj7/BgqhU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111178; x=1730715978; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=w2hKqSM9Nl8/jbvd9hp61HEGcobReW5nVzfdVwt2988=; b=mH7FyG0FqW9xpSdHpa6Wk7mdZVYaK5KWKetthDnkcshVY3y6Im8+IXgfnNoQCME0lq fxl0DzBgglacRvUD4CtIFdMsEjgIeDWRdGd7UuPCtObPP92fTaWu4qoCbOWfN9aitrhz YkGhNx6KQNXbjfB5MsCOMoU32aJYyV70rtXyrNO47ODto90+uC7iN4OpANulgOq//yFf 9e86vEwaA2tOm2ornKCLrEadMTMG1Wt2kDhpOl6SdaFzrK0TozybzvRN5aMa9lldaWC8 BxD3ttc94a58gyRuKr6wwJxR49xYtkMwlMgc2WqLlDte1TppVUfBnaCSzXhGZPhJ2rg3 WhQw== X-Forwarded-Encrypted: i=2; AJvYcCXTC9O/iCtHWUJr0er4uXFtOVI3TH83Puf3N9zB4ErhZVLsTdDqO4/JEUXS5YfhzuUBQOgHj8OnliBQNVpj@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yx40Nzgrrm2wg81XXg9S4TtT30Kx+LIdoSJCcRTDXoOt9TUc35W Bps6mtAt6z1RJPop5usrYspJQSbdimveJFKmyM7GrYvgh+vC+S3PfdPs+xnTo+zeZA== X-Google-Smtp-Source: AGHT+IG4GU+wWnBcJAC5blOQUh876pIA1pEjU8kwvUpFaLDN8cJfQ4TOVhTrkcl8jOrnYAxxFXkYng== X-Received: by 2002:a05:6402:35c3:b0:5ca:e4e:59e6 with SMTP id 4fb4d7f45d1cf-5cbbf94abcdmr7882765a12.27.1730111177918; Mon, 28 Oct 2024 03:26:17 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2112:b0:5c8:acf3:129a with SMTP id 4fb4d7f45d1cf-5cbce263341ls68143a12.1.-pod-prod-08-eu; Mon, 28 Oct 2024 03:26:16 -0700 (PDT) X-Received: by 2002:a17:907:7d93:b0:a9a:8a4:e079 with SMTP id a640c23a62f3a-a9de5edea84mr705299466b.31.1730111176396; Mon, 28 Oct 2024 03:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111176; cv=none; d=google.com; s=arc-20240605; b=OBrx/d89q+JiCS9aNcYW65SsA9ZpzszzFj7FcqLws9SiSjp8B+NEUZDaH2plndaq9X 00Hdt1qp6Rv7fNtFBlcypp6+CjGbMsn+cxXFSrR1+LH8Ps5c2nKCB3QthzMTLivvxkhP z3fjUxf0pREVlivBlcXX7BniBSaDLnp2QN6T5X6LSvglp9NsWnYrXNH8/+9Ikil+vefP RRiOlOgnBrdROdVSCzZrjXM6wHtiSJUB44rZ8tf4mrX9PRZ+TSTB9j/mEdF+69Mkd+9j JDoxmzTxs5u9KgnukG5CycG+hSv70lPMS9gLgbsFnh4L1W4nwRI/dbvL38E+PsZJg86Z LAvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3tF2Wj+vRMtC983z9w7XL42BV51oFEPPNHEhybEVd+Q=; fh=NcMBwwiNt23f9TqX7vGiZ69SyZyyIPIFh3O627JMfbU=; b=BoY90CK8hBIlNYEJABsR1gyacclkuqg/E41jOZmHRmgCjN6wx0HtS+cVC/RvOyHOIh WkLK0h89JsGxzdi2uN7XKzVTcGmGJQPQD8GH79netgbqae4N/3/AZMPvNqRuvq//UrUh 6lDxIJ16xUHaoDAiowpGziXQntXWd6nqwY2WvV5v7YzdQeSIgmEjDZl4L8IP48ox/9il HKa/lGZ6QR9/R+zuMgo15Bp7TVzR2gSjt5Os/TGTI+Il9w/rF7E95yipsrz/Uo2gKia7 6aSPFgAp9sXsn5mx5rKVMC4cN2MgtnzQcuMAHznaey9F1qDjts58Qv6ruT0Pu4SkmfEA zBbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=co3oWLRC; 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 a640c23a62f3a-a9b1ec51d1esor256272666b.6.2024.10.28.03.26.16 for (Google Transport Security); Mon, 28 Oct 2024 03:26:16 -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-Received: by 2002:a17:907:1c22:b0:a99:f1aa:a71f with SMTP id a640c23a62f3a-a9de5c90d49mr793546866b.11.1730111175841; Mon, 28 Oct 2024 03:26:15 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:15 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Shengjiu Wang , Ulf Hansson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [RFC PATCH 04/10] pmdomain: imx: gpcv2: don't turn on a power domain already on Date: Mon, 28 Oct 2024 11:25:27 +0100 Message-ID: <20241028102559.1451383-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=co3oWLRC; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch, by informing pm_genpd_init() with the "is_off" parameter that the power domain is already on, prevents the power_on() callback from being called, thus avoiding the unnecessary repetition of the hardware power-on procedure. This feature is crucial when supporting the simple framebuffer, as the power domains have already been initialized by the bootloader. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/pmdomain/imx/gpcv2.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/drivers/pmdomain/imx/gpcv2.c b/drivers/pmdomain/imx/gpcv2.c index 963d61c5af6d..bf9fe4af03c5 100644 --- a/drivers/pmdomain/imx/gpcv2.c +++ b/drivers/pmdomain/imx/gpcv2.c @@ -1324,6 +1324,7 @@ static const struct imx_pgc_domain_data imx8mn_pgc_domain_data = { static int imx_pgc_domain_probe(struct platform_device *pdev) { struct imx_pgc_domain *domain = pdev->dev.platform_data; + bool init_off; int ret; domain->dev = &pdev->dev; @@ -1354,12 +1355,33 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) regmap_update_bits(domain->regmap, domain->regs->map, domain->bits.map, domain->bits.map); - ret = pm_genpd_init(&domain->genpd, NULL, true); + init_off = !of_property_read_bool(domain->dev->of_node, + "fsl,boot-on"); + ret = pm_genpd_init(&domain->genpd, NULL, init_off); if (ret) { dev_err(domain->dev, "Failed to init power domain\n"); goto out_domain_unmap; } + if (!init_off) { + ret = pm_runtime_get_sync(domain->dev); + if (ret < 0) { + pm_runtime_put_noidle(domain->dev); + dev_err_probe(domain->dev, ret, "failed to power up bus domain\n"); + goto out_genpd_remove; + } + + if (domain->keep_clocks) { + ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); + if (ret) { + dev_err_probe(domain->dev, ret, + "failed to enable clocks for domain: %s\n", + domain->genpd.name); + goto out_pm_put; + } + } + } + if (IS_ENABLED(CONFIG_LOCKDEP) && of_property_read_bool(domain->dev->of_node, "power-domains")) lockdep_set_subclass(&domain->genpd.mlock, 1); @@ -1368,11 +1390,17 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) &domain->genpd); if (ret) { dev_err(domain->dev, "Failed to add genpd provider\n"); - goto out_genpd_remove; + goto out_clk_unprepare; } return 0; +out_clk_unprepare: + if (!init_off && domain->keep_clocks) + clk_bulk_disable_unprepare(domain->num_clks, domain->clks); +out_pm_put: + if (!init_off) + pm_runtime_put(domain->dev); out_genpd_remove: pm_genpd_remove(&domain->genpd); out_domain_unmap: From patchwork Mon Oct 28 10:25:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3596 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 403023F338 for ; Mon, 28 Oct 2024 11:26:20 +0100 (CET) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5c94862c3adsf3051139a12.3 for ; Mon, 28 Oct 2024 03:26:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111180; cv=pass; d=google.com; s=arc-20240605; b=ULHJKiKPqS9EdzV5a2NnVNF5Y5sfTbjdaN51tv/A9eGYdiEQm3Md1WYGY3dkIROIfC X1m8Dk7FM3mY2FvEpipfOcdAhI0g8uyMiJOCY/d1NqICKigEECQ0uqXZelxDVACusi1L EaBU1LFUJLVPZ7xcxgsJvuAZN5bPBRVzKfK2hBHO3HdKuI77k3keeOoYtcWPaxEbJ9FM X0LbGS3CSKTayzAyrVi4i9T69A8O9LTAPLwfqc9ZlbUNvbInEoo5f3phxLfwGmsZi4ex eJE0TPWq0xZigXgy/RDD1nu3T4vyBPn4UBnqzJl6h5w2CnuOpLmh72aWeBZlH1RXeOZG DLGQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=41dIuXU3fhXyj8D35TqVp+dm03xG02SYH6dSRRDvxiY=; fh=GvovgDvi4rEbgWJmT24t0gUtIESzv7THgGS8+aW4Bmk=; b=Lep24S1BDrx8lhygMja4IPO/gjEDvV2/Z233xJ9g2yjcBeQybud8thwCc+binr6WBp Fsn+1rhzIF2datDh/G/Xcj0IHe8B5xsWAIeYqaHdFiatPwDWgsSF3+IMKDQeiwEpAbjP ZPmYQMiWoxhzG3wUymFCPVy8kWXEBkDtZhsrxwmP1F3noiL+cSCbAwXGdgI7seFQ7kGr ZL1Ta8wpkClQiBfJELoB9nJnkCQjDuDS129hTrhXOf2NiCemBxtBzZ/kcwZV4ydHZ1Qg RxzggyajLg1luq0Bxqd+5Rz6Z5jx+LJXUGzy8nPQnBMWAAIr9cklq8iVU5+UUqoZ6ab6 sq1w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FKARXpAN; 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=1730111180; x=1730715980; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=41dIuXU3fhXyj8D35TqVp+dm03xG02SYH6dSRRDvxiY=; b=kAPD3xeoGl/WnfWRsiiC3+vm7KLUIYNl1+vaGlA/Y84ouefPF2genklG9asC4eOHJh Cr98EdQPMMudBeXkxh3hO+3Hrgu8DsMpEXUviVGaeFc2VaZezp17MhMOYqADjC2P6wxs Nb0c2JPTCDBPO3+O9d9kxgEzLYIn0858NkjQM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111180; x=1730715980; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=41dIuXU3fhXyj8D35TqVp+dm03xG02SYH6dSRRDvxiY=; b=CcjEwcQDnNAtVgAsfEu/ojnWcWMG/F6Xt1F00krAlEvyQKh7qZ0ukAwurO3qO0eUwI iGW9W5MqBPZp4WDICO6WaqYlGkYiTaPzr5wrcJaDWlt+5uSMS8WCBKPRkXsQ9Jz5CpgN ZZ8Ls1Yu8f1I2mxsvSp/8UTRxVKzmL1CzcBicWtc7aPBeQnVjolU/T/jLB/l4oSXs4tx WEMZb7IR9spvbBirX+L1xbCBhl7U8xmw6X7fWCjneo3PDz8fuA+YGhyLkHk/kgfJ/DI+ /tb1+JOxFfpPSRQabGF5HObmaHYvgWjoQX8bP6FPdjllay09UOTn02QsGDFKuh/B2f0o 9RmA== X-Forwarded-Encrypted: i=2; AJvYcCU9VBmrhlcM8/Ve+I/7uEyPpw2toOQY1h5jUXCFzb2YmJpm1f/72HW6P8auXmpEn+Ll5L09xRXqpj+jcT57@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwVJEBDQjfes7LagzRE4aXGOZ42mhVv+CmRRKVn/LeYe5APz3gS MUFjQW2ADCQPorc9SY9EyewAPdyEU4cVu5BH0b5qYau4e1GV99za+k9IdwvR5kHUiQ== X-Google-Smtp-Source: AGHT+IE/GbrgtmoNO4eu4fLAaBUDgxYsGxphXs+RH+utBIK4dAhvAalflWelFZAsa+YMSUH4dDkqOg== X-Received: by 2002:a05:6402:35c8:b0:5c9:704b:4255 with SMTP id 4fb4d7f45d1cf-5cbbf875bcbmr5747041a12.7.1730111179604; Mon, 28 Oct 2024 03:26:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:34ca:b0:5c8:9f3e:a9e1 with SMTP id 4fb4d7f45d1cf-5cb9987a694ls787334a12.0.-pod-prod-01-eu; Mon, 28 Oct 2024 03:26:18 -0700 (PDT) X-Received: by 2002:a17:906:da8e:b0:a99:f0f4:463d with SMTP id a640c23a62f3a-a9de5d6e1bbmr849714166b.26.1730111178000; Mon, 28 Oct 2024 03:26:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111177; cv=none; d=google.com; s=arc-20240605; b=k/QeD44Jh3UvBTBQI1H97sup9wvH058+7lY3q/eT1aVLnIUFvosAkvSWwyqCKqmazV iCzUJgJS+QthTCCMYqRT+Ey/Llgr1eR1BjMD1BxDnaMHlo2BF95V3Nh3181rGraCOpGJ bGDz1xlxf24KqUhMEeFILEVnhsuRSC6+uFXjm34CJuj728eESayI5xaHhCI8WhNm8s0Z fx0BUWE2sgG+ygTUsqSkQ7Zr4i2oZZ2sqUvRhe2qLQ2uuBKvTdmfeNRG5IoWW2cZ7/kK sfcuh5keIlmQNQbHfmFpui8SMAeiUXJXCDO8BMjgOszZtUiBja8k1F8TUmqDtI7WDFLR VDXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pgo/k+HOa5AvPj9A+1CCmgMfc+PmvaON+Q6yQ1cAi7o=; fh=43HzmDJlEzE6OQkf36NFuOgl/nEVm4R/BaX1TFAWdRY=; b=Zo1Eww6hFCEoU2akpUJPtvJjJaoHc0FyW+4xDh64cKkHSJWR6tWxwLYPQ/crXBFVQp I4a/Owg96XfqvamrCGiCslVHjxPyqnluv7RfWGykB8eGOc3bPZ8PCsA5LxukOeiE++D2 3NPWYxjA64mQBpxVkKlZXCGXlTxlWGYyYXaOE7QVZ22xhVO+9Lw5K0wz7u4sBEJHMMjy mJx+06J+fhs0vkAWt9cokZoFCvd1DAXFCHcgnxwfh8m3Qb7pUn8U/u383AjQmRDrmnGI WROWaArVrNhlfN9uvz6A6i31rXkpIEoCow5yIq2FhTQA9G63dEbzdYwQvGZYMpmWRxsF 0E3Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=FKARXpAN; 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 a640c23a62f3a-a9b1f0695cbsor260343966b.12.2024.10.28.03.26.17 for (Google Transport Security); Mon, 28 Oct 2024 03:26:17 -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-Received: by 2002:a17:907:7292:b0:a9a:d23:f8ca with SMTP id a640c23a62f3a-a9de5c92bfcmr611522566b.13.1730111177428; Mon, 28 Oct 2024 03:26:17 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:17 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , David Airlie , Jessica Zhang , Krzysztof Kozlowski , Maarten Lankhorst , Maxime Ripard , Michael Trimarchi , Neil Armstrong , Rob Herring , Simona Vetter , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [RFC PATCH 05/10] dt-bindings: display: panel: add 'syna,boot-on' property Date: Mon, 28 Oct 2024 11:25:28 +0100 Message-ID: <20241028102559.1451383-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=FKARXpAN; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The property states that the panel display has been initialized and left on by the bootloader. This information becomes relevant in the case of supporting the simple framebuffer. Signed-off-by: Dario Binacchi --- .../devicetree/bindings/display/panel/synaptics,r63353.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml b/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml index 2fd6e0ec3682..987fd6f8b866 100644 --- a/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml +++ b/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml @@ -25,6 +25,11 @@ properties: avdd-supply: true dvdd-supply: true + syna,boot-on: + description: | + The display has been initialized and left on by the bootloader/firmware. + type: boolean + required: - compatible - reg From patchwork Mon Oct 28 10:25:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3597 Return-Path: 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 51EDD3F338 for ; Mon, 28 Oct 2024 11:26:22 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c94ccfb210sf3049848a12.1 for ; Mon, 28 Oct 2024 03:26:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111182; cv=pass; d=google.com; s=arc-20240605; b=SrRL5Yyz8aAdOEfBMNuA3AuRnjOtsghe1BSTBLO0XKFGCFD7c00y3PfI0SduEpsroG TG52Be4Gs9YicrULpgP93fQwsPDgRpeC4rOnMv6/dMidlHW8z4lRD2sb6S4sf1z8N30B Z+RWNvluA7EFshGVWojJpDgyPakKMPpEcyeo3fCA+zSElQn3Ys5aaieFZPKNjZi+ihjt NaH/aV3DagfTsrJCD9E+L1ljzVa3skPM1wofK4Ny4Ak30asfwhsw1sYEr1JCrpcsQz8u yEIqlvK5syIFFPObgj9YSu4XDHiH1d9+TWa2OpbEvxIqEx8l9qc44ubxPNCEuim0v4te uyIw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zOD+XKFa4so8bYEryC/DA2N3C2Mf46G32G+KOwOZBtU=; fh=/ndRdYFUnv0rvbq+fJVvwVvQLocVC5/So0Sxmd4hxwM=; b=BnP7MXhG+2AkNe+gfxdfs9AnnTAQEyzRfJvC5AGK1L+RgL/ysw2YNm7sHm3kgT6yVp 9p4wo5njaH3a+0SyfYNbJaAwPNN+wHEGPgpxoClpD6foYoFuClhi3m6E2RqxRIy1u3wv Zdjioz042b+FMAAh8FkZqpJ1TGZPDNS5Gxf1sXRTw82tjlAJjVB8ONGwReNy3H/6itJH h6UKuW+l/l2/+j7+R/5tY1tf4QPqDwbwwuAgJipDeCdlKC+xQPMCZqgoO5/l84WzbiX/ cTc/KbItGhhp2gyJFrz3Bo26FZA0LCl4+H1dRh0RIXjurZh/J3Y69IPkMnMIEj6CbFxs YfPg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fm5tVav8; 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=1730111182; x=1730715982; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=zOD+XKFa4so8bYEryC/DA2N3C2Mf46G32G+KOwOZBtU=; b=ZCawvVwfk3CCS6ypSjkQ3PbbZYeojt4VmTLussoEyDXW0TK/RPTfsFl+29O4GFpHrl HqP2kx1uhQsN8Jc6QTM1vw5JO7aEr6zJ1mWpW7RoUaMYp78CWuT3jqorVBRtCqkkvKFK yAuyyEB7X1Le4jFgfjy79CF1Mc2i/k2vn/coM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111182; x=1730715982; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zOD+XKFa4so8bYEryC/DA2N3C2Mf46G32G+KOwOZBtU=; b=CGVNG157HJJuQFyZoyqLgwtLP6b3SXFaw7ACiynatBqtDm1c913To9YsnU9Z2pf3Um PstfYPl+2fzKWGhJM25/SYzfS+bGC0amO1BQ9dn/0bvsZubu9Exq8YLY2NQY43c/6pGW L6vr0VcFhZJWKeYb1yF/BEVM7qq1X6vbp/UYmQaHwSssQUraRzJHPwmHPY1ki5t6O37k 7Eg2B2If3wbFA2dmpD3RgdbUw+r++mraUE6dCQ4nba4ciBeGlGzbWGlEfGk/IOnV1zf+ kFSFhsPFEo+thHKGvDS3DYYk2iMX3GYViVZmzD9devZNzao1XEnlv6tOavm2pIAI9ibP +qDQ== X-Forwarded-Encrypted: i=2; AJvYcCUgsyzYA/XuzQxDVt15ebY76Mw0lmy1eLCM2EEvDZqDqrObI5kK6H5auhHXVKFkxckKLaP9czenWT9p+IEW@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yzl36B1MbhEcnAUQxU4Xjb1XJ1SiyUsrLDKuZqysdoTK8WNnvpY K+YaR48sEiOM/2DkSXxk9RtTOly4bMLCetBBaCY9o0w7BKKzSGjOmKqkR/Fwd6o1/g== X-Google-Smtp-Source: AGHT+IHqZIDxBK+0+w0ShGGGUNSH9YaL1lHtdpUQMfpvW6/dh9qWzw1KxJHJC31nck6hWCJUOTjj3w== X-Received: by 2002:a05:6402:13c7:b0:5c9:547d:99 with SMTP id 4fb4d7f45d1cf-5cbbf889742mr6667676a12.2.1730111181820; Mon, 28 Oct 2024 03:26:21 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:de15:0:b0:5cb:b8f6:d067 with SMTP id 4fb4d7f45d1cf-5cbb8f6d68dls64518a12.0.-pod-prod-08-eu; Mon, 28 Oct 2024 03:26:20 -0700 (PDT) X-Received: by 2002:a17:906:6a0e:b0:a9a:7f37:2b62 with SMTP id a640c23a62f3a-a9de6167b7emr838544066b.49.1730111180213; Mon, 28 Oct 2024 03:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111180; cv=none; d=google.com; s=arc-20240605; b=cmVS/x4u1YBoGf5zPCf4HKFc9+SxYiBbc6vD4pd8z7k08FGiTc3rRocpdjRL/nOQ4c udz9qDlZ3r5GFwc7T06eItbEPie5l4EpmUF/WfoS1VbjIgJ2OQkBqpRV7D2ZKflOYHNX X1KcUDml9FMncyjt+1qdptlpfbeUGVPJr2byATuMPFOYeEgGD2yAiCwiAxg2ABFD7iXk Wlne0nNUAGBmo4ClIwJxxxwvBUqlUPViZUmCCFY2MOunkBRXMah8C8zF3rDp4Nup25Ox cWsmuJ2AVQ6ixYsR4NwVTK/gx1C3K3dRidFxxJzNtIbsngmvDpBmmWjOUBAeOZrIti3F La7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=OXDPpN57LGyZzaHcm0JxAGhhGbbwxVltmDt3enjDY8Q=; fh=rV8VPXjxg+ksLKkkXkMtZg7CUZ5W2QvSbq7RG32ecb8=; b=iWddybGuvDYfKsHnXDlNZr84qsAMVqt6Pjp8k5lCYrREqREPL/CJwkvXzBkbO+WJcA 2GwhqJq9jWPtRJzxmSzTDgPdDruv7nglUiOYLVK5lC1Po9AEXpwCvUH42IqAXtUhTinm rfq+jsYi9irBu+spvwtLt7DVamlMJzrHxrFqy5/8FMTbxgsLPVEGHQ6Kyh3aVIP4Vr6V eat85sKPBuGsIqubSelnN/qlzP5eVLCZUAMS8qimbNdb/5SPrhZ3e5A4igUWsGaD5SXv SMg0bXqWDijIefqbJvhhECq+MiMGbV+aeuw7XjDqRNhxlM6OJ8jZITO659R/j1Z4axJL +jAQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fm5tVav8; 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 a640c23a62f3a-a9b1d442cdfsor250549866b.3.2024.10.28.03.26.20 for (Google Transport Security); Mon, 28 Oct 2024 03:26:20 -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-Received: by 2002:a17:907:72c2:b0:a99:f67c:2314 with SMTP id a640c23a62f3a-a9de5ee34d7mr848368866b.35.1730111178897; Mon, 28 Oct 2024 03:26:18 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:18 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Simona Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [RFC PATCH 06/10] drm/panel: synaptics-r63353: don't re-activate the panel if already setup Date: Mon, 28 Oct 2024 11:25:29 +0100 Message-ID: <20241028102559.1451383-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=Fm5tVav8; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch does not re-execute the hardware initialization/activation procedure for the panel if it is already operational. This feature is crucial when supporting the simple framebuffer, as the controller has already been initialized by the bootloader. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/gpu/drm/panel/panel-synaptics-r63353.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c index 169c629746c7..93e3ed545b34 100644 --- a/drivers/gpu/drm/panel/panel-synaptics-r63353.c +++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c @@ -258,6 +258,8 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) int ret = 0; struct device *dev = &dsi->dev; struct r63353_panel *panel; + bool initialized; + enum gpiod_flags rflags; panel = devm_kzalloc(&dsi->dev, sizeof(*panel), GFP_KERNEL); if (!panel) @@ -282,7 +284,9 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) if (IS_ERR(panel->avdd)) return PTR_ERR(panel->avdd); - panel->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); + initialized = of_property_read_bool(dev->of_node, "syna,boot-on"); + rflags = initialized ? GPIOD_ASIS : GPIOD_OUT_LOW; + panel->reset_gpio = devm_gpiod_get(dev, "reset", rflags); if (IS_ERR(panel->reset_gpio)) { dev_err(dev, "failed to get RESET GPIO\n"); return PTR_ERR(panel->reset_gpio); @@ -297,6 +301,10 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) return ret; drm_panel_add(&panel->base); + if (initialized) { + r63353_panel_power_on(panel); + panel->base.prepared = true; + } ret = mipi_dsi_attach(dsi); if (ret < 0) { From patchwork Mon Oct 28 10:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3598 Return-Path: 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 50F483F338 for ; Mon, 28 Oct 2024 11:26:24 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c94ccfb210sf3049863a12.1 for ; Mon, 28 Oct 2024 03:26:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111184; cv=pass; d=google.com; s=arc-20240605; b=P+B4MiCCP6WjmINrD4ap0C+VA/klUZlA1cPmppiB6TQpM1oXrc1bPgyDeQcGIZnwmv CN7pF5QrcJm4gwurxEQFy39bI8NY1Jdx0KC1YCTDjs+Ra+F/eQswRONBbVhZlGHj3Zs+ URspA8+PLg2siuN53mfukJVb7Iyxhnf0G9I9T0GjXruUnBPjUfdPDKKMElF2HAME+3Sq ykH4WVIsyoNUUqJvNG7Sn8ivaD1jKNsEnCvC3SHi5fddQffgsR6UKaaUk6fXrjJhrSk8 4hlHsqWstvlXJmUpx3LKSnl7OPnBs62q/L0Sn7ZCKAUv+kitkN9vnvRucl6UOVZvwP62 mNAw== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=RDQCwawYXR5CipdGfjILY9IiQEnDQcWjVDSvnhJblFM=; fh=stgKp5Yp3O6ilnpci2xdAQlOylwTch+4l/aBDkK1sGw=; b=ZcrX8i9SogIOCE05qLhVHjr1yDT3r1r5GACjBwXirBGTghxTAoX9vR/KR2EhTJY6/b QtCqo+WuUTzjDst6kV1sZfilVlgPTWtB84NRuocbY2TFZM6BhyuDu6R5I2pUeHICdM4P dVjJYO9A+gHCl65oztwvBuiPgr+Hz6P6g/6dn4z4XzdCHq5L+l9STZSZbh61k94fmoI4 suoOKFOwuUlqXFHtAaUFtTt6bpaUV+wPdVQuCkYxPutH4NVNnNQVUk478Y1eZ4BFV7HS OwFnJUz+CyrTKDjm1uY5SiCh7QyC6+HU7dDPMQewsyWdJ2DLwUk4zmE4sMJ00JVxohtK 97oA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AgNZwmi1; 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=1730111184; x=1730715984; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=RDQCwawYXR5CipdGfjILY9IiQEnDQcWjVDSvnhJblFM=; b=YVzkxa5uGPjPBJWP2AnITrBqpu0CNZT6/YqTlRxpfSmSwQyVclXRqkvJrC9d2mjD5y D+1Ah29YdqHOVPTsHmF7ZB8f7JWDjEOMqVpUthiNv+ai/CpPdoxcr9KIXT7tNlWS38xa zEfLKb3Wz4Q/zABCRsh7WHd1XV95ONFehFvmc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111184; x=1730715984; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RDQCwawYXR5CipdGfjILY9IiQEnDQcWjVDSvnhJblFM=; b=iwAmRKk7stB/k5f9yvWxWFNDFQ4QgcQAJGL37vmBOF2rEd/8+sC90YeiqoBEGJ4nlE zQ0x6tnX/X2NrF8TlxYgOlmvXR1jjAKVn61lm+esSks90LlYrG1m/X7t8mbM+LGUzNEh iDVQiBBlxcHkbbH97kFztgyzQm80lRZXOh0SiPDv2rRaOJn9VnI00OEsbhW5iGAIwp4/ rgvHjHi6SbaBa9+cSQ84wf/x5cwcFUPxG552O0V7rqU24zFwjlx6VRbQFDETBBuNzUoT 8PRVTS3lbVxPh8TpvLIqzOdGkQ5NyjNX03TXKZYouLg6C3JAIaFvH/makA4y4ArbjOAs UBgw== X-Forwarded-Encrypted: i=2; AJvYcCUGscKzrf+xKd7zjAcfnX6MAWd966RVVReg+Vd3a34tUV3aPs7iPxU6KnsUa/Zyj1/lNHRHXb9uvkkxEthm@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yw4Ps8fB8WqXxunfwmToc2+2M4maOmKNViC/kxHaxyP6y08x+dz mKQIZugZGJZ2gIKHxTOiJCkiF4PTI7vaceGcqCGcpc3daKkBlt+OoXZasj+Z4++hdw== X-Google-Smtp-Source: AGHT+IGfD8X5vMhm8miH+YV0t2EFxW2tTjCZ4gYfuV7S2lDDKQBlth8EsAxegoOZIAkCocCMk0619g== X-Received: by 2002:a05:6402:518d:b0:5cb:b65d:28c with SMTP id 4fb4d7f45d1cf-5cbbf94b623mr5106245a12.24.1730111183890; Mon, 28 Oct 2024 03:26:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2112:b0:5c8:acf3:129a with SMTP id 4fb4d7f45d1cf-5cbce263341ls68216a12.1.-pod-prod-08-eu; Mon, 28 Oct 2024 03:26:21 -0700 (PDT) X-Received: by 2002:a17:907:9723:b0:a9a:5b78:cddc with SMTP id a640c23a62f3a-a9de61bba35mr814964266b.64.1730111181303; Mon, 28 Oct 2024 03:26:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111181; cv=none; d=google.com; s=arc-20240605; b=BGkXkgy/tlOfroDWQiyBdCSxdbvoCsHJbeCTkMsJT3Q4y9fEkPqqcQ02xBqdpeEZfe aCnh68sF8hZcmP3WsCwPfj+XAbNSIs5rbf6fqS8vxYtfrxNDiVCqXtQpMaOhJrV3HrV/ 111abmtKk7f2olSi/gcQU76rFbwlvE2Tc55/vuTDmR86oQDE6K1IhthCa5nK1wMNkEGR ba5af5RTZBLEcC23SJA1ycl/vNe256cjRhyPuY2bSeasgV/KxFXavcveM+TlPdyizQch +cvTqJJyHFb8XS0UKeywIkL6Lb08ZjrLNfrX0H8EkhUYr85dqKWz2YcSRTWk1S3fWEGK U2Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Ub+YOxTaEj8h3/OEhQEBYuD58+vmy3bTawAxFBvQf9I=; fh=cJxh/kanPLeODRQBlbzh8SSlrAv+cihynWjDjQZ4bmw=; b=Oa7NQ4pP4/fmDYwbIflUUlWOPdKKix7+FjppYYcsG/vODUFx8vqQ1ylMZg4HiULlsz ayNiT6LyElsuwdCy/uUo+EwoPN7LkpVF7uLto/j+tel5ps39KMkUILl8k1qvhif4XlNR E02enMU38Vyc1wcaiPcwaLJHpt8eFhD75087kLKRNtoTWnIDnpcBsOk6CaIdqzFQ3eC5 C7VweFAJAYX0HSbfQpcB/sX4wqZqdoq9BJPcEy7kv8tIpeTCgFaeeak8rdOO3B6JnGD+ t4GiT+973zMnCQBYAAU7ysvnwbC4ZHjMvn2LXsJwpTj8zFy9/7pQ+4gm+ju14i01BmXN kLgw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AgNZwmi1; 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 a640c23a62f3a-a9b2e281bdasor271089966b.20.2024.10.28.03.26.21 for (Google Transport Security); Mon, 28 Oct 2024 03:26:21 -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-Received: by 2002:a17:907:3f9d:b0:a9a:1160:993 with SMTP id a640c23a62f3a-a9de5c91c9dmr860387966b.8.1730111180788; Mon, 28 Oct 2024 03:26:20 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:20 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Andrzej Hajda , Conor Dooley , David Airlie , Inki Dae , Jagan Teki , Jernej Skrabec , Jonas Karlman , Krzysztof Kozlowski , Laurent Pinchart , Maarten Lankhorst , Marek Szyprowski , Maxime Ripard , Neil Armstrong , Rob Herring , Robert Foss , Simona Vetter , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [RFC PATCH 07/10] dt-bindings: bridge: samsung-dsim: add 'samsung,boot-on' property Date: Mon, 28 Oct 2024 11:25:30 +0100 Message-ID: <20241028102559.1451383-8-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=AgNZwmi1; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The property states that the bridge controller has been initialized and left on by the bootloader. This information becomes relevant in the case of supporting the simple framebuffer. Signed-off-by: Dario Binacchi --- .../bindings/display/bridge/samsung,mipi-dsim.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml b/Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml index 4ed7a799ba26..34cd93bc41f9 100644 --- a/Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml +++ b/Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml @@ -132,6 +132,11 @@ properties: dependencies: lane-polarities: [data-lanes] + samsung,boot-on: + description: + The bridge has been initialized and left on by the bootloader/firmware. + type: boolean + required: - clock-names - clocks From patchwork Mon Oct 28 10:25:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3599 Return-Path: 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 1BF6F3F338 for ; Mon, 28 Oct 2024 11:26:25 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5cbb0b2c6e8sf2153672a12.0 for ; Mon, 28 Oct 2024 03:26:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111185; cv=pass; d=google.com; s=arc-20240605; b=Gx6KhiYrle9ko4GLcJZWvLuHo/Yh/TJisNCoOKcnhEXnJMRmYiRKxEkrDdvm5hy7Xm 6jYvB6OiFtzOZxih77LR6W4YETdDtJXX4B+mVMZ7kJJTBqHVCZkdzzS5qqIFHL2M/FtR H6lHZIJMHaJqM11+zEIrXB8YmyNX9UDqhjtCpN+zRHtkUniw0TxB10r8zoNnkD+UlTnh DHezf/XYlwwv7cDe7kGo0MUvPt3+fzPQoCIOA9OGxFJxwU32b+TQspkfv3lvanA32N1i NuYs2S02Wtrj+asvN2ODc+MHJsLW/kq+tjxpld3tQLJsT/yL0BIIFaUGqjHItyTrCXC/ pHHQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=1VlqPW7eRg8ZAyZ1Tiy4tftGh2w6rQ+4sktFQR5GfXs=; fh=2RCcL7oa3XHI1+MQQgcQj9buSSA+rdf2ZwVSCcRUlng=; b=FFKe/NPMVgM1f74QffQht0wIL4IrkglT6lCWQlffagpF7yhh798exwmnYpX9ytz7AC 3+oZith3+kHl+LpaR8jR1Im0kpghSv7TWolIUArvfIdvHLkkpEPzG/vUK6lxuQs3KqZY K6OEXezXXS0HQoNFpS9VY+TXWBklq96BV0gQh7BbOCheccD4rP7gtHIMkbvTg6WgFGeU alAN2hcTMu+w8wdTDrABQvvHUlSbuyuxhxEPD2WbnZsIUnldVXU2YoCCUtZ1RApZv7Sd Z0pDPjPLeGKd8cQBrHYxkU2c5BbseAAkCVwbhg8D5JWlLzrHF78sJKV31L8gINLv54x2 Dp+w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ARtkHr3O; 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=1730111185; x=1730715985; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=1VlqPW7eRg8ZAyZ1Tiy4tftGh2w6rQ+4sktFQR5GfXs=; b=dJj/QilEKmX/iAn6ZW9hKkZqwJra4LxUGoRF/I+uPFeKiKF3sCx6ntNDei5tWwU4ut s76bP+hjMxX5X+08UC58EVv3Ylka3tP8NmGYqfPD5A146QdIdkvPyPRB5gp407lKx9lA cLJFDtvk98eutmXz1HDVfvbnfMmUecUxKV0Sg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111185; x=1730715985; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1VlqPW7eRg8ZAyZ1Tiy4tftGh2w6rQ+4sktFQR5GfXs=; b=gF/kXtb+PfoFj6/HrU86KC2W5LEaXcA1/cuHV/fcO/jqOBO527hii3qT2RTO/1N9iP UI00vLaJIi4FAWM2zwrKzZyu95PP18QFQRPGUWuXtXKCZLoujWGeyAwTmH7g5G0EzMkU 5NCSWn/jTaJ+1udjnh2F3uJRTMmk9RC3zsnwhx7Sz3kzQ5eQCILXr8kYn0SJJe46LTF4 IRDPKuhOFOVARWGJVVzd3W3126+QuFTrJXuZIl8AXFZvPJpKZBaa02adQHNZGHP1pexX 8sku3vk1wbKSoEGDSBzr7hZNKgCTyayPARZEmtalBEnr8kgBmlpCfd4uAoNaeWj7qQY3 5LyQ== X-Forwarded-Encrypted: i=2; AJvYcCUXkYszwAEnHznBWW6OAwlW8amyXNtQWj+73Cr4WQ59VTk0GVaCb3w7yP2keYSsSMiRQWo3n/kWdA9jgZg7@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yw7t86ossLlMavgroyBuBOhIvDkCmagznP89ejZVEH8gowI3lP+ NGcOTOMbsnTh1AuaJUtiG87OnM5NlL6NfYXGdPinPDdjyqoOXDJtgHkQePFiyhO/6w== X-Google-Smtp-Source: AGHT+IHJOlwAn1igK9lpqLidFIUQFaHNmZyXHxvQx10VKA47CGgX7o8UXLu5wOYOZUhDl8trPnCyRw== X-Received: by 2002:a17:907:1c12:b0:a99:7177:3f6a with SMTP id a640c23a62f3a-a9de62f4b79mr758028566b.63.1730111184757; Mon, 28 Oct 2024 03:26:24 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:2685:b0:5c9:1f95:513c with SMTP id 4fb4d7f45d1cf-5cb999dcd7als104413a12.1.-pod-prod-02-eu; Mon, 28 Oct 2024 03:26:23 -0700 (PDT) X-Received: by 2002:a17:907:7f16:b0:a99:dde6:9f42 with SMTP id a640c23a62f3a-a9de619ed20mr553841466b.47.1730111183145; Mon, 28 Oct 2024 03:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111183; cv=none; d=google.com; s=arc-20240605; b=Sz/EnDxX4WcCT3EYbVb3cKB5/po3ZsBwbB2V2P2YeOF+aVQLszs6iHNgBmN9nh3bHc 02AqdW8gOF6HSkvULaiJZrpixD+mxyrKh9qENB+fmq1AiuWH3tOTMVz228NmQlN8KOZm 94Ov8Vuv1lw4bpdTibMapnktPoSOfKkjx6cgnYWp35XuDpp3ePeFj1d5Ce1KAhIxT640 0rSyWdN5J6QQD7tsakQ0ltZGOD4GW+Wf6q4MvUGHQK3wtzf1Gbz9WNtzxuN0VlPaSkrp JCT1v7YLVmp4wazvcBGDhZQoMk6u9sIu1U8s2FpPUwH4BIkCSE4kupxAboMHWEqAH1uf mG8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=v0ceU2N4ZWu/FtoiewhZfxk5s76R6vPhrLuwGN01j9U=; fh=Bx0TBdorJNXnjpNS/rCkV121OY0vkC9jMru1cgClbHw=; b=Zmy6mTvFvCH0xZBfjliwJ4wG+zHWI2isgTfG7pgF1g9WhThmy8AYu/GsZaBb+0CPZ6 eJtAsIj/gQFGbkuNyj9PpjIA2E7hVgDvjCegeTprAuStGKRN3bvSsZy3W6n4wnAIQUJ5 +chUEKgqmvEo8CwcFnkCitKJxrTwHINvjwJOjAPJkAMq9gtODs8n2Mt02DNZPuZxXKDX MiMRRnMIcuvJQskCPrLVBzOCqwpxjO1jVNXaiSKUTz6wiONSWYPTvMvZdDXRbsCGHm3p UcrXlZs8nqW/JUGWEj+UXnTV+E8rCrunANLvDivXxFJBZmv3catfbGuIrkO6jGySvAM3 EuZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ARtkHr3O; 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 a640c23a62f3a-a9b1f290efbsor259099666b.15.2024.10.28.03.26.23 for (Google Transport Security); Mon, 28 Oct 2024 03:26:23 -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-Received: by 2002:a17:906:c105:b0:a9a:10c9:f4b8 with SMTP id a640c23a62f3a-a9de62eaf3dmr759573966b.61.1730111182612; Mon, 28 Oct 2024 03:26:22 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:22 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , Andrzej Hajda , David Airlie , Inki Dae , Jagan Teki , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Marek Szyprowski , Maxime Ripard , Neil Armstrong , Robert Foss , Simona Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [RFC PATCH 08/10] drm: bridge: samsung-dsim: don't re-activate the bridge if already setup Date: Mon, 28 Oct 2024 11:25:31 +0100 Message-ID: <20241028102559.1451383-9-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=ARtkHr3O; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch does not re-execute the hardware initialization/activation procedure for the bridge if it is already operational. This feature is crucial when supporting the simple framebuffer, as the controller has already been initialized by the bootloader. Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/gpu/drm/bridge/samsung-dsim.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 430f8adebf9c..7c03215bb004 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1933,6 +1933,7 @@ int samsung_dsim_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct samsung_dsim *dsi; + bool initialized; int ret, i; dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); @@ -2010,6 +2011,13 @@ int samsung_dsim_probe(struct platform_device *pdev) dsi->bridge.funcs = &samsung_dsim_bridge_funcs; dsi->bridge.of_node = dev->of_node; dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; + initialized = of_property_read_bool(dev->of_node, "samsung,boot-on"); + if (initialized) { + dsi->state = DSIM_STATE_INITIALIZED | DSIM_STATE_ENABLED; + ret = pm_runtime_resume_and_get(dev); + if (ret) + goto err_disable_runtime; + } /* DE_LOW: i.MX8M Mini/Nano LCDIF-DSIM glue logic inverts HS/VS/DE */ if (dsi->plat_data->hw_type == DSIM_TYPE_IMX8MM) @@ -2020,11 +2028,14 @@ int samsung_dsim_probe(struct platform_device *pdev) if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host) { ret = dsi->plat_data->host_ops->register_host(dsi); if (ret) - goto err_disable_runtime; + goto err_put_runtime; } return 0; +err_put_runtime: + if (initialized) + pm_runtime_put_sync(dev); err_disable_runtime: pm_runtime_disable(dev); From patchwork Mon Oct 28 10:25:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3600 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 215813F338 for ; Mon, 28 Oct 2024 11:26:27 +0100 (CET) Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2faca747f94sf30307041fa.3 for ; Mon, 28 Oct 2024 03:26:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111186; cv=pass; d=google.com; s=arc-20240605; b=EAVXHh0c0BmrcLNCzRsFrb+RbvuhNlqb74vY/F1eiMiFCYrKxKj5AkkMOOn5xZcgKs AUNwkcvTIFduLKi8OneMbUFf3rSE2MjFetnfoZNGR4KhDwd1x9G8SQbQfXqcgrcRqOPD vMmzsrQvMjRtJYkQ2cl6LuAeVK26F0mv2q4GoxDX1hzExN97u7qEbX6YF5Q6pXSgTnGZ 9JVCLSneYnP0w2O7a0RwHMpU/l+ai7Jm3QpK3bSqIQgRSq6IfjK/M/pOtyeVFd0xMrZF 3Yh5FxBtkEhP8lAaRzwXVVCHZ4//K7ZW/OEkEheI6h8RhaYL1DAhbc4AWP4FbyRjAP2k zMIQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=NYiEOxoHlvTQpGyFeKzr8lbWqW/Mliz0U2KZba5C0+0=; fh=wAN7JCdc3frHMpO/KEv0gl50egX1XhNphVW7Lrk1Nqg=; b=iEWQWKdPa/bc/WJRQqipdmty08KskeZnTzGHo0xD9JzMhIx3ZHui4OvqUzRNjjgA3Q AqDL4kVPKrLjjji8pmoU1xvT6E8YawnWd0/ndE6Gx4NSHzfmi3tbLeGKw974o6/d4wa5 E2aX3F992ftj2Hrgslc7G5Q4qBibeyxV+xEDqCmH4tqhIPMvSqiZgtVIYQrcGiK1M9C+ O+tFwJZFqkOwfz91QgAygbX2o/1iOmBOoWcRdB7z3Lq652cv4be9+cn2st0vimqXCvOW IcW13tp6MdTpDE3qu0HwVHXYUOCAD3Beh4uDkTtjDqCsQTTRI/vK6hQGUTMgXc+zNvtP 87Ng==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mab5B5u6; 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=1730111186; x=1730715986; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=NYiEOxoHlvTQpGyFeKzr8lbWqW/Mliz0U2KZba5C0+0=; b=ltMWL6eKXhV2MNb1hQOnPQDPFdGMEaVFpseIygmgEoo6h2jktk2S0QP3KGEHSAyoc1 vWivdgd+8oVShArblvS4dpzNv5aViQJ26BY+5NKSg24tlVhgyR9HOYNv1ul9WmmlNLjG luYg8iV6hjzhqsVtUvE8sZqGgXf1BYQ6KjvEs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111186; x=1730715986; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NYiEOxoHlvTQpGyFeKzr8lbWqW/Mliz0U2KZba5C0+0=; b=ZitKfdW6mWu/A2mBEoqXPcWuTUFEOBB1Ccgj0jb4c1Rbj59cTJJNLq3g708E9HoThZ iy/jqFLrfUjqedXjHZKC3Py4+Mrb9HQ9EXG0hZxGOwAk2FSbBQGMhCtjfyPUqLC9/wca rKMbpUBVPKefCKnxD047U1rlvzOTF6NQBAnPiUgTE8PuyuPwVab6aF0oVJMYqXZnjP5P j0cPQCiltmlxe5ZUMaZVhuOHxRJ81aYoHl0IXHfqykasAivaoCOArdWOfWwUXAKwDPOf YEGXR6TwPCWw6NqlD7no3sTNzh/h1PoddilrsWcVl4yD8TFpuvklHGz7n4soxTEBCyYE DySg== X-Forwarded-Encrypted: i=2; AJvYcCWw/fzpx7KpBcOkAY+eNldYm5O6LaTmlFqkoRhizBvJ2PYCkNQVvjCe31bdNIk8OFjwXgOtct+WZ/DN+9uQ@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwOqJ4ftVnmmw8roGs941R/65AR2ziaqrqMHKuRUbpukhQ3ebvY Fm+7xKRDQ5u6PNbyzhhwqDfC6FieHU2YpfSKNGRmS2PMY5LAf1G+HODaM/a+vAf/jPqDxvTO+g= = X-Google-Smtp-Source: AGHT+IHsYP41LTUVWeKmjP0dVMP7dfT6fWOQDEF+t7hPTsi01NHpPaMmwujUifBaIWrplyp83d/TRg== X-Received: by 2002:a2e:be20:0:b0:2fb:5a19:5b9b with SMTP id 38308e7fff4ca-2fcbdf5dademr23930721fa.8.1730111186285; Mon, 28 Oct 2024 03:26:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:4416:b0:5cb:803c:25c4 with SMTP id 4fb4d7f45d1cf-5cb999f971dls927879a12.2.-pod-prod-01-eu; Mon, 28 Oct 2024 03:26:25 -0700 (PDT) X-Received: by 2002:a17:906:6a03:b0:a9a:24a2:180b with SMTP id a640c23a62f3a-a9de618dc0amr631246766b.57.1730111184646; Mon, 28 Oct 2024 03:26:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111184; cv=none; d=google.com; s=arc-20240605; b=ST/i2MBsHWoBa8FQVddPq9lxVWTEpfHxN8D7o0vp1xgktb15UudpkIM1Opn0FpDlFp bBke72kucq51OAfTRz4AmznEz+NQE9pHmuSJl+jkg2euGCiBvjjeyIs5VKda/zd3rBxw QLEj6Uvt1C831qg0NzLLmcbhUy2n7cn8qqgU4EBGRMQGAW8g8UtqgxqLWV2avepig36g oMI0bMjyl6J5OSYUlP0quCH1radv8/dsrfGf+4CaamLQV4L8ZIhRD5lIShAOyvxoTO29 gzrcE/qVOw4nmeKxfiZaPpzRjeh1Lq+tOz9qXzeHOyHuIsTC9mi9LCuBFE72WL16t+c+ PU+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=rR+lzb/We4vJpOJMhvb0fzb6ziPa4r87OMQDrQMxLAc=; fh=hBp77m+1/4K0Memkt0VBqZ4EOLruzlXcCBwiqODs84E=; b=jtpB2hyLqsUbUoQtqMLmWnWUPy4mlx41mTNHR52OGAJrPM/wubuXNFSmYQFlJkaFJY dFk7qy3hpbtyFuguacAbvaL653tERVYVwD5Nm6j8pmSgsLI0o5+LZPf3NzWiSWkNoRh7 T4AAXFYTNU4c4XiQWzvwBnpxRedCVSkMCvFdHNf8MZ5CVcjfn+3JAwmbLZ9QKXUAxuXB iZEhu7tgEd4g3nNeXno24HG5blDjaupYt2Dns1wOVDE/sktxVoDe3KA0vAakGSA8CXGa RdrlW5EmY2O5lFwVPU9S25VreWGtpqdOV1PMoA54DxLe1bnwckKlnBLz/nawUiVwIq0V 4B4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mab5B5u6; 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 a640c23a62f3a-a9b1f0695cbsor260353066b.12.2024.10.28.03.26.24 for (Google Transport Security); Mon, 28 Oct 2024 03:26:24 -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-Received: by 2002:a17:907:7e91:b0:a99:403e:2578 with SMTP id a640c23a62f3a-a9de5c91d04mr907125266b.5.1730111184145; Mon, 28 Oct 2024 03:26:24 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:23 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , David Airlie , Krzysztof Kozlowski , Maarten Lankhorst , Marek Vasut , Maxime Ripard , Rob Herring , Simona Vetter , Stefan Agner , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [RFC PATCH 09/10] dt-bindings: lcdif: add 'fsl,boot-on' property Date: Mon, 28 Oct 2024 11:25:32 +0100 Message-ID: <20241028102559.1451383-10-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=mab5B5u6; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The property states that the (e)LCDIF display controller has been initialized and left on by the bootloader. This information becomes relevant in the case of supporting the simple framebuffer. Signed-off-by: Dario Binacchi --- Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml index 8e3a98aeec32..937f108daacb 100644 --- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml +++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml @@ -71,6 +71,11 @@ properties: $ref: /schemas/graph.yaml#/properties/port description: The LCDIF output port + fsl,boot-on: + description: | + The controller has been initialized and left on by the bootloader/firmware. + type: boolean + required: - compatible - reg From patchwork Mon Oct 28 10:25:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3601 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 583F13F338 for ; Mon, 28 Oct 2024 11:26:28 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5cbadbef8edsf2549907a12.3 for ; Mon, 28 Oct 2024 03:26:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1730111188; cv=pass; d=google.com; s=arc-20240605; b=N8pkt8n6iwbCuufxb4RJwnE97XtZTiXQbgt+ba6rkozYQ+b6PQhQ56B6Bg8A2fzpbr V7+93y2HsE0Mq9IVsp0bJg8EM4DxJU3hKjJ9l4TqgtZSlz8kA7viNf7xLI9j3mzbabGd nD+DUkpsBoMuHa+0SZ1VXP+jrqEEdRT3vm0N/8D28SQ5i1h114nRRbx1QJbNZaGJ6IDD POegtTQS01MXE3A6AgZkOwDc3qHnGFWLUZhaAIyaxQEfKeSqxb/TOD5Y0qnavTZOE1xv nn5o/o4iw5tdJcVHySRIA7L8VSXWy9+sWknaE5IZDQlgrfjJePrwe7uLZutbmyS+zmL2 fQaA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=s5psUVIwEkKPoOs2WXFQuCbOoez2cCmpIDuJawxdo8E=; fh=gbbU+cqaF5KoKLbchg3Yw9ZoyqEpYlQZ7m1nd9x5QSI=; b=ZcCX+crBfQBuWlD5Hkask+qFRgszToXp1gCWCQOVLo+fL0QY7snglamPZdAQWb1gXY /1ZvkxQDN4ouIiX4F0wkn7HoIAARlnqnrU039J7I077BB1rm8zcfYzAxHDSisT8FY5ZE mmmH0T2Y7w4I7Zz6MplsbD9Vp3icnxNXZOfjCDkiWkCmPRfoPHOsJRwVCpM+aMY/ey0e wqku6qnH8m7Z4fwXMh+d+EDFONRbqiM7IDRS3VcE6GaXDiYpeQQWXQYv31wkUXmsMF5e uH7bQfN1UjXQ5u+MZwHQGfCgv0cOZhojtCykb6HxjaHsrS+9dxrIQJa1CxMGYMY4pPaR l+RA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Stibil46; 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=1730111188; x=1730715988; 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:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=s5psUVIwEkKPoOs2WXFQuCbOoez2cCmpIDuJawxdo8E=; b=e2+krSZJLRShorfgVVUNFNJXQFi4u0rULGqQp4ngELqETFtHzLdFr4NZICWKZEXkIX 6nod7yWXscA5JrZE+ssr+c+F2p1uwtxRl0PVUkQdFiXu7G80sLDJQPfG57skwVBA2AMQ oSEPP2k1hlEAjOAMaH/9ejyP3QBNnabsIsVfk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111188; x=1730715988; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s5psUVIwEkKPoOs2WXFQuCbOoez2cCmpIDuJawxdo8E=; b=VpzM7jrXriFz2aRVV6HJWUJ844b/Xzq+3VZcbzy6cDrv5tXJ22EOgL6jtJ2TgIZ/KB nhr6YTxhpWic55LA/rOUvQokEHVi22Ns0PPexPT5wJ0EM7ySr1MZ0TMrKtQ4wsgMaQwW gq/SpoiCoI+b95GgxyQhNLyms7ktkoUCriSlip/wjyuTF3DX2mkBwGtJvT2XduA730E9 FYQR14R5iUaR5zk+036S3KOdDj/jsfDgdPG+rY5vIazNhi5M2R6kUuw2Ch6twCHpZXo9 CDhXQg/MTrBYRpSnARPIFoSJiIR4H5q0MEQ57jI0RJaBgEm0YtgjPjxLUpfC/BzNjCpg GWuw== X-Forwarded-Encrypted: i=2; AJvYcCXLtmrSj8baRC3hKJ/2oBgEqGVGwFm92sKyfMtp/P/RQV5aWB5vV0Aavkp6EQBeEGrJVHV7KWgRoRvpbpmo@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwL9Jo0LH+42kvPs+gXpU7wGZmzeaEzPLbxD0IO6GsTVH+0oq4K ZlERp6y48lLYD4LwJjp+hy1iVjOj4JpMarE69pTFVqaYUS4CZjiVgJnxXqv/xrZ0PA== X-Google-Smtp-Source: AGHT+IGPGFDmoccP+LShvG+XMzY/lZwGsa6x6n3kAqoECVvf4qbgSIVvRMiayBsjYxy2kNxt2NhSCQ== X-Received: by 2002:a05:6402:5209:b0:5c9:59e6:e908 with SMTP id 4fb4d7f45d1cf-5cbbf89216amr6538806a12.6.1730111187853; Mon, 28 Oct 2024 03:26:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:34d1:b0:5c8:acf3:1296 with SMTP id 4fb4d7f45d1cf-5cb999fd8dfls3195a12.2.-pod-prod-03-eu; Mon, 28 Oct 2024 03:26:26 -0700 (PDT) X-Received: by 2002:a17:907:7f16:b0:a9a:67a8:4c0b with SMTP id a640c23a62f3a-a9de619a3c6mr753707366b.60.1730111186295; Mon, 28 Oct 2024 03:26:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730111186; cv=none; d=google.com; s=arc-20240605; b=e8zHizdFSNjJqRJN3AlcGocx4fmtWD5Txgd8efbcZk1pcVTI0tGpUhJO1VIfYgQOBn uc9Ec1IBho9VsBwAbboJR5UyRuVHWlLBf67JXwYYFqA/b638A0mEH0J1haYe4GttVPZg R/fg9lbroBPBzkW336OmpfYIOnZRWVZXhBuK6t67c7zZMfLZ/HoJElI9/YQ8o935Zt16 /vhW3NvbjxLPzH7DX/5o5i8QBE77n5N0v35K8eZxK3Wz2SaaqpP2TMcMXMqq7LoZhoAJ 7SxWHOZi9BcjX/rOOqjC7qJ16aNR/jgPf+l/k49X2k/cRcQR3qoKEjCbL0CL8zDqjWTi H9/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=aIDm7KBT1s0AbOc3yV3TQ9ohvs8sUqIvua5HhBI5V8A=; fh=M2fpjXzppMk52WT6IfI31fWa7zFBF4cOzrbdwbKYzY8=; b=PGhc7N89mu5RQqQr+F+ZPYUpy/0qEM1fTKcRJH1UZHPZ9zGgTLmVKyLjubS2TBMZKH smhOxK0JF60ulI/IyW5qHW0qCwPDRid2CNoy/zdlOOINjKeP850FKG27FiEHY5Cg8jG8 9/KtzZJ9l4DNeZ9NtLyNPvfHKWERp8HdjJhkOCVSQ9biVLJHE+U/B4ebv7Z7uzPB0EIr aIxsxpM7K+Jjebut9PrzpKxwLvyeEz2P6VmlQxCgjye+n+Oe5TzrDJhP6I7DmIZKef+8 y0w+ZsbzyvyYVOEq1L9vc5uW4BDjlh+W0VUrF+gYxwqCHdKYIoGMfEKqPTsIw+yaLo9R xFcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Stibil46; 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 a640c23a62f3a-a9b1f067995sor199352266b.11.2024.10.28.03.26.26 for (Google Transport Security); Mon, 28 Oct 2024 03:26:26 -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-Received: by 2002:a17:906:da8a:b0:a99:425c:c653 with SMTP id a640c23a62f3a-a9de5ce24f6mr866426966b.22.1730111185881; Mon, 28 Oct 2024 03:26:25 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:25 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , David Airlie , Fabio Estevam , Maarten Lankhorst , Marek Vasut , Maxime Ripard , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Simona Vetter , Stefan Agner , Thomas Zimmermann , dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 10/10] drm/mxsfb: stop controller and drain FIFOs if already initialized Date: Mon, 28 Oct 2024 11:25:33 +0100 Message-ID: <20241028102559.1451383-11-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> 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=Stibil46; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , You can't re-program the controller if it is still running. This may lead to shifted pictures, so stop the controller and drain its FIFOs in case it's already properly setup. This patch is crucial when supporting the simple framebuffer, as the controller has already been initialized by the bootloader. Signed-off-by: Dario Binacchi --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 3 +++ drivers/gpu/drm/mxsfb/mxsfb_drv.h | 1 + drivers/gpu/drm/mxsfb/mxsfb_kms.c | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index cb5ce4e81fc7..38c94cdc8f6c 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -221,6 +222,8 @@ static int mxsfb_load(struct drm_device *drm, if (!mxsfb) return -ENOMEM; + mxsfb->enabled = + of_property_read_bool(drm->dev->of_node, "fsl,boot-on"); mxsfb->drm = drm; drm->dev_private = mxsfb; mxsfb->devdata = devdata; diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.h b/drivers/gpu/drm/mxsfb/mxsfb_drv.h index d160d921b25f..0f9ae4ce450c 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.h +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.h @@ -47,6 +47,7 @@ struct mxsfb_drm_private { struct drm_bridge *bridge; bool crc_active; + bool enabled; }; static inline struct mxsfb_drm_private * diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c index 7ed2516b6de0..d064a2bb65df 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c @@ -202,9 +202,11 @@ static void mxsfb_enable_controller(struct mxsfb_drm_private *mxsfb) writel(reg, mxsfb->base + LCDC_CTRL1); writel(CTRL_RUN, mxsfb->base + LCDC_CTRL + REG_SET); + + mxsfb->enabled = true; } -static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) +static void _mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) { u32 reg; @@ -221,6 +223,13 @@ static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) reg &= ~VDCTRL4_SYNC_SIGNALS_ON; writel(reg, mxsfb->base + LCDC_VDCTRL4); + mxsfb->enabled = false; +} + +static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) +{ + _mxsfb_disable_controller(mxsfb); + clk_disable_unprepare(mxsfb->clk); if (mxsfb->clk_disp_axi) clk_disable_unprepare(mxsfb->clk_disp_axi); @@ -354,6 +363,9 @@ static void mxsfb_crtc_atomic_enable(struct drm_crtc *crtc, u32 bus_format = 0; dma_addr_t dma_addr; + if (mxsfb->enabled) + _mxsfb_disable_controller(mxsfb); + pm_runtime_get_sync(drm->dev); mxsfb_enable_axi_clk(mxsfb);