Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1415948lqt; Wed, 20 Mar 2024 03:26:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRl9B2qXIwdlU0kwKC3grWFeN7Jgve8lDmji/mPrYM/0JK51RG2DhEK31FzLHBa7nfWg21+jBFITRyk59bYrdsGGbuYy52UhKNzWte8g== X-Google-Smtp-Source: AGHT+IFDTtzwLIrxo7GSakZMYhaZaWHjuG5ZYg82lCv6u9ZAnOoriGmDmXuvTCaeoF5JD3sRyoPh X-Received: by 2002:ae9:f70f:0:b0:789:ed83:7546 with SMTP id s15-20020ae9f70f000000b00789ed837546mr12565239qkg.40.1710930404103; Wed, 20 Mar 2024 03:26:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710930404; cv=pass; d=google.com; s=arc-20160816; b=Azg/s87y+bkBDA2fvIkWtPR7Tfvhf7AWV8WCnIw/imLmwe1AZLmofL/bMAVPnRGSQH oFZuvenU1JpiwJ+JGFpk9WQSOAL6HMUgQwrgB900xbe6DafaZ2P8sYDR438iUjY2Mf8y fGWVElnHYrD4zZpQoTuoamrtmXz7Ol49u2WnhUOSvQDgNTjOKNJde9j2dbdjdOx6g7BB QMMSmaUZ7ef6EB6/cNRSfnqX8TQKMnSMynsxPprO7LA04vZoV6sGGfwkVi6zjs6utnai DZwZX4H+2IzZJKoKYl6ix3ZWh42qPfAPNCHlf3v3iA+Mo++H7yGW+cjj9F1YNq/rgkOH UW9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:ironport-sdr; bh=TcQH/y8WeqUoDw2Rte1X5bmY49pdjiS0OAEHBAa8QJg=; fh=wiCHd3sd+nGR6RMzX74j5wvnmiIZ1CMGhEcpQW9vpus=; b=KPtBjeJ7g8N7py94ykl9KGB4KZOgWBcUPw7FPpq6sKMV3BbfCZG6VZNsceYgzhMKFE fSg8nfmUCMPQvWH24t5qyPZ3x4w6DSp+0+83tHFT4Sflce5euSQiPnQqUY49KEB/yyGu TVjdhNSEEx1XyahNX7uAtQ9TUpu4bXytR51zQCrHLkdaFhlknme7hhhZbrs2JZbbDJSc KSfue6fSh5zeyeX2YdVERfZrNkasg7p8axX5rg+aOig6tRwrivJR8qyeGEWkeH4LGYG8 ap7Fab4N5Qnl/j8Zx64EQYGJgAu+IM8omNYABwyAhrIyMhct1eXR3YKtffDH8JznBSOT 6INQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ltts.com dmarc=pass fromdomain=ltts.com); spf=pass (google.com: domain of linux-kernel+bounces-108759-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108759-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ltts.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p14-20020a05620a056e00b007886f252dedsi12826875qkp.391.2024.03.20.03.26.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 03:26:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108759-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ltts.com dmarc=pass fromdomain=ltts.com); spf=pass (google.com: domain of linux-kernel+bounces-108759-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108759-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ltts.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1AD991C22EE2 for ; Wed, 20 Mar 2024 10:26:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72A653D0A3; Wed, 20 Mar 2024 10:26:20 +0000 (UTC) Received: from esa1.ltts.com (unknown [118.185.121.105]) (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 2122D3D978; Wed, 20 Mar 2024 10:26:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.185.121.105 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710930379; cv=none; b=CBmMkPPRWD+q7toM/Ed32254Ew0WNjE69Ijuq5IjbIvF5LrpZieZjcis/9Arwz+5HTGa+nthXD0EfhOwwZu4X5QmMYoqJSeHM4nL4alAL6cEG4M6O00jwSsHLE8lQRcDRxrPi81Q+YVr0Cxb7K1+eLFeWK3iz+r5Voxz7CP+lNU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710930379; c=relaxed/simple; bh=BgjAPOfkt5raQblECWLWWJMM2yuzF55rqslG8e6mH00=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=CIYRpvvQK7hWu18Mqk52FMD9iZUpYCxMX7zfnxCJjv1kfivbaWGYXG2vBSk8WhpirJUv77LZLe2kSwjzQNPuwyrTQVPQLFFKDM3+x+I8ockV4PMUX9XKD5MnU2+xebuThn7XwIfEWOlMdK0CfBjFA8+uOqmTeCX+JuSyMecbUhQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ltts.com; spf=pass smtp.mailfrom=ltts.com; arc=none smtp.client-ip=118.185.121.105 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ltts.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ltts.com IronPort-SDR: j5m5kozr946Jd3WqlH0OBiJgtic5y7EfJKWCNjRyhkmHakzqA62Le/v1+Jn+IP3o4IuvRlxcZO 4cgfvrLNlqdA== Received: from unknown (HELO localhost.localdomain) ([192.168.34.55]) by esa1.ltts.com with ESMTP; 20 Mar 2024 15:56:13 +0530 From: Bhargav Raviprakash To: linux-kernel@vger.kernel.org Cc: m.nirmaladevi@ltts.com, lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jpanis@baylibre.com, devicetree@vger.kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, lgirdwood@gmail.com, broonie@kernel.org, linus.walleij@linaro.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, nm@ti.com, vigneshr@ti.com, kristo@kernel.org, eblanc@baylibre.com, Bhargav Raviprakash Subject: [PATCH v4 00/11] Add support for TI TPS65224 PMIC Date: Wed, 20 Mar 2024 15:55:48 +0530 Message-Id: <20240320102559.464981-1-bhargav.r@ltts.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series modifies the existing TPS6594 drivers to add support for the TPS65224 PMIC device that is a derivative of TPS6594. TPS65224 has a similar register map to TPS6594 with a few differences. SPI, I2C, ESM, PFSM, Regulators and GPIO features overlap between the two devices. TPS65224 is a Power Management IC (PMIC) which provides regulators and other features like GPIOs, Watchdog, Error Signal Monitor (ESM) and Pre-configurable Finite State Machine (PFSM). The SoC and the PMIC can communicate through the I2C or SPI interfaces. The PMIC TPS65224 additionally has a 12-bit ADC. Data Sheet for TPS65224: https://www.ti.com/product/TPS65224-Q1 Driver re-use is applied following the advice of the following series: https://lore.kernel.org/lkml/2f467b0a-1d11-4ec7-8ca6-6c4ba66e5887@baylibre.com/ The features implemented in this series are: - TPS65224 Register definitions - Core (MFD I2C and SPI entry points) - PFSM - Regulators - Pinctrl TPS65224 Register definitions: This patch adds macros for register field definitions of TPS65224 to the existing TPS6594 driver. Core description: I2C and SPI interface protocols are implemented, with and without the bit-integrity error detection feature (CRC mode). PFSM description: Strictly speaking, PFSM is not hardware. It is a piece of code. PMIC integrates a state machine which manages operational modes. Depending on the current operational mode, some voltage domains remain energized while others can be off. PFSM driver can be used to trigger transitions between configured states. Regulators description: 4 BUCKs and 3 LDOs. BUCK12 can be used in dual-phase mode. Pinctrl description: TPS65224 family has 6 GPIOs. Those GPIOs can also serve different functions such as I2C or SPI interface or watchdog disable functions. The driver provides both pinmuxing for the functions and GPIO capability. This series was tested on linux-next tag: next-20240118 Test logs can be found here: https://gist.github.com/LeonardMH/58ec135921fb1062ffd4a8b384831eb0 Changelog v3 -> v4: - Removed ESM MCU interrupts from tps6594.h - Fixing indentation and minor refactoring in regulator - Regarding switch cases in pinctrl, added fields in pinctrl struct and using those to differentiate between chips. Bhargav Raviprakash (8): mfd: tps6594: use volatile_table instead of volatile_reg mfd: tps6594: add regmap config in match data dt-bindings: mfd: ti,tps6594: Add TI TPS65224 PMIC mfd: tps6594-i2c: Add TI TPS65224 PMIC I2C mfd: tps6594-spi: Add TI TPS65224 PMIC SPI mfd: tps6594-core: Add TI TPS65224 PMIC core misc: tps6594-pfsm: Add TI TPS65224 PMIC PFSM arch: arm64: dts: ti: k3-am62p5-sk: Add TPS65224 PMIC support in AM62P dts Nirmala Devi Mal Nadar (3): mfd: tps6594: Add register definitions for TI TPS65224 PMIC regulator: tps6594-regulator: Add TI TPS65224 PMIC regulators pinctrl: pinctrl-tps6594: Add TPS65224 PMIC pinctrl and GPIO .../devicetree/bindings/mfd/ti,tps6594.yaml | 1 + arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 95 +++++ drivers/mfd/tps6594-core.c | 253 ++++++++++-- drivers/mfd/tps6594-i2c.c | 41 +- drivers/mfd/tps6594-spi.c | 43 ++- drivers/misc/tps6594-pfsm.c | 48 ++- drivers/pinctrl/pinctrl-tps6594.c | 258 ++++++++++--- drivers/regulator/Kconfig | 4 +- drivers/regulator/tps6594-regulator.c | 238 ++++++++++-- include/linux/mfd/tps6594.h | 362 +++++++++++++++++- 10 files changed, 1202 insertions(+), 141 deletions(-) base-commit: 2863b714f3ad0a9686f2de1b779228ad8c7a8052 -- 2.25.1