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";