From nobody Wed Dec 17 19:20:46 2025 Received: from out21.tophost.ch (out21.tophost.ch [46.232.182.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBFE3A926; Sat, 4 Oct 2025 18:32:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.232.182.230 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759602764; cv=none; b=OsQHhR4sq+mhen5iBpYmgt7RHHJcez4KTa3O65iTh1LqZeQND1bBAV22lWkPAb3/fHRYZXTYCleAALfoM0iWRZGHPiCR7u+anSyxTBH/HgDFxK0R5QRpQZQFrriki1zc8dcF4FVruQF2Zr4oRY35njNg+wfj6Uakf0PSs+1zysM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759602764; c=relaxed/simple; bh=dhLuQ36EqVPpgpUvPcZt+Uq6tFevtT36Fr+HU1vUztM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Oe5BCpP0lOxnCtNoZiPzi9UvWLVWSpjmiMkydbHG5BTH05ieka1oM+vA7UIJxvyw/fqyeMahy2pXwAgEqzfH8/kBzyo2JcR2n76TzMq+2F0wUzfP+u9iSAl7laFTPcdhQ9MafX8bb7K1z4AFqXpJyWcgmw30XSbUEQKGcFMFnn4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wismer.xyz; spf=pass smtp.mailfrom=wismer.xyz; dkim=pass (2048-bit key) header.d=wismer.xyz header.i=@wismer.xyz header.b=J9Zig0om; arc=none smtp.client-ip=46.232.182.230 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wismer.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wismer.xyz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wismer.xyz header.i=@wismer.xyz header.b="J9Zig0om" Received: from srv125.tophost.ch ([194.150.248.5]) by filter1.tophost.ch with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v56cy-0022UG-97; Sat, 04 Oct 2025 20:05:07 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=wismer.xyz; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ge0m7y+x+0Q1fWZRZAOH/ZPRQgmovtE9EcWz9JWjBDk=; b=J9Zig0omEQ3siayFSZxWW5XgMs tI3YuYIZ8d2Lh87sdPSxHwtzalRfn1zbtjKUJqDhpT6JLTRieqkvH8uuA1x6h5jEzzJs+llsZgWkq PdVh8xIIqPSkqwlVLLsMIZ7xbHPV3PbCazpH/MbbbUDYPA+Cc4cy+f2CiM9V2HUNCPTuHpyDaGApv ZQ6jsiPrV14x49j7BtcAeIg1zC/wuYPabdMVt/FD5UpOvnARD75FoIUhFVwc1dbhgbJvERQiZHjYA qJhkaeVVUN9VO8lQIVx4MIZfdUm9d7Gq9tmoqNC0Lr6Qx4+Sr0mQKBvnpaEqxjmhilROahUS473NK X2H+efDw==; Received: from 82-220-106-230.ftth.solnet.ch ([82.220.106.230]:60199 helo=pavilion.lan) by srv125.tophost.ch with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1v56cy-00000001wpX-180A; Sat, 04 Oct 2025 20:05:02 +0200 From: Thomas Wismer To: Oleksij Rempel , Kory Maincent , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Thomas Wismer , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] net: pse-pd: tps23881: Fix current measurement scaling Date: Sat, 4 Oct 2025 20:03:49 +0200 Message-ID: <20251004180351.118779-4-thomas@wismer.xyz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251004180351.118779-2-thomas@wismer.xyz> References: <20251004180351.118779-2-thomas@wismer.xyz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Get-Message-Sender-Via: srv125.tophost.ch: authenticated_id: thomas@wismer.xyz X-Authenticated-Sender: srv125.tophost.ch: thomas@wismer.xyz X-Spampanel-Domain: smtpout.tophost.ch X-Spampanel-Username: 194.150.248.5 Authentication-Results: tophost.ch; auth=pass smtp.auth=194.150.248.5@smtpout.tophost.ch X-Spampanel-Outgoing-Class: unsure X-Spampanel-Outgoing-Evidence: Combined (0.50) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuV5syPzpWv16mXo6WqDDpKEChjzQ3JIZVFF 8HV60IETFiu2SmbhJN1U9FKs8X3+Nt208ASTx3o2OZ4zYnDmkLm5Mv/tafLC72ko3Lqe/Da7zNBC KkXXRI8rBkVaItz/MEFwGYjbvhzWX8Co+5c+eruaCtmoQhY2xrBb8C+tWUvqrqBKsSdhvd/J5sX5 daZjkYsG4jVZi5Tfop5qjCZejidXzthz0vNkOX8Em4cj6D/wdUjFxsH/4KTYIVqFSP1MaBk9W7vD 6C469DIPe8wH3iOJ3xyMg3et4b3PQUopDmbZCssYHNuxAmlPRpR5yzngsxCROUzReCS8EpKh0It9 L25JS816nuiE0t5pG6MLXGczoanVmeCF7bI0BP7dENKtPTBPq+vGO3Vx+SwwWschmkdvs376y2A4 OBi1/UyqO7jQnnICeA+KlS7G8xqewTcs6w6HLg3eq1lKkYVFbZT99AeINpdbOTIWFiLv1jhppNXa xS6MN8xFxlxHZge6OlcoYA//qN5p5dmu6xjQN9nmCfj7VmpmZJyx9iy0UVkVD75IgLollI+8fg4q Ktu8I/h2Z0dHZM6qE0STp2v0JiRE8jhamJNIkblvt3tmDvgtmN4H4BUM9bndab3XlnlqHqi4QKnn k14/ADuPHCWFyNV2T+avjL9wVRCXwYDpBqMLHNY9B2Ak8LmqWByQuE4NgLCNvMovQedDpDK2Sljn CNAO7NpcpxuVcnpyy186dygqpmiD9OtONQZ4S919qVAB9i6zlzTjcVXthHorhNpu23mgOZsC6pUL aCdNIXkTykmnK/9/QX3JlnOAYOwvgs4sv7ykOBxKEjX2P24wm2Xm0Zxro1P7++DuIQUs/5JJj4C/ n4CILsmQ0SO9CeLTQh8bH8PiEW+ElOMr9Bt+m8Nd+m0udqnheQv58dy/2QaHPHC21IdJntHxL8fL MkT6TDHnwvPD+cRl6DbasrEImAe+fJfqFuhNsSc9CgHJcMu7KTfBvyswr4sEMysPur9wmiDBurOy 6iQJ5124E1ny/UQRZHHLkqd13aH9Eyp21gmT7cyCAVA5VCrGu3mBHZ4hEsTvAClo9mqlcyvJWRfO MVjD0Lt1T2BfExAHlwca76VdLw2GWIYs+ljrnXdo8M1GW0TnoMpI3UJ+pvlHhV6a5QjptwQBGybQ vv1ToHZWNpcnifjzWnmjtnV75K45oykd3VjIUdJS/eyxyfnoc8x6re2H7v/VN3foTPbrWOwDJFM1 LKpMibQ88o0ORb/rEGGznznyI8PFeRBLZ0Kc+vvfWass5t8K0zA0uhq/IGZ0cCvl49xdmzHJuw== X-Report-Abuse-To: spam@filter1.tophost.ch X-Complaints-To: abuse@filter1.tophost.ch Content-Type: text/plain; charset="utf-8" From: Thomas Wismer The TPS23881 improves on the TPS23880 with current sense resistors reduced from 255 mOhm to 200 mOhm. This has a direct impact on the scaling of the current measurement. However, the latest TPS23881 data sheet from May 2023 still shows the scaling of the TPS23880 model. Signed-off-by: Thomas Wismer --- drivers/net/pse-pd/tps23881.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c index 63f8f43062bc..b724b222ab44 100644 --- a/drivers/net/pse-pd/tps23881.c +++ b/drivers/net/pse-pd/tps23881.c @@ -62,7 +62,7 @@ #define TPS23881_REG_SRAM_DATA 0x61 =20 #define TPS23881_UV_STEP 3662 -#define TPS23881_NA_STEP 70190 +#define TPS23881_NA_STEP 89500 #define TPS23881_MW_STEP 500 #define TPS23881_MIN_PI_PW_LIMIT_MW 2000 =20 --=20 2.43.0 From nobody Wed Dec 17 19:20:46 2025 Received: from out27.tophost.ch (out27.tophost.ch [46.232.182.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9BF23594B; Sat, 4 Oct 2025 19:09:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.232.182.236 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759604958; cv=none; b=RvnVcLAEAIBy50AkRjSPtvOh/C7iAKzJGBGwxpPYVrnueF/8Eh+YSOA31pU3OchveGD1Nbuq89Nldtzi8FDZkKn0fIEDZQpsnR6F0yxpyOCRhPpmVDN4Hk69QxMXck0tdL5yp+6A7wZP6SYaTaCCYnuvEUME8HDFhqwfayGzFf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759604958; c=relaxed/simple; bh=X6IIicotpxiTjeoPJBOLMa2XyxFKKyq85+MMJKh6TRo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kndp5BPvik6G2AO3lI2da0Kaqf9RYiMcYhNZkb+i/fLV8CGBHRxME+FVmLyPOE44jsTbmyH9dN8rdLViAy6TXkknKCTYSJBZf8TUAjAtVN+H1IAP970Y5u4TNPPtXuxXesMy473fATjQT8yaMFoeGpu0fSCeteC6P+sCFbx8eR8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wismer.xyz; spf=pass smtp.mailfrom=wismer.xyz; dkim=pass (2048-bit key) header.d=wismer.xyz header.i=@wismer.xyz header.b=ams0vU+J; arc=none smtp.client-ip=46.232.182.236 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wismer.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wismer.xyz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wismer.xyz header.i=@wismer.xyz header.b="ams0vU+J" Received: from srv125.tophost.ch ([194.150.248.5]) by filter4.tophost.ch with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v56dB-008dZE-6y; Sat, 04 Oct 2025 20:05:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=wismer.xyz; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=YaOWx/fRrYI9KzDtweomNbmir7rK6cpG0e936mryXyw=; b=ams0vU+J3avJOjmYYIHahV6jBv YZQwFXltCafPhC/s6YMephkGeOp8dZoii0iB41YZtjYpvW77rQ5o2jY+EYnVO3OS7RgPBpG9EKa1H SIMrnf/765U4SqPYO3+p/HjPrFSklrzLzmZM0bv4h/IXQt2HHdFoXdnOy8w+uF1rVTzk1MT5UVgLd htsTuSCsfzno7MYijOr9ORzD7tvnEk63yT85RW3rq/rJveoGRayCQ7mu02sr+fHu4MW4NgTB7cv42 WIwIiUMDkCb+v52FFhllTJSuFJD3ZA/e9bB6ld/yfuRn5+Yev180vPqMQydQKW706Utbq3eOkp6db hWcMq1Pw==; Received: from 82-220-106-230.ftth.solnet.ch ([82.220.106.230]:60199 helo=pavilion.lan) by srv125.tophost.ch with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1v56dA-00000001wpX-3DdC; Sat, 04 Oct 2025 20:05:14 +0200 From: Thomas Wismer To: Oleksij Rempel , Kory Maincent , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Thomas Wismer , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] net: pse-pd: tps23881: Add support for TPS23881B Date: Sat, 4 Oct 2025 20:03:51 +0200 Message-ID: <20251004180351.118779-6-thomas@wismer.xyz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251004180351.118779-2-thomas@wismer.xyz> References: <20251004180351.118779-2-thomas@wismer.xyz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Get-Message-Sender-Via: srv125.tophost.ch: authenticated_id: thomas@wismer.xyz X-Authenticated-Sender: srv125.tophost.ch: thomas@wismer.xyz X-Spampanel-Domain: smtpout.tophost.ch X-Spampanel-Username: 194.150.248.5 Authentication-Results: tophost.ch; auth=pass smtp.auth=194.150.248.5@smtpout.tophost.ch X-Spampanel-Outgoing-Class: ham X-Spampanel-Outgoing-Evidence: SB/global_tokens (1.28762366459e-05) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuVi2akg9UvFd2ua6fN7K9qw7pAicyIPYL+A xiWia1vhbSu2SmbhJN1U9FKs8X3+Nt208ASTx3o2OZ4zYnDmkLm5Mv/tafLC72ko3Lqe/Da7zLf8 ktPpXAA3CeWTUS9HatGeCqjodN89yZ5dSG6xQt1sCtmoQhY2xrBb8C+tWUvqrqBKsSdhvd/J5sX5 daZjkYsG4jVZi5Tfop5qjCZejidXzthz0vNkOX8Em4cj6D/wdel5pGtBZGkILbtkwjuL+TU9W7vD 6C469DIPe8wH3iOJTcWsqU26dvDcYIYzaKVPzizNp/gleLRyr2ddmlcu+i1jPgDrl7KDWN+JeAU8 1aNgksp0UtIrN0U07614AkdB++MTbkn6z1fsm8NoMVdUr8MDPUrsZkS8fIjQg/OlnCq9AIC5Z5Eo vuL59tfrqmU9AeFRYyZjHLqYAy4+QNNyid5H8SumKJ6G2ITZ1QpN+fKlKhj6uW6qT1824h/4yzd+ H8TZI7fFfQwiuwD2LcLdqjNFmtMtCFuKzK3WYzvpld0/yccMnl06aHo07R+V2VbvDXc+galx1KGI Pp5jnkiI48S3blKfwQpggXpr4ijI5V97nizzgiBlcUwLhZK/ZHw1RdpNQJ37uqLsFt7+YGhJkDU9 4+PQCJgyeQ5hmX4W3XfjuZq3ey7jWD75mz2FgepuKE1QHL+v8HSjw4E9FZ48n35YGxLcRm31r7HJ L906rtNSlbyOZqJAl0NcWR3h5RCCpdhlI2FswyUM1YB4pb6NihzVEQJD0k3NJ3BxI7jJWMBode2U Svel4Ph4LtRWGzmVykX/svZHtlcv4/x61HBbxR8gr/U0flMcy2Vi/IcBgY4ane5tOXPRIqHUx6+W zGK5Hg6zly/hm7kTCa25PmFuNjYUvwsQEI5UkfpCg7AUhDMCPBbeqGTYbMVyDujNe4sJRauodX0r OWGdLvp0AmQc5PA08uQ3B+geyZWhLXoJPBYE7fs8i/Lg4VMmqeqQOhF8kMn3arb1xVlaLjgbxjTB gAHkgTtbIGX4Gktj7c2CONolFYbP7eetTUcNPZF8UuWWRQPHxHs4uWfEMXRAPK2SKfClf4PqAkNV ZDxegoc9+nSx1zi/m+kogemLltU8nWR6eNXl1Kc2a+wlKs+ogYIxcMllcGL2FYQA/TYqr07UQr9N 8YzZ1OXdAJhrEGn8vjZdfatsJHAzgC46MYYXOcKJkR5mWDA3wLMqtkpqhq8QHjwHB17Mh03hOC2D 8X08bmfUo2hx63fUqSBCUpmH010fZI9bHEjTkiJxSPqFbdrqtFE8gK0UxPGon/0gulkiYXfVWWO3 KRWMcR+Z5yTvtzkwsDU= X-Report-Abuse-To: spam@filter1.tophost.ch X-Complaints-To: abuse@filter1.tophost.ch Content-Type: text/plain; charset="utf-8" From: Thomas Wismer The TPS23881B device requires different firmware, but has a more recent ROM firmware. Since no updated firmware has been released yet, the firmware loading step must be skipped. The device runs from its ROM firmware. Signed-off-by: Thomas Wismer --- drivers/net/pse-pd/tps23881.c | 65 +++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c index b724b222ab44..f45c08759082 100644 --- a/drivers/net/pse-pd/tps23881.c +++ b/drivers/net/pse-pd/tps23881.c @@ -55,8 +55,6 @@ #define TPS23881_REG_TPON BIT(0) #define TPS23881_REG_FWREV 0x41 #define TPS23881_REG_DEVID 0x43 -#define TPS23881_REG_DEVID_MASK 0xF0 -#define TPS23881_DEVICE_ID 0x02 #define TPS23881_REG_CHAN1_CLASS 0x4c #define TPS23881_REG_SRAM_CTRL 0x60 #define TPS23881_REG_SRAM_DATA 0x61 @@ -1012,8 +1010,28 @@ static const struct pse_controller_ops tps23881_ops = =3D { .pi_get_pw_req =3D tps23881_pi_get_pw_req, }; =20 -static const char fw_parity_name[] =3D "ti/tps23881/tps23881-parity-14.bin= "; -static const char fw_sram_name[] =3D "ti/tps23881/tps23881-sram-14.bin"; +struct tps23881_info { + u8 dev_id; /* device ID and silicon revision */ + const char *fw_parity_name; /* parity code firmware file name */ + const char *fw_sram_name; /* SRAM code firmware file name */ +}; + +enum tps23881_model { + TPS23881, + TPS23881B, +}; + +static const struct tps23881_info tps23881_info[] =3D { + [TPS23881] =3D { + .dev_id =3D 0x22, + .fw_parity_name =3D "ti/tps23881/tps23881-parity-14.bin", + .fw_sram_name =3D "ti/tps23881/tps23881-sram-14.bin", + }, + [TPS23881B] =3D { + .dev_id =3D 0x24, + /* skip SRAM load, ROM firmware already IEEE802.3bt compliant */ + }, +}; =20 struct tps23881_fw_conf { u8 reg; @@ -1085,16 +1103,17 @@ static int tps23881_flash_sram_fw_part(struct i2c_c= lient *client, return ret; } =20 -static int tps23881_flash_sram_fw(struct i2c_client *client) +static int tps23881_flash_sram_fw(struct i2c_client *client, + const struct tps23881_info *info) { int ret; =20 - ret =3D tps23881_flash_sram_fw_part(client, fw_parity_name, + ret =3D tps23881_flash_sram_fw_part(client, info->fw_parity_name, tps23881_fw_parity_conf); if (ret) return ret; =20 - ret =3D tps23881_flash_sram_fw_part(client, fw_sram_name, + ret =3D tps23881_flash_sram_fw_part(client, info->fw_sram_name, tps23881_fw_sram_conf); if (ret) return ret; @@ -1412,6 +1431,7 @@ static int tps23881_setup_irq(struct tps23881_priv *p= riv, int irq) static int tps23881_i2c_probe(struct i2c_client *client) { struct device *dev =3D &client->dev; + const struct tps23881_info *info; struct tps23881_priv *priv; struct gpio_desc *reset; int ret; @@ -1422,6 +1442,10 @@ static int tps23881_i2c_probe(struct i2c_client *cli= ent) return -ENXIO; } =20 + info =3D device_get_match_data(dev); + if (!info) + return -EINVAL; + priv =3D devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; @@ -1440,7 +1464,7 @@ static int tps23881_i2c_probe(struct i2c_client *clie= nt) * to Load TPS2388x SRAM and Parity Code over I2C" (Rev E)) * indicates we should delay that programming by at least 50ms. So * we'll wait the entire 50ms here to ensure we're safe to go to the - * SRAM loading proceedure. + * SRAM loading procedure. */ msleep(50); } @@ -1449,20 +1473,26 @@ static int tps23881_i2c_probe(struct i2c_client *cl= ient) if (ret < 0) return ret; =20 - if (FIELD_GET(TPS23881_REG_DEVID_MASK, ret) !=3D TPS23881_DEVICE_ID) { + if (ret !=3D info->dev_id) { dev_err(dev, "Wrong device ID\n"); return -ENXIO; } =20 - ret =3D tps23881_flash_sram_fw(client); - if (ret < 0) - return ret; + if (info->fw_sram_name) { + ret =3D tps23881_flash_sram_fw(client, info); + if (ret < 0) + return ret; + } =20 ret =3D i2c_smbus_read_byte_data(client, TPS23881_REG_FWREV); if (ret < 0) return ret; =20 - dev_info(&client->dev, "Firmware revision 0x%x\n", ret); + if (ret =3D=3D 0xFF) + dev_warn(&client->dev, "Device entered safe mode\n"); + else + dev_info(&client->dev, "Firmware revision 0x%x%s\n", ret, + ret =3D=3D 0x00 ? " (ROM firmware)" : ""); =20 /* Set configuration B, 16 bit access on a single device address */ ret =3D i2c_smbus_read_byte_data(client, TPS23881_REG_GEN_MASK); @@ -1504,7 +1534,14 @@ static const struct i2c_device_id tps23881_id[] =3D { MODULE_DEVICE_TABLE(i2c, tps23881_id); =20 static const struct of_device_id tps23881_of_match[] =3D { - { .compatible =3D "ti,tps23881", }, + { + .compatible =3D "ti,tps23881", + .data =3D &tps23881_info[TPS23881] + }, + { + .compatible =3D "ti,tps23881b", + .data =3D &tps23881_info[TPS23881B] + }, { }, }; MODULE_DEVICE_TABLE(of, tps23881_of_match); --=20 2.43.0 From nobody Wed Dec 17 19:20:46 2025 Received: from out10.tophost.ch (out10.tophost.ch [46.232.182.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C5B467260F; Sat, 4 Oct 2025 18:40:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.232.182.219 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759603260; cv=none; b=q1ekXwu5BQOfrHWiVcUC1bd7i9uPTV0Thd8RAokGqpAOHb8humWKLKLDMHdqXR+QxMd4SGKyZSU7WjKgMEho5Zgg1kObKCHKU1xL7PeN5vvYvJZTwLlSyFPqepZ4k9IkqiFNmu+ORjezY45HEd7xUXHZVUDK3WxGjM6uVZwlCyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759603260; c=relaxed/simple; bh=pMJSuCl+TAn4TlJ1+CiVZJ/lbugUWZ++SAVWt3hVpVs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gZhayyImTpF3u4/trN6afRs1ntwI6t3/vmg15muUx08vEpNeLfiC3BKAaXHdDlM/ZPO+bQexvFqClYcHLo5xR4e1bKoHCN23wwuV5zLq8dg0EmE9p+CjB9E5XY/VJj1xxWRqCm03ED0A5/fCNjwGevZsIS1dusLh+op+XUbP830= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wismer.xyz; spf=pass smtp.mailfrom=wismer.xyz; dkim=pass (2048-bit key) header.d=wismer.xyz header.i=@wismer.xyz header.b=HrgV/qn4; arc=none smtp.client-ip=46.232.182.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=wismer.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wismer.xyz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wismer.xyz header.i=@wismer.xyz header.b="HrgV/qn4" Received: from srv125.tophost.ch ([194.150.248.5]) by filter2.tophost.ch with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v56dQ-007JNM-7o; Sat, 04 Oct 2025 20:05:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=wismer.xyz; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=El79h/tKOjOUBJeKnSvCr7/LIlvQMxmr8FHQYThloIY=; b=HrgV/qn40leBtb5c4pMoRTIJ+p HoQ0bTOShVg/derjWVMFRs9hL2M9Z22r3iTSzZwMtSkgMisVFQQ/kHlq/4Orc9o+Z4HrTE4aNhA4G /WCLpklKavKYa67Enm6Ex+b+EXTFbuEaglO61WdxZdHSfWjJOvbhtsvE7lE6c8wE3mCHwg3tLW8pw FXjipppA3N8qu10k1i/Juu4zAVvrx4ozbq2vToIkEzxTTcyIll7P26dhiyGBaykp7pHo+mtwpxDMb z4/jsQELRntsyM0dXj+UZkIPokSfZW5+V/U/MgVvL6cu7tOSVyxxBBjpa7IDDXNS+iYD63YzC6u4I R/JEbyyQ==; Received: from 82-220-106-230.ftth.solnet.ch ([82.220.106.230]:60199 helo=pavilion.lan) by srv125.tophost.ch with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1v56dS-00000001wpX-0lQM; Sat, 04 Oct 2025 20:05:31 +0200 From: Thomas Wismer To: Oleksij Rempel , Kory Maincent , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Thomas Wismer , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] dt-bindings: pse-pd: ti,tps23881: Add TPS23881B Date: Sat, 4 Oct 2025 20:03:53 +0200 Message-ID: <20251004180351.118779-8-thomas@wismer.xyz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251004180351.118779-2-thomas@wismer.xyz> References: <20251004180351.118779-2-thomas@wismer.xyz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Get-Message-Sender-Via: srv125.tophost.ch: authenticated_id: thomas@wismer.xyz X-Authenticated-Sender: srv125.tophost.ch: thomas@wismer.xyz X-Spampanel-Domain: smtpout.tophost.ch X-Spampanel-Username: 194.150.248.5 Authentication-Results: tophost.ch; auth=pass smtp.auth=194.150.248.5@smtpout.tophost.ch X-Spampanel-Outgoing-Class: unsure X-Spampanel-Outgoing-Evidence: Combined (0.50) X-Recommended-Action: accept X-Filter-ID: 9kzQTOBWQUFZTohSKvQbgI7ZDo5ubYELi59AwcWUnuV5syPzpWv16mXo6WqDDpKEChjzQ3JIZVFF 8HV60IETFiu2SmbhJN1U9FKs8X3+Nt208ASTx3o2OZ4zYnDmkLm5Mv/tafLC72ko3Lqe/Da7zAy+ i6SmItLXxqJRd5s9GHFwGYjbvhzWX8Co+5c+eruaCtmoQhY2xrBb8C+tWUvqrqBKsSdhvd/J5sX5 daZjkYsG4jVZi5Tfop5qjCZejidXzthz0vNkOX8Em4cj6D/wdR983ISMXlZYfkTQnVvsLb89W7vD 6C469DIPe8wH3iOJ3xyMg3et4b3PQUopDmbZCssYHNuxAmlPRpR5yzngsxCROUzReCS8EpKh0It9 L25JS816nuiE0t5pG6MLXGczoanVmeCF7bI0BP7dENKtPTBPq+vGO3Vx+SwwWschmkdvs376y2A4 OBi1/UyqO7jQnnICeA+KlS7G8xqewTcs6w6HLg3eq1lKkYVFbZT99AeINpdbOTIWFiLv1jhppNXa xS6MN8xFxlxHZge6OlcoYA//qN5p5dmu6xjQN9nmCfj7VmpmZJyx9iy0UVkVD75IgLollI+8fg4q Ktu8I/h2Z0dHZM6qE0STp2v0JiRE8jha5ZR/nf5efcITxrfNKzy0W9Bd37g8M9SCqD8uOq9nJ+Mm AyVp7BgHET6y8CCeFlQ7QPOIjlkSAfAYMUguLL/iJ9vYqKPILmSoZcvfXhdPMA/OB6L3DS5gd1SE E3USj80Z55NePwA7jxwlhcjVdk/mr85ytrd63MVeviF0i7IZfcqGEigUra+zu74YMVqBb/nqBf/o O9ENx2nriip8WhgYbnEnhEbOEzk5yB9ZHNSFnOUf5Q/AoIx5sTYq7iOI4vCrDScUfr46OzpJNOSz cdwyiT3dKxLhoxcmaInYbR5vlqGvSe+dDtUIqP45C5A7LqP3b1xqO73zx9HsLZFTQ55zlz9aPc+7 R744868L+j9WjFdaiDCoaRMMLJurWmXEnoYHaIfVaCHpEB6cFH6WJxE4ZpdasxsGznVQ8gQCuamI BuRJXA+qrcHrLEisg/Q99QAygcqaTSs0HzwuLL0f52h9QlQSo1zEvYJi0O+7gv2MANPskD2hG/WB q49TQI4s7Zk25QzEh4fdO1UVosIGSxnPvA8wgBLtVZogJpSXh3l1gykJmv2lNIo4lDSAwCBIOnEB yG0AYw9A3oZxIE5agCoT+NXj8sDMDsREHLIWEHS8KIc6lVqPCo/SwFbRV8YvNj9QUec8VPZi63hI VDdSxAySkA2y1dwxX/fOLxBYDd5BmItKTzNBSIyW/mb8GD9YbxmVCZr9pTSKOJQ0gMAgSDpxAXyp F5LUwHZNY/+yVAGZIWgbevr4I2GfjWs7NecHzbPrZnM57PQ4Zhz+lPAiIO8rB9tRBN1MQm1SbNQ8 mfig9wuAva9NlDz7O8ptuOziYJtS9jihx+Za/cV70jOJzN2r4A== X-Report-Abuse-To: spam@filter1.tophost.ch X-Complaints-To: abuse@filter1.tophost.ch Content-Type: text/plain; charset="utf-8" From: Thomas Wismer Add the TPS23881B I2C power sourcing equipment controller to the list of supported devices. Signed-off-by: Thomas Wismer Acked-by: Conor Dooley --- Documentation/devicetree/bindings/net/pse-pd/ti,tps23881.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/pse-pd/ti,tps23881.yaml = b/Documentation/devicetree/bindings/net/pse-pd/ti,tps23881.yaml index bb1ee3398655..0b3803f647b7 100644 --- a/Documentation/devicetree/bindings/net/pse-pd/ti,tps23881.yaml +++ b/Documentation/devicetree/bindings/net/pse-pd/ti,tps23881.yaml @@ -16,6 +16,7 @@ properties: compatible: enum: - ti,tps23881 + - ti,tps23881b =20 reg: maxItems: 1 --=20 2.43.0