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: 15518 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp401017wru; Fri, 4 Nov 2022 06:27:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4lovaE+haPHK5CXyuRyOPERBBSbZ2RzMrINQ9q8BoteZVEcGTDD79NxoGHK6dpEwawT2FT X-Received: by 2002:a17:907:1dec:b0:7aa:6262:f23f with SMTP id og44-20020a1709071dec00b007aa6262f23fmr754586ejc.38.1667568444522; Fri, 04 Nov 2022 06:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667568444; cv=none; d=google.com; s=arc-20160816; b=yDqi+gSZAuTxaJ3SGUNuMuvzEsbNm6IrDHkgjrHGh+aj12osqXV8cP82rMs0cAEdn+ ZaYj0fjLjcLU37JfjILSP+Vrp7aG6UiZr0yCKTQ/hMDRGpUNcfLT3BKQW5/NfixzRQD6 /D81Xol74agp2uHZ5b47YzcItkR/KWMkXpiTqFd0RZMAGG5Xud+VcjV4jXZ9zz+YF3Ul +yZ0Zxbn9Ow4TLjuAiPjXV3nA0h2vA+9qS5UO6DHDs41ZGiMqgmc1kvHrOeBgeLc3a0X CTG15sbUfFMnvmB7XBiCE8xEZF2b5B5vCfuJX5YrSvFCMM596aCjYzLg1DGmJr4/dF2U Egig== 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=QgCzrzwN9XIvSUkivo2/hyrRh7YfghP6V8F2WTKw/nA=; b=qkG7wyGZRs5+/E5Zr7ms4w6CYfv4NFs+pK083lZxnTRKtvycN7IOxCbxHpbi/sd7DX N6Su475Vi/BiG+LhrI/UU/QVcxxmbJlXtC0apP4BeqFSv6kaNSFknSY9iAPfth2pT8SF N2U9N+24i0V523EEEsATOPimzq4N53/5+8Z/mYM1KDhExji2t0WHt6VtQU4INfpwFr96 Sw5jv90IzmYPYsAJ+wP+OlW4sbIukGlsOkr1zVLZeM3XtT5IQwVYRfq9vRZ4bZnjUowM 0KRrdm2SI1M66i01YyiknI8crSRVarG+vWJesCiQXnnjFpjvm0KBSHJoHt8YutfoFCUO +vMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailoo.org header.s=mailo header.b="X7k/7N+V"; 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 dr14-20020a170907720e00b007a2d966eeccsi5354629ejc.686.2022.11.04.06.27.00; Fri, 04 Nov 2022 06:27:24 -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="X7k/7N+V"; 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 S231302AbiKDNZf (ORCPT + 99 others); Fri, 4 Nov 2022 09:25:35 -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 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?1748572249447242227?= X-GMAIL-MSGID: =?utf-8?q?1748572249447242227?= 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";