From patchwork Thu Jul 27 13:09:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esteban Blanc X-Patchwork-Id: 13330095 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 A04CAC001E0 for ; Thu, 27 Jul 2023 13:10:03 +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=NpUxpL9AkZn4FD5/F/1XYZK3K42eSLsgpHhr9BqMfrc=; b=2dgSFbbk+Z+krN MhonlQWXyYP1J2gv39Qg2iQDoqwsc6bLzlHAqCASoUrz/4wmcQKypvXL55QcOswmQCOMes0W1XqK/ 4oF30ez6cyeUeFNjB/HeQt9qiPMfHUioB1tKTI5NlvIMWic0XUvP1bVb+S5ByqDUEbp/cBIyOsD1E 3ftIfudRwgUQeLeH1XmBF9WWWjdoHclACEcKT7xiwZAHocuJacaDXxA5MEmbOItxjtgFV5tsd2zCx I6xx4P2uMFMmXS3++NGAmeuyo9P6moIYsREDHO1uy7z/RyEK+rgYHs1Fbje5jLEC/XxdPrIgeq2o5 e7fczYLPNew4bzZ3k4iA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qP0kL-00ELwv-2U; Thu, 27 Jul 2023 13:09:37 +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 1qP0k1-00ELfL-0O for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 13:09:19 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fbc5d5746cso10136285e9.2 for ; Thu, 27 Jul 2023 06:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1690463355; x=1691068155; 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=XZVJZt6zaDYlF4FBoDI7miun7OeMIpqJMetrwHAZhg0=; b=hhzFsT9DGIphmkGRN9Con7FHguufDPl4bOhR/mSUcVBiwGFJ0JxU50twS3vK5io679 FAQ1k6pIjLxpyfntqURyDBSBav6Ee5P1ni8BFAMEdNHy5nL3d7IMdNVbLtGS2Esjoukv gPPeWshejn1odiA27o1sTFwvmuDwknNqQvr1/6JD37g6P9mJ1tMDlrwlHAExtU3BL+jF ZpFygnHFdr3WMaI4sXD8vKs03J4SMKvEe49m0KzIlC2x0fy6HwIe0I6w4V9DuFXJEc42 U8arUODvgPWyDkehtKxO/tAFGh+na2+0en4zEt5BnPJzjEQDP8l+zE3JbLHkMb61TogL 7Xaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690463355; x=1691068155; 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=XZVJZt6zaDYlF4FBoDI7miun7OeMIpqJMetrwHAZhg0=; b=IDkcRm8J2EpvcV7MAj7iKLUlOo+foJH3CKMOJkCoMnzofwvIoxge/Jb/RFh5l0dVfG //yfxvom5Nh6Tr1BInzWF5qyw2xgV/pXfYyYrXM3RTbk7jDRtnB5n8oZXKbTukZ4x9Z4 b1M/871tSwiD4wku9PSy5DIm6ol9ECsH00xUa1Xvw53cNk/e8g7cX2xPigQzo5oYx6IL iWYwhMFFOguqmDfHm+sxcn17oXwj+YihSczVuJ1+uRetKwFAjVO0LoNck7dIs8Uv3rBa D7RAUnrJGgeb//nuXFNYN4o2pRvYbDrEYE8Db7TAhNfcBgWaeP4nL7G5IOd1YAMuwOT2 5vAA== X-Gm-Message-State: ABy/qLY+RQvaAh8WH9tTwdVcwjEE/DzErQpz1y+QsXMWXMzxCReG2nxB G2zxNEjMze7PDbe+M5bicSdV/Q== X-Google-Smtp-Source: APBJJlEraBLNJpOPX5qM0THNxSWGe+rDojRJBTN9tck8E159twxKYVGenMkt+rJSsdzQemQeysGO5w== X-Received: by 2002:a05:600c:231a:b0:3fa:95c7:e891 with SMTP id 26-20020a05600c231a00b003fa95c7e891mr1616722wmo.35.1690463355573; Thu, 27 Jul 2023 06:09:15 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:28d:66d0:4512:80d4:6b13:bb70]) by smtp.gmail.com with ESMTPSA id h14-20020a05600c260e00b003fbca942499sm4698042wma.14.2023.07.27.06.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 06:09:15 -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, u-kumar1@ti.com, eblanc@baylibre.com, jneanne@baylibre.com, aseketeli@baylibre.com, jpanis@baylibre.com Subject: [PATCH v4 6/6] arm64: dts: ti: k3-am62a7-sk: Add support for TPS6593 PMIC Date: Thu, 27 Jul 2023 15:09:08 +0200 Message-ID: <20230727130908.10656-7-eblanc@baylibre.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230727130908.10656-1-eblanc@baylibre.com> References: <20230727130908.10656-1-eblanc@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230727_060917_201844_A77FCC22 X-CRM114-Status: GOOD ( 12.33 ) 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 ecc0e13331c4..fbf9c5e2c031 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -221,11 +221,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: pmic@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 {