From patchwork Wed Mar 29 14:29:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esteban Blanc X-Patchwork-Id: 13192661 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 5F338C77B62 for ; Wed, 29 Mar 2023 14:30:58 +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=8uJ0Hec/c4rBSICHkIjPK55LmFiUZzPOprnyv6gLRc8=; b=OIgFlt/2iyno3a zq978MANbRUJsonsj6jBlTY7uyF/s59QPqChwdp8GEKufY31WvfUDFC2uxPVUksm1+tiyweLZpb6U XTcWF5KYwmrd5v0QBiVR4N2FRD/KNqXxagegRSYgKepTr2YUwGqbg7nRB42Fj57dpn+Z8sjLo/dGJ ipfgsjaX1Y7AQx7HHvMTIJGvAQWF8dAiybPwgXCqORu9KpK2CnC5YuDN6WBLS6CUxtqwLLI4n+kFv 7Ass3X2aR/f1uOneYs13YscKIwWJiV0EG2F6pw1C/w4p0hbvvr0suWGkpDzp4jQl/DZMhmWHeJAs1 lx79j/aiNACfUeCBX+3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phWoJ-000cJw-21; Wed, 29 Mar 2023 14:29:59 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phWoG-000cI8-13 for linux-arm-kernel@lists.infradead.org; Wed, 29 Mar 2023 14:29:58 +0000 Received: by mail-wr1-x42b.google.com with SMTP id r29so15924441wra.13 for ; Wed, 29 Mar 2023 07:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; t=1680100192; 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=qUkRftc1arMasTaD91LeIsdGy3wyosmCK6xDxEVsBSM=; b=cL/OkXlvlNIu70DIajIwEIFcy85ubqK2KpxsyByJw0ZjljxoKsehPsItqX1BBNI15L uOhQHbzFkw4jdJCeZFHryip53d7OSvqubdc0PM/AgxXUUgt09KUL9W8qiZRL7HTnfVSA 6vDrptq5zUv0dJgHGcXBiExhYdEvvVkilUOYpJG+tQu+obhLr0Jwao6uJ3BA7SUK4kxZ IIUySv+TxBLU24DsePS3SClbtcxpyohJzOxLFfB3mPRacv+r1ZPNOxikdsCN2TrgWNSJ ui6DenUraIFWla5pMPK/ximGy3XpEpgb/H12uHsjSX8vQKixanN1V/8ehrDeisp+XhI3 CVWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680100192; 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=qUkRftc1arMasTaD91LeIsdGy3wyosmCK6xDxEVsBSM=; b=2koZ1DCHiV3Dkf/o91Kt6dPMZRFY0WMA6O7/Z12Vqzhbd7Vg/RDqCiZvmhbCt0CG7H bou6qv6hgGjPXXFGrCr14cVI0KJc/hpl6Z5HRvOgQnjHvtbHIQ/kv2HuJg9Bp6wywi8k VtRVkazZwa7wgp+bxO4jZ9LnIqWsoqbZjvxIHvYTKuBLH9cVSr69BQZNPpOl9b6FCDre 5qztJuZyxIJBzZYCFgKqcGR7kD76qyF8hHVPUL06GR1Kf6Q25NMsIEgc9Uo06ox/B25X H2t34V2Kwv2XfPW2NEAF/Lq2tyix/ov9kXiMvrNXz27TEpGi99iwcWFg3RgZ8aTfy/pr fWaw== X-Gm-Message-State: AAQBX9eUptQYWhplkBYDj/ZiiHBwK427J1fOV0Sa6KEZ99TReeql7ClD O5eZ9xdts/49nKxdidZRuuukng== X-Google-Smtp-Source: AKy350b3H2PhUiyUm5TAif9X2q2cFLxhvU6Cj/E1dzv6O5Qgf4mAnECyTa/wawi4MdlUYQNXv47gtA== X-Received: by 2002:adf:f78b:0:b0:2ce:aed4:7f22 with SMTP id q11-20020adff78b000000b002ceaed47f22mr16701671wrp.50.1680100191750; Wed, 29 Mar 2023 07:29:51 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:28d:66d0:7049:3791:78c8:6c3]) by smtp.gmail.com with ESMTPSA id b9-20020adfde09000000b002daeb108304sm17270792wrm.33.2023.03.29.07.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 07:29:51 -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 Subject: [PATCH v1 1/4] arm64: dts: ti: k3-j7200-som-p0: Add TP6594 family PMICs Date: Wed, 29 Mar 2023 16:29:45 +0200 Message-Id: <20230329142948.833800-2-eblanc@baylibre.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230329142948.833800-1-eblanc@baylibre.com> References: <20230329142948.833800-1-eblanc@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230329_072956_388172_9B905D47 X-CRM114-Status: GOOD ( 12.29 ) 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 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: Esteban Blanc --- arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 170 ++++++++++++++++++++ 1 file changed, 170 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi index fa44ed4c17d5..a6c085256a50 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi @@ -118,6 +118,25 @@ J721E_WKUP_IOPAD(0x0008, PIN_INPUT, 0) /* MCU_OSPI0_DQS */ }; }; +&wkup_pmx2 { + /* wkup_pmx2 starts at 0x68 */ + wkup_i2c0_pins_default: wkup-i2c0-pins-default { + pinctrl-single,pins = < + J721E_WKUP_IOPAD(0x98, PIN_INPUT_PULLUP, 0) /* (F20) WKUP_I2C0_SCL */ + J721E_WKUP_IOPAD(0x9c, PIN_INPUT_PULLUP, 0) /* (H21) WKUP_I2C0_SDA */ + >; + }; +}; + +&wkup_pmx3 { + /* wkup_pmx3 starts at 0x174 */ + pmic_irq_pins_default: pmic-irq-pins-default { + pinctrl-single,pins = < + J721E_WKUP_IOPAD(0x1c, PIN_INPUT, 7) /* (E18) WKUP_GPIO0_84 */ + >; + }; +}; + &main_pmx0 { main_i2c0_pins_default: main-i2c0-pins-default { pinctrl-single,pins = < @@ -231,3 +250,154 @@ flash@0 { cdns,read-delay = <4>; }; }; + +&wkup_i2c0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&wkup_i2c0_pins_default>; + clock-frequency = <400000>; + + tps659414: tps659414@48 { + compatible = "ti,tps6594"; + reg = <0x48>; + ti,primary-pmic; + system-power-controller; + + pinctrl-names = "default"; + pinctrl-0 = <&pmic_irq_pins_default>; + interrupt-parent = <&wkup_gpio0>; + interrupts = <84 IRQ_TYPE_EDGE_FALLING>; + + buck1-supply = <&vsys_3v3>; + buck2-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 { + bucka1_reg: buck1 { + regulator-name = "vda_mcu_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + bucka2_reg: buck2 { + regulator-name = "vdd_mcuio_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + bucka3_reg: buck3 { + regulator-name = "vdd_mcu_0v85"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + bucka4_reg: buck4 { + regulator-name = "vdd_ddr_1v1"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-boot-on; + regulator-always-on; + }; + + bucka5_reg: buck5 { + regulator-name = "vdd_phyio_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldoa1_reg: ldo1 { + regulator-name = "vdd1_lpddr4_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldoa2_reg: ldo2 { + regulator-name = "vda_dll_0v8"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldoa3_reg: ldo3 { + regulator-name = "vdd_wk_0v8"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-boot-on; + regulator-always-on; + }; + + ldoa4_reg: ldo4 { + regulator-name = "vda_pll_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; + + lp876441: lp876441@4c { + compatible = "ti,lp8764"; + reg = <0x4c>; + system-power-controller; + interrupt-parent = <&wkup_gpio0>; + interrupts = <84 IRQ_TYPE_EDGE_FALLING>; + + buck1-supply = <&vsys_3v3>; + buck2-supply = <&vsys_3v3>; + buck3-supply = <&vsys_3v3>; + buck4-supply = <&vsys_3v3>; + + regulators: regulators { + buckb1_reg: buck1 { + /*VDD_CPU_AVS_REG*/ + regulator-name = "vdd_cpu_avs"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1250000>; + regulator-always-on; + regulator-boot-on; + }; + + buckb2_reg: buck2 { + regulator-name = "vdd_ram_0v85"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + buckb3_reg: buck3 { + regulator-name = "vdd_core_0v85"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-boot-on; + regulator-always-on; + }; + + buckb4_reg: buck4 { + regulator-name = "vdd_io_1v8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; +};