From patchwork Thu Jul 20 09:15:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 123160 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp3014272vqt; Thu, 20 Jul 2023 03:17:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlEnNri3HSWDxYjZOa9XLEOg90mxOLZmjt5hoOdiMSQmZ1pBYYkvCmeWQwXe92Z95YaIA5eb X-Received: by 2002:a05:6e02:1a4f:b0:348:7d72:6371 with SMTP id u15-20020a056e021a4f00b003487d726371mr6031127ilv.2.1689848259787; Thu, 20 Jul 2023 03:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689848259; cv=none; d=google.com; s=arc-20160816; b=TaF8BnjrtZgy8KGr8Mt1IyLxVtvAdYzDWneYQjgJrYoaLPggeLD0XIk9JjTinME2dG gyMXmh17vIUa38G2tguKltnXr9ucYL2e8dFVT4up8MxsTZfho1VFLby/rVIbkVNWfRZi bgdq2na++90waig9m3dMcJuZidiMu7r8JvTd6evEwrOXhTnPHD8SQNl6dnVIqCbeN4UL CqqUnqdIwvS4PYNNK/BgJ5b1b4hgPj3sw0FHrlKiBQtE9cuc3892K/KBVcerq/jPHtFV u3BoD4uNO9eqcxuaj+ZzjrSSBsySpXi6ej2PrxEsj6QKrioGwDcmzcBXx5FVryN6qf1i 6OqA== 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=4j39ue0qWkoQXKChqLhlwL+JOaigzxBG0E2V7p0YIYo=; fh=uGEc3qeQ+B+Yo0u7lPbmhzkQADK5I92L1Jpsw9BuXDY=; b=qVHLeJjpzK1+UIpG3bAEuU32+1Pt4jayx5GADaAW/HmAAl2nLqrBIb7Y39/ZB0T3zM tdnepJbhqQGzOa3NFS2wOBNCmcbMa3Vxi331/36V4epL9jKAEtMWFgfn+t0XU30F4WHx AeoFWxq9jupUoorXrjxFIQ2PPKRhaMV3a+8C+nSk0SbBcwshubRJxJ4nzlHNPn9Az41K AFCR+7DsG5MzIbCFhB1KFlyMHdDhxas7JzOxkbrXCvBSGABQXdTjO4UgZhvwBcWvkpIB A4G4CpPZy1tLCjxVnVUIT4aJiMnBI3eP0NmVsON9N4LcuIKw1M+HBLEo1Sv+1lE1MAVB YQ/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MQnAfkGG; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a17090a8c1100b00262e3c1c1efsi847818pjo.79.2023.07.20.03.17.26; Thu, 20 Jul 2023 03:17: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=pass header.i=@collabora.com header.s=mail header.b=MQnAfkGG; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbjGTJ34 (ORCPT + 99 others); Thu, 20 Jul 2023 05:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230003AbjGTJ3c (ORCPT ); Thu, 20 Jul 2023 05:29:32 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 055A43961D; Thu, 20 Jul 2023 02:16:07 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id B92666607081; Thu, 20 Jul 2023 10:16:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1689844566; bh=1kIQPzG/tgjCwU+YLIkNToFU9pBMo4SofHsQ5ly6SG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MQnAfkGGXEG5PUrRuYzAjvqKysQcZLwLOUudeIAt3iL8xj2mi79zqtLcGwl7Pk8Em zqV8QImm4LxIHHWtExZn964mPpZlFSHIDhKpEupOcow+JRlQzz/7cRV83VURKfIt/5 bWb/UfQhcPARvUNw9nLuADmOR5UKbCXSoUgFgAnJ2HnXVYESck8ItaEYHuEHS0v+8m n/UfT/9erk1aPTxe3yWzKiJZEnKio4YzuxUWYd83pbjrbFsyQHq9L2m4E0Gk7EYl1O A9kmOJVqXPcyEaiz8u9M0GzajhQByU0DQ7cLvfKrCv0aiY53PqyDzHAIpgBpTrIVTm XpslNigPMyHTQ== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, kernel@collabora.com, AngeloGioacchino Del Regno Subject: [PATCH 2/3] arm64: dts: mediatek: mt6795-xperia-m5: Add display backlight support Date: Thu, 20 Jul 2023 11:15:58 +0200 Message-Id: <20230720091559.86406-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230720091559.86406-1-angelogioacchino.delregno@collabora.com> References: <20230720091559.86406-1-angelogioacchino.delregno@collabora.com> 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, T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1771934329161104859 X-GMAIL-MSGID: 1771934329161104859 Add the relevant nodes for display backlight on Sony Xperia M5: this needs both the SoC PWM IP and MT6332 PMIC LED strings. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat --- .../dts/mediatek/mt6795-sony-xperia-m5.dts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts index b5746e6d0b15..ecdf00707a44 100644 --- a/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts +++ b/arch/arm64/boot/dts/mediatek/mt6795-sony-xperia-m5.dts @@ -22,6 +22,23 @@ aliases { serial1 = &uart1; }; + backlight_lcd0: backlight { + compatible = "led-backlight"; + leds = <&disp_led_pwm>, <&pmic_bl_led>; + + default-brightness-level = <300>; + }; + + led-controller-display { + compatible = "pwm-leds"; + + disp_led_pwm: led-0 { + label = "backlight-pwm"; + pwms = <&pwm0 0 500000>; + max-brightness = <1024>; + }; + }; + memory@40000000 { device_type = "memory"; reg = <0 0x40000000 0 0x1e800000>; @@ -338,6 +355,21 @@ &pmic { * an interrupt on the companion, so we use the MT6332 IRQ GPIO. */ interrupts = ; + + mt6332-led { + compatible = "mediatek,mt6332-led"; + #address-cells = <1>; + #size-cells = <0>; + + pmic_bl_led: led@0 { + reg = <0>; + label = "backlight-pmic"; + }; + }; +}; + +&pwm0 { + status = "okay"; }; &uart0 {