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: 13211420 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7BA2AC77B72 for ; Fri, 14 Apr 2023 12:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n+DGtOBjQmWO07s/y1vb5qGdLnqE/rDZv59iilWC/Pk=; b=NLt3G7lqzzsGt3 qCFQUxYh89S+xsZY39d0tV/9iHhbpeT577aceDzF/EAYHmSw0sy2cajI14dBodDc/IyyLS+8AKg0B +cCtVSev6AMFGSOUu3H8sZuvczsKqM9st8UwgCHsE0uEwLUQ31eh0cZpZEz9zaKloS5qXgnizGCy8 J/L1H/ocK57sx65oqPt8i6pC1nxidI6t2RbBpzu5mE9Ua0m1piFMIUayLPWByDz1dyYUSkeu3SD4Q i5d8aWjWcroMXYEvE3tFwr/44qYipzl3FnqQuGCj7hEOnKKs8Nbge6an0uVRpJYSygrTx+seln2zT 9xw7EIYTuj273AMbHBGw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pnIZx-009WpT-05; Fri, 14 Apr 2023 12:31:01 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pnHbn-009M1t-2k for linux-arm-kernel@lists.infradead.org; Fri, 14 Apr 2023 11:28:54 +0000 Received: by mail-wm1-x333.google.com with SMTP id hg25-20020a05600c539900b003f05a99a841so17579216wmb.3 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=Dskt/QNRJqCMgUmvK4FHspb70YPIgiKTniLAvsig0368Ldtmas1PJpkyXHY+OKtUpT rX+RlCIK3K3WcKFSZOxv33Lnwt3u5buiEIiihX8x4PurmAshm44KOOngQIB+YYImfyQT MseqQqstS3qq8DRWHoBoHlrui2P3I2g9IOsaXV08GZL/38sCVkUj5Yr6maT7p1LaGd/m JCka6uTVj3FMh4GF8oQWBz7hw/sFoCgGThR0UWL4Ziy721OqvzYJdxvoa7bk6dxipPFa 02SQ5IesdON7leOqkeOVrOsHjdOXI2J294F66M/3xYlTXgx3GspaQrg2ONqIRCk1xEek unww== X-Gm-Message-State: AAQBX9eQxQhuLTkAh17YIPaac9cB6U8XhZOdGZjprdrsqLqgvLLgAcJX NJ/kpX4iBoKV69PNWWV4Q0T2Zg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230414_042851_936130_24A9226A X-CRM114-Status: GOOD ( 12.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 {