From patchwork Thu May 2 15:39:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 13651838 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A06DC4345F for ; Thu, 2 May 2024 15:45:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=t+m6cic5yQxTDpwSjFQ+LwZ+OUVw2Uf15KoMLcXrkd8=; b=kRPQns4uFcRzT5 wqphZdD8IsIy9RB8TTn7hEOsQqIb4gZanX0frHeEXv3OOn/klbU9eWtE7hWM+2WXcL7rmhEyAjxKK frLs11CkXYG/MvUFYP8XWgSJhGbsGqsoFxud8LgxO6euJu7kWuSOvsytbqp2eZtytCWpxeLa6O38M ZA7dwksC67USt/1leUe/i2KflCn57vmAILHz/zk1jW2rhNaJpjJeHfhWwjccn++ry6xrSSspreXKc 6adPHEuZ6uCNsG29azK+uJ1rRpywesvDIY8G7BDKGJQr5oh0WVOjSNsky2y6cMNMXtAdXoLzgSaDE NHSPCDoUkZf9m+I3j2OA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2YcP-0000000DAQx-0KaO; Thu, 02 May 2024 15:45:09 +0000 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2YcM-0000000DAPS-0d7J for linux-arm-kernel@lists.infradead.org; Thu, 02 May 2024 15:45:07 +0000 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6ecec796323so7776193b3a.3 for ; Thu, 02 May 2024 08:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714664704; x=1715269504; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MOqLq0lZ0i7PXhp3YLh0UdxAncxBGq3YXZCOMwkygc4=; b=UBcMWVcNdP9trpfr19V+9K2meUZCFof4OXSURTtkRLsfLnRQKhZBHF4i4ebtg+momA gj2o4EvnMMMIf3sPAEOQ5qZ6LP+MEiKP0k77ofCf/JOUFoKCaS7k+ZvLcJpezb+mXEcD 00UUYa5Ct9dpG9yeGo1kNKmqeHv9EMgnX91JI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714664704; x=1715269504; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MOqLq0lZ0i7PXhp3YLh0UdxAncxBGq3YXZCOMwkygc4=; b=aMRzhSy4rkaJ6WRwhh9e6PLTTjELbX2PBKX57LqbP6M2S2YKdHbX3o2NwQBRFjlXgU 0J6pbTt2UvcXGHqYIVVYaVRC8UlnkX7iVy4LJFX+ImN90MCVpdZLrztDZLD7Vd0WGZeR BP2iUTSNM2NcVpgwJ7en9B3MBnL6vJTYFw3tTXh6cVYa9mFIBTOpyuerGKXSpAp94+jm eKT9V+8BdleyKIidQi6jfa6MYcXu7gDnqgjKE74cKyd0+gvr1ETRAgFZYe2hAclt71K0 qD+Whfm6Dc+RCd/H4JCm4vL84IpzYzVCqLWJSo7kcz1L50Orr7cKIjrTGnCXkMBTRj+H OzOA== X-Forwarded-Encrypted: i=1; AJvYcCWFJUYLlt3F8MDWTyjJ65ha9bpTy9x8C0cJlzmlbjrtt1wNI8n1qbXrrwQRH+7EGA84wdepbccAxth46P4y+8JanDCRHhDVXVvgZFs+x7emhNcLAjA= X-Gm-Message-State: AOJu0YyYVsDtJDqcoUJq937v9ytfo5Qoc+ct6JnnmhL+TbrNMyXCpG0+ qkViCMgsy3ai0ghnhwP3yCnyaAZ87JABFMvULgqVFE0hoF4Gn+UyC11ioQpxXw== X-Google-Smtp-Source: AGHT+IH+DKW/P1R56uRTZhYtqEUAHiBxc+2IZYShyGS2YIDsx+eMU2ct2kjiiYu7bnTgUSejCrtSrw== X-Received: by 2002:a05:6a00:2ea6:b0:6ed:1c7:8c65 with SMTP id fd38-20020a056a002ea600b006ed01c78c65mr7064701pfb.10.1714664704045; Thu, 02 May 2024 08:45:04 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:8191:2b1f:c04b:51ab]) by smtp.gmail.com with ESMTPSA id h4-20020a056a00218400b006f3e3d928fesm1387660pfi.220.2024.05.02.08.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:45:03 -0700 (PDT) From: Pin-yen Lin To: Matthias Brugger , AngeloGioacchino Del Regno Cc: =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , linux-mediatek@lists.infradead.org, Hsin-Te Yuan , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Pin-yen Lin Subject: [PATCH v2] arm64: dts: mediatek: mt8192-asurada: Add off-on-delay-us for pp3300_mipibrdg Date: Thu, 2 May 2024 23:39:51 +0800 Message-ID: <20240502154455.3427793-1-treapking@chromium.org> X-Mailer: git-send-email 2.45.0.rc0.197.gbae5840b3b-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240502_084506_411695_836685A0 X-CRM114-Status: GOOD ( 14.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Set off-on-delay-us to 500000 us for pp3300_mipibrdg to make sure it complies with the panel's unprepare delay (the time to power down completely) of the power sequence. Explicit configuration on the regulator node is required because mt8192-asurada uses the same power supply for the panel and the anx7625 DP bridge. For example, the power sequence could be violated in this sequence: 1. Bridge on: panel goes off, but regulator doesn't turn off (refcount=1). 2. Bridge off: regulator turns off (refcount=0). 3. Bridge resume -> regulator turns on but the bridge driver doesn't check the delay. Or in this sequence: 1. Bridge on: panel goes off. The regulator doesn't turn off (refcount=1), but the .unprepared_time in panel_edp is still updated. 2. Bridge off, regulator goes off (refcount=0). 3. Panel on, but the panel driver uses the wrong .unprepared_time to check the unprepare delay. Fixes: f9f00b1f6b9b ("arm64: dts: mediatek: asurada: Add display regulators") Signed-off-by: Pin-yen Lin Reviewed-by: AngeloGioacchino Del Regno --- Changes in v2: - Update the commit message - Collect review tag arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi index 7a704246678f..08d71ddf3668 100644 --- a/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi @@ -147,6 +147,7 @@ pp3300_mipibrdg: regulator-3v3-mipibrdg { regulator-boot-on; gpio = <&pio 127 GPIO_ACTIVE_HIGH>; vin-supply = <&pp3300_g>; + off-on-delay-us = <500000>; }; /* separately switched 3.3V power rail */