From nobody Sun Feb 8 05:37:37 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 AC5A92FE568; Wed, 12 Nov 2025 09:45:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940738; cv=none; b=uxPRTwRYEt9TlVVQbnggsFyzT+heUOzeb64gQ8wRi86y2YBGdUA9qCk9Gb7xuj12qqlIo3IpHb6RAouTaLA6UgHXgLl7hzs+QBqowOwK9jzQig8+XgaBYHlMYTNvOfIr+E9QHeGmUF0hsyj8320HvvBPYiFxHvUMGmcgIjczd80= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940738; c=relaxed/simple; bh=mLuzNV/tT6gKT4g9bK/Ute2cqhVefOMDFTraOTFzmw8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rVFBaeiTAOA8YkErNLuYBtRkH9ZkPkvMKtOLh2ToFVEQScq7ORx/u4vmxKmlgjHX6ilwoGhD1taZmD2tVpQfEtvmUSSEP75N1v72sz/QvE8ZKdHMlxRpr27W+BPa5okpxdQcKAp2UO/+iiLPNR9gK6Ao2oL186EQYopebtWpfTA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=wbzMQ6JZ; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="wbzMQ6JZ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 63793C0F55F; Wed, 12 Nov 2025 09:45:12 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 042216070B; Wed, 12 Nov 2025 09:45:34 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id E452210371996; Wed, 12 Nov 2025 10:45:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1762940732; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=SrgPhVYzot3NWRz/WiAinbX7Yf1I2w+dgr+AbFgHKVg=; b=wbzMQ6JZ7XI74M+GM70CbsbX3EpysLrVhfq1oHKbuy3qplQNT+ulzIHG8hriS+HKZgKDwu oE9u61uqJEdDVPTr3V4K7t5KmFTJKxQrDxWWmNStCDfiLBi26Axq5VruZuwcQ5M7hyAd7n FVbilEFYI9dDszjqjbwwPiPyrRwTUz3F/8KwcfryNwzIbbrwQXMBs0I/izhMimRTMnawaW DwaS3bsANnhwwbcEL77DvvzKlyMYonb5PpkLxisnSCM6/wmHECRQ7m+okb9AJ3DFEcu04L OiVVLgehOMetVoSW3faJzLcR25GDVPEC3+nt4E3XhL8S0lYaswCswS3TYtvvZg== From: "Kory Maincent (TI.com)" Date: Wed, 12 Nov 2025 10:45:24 +0100 Subject: [PATCH v3 1/2] mfd: tps65219: Implement LOCK register handling for TPS65214 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: quoted-printable Message-Id: <20251112-fix_tps65219-v3-1-e49bab4c01ce@bootlin.com> References: <20251112-fix_tps65219-v3-0-e49bab4c01ce@bootlin.com> In-Reply-To: <20251112-fix_tps65219-v3-0-e49bab4c01ce@bootlin.com> To: Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , Lee Jones , Shree Ramamoorthy , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Andrew Davis , Bajjuri Praneeth , Thomas Petazzoni , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, "Kory Maincent (TI.com)" , stable@vger.kernel.org X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 The TPS65214 PMIC variant has a LOCK_REG register that prevents writes to nearly all registers. Implement custom regmap operations that automatically unlock before writes and re-lock afterwards for TPS65214, while leaving other chip variants unaffected. The implementation follows the regmap-i2c design pattern. Cc: stable@vger.kernel.org Fixes: 7947219ab1a2d ("mfd: tps65219: Add support for TI TPS65214 PMIC") Reviewed-by: Shree Ramamoorthy Signed-off-by: Kory Maincent (TI.com) --- Changes in v3: - Removed unused variable. Changes in v2: - Setup a custom regmap_bus only for the TPS65214 instead of checking the chip_id every time reg_write is called. --- drivers/mfd/tps65219.c | 49 ++++++++++++++++++++++++++++++++++++++++= +++- include/linux/mfd/tps65219.h | 2 ++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c index 65a952555218d..d31e808faab1f 100644 --- a/drivers/mfd/tps65219.c +++ b/drivers/mfd/tps65219.c @@ -473,6 +473,48 @@ static const struct tps65219_chip_data chip_info_table= [] =3D { }, }; =20 +static int tps65214_reg_write(void *context, unsigned int reg, unsigned in= t val) +{ + struct i2c_client *i2c =3D context; + int ret; + + if (val > 0xff || reg > 0xff) + return -EINVAL; + + ret =3D i2c_smbus_write_byte_data(i2c, TPS65214_REG_LOCK, + TPS65214_LOCK_ACCESS_CMD); + if (ret) + return ret; + + ret =3D i2c_smbus_write_byte_data(i2c, reg, val); + if (ret) + return ret; + + return i2c_smbus_write_byte_data(i2c, TPS65214_REG_LOCK, 0); +} + +static int tps65214_reg_read(void *context, unsigned int reg, unsigned int= *val) +{ + struct i2c_client *i2c =3D context; + int ret; + + if (reg > 0xff) + return -EINVAL; + + ret =3D i2c_smbus_read_byte_data(i2c, reg); + if (ret < 0) + return ret; + + *val =3D ret; + + return 0; +} + +static const struct regmap_bus tps65214_regmap_bus =3D { + .reg_write =3D tps65214_reg_write, + .reg_read =3D tps65214_reg_read, +}; + static int tps65219_probe(struct i2c_client *client) { struct tps65219 *tps; @@ -491,7 +533,12 @@ static int tps65219_probe(struct i2c_client *client) chip_id =3D (uintptr_t)i2c_get_match_data(client); pmic =3D &chip_info_table[chip_id]; =20 - tps->regmap =3D devm_regmap_init_i2c(client, &tps65219_regmap_config); + if (chip_id =3D=3D TPS65214) + tps->regmap =3D devm_regmap_init(&client->dev, + &tps65214_regmap_bus, client, + &tps65219_regmap_config); + else + tps->regmap =3D devm_regmap_init_i2c(client, &tps65219_regmap_config); if (IS_ERR(tps->regmap)) { ret =3D PTR_ERR(tps->regmap); dev_err(tps->dev, "Failed to allocate register map: %d\n", ret); diff --git a/include/linux/mfd/tps65219.h b/include/linux/mfd/tps65219.h index 55234e771ba73..198ee319dd1db 100644 --- a/include/linux/mfd/tps65219.h +++ b/include/linux/mfd/tps65219.h @@ -149,6 +149,8 @@ enum pmic_id { #define TPS65215_ENABLE_LDO2_EN_MASK BIT(5) #define TPS65214_ENABLE_LDO1_EN_MASK BIT(5) #define TPS65219_ENABLE_LDO4_EN_MASK BIT(6) +/* Register Lock */ +#define TPS65214_LOCK_ACCESS_CMD 0x5a /* power ON-OFF sequence slot */ #define TPS65219_BUCKS_LDOS_SEQUENCE_OFF_SLOT_MASK GENMASK(3, 0) #define TPS65219_BUCKS_LDOS_SEQUENCE_ON_SLOT_MASK GENMASK(7, 4) --=20 2.43.0 From nobody Sun Feb 8 05:37:37 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 AE8952FDC5B for ; Wed, 12 Nov 2025 09:45:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940739; cv=none; b=Xo06QiRXIeLYIDun6jE2nSDONV1qh3qLtaO/Ya/uiBJHPwKEdleLw6AMm3beBPf5z48rrTzGF9kiY5PprJQ4UmstbtMFxeV3DKGxo+Abs0VbuO3WkPoho+xpKFkpqjrnD6Tuu1VTwCoxREtjr7XrlnSdaSOp7lfRQWwciqFrVfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762940739; c=relaxed/simple; bh=hMJzIR4lZEcblXjR0I9hzQzbHScfcP0F6rIKaU7ffA4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BdOj4hVp4w1VxrBF28SDHfeNZkEI4d1IpaNdlsRd2+bjMXKxYz0V2TKzsR5LGcNg8+Uj42mhkUlPhyIjJkQeov5htP7wEN9JXfwR48h3dXATewhfSgzSHeacWeONSEwZ6defuzr0awGCwkMQJB1qRygNBHooC8SeKNChEcBb2wI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=p+3jHZwp; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="p+3jHZwp" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 38C511A1A09; Wed, 12 Nov 2025 09:45:36 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 07ECD6070B; Wed, 12 Nov 2025 09:45:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 208C810371997; Wed, 12 Nov 2025 10:45:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1762940735; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Hi/5WmyJVI8+IqSzvn7iNXPzQu9SoH12tl/3+e8BE4I=; b=p+3jHZwp/F/hDJYWcsKK2sHZ1LrLMeUS570EZnkVw6var4BvdZeI8zx3O3tgU6pTXx7k7R j8FkxliIWs7H3+HK6zyItES3GsFgEj5KpUoS5WisYgjg5WWxvMcW4B0XFVn/yPpjS4QReI CyGJ9hsUBnPpNx3i08+xdNAUnMCtf7hYlJoeg6BOHKxAy8W4CSlQZfheoPTaaCwgYb9R4x pyb+Q0PSHbao5YON3asqQVV10kXLlYB2ScnNJ6fOfm8752kWiZ9kOVY7Tmrcu0lrw0Q+85 +HTAZ/ecBYocdMlsy5LsdQmYhaDrMsGdlCLHXTRhQYZsIF/COpcFEy7bHyt8YQ== From: "Kory Maincent (TI.com)" Date: Wed, 12 Nov 2025 10:45:25 +0100 Subject: [PATCH v3 2/2] ARM: dts: am335x-bonegreen-eco: Enable 1GHz OPP by increasing vdd_mpu voltage 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: quoted-printable Message-Id: <20251112-fix_tps65219-v3-2-e49bab4c01ce@bootlin.com> References: <20251112-fix_tps65219-v3-0-e49bab4c01ce@bootlin.com> In-Reply-To: <20251112-fix_tps65219-v3-0-e49bab4c01ce@bootlin.com> To: Aaro Koskinen , Andreas Kemnade , Kevin Hilman , Roger Quadros , Tony Lindgren , Lee Jones , Shree Ramamoorthy , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Andrew Davis , Bajjuri Praneeth , Thomas Petazzoni , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, "Kory Maincent (TI.com)" X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 The vdd_mpu regulator maximum voltage was previously limited to 1.2985V, which prevented the CPU from reaching the 1GHz operating point. This limitation was put in place because voltage changes were not working correctly, causing the board to stall when attempting higher frequencies. With the recent TPS65219 PMIC driver fixes that properly implement the LOCK register handling, voltage transitions now work reliably. Increase the maximum voltage to 1.3515V to allow the full 1GHz OPP to be used. Reviewed-by: Shree Ramamoorthy Signed-off-by: Kory Maincent (TI.com) --- arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts b/arch/arm/= boot/dts/ti/omap/am335x-bonegreen-eco.dts index d21118cdb6c2c..f00abfdd2cbd4 100644 --- a/arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts +++ b/arch/arm/boot/dts/ti/omap/am335x-bonegreen-eco.dts @@ -63,7 +63,7 @@ regulators { buck1: buck1 { regulator-name =3D "vdd_mpu"; regulator-min-microvolt =3D <925000>; - regulator-max-microvolt =3D <1298500>; + regulator-max-microvolt =3D <1351500>; regulator-boot-on; regulator-always-on; }; --=20 2.43.0