From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E74E606A31A for ; Wed, 28 Oct 2026 20:30:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zTgOQXK1; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=xQQg2kDx DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=SagG7hnlNkBMWrHHVXZ8fa/+eusWUEksklF+xlNh03I=; b=zTgOQXK1FgmC9x fyJwtxrRFaUahUeicHuWocCeLjZR148x6rv/TQtKYjS7r9Ms9wMVwZlxRVZb+klIPBozXgaMLmxAX aeef2cAeBTFnP0ZKxGFg3CE199Y9QIyR870if4CxHy0DozdxQXBhhL5NPrhH+Bbs76e4gw65R+X3X fKMl99Ou/nn9LXiz3XAkAHDy91I+xvqOasDpqpdsAfMNntw1qkeoU8FgyW4i0rPYmPMF8wmxT4OuH pEENo/vjTkL3paSCliMXbPb7J01hfNqhe+ZNYaJB7bV3AIeIf2Co4KR+tkbiN94aLqSDMREbOJaPC xUUqjrISQeuMSsjw76AA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xMAII-00000007vlQ-1hRJ; Wed, 28 Oct 2026 20:30:46 +0000 Received: from mail-oo2-x00.google.com ([2607:f8b0:4864:31::]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xMAIE-00000007vkc-3kHa for linux-mediatek@lists.infradead.org; Wed, 28 Oct 2026 20:30:44 +0000 Received: by mail-oo2-x00.google.com with SMTP id 46e09a7af769-84e8a9fae57so563685a34.0 for ; Wed, 28 Oct 2026 13:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793219440; x=1793824240; darn=lists.infradead.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SagG7hnlNkBMWrHHVXZ8fa/+eusWUEksklF+xlNh03I=; b=xQQg2kDxZFONcZ8QPdq8gEbebuGvt/w3gVa6P+a+A914/wNMMd+aCmQvw5120NgSFZ EYV9TEPI+S01iMxeVBNuXkOoCMUE6epnEGpzWG6rwrPqrfu3hXiUOmnd7OEHVR3srOPU axWVKo3XEMbwpOhXcDOXhZdG5NmgquyeyXTHOjCugkkTxvuTs3Phm5rPBAlb14c2GhTf 8T6I5L5mBxCcb64lBk46fwNE57of1X5vsg3VRAduqi0bUJ+tuBVcGEIZ935MoIvren/B 26u3CV9Soim/Ad8TQP17BuDc7u3RaZWxvcO/fEnWUOWfC0a0krKdii1oFUnJRZEi4aln 5SWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793219440; x=1793824240; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SagG7hnlNkBMWrHHVXZ8fa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tGCgW6xLPM7yXwXKZH5BefCTdX2Shqr5FxM87ZhAD0aCHpfLML0FgVygPXziiahwts6u jhI9FWl15yYmvyow9FLUAczcCaCI08ljodEK0Lk7v6G4YWG1maljZVkiP1bMZHOZ0/eHxfOkf2Y nKhCnXtT5GaCXnFNrjZOGpdcbaqikl1b4yJJUIKY4Iz3dPw4P2Zb4YyyZJCz3VXxMiABL3qJIm7 LpwLin39CWE3Fwhn4aaZg5Ps2+yIOJSIegn1Fls+jCA== X-Received: by 2002:a05:6830:680f:b0:81c:a8c5:633c with SMTP id 46e09a7af769-85ab7b0d6b0mr3330153a34.17.1793219440535; Wed, 28 Oct 2026 13:30:40 -0700 (PDT) Received: from [10.10.121.179] (wsip-64-207-253-118.tu.ok.cox.net. [64.207.253.118]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-85b1d363390sm2618813a34.1.2026.10.28.13.30.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2026 13:30:39 -0700 (PDT) Message-ID: <7981f7c6-c949-42e6-ad53-15e6530588cb@gmail.com> Date: Wed, 28 Oct 2026 15:30:38 -0500 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] pinctrl: mediatek: common-v1: Use a raw spinlock for the pinctrl regmap To: Sebastian Andrzej Siewior Cc: Chen-Yu Tsai , Mark Brown , Lee Jones , Arnd Bergmann , Sean Wang , Linus Walleij , Matthias Brugger , AngeloGioacchino Del Regno , Bartosz Golaszewski , Clark Williams , Steven Rostedt , Yingjoe Chen , Chaotian Jing , Hongzhou Yang , linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rt-devel@lists.linux.dev, mfd@lists.linux.dev References: <20260929-rbrue-suez-upstreaming-mtk-pinctrl-raw-regmap-v1-1-db92943f42cb@gmail.com> <20260930080609.dnK1-Uta@linutronix.de> <20261020073236.dDVmd3BW@linutronix.de> Content-Language: en-US From: Ryan Brue In-Reply-To: <20261020073236.dDVmd3BW@linutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261028_133042_939957_5C4B8D4D X-CRM114-Status: GOOD ( 16.02 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" X-Spam-Status: No, score=-4.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 10/20/26 2:32 AM, Sebastian Andrzej Siewior wrote: > bulk writes could be a concern. The 40us delay is within the lock > acquired? If so, could this be done without the lock? I assume this is > part of the init sequence so nothing should use the HW so the writes > should not be interrupted by other writes to the device. Yes, it's under the lock. regmap_multi_reg_write() holds the regmap lock for the whole sequence, and since an MMIO syscon's regmap can't sleep, the delays are udelay()s. The PLL's enable runs that sequence (13 writes, 40 us of delays) whenever the PLL goes from off to on, retrying up to 10 times until it locks. In practice it's init-time, though. The G12A USB3/PCIe PHY takes the PLL with devm_clk_get_enabled() at probe and keeps it on, so it runs only once. Nothing else writes the PLL then, but the lock is the HHI syscon's, so on RT the other clocks in that block would wait it out. Running it without the lock would mean changing how the meson PLL code writes its init sequence, which I wouldn't want to take on in a pinctrl fix (unless that were preferred). > So it would be safe for now… Yes, that's the trade-off with the second option, which relies on the DIN never being written in a multi-step sequence. Nothing enforces that though. I'd like to send a v2 after -rc1, but I don't know the best option for the fix. Still waiting on Lee, Arnd, and Mark to pitch in if they have a preference, or any option I've missed. Best regards, Ryan Brue