Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6742328rwb; Tue, 22 Nov 2022 18:44:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf4N7cE6YBtrH8q3qdEDMbUMvzNyjit9YYO4XBuSX/bwiQ7Rb9j5OWGXgrk61nZa9tutOaR/ X-Received: by 2002:a63:ea58:0:b0:476:a62c:a2bc with SMTP id l24-20020a63ea58000000b00476a62ca2bcmr14689601pgk.320.1669171479279; Tue, 22 Nov 2022 18:44:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669171479; cv=none; d=google.com; s=arc-20160816; b=XyM7+UgwqKlpc+/8OxtXPBAb1KLBwX5jdSWljL3sAO/nm7DZg0nzwM2r5zoFNglFu/ jxxIG0PYnm6lPe9KZz3A3T1CqQzfZVt0t/Kr2vqKGXhX4brNd8N5S2236/aSmHtFxt12 nxx9iGw7q4jVCajQHtkFXWglL528XHcq8zzy0lwEM6s4v8QL+QqxAZp5/fTHUHDRNsnT pBs/0jpIRMKJ1cONOtHFqmwL2zT1j4q+6wtqzoU6dYsYfO1JZFjKPGfDs5h69pPzEJUK kCzAr8XbUFb9HLWF4FgQtekcCa3M5BWOxJ3luj3xTWHk1LgnNWm3l399gyU3nlukEf9R p/ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Zj/cHXoWYv8o+sJtjgpTEuZhl2QFJwpoNEmZc0bJX4o=; b=SnsTUlr0BKw5ZITmeI1kOWEZeO1ztDPEymxaccpMyEadKRlvFr9zPg7tmNH/wofJ9g e+TN9ERcTiUZCbbPiD/lmxZdFvBP1VZGlpi3Nn7DUdAPWC7gEyWtayrtL6HTcDelMvxt FDFXiCnFqsiEH824yBtUYy2SZFqkd1jK08QyhBPiWk6ufH9nkuphP2jjh7EGlT9y1Xc9 Hj4Bv0G4abqzf638vghrmFC4yVtSF8QyK/o4AUHzjxrGQV6AJiMNznoSq1EKL+bBtTbm BxnlXe0TesioQIKGgKKsljON0GRokyVUgFWuz9i1IMW7QF0GcFp1k0WGxV9CN3GP1D8M Jofw== ARC-Authentication-Results: i=1; mx.google.com; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g34-20020a635662000000b0046f7941b7besi15117328pgm.112.2022.11.22.18.44.27; Tue, 22 Nov 2022 18:44:39 -0800 (PST) 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; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233896AbiKWC2r (ORCPT + 90 others); Tue, 22 Nov 2022 21:28:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234023AbiKWC2p (ORCPT ); Tue, 22 Nov 2022 21:28:45 -0500 Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A942CE0688; Tue, 22 Nov 2022 18:28:44 -0800 (PST) Received: by mail-io1-f48.google.com with SMTP id d123so12304692iof.7; Tue, 22 Nov 2022 18:28:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Zj/cHXoWYv8o+sJtjgpTEuZhl2QFJwpoNEmZc0bJX4o=; b=LZNzM8+JJ7lrE8r/ulXIQJp0xYR08MeWSqUzfe0HPVcyZbTRP13D56g80prls5L+Dt GyF2RoXg7N8ev+YzmiyP0E34kFpJZtGJGH3dAuYAtt/5IWLF7SeGIUL/L48hnPW6qFnP 4J5hIloqlrJAdbvbOEbmyHkvKBqIDwW0h0Duj6eNV0orhooPktoM5rq9BgqZCFnWJoSh mnnW9lAyQ4kqbHLuzixcapcQTdIMsX2EH89g+zCFOqkfVHDWh+y8lBer/pKlfnGNWmfg dAuULYayAVzIOapTgiTWOw+8FabAIE+QkyOB8RhS1h/nyG4jaKtz4YmDsZVTfKTuciWB cahQ== X-Gm-Message-State: ANoB5plsG92ku+NJK5jOll8RJlFo//25b07YHYMuuwaIvjhQfKEHnGZX CFoY1IpLFX1puuH/qfw2HA== X-Received: by 2002:a05:6638:440f:b0:375:1820:bb85 with SMTP id bp15-20020a056638440f00b003751820bb85mr11758692jab.46.1669170523964; Tue, 22 Nov 2022 18:28:43 -0800 (PST) Received: from robh_at_kernel.org ([64.188.179.252]) by smtp.gmail.com with ESMTPSA id l18-20020a02a892000000b003636cb862d0sm5949379jam.42.2022.11.22.18.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 18:28:43 -0800 (PST) Received: (nullmailer pid 1022635 invoked by uid 1000); Wed, 23 Nov 2022 02:28:45 -0000 Date: Tue, 22 Nov 2022 20:28:45 -0600 From: Rob Herring To: Sasha Finkelstein Cc: thierry.reding@gmail.com, krzysztof.kozlowski+dt@linaro.org, marcan@marcan.st, sven@svenpeter.dev, alyssa@rosenzweig.io, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND v3 3/4] arm64: dts: apple: t8103: Add PWM controller Message-ID: <20221123022845.GB1006695-robh@kernel.org> References: <20221121174228.93670-1-fnkl.kernel@gmail.com> <20221121174228.93670-4-fnkl.kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221121174228.93670-4-fnkl.kernel@gmail.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no 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 Mon, Nov 21, 2022 at 08:42:27PM +0300, Sasha Finkelstein wrote: > Adds PWM controller and keyboard backlight bindings for M1 MacBooks > > Signed-off-by: Sasha Finkelstein > Acked-by: Sven Peter > --- > arch/arm64/boot/dts/apple/t8103-j293.dts | 20 ++++++++++++++++++++ > arch/arm64/boot/dts/apple/t8103-j313.dts | 20 ++++++++++++++++++++ > arch/arm64/boot/dts/apple/t8103.dtsi | 9 +++++++++ > 3 files changed, 49 insertions(+) > > diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts/apple/t8103-j293.dts > index ecb10d237a05..0b4b7e8e0726 100644 > --- a/arch/arm64/boot/dts/apple/t8103-j293.dts > +++ b/arch/arm64/boot/dts/apple/t8103-j293.dts > @@ -11,6 +11,7 @@ > > #include "t8103.dtsi" > #include "t8103-jxxx.dtsi" > +#include > > / { > compatible = "apple,j293", "apple,t8103", "apple,arm-platform"; > @@ -43,3 +44,22 @@ &i2c2 { > &i2c4 { > status = "okay"; > }; > + > +/ { > + led-controller { > + compatible = "pwm-leds"; > + led-0 { > + pwms = <&fpwm1 0 40000>; > + pwm-names = "kbd-backlight"; While allowed pwm-names isn't really needed here as there is only ever 1 PWM and it is redundant with 'label'. > + label = "kbd_backlight"; > + function = LED_FUNCTION_KBD_BACKLIGHT; > + color = ; > + max-brightness = <255>; > + default-state = "keep"; > + }; > + }; > +}; > + > +&fpwm1 { > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts/apple/t8103-j313.dts > index df741737b8e6..0e0f57dee96b 100644 > --- a/arch/arm64/boot/dts/apple/t8103-j313.dts > +++ b/arch/arm64/boot/dts/apple/t8103-j313.dts > @@ -11,6 +11,7 @@ > > #include "t8103.dtsi" > #include "t8103-jxxx.dtsi" > +#include > > / { > compatible = "apple,j313", "apple,t8103", "apple,arm-platform"; > @@ -35,3 +36,22 @@ &pcie0_dart_2 { > > /delete-node/ &port01; > /delete-node/ &port02; > + > +/ { > + led-controller { > + compatible = "pwm-leds"; > + led-0 { > + pwms = <&fpwm1 0 40000>; > + pwm-names = "kbd-backlight"; > + label = "kbd_backlight"; > + function = LED_FUNCTION_KBD_BACKLIGHT; > + color = ; > + max-brightness = <255>; > + default-state = "keep"; > + }; > + }; > +}; > + > +&fpwm1 { > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi > index 51a63b29d404..ccdb26ef6b22 100644 > --- a/arch/arm64/boot/dts/apple/t8103.dtsi > +++ b/arch/arm64/boot/dts/apple/t8103.dtsi > @@ -191,6 +191,15 @@ i2c4: i2c@235020000 { > status = "disabled"; /* only used in J293 */ > }; > > + fpwm1: pwm@235044000 { > + compatible = "apple,t8103-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>; > -- > 2.38.1 > >