From patchwork Tue Dec 8 04:47:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 339694 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp3381382jai; Mon, 7 Dec 2020 20:47:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJyi67NNTvq3kdr9ei4IUcw7yNVI+EHedDdljLG22wC1K+IAgs4Up/l0sLL4OuFYXK7M9bAS X-Received: by 2002:a17:906:fb1a:: with SMTP id lz26mr21607842ejb.194.1607402866598; Mon, 07 Dec 2020 20:47:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607402866; cv=none; d=google.com; s=arc-20160816; b=UD69BjC266JcDwHby4qYAv1ldItvcVdbZTTpmZ3in5BH9fczSR/dVhRjLx255M+99Q BXWNYZPPPh6A0ibFM+pY9mxO5fRFHhJpB+gff729Efs9MfdKa+s7jIA9serVBYbjec3Q 9kLGf5M6owjocWjxEilXcRrKZSIK6mG1pY1YjSSpyp8jU0X/q6ZLtB/tzFVvBhdEZazj naDR9HBeqD7EgPSWLaHZ/PjNkzH1P62WRrrmnjBHgCP2mA3h7syIMweCBAQc92gJGIgu vKztY7grpDdXl/rpGSR5nfEONfwzPjQPuVZaBWAQM7ffy8r9jiv/tRfOBjNNRqfuoof3 A9hg== 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=da6PKTWsCyZHw4eyw0pntgWjnDdHSWAPm8s0stvFDrc=; b=nlDOh71VhFr7C7WN+mURh39kRctOGcn8D90G7+1a7AAGjUrF9UcI8pMq4JcfPVIyms P9/hy59dtgP2w1T3CF70wc1xifhg+VhBN36mEcy5/OAHfR+Dw1RDZDoDyzQgaMUdzWdG CpSkzzaTIBhmApKEkbdAtqvgGJLcswU2fHvB51sggRtzZhFK04hFSjwybimUbH/Oeu/z tp0CdH2HSMGaXKyty49y2ofIkuo9GkbmeZi4Pc1A8WjVn/WUq3YmTR8Y3INqI/e062eQ Zbkk/0eHtSsZnyd//ymZGPYcMRgHCDludK9WrVXRvgywaudbCSlT/vOvaVsGoMcsiHFq +F4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zpioTPZo; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec23si7756169ejb.573.2020.12.07.20.47.46; Mon, 07 Dec 2020 20:47:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zpioTPZo; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727270AbgLHErp (ORCPT + 15 others); Mon, 7 Dec 2020 23:47:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727252AbgLHErp (ORCPT ); Mon, 7 Dec 2020 23:47:45 -0500 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51A75C061749 for ; Mon, 7 Dec 2020 20:47:05 -0800 (PST) Received: by mail-ot1-x344.google.com with SMTP id y24so14814514otk.3 for ; Mon, 07 Dec 2020 20:47:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=da6PKTWsCyZHw4eyw0pntgWjnDdHSWAPm8s0stvFDrc=; b=zpioTPZoMCTaJaZo9r8XdicxPVP9Ax6XoHa/ab4tiwSh/tGNnWIxi5V2QzGk+lIN+W tCrYSz0h8GHsb3H98iKhudKLU9HlmlJ5tung6HEasNHC+JJfuLL1qb+387bVu2G215J8 lZWz7EhC1m18Lm84BitA35AR4gRqMuhVHyutbuUV/ZOfXzcSemkT2CwAMOeB1VrU/0kI XoilliRHB2sq+Bu5fFWrE+qsnoizyC37uyPPsaJFN43A2YAzBBNEPyI5zRtrMsmtqJ34 jwLP4BcVLGRBTGfYTivTpXptWUX0+eRnvtspNhfs4F0CY8lINuqMo2m/Y8h5h24mgmEs bFDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=da6PKTWsCyZHw4eyw0pntgWjnDdHSWAPm8s0stvFDrc=; b=f6GnbbuT9R1ZQppbmjBUkATDnjG1kztu6FRZzgOA9EguzLQ5b2yzJC7g3E+3IUMyFK sKuifwEalGGCkBogdiGjRDKjkt+0T1O/PztoDdTcpHE//AF+0Ck+xcyOUB/0ZstY3jev d+zQJfQXUPoPr4CKtySkOyDPxydCpobPt70YCaluMJNqSRomEoMUDEPUJsxY8SWthr6n cO9SyOP/HkZEivYQTl5t05244cmEEZdHB76LtV4wsChZD4uARy8tB/MKAQFAIPqvW6yb hypmZrrwuQ7vavf4iogpcdDu5d2QHf2wWbJAJ57twFSFVtbU6y1Cg7F4dIQPnvdWDm+q bAdg== X-Gm-Message-State: AOAM533Sk/JSDmVP5ZJQ5LTX1UWb2Y21hPKf+MuP3JwF0xC1DTkSwr9J rdRgt0geKGQZePpNvDdNPfEKVA== X-Received: by 2002:a9d:634b:: with SMTP id y11mr8792599otk.70.1607402824715; Mon, 07 Dec 2020 20:47:04 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id j204sm1151843oih.15.2020.12.07.20.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 20:47:04 -0800 (PST) From: Bjorn Andersson To: Andy Gross , Bjorn Andersson , Rob Herring Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] arm64: dts: qcom: c630: Add backlight controller Date: Mon, 7 Dec 2020 22:47:03 -0600 Message-Id: <20201208044703.973382-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The Lenovo Yoga C630 uses the PWM controller in the TI SN65DSI86 bridge chip to provide a signal for the backlight control and has TLMM GPIO 11 attached to some regulator that drives the backlight. Unfortunately the regulator attached to this gpio is also powering the camera, so turning off backlight result in the detachment of the camera as well. Signed-off-by: Bjorn Andersson --- This depends on the implementation of the pwm_chip in the TI SN65DSI86 bridge driver [1], but posting this for reference and testing of said patch. The patch can further be improved by the inclusion of something like [2] and by adding "backlight = <&backlight>; to the panel node, which will result in DPMS operations turning the panel on and off. [1] https://lore.kernel.org/linux-arm-msm/20201208044022.972872-1-bjorn.andersson@linaro.org/ [2] https://lore.kernel.org/lkml/20201208044446.973238-1-bjorn.andersson@linaro.org/ arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.29.2 diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts index bdd5d92ee6c3..851e5833cab5 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -64,6 +64,12 @@ sn65dsi86_refclk: sn65dsi86-refclk { clock-frequency = <19200000>; }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&sn65dsi86 1000000>; + enable-gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>; + }; }; &adsp_pas { @@ -385,6 +391,8 @@ sn65dsi86: bridge@2c { clocks = <&sn65dsi86_refclk>; clock-names = "refclk"; + #pwm-cells = <1>; + ports { #address-cells = <1>; #size-cells = <0>;