From patchwork Sat Oct 29 14:55:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Knecht X-Patchwork-Id: 12731 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1395951wru; Sat, 29 Oct 2022 08:26:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52985+1Ju3yKcbHTPTvgbXxMuc5fSPWAfvfcSVXYmDgVC4+BvtaKGDlI4fofZwv2YdEJu+ X-Received: by 2002:a17:902:cf08:b0:17d:46b6:25f9 with SMTP id i8-20020a170902cf0800b0017d46b625f9mr4898866plg.67.1667057199272; Sat, 29 Oct 2022 08:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667057199; cv=none; d=google.com; s=arc-20160816; b=ymfVGYOTSDdPhu1uVjvpKYRDMmWRFXfE66NYPfJB8PosCQkHI3wL9JO0ciakj7RebM DIsnzLaV8mA7UZJBv4bpATIKoZnQJViEQiTNPaK6E1zuZeKWbEw5WXVgr9loWmGNZBHM wDeG5ynfrR8SOarfSzjqeJbFiLD9aOCpZ7Z0x6pd/v6H03AC8o6WYpnR63bDUP3e8y51 hkDS905TiLnjGx2RKp8PkHLXKilLdThf0nIBTOgE0r0xnUR6Jbgr+z3BpR/kxu9T1sXz KXoHfWZR1lWT6TZ3hcLayurZsKBRPD4Xqn7BVJbx9nfZ1ZcFmbBUht7086avEFGB7aAp VUpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1u2FfHqCvN2LX9iqckjZ2jwYqR92hLvmN/JHPW4lmzE=; b=IEvtpF/8oMdfRHWzIy4pm1LQWY1lF+ToDrEJ1mLHeZR+wmJiCE7NkgXaZl8IIcVKAX Ibte/+cIaaePfuSt3w+ewI0b7loOTWKYJGX4ZxoouZdkU0gMvIRDUBOMwFuHOq7oP/wH uzDEmcYhB85pt/viXHmrtbizydzjjF6+s7K64vjC6P3C9BQX/+FhYZPpBGsBndB7NwFn VMulzgNABlXA1ijKYFQ6yd99Z0eUGRbKoKo0Suz3a/UqyNFYFEOqk56nXmDpYGPPUZwW bHOezzAGuRYPPvI9Gm6rzfieMdX8u98UcSQabOl4ibLPE2bp1mtOFGRBMgEiKLawt8PK MFfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=KQVEns2j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e68-20020a636947000000b0046040a8be4esi2170248pgc.754.2022.10.29.08.26.26; Sat, 29 Oct 2022 08:26:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=KQVEns2j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229991AbiJ2O45 (ORCPT + 99 others); Sat, 29 Oct 2022 10:56:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229497AbiJ2O4v (ORCPT ); Sat, 29 Oct 2022 10:56:51 -0400 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EA5127DF8; Sat, 29 Oct 2022 07:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1667055391; bh=Rjnk2GfEtjhc7aPN1HinZjHZRnbPWaoByT5yL4fs8vY=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:X-Mailer: MIME-Version:Content-Transfer-Encoding; b=KQVEns2j3bnqIGavDI94PVQtVcUmOhfJ2CgzISs3tHKmeNqCKIsTfz4CqvMk0m0hm LQ0nUYAUg6WfEo/d0qBD3pxqldEfdZt5/IHo/uIo2Birs7iuTUKT8ue74bVTMurB7b T5u+KqpKCHgoBfw5R03dS3gQ7VNa+LM3X6pVP0NI= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via [213.182.55.207] Sat, 29 Oct 2022 16:56:31 +0200 (CEST) X-EA-Auth: ffC9z5VMk1EziQcyiKwrCnIHjLobvY6isyGnBPrFPMjwQU8iLOhLQsjJ+rgjWc3rKFkDJnz7m3fzshX4JKVV/EnakQzGs4eEFIoHfeMap7Q= 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 v1 1/2] arm64: dts: qcom: msm8916-alcatel-idol347: add GPIO torch LED Date: Sat, 29 Oct 2022 16:55:56 +0200 Message-Id: <20221029145557.106920-1-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748036169821709602?= X-GMAIL-MSGID: =?utf-8?q?1748036169821709602?= Add support for torch LED on GPIO 32. Signed-off-by: Vincent Knecht --- .../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 3dc9619fde6e..3a0a593899ae 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 { bias-pull-up; }; + gpio_leds_default: gpio-leds-default { + pins = "gpio32"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + gyro_int_default: gyro-int-default { pins = "gpio97", "gpio98"; function = "gpio"; From patchwork Sat Oct 29 14:55:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincent Knecht X-Patchwork-Id: 12730 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1395401wru; Sat, 29 Oct 2022 08:24:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4qWRgHIb4Qa3FrRYXhWG4agw7UcrW6yqnwvJbtA28ss1U2fLV0trK7DxTwr6RkoL2wMovh X-Received: by 2002:a65:488a:0:b0:46f:8e44:9ce3 with SMTP id n10-20020a65488a000000b0046f8e449ce3mr1734956pgs.465.1667057083739; Sat, 29 Oct 2022 08:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667057083; cv=none; d=google.com; s=arc-20160816; b=ynont1E8Yu3IIsxcwWMV7WXbyJ1LDngeOyUQHMo3wNH2FXcoIPhblAh3yhL/jgwNKd o508Krx1zMGUVCWWUQaD7b8xG6u8d6fUaJKAC6fXgh+g1rp2N1PNeDbso7ldb1RvyJKB YKG6XX4UCDIgyNANKbdDoB0sTRjl3lt9py7jtOy4KaHDoT+N+tem4QsU5tQ2eupKvxXv sLFPDcdP9TbSfmEdF9BYkwi6XKv76I1b7eT1gNcGsvVLrjDfuz4H+ZT0h+Cct61W0FFd gD7L5XqT/8ucqaE3d3lZjZEb7KE252fc9e9fywEGAe6BNRA/PV/tr+z2OLA+c/UTAhxI aADQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=y8DZh1UvteWJgbwdxkirIVy8GCuSR3+sKAdufZN1ryc=; b=EdPM/t4WWdZoUFyKjt+72I4g59e04QKut9so8Awl1isPLWV0f/+2+bbUi+jIl/Epw2 aQRklS5RDXwE8wjscD7+pLw2Wm9140gypMAi+FVOWmHVOMD5yAsC3KJh0mZU3ZF5z6Pm BEsIxuAXto9hxNgpP1bsgIyRDiE1Ebm91TUopWBOlQUqPKcZtTZ1qnI/nPVV/R4CwKV/ n7btPhGDxXd3YW4H3MHR3R1lcXNZlWbLGZ1OoE2fZPZgf0Vs3szGfRJ87e9E0XmEfPZV sRsM8I8X0m+kkxe3L3/k+Cy4+UqFnHQshl+K+wFqUFnaXW+hhAZ+Sb8GeKUKj+rCfmvK Bq+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=lZ+latLX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r2-20020a170902c60200b0017a0f71990dsi1906572plr.141.2022.10.29.08.24.30; Sat, 29 Oct 2022 08:24:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b=lZ+latLX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbiJ2O4w (ORCPT + 99 others); Sat, 29 Oct 2022 10:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229679AbiJ2O4v (ORCPT ); Sat, 29 Oct 2022 10:56:51 -0400 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E9F01A831; Sat, 29 Oct 2022 07:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailoo.org; s=mailo; t=1667055393; bh=cnHB/4wJLTp97pHPmNGyrytKlD90FNbK6YTVOWwFjM0=; h=X-EA-Auth:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding; b=lZ+latLXQv3zvEePk//cFDAIpwxMiWZTxKcFeTvDSxh5LGT69dDzsPhZmnDuo7cYQ Q96Cf+swjxsY33wOxzfOaqHxj7ukEmfbMkqdckPDqAwEMpMXd44dve/w6WFZDUbPdQ VjBc8q41aaLVw1qNJoyrX1TWdKIJzXLr5IvECxgI= Received: by b-1.in.mailobj.net [192.168.90.11] with ESMTP via [213.182.55.207] Sat, 29 Oct 2022 16:56:33 +0200 (CEST) X-EA-Auth: ICeHAvWj9qLZjB+ctyqYPt4DioJaU/Djg+uFctKL2Y03oPkzlKncDD3xawmzWga5ooQLzFwsNw1TaxOkcDKyklx/+0fJ0VjqkolTrdLhTgU= 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 v1 2/2] arm64: dts: qcom: msm8916-alcatel-idol347: add LED indicator Date: Sat, 29 Oct 2022 16:55:57 +0200 Message-Id: <20221029145557.106920-2-vincent.knecht@mailoo.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221029145557.106920-1-vincent.knecht@mailoo.org> References: <20221029145557.106920-1-vincent.knecht@mailoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748036048503836089?= X-GMAIL-MSGID: =?utf-8?q?1748036048503836089?= 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 --- .../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 3a0a593899ae..952ae092e6ae 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 { 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 { + pins = "gpio102"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + output-high; + }; + + led_shutdown_default: led-shutdown-default { + pins = "gpio89"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + mag_reset_default: mag-reset-default { pins = "gpio8"; function = "gpio";