From patchwork Tue Jun 4 08:55:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A7E4114B6 for ; Tue, 4 Jun 2019 08:56:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96B0F286B4 for ; Tue, 4 Jun 2019 08:56:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A4DA2874F; Tue, 4 Jun 2019 08:56:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 23298286B4 for ; Tue, 4 Jun 2019 08:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GhJEsiX84KF8nrEjPfjJLvgVthoSnpS8q4sHtsEdSUU=; b=ranYG4rLqA16+z Mi0kTV6A3XMQIyjjlNWby5zs3a8ZDIjdJ98UWng74zZErZK/yQlcn8ufi68yx5npisCLVp2UMBGKe BA9dBOB+WYs4RQGz6p4acgUfuPy7IgEvmMAC9keXH83LeTMJRUEkS2lDaMcdtXv/JFpwv5WmHjInK vHruEcG3iExJXtQU2DZwmUGmQizWI7mwhYhjV84eMUZM/uT11afH2uhGp1foEaPcqYbicn531kgu7 3o1JBR83SlkpkzrPORuDNIWAa4Egh/tXtdZ6O9EpgehfpjUG91VJ+5NPKGapouelf6qXCl0ZZENl7 MY3Ddx1BNLrch+kLtbhQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5Eo-0005lD-Gz; Tue, 04 Jun 2019 08:56:10 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5ER-00053d-J5 for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 08:55:52 +0000 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 x548tKLM021280; Tue, 4 Jun 2019 10:55:32 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=9gSGjqYoy+Fbf2xPESzbOyGUbO7HOvEvjLu/ZOx6/bE=; b=RjX2tYwV8kgxxGc0rW2nlLgfguePoiuo03mr3r/QBAvY1398mhHF0ZhRzQNWn5bE9d6S JjdZvKhT2l5TNZTaGOH56n5+f7o6/DGH+XW+I5PgIZU/bfXv06tg5G0a4iFt99j+6Yhd proABBwOSJSFvveL0vtq2K6k0rQUgGupK9KlDj3M5L9pAmQbkY6e0PU9ml4ch3w0CswS h2LORq1cYDJ7Kk/FZ2xOn1ZwlLO99bkCKJq97UTyX9q/TOM+bGgYf/7VFJ9h937XIr4t G+4vVg/ez6o3VFTNzLD128GoKisdyMDyfdA3osNOhFm/mbwFxgOYDpdpO2IJBtdF6P5P EA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sundryngp-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 10:55:32 +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 ADF15159; Tue, 4 Jun 2019 08:55:25 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 83E0E2503; Tue, 4 Jun 2019 08:55:25 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:25 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:25 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 01/10] dt-bindings: serial: stm32: add wakeup option Date: Tue, 4 Jun 2019 10:55:10 +0200 Message-ID: <1559638519-6128-2-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_015548_542481_20A98F7B X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Bich Hemon , Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add a note for enabling wakeup capabilities of usart Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt index 9d3efed..5ec80c1 100644 --- a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt +++ b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt @@ -19,6 +19,11 @@ Optional properties: linux,rs485-enabled-at-boot-time: see rs485.txt. - dmas: phandle(s) to DMA controller node(s). Refer to stm32-dma.txt - dma-names: "rx" and/or "tx" +- wakeup-source: bool flag to indicate this device has wakeup capabilities +- interrupt-names, if optional wake-up interrupt is used, should be: + - "event": the name for the interrupt line of the USART instance + - "wakeup" the name for the optional wake-up interrupt + Examples: usart4: serial@40004c00 { From patchwork Tue Jun 4 08:55:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 83C4814B6 for ; Tue, 4 Jun 2019 08:55:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70A6A286B4 for ; Tue, 4 Jun 2019 08:55:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E0592873A; Tue, 4 Jun 2019 08:55:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D3DFC286B4 for ; Tue, 4 Jun 2019 08:55:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WnpQcpkBaqN2zFbxdHsJK3EA5yd62XP629VZ9DGr6GE=; b=t6no7KaOtSq6yy i0rjDS0l8nIkAKPpoDO+00uRObnUAo0umg29QhZxSPhavMO8UNt+eA0Awes8FhDn/uIkpJoPqH7XE tsSu7wh8YvFo7ahiXnDf6cLXeL2cEGDSmZ8OEGCG9Ctos519pX9CqucN37oSsHrlnSDPYprH9+4ay h/uFYXLkAPB2sIMlUmYzX4tvCkI/1qelOh6iirSrv+envGuiJ9uLy7qzqsTQFv17zF9wLVHQtuC9R BQcV1qybntMBRX/sMVI44BShcc9us0TAAov61GYXDGaK7O9MS42xs+25nQyv7BqdaDPqBpaqr+g6B /h74pP5v763lqhj3PwcA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5ER-0005By-Nc; Tue, 04 Jun 2019 08:55:47 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5EI-00053p-Iz for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 08:55:40 +0000 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 x548tJOm021222; Tue, 4 Jun 2019 10:55:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=Psif9qopZgVPe8dWo9XocFzMybtKO3gMouXdNYlMSBI=; b=wbdxU1RhcrRqVd8GvtqUF6E7gD45eJui7EOW9VT0NrZAAAamgNDp17bfkn2af+pcbb6x clO1KwCb1DpWZwmc06+ExO2LBRKXzSLOXGRGSacVPY29fY5kAa2BP/z7nHjHPAWWleus 8+EqGjTp1KPoJ6tNdNsy/IFNZvMvdfP9CwP0ulmAuJ+FMOwappLa90LWWZf5bfbCv2af UyzaYF0piRFO/Co6KSYpRCuhuwwjDSqf02ljJBJzKtB2aZuhYQCvGM8tvzRYQDQV5kxY cvo1eQEbpiSLoWGig77MQ+JqPpfgh7oSeqBzimn3K0ZfNqILvTUlwzPcuLMfnY+HdXmb qA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sundrynh0-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 10:55:33 +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 42A9315E; Tue, 4 Jun 2019 08:55:28 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1974F2503; Tue, 4 Jun 2019 08:55:28 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:28 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:26 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 02/10] dt-bindings: serial: add optional pinctrl states Date: Tue, 4 Jun 2019 10:55:11 +0200 Message-ID: <1559638519-6128-3-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_015538_903940_6E204751 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Bich Hemon , Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bich Hemon Add options for pinctrl states: - "sleep" for low power - "idle" for low power and wakeup capabilities enabled - "no_console_suspend" for enabling console messages in low power Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt index 5ec80c1..64a5ea9 100644 --- a/Documentation/devicetree/bindings/serial/st,stm32-usart.txt +++ b/Documentation/devicetree/bindings/serial/st,stm32-usart.txt @@ -13,7 +13,14 @@ Required properties: - clocks: The input clock of the USART instance Optional properties: -- pinctrl: The reference on the pins configuration +- pinctrl-names: Set to "default". An additional "sleep" state can be defined + to set pins in sleep state when in low power. In case the device is used as + a wakeup source, "idle" state is defined in order to keep RX pin active. + For a console device, an optional state "no_console_suspend" can be defined + to enable console messages during suspend. Typically, "no_console_suspend" and + "default" states can refer to the same pin configuration. +- pinctrl-n: Phandle(s) pointing to pin configuration nodes. + For Pinctrl properties see ../pinctrl/pinctrl-bindings.txt - st,hw-flow-ctrl: bool flag to enable hardware flow control. - rs485-rts-delay, rs485-rx-during-tx, rs485-rts-active-low, linux,rs485-enabled-at-boot-time: see rs485.txt. @@ -31,8 +38,11 @@ usart4: serial@40004c00 { reg = <0x40004c00 0x400>; interrupts = <52>; clocks = <&clk_pclk1>; - pinctrl-names = "default"; + pinctrl-names = "default", "sleep", "idle", "no_console_suspend"; pinctrl-0 = <&pinctrl_usart4>; + pinctrl-1 = <&pinctrl_usart4_sleep>; + pinctrl-2 = <&pinctrl_usart4_idle>; + pinctrl-3 = <&pinctrl_usart4>; }; usart2: serial@40004400 { From patchwork Tue Jun 4 08:55:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C522017D2 for ; Tue, 4 Jun 2019 08:56:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3427286B4 for ; Tue, 4 Jun 2019 08:56:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A49362874F; Tue, 4 Jun 2019 08:56:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 59217286B4 for ; Tue, 4 Jun 2019 08:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=p31SigHXQfvPE7ljIlt6RPtC6CbR4t+Sms9gEYCF4sI=; b=Fh/BNhv0Pthk2P RIbdMMEsa+RXQUaOjljHyjpBNmrEriI8CODovIX9pCWejDvKE47b2YUKtBc4uhj9WyI90GlWY7tQA golxzUAI9NhXmOOECUfIKe3utKf2p+sjE9QmGQ5q3VtL6CDmr0wfEgR+enkfVibF87JfQZ1+hBRsq 2d84AOJLqJ6b7DQuY2o53+CSeU0sxTYLx4wk81mUmY0x7W9g6SNqzX+FBQSuCeO4U9GazWbvjLIYx GsB3G2JeZ917oEh2kFFWK+dUL+EaSbEIFbZVVKkoj0UOdxlG+TQEdjAK0yRtkH6kb377Zr6JJVpPg ILcdsYy6/mZ9T+//kJqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5Ec-0005UD-A0; Tue, 04 Jun 2019 08:55:58 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5EK-00054H-Ag for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 08:55:41 +0000 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 x548tJOp021222; Tue, 4 Jun 2019 10:55:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=D12cNidPnfR55JiZ4NdH+kI55gOuWJx5v8VSFj0cd+0=; b=IPZch/9/Bn65yYknzhYIX7Z/JolQ11e8MBnZZi8LvtEeO+G8F5iv+l5m+H4nIsbCPSVh mMgeThMW2TW8nXCDSHc0ZKS+UFfzW4YHNtAZ2Tbq0lRXD8I8cIMq38cn01M/G9F8GrCv wvCvK6rLM+CBOkHQ9aETAnUbYXVojFgUUBEU/Hdmx7EfKgOg2B87hZsOoEVE+GdBKiHY ESdEpz21JmDQsySMTZQVOCGCCFHGb30H8Sz0MAfOSGOZYRk3rdQGvj9Qcbwm13H1dXaB fEFx6sJ1EzAtTDdr5CWtLflnL+JIampu9H0/zzerAzfFdd7N5ChPCvYitbRz9aLxeL8H 7g== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sundrynhb-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 10:55:35 +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 5F861168; Tue, 4 Jun 2019 08:55:31 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1081F2509; Tue, 4 Jun 2019 08:55:31 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:30 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:29 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 03/10] serial: stm32: select pinctrl state in each suspend/resume function Date: Tue, 4 Jun 2019 10:55:12 +0200 Message-ID: <1559638519-6128-4-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_015540_645059_D1B50430 X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Bich Hemon , Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bich Hemon Select either pinctrl sleep state in suspend function or default state in resume function. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index e8d7a7b..8a7c582 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -1223,6 +1223,8 @@ static int stm32_serial_suspend(struct device *dev) else stm32_serial_enable_wakeup(port, false); + pinctrl_pm_select_sleep_state(dev); + return 0; } @@ -1230,6 +1232,8 @@ static int stm32_serial_resume(struct device *dev) { struct uart_port *port = dev_get_drvdata(dev); + pinctrl_pm_select_default_state(dev); + if (device_may_wakeup(dev)) stm32_serial_enable_wakeup(port, false); From patchwork Tue Jun 4 08:55:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0574814B6 for ; Tue, 4 Jun 2019 08:56:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E391527F8F for ; Tue, 4 Jun 2019 08:56:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D412E2873A; Tue, 4 Jun 2019 08:56:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 48E8827F8F for ; Tue, 4 Jun 2019 08:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jnuW89M0SA7t7MZ0I42oGnnBExl1+7YBELX5jczX0IE=; b=GI+syxdzalee86 tDEVBTqaRKVcvMlnNrL53NVLMP+ZMZiJZpCEeJ/7noxj+CZMVgbqsR8jS+h8CKJHJrG8ks9FRTW+l T/8N+cwpITZiguKffeQ7xbOxTMKSPuhSUeyGTsIt+koSBdNoImB6CchUVqzEMHJWXbehOaTSIc4wS rWe1LvxSgOIlGJtmI6R+xhBvb1JhhxcaeWWrsaQoY8A6P3OdeahPx1jge6AJi+9zkjXJXrpFxW4NP 41aRqBLI+A0oe/8FC9UZe63nZZ8Z3Grsl7VSyrl/HjwnuKPGVERu07MNhnkPHVyTzV1nd5dmE98ay h/sUu3dnFPvufx3KQuMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5Ez-00060G-Uk; Tue, 04 Jun 2019 08:56:21 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5ET-0005EO-1A for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 08:55:59 +0000 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 x548tKLT021280; Tue, 4 Jun 2019 10:55:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=yTPNF8NzWBm5vzgD+OGOm08Rs+hMsqFWwyqewCqFUQM=; b=nt9f0HhHzqlvs7dytp20CclCsHOdp6LI5HyyykId23EZ+8oTqcg4StUcmDsrpyzXzm78 7HQ1eS4qlb/FtBYtHe2Diz+BQ5kAHc7Od2aIDVAUw6URCSwyNBigqpKplCwsuFWICJHt RlJwBYiuWMx6V8DcH3aivgEidylhQClxPR4XbvShZENKc3jmK4Iw+RYy31T2TEkiRo/8 Afz/3LKocaUxTcfUwOT5KPy82VQUK/AB7QiDW9bryTgeTLgATzhhfQGFJhLPy3jxXjYk eZsrf+E9kGuN6DwTVmuTSl1aZ3RKkZJuTMIoultWUO+t8baxrsaOBHaXj+uIa+P54slm KA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sundrynhw-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 10:55:43 +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 579B415E; Tue, 4 Jun 2019 08:55:35 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3591E2507; Tue, 4 Jun 2019 08:55:35 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:35 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:32 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 04/10] serial: stm32: add pm_runtime support Date: Tue, 4 Jun 2019 10:55:13 +0200 Message-ID: <1559638519-6128-5-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_015550_027810_9BED0129 X-CRM114-Status: GOOD ( 13.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Bich Hemon , Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use pm_runtime for clock management. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 8a7c582..05d2ef6 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -765,13 +765,13 @@ static void stm32_pm(struct uart_port *port, unsigned int state, switch (state) { case UART_PM_STATE_ON: - clk_prepare_enable(stm32port->clk); + pm_runtime_get_sync(port->dev); break; case UART_PM_STATE_OFF: spin_lock_irqsave(&port->lock, flags); stm32_clr_bits(port, ofs->cr1, BIT(cfg->uart_enable_bit)); spin_unlock_irqrestore(&port->lock, flags); - clk_disable_unprepare(stm32port->clk); + pm_runtime_put_sync(port->dev); break; } } @@ -1040,6 +1040,11 @@ static int stm32_serial_probe(struct platform_device *pdev) platform_set_drvdata(pdev, &stm32port->port); + pm_runtime_get_noresume(&pdev->dev); + pm_runtime_set_active(&pdev->dev); + pm_runtime_enable(&pdev->dev); + pm_runtime_put_sync(&pdev->dev); + return 0; err_nowup: @@ -1058,6 +1063,9 @@ static int stm32_serial_remove(struct platform_device *pdev) struct stm32_port *stm32_port = to_stm32_port(port); struct stm32_usart_offsets *ofs = &stm32_port->info->ofs; struct stm32_usart_config *cfg = &stm32_port->info->cfg; + int err; + + pm_runtime_get_sync(&pdev->dev); stm32_clr_bits(port, ofs->cr3, USART_CR3_DMAR); @@ -1084,7 +1092,12 @@ static int stm32_serial_remove(struct platform_device *pdev) clk_disable_unprepare(stm32_port->clk); - return uart_remove_one_port(&stm32_usart_driver, port); + err = uart_remove_one_port(&stm32_usart_driver, port); + + pm_runtime_disable(&pdev->dev); + pm_runtime_put_noidle(&pdev->dev); + + return err; } @@ -1241,7 +1254,29 @@ static int stm32_serial_resume(struct device *dev) } #endif /* CONFIG_PM_SLEEP */ +static int __maybe_unused stm32_serial_runtime_suspend(struct device *dev) +{ + struct uart_port *port = dev_get_drvdata(dev); + struct stm32_port *stm32port = container_of(port, + struct stm32_port, port); + + clk_disable_unprepare(stm32port->clk); + + return 0; +} + +static int __maybe_unused stm32_serial_runtime_resume(struct device *dev) +{ + struct uart_port *port = dev_get_drvdata(dev); + struct stm32_port *stm32port = container_of(port, + struct stm32_port, port); + + return clk_prepare_enable(stm32port->clk); +} + static const struct dev_pm_ops stm32_serial_pm_ops = { + SET_RUNTIME_PM_OPS(stm32_serial_runtime_suspend, + stm32_serial_runtime_resume, NULL) SET_SYSTEM_SLEEP_PM_OPS(stm32_serial_suspend, stm32_serial_resume) }; From patchwork Tue Jun 4 08:55:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C34014B6 for ; Tue, 4 Jun 2019 08:57:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3585727F8F for ; Tue, 4 Jun 2019 08:57:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23B472873A; Tue, 4 Jun 2019 08:57:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF7E827F8F for ; Tue, 4 Jun 2019 08:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=upblcxEpXQ4mhwHRUQnB7LB+XwXMR8r0vDSiG5/+W+A=; b=LCsHO3t71m49zu u9+sVPOFUyqnbNCLCHhvuua5hSOhQgVUDOGGkLZcqgD9ZOwRhPFSH/DiPhvOeZQtZa3o0i4vp09Uk Nhh3e22fA1K4Se3Ur7sBvJVwwhr8IirHDUjq30NVN+ycGhQcKnVnvlUllabi5o2mNfffNtVYkU2A2 BMDatS2Cq7ZGiVT9IbHc6MiJL5F7u3FWAAk0yWP7kW/utqoz0JZfP4VH9CjPtIAq71x+cgbHKTj+s MXBT6STh6tgPyycb5sTJnutRwI38suhl7EGAsUhd+WYpzAt58/+JzNAUHEX6V1T6jJU6I0XMJO03H O7BrYdzSB1zw8g+Fdy8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5FY-0006kj-DS; Tue, 04 Jun 2019 08:56:56 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5Ef-0005Yi-Bd for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 08:56:20 +0000 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 x548tKw0021226; Tue, 4 Jun 2019 10:55:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=2t7Oh2wFwFzhKSRexvanrt3z18l9MjaRhX9ZcdCIqoQ=; b=zcB+NMK4ZEKRouNwjVExKEnwxrgxeu2Fil4w6ZZvxebJzxMN5BKsKqqErUlE6i7b3zTa yVTjw4DDtR54Sr+8YnvD3WVjGymrHCuIFR2vsKjBwLjkXJaHwaPnlB+7saNTKdVtA+gq 8PtnXy/xQCwVidJTjNXokBNS5/0BGwceMsdl6GRGtiMSE53dfneX7txHvdry4vvOePsd zVO4S8jU2FkvhrA35rE80HH7oMGW9kBfBz5JE5Q9wb1YlIMMPxD/ATEEhY9YWrOPoNH2 ZV4YHgC7HmgikiFjuPMI/x5odw52oMN8LP1dfOcBLJJ6QMGj7FBHsLcj98p9Gym2xnxi Ww== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sundrynjk-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 10:55:56 +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 8D9E016A; Tue, 4 Jun 2019 08:55:38 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 730242508; Tue, 4 Jun 2019 08:55:38 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:38 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:36 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 05/10] serial: stm32: Use __maybe_unused instead of #if CONFIG_PM_SLEEP Date: Tue, 4 Jun 2019 10:55:14 +0200 Message-ID: <1559638519-6128-6-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_015602_428289_2D7ED16F X-CRM114-Status: GOOD ( 11.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use __maybe_unused for power management related functionsinstead of #if CONFIG_PM_SLEEP to simply the code. fixes: 270e5a74fe4c ("serial: stm32: add wakeup mechanism") Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 05d2ef6..aa3da1c 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -1200,8 +1200,8 @@ static int stm32_console_setup(struct console *co, char *options) .cons = STM32_SERIAL_CONSOLE, }; -#ifdef CONFIG_PM_SLEEP -static void stm32_serial_enable_wakeup(struct uart_port *port, bool enable) +static void __maybe_unused stm32_serial_enable_wakeup(struct uart_port *port, + bool enable) { struct stm32_port *stm32_port = to_stm32_port(port); struct stm32_usart_offsets *ofs = &stm32_port->info->ofs; @@ -1225,7 +1225,7 @@ static void stm32_serial_enable_wakeup(struct uart_port *port, bool enable) } } -static int stm32_serial_suspend(struct device *dev) +static int __maybe_unused stm32_serial_suspend(struct device *dev) { struct uart_port *port = dev_get_drvdata(dev); @@ -1241,7 +1241,7 @@ static int stm32_serial_suspend(struct device *dev) return 0; } -static int stm32_serial_resume(struct device *dev) +static int __maybe_unused stm32_serial_resume(struct device *dev) { struct uart_port *port = dev_get_drvdata(dev); @@ -1252,7 +1252,6 @@ static int stm32_serial_resume(struct device *dev) return uart_resume_port(&stm32_usart_driver, port); } -#endif /* CONFIG_PM_SLEEP */ static int __maybe_unused stm32_serial_runtime_suspend(struct device *dev) { From patchwork Tue Jun 4 08:55:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 635706C5 for ; Tue, 4 Jun 2019 09:12:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5055628068 for ; Tue, 4 Jun 2019 09:12:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 442DF28725; Tue, 4 Jun 2019 09:12:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D0C5B28068 for ; Tue, 4 Jun 2019 09:12:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qdyjwyAOVF4K9/4RytIh2YAa81Lxj/qGLEqvD9u7QhQ=; b=mFkguWtWXqajm9 4+8jkpdCoGL1yxhMKn0ePwP/RbclWuUYGMowIFDkoxyvu4rE6sB1Dta7BzZY4vh+o076PmYj4KYVe mZIK+1jSZBDYpJ1J9mPvHCyBE69KRuxLsSt7yXxGGBkdgL4FLnp2+CWtUaYb5wmjP3zEsO7UVpoIB 5idwxbAjPvdmpd4vqB75uJSERfHBoQI2CgJQ4LP28lt6PW35Fi/RW2b0EbGeyfVZuBJFFS/XzoF+Z sUoM43ElcVyqsxDw6f/LmzS6IgIaybmBwaMJ1FjxtWsSUp9tw5dfFEc86BDe1hGjjeoJBu4xz0kRE bSd/InaVsHo3fCnUV4rw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5Uk-0006XA-FU; Tue, 04 Jun 2019 09:12:38 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5UY-00068B-24 for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 09:12:34 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5498qNp019707; Tue, 4 Jun 2019 11:12:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=PlxzoaxTpT7xfTSaFEe7rJyo9NUlAGqUd0kCqJ49OI4=; b=XtvRF2JeKJZfffjpzMNle1ULSUh/rkODDI4QXRECKKUHrDNwTzdSSsQFalGKpEzaX7c3 zbdFycHJK0pK41AqKzt8HzxEPeS/R+NpLHPnwFNRl+7fEQVvJqCiJsIrVkqlJfVWsnw1 s5bpON+O+iCT3GTVpXsG7jkXTbOmwlAUSL/01gpJykwL6Wtd4/6Csdo3M31y9DgD7eKy AH6xJxvjR27XMZDahEE5uOf/NctnBrvnWp3k38bh1ahoRPF5DZImMR1hba6fMdZRVj75 ESMRxem/Yf4Nl6StAyVjtmij9zLMHceFLYD4i6RGUtKC/rJVtwgTyKLX4G4QEwZ26t7R NQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sunmefkt6-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 11:12:20 +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 9F70A17E; Tue, 4 Jun 2019 08:55:41 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 5B858250C; Tue, 4 Jun 2019 08:55:41 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:41 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:39 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 06/10] serial: stm32: add support for no_console_suspend Date: Tue, 4 Jun 2019 10:55:15 +0200 Message-ID: <1559638519-6128-7-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_021226_853217_AA413BC9 X-CRM114-Status: GOOD ( 15.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Bich Hemon , Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to display console messages in low power mode, console pins must be kept active after suspend call. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index aa3da1c..573eae1 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include #include @@ -802,6 +804,7 @@ static int stm32_init_port(struct stm32_port *stm32port, { struct uart_port *port = &stm32port->port; struct resource *res; + struct pinctrl *uart_pinctrl; int ret; port->iotype = UPIO_MEM; @@ -816,6 +819,24 @@ static int stm32_init_port(struct stm32_port *stm32port, stm32port->wakeirq = platform_get_irq(pdev, 1); stm32port->fifoen = stm32port->info->cfg.has_fifo; + uart_pinctrl = devm_pinctrl_get(&pdev->dev); + if (IS_ERR(uart_pinctrl)) { + ret = PTR_ERR(uart_pinctrl); + if (ret != -ENODEV) { + dev_err(&pdev->dev, "Can't get pinctrl, error %d\n", + ret); + return ret; + } + stm32port->console_pins = ERR_PTR(-ENODEV); + } else { + stm32port->console_pins = pinctrl_lookup_state + (uart_pinctrl, "no_console_suspend"); + } + + if (IS_ERR(stm32port->console_pins) && PTR_ERR(stm32port->console_pins) + != -ENODEV) + return PTR_ERR(stm32port->console_pins); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); port->membase = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(port->membase)) @@ -1228,6 +1249,7 @@ static void __maybe_unused stm32_serial_enable_wakeup(struct uart_port *port, static int __maybe_unused stm32_serial_suspend(struct device *dev) { struct uart_port *port = dev_get_drvdata(dev); + struct stm32_port *stm32_port = to_stm32_port(port); uart_suspend_port(&stm32_usart_driver, port); @@ -1236,7 +1258,19 @@ static int __maybe_unused stm32_serial_suspend(struct device *dev) else stm32_serial_enable_wakeup(port, false); - pinctrl_pm_select_sleep_state(dev); + if (uart_console(port) && !console_suspend_enabled) { + if (IS_ERR(stm32_port->console_pins)) { + dev_err(dev, "no_console_suspend pinctrl not found\n"); + return PTR_ERR(stm32_port->console_pins); + } + + pinctrl_select_state(dev->pins->p, stm32_port->console_pins); + } else { + if (device_may_wakeup(dev)) + pinctrl_pm_select_idle_state(dev); + else + pinctrl_pm_select_sleep_state(dev); + } return 0; } diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h index 6f294e2..6957d50 100644 --- a/drivers/tty/serial/stm32-usart.h +++ b/drivers/tty/serial/stm32-usart.h @@ -261,6 +261,7 @@ struct stm32_port { bool hw_flow_control; bool fifoen; int wakeirq; + struct pinctrl_state *console_pins; }; static struct stm32_port stm32_ports[STM32_MAX_PORTS]; From patchwork Tue Jun 4 08:55:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974445 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BAC014B6 for ; Tue, 4 Jun 2019 09:12:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE8E827F97 for ; Tue, 4 Jun 2019 09:12:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E214E28689; Tue, 4 Jun 2019 09:12:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9271E27F97 for ; Tue, 4 Jun 2019 09:12:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qoDi6WKuzhEeXQQ/AWNNFSBPYWOwfIdr42hb83Xt18c=; b=jTvJN3UuTLWhwC mj+3mnEbv9iB0xx05jjsWpoSC3Nhf5Dp2wHxeMGg+AzmNU+Pf/h4gSl/t0h0FY8Ec2WIuKMQQ60Ht kcBzT6u/u8P0gzRM764oNpnALLAYHNoVqXYSybdJIc90zcPFcMP4iBQscl08oCQvMJBn6wcYOoFJd zwij3aR8F7YeLmYFuPfdcf/utJ3+3EbUSo7eKMqFKkHVJlvnlAj4dZ0SOT2s5lpVNBti5Sd8+SjUp DMz2A4K65TqAPX4ovMW2wVlW20hza8B/bKnFtzwxyvI3LBxc2UWp4AM/9xzRcXmy2PWOCJJB0S10t A+6rqmruUE0TAw4Q5ZMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5UQ-0005wr-LN; Tue, 04 Jun 2019 09:12:18 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5UM-0005pY-Ka for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 09:12:16 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5498m8l019440; Tue, 4 Jun 2019 11:12:09 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=7dQ+9lqtmTtedvp/b3rgO/AqPLUdhqousiUICsfwmlU=; b=SpEMvvWcUnePXF+45Bix5UMA9ew3+AtsyZG9D1f4bqvRi04RA4ma6HaJp2oFc8jVi4Vu qnxjdWdnoK31qOFC1K9oPPJtmOcKtADkTIyX+h0LfN9zvTt865gX4nphqIXmO+nFJWYB ACVwhSUN3WTbi0o0UD6RvU0J+LLKYJYu2askkTg7JI9MYLIUhrFqhFzN8d6sgFSMWHrC Q6ABZAkkFhbeHzbEmWsuCfxWAfYnp8XOIO+M3MYGyEOqFbGzYepdQJdxi+GUiDRq9WwJ oSR02A3G4y0h8R6sVbUp/RkZiIckvq0V3VBTZ1UmRBt99+EOURN5JG3vDNfC0cBxyGK+ tQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sunmefknd-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 11:12:09 +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 7BB731A0; Tue, 4 Jun 2019 08:55:43 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 09829250B; Tue, 4 Jun 2019 08:55:42 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:42 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:41 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 07/10] ARM: dts: stm32: update uart4 pin configurations for low power Date: Tue, 4 Jun 2019 10:55:16 +0200 Message-ID: <1559638519-6128-8-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_021215_037386_F7D6CF2D X-CRM114-Status: GOOD ( 11.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Bich Hemon , Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, pinctrl states defines only one "sleep" configuration for pins, no matter the possible uart low power modes (Rx pin always kept active). Sleep pin configuration is refined for low power modes: - "sleep" (no wakeup & console suspend enabled): put pins in analog state to optimize power - "idle" (wakeup capability): keep Rx pin in alternate function - "default" state remains untouched, to be used while the UART is active or in case the no_console_suspend mode is enabled Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi b/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi index 85c417d..2e1ab1b 100644 --- a/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi +++ b/arch/arm/boot/dts/stm32mp157-pinctrl.dtsi @@ -599,6 +599,23 @@ bias-disable; }; }; + + uart4_idle_pins_a: uart4-idle-0 { + pins1 { + pinmux = ; /* UART4_TX */ + }; + pins2 { + pinmux = ; /* UART4_RX */ + bias-disable; + }; + }; + + uart4_sleep_pins_a: uart4-sleep-0 { + pins { + pinmux = , /* UART4_TX */ + ; /* UART4_RX */ + }; + }; }; pinctrl_z: pin-controller-z@54004000 { From patchwork Tue Jun 4 08:55:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974443 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66BBB14B6 for ; Tue, 4 Jun 2019 09:12:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5101F27F97 for ; Tue, 4 Jun 2019 09:12:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 423C528689; Tue, 4 Jun 2019 09:12:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A247227F97 for ; Tue, 4 Jun 2019 09:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R6QP+PMMtyaOCzp01Hvp4Ztm1eyftT+OYErBgjQ43bY=; b=JI+M+yBBIlQohC CO3Ih4sWwTDyykkhf+nbwcfu7MTnprx3QnTgayGp3yJMkBLiTzU0o4YD/1up0LlislQDtZxGuZZKN pkvFf/hD2YExF/dHq0NAC073NWKBZ/VuWBuebaYjoc+4KHo9JDLbE6mUGQKzB09Bur1rwC9u/RTAi xgHZGt6uRMzoVZJg1f/x2mLHDagpZOtpB4Xku9WstXCBKa7E0Z3Exb28j3Q3hIMazubabxf3BUfwJ Aiz0UhTbSGghzoGKw+D/ivBfNG/13bYKc+tsW3GXr7xVqf1Qb0tT1Lsz7FyC3VoiqxkZ4m+p1VvI1 zyI4KGFBd8FQkltwbz1A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5UH-0005jV-Pv; Tue, 04 Jun 2019 09:12:09 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5UE-0005jA-IW for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 09:12:08 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5498qN1019707; Tue, 4 Jun 2019 11:12:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=tCqCtJ+aEYgGguO+2MVvQssjCEBkv0n4pYDaflX/fgg=; b=vZW6AxHp77jsL1NDtrWsqInx58HnzpDKTYw6dwAwdOPhoq5dIR7polTodTJGWpXOjsBG BxLQ8cFjPqI8RazZ2PUDq5+SUGwmdpIK8M2TeGEjqS+kToN0MCto4S3wMNmNts5lnhOw 0NHZef2YsHDplKzQA/VT+uaXdXSAAM8dVrlM33y5DX8gTlonYQM0tDnZ6poWCd02733d L+K26KpTKbFIPvVyA2aYwBfB9rFQ8pTgzSd3yHwlN+g32178Floepp3jT2y8iWyhABFc HN8PFxNtmMMGpFWb4PM8gLcFJJWPwfwXKlMYNONk5OrVZyVJKAcpsya2wGDfc1JfD1GC 5A== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sunmefkkc-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 11:12:00 +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 6D1331AC; Tue, 4 Jun 2019 08:55:44 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 055512509; Tue, 4 Jun 2019 08:55:43 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:43 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:43 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 08/10] ARM: dts: stm32: Update pin states for uart4 on stm32mp157c-ed1 Date: Tue, 4 Jun 2019 10:55:17 +0200 Message-ID: <1559638519-6128-9-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_021206_947356_4A6F5293 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Bich Hemon , Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bich Hemon Add idle and no_console_suspend states to uart4 pin configuration Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts b/arch/arm/boot/dts/stm32mp157c-ed1.dts index 62a8c78..34cc847 100644 --- a/arch/arm/boot/dts/stm32mp157c-ed1.dts +++ b/arch/arm/boot/dts/stm32mp157c-ed1.dts @@ -251,8 +251,11 @@ }; &uart4 { - pinctrl-names = "default"; + pinctrl-names = "default", "sleep", "idle", "no_console_suspend"; pinctrl-0 = <&uart4_pins_a>; + pinctrl-1 = <&uart4_sleep_pins_a>; + pinctrl-2 = <&uart4_idle_pins_a>; + pinctrl-3 = <&uart4_pins_a>; status = "okay"; }; From patchwork Tue Jun 4 08:55:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5B4A014B6 for ; Tue, 4 Jun 2019 09:13:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4808627F97 for ; Tue, 4 Jun 2019 09:13:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B8ED28068; Tue, 4 Jun 2019 09:13:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E379028689 for ; Tue, 4 Jun 2019 09:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eo2VEyr2dki7DauofoTM27FJPBfhff/asjFW3bwK8b0=; b=L6f2guZzlkzgf5 wKwv3/MtJr0k1ZMoiNKahKKKwuV+E3rj1CxC49GZkMCcfdw/49CTA6Yao3NvxGNkYESRy2lFIxZmA tu9DIXoguG9x1X8z6bZbyQU73vXpJRbJd7HCmiYULB7M9D5rdByPrtSpHrI+lpqFLiMylzYAMi970 Y2WVWzLrtgFK31T8QGLgJ3tuMkLTkEKIiCS6CBfZqckxwP34r+G2f3QsU4jbVdfza1Rs5+mGUad7P xuezYippgkKD5vCa1aeKD40YfH7RLWP1fzvMBrGGKiOcMUgwB08xdfbyFbNee6h6GPNZDcn25XIuH Eh3mtt9N3cpuSccczzag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5V2-00072G-KR; Tue, 04 Jun 2019 09:12:56 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5Uc-0006Id-NV for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 09:12:37 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5498m9K019440; Tue, 4 Jun 2019 11:12:25 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=k3/ECH5XcUZOXRvixEpZeLk28W6/a2P91oQPfmM+on4=; b=bAJJno+qbrc/tSfe3BN3GqFYSwWJkHaZgH/uHW9WQPl6bKOJsQdUHCX9GdowiUHqBcb5 rKtvYvdKfrTcyOeBVnbG5yz1csIQPh6KgjkYr5LjGhovSpuhlaZl/gALRkG18ggadS7/ d/43FN4Doll0+DPtrN7oB0K663fiZaHiYA8a4bXNncV7FpaNNMQhO+C0+3HqZ2SSdZaa Arp4UUjm6sbMi/7CdVIlV8LW9mKaemOiqS6fPnyNUGEnHUqmPABiqvROPI0T4s063Saq Nu6fV78IioOM4a6GlRY2m4SYbtvp1NIA5yDHWK4VLKVKGeCuJHHidMS7pckmrr632J4e hA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sunmefkt9-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 11:12:25 +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 9107A1B8; Tue, 4 Jun 2019 08:55:45 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DB1DD2507; Tue, 4 Jun 2019 08:55:44 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:44 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:44 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 09/10] ARM: dts: stm32: Update UART4 pin states on stm32mp157a-dk1 Date: Tue, 4 Jun 2019 10:55:18 +0200 Message-ID: <1559638519-6128-10-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_021231_237777_02A42CE3 X-CRM114-Status: GOOD ( 11.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Bich Hemon , Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bich Hemon Add idle and no_console_suspend states to uart4 pin configuration. Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157a-dk1.dts b/arch/arm/boot/dts/stm32mp157a-dk1.dts index 098dbfb..b851f80 100644 --- a/arch/arm/boot/dts/stm32mp157a-dk1.dts +++ b/arch/arm/boot/dts/stm32mp157a-dk1.dts @@ -244,7 +244,10 @@ }; &uart4 { - pinctrl-names = "default"; + pinctrl-names = "default", "sleep", "idle", "no_console_suspend"; pinctrl-0 = <&uart4_pins_a>; + pinctrl-1 = <&uart4_sleep_pins_a>; + pinctrl-2 = <&uart4_idle_pins_a>; + pinctrl-3 = <&uart4_pins_a>; status = "okay"; }; From patchwork Tue Jun 4 08:55:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Erwan LE RAY X-Patchwork-Id: 10974449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 584D26C5 for ; Tue, 4 Jun 2019 09:12:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44DB227F97 for ; Tue, 4 Jun 2019 09:12:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3933F28689; Tue, 4 Jun 2019 09:12:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C272028068 for ; Tue, 4 Jun 2019 09:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0ffXiyAjH8rQmDhBPIIVv5oAyKQwQVXIQXOziu81kjs=; b=rWoqilpRGqd2SD EYz21QPCdZpGxvYlgg/EMI/StR4w5frryyhnZlqOdc/TwYoA1lGHIhMHHfX7xWDHyDsi6M0bakDrI Ifclw+QKlkvp0JgOM79wocfI30RFO2oY1NFl0P3GR+XTtNRArPy/XyiNSx6Yz1/7J9F+6xO2FUEBK PULR+CPLnTy1yzb+RPgLfnzUguiIFpUROaYRlwgJdpGxirZ90wXyFLUbGl/df3OtauZZL3ha5YDF1 ZitJfiqZHSQU+zS4t6Igv2JboNnzhLnRTGki0KCitqHG6Gk7OM0ChQM5NT75LGQY53P9l/hYpt1kk wq/tDfEZ0JvuYJJ6jaNA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5Us-0006jr-Mg; Tue, 04 Jun 2019 09:12:46 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY5UY-00069e-Lj for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 09:12:37 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5498qNr019707; Tue, 4 Jun 2019 11:12:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=Bc+KS/X3joAnx5lC8TCpo/aZhNkGuBuIX5CpxV56wqo=; b=pvZ1Zq03DxTWhc2UPp72ygSR9h6LwOSwwEsNykmCOFX2qtw2gKpD+uZn/g/7zwXdjqeI UgLnopAc7hEY9jP7gJnPxtYH5aJf9vzeTQsJQ0/dqJTLIweUrnFUxGo+kCzCMhu7yM3d /EEGrAjhHXYrcorNr92Mews7GGoSoAYQWFXTPod6hq/BqRhizWL+V5KS/kdq0vG1eqLM sJCR1YfmKfWgK6+I0rjk9vvsMdUDykVz2DByAjWzoq7cv5MMR5IGJcnWo2SOgVrnEKH5 cUBmqZkL0XG38xYtbLkvbHoRNQeVfjZc99QzGr7B3cU+Jjbo1EL9nE601ktlc2BcZFIL Vg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sunmefkt8-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 04 Jun 2019 11:12:21 +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 9CBCB1C9; Tue, 4 Jun 2019 08:55:46 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6D6DD2503; Tue, 4 Jun 2019 08:55:46 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:46 +0200 Received: from localhost (10.201.23.31) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 4 Jun 2019 10:55:45 +0200 From: Erwan Le Ray To: Greg Kroah-Hartman , Jiri Slaby , Maxime Coquelin , "Alexandre Torgue" , Rob Herring , "Mark Rutland" Subject: [PATCH 10/10] ARM: dts: stm32: add wakeup capability on each usart/uart on stm32mp157c Date: Tue, 4 Jun 2019 10:55:19 +0200 Message-ID: <1559638519-6128-11-git-send-email-erwan.leray@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1559638519-6128-1-git-send-email-erwan.leray@st.com> References: <1559638519-6128-1-git-send-email-erwan.leray@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.31] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-04_07:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_021227_959009_76F0C5B0 X-CRM114-Status: GOOD ( 11.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Erwan Le Ray , linux-serial@vger.kernel.org, Fabrice Gasnier , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP - Mark all usart/uart devices as wakeup source. - Identify all dedicated interrupts with a specific interrupt name (either "event" or "wakeup"). - add interrupts-extended wakeup interrupt Signed-off-by: Erwan Le Ray diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi b/arch/arm/boot/dts/stm32mp157c.dtsi index 2afeee6..de5b1bf 100644 --- a/arch/arm/boot/dts/stm32mp157c.dtsi +++ b/arch/arm/boot/dts/stm32mp157c.dtsi @@ -395,32 +395,44 @@ usart2: serial@4000e000 { compatible = "st,stm32h7-uart"; reg = <0x4000e000 0x400>; - interrupts = ; + interrupt-names = "event", "wakeup"; + interrupts-extended = <&intc GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>, + <&exti 27 1>; clocks = <&rcc USART2_K>; + wakeup-source; status = "disabled"; }; usart3: serial@4000f000 { compatible = "st,stm32h7-uart"; reg = <0x4000f000 0x400>; - interrupts = ; + interrupt-names = "event", "wakeup"; + interrupts-extended = <&intc GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <&exti 28 1>; clocks = <&rcc USART3_K>; + wakeup-source; status = "disabled"; }; uart4: serial@40010000 { compatible = "st,stm32h7-uart"; reg = <0x40010000 0x400>; - interrupts = ; + interrupt-names = "event", "wakeup"; + interrupts-extended = <&intc GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>, + <&exti 30 1>; clocks = <&rcc UART4_K>; + wakeup-source; status = "disabled"; }; uart5: serial@40011000 { compatible = "st,stm32h7-uart"; reg = <0x40011000 0x400>; - interrupts = ; + interrupt-names = "event", "wakeup"; + interrupts-extended = <&intc GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>, + <&exti 31 1>; clocks = <&rcc UART5_K>; + wakeup-source; status = "disabled"; }; @@ -512,16 +524,22 @@ uart7: serial@40018000 { compatible = "st,stm32h7-uart"; reg = <0x40018000 0x400>; - interrupts = ; + interrupt-names = "event", "wakeup"; + interrupts-extended = <&intc GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>, + <&exti 32 1>; clocks = <&rcc UART7_K>; + wakeup-source; status = "disabled"; }; uart8: serial@40019000 { compatible = "st,stm32h7-uart"; reg = <0x40019000 0x400>; - interrupts = ; + interrupt-names = "event", "wakeup"; + interrupts-extended = <&intc GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>, + <&exti 33 1>; clocks = <&rcc UART8_K>; + wakeup-source; status = "disabled"; }; @@ -588,8 +606,11 @@ usart6: serial@44003000 { compatible = "st,stm32h7-uart"; reg = <0x44003000 0x400>; - interrupts = ; + interrupt-names = "event", "wakeup"; + interrupts-extended = <&intc GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>, + <&exti 29 1>; clocks = <&rcc USART6_K>; + wakeup-source; status = "disabled"; }; @@ -1201,8 +1222,11 @@ usart1: serial@5c000000 { compatible = "st,stm32h7-uart"; reg = <0x5c000000 0x400>; - interrupts = ; + interrupt-names = "event", "wakeup"; + interrupts-extended = <&intc GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, + <&exti 26 1>; clocks = <&rcc USART1_K>; + wakeup-source; status = "disabled"; };