From patchwork Mon Nov 29 16:55:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 12693935 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 2682DC433F5 for ; Mon, 29 Nov 2021 16:56:36 +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: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:In-Reply-To:References: List-Owner; bh=bzhPrXY9CWxReyymnzfcFnrBbZX6KNW6R+rfKwA5lTE=; b=1hGwCVq1r25i+O 6alADHsNLek7InqBxnlKfHluB/PAfEsN/PvC4n3VwvOyaRWd+znHOE6gqDZHpC95k6xlxI8HlvFB3 MBBDH2UFOmx12Tnv32HUNwCa+KMMGRPEwI64DRXmUv4HaG7J1apN8r10fiVkuC3P0iv4f25dxuAXJ EsUxLod6pk19f989Vk434vko4h4kF8wnyy3zOQZ9keRnAJAaH6sa/0/TqYYMFVqsdZPmGxqJSVQAg rEvDMPt95tI/YHs64z/xQAVVfV29MvhFtIUP8mxieCjHj6y7EgratdhVaVq5FNS61dSjBhfkKJG84 DKMFqaX56nuGJ1WG1jUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrjvz-001Vw5-5X; Mon, 29 Nov 2021 16:55:19 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrjvw-001VvC-31 for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 16:55:17 +0000 Received: by mail-wm1-x32e.google.com with SMTP id c6-20020a05600c0ac600b0033c3aedd30aso12863339wmr.5 for ; Mon, 29 Nov 2021 08:55:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GG5IcfDm+AMeXL7H50gjjx1nk2+97tgWyxWTprQdbjQ=; b=n9S4SOH+hITJyCaI4qEBAvyEb/j05Fzj23D9YCXkYDRU9QQLk1XdgZ9Jd8vYzCgJPS YuyUw4mSn5/+ZDviDKB35OE8f4xZm6M77uBqi8dh7E30k1C7RUzy/Fw+RC+C8JqDrYNN HgAul6nFSunzTg3frkYV7Dx2XPY8ed7GDvkayyKKCNbIYTpa0V7Ju1wB9m5W27SAYyZI rAKMjQVqzeWrwxq5wbi4gYebOdCqOyO5qzwvn5+fEY9WD/azV7DNrKomChqB2tuT5+ZU L7mqWFkUxQ0haXZve/kuQvqeyjmtHIcqglJF67dF20YMV3qKIvxr8mHzuqo1K+6D7sYz 0uww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GG5IcfDm+AMeXL7H50gjjx1nk2+97tgWyxWTprQdbjQ=; b=ztbQTeyfQXoLceCZbLpGu9hQj8Co4QymhHjjisBuru3qWG2dp8yWfbcgYpdn6YYnlN oa52VUHXKJD08oZM5cFZ6xIluRsWXQkhP2grLSj+59eM1O+WgX+X9o0ROBbB84DGRRKZ UB1XIT3dumz6+1LtAEUjZDBxNVt2QfcRVyq2LpC2PxIIDWQ5ibSeOF5EoqzgSvlb5wWM CwCgyYn3FdmrEpjLgkK+gJ6G5kGggbUKSynHTW+F2VpUO/LCCSyW2ql9WtPh0ctp0LXw dQXQFwYvwZYDNtxHwjEzCq6L9MnFptLGPfId0C8iae75MwNPWfOSJqd3kHUZswGrIqIc YDVg== X-Gm-Message-State: AOAM533pObC9U3Ti45XhvXH9FcsSxHoc0RhOOaBXLRrb/IP3cUk6XaFW rRwInnOQYyn6RhTBrL8RIHU= X-Google-Smtp-Source: ABdhPJyTqLw6ql4fgR+ktp+Ip5KVhQ8XbBi1weeHAETxyYUzzQX/s1IC0fdkyYGaq0tMwspRYBZrfg== X-Received: by 2002:a05:600c:4f87:: with SMTP id n7mr37180639wmq.168.1638204913765; Mon, 29 Nov 2021 08:55:13 -0800 (PST) Received: from kista.localdomain (cpe-86-58-29-253.static.triera.net. [86.58.29.253]) by smtp.gmail.com with ESMTPSA id q26sm14528695wrc.39.2021.11.29.08.55.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Nov 2021 08:55:13 -0800 (PST) From: Jernej Skrabec To: mripard@kernel.org, wens@csie.org Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec , Michael Klein Subject: [PATCH v2] ARM: dts: sun8i: Adjust power key nodes Date: Mon, 29 Nov 2021 17:55:10 +0100 Message-Id: <20211129165510.370717-1-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211129_085516_172126_5F4F3457 X-CRM114-Status: GOOD ( 11.97 ) 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 Several H3 and one H2+ board have power key nodes, which are slightly off. Some are missing wakeup-source property and some have BTN_0 code assigned instead of KEY_POWER. Adjust them, so they can function as intended by designer. Co-developed-by: Michael Klein Signed-off-by: Michael Klein Signed-off-by: Jernej Skrabec Acked-by: Chen-Yu Tsai --- Changes from v1: - added Co-developed-by tag arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts | 3 ++- arch/arm/boot/dts/sun8i-h3-nanopi.dtsi | 1 + arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 3 ++- arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 3 ++- arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 3 ++- arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi | 1 + 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts index 8e8634ff2f9d..d5c7b7984d85 100644 --- a/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts +++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts @@ -52,8 +52,9 @@ gpio_keys { sw4 { label = "power"; - linux,code = ; + linux,code = ; gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; + wakeup-source; }; }; diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi index c7c3e7d8b3c8..fc45d5aaa67f 100644 --- a/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi +++ b/arch/arm/boot/dts/sun8i-h3-nanopi.dtsi @@ -81,6 +81,7 @@ k1 { label = "k1"; linux,code = ; gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; + wakeup-source; }; }; }; diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts index 597c425d08ec..9daffd90c12f 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts @@ -99,8 +99,9 @@ sw2 { sw4 { label = "sw4"; - linux,code = ; + linux,code = ; gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; + wakeup-source; }; }; diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts index 5aff8ecc66cb..90f75fa85e68 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts @@ -91,8 +91,9 @@ r_gpio_keys { sw4 { label = "sw4"; - linux,code = ; + linux,code = ; gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; + wakeup-source; }; }; }; diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi index 7a6af54dd342..d03f5853ef7b 100644 --- a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi +++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi @@ -82,8 +82,9 @@ gpio_keys { sw4 { label = "power"; - linux,code = ; + linux,code = ; gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>; + wakeup-source; }; }; diff --git a/arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi b/arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi index c44fd726945a..9e14fe5fdcde 100644 --- a/arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi +++ b/arch/arm/boot/dts/sunxi-libretech-all-h3-cc.dtsi @@ -49,6 +49,7 @@ power { label = "power"; linux,code = ; gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ + wakeup-source; }; };