From patchwork Tue Sep 12 11:57:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 112298 Delivered-To: patch@linaro.org Received: by 10.80.202.13 with SMTP id d13csp5794618edi; Tue, 12 Sep 2017 04:58:09 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7oau89cwTaljcyoJE6APPKeP/Js8CB2jZWzCI+psc1uneDmnmt862U7VGgr/guQpcs79tB X-Received: by 10.101.77.74 with SMTP id j10mr14643320pgt.324.1505217489857; Tue, 12 Sep 2017 04:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505217489; cv=none; d=google.com; s=arc-20160816; b=1HcXOxu2sWVdmEphDJkmgvi/tGEQ+24LJE7ao4TNc4V20h3A9WMSjOZpi0JOJpBhrm +hJb3hg/Ph1Wp1+y5AMBHvHpE0mR5H9wQeMA1CvucnLsoLMuNTeXfA62QS7GS9F4PWmD tjOHkv2QRnEhI5oOIu6NnCUy8dLXNEIAKVJSdbHHXfNfYh7pQgH41khoHEvhWzZsLMRB fgBoYuJuy1G6AoJllYy+x4n1IgeKNWeIbLr+DVkeCUCiXiS96ZT/yCsgQG56NuV6z87z f1mpD+WbFXA65k82R9nwV+zM3TDMGrzBw8g86K2d38nGZUv6JZYa32uspzYUmnRyCop+ ZeBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6LMuEjY21I/FybkDnI9YtV616QA9+LgRXzLeYt+TwSc=; b=Z03cDZtFO/ZGUILmp2wvb9k+qIQHuFilEvY/jGJoFSw6VensTO1WmCcYoChBoDudqP F8dy9HSsl00g0aCZ/B+frSAzLEqVlX2NVXDW88aaXyMuHTO25V4tp85RSbqsxHbmIhRy rVDeym1X3KM0/QgBQKTSOrPsTcqpNn5tDXkfyB8GCsJkH8uXXmTQ96Fz6q8kW158hqiq aIXzyDhXuScPfEDWjp1Qr0Ok3IBwTSgQGbKQfCn0wTHvS7vJEkELbCDgZ7Lm8l/YvK37 7bekY0QlCGldmyL8Vut+yHypO2jalpv/m/0sBVsJfUlepyAoQUcdqwrZF9J6pY3+yCoS BCEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k85si7899259pfj.72.2017.09.12.04.58.09; Tue, 12 Sep 2017 04:58:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751337AbdILL6J (ORCPT + 4 others); Tue, 12 Sep 2017 07:58:09 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:38082 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751289AbdILL6I (ORCPT ); Tue, 12 Sep 2017 07:58:08 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20170912115805euoutp0228e95d07d670e03541e2089904a4b991~jm1QBj8ei1589515895euoutp02O; Tue, 12 Sep 2017 11:58:05 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170912115804eucas1p2677544f39246b6efe5b9af78539b7711~jm1PT0WkG2863428634eucas1p29; Tue, 12 Sep 2017 11:58:04 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges5.samsung.com (EUCPMTA) with SMTP id 84.5E.12743.CCBC7B95; Tue, 12 Sep 2017 12:58:04 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170912115804eucas1p1959db12366143b87d14725e227520854~jm1OsL2IA0853808538eucas1p1R; Tue, 12 Sep 2017 11:58:04 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d0000031c7-7b-59b7cbcc5d83 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 83.3F.18832.CCBC7B95; Tue, 12 Sep 2017 12:58:04 +0100 (BST) Received: from AMDC2765.digital.local ([106.116.147.25]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OW6008V118ON740@eusync2.samsung.com>; Tue, 12 Sep 2017 12:58:04 +0100 (BST) From: Marek Szyprowski To: linux-samsung-soc@vger.kernel.org Cc: Marek Szyprowski , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Brian Kim Subject: [PATCH v2] ARM: dts: exynos: Add power button for Odroid XU3/4 Date: Tue, 12 Sep 2017 13:57:54 +0200 Message-id: <1505217474-14725-1-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRmVeSWpSXmKPExsWy7djP87pnTm+PNLjVqmSxccZ6VouTL2ey WZw/v4HdYsb5fUwWa4/cZXdg9Th98x2Tx6ZVnWwefVtWMXp83iQXwBLFZZOSmpNZllqkb5fA lXFu11LGgm+iFR29fxgbGJ8KdjFyckgImEg8fbSGGcIWk7hwbz1bFyMXh5DAUkaJn7tvM0I4 nxklF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xK4ry9e1ZHCgmkJ5akZqemFqQWwWSZODilGhgTL+cfD38seeeZmOAGucmt/zPu 3Lp9IDCHVXLS5ISwtLUCIXJ7NOwUN5pOC1vHsTVqzWq72+ZcXH9WTiq6o1PuPPMOwwHz1ddn mJZPN78f1ypt680UKcpnN/tyYPmMzbzvWQ8F/DphbBVZnqr1saLv54I18Vt/Biz4s8HPsDil PVPt5Cy9HVOUWIozEg21mIuKEwE9OCWdAAIAAA== X-CMS-MailID: 20170912115804eucas1p1959db12366143b87d14725e227520854 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?utf-8?q?Marek_Szyprowski=1BSRPOL-Kernel_=28TP=29=1BSam?= =?utf-8?q?sung_Electronics=1BSenior_Software_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BEHQ=1BC10CD02CD027392?= CMS-TYPE: 201P X-CMS-RootMailID: 20170912115804eucas1p1959db12366143b87d14725e227520854 X-RootMTR: 20170912115804eucas1p1959db12366143b87d14725e227520854 References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org From: Brian Kim The power button (SW2) on Odroid XU3/4 is connected to the PWRON pin of the S2MPS11 PMIC. The S2MPS11 datasheet says that ONOB pin operates as 'PWRON key active low signal'. In fact, S2MPS11 PMIC acts as a 16ms debouce filter and signal inverter, thus effectively repeating PWRON (active high) to ONOB pin (active low). ONOB PMIC pin is then connected to XEINT3 SoC pin, so we get the state of the power button on the gpx0-3 GPIO. This patch adds device-tree bindings for the power button of Odroid XU3/4 boards. Signed-off-by: Brian Kim [mszyprow: extended commit message, added comments and fixed minor issues in the dts] Signed-off-by: Marek Szyprowski --- Changelog: v2: fixed minor issues pointed by Krzysztof Kozlowski: - added comments to dts - extended commit message - removed useless interrupts property - used proper macros for gpios - removed gpio prefix v1: initial submission https://patchwork.kernel.org/patch/9605023/ --- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Anand Moon Tested-by: Anand Moon diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi index a183b56283f8..29a718ae621a 100644 --- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi @@ -13,6 +13,7 @@ */ #include +#include #include #include #include @@ -41,6 +42,27 @@ }; }; + gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&power_key>; + + power_key { + /* + * The power button (SW2) is connected to the PWRON + * pin (active high) of the S2MPS11 PMIC, which acts + * as a 16ms debouce filter and signal inverter with + * output on ONOB pin (active low). ONOB PMIC pin is + * then connected to XEINT3 SoC pin. + */ + gpios = <&gpx0 3 GPIO_ACTIVE_LOW>; + linux,code = ; + label = "power key"; + debounce-interval = <0>; + wakeup-source; + }; + }; + emmc_pwrseq: pwrseq { pinctrl-0 = <&emmc_nrst_pin>; pinctrl-names = "default"; @@ -561,6 +583,13 @@ }; &pinctrl_0 { + power_key: power-key { + samsung,pins = "gpx0-3"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + hdmi_hpd_irq: hdmi-hpd-irq { samsung,pins = "gpx3-7"; samsung,pin-function = ;