From patchwork Fri Apr 14 11:28:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esteban Blanc X-Patchwork-Id: 673201 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F3BBC77B78 for ; Fri, 14 Apr 2023 11:28:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229854AbjDNL24 (ORCPT ); Fri, 14 Apr 2023 07:28:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbjDNL2w (ORCPT ); Fri, 14 Apr 2023 07:28:52 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7E6F2136 for ; Fri, 14 Apr 2023 04:28:50 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id he13so15152588wmb.2 for ; Fri, 14 Apr 2023 04:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1681471729; x=1684063729; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dRzEzVDYA8QwCD288QN5gOIP/Fd6vwp2MgssppqS80U=; b=Ia+D/rHyRkNgC0wCGOhokt7FmOl5yiSbeooEkd5+Ijop8sWarxaIMpKx2+palJ9W7y Ys3Pfpp4KqGwAxVwSwMWl5jK7m8DhIpK/Kswhf/d5gbCHvKO6OBi9HuUUQseXDldOKvp RRGeNQfm48LqCSR0n/oeo9leBCf4yYKqHLTLQ02t5fRullqoU+wr7zrIAKRgpKiDdttI Kakvtd5zuzv+zI/JVMCgZtTeToESxIJW36pQ4NZHmUslZfjmiiBPYfvva6Epk+NSy2gy 8SbtEdAwUcuO4nYhhnU180Ehpaho9xtykGcyVE4Ag+RQx+7byRU0VVm86yNhQcceQY5k s6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681471729; x=1684063729; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dRzEzVDYA8QwCD288QN5gOIP/Fd6vwp2MgssppqS80U=; b=hpUqa0jjXo6oojTBMUC6x2DvKW/fU+NCRf0gI+paWRGzt2X3c2Pco8AByUzbccPCWN jbZ8EBUkZGYTHbGvZdEBp2Aqa23oCFMbfOyC+ww2pmVM9a0xZZxrhSi2Bie6jlsvFVCy XoMOlrl7+SeYuVtDxKq4tbxXxbosoTwQJH8DnD/UOi2GULJkpDdcINoiItbLk7+Y+sE3 bOUYHoM4pHtalyHxSjrOqIZmaBKQrSOQlpm1VODVlZsFv7EO/Af6/DjYs5a3w2DMpWNI 2FIEbsdMtblVOshyFvIbpAZop593RlRHlC0NVbl/3kmm2nY8B56x42r6/CmBezSIAxvW yFEA== X-Gm-Message-State: AAQBX9edMFMJozmzZPk1JO7D39UWSrnk23UWQG6iHTuqlnbUnkMZ0LIn 5OscmVS2FazOop/LdTMUW0r//Q== X-Google-Smtp-Source: AKy350bQQmW7RCQb4ePRyCOrPp88PLet9tgGv/z/o4qVumgykQHTja/p3AFRZKLPAnw+hwSRUfpRXA== X-Received: by 2002:a05:600c:2118:b0:3f0:9eb5:98e0 with SMTP id u24-20020a05600c211800b003f09eb598e0mr4073577wml.37.1681471729284; Fri, 14 Apr 2023 04:28:49 -0700 (PDT) Received: from localhost.localdomain ([2a01:e34:eca6:27f0:42a5:8f07:826a:465d]) by smtp.gmail.com with ESMTPSA id t1-20020a1c7701000000b003ede06f3178sm4063745wmi.31.2023.04.14.04.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 04:28:48 -0700 (PDT) From: Esteban Blanc To: nm@ti.com, vigneshr@ti.com, kristo@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, sterzik@ti.com, u-kumar1@ti.com, eblanc@baylibre.com, jneanne@baylibre.com, jpanis@baylibre.com, aseketeli@baylibre.com Subject: [PATCH v2 5/5] arm64: dts: ti: k3-am62a7-sk: Add support for TPS6593 PMIC Date: Fri, 14 Apr 2023 13:28:43 +0200 Message-Id: <20230414112843.1358067-6-eblanc@baylibre.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230414112843.1358067-1-eblanc@baylibre.com> References: <20230414112843.1358067-1-eblanc@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Julien Panis This patch adds support for TPS6593 PMIC on main I2C0 bus. This device provides regulators (bucks and LDOs), but also GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor) which monitors the SoC error output signal, and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC. Signed-off-by: Julien Panis Signed-off-by: Esteban Blanc --- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 95 +++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts index 5c9012141ee2..99574474ca53 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -191,11 +191,106 @@ AM62AX_IOPAD(0x12c, PIN_INPUT, 0) /* (W16) RGMII1_TX_CTL */ }; }; +&mcu_pmx0 { + status = "okay"; + + pmic_irq_pins_default: pmic-irq-pins-default { + pinctrl-single,pins = < + AM62AX_MCU_IOPAD(0x000, PIN_INPUT, 7) /* (E11) MCU_GPIO0_0 */ + >; + }; +}; + +&mcu_gpio0 { + status = "okay"; +}; + &main_i2c0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&main_i2c0_pins_default>; clock-frequency = <400000>; + + tps659312: tps659312@48 { + compatible = "ti,tps6593-q1"; + reg = <0x48>; + ti,primary-pmic; + system-power-controller; + + gpio-controller; + #gpio-cells = <2>; + + pinctrl-names = "default"; + pinctrl-0 = <&pmic_irq_pins_default>; + interrupt-parent = <&mcu_gpio0>; + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; + + buck123-supply = <&vcc_3v3_sys>; + buck4-supply = <&vcc_3v3_sys>; + buck5-supply = <&vcc_3v3_sys>; + ldo1-supply = <&vcc_3v3_sys>; + ldo2-supply = <&vcc_3v3_sys>; + ldo3-supply = <&buck5>; + ldo4-supply = <&vcc_3v3_sys>; + + regulators { + buck123: buck123 { + regulator-name = "vcc_core"; + regulator-min-microvolt = <715000>; + regulator-max-microvolt = <895000>; + regulator-boot-on; + regulator-always-on; + }; + + buck4: buck4 { + regulator-name = "vcc_1v1"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-boot-on; + regulator-always-on; + }; + + buck5: buck5 { + regulator-name = "vcc_1v8_sys"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo1: ldo1 { + regulator-name = "vddshv5_sdio"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo2: ldo2 { + regulator-name = "vpp_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo3: ldo3 { + regulator-name = "vcc_0v85"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo4: ldo4 { + regulator-name = "vdda_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; }; &main_i2c1 {