From patchwork Sat Jul 25 11:08:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 11684959 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C4635138C for ; Sat, 25 Jul 2020 11:17:15 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9092A206C1 for ; Sat, 25 Jul 2020 11:17:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RMfYtf35"; dkim=temperror (0-bit key) header.d=z3ntu.xyz header.i=@z3ntu.xyz header.b="I3YwHjrz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9092A206C1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=z3ntu.xyz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=mGXrEM/zOAQ9KD/DRmP2/5pBCDniVs8MYEyhqKqE7ps=; b=RMfYtf35lrK/Bemz6tD4uIYlkL Zy48GvCsyWe9eRlffVG7VBIP6fGTiwLUP5car5OFs7H5yHSVwMBmfZjetrTZehf72FcTp0/10JNKa jM4MjgwRY08SEO37HeDf11+R7IhZLPhGuJXs7B4HJwfa5Xajx7CmKhqqgg21mwd/Lz/sPWutUO+mm eIPBnJP0D2TNRq0sPrR7OqHi7vW5eVP5d3lpXXbR3ewv6IqFN9Sk1l58Y3P8dxtUZ9HW/cJy7EAVV b+0kXBtic2Jdua4TTapXn6fWjH2YbhuPGRunzXcDMinPYWCxJmCjR+xt2KuB3j2B2x1kb6ZRuMkD/ 9tDE1txg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzI91-0001m1-0z; Sat, 25 Jul 2020 11:15:11 +0000 Received: from mail.z3ntu.xyz ([128.199.32.197]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jzI8y-0001lf-FU for linux-arm-kernel@lists.infradead.org; Sat, 25 Jul 2020 11:15:09 +0000 Received: from localhost.localdomain (80-110-125-173.cgn.dynamic.surfer.at [80.110.125.173]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 6D62DC8DE4; Sat, 25 Jul 2020 11:08:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1595675308; bh=XGCgnG3zaA6+JlKqdyeyx7BIoqEDrm/wMUBHk9wYz5A=; h=From:To:Cc:Subject:Date; b=I3YwHjrzdGV0mj4IygSFtz10bUCzT4ak1a1dqmSaIWRzyjkZrncZRgNTb+ZWAa0tP aENeUq5LGblOB7aI4nrdU6IpbQRq3utoZMLDtrga5czAYqonNtZiFs2P/acXxxxO58 qkYqsME4grc9Avg3vJEP9PhcfJs5loQN/TL3wHAQ= From: Luca Weiss To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: dts: sun50i-pinephone: add led flash Date: Sat, 25 Jul 2020 13:08:12 +0200 Message-Id: <20200725110812.199529-1-luca@z3ntu.xyz> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200725_071508_655179_D8842C7C X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 2.3 (++) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 T_PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: z3ntu.xyz (xyz)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD 2.0 FROM_SUSPICIOUS_NTLD_FP From abused NTLD X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Maxime Ripard , Luca Weiss , Chen-Yu Tsai , Rob Herring , ~postmarketos/upstreaming@lists.sr.ht Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org All revisions of the PinePhone have an SGM3140 LED flash. The gpios were swapped on v1.0 of the board but this was fixed in later revisions. Signed-off-by: Luca Weiss --- .../boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts | 5 +++++ .../boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts | 5 +++++ .../boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts | 5 +++++ .../boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 11 +++++++++++ 4 files changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts index 0c42272106afa..b579b03d4e026 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.0.dts @@ -9,3 +9,8 @@ / { model = "Pine64 PinePhone Developer Batch (1.0)"; compatible = "pine64,pinephone-1.0", "allwinner,sun50i-a64"; }; + +&sgm3140 { + flash-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ + enable-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */ +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts index 3e99a87e9ce52..8552587aac248 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.1.dts @@ -28,3 +28,8 @@ &backlight { num-interpolated-steps = <50>; default-brightness-level = <400>; }; + +&sgm3140 { + flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */ + enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts index a9f5b670c9b82..ec77715ba4a2a 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone-1.2.dts @@ -38,3 +38,8 @@ &lis3mdl { interrupt-parent = <&pio>; interrupts = <1 1 IRQ_TYPE_EDGE_RISING>; /* PB1 */ }; + +&sgm3140 { + flash-gpios = <&pio 2 3 GPIO_ACTIVE_HIGH>; /* PC3 */ + enable-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ +}; diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi index 25150aba749dc..e0bc1bcc1c1f3 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi @@ -60,6 +60,17 @@ vibrator { enable-gpios = <&pio 3 2 GPIO_ACTIVE_HIGH>; /* PD2 */ vcc-supply = <®_dcdc1>; }; + + sgm3140: led-controller { + compatible = "sgmicro,sgm3140"; + vin-supply = <®_dcdc1>; + + sgm3140_flash: led { + function = LED_FUNCTION_FLASH; + color = ; + flash-max-timeout-us = <250000>; + }; + }; }; &codec {