Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9300255rwp; Thu, 20 Jul 2023 02:48:47 -0700 (PDT) X-Google-Smtp-Source: APBJJlEs2gI9gHVQ94Gz5OzfJiwiVxSEMvHlm+O1IedJmRUq7QmY296Qi7eSL4jsIyXKpPEwZj99 X-Received: by 2002:a92:c56f:0:b0:348:9fb8:abed with SMTP id b15-20020a92c56f000000b003489fb8abedmr4453002ilj.27.1689846526827; Thu, 20 Jul 2023 02:48:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689846526; cv=none; d=google.com; s=arc-20160816; b=p91XHb4Q3vO3qY5ifLL0/x02ybcK9wyzmSivXXzuvWtjIkTV7ZCqVkctY+Sia4QdZr CePzrd52F9IuFxhbjszGFKRzyUE7irG77lTLdOC2D0vX2VkzI3X1mKaxNrKLDr/If6JN 7+i5uS5DM7z8ua9SfuIZ8uwtsbNRYltoti4qP7RhN6eMGisb4RuqccQPdw1ntq65AS25 BkpGnvAOjclC8nQ5PWSP1WWGcLbSPIe7aFYkVq5if8KY/QUIx57366kWwOf6GMBCuyGv nkLanrsL/x6OsdxqUecH8WiQyp9hqRUp3hxDGfoLB1NXre3RtwizqVxEHx/Kp5ABaxTd Xb5g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u195-20020a6379cc000000b0055fc77ed00bsi474663pgc.579.2023.07.20.02.48.34; Thu, 20 Jul 2023 02:48:46 -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 S229829AbjGTJ3z (ORCPT + 99 others); Thu, 20 Jul 2023 05:29:55 -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 Content-Transfer-Encoding: 8bit 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 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 --- .../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 { -- 2.40.1