Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3668798yba; Tue, 9 Apr 2019 02:09:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOtLPFJTtIurCR5XOn6q1woFNdPmieo4u8ZwSfXpy7eULR8W3bA+mPV3D6cZhQD6Jg/xzF X-Received: by 2002:a17:902:2ec1:: with SMTP id r59mr36069671plb.171.1554800974187; Tue, 09 Apr 2019 02:09:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554800974; cv=none; d=google.com; s=arc-20160816; b=rMeDtB/1pokjUjzb5CqQnrKmsFLXv1ZKaymA51iqfozrwSLhmKtCxKykRVjGMZSVhJ pxku0MliTjb0AkcnfYna6/X61UxooldUhcC6hLuCUAouuQ5JMkKHZBwDB5tlPDfHTvKF HReUxuDUeMivxsyUjbO7ZvWhOVJSFkZani/bpdHWG/kIGfa4CQUZXpwUKJXOg/6kCeBL ra5zxD3ZYtCRU2vjTjYdn/dVY3E6AlbzgLddkCETGcq6xEl6UHJsFb0qslIQGOBqL6EL YrSYnZRApxY2UHoaGgpMLBv5q7uFIjgLvqM610wDIDed6DhWUv0JOfOeLrDQ1GnBxKif +6UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=hHT9Ly9nAzaF/qpOAbbdbqdWgGi3WGKDqJqHavDy+No=; b=oNWGYqUV1afl9x6ws7x3hcoU8yLDrGGW0XME1+v4OXJJDa8AyIk3Z0618Iznxeu/kO tVeh7ESSoKJlUEXXtSz/A9vs/0a1kQkHIUA8CVH9Vd941A3gDyHZTo69Vu/uIFiW+cLx 97WlqX1fqIUQF+1vYeZRlEWDMN+YzrwGXZnnhxeHbLZGzHnH1+CPpUkkX2+mVR0mg3dH /zRnQXLDV0IbJjTI3JYDG7+o0QJoaGUrD8yboYsfqYq14sMEfhHWlPn0c0biCbCiua79 b1JnMJKoz2aiE2Z8wG9YmQ8sbNsnCejw1NymNos+1hvRtsZLv5+S+Ndz1cATvJ0Xi8Fa bqlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=m0TAVI6a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u22si21014612plq.193.2019.04.09.02.09.18; Tue, 09 Apr 2019 02:09:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@st.com header.s=STMicroelectronics header.b=m0TAVI6a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726775AbfDIJIV (ORCPT + 99 others); Tue, 9 Apr 2019 05:08:21 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:37626 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726486AbfDIJIR (ORCPT ); Tue, 9 Apr 2019 05:08:17 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x398pmKP021436; Tue, 9 Apr 2019 11:07:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=STMicroelectronics; bh=hHT9Ly9nAzaF/qpOAbbdbqdWgGi3WGKDqJqHavDy+No=; b=m0TAVI6aUx4Nw//2qtgQPB8Zw/uR0gF5JRbsNhqCcDWQfz7GuEXKjIFFa1gemlAk/SBT rF7JoRKm7PJk8AS/9DADopvj1Rw7ITWFP72QRERLbtb+mUFkho9uvPEpvzOy0K4xWl/g cjye7ltqZy6LAPa7TpJsH58AXHl3DC7D6vmhnE7dMF2VUzc6XoVJupi8Lv+UeFIBntV6 K/1m+ektXrfka61maqYRlUrzZiICbiJgtGedU5el+QyWBwOwYqKuh2WbuBwBQw4J0j5l vW7vKhbpHbq46j4XeyJmkJsiXl93o2vXQljyuh2C6/GXKuoUOkTbdaKlqw1voGZsiA6F 8A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2rpr7wgkf7-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 09 Apr 2019 11:07:11 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B73CC41; Tue, 9 Apr 2019 09:07:03 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 864942723; Tue, 9 Apr 2019 09:07:03 +0000 (GMT) Received: from SFHDAG6NODE2.st.com (10.75.127.17) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 9 Apr 2019 11:07:03 +0200 Received: from SFHDAG6NODE2.st.com ([fe80::a56f:c186:bab7:13d6]) by SFHDAG6NODE2.st.com ([fe80::a56f:c186:bab7:13d6%20]) with mapi id 15.00.1347.000; Tue, 9 Apr 2019 11:07:03 +0200 From: Pascal PAILLET-LME To: "mcoquelin.stm32@gmail.com" , Alexandre TORGUE , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "linux@armlinux.org.uk" , "horms+renesas@verge.net.au" , "olof@lixom.net" , "arnd@arndb.de" , "geert+renesas@glider.be" , "biju.das@bp.renesas.com" , Yannick FERTRE , "m.szyprowski@samsung.com" , "linus.walleij@linaro.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Pascal PAILLET-LME , "linux-stm32@st-md-mailman.stormreply.com" Subject: [PATCH v2 1/3] ARM: dts: stm32: add stpmic1 support on stm32mp157c ed1 board Thread-Topic: [PATCH v2 1/3] ARM: dts: stm32: add stpmic1 support on stm32mp157c ed1 board Thread-Index: AQHU7rOY2tQ9FLm5QkG9QC4VO8EW1g== Date: Tue, 9 Apr 2019 09:07:03 +0000 Message-ID: <1554800820-5412-2-git-send-email-p.paillet@st.com> References: <1554800820-5412-1-git-send-email-p.paillet@st.com> In-Reply-To: <1554800820-5412-1-git-send-email-p.paillet@st.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.48] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-09_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds stpmic1 support on stm32mp157c ed1 board. The STPMIC1 is a PMIC from STMicroelectronics. The STPMIC1 integrates 10 regulators, 3 power switches, a watchdog and an input for a power on key. The DMAs are disabled because the PMIC generates a very few traffic and DMA channels may lack for other usage. Signed-off-by: Pascal Paillet --- arch/arm/boot/dts/stm32mp157c-ed1.dts | 156 ++++++++++++++++++++++++++++++= ---- 1 file changed, 140 insertions(+), 16 deletions(-) diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm3= 2mp157c-ed1.dts index 9fd7943..62a8c78 100644 --- a/arch/arm/boot/dts/stm32mp157c-ed1.dts +++ b/arch/arm/boot/dts/stm32mp157c-ed1.dts @@ -8,6 +8,7 @@ #include "stm32mp157c.dtsi" #include "stm32mp157-pinctrl.dtsi" #include +#include =20 / { model =3D "STMicroelectronics STM32MP157C eval daughter"; @@ -42,22 +43,6 @@ regulator-always-on; }; =20 - vdd_sd: regulator-vdd_sd { - compatible =3D "regulator-fixed"; - regulator-name =3D "vdd_sd"; - regulator-min-microvolt =3D <3300000>; - regulator-max-microvolt =3D <3300000>; - regulator-always-on; - }; - - vdd_usb: vdd-usb { - compatible =3D "regulator-fixed"; - regulator-name =3D "vdd_usb"; - regulator-min-microvolt =3D <3300000>; - regulator-max-microvolt =3D <3300000>; - regulator-always-on; - }; - sd_switch: regulator-sd_switch { compatible =3D "regulator-gpio"; regulator-name =3D "sd_switch"; @@ -82,6 +67,145 @@ i2c-scl-rising-time-ns =3D <185>; i2c-scl-falling-time-ns =3D <20>; status =3D "okay"; + /* spare dmas for other usage */ + /delete-property/dmas; + /delete-property/dma-names; + + pmic: stpmic@33 { + compatible =3D "st,stpmic1"; + reg =3D <0x33>; + interrupts-extended =3D <&gpioa 0 IRQ_TYPE_EDGE_FALLING>; + interrupt-controller; + #interrupt-cells =3D <2>; + status =3D "okay"; + + regulators { + compatible =3D "st,stpmic1-regulators"; + ldo1-supply =3D <&v3v3>; + ldo2-supply =3D <&v3v3>; + ldo3-supply =3D <&vdd_ddr>; + ldo5-supply =3D <&v3v3>; + ldo6-supply =3D <&v3v3>; + pwr_sw1-supply =3D <&bst_out>; + pwr_sw2-supply =3D <&bst_out>; + + vddcore: buck1 { + regulator-name =3D "vddcore"; + regulator-min-microvolt =3D <800000>; + regulator-max-microvolt =3D <1350000>; + regulator-always-on; + regulator-initial-mode =3D <0>; + regulator-over-current-protection; + }; + + vdd_ddr: buck2 { + regulator-name =3D "vdd_ddr"; + regulator-min-microvolt =3D <1350000>; + regulator-max-microvolt =3D <1350000>; + regulator-always-on; + regulator-initial-mode =3D <0>; + regulator-over-current-protection; + }; + + vdd: buck3 { + regulator-name =3D "vdd"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-always-on; + st,mask-reset; + regulator-initial-mode =3D <0>; + regulator-over-current-protection; + }; + + v3v3: buck4 { + regulator-name =3D "v3v3"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-always-on; + regulator-over-current-protection; + regulator-initial-mode =3D <0>; + }; + + vdda: ldo1 { + regulator-name =3D "vdda"; + regulator-min-microvolt =3D <2900000>; + regulator-max-microvolt =3D <2900000>; + interrupts =3D ; + }; + + v2v8: ldo2 { + regulator-name =3D "v2v8"; + regulator-min-microvolt =3D <2800000>; + regulator-max-microvolt =3D <2800000>; + interrupts =3D ; + }; + + vtt_ddr: ldo3 { + regulator-name =3D "vtt_ddr"; + regulator-min-microvolt =3D <500000>; + regulator-max-microvolt =3D <750000>; + regulator-always-on; + regulator-over-current-protection; + }; + + vdd_usb: ldo4 { + regulator-name =3D "vdd_usb"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + interrupts =3D ; + }; + + vdd_sd: ldo5 { + regulator-name =3D "vdd_sd"; + regulator-min-microvolt =3D <2900000>; + regulator-max-microvolt =3D <2900000>; + interrupts =3D ; + regulator-boot-on; + }; + + v1v8: ldo6 { + regulator-name =3D "v1v8"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + interrupts =3D ; + }; + + vref_ddr: vref_ddr { + regulator-name =3D "vref_ddr"; + regulator-always-on; + regulator-over-current-protection; + }; + + bst_out: boost { + regulator-name =3D "bst_out"; + interrupts =3D ; + }; + + vbus_otg: pwr_sw1 { + regulator-name =3D "vbus_otg"; + interrupts =3D ; + }; + + vbus_sw: pwr_sw2 { + regulator-name =3D "vbus_sw"; + interrupts =3D ; + regulator-active-discharge; + }; + }; + + onkey { + compatible =3D "st,stpmic1-onkey"; + interrupts =3D , ; + interrupt-names =3D "onkey-falling", "onkey-rising"; + power-off-time-sec =3D <10>; + status =3D "okay"; + }; + + watchdog { + compatible =3D "st,stpmic1-wdt"; + status =3D "disabled"; + }; + }; }; =20 &ipcc { --=20 1.9.1