From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68D6E351C27 for ; Wed, 22 Jul 2026 17:24:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784741072; cv=none; b=na7XgQ2OrlZIH6b/lBpgIdagM0bGP+ad8rj0Moeq9fTvlpRWAfu+ajeQfNMxBgKGUwCm/LvwlEVQx5s2WCaIa/xViXa5m2Kc4GhwFBBeFbfnztcGKslM6bDkdIDXvGK+MpafZbOjv2Vte/hcVizsG6LPHRKgk8PbflkJNEhCDt8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784741072; c=relaxed/simple; bh=YqaZmXNCJsa9hbmdcHJkPagq4EM1gKIfp7+IQsL2QJY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Fc+WurrXMgrYoq9rJ2kafHC2BhukGkLfo3mv8MgZ5s07c9rHRZtFzt/EpP5tKAkZrqZvx2F2xFkgAjLztZYomUatb2DA4+KOmR2GNOdawhHrTO911/oc3pZKlVZ685QRVag3xzTs9A0Up6RbtRcNZGtzh1EWjJpL1zcAPysT+l0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PDlyXNns; arc=none smtp.client-ip=209.85.128.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PDlyXNns" Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-80a123ef90aso87885727b3.0 for ; Wed, 22 Jul 2026 10:24:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784741070; x=1785345870; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=YqaZmXNCJsa9hbmdcHJkPagq4EM1gKIfp7+IQsL2QJY=; b=PDlyXNns9twVX3mMwVe8g4pJTmdAf1KOzl9ILK/+BQQuW8tgltgV+fsR4gy4DEwa7o WocDpImDxo9wGfcQy/bcTU5Gz21AbYTjpcExXYIxnm8lSiWJthBYAoVdHvPF/GhzPoE7 /yOc69pr8CHxTo51/CgjRJUlxZGfXGh/YHho4hta8Uj5gR6NqxOduFhH7wWxNC6qNPea VbOp21WfJLO+0sEOadUteHP9k0R7B4ku2CxUG8GLJqANKbOlt+KthgcX2eL+LsgkN82/ qAek69FTLxj8ruaU5WCpgonQj7YKWWLZCxDHE4e10PhpneDMqnvdUAKcQHKoMRETJrmG k+Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784741070; x=1785345870; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=YqaZmXNCJsa9hbmdcHJkPagq4EM1gKIfp7+IQsL2QJY=; b=aML8RGYtRZ2St+gwa4fRd5KM2XujNhW1DBdy0pOZs6vNKCpv2OyjGAB73MGSbPz4hS 4dEhGIcwQ4AlRHVrc/R0goL3I/oBJMUc9P5pp/M6fnmrxgnImnAdlXMqwy2RpM0zzoH5 aN7BuXd2bkUVbhvs/PtDmx4BXGW6FCtiN2mVmMhKbALWdGJoFD8nsS5o78mIhmZgAHOa ji46nFki1Tpulwc9E1aIFNuwhAHQgSbRDVkfEDJefnzJvLhvWpKfBtLeySd76633RJ5c ZJOZskQqacSwRY2ohQzmohw0/NZN+Ida299WR+YHpDc+RiOFRgJcSF2eEASJOj/RyKm5 iJqQ== X-Forwarded-Encrypted: i=1; AHgh+RqArdNxs7J25j4ItXxmGbcyvPosZn8dLTNJVYEvP+tnfa43ebdTfJaJHHJdstz05XViagKzDbezBglbXvI=@vger.kernel.org X-Gm-Message-State: AOJu0YzgJ4sJrHakQ8OHe+vF6sIHREuOUDoe3fN6jLdwzS9whJ2hevmy erZtXh7ikQw+J1FhZAM6c77IpgtUOrqVb79prwZu5QjI9HpvZ4uvXKqGzQC9wfXpztY= X-Gm-Gg: AR+sD10fvfSXzGRk16Fnd1treD6vcj4ucwqeZ8C1w1QMstBoCeVfvJ2XQLA0NZbTleV ONIRB23E+cWt+yCDOlUX31rLHeR51LiMG28dwtz4HF+2NLWmAFVtDt9zIZBXNmXIOH01I57T8Em Q2ZMyaoCQgFlXHwlir6kXj5lbI3Nj+IonfCjbhasUXWYzkcgpmXgconCqDUV1Nb7FPUgvvlH/2f xQ5TXk+FhIOdQHaHFyTWo2Ji5UN8l5S0oFuqw+aEuLq5hIPBCc7cTeSxACS7tVcu3w3v2o/0QpF utbMM6ph2hSAmp9jT299yPNgn1xuLvj8MYFFfBWv6YGPbGpQDsIS4HrVVZLOGJgQRgyiPQ4/t+v fWTC0La63yoFo6HWbcyUZ26MljrasDqq6MMGXHH1256VovthTGKgieERPvTYKBukg9oJyWpX189 7y6y0gMlx4Dnt6OcpSNjSScXKJCEXapDdEMfi+ X-Received: by 2002:a05:690c:a99:b0:81e:66a0:136b with SMTP id 00721157ae682-81f33cb39cdmr14100257b3.31.1784741070165; Wed, 22 Jul 2026 10:24:30 -0700 (PDT) Received: from localhost.localdomain ([2a0d:3344:2841:7708:a101:2b8a:f76:a00f]) by smtp.gmail.com with ESMTPSA id 00721157ae682-81f33f35417sm16652167b3.47.2026.07.22.10.24.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jul 2026 10:24:29 -0700 (PDT) From: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Carrillo?= To: andre.przywara@arm.com, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: =?UTF-8?q?Juan=20Manuel=20L=C3=B3pez=20Carrillo?= , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pinctrl: sunxi: A523: fix voltage withstand encoding Date: Wed, 22 Jul 2026 19:23:56 +0200 Message-ID: <20260722172356.2509190-1-juanmanuellopezcarrillo@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260721223956.13665-1-andre.przywara@arm.com> References: <20260721223956.13665-1-andre.przywara@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Andre, Tested-by: Juan Manuel Lopez Carrillo I hit this exact bug on the Orange Pi 4A (T527) from the Ethernet side, so this confirms the "reportedly Ethernet" with a concrete hardware data point. Without the fix, GMAC1 (RGMII, YT8531 PHY) is RX-dead: the link comes up at 1Gbps but rx_packets stays 0, so DHCP never completes and the board is unreachable. The PJ bank rail is 1.8V, but POW_MOD_SEL was left in 3.3V mode, so the RGMII input thresholds were wrong and the MAC never saw RXC/RXD. With your patch applied, RX comes back: the board gets a DHCP lease, and a 500 MB transfer lands with ~365k rx_packets and rx_crc_errors = 0. So the CTL_INV variant fixes it the right way, at the driver level. For transparency on what I actually tested: I applied it on top of current mainline (torvalds 248951ddc14d, v7.2-rc4 + a few). It didn't apply cleanly there — it looks based on a newer pinctrl-sunxi tree — so I rebased one hunk (the BIAS_VOLTAGE_PIO_POW_MODE_CTL_INV case in sunxi_pinctrl_set_io_bias_cfg()) onto that tree; the change itself is unchanged. FWIW I'd independently reverse-engineered the same inverted encoding (bit=1 -> 3.3V mode on the A523, vs earlier SoCs; the BSP calls it "power_mode_reverse"), so this matches what I saw on hardware, and I'm glad it's handled generically now instead of my board-specific DT hack. One note from poking at this, in case it's useful for edge cases: on this board a few banks behave specially — PF is the SD UHS 1.8/3.3V switch (best left alone), and PB/PH take their voltage from VCCIO rather than a per-bank bit. Happy to test those paths on hardware if useful. Thanks, Juan Manuel