From patchwork Fri Nov 4 13:23:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Knecht X-Patchwork-Id: 13031870 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AAAD8C43217 for ; Fri, 4 Nov 2022 13:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230041AbiKDNZY (ORCPT ); Fri, 4 Nov 2022 09:25:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231388AbiKDNYx (ORCPT ); Fri, 4 Nov 2022 09:24:53 -0400 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAD492EF2D; Fri, 4 Nov 2022 06:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1667568258; bh=VpeM8QHNgIDViZAVdCgdIsI8ValCbkXsYMsD6mNoyqk=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=KYqX6YxKYOlY+VBrpDvLOGbdWCsyk78pz1iAYeB9ugxIw9/PYlI1R2kIFReDyoGqT uouI9/AaslWlW/54wyJo1Q3sYfgABQRWFlbAsrZAIqCE7kqGiaBHwWATG1iEA+P4ZO woPRT9l880tdIrTZxXMCstzn4jtMt+BvSbiQLDKI= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via proxy.mailoo.org [213.182.55.207] Fri, 4 Nov 2022 14:24:18 +0100 (CET) X-EA-Auth: vZ1oDn2afiJgqWUk+guD7nKtwcloj0jSwho/kvrC7C0/Zk1iLTdGs+yGJnwz7tnNkWdjw1srmj2cDigqAq0Pl+enY85kCS/wD7Iq3fepqIQ= From: Vincent Knecht To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vincent Knecht Subject: [PATCH v2 1/3] arm64: dts: qcom: msm8916-alcatel-idol347: Add GPIOs -state suffix Date: Fri, 4 Nov 2022 14:23:58 +0100 Message-Id: <20221104132400.1763218-2-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104132400.1763218-1-vincent.knecht@mailoo.org> References: <20221104132400.1763218-1-vincent.knecht@mailoo.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add -state suffix to GPIOs states node names as required by dt-bindings. Signed-off-by: Vincent Knecht --- .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index 3dc9619fde6e..668f8ff53229 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -260,7 +260,7 @@ l18 { }; &msmgpio { - accel_int_default: accel-int-default { + accel_int_default: accel-int-default-state { pins = "gpio31"; function = "gpio"; @@ -268,7 +268,7 @@ accel_int_default: accel-int-default { bias-disable; }; - gpio_keys_default: gpio-keys-default { + gpio_keys_default: gpio-keys-default-state { pins = "gpio107"; function = "gpio"; @@ -276,7 +276,7 @@ gpio_keys_default: gpio-keys-default { bias-pull-up; }; - gyro_int_default: gyro-int-default { + gyro_int_default: gyro-int-default-state { pins = "gpio97", "gpio98"; function = "gpio"; @@ -284,7 +284,7 @@ gyro_int_default: gyro-int-default { bias-disable; }; - mag_reset_default: mag-reset-default { + mag_reset_default: mag-reset-default-state { pins = "gpio8"; function = "gpio"; @@ -292,7 +292,7 @@ mag_reset_default: mag-reset-default { bias-disable; }; - proximity_int_default: proximity-int-default { + proximity_int_default: proximity-int-default-state { pins = "gpio12"; function = "gpio"; @@ -300,7 +300,7 @@ proximity_int_default: proximity-int-default { bias-pull-up; }; - ts_int_reset_default: ts-int-reset-default { + ts_int_reset_default: ts-int-reset-default-state { pins = "gpio13", "gpio100"; function = "gpio"; @@ -308,7 +308,7 @@ ts_int_reset_default: ts-int-reset-default { bias-disable; }; - usb_id_default: usb-id-default { + usb_id_default: usb-id-default-state { pins = "gpio69"; function = "gpio"; From patchwork Fri Nov 4 13:23:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Knecht X-Patchwork-Id: 13031873 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C8BAC43217 for ; Fri, 4 Nov 2022 13:26:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230222AbiKDNZ4 (ORCPT ); Fri, 4 Nov 2022 09:25:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231806AbiKDNZM (ORCPT ); Fri, 4 Nov 2022 09:25:12 -0400 Received: from msg-4.mailo.com (msg-4.mailo.com [213.182.54.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 859F62EF53; Fri, 4 Nov 2022 06:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1667568259; bh=UgO1xNnlTSFaN2qgupbbM8Ur3DOStS+vykVPuifYPLo=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=POxlVPOzyuqsAyHRx/0M92+BPkcY59Ddwh0JhArQ2LWPBuADYp95DX8DqXGoRmDt8 ePMJ8gpMJhbIsHOsy5XrAAhWuk40WrCDjVzicU4ALZJ0bDclzPVw2PB5F1gIWU9lSN JpytAxF/elmeNr3oZwbgwjU9lI+y442Lvt+Dso58= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via proxy.mailoo.org [213.182.55.207] Fri, 4 Nov 2022 14:24:19 +0100 (CET) X-EA-Auth: 4p+PYttiXqTiCOGG50FOja6s6oKhTxS56lC5svw7yIr4FnkQPn3cryCjUKrBJ2w9pr1Aif9YF+wg8uiJ7kMWNSjJISFkiE1sr/OByAIgpU8= From: Vincent Knecht To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vincent Knecht Subject: [PATCH v2 2/3] arm64: dts: qcom: msm8916-alcatel-idol347: add GPIO torch LED Date: Fri, 4 Nov 2022 14:23:59 +0100 Message-Id: <20221104132400.1763218-3-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104132400.1763218-1-vincent.knecht@mailoo.org> References: <20221104132400.1763218-1-vincent.knecht@mailoo.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for torch LED on GPIO 32. Signed-off-by: Vincent Knecht Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio --- .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index 668f8ff53229..eadeb1a445fd 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -5,6 +5,7 @@ #include "msm8916-pm8916.dtsi" #include #include +#include / { model = "Alcatel OneTouch Idol 3 (4.7)"; @@ -34,6 +35,19 @@ button-volume-up { }; }; + gpio-leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_leds_default>; + + led-0 { + gpios = <&msmgpio 32 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "torch"; + function = LED_FUNCTION_TORCH; + }; + }; + usb_id: usb-id { compatible = "linux,extcon-usb-gpio"; id-gpio = <&msmgpio 69 GPIO_ACTIVE_HIGH>; @@ -276,6 +290,14 @@ gpio_keys_default: gpio-keys-default-state { bias-pull-up; }; + gpio_leds_default: gpio-leds-default-state { + pins = "gpio32"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gyro_int_default: gyro-int-default-state { pins = "gpio97", "gpio98"; function = "gpio"; From patchwork Fri Nov 4 13:24:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Knecht X-Patchwork-Id: 13031872 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48EE5C43217 for ; Fri, 4 Nov 2022 13:25:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232034AbiKDNZ0 (ORCPT ); Fri, 4 Nov 2022 09:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231567AbiKDNYy (ORCPT ); Fri, 4 Nov 2022 09:24:54 -0400 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE1412FC30; Fri, 4 Nov 2022 06:24:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1667568260; bh=/VuTcksTYzQcmTVddTorAaSINvFG5kEAozPNxmP6P0k=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=X7k/7N+Vu71B3AuVpAKMN44ePg8unhWCDJK5VnPVpvEtC0fIxFbmCXrrC1rmUNouh ovC7E1G7tWzOWew5cXzKcHJI+3D7tiTypW2Dp8H7zmxbbEeakXjzmGdyvp5ZttgaTR kKGEKVKi2go630EvVCseM8Rq2wgxJ/RtP2ZJUzsE= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via proxy.mailoo.org [213.182.55.207] Fri, 4 Nov 2022 14:24:20 +0100 (CET) X-EA-Auth: MBXKOFvLNcjuDq1qBH+FDXkViUMQsA7Hp6gAIFNEdb1ykPMxL1HfK1DFo7RY5OsAe4h/EV1PvpkfwVbk083EliZqx1ANLoHEIK3S6UucV5A= From: Vincent Knecht To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vincent Knecht Subject: [PATCH v2 3/3] arm64: dts: qcom: msm8916-alcatel-idol347: add LED indicator Date: Fri, 4 Nov 2022 14:24:00 +0100 Message-Id: <20221104132400.1763218-4-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221104132400.1763218-1-vincent.knecht@mailoo.org> References: <20221104132400.1763218-1-vincent.knecht@mailoo.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add si-en,sn3190 LED controller to enable white LED indicator. This requires adding the additional "enable" gpio that the OEM choose to use, despite it not being mentioned in si-en,sn3190 datasheet nor supported by the driver. Signed-off-by: Vincent Knecht Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio --- .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index eadeb1a445fd..701a5585d77e 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -130,6 +130,27 @@ gyroscope@68 { }; }; +&blsp_i2c6 { + status = "okay"; + + led-controller@68 { + compatible = "si-en,sn3190"; + reg = <0x68>; + shutdown-gpios = <&msmgpio 89 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&led_enable_default &led_shutdown_default>; + #address-cells = <1>; + #size-cells = <0>; + + led@1 { + reg = <1>; + led-max-microamp = <5000>; + function = LED_FUNCTION_INDICATOR; + color = ; + }; + }; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -306,6 +327,29 @@ gyro_int_default: gyro-int-default-state { bias-disable; }; + /* + * The OEM wired an additional GPIO to be asserted so that + * the si-en,sn3190 LED IC works. Since this GPIO is not + * part of the IC datasheet nor supported by the driver, + * force it asserted here. + */ + led_enable_default: led-enable-default-state { + pins = "gpio102"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + output-high; + }; + + led_shutdown_default: led-shutdown-default-state { + pins = "gpio89"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + mag_reset_default: mag-reset-default-state { pins = "gpio8"; function = "gpio";