From patchwork Thu Jul 27 13:09:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esteban Blanc X-Patchwork-Id: 13330093 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 D226BC001E0 for ; Thu, 27 Jul 2023 13:10:00 +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=ZWJfk2ZTp5fpV5axkNM9cMQZfHsT1VbUMXNObtYZTvo=; b=4lQ4mAC+adi7md cUflaZpRHG4dYf849BlB6jNra1eYe2IZPtDMG0Gxe8Xw6bUv1DTWkjnhxW3UWDfvlOnt2Edj1hvhH INA7DwZuABMuSCfdm92N2KI29y16UyebzabrY1HI5b+C5K3WWEk5M8T4K5b1B+qlCygFcdHh0Za2z +HTosL2Qfgm5FK6Xyj5Gje3CBWiXxFtiaVZot48ujRDHT5TOFKrvN1cYFaATGIwVI39pku7SBxiiU rBjT+9unNOGGY+r78Q/U6V7+JPpM7LuB3zfvLNA+VZ66eX/AKUzsqKZ4xbINeMTHjVhVsoJT3JbUN 9BrUDz9TKUKlt7aKy42Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qP0kM-00ELxY-10; Thu, 27 Jul 2023 13:09:38 +0000 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qP0jz-00ELcq-2O for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 13:09:19 +0000 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2b74310566cso13771261fa.2 for ; Thu, 27 Jul 2023 06:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1690463353; x=1691068153; 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=/4itNTpZUUmvVIcXRi6M7cnkeb2c9XA1CMXl5ycX4uQ=; b=ezWNoejXx5uyLq/82Mq/6H1qfR6j5SaUNWZG0SMUtrbOqeZuhfflM7AStTePhVKo31 guEq8nN+dWvU0Yy4+UhugB3A3hp2JmITYpaQMIPFnxXQHHEIJvKccE1Fkb7/1t4WNOzt gIiIPby2qzChgnQgRG70locTMPq1jh+cRq5VxROaPA2gXAfsF6/xUUoRlDHzI5WeQCfb +QFlzmecfj+lW/Ia51rFuaQD6C/VYDnjEQdCsrK5RQW62sGF+WsS9YuhR0FMCYPOb2iw 4K3mG4tK+lXPjT5pKZFUUreRdG55e7ayOaUqy7F6uU3IUAtNadxRFYP5fcAIxALFto8t 3fSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690463353; x=1691068153; 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=/4itNTpZUUmvVIcXRi6M7cnkeb2c9XA1CMXl5ycX4uQ=; b=lc+PdsVvYqehk+N5UeN69sVIraVOVwjqbog3IBRBQrWJb2T3VlruXi1BnTDpXHTQpQ REMfxeApMzhx3b6Y3lxn+7LHaAcTtwA3wYfjW3FinvpYSc8pEfrHVeARSqG9TKbEtDIx aUEepreUU1bss1AC/LCgwQmS9kQ3LUDDcnoZMlEBLV7hG91liTvuytha1RfM43k+IC4U cZrwGo/4Y2oKH2vzWWcUqN0truzqjFT9uN9+SgLlPIPYY06Bkdl8TRz85weVJ8wNV+JK iA0Kp39lWj7hCR3SJ9rB1UZuMdDuU+73gOCUcMO88BzVUcqnB2Za+LfSH9D8SQ2p3S2K wTzQ== X-Gm-Message-State: ABy/qLYZEars2tFKZX7olFJKTYQFwDOwQxGSitoDLFKjPC7u5ffITuvQ a5qXRtnymC9mlhoCI/+v5chsjA== X-Google-Smtp-Source: APBJJlHJP4Z7hgn1S972hkZHqwD2CHWt+17a8Jxt40v+a+Yi3QyTnqEv4VE/TMGFXJ/iU0j0rcy8TQ== X-Received: by 2002:a2e:9190:0:b0:2b6:d7d1:95c0 with SMTP id f16-20020a2e9190000000b002b6d7d195c0mr1708675ljg.11.1690463352693; Thu, 27 Jul 2023 06:09:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 06:09:12 -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 3/6] arm64: dts: ti: k3-j721e-som-p0: Add TP6594 family PMICs Date: Thu, 27 Jul 2023 15:09:05 +0200 Message-ID: <20230727130908.10656-4-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_060915_798708_50239F96 X-CRM114-Status: GOOD ( 11.91 ) 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: Jerome Neanne This patch adds support for TPS6594 PMIC family on wakup I2C0 bus. Theses devices 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: Jerome Neanne Signed-off-by: Esteban Blanc --- arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi | 163 ++++++++++++++++++++ 1 file changed, 163 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi index 38ae13cc3aa3..c16dc59e1b0e 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi @@ -152,6 +152,12 @@ J721E_WKUP_IOPAD(0xfc, PIN_INPUT_PULLUP, 0) /* (H24) WKUP_I2C0_SDA */ >; }; + pmic_irq_pins_default: pmic-irq-pins-default { + pinctrl-single,pins = < + J721E_WKUP_IOPAD(0xd4, PIN_INPUT, 7) /* (G26) WKUP_GPIO0_9 */ + >; + }; + mcu_fss0_ospi0_pins_default: mcu-fss0-ospi0-default-pins { pinctrl-single,pins = < J721E_WKUP_IOPAD(0x0000, PIN_OUTPUT, 0) /* MCU_OSPI0_CLK */ @@ -212,6 +218,163 @@ eeprom@50 { compatible = "atmel,24c256"; reg = <0x50>; }; + + tps659413: pmic@48 { + compatible = "ti,tps6594-q1"; + reg = <0x48>; + system-power-controller; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_irq_pins_default>; + interrupt-parent = <&wkup_gpio0>; + interrupts = <9 IRQ_TYPE_EDGE_FALLING>; + ti,primary-pmic; + + gpio-controller; + #gpio-cells = <2>; + + buck12-supply = <&vsys_3v3>; + buck3-supply = <&vsys_3v3>; + buck4-supply = <&vsys_3v3>; + buck5-supply = <&vsys_3v3>; + ldo1-supply = <&vsys_3v3>; + ldo2-supply = <&vsys_3v3>; + ldo3-supply = <&vsys_3v3>; + ldo4-supply = <&vsys_3v3>; + + regulators { + bucka12: buck12 { + regulator-name = "vdd_cpu_avs"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <900000>; + regulator-boot-on; + regulator-always-on; + }; + + bucka3: buck3 { + regulator-name = "vdd_mcu_0v85"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + bucka4: buck4 { + regulator-name = "vdd_ddr_1v1"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-boot-on; + regulator-always-on; + }; + + bucka5: buck5 { + regulator-name = "vdd_phyio_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldoa1: ldo1 { + regulator-name = "vdd1_lpddr4_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldoa2: ldo2 { + regulator-name = "vdd_mcuio_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldoa3: ldo3 { + regulator-name = "vdda_dll_0v8"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldoa4: ldo4 { + regulator-name = "vda_mcu_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; + + tps659411: pmic@4c { + compatible = "ti,tps6594-q1"; + reg = <0x4c>; + system-power-controller; + interrupt-parent = <&wkup_gpio0>; + interrupts = <9 IRQ_TYPE_EDGE_FALLING>; + + gpio-controller; + #gpio-cells = <2>; + + buck1234-supply = <&vsys_3v3>; + buck5-supply = <&vsys_3v3>; + ldo1-supply = <&vsys_3v3>; + ldo2-supply = <&vsys_3v3>; + ldo3-supply = <&vsys_3v3>; + ldo4-supply = <&vsys_3v3>; + + regulators { + buckb1234: buck1234 { + regulator-name = "vdd_core_0v8"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-boot-on; + regulator-always-on; + }; + + buckb5: buck5 { + regulator-name = "vdd_ram_0v85"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + ldob1: ldo1 { + regulator-name = "vdd_sd_dv"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + ldob2: ldo2 { + regulator-name = "vdd_usb_3v3"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + ldob3: ldo3 { + regulator-name = "vdd_io_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldob4: ldo4 { + regulator-name = "vda_pll_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; }; &ospi0 {