From patchwork Mon Jun 24 02:23:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 806993 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp1691553wrt; Sun, 23 Jun 2024 19:23:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVfnLjM2xCzKe1uzvzhgQjmgZs8+8R4XUJ/9Sr8EInL7c4dTzfLzoYgyYODtJ9OpW76v6k216gssKaiKDMj7B1+ X-Google-Smtp-Source: AGHT+IHQBcre+ItsfLMBXo/pux0xIQmYIAxN0W447OdLflmxTFZVAdA1buzkJkBfbJ0xUXEr+i+D X-Received: by 2002:a17:907:c816:b0:a6e:f594:a292 with SMTP id a640c23a62f3a-a7242e119dbmr279728766b.63.1719195826738; Sun, 23 Jun 2024 19:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719195826; cv=none; d=google.com; s=arc-20160816; b=fGufdHnB8VahE6ND/1F0p8yY06m1upexmnBv/Crgmc//yUzV750NTXhJXo49Vzjo8M QOGEoLkXJg/j5PU2sGp6P6NCgqemENWFEinJUeV2NSoIBMiVttlXqIptcHfu0Ixm0S/6 bodVTQRGx+sEsqkSZ5uGHarMVF4YKM/t0/lVVpxNTPeKRG3AguJLZELjWVe8a3f92peW IPBle4n6t4VrhQNhadT6FVm7CuzPHRwcLU+8FmZfDDzBJuOYlO7r3HMjqoRXXzchcvWk iKh229tQOAm23vrW4hLKeVlk2ObvkUzyPSbA0AuHWKEhDPbmIKYjqk8MAVqAuew7FCWv 6H1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=VqJAov2AeAt7YuoUh+mfkC1qmWWZdswNuK0hQTCU1bk=; fh=nhPbArcQT7goT4gR3VvBSAyvRRMItm8/IpBouDHK8kA=; b=rDloi9QynhScv63uv/yI0LlZ55ueJsW7QwetCpYynr9qWKZFKu92KV8TOZSns4ewtZ G16BVh5hBWAozNEquKTu/7DE1KcyNYFkeWcj5LwSI7laQbNI+8NsmAMvPX66eVcqDowQ S3L9Uui+O5GeAnfDqlrsqNAXUmca0SrxHW7qjCa+TmPy1qsWlSOcQZKCrCDWilEqIG5Y hHOlJw3bGzG7dsAUiVV0q+cC8OkBib9Lxcy6nAtQD5vzVP/K71OR4Ye+ZOqZDICcXPTv Dt7Yvyghku0V0OfO2jesnmsKSo22WtReO4NnFJe2s2v7rtMSxLYaaIOZ86ZOQHaOnWs7 15CQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jTJpNaMj; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a724eff23ccsi93568466b.16.2024.06.23.19.23.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 19:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jTJpNaMj; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 32FB4866F6; Mon, 24 Jun 2024 04:23:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="jTJpNaMj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D35018704E; Mon, 24 Jun 2024 04:23:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CE21083989 for ; Mon, 24 Jun 2024 04:23:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-421b9068274so33606695e9.1 for ; Sun, 23 Jun 2024 19:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719195821; x=1719800621; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VqJAov2AeAt7YuoUh+mfkC1qmWWZdswNuK0hQTCU1bk=; b=jTJpNaMjZad6Ur1UuH85Fhx3hI9NJzLTrgTZlP3s+S3fLfHHq0TiYOJ14zriSxfee5 ZrMl5QgSLytwC8QUrfAuJy3y/V/ipk3nVfUCf0ueV3007KZjglqyAnJ5yZnZzc7cqKiI 4MjYHTT/+gEaMiOgvvr+5IVrnmK0vKkyBI1h6IocwnWO/vPOaMWehT16cRqQI22vhZTc n13xdLYM5uCWL5zVXJByCsmtljK8o4jfLPUlvQ07fnpefMHXGD6+A4VdAs/t/0AksWxD YUo9MbPia53hMTPgOClxnduegGgYC6pyQaut/cWfqfbFE0NnvxJAaMIzhvvsNRNWNg/x x8MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719195821; x=1719800621; 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=VqJAov2AeAt7YuoUh+mfkC1qmWWZdswNuK0hQTCU1bk=; b=C6V+Qw0UzAymjW+XB1hZ5TSNSlzMfYM4mGj7SlHMOz7ka4HFw7pf4i6M6ISXOtjQD8 CNNyxUq85J3qlDwLkt1KNAgG2m7WO4OHJqNax54uv4kih/UYi3aFAZWwU6ElIPWjCB10 Q0XOzXRH5xZCEmM7hJeXQnYjDOI8KLduQxpFbZtnLm5+YbhP92sXTbem/DdPWxYCXDmg aTSsrtX+oIAjmc7O64CGxGFgmgdu0rAE4xAFS/SedngUCwMTtITigqBafodq/Xj7JkMS 7OmSOp2/V2rxg75J13ZrXYwJpHhDqlL2wepzXO3Qx8VZSIPQONmZeglt5YDNDDxr3r9M xsKA== X-Gm-Message-State: AOJu0YwipJv94MgxepDs9iMKQ3InP7aiM9MbxmnWqH774vu/EtOJbmgg g3yqNtOd4Ig9aJLEtkaTjUPznQZ3+YWV6rR0y83jzVeONsD3daW4o6Tsh1Dpszw= X-Received: by 2002:a05:600c:3590:b0:424:95be:b627 with SMTP id 5b1f17b1804b1-42495beb6dcmr2150435e9.0.1719195821137; Sun, 23 Jun 2024 19:23:41 -0700 (PDT) Received: from cymric.caleb.rex.connolly.tech ([2a02:8109:aa0d:be00::52af]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57d305616f5sm4121242a12.80.2024.06.23.19.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 19:23:40 -0700 (PDT) From: Caleb Connolly To: Caleb Connolly , Mateusz Kulikowski , Neil Armstrong , Sumit Garg , Tom Rini Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io Subject: [PATCH] spmi: msm: correct mac_channels for v5 controllers Date: Mon, 24 Jun 2024 04:23:29 +0200 Message-ID: <20240624022333.2380607-1-caleb.connolly@linaro.org> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Commit ee1d8aa5ecf7 ("spmi: msm: support controller version 7") broke support for channels > 128 on v5 controllers, resulting in some peripherals (like the power button / pon) working but others (like gpios) reading bogus data. Correct max_channels for v5 controllers. Fixes: ee1d8aa5ecf7 ("spmi: msm: support controller version 7") Signed-off-by: Caleb Connolly Reviewed-by: Neil Armstrong --- drivers/spmi/spmi-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c index 58c676423f40..49aad439648f 100644 --- a/drivers/spmi/spmi-msm.c +++ b/drivers/spmi/spmi-msm.c @@ -270,9 +270,9 @@ static int msm_spmi_probe(struct udevice *dev) priv->max_channels = SPMI_MAX_CHANNELS; } else if (hw_ver < PMIC_ARB_VERSION_V7_MIN) { priv->arb_ver = V5; priv->arb_chnl = core_addr + APID_MAP_OFFSET_V5; - priv->max_channels = SPMI_MAX_CHANNELS; + priv->max_channels = SPMI_MAX_CHANNELS_V5; priv->spmi_cnfg = dev_read_addr_name(dev, "cnfg"); } else { /* TOFIX: handle second bus */ priv->arb_ver = V7;