From patchwork Tue Nov 24 04:12:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 11927021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A1C3C63798 for ; Tue, 24 Nov 2020 04:14:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0328C2072C for ; Tue, 24 Nov 2020 04:14:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NLgBOX9q"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="VuX6Oo/7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0328C2072C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=llHXJQR5VfjSntH2mym4nua+M92zBOp6xw/HVGtYwmo=; b=NLgBOX9qzZCfemIzyf3KP4WPZI HFTLRDjMTgE+uqUg8A4P6lsT8SJGx2l6B+QmiMnE3Z/bM3BC6ymabQ3/2GqT0lTe///f6dxLJJHx/ yQkxQvERyNihy0imrG1mc4hm77/YfuZk6TBe18ZIJUnkOQ28CHoSkvJm4reBW+cGjans6OA2cYz9z VPxqbF5hSJVLZK59nX3IAqK7n7e3oFTtJOXgYV6SbrPQGP0mv59L3YPahCE9wgIuUV1V9ftjY7BhA QUg9LtypxCev0bZjUxHtGTq2qRdffeDNOQWooVP2xcKEz8St6zvbzF73TJA9gYJxlOBosjga+iYHi trHQ+JWg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khPhg-0003xg-3W; Tue, 24 Nov 2020 04:13:20 +0000 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khPhd-0003wm-N0 for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2020 04:13:18 +0000 Received: by mail-pg1-x52a.google.com with SMTP id m9so16298753pgb.4 for ; Mon, 23 Nov 2020 20:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ssE2rkcenapq+x01obSYaE3MnwfSXU+ZOnv8ujkQ9Ew=; b=VuX6Oo/7aAGiwVPeYURTPR2s3/UpFMbgk1E7E8z8vtpW0ZZJln8Yv1kD3Rso2pubwB bqfjiP0gLtvMbJn1R3M3fyrA8ykiHDA93IwMsvpTrZUeUQF38kkKvuhuGN93M56JueyB myF3j1IeMGWOjrci9sQy2NMdi3gPba55Cqclc= 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=ssE2rkcenapq+x01obSYaE3MnwfSXU+ZOnv8ujkQ9Ew=; b=ekZ07o18j14a8kLOQIdSuxZiO1ELjzJrmDMt1FoSdX1q2fDSfY4p6sGwLIvd1eooD2 5dpGnHfZ8+N7ZsOnA9jKSmFGdH8ksH1YKOhpduQRWJ2bckAC0jUVFivKY8fUYjR3v6C4 /5Tm9m5FB87Q5XrtPiEu+sPi6+80ibTFYqqgF7Xe1M9sm9XvUzsrrkbk6I33LdfPmQk+ J0REBB9AVjJ1foTClRqs2xzZCPnbZOJhOF00A1VxCEXWmOZa/QBpfLjYC5gDmDcJkkmM ogp1gYZyqcrY2cjTPbn/lG+noRMNK4IECvXF6hOAjQHrWY8W+GruqpbyTb0OAUw9fDx/ 64VA== X-Gm-Message-State: AOAM532+LUUSY5hpcJD21B8y2p9E+dG54Xaz7U7ovZ28K7PqMsupuuuG eXnGKKKRHlqJUJ8o8VaUqn/Khg== X-Google-Smtp-Source: ABdhPJytodyqoVaYOATZjSTTMStbhpj9VvjR1hPJ6OwERCe+wrABF9KQfnHIygXjjdYU2sNuESsLYQ== X-Received: by 2002:aa7:86d8:0:b029:18b:585b:3b16 with SMTP id h24-20020aa786d80000b029018b585b3b16mr2422645pfo.72.1606191193618; Mon, 23 Nov 2020 20:13:13 -0800 (PST) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:1a60:24ff:fe89:3e93]) by smtp.gmail.com with ESMTPSA id g3sm4443573pfr.145.2020.11.23.20.13.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2020 20:13:12 -0800 (PST) From: Hsin-Yi Wang To: linux-kernel@vger.kernel.org Subject: [PATCH] arm64: dts: mt8183: Add pwm and backlight node Date: Tue, 24 Nov 2020 12:12:54 +0800 Message-Id: <20201124041253.4181273-1-hsinyi@chromium.org> X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201123_231317_841308_C0D1D488 X-CRM114-Status: GOOD ( 12.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Matthias Brugger , Rob Herring , linux-mediatek@lists.infradead.org, Enric Balletbo i Serra , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add pwm to mt8183 and backlight to mt8183-kukui. Signed-off-by: Hsin-Yi Wang Tested-by: Enric Balletbo i Serra --- .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 28 +++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 10 +++++++ 2 files changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi index 85f7c33ba4461..bf2ad1294dd30 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi @@ -19,6 +19,17 @@ chosen { stdout-path = "serial0:115200n8"; }; + backlight_lcd0: backlight_lcd0 { + compatible = "pwm-backlight"; + pwms = <&pwm0 0 500000>; + power-supply = <&bl_pp5000>; + enable-gpios = <&pio 176 0>; + brightness-levels = <0 1023>; + num-interpolated-steps = <1023>; + default-brightness-level = <576>; + status = "okay"; + }; + memory@40000000 { device_type = "memory"; reg = <0 0x40000000 0 0x80000000>; @@ -536,6 +547,17 @@ pins_clk { }; }; + pwm0_pin_default: pwm0_pin_default { + pins1 { + pinmux = ; + output-high; + bias-pull-up; + }; + pins2 { + pinmux = ; + }; + }; + scp_pins: scp { pins_scp_uart { pinmux = , @@ -670,6 +692,12 @@ pins_wifi_wakeup { }; }; +&pwm0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pin_default>; +}; + &scp { status = "okay"; pinctrl-names = "default"; diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index 08a914d3a6435..a974bad899365 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -479,6 +479,16 @@ spi0: spi@1100a000 { status = "disabled"; }; + pwm0: pwm@1100e000 { + compatible = "mediatek,mt8183-disp-pwm"; + reg = <0 0x1100e000 0 0x1000>; + interrupts = ; + #pwm-cells = <2>; + clocks = <&topckgen CLK_TOP_MUX_DISP_PWM>, + <&infracfg CLK_INFRA_DISP_PWM>; + clock-names = "main", "mm"; + }; + i2c3: i2c@1100f000 { compatible = "mediatek,mt8183-i2c"; reg = <0 0x1100f000 0 0x1000>,