Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3716307rwe; Mon, 17 Apr 2023 02:23:02 -0700 (PDT) X-Google-Smtp-Source: AKy350YTBxJkn9Tq3bFxft5hiKbcGhrxBOc87ScjYAIoXuO29HCixPIzIzxrzHAwQOJetev6C2cb X-Received: by 2002:a05:6a00:10d5:b0:63a:33d5:9224 with SMTP id d21-20020a056a0010d500b0063a33d59224mr16596351pfu.18.1681723381972; Mon, 17 Apr 2023 02:23:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681723381; cv=none; d=google.com; s=arc-20160816; b=M0IrNUBCUAVIAVM82Xz96NEH/NUmbYpqmfVRJbesJr6q7YkXc83nOEc43rPOW6IJf6 +kuxQNFMKvx1wV7MHwcKCnY9jK4fOVdzJtrlIZaZpeWXnHOUyC5VdwolEmCpct9yCt1W tIJ/sJQdmRo6V+qvHgBRULGWxvqZu/2qMYogV3onHAzCzhwQtQTNrqgWaLH5DKiH9c6s dVfvNNTndui40a0HT6zQ1UumIRIDMEP3tLciaElwS+6Jkhs2zcwlCd6RNyO2e92S2N96 TcftksWUEnMd4kstAiHk2HOCIStEOsDQNtxsPSFg2pT9ZuNoBxInpr9Al1P2J3FP8FPT VeVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=4QT4Ctq1EUaaZogKnybKVAoSzH27dijEdXiCWa3epyc=; b=YdMA6XZQIY7CigQh/Ia6Ro5fVNvkfkwMANoT5jH3YXDIybFm6Z+pLSJiwhKTEpySBX 0PuS5ZTjSXCVROSSAIFSFfJ/komSkrRaNegAyyOCtAzCFeHWR8qvhCNmWPnXpLtnA6u8 6ERVB8/8NoXqfwQhqY1ZbGKtNNinc2c8tSx5mPaj7jxjq9T1Y4iiUnXOUOZg0SbXDlAd ht1v7fLPE1LZ7TJJQp8M/l2bPZxNbJ2w/WYiNUfUd7OgZtTiMTOYWDxcoPcm0TdHgDd5 uKa11pc8EEuXTDtKGnMJt2p1a2cyZkdFLX2pck86a9epVzq5vOuy4bvyb/MhOWwnjoyt /z0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=w+ZM745q; 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=marcan.st Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c8-20020a63ef48000000b0050c0e269719si10736039pgk.513.2023.04.17.02.22.50; Mon, 17 Apr 2023 02:23:01 -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=@marcan.st header.s=default header.b=w+ZM745q; 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=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbjDQJUp (ORCPT + 99 others); Mon, 17 Apr 2023 05:20:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230002AbjDQJUl (ORCPT ); Mon, 17 Apr 2023 05:20:41 -0400 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 472044EE8; Mon, 17 Apr 2023 02:20:17 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 6243242404; Mon, 17 Apr 2023 09:20:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1681723215; bh=9jlVu198RfqwmaRiA8SNqHWeiiqMm+RyqmhZGbIcPz4=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=w+ZM745qp5UA4iaN2535iZH+6vIHrUS7ZsqW+Tn+nml+2ZaejGEwCZmHQ+yw67cOU xCftyDtFkXnUbWInwP055JUKGLb/arnH0FyKwvdK8e4CQyrI73IFVMzVZCgKZJuhc7 P6OxoJsRpfh4o1nJ9YhVgJ7GxQbKh4rMhZzbx2Uk/DQAF2kA3wBa1dsFA4j9P8Gyqn cE5XrjSXjKuJ4xNTrt4Asib4SYtjrAIiiBvJTvKZgg+B8UFPBD/X8TeMXomemIqqJV g/NBZ/xnsv4ENfC0XY7iAv03oVsX8XnZyzOpjPzYDZ2oqz8H2wsIWdJxhTWYFwQwu2 fTYRBSRrvQqiQ== Message-ID: Date: Mon, 17 Apr 2023 18:20:11 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] arm64: dts: apple: t8112: Add PWM controller Content-Language: en-US To: fnkl.kernel@gmail.com, Sven Peter , Alyssa Rosenzweig , Rob Herring , Krzysztof Kozlowski Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230409-t8112-fpwm-v1-1-feffa5f8b99b@gmail.com> From: Hector Martin In-Reply-To: <20230409-t8112-fpwm-v1-1-feffa5f8b99b@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 09/04/2023 18.18, Sasha Finkelstein via B4 Relay wrote: > From: Sasha Finkelstein > > This patch adds the device tree entries for the PWM controller > present on M2 macbooks that is connected to the keyboard backlight. > > Signed-off-by: Sasha Finkelstein > --- > arch/arm64/boot/dts/apple/t8112-j413.dts | 17 +++++++++++++++++ > arch/arm64/boot/dts/apple/t8112-j493.dts | 17 +++++++++++++++++ > arch/arm64/boot/dts/apple/t8112.dtsi | 9 +++++++++ > 3 files changed, 43 insertions(+) > > diff --git a/arch/arm64/boot/dts/apple/t8112-j413.dts b/arch/arm64/boot/dts/apple/t8112-j413.dts > index 9e758edeaa82..6f69658623bf 100644 > --- a/arch/arm64/boot/dts/apple/t8112-j413.dts > +++ b/arch/arm64/boot/dts/apple/t8112-j413.dts > @@ -11,6 +11,7 @@ > > #include "t8112.dtsi" > #include "t8112-jxxx.dtsi" > +#include > > / { > compatible = "apple,j413", "apple,t8112", "apple,arm-platform"; > @@ -20,6 +21,18 @@ aliases { > bluetooth0 = &bluetooth0; > wifi0 = &wifi0; > }; > + > + led-controller { > + compatible = "pwm-leds"; > + led-0 { > + pwms = <&fpwm1 0 40000>; > + label = "kbd_backlight"; > + function = LED_FUNCTION_KBD_BACKLIGHT; > + color = ; > + max-brightness = <255>; > + default-state = "keep"; > + }; > + }; > }; > > /* > @@ -61,3 +74,7 @@ hpm5: usb-pd@3a { > &i2c4 { > status = "okay"; > }; > + > +&fpwm1 { > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/apple/t8112-j493.dts b/arch/arm64/boot/dts/apple/t8112-j493.dts > index 8552c15be265..0ad908349f55 100644 > --- a/arch/arm64/boot/dts/apple/t8112-j493.dts > +++ b/arch/arm64/boot/dts/apple/t8112-j493.dts > @@ -11,6 +11,7 @@ > > #include "t8112.dtsi" > #include "t8112-jxxx.dtsi" > +#include > > / { > compatible = "apple,j493", "apple,t8112", "apple,arm-platform"; > @@ -20,6 +21,18 @@ aliases { > bluetooth0 = &bluetooth0; > wifi0 = &wifi0; > }; > + > + led-controller { > + compatible = "pwm-leds"; > + led-0 { > + pwms = <&fpwm1 0 40000>; > + label = "kbd_backlight"; > + function = LED_FUNCTION_KBD_BACKLIGHT; > + color = ; > + max-brightness = <255>; > + default-state = "keep"; > + }; > + }; > }; > > /* > @@ -50,3 +63,7 @@ bluetooth0: bluetooth@0,1 { > &i2c4 { > status = "okay"; > }; > + > +&fpwm1 { > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/apple/t8112.dtsi b/arch/arm64/boot/dts/apple/t8112.dtsi > index 698a436e7dac..1666e6ab250b 100644 > --- a/arch/arm64/boot/dts/apple/t8112.dtsi > +++ b/arch/arm64/boot/dts/apple/t8112.dtsi > @@ -458,6 +458,15 @@ i2c4: i2c@235020000 { > status = "disabled"; > }; > > + fpwm1: pwm@235044000 { > + compatible = "apple,t8112-fpwm", "apple,s5l-fpwm"; > + reg = <0x2 0x35044000 0x0 0x4000>; > + power-domains = <&ps_fpwm1>; > + clocks = <&clkref>; > + #pwm-cells = <2>; > + status = "disabled"; > + }; > + > serial0: serial@235200000 { > compatible = "apple,s5l-uart"; > reg = <0x2 0x35200000 0x0 0x1000>; > > --- > base-commit: 8d59efc33fdaa2c82072b4d3ba5f67d7dd9270d0 > change-id: 20230409-t8112-fpwm-06e434cc358d Applied to asahi-soc/dt, thanks! - Hector