From patchwork Mon Apr 17 15:48:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esteban Blanc X-Patchwork-Id: 13214363 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 1D895C77B7A for ; Mon, 17 Apr 2023 16:46:25 +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=SBdwoIVLeycirnTE1ZlDuup27vnrd8KIT9koQui0nGk=; b=wst3Mid2vkLhmj BVzn5+cvcbcr3YV9N6/wsr1XHCEe/9hpzE8WRpNXQx+gB1xqMJjasR3uClzWUk6bpAJ4wftVgMTlx RxuCbLx6wCftPXyhMS0Z7FskUOfIU/DYpgteNCf4HJ8R3cl2QUaStzwIPRksaE0m4/DCBLxtH7LLD H8g9gWiJjXB/zy9lMCe4CvR8lEH8DZ3SEPtQ0nrlaVJTWKJJ4ZHIUBrtMizcCigXohzwJsosM8Tzt oq5NGBXGZf/NrC5v6wcG/qVCz+rz3ZlukgzMWtKC1xmm1+19W2t2nRBpmlul6sn4QR9ERJvXQn/5x UnOj771Yt5eAC/BSUN3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1poRyq-00H6A0-20; Mon, 17 Apr 2023 16:45:28 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1poRyo-00H68b-2D for linux-arm-kernel@bombadil.infradead.org; Mon, 17 Apr 2023 16:45:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=U4Sn53RdqX904+o/7tHCPMWzrFYlXQgy7TVIXaTUnQ8=; b=VKwN1NQiGAKUPh7QsCHmrYzPZc jLStgdvkbUiIjd9+oZ0CQ4qfT+sBerozsVDrFIYU1OW00KcVMzcfAY8ljNqLrZbuvAfbqKQ3x63Pd 8NmphHgdQXPnVYmnc9qNrd2/bsPN9jTQnMweTankmnPaNCxC0CBWp6qR8KUP2M6G+SzixBPevu3O4 g4jzLeh5z2QNkmfQsNM3ZUM6z4yDkHcpj1Qb3PJg7VbVyadBolAdaH+pDvmUOShW1r2cHOoO1v7d5 uZ5X88En/B+3KD6GzcvN1rZWEAkd9S4Rjs8f3cDHuiSRmy4Wf372iwtN91hZwzaPVncdW7L06vXVx jTzl/ScQ==; Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1poR5t-00HNeg-1Z for linux-arm-kernel@lists.infradead.org; Mon, 17 Apr 2023 15:48:44 +0000 Received: by mail-wm1-x32b.google.com with SMTP id n9-20020a05600c4f8900b003f05f617f3cso20057004wmq.2 for ; Mon, 17 Apr 2023 08:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1681746518; x=1684338518; 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=U4Sn53RdqX904+o/7tHCPMWzrFYlXQgy7TVIXaTUnQ8=; b=kGyZFsJMfBG9lzMfnoXk0DhSRH+AonT8uALHDl54xbdp0lMunbQ7Ms+UT5AopgLlKe o4yf1XrMwWiM+ehgel2zWtrzMPT82qfjI8QjZp44A0iwiSsH5tlONikmlwwM7+SSOruw xM4qbzRdJAx83t5058e7bpjDnZYWDbS7SNARVUXMxucq8nmEyaksv7FA7MiEW47rzVSr cP2DbB5PGqKcgNQJLSlJ90ZZqXaQliMnOBg4PSLbgnVnsCP8ASATsIDQByPTMdgO552k a3pGQfXHD9DGFS5NB9tKRIU2DdPfrsywawXf0ZYyk8jWMIXHRKeiPeFicP9EPRZO5iSf OUMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681746518; x=1684338518; 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=U4Sn53RdqX904+o/7tHCPMWzrFYlXQgy7TVIXaTUnQ8=; b=TJM5fnR3vmQoa2Hxrt7gjLkGoLRxdD61HvEiLOgQccRHIS1XUv9FQjHLwx2Y7O/cfh jVD1B7wOoht/cyBHm9H1ETwiDjwalc8+pG/u/pv+CJ4v8/Jjrtyw9YHi8v/OVMGNSe3X 5xftj+VfrlojH0hjw3Pdf8ORGjuy1aSKZpOMez4I7ixT+qPmcQmiMfgb31zd00ULkmBZ ozoQeFf2vLkHh96hBR6K/Q5oHaHoCVFnUQG23XgMLNEz98gGSIF0s4Rm7xZhpQKXbiEU Ry6urMaj9hJEjx9nUmVzh90pCGGs7XtoTOSVspAbF5Ok7j/7CjAUeCJJ0/nk8WsmectN yXKA== X-Gm-Message-State: AAQBX9fYja8Xu+4XV58Jj989hhVrd7QVRGvhdUNHANTFJOGa60JThN2j 92y1bXvit9wmdRkj3JOfx21uuA== X-Google-Smtp-Source: AKy350YTxyxSIuRnXu1+kv98GgLXLDpgQICxbCvc3+hq5alGT6DU9b0N6nQyUyXx0e5Qujq+umk0rQ== X-Received: by 2002:a7b:cd19:0:b0:3f1:6980:2d01 with SMTP id f25-20020a7bcd19000000b003f169802d01mr5674506wmj.9.1681746518007; Mon, 17 Apr 2023 08:48:38 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:28d:66d0:5888:afdf:3f10:3b2b]) by smtp.gmail.com with ESMTPSA id v5-20020a05600c444500b003f09cda253esm16189932wmn.34.2023.04.17.08.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 08:48:37 -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 v3 3/6] arm64: dts: ti: k3-j721e-som-p0: Add TP6594 family PMICs Date: Mon, 17 Apr 2023 17:48:29 +0200 Message-Id: <20230417154832.216774-4-eblanc@baylibre.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417154832.216774-1-eblanc@baylibre.com> References: <20230417154832.216774-1-eblanc@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230417_164841_707006_8637F6EE X-CRM114-Status: GOOD ( 11.75 ) 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 | 171 ++++++++++++++++++++ 1 file changed, 171 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 e289d5b44356..63be7949315e 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e-som-p0.dtsi @@ -150,6 +150,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-pins-default { pinctrl-single,pins = < J721E_WKUP_IOPAD(0x0000, PIN_OUTPUT, 0) /* MCU_OSPI0_CLK */ @@ -308,3 +314,168 @@ &c71_0 { memory-region = <&c71_0_dma_memory_region>, <&c71_0_memory_region>; }; + +&wkup_i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&wkup_i2c0_pins_default>; + clock-frequency = <400000>; + status = "okay"; + + 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; + }; + }; + }; + +};