Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2777538rwi; Fri, 28 Oct 2022 11:04:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54WMoXXxtIEKFxcAA9Aj3R8Rxww6c/7T9z+HqIMVnUQ1XWf/2Ra4Pol0jjSSZu2K6oZjo7 X-Received: by 2002:a17:907:728b:b0:7a1:b545:b39b with SMTP id dt11-20020a170907728b00b007a1b545b39bmr499225ejc.661.1666980289126; Fri, 28 Oct 2022 11:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666980289; cv=none; d=google.com; s=arc-20160816; b=dwrliRBiNO07mkhwZN7gdOpRYD2nz5gUarHGzwD+12i0biwLWOO+AfCh9faSpglrNz NVfWPib4mwT96aoiOUgXY5zPo+AsxT0qtkH4+JUWGzIox/O4LzwbJZ3Wex8l7LWq0Eoj 6n3xLwA37ppRoYWc1v+H6iu42KTFGwS2GXW6AesAn6/hDUOBZtFDORRhsFKYa6kzJWr0 vURlA9SukhMWxgddJRrksfOhy4EyGr/SJB11o6nw/dbYt2AwnwRNFZIQWmsX9wCe3BHO 6aQrZX58QJbccaOXE0VizOKxIkUm0aaTO9oUZZNaef6NidhgMLawEHEFOe1pGG/WXNOm mATw== 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=t2UMRrA6hypBk9YLVdB4VW5wHm8QCbjxxyhhAxXjkNU=; b=0QIuhO7aAH4UBwJBLwQvkqy8PrMDN8MOP0/c/Z5lzNQvXi/e4MVcjH2M+JEZpybhfo QeuZprGmHIKIbT/LZv8Jg7K5pVgmCY5u5hSnspuSupaZTiECuZoubK97AZS3z1nz6Pxy w1cCGdPDT+rGgYwDUcXr9bNMXCmfQ8Ln9zXuprnCdbv7np2ohp05/5JlO2J5jpEvdu6e cCXPz02kibkXvj+h0LwGA3bf/zsgA0mhxlJBafG+lRCRNfffuy95Vo4E2Te50slcKq9F IHiwFrJdRD2E6JfMQ3V33eOS7j5mmtiy8vpmY3i+m92Yq/qJo7+AdTqqHHrIhkqHRhQD v7HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TMNb3V8A; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz6-20020a1709077d8600b0079744630e4asi4658565ejc.780.2022.10.28.11.04.14; Fri, 28 Oct 2022 11:04:49 -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=@linaro.org header.s=google header.b=TMNb3V8A; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbiJ1R5H (ORCPT + 99 others); Fri, 28 Oct 2022 13:57:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbiJ1R5G (ORCPT ); Fri, 28 Oct 2022 13:57:06 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17EFB1EA57C for ; Fri, 28 Oct 2022 10:57:05 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id x26so3946572qki.0 for ; Fri, 28 Oct 2022 10:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=t2UMRrA6hypBk9YLVdB4VW5wHm8QCbjxxyhhAxXjkNU=; b=TMNb3V8AhX9WhX05Du+3fglf9uLfI9wB0ttrU8VotGjsWLsy0okAKTSDVz0xxOl8KF zNuPQHvd/kR3PyvJoVDXGlZtmmk79Al8rAIDjUZyXF2Fwu7ZOCYkfl5ZskGskw3M8Adl gC7ELE1lGzbXcSs2WJt6lNDm6lNeNGq0jdYSgh6kyvUGi+XiO9yfdeBb9hSvNqt4p6XE 7cYKcAKDhAm76ea3Id6NcO6HkOhNkOf1EF+yN/P/F49LixWucVnI8O6FH+NX4iFeUohn JPi7sntU7rQcbCaIGTlRQNzUto/VcBquWadXxkhogBRtiHbE+sM4Zo6UgCkKuNuJQJXQ ppog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=t2UMRrA6hypBk9YLVdB4VW5wHm8QCbjxxyhhAxXjkNU=; b=rVtAgTvYVIWa9rJ97j0KpURJbUEUOQbYE/sBMoLz1YVIT8B/chpkF0AvIvG98MpCau 5fxqiaUFkEvWe087SivPmeW9tq4sgh6kSaf5L7tEY0nX30NLrGL12WCH25U2pUiEiXBt FYOMXvT/4afvYuGQJWVdSPqabEHAYhxltVfiUSrxzyhMCdKCT4guLfIjsB9tgzO/fn66 fjis9IrcOdNqBU69X0cqdrsjUxv0bjZNCDkA+GqwLu2KYY7GX8ekhOo5kRibmRZIrQsR o2GIzCHA8IdvXbYwbe9xgRN0QWZg2ig33nJWfvvHHrhnCoL03DLdpRmxO1cfO6wSYVuk jt9g== X-Gm-Message-State: ACrzQf2PmsYUeWbzypb03H7mrvraPie9PiQUyW06yLl9rNZ88Zg9cLBc JDX/cA6s8TpG6pS0ZvqR5F35Pg== X-Received: by 2002:a05:620a:d4b:b0:6f6:b34a:53cb with SMTP id o11-20020a05620a0d4b00b006f6b34a53cbmr351470qkl.662.1666979824237; Fri, 28 Oct 2022 10:57:04 -0700 (PDT) Received: from [192.168.1.11] ([64.57.193.93]) by smtp.gmail.com with ESMTPSA id s9-20020ac85ec9000000b0039ccbf75f92sm2668431qtx.11.2022.10.28.10.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Oct 2022 10:57:03 -0700 (PDT) Message-ID: <55b03c70-cc77-43e7-7ca2-8a0445a40cea@linaro.org> Date: Fri, 28 Oct 2022 13:56:57 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH 3/4] arm64: dts: apple: t8103: Add PWM controller Content-Language: en-US To: Sasha Finkelstein , thierry.reding@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: 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 References: <20221028165215.43662-1-fnkl.kernel@gmail.com> <20221028165215.43662-4-fnkl.kernel@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <20221028165215.43662-4-fnkl.kernel@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 28/10/2022 12:52, Sasha Finkelstein wrote: > Adds PWM controller and keyboard backlight bindings for M1 MacBooks > > Signed-off-by: Sasha Finkelstein > --- > 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..5652cd41730a 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"; > }; > + > +/ { > + pwmleds { Node names should be generic: led-controller https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "pwm-leds"; > + kbd-backlight { Does not look like you tested the DTS against bindings. Please run `make dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). > + pwms = <&fpwm1 0 40000>; > + label = "kbd_backlight"; > + function = LED_FUNCTION_KBD_BACKLIGHT; > + color = ; > + max-brightness = <255>; > + default-state = "keep"; > + pwm-names = "kbd-backlight"; This goes just after pwms. > + }; > + }; > +}; > + > +&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..cff53f8770f3 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; > + > +/ { > + pwmleds { Same comments > + compatible = "pwm-leds"; > + kbd-backlight { > + pwms = <&fpwm1 0 40000>; > + label = "kbd_backlight"; > + function = LED_FUNCTION_KBD_BACKLIGHT; > + color = ; > + max-brightness = <255>; > + default-state = "keep"; > + pwm-names = "kbd-backlight"; > + }; > + }; > +}; > + > +&fpwm1 { > + status = "okay"; > +}; > diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi > index 51a63b29d404..a95dc482102e 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: fpwm@235044000 { Node names should be generic, so pwm. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation > + compatible = "apple,t8103-fpwm", "apple,s5l-fpwm"; > + reg = <0x2 0x35044000 0x0 0x4000>; Best regards, Krzysztof