From nobody Thu Sep 18 07:14:43 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C38ACC4332F for ; Fri, 9 Dec 2022 11:15:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229976AbiLILP0 (ORCPT ); Fri, 9 Dec 2022 06:15:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbiLILPS (ORCPT ); Fri, 9 Dec 2022 06:15:18 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C9B16F0E3; Fri, 9 Dec 2022 03:15:16 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id ay14-20020a05600c1e0e00b003cf6ab34b61so5517225wmb.2; Fri, 09 Dec 2022 03:15:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZXoAAIlGGmSpSwozdUzhwnxLFmPcWjZw/9cTYhXVqxI=; b=M5jxKsenoI+siJcelcoKbcTImniNIi1BQte27vlsaE0ygxtv84jC2u59I6Rgf37gvw 8Eam4anacGuvXVYxQHDAuJ+Ei0eNQOBUY1VXD1909PEWQ0oXkGAzMWvDydmGXemWoMoQ FgLPt8kboH7bwqyJZ8xwMgqp5femrsDhrqTycElpXJ7/s6MfOoAUR7PGXUQZ3ldQgN6i kEryYp0djWap27ZAwj/sBJ/6Dnn3kkb6dqi9nU81JabtVLUwBAfbFhv7o3wwPgylNWUF RDcp2USBDguLPYm3lugrSwkxmrNWUxJLWfvAkiF1WE3u1g3z84K3KuC52dq57C7Vx5YQ L1kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZXoAAIlGGmSpSwozdUzhwnxLFmPcWjZw/9cTYhXVqxI=; b=orY7utpUmIjU5BfM3xloJ2BI7+LBuQhAx70H4zYTnoH+E7wgIrnkU3My5zgKtC6C6l 1RdnUQB6w3YKJ8i+6p41ELOGSd+uvewWXGE4PAtdDdVI6Pp/CzcgntdAJvWtC+7Xys4X Yjzzrq/m4wLCUVATPU0OeIm9OCDr7wUH/ycG2pIsI6VqQuav2zzZ5z5X4zHi6l2icbm5 n/BWd+/6tKF+Wl88fDlO8tomQgFOrWYuzYmVMeCB24rG/v4lKXca+a4EWLvnkbZwy1Q5 /KIp3mcGaKimZKYlFedrpz6L59qcTYNRhGAhJ6hrgBfoQwCEQxBX6KSeZKvq2Fsf3tBg 6jfA== X-Gm-Message-State: ANoB5plHgWQuCI34l6OKqAzmmYHESbUw2EQu3YXB0VfAR7i2u5v4VLqC Rj4t+f93ocAJymAqoLTIi9U= X-Google-Smtp-Source: AA0mqf6uCKLeDXGU5PrIOdjYUngC7zdqdd3A6gVV+huIsnmNL0AsnrGLW8L02lPepgTdTJv+YLXF3A== X-Received: by 2002:a05:600c:502c:b0:3cf:900c:de6b with SMTP id n44-20020a05600c502c00b003cf900cde6bmr4699711wmr.15.1670584514729; Fri, 09 Dec 2022 03:15:14 -0800 (PST) Received: from localhost ([217.131.81.52]) by smtp.gmail.com with UTF8SMTPSA id n4-20020a1ca404000000b003d1cf67460esm7746763wme.40.2022.12.09.03.15.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Dec 2022 03:15:14 -0800 (PST) From: Sasha Finkelstein To: 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, Sasha Finkelstein Subject: [PATCH v4 3/4] arm64: dts: apple: t8103: Add PWM controller Date: Fri, 9 Dec 2022 14:13:12 +0300 Message-Id: <20221209111313.2701-4-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20221209111313.2701-1-fnkl.kernel@gmail.com> References: <20221209111313.2701-1-fnkl.kernel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 | 19 +++++++++++++++++++ arch/arm64/boot/dts/apple/t8103-j313.dts | 19 +++++++++++++++++++ arch/arm64/boot/dts/apple/t8103.dtsi | 9 +++++++++ 3 files changed, 47 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts= /apple/t8103-j293.dts index ecb10d237a05..b28d6f9ed3eb 100644 --- a/arch/arm64/boot/dts/apple/t8103-j293.dts +++ b/arch/arm64/boot/dts/apple/t8103-j293.dts @@ -11,6 +11,7 @@ =20 #include "t8103.dtsi" #include "t8103-jxxx.dtsi" +#include =20 / { compatible =3D "apple,j293", "apple,t8103", "apple,arm-platform"; @@ -43,3 +44,21 @@ &i2c2 { &i2c4 { status =3D "okay"; }; + +/ { + led-controller { + compatible =3D "pwm-leds"; + led-0 { + pwms =3D <&fpwm1 0 40000>; + label =3D "kbd_backlight"; + function =3D LED_FUNCTION_KBD_BACKLIGHT; + color =3D ; + max-brightness =3D <255>; + default-state =3D "keep"; + }; + }; +}; + +&fpwm1 { + status =3D "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts= /apple/t8103-j313.dts index df741737b8e6..57e75e6ddf63 100644 --- a/arch/arm64/boot/dts/apple/t8103-j313.dts +++ b/arch/arm64/boot/dts/apple/t8103-j313.dts @@ -11,6 +11,7 @@ =20 #include "t8103.dtsi" #include "t8103-jxxx.dtsi" +#include =20 / { compatible =3D "apple,j313", "apple,t8103", "apple,arm-platform"; @@ -35,3 +36,21 @@ &pcie0_dart_2 { =20 /delete-node/ &port01; /delete-node/ &port02; + +/ { + led-controller { + compatible =3D "pwm-leds"; + led-0 { + pwms =3D <&fpwm1 0 40000>; + label =3D "kbd_backlight"; + function =3D LED_FUNCTION_KBD_BACKLIGHT; + color =3D ; + max-brightness =3D <255>; + default-state =3D "keep"; + }; + }; +}; + +&fpwm1 { + status =3D "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/app= le/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 =3D "disabled"; /* only used in J293 */ }; =20 + fpwm1: pwm@235044000 { + compatible =3D "apple,t8103-fpwm", "apple,s5l-fpwm"; + reg =3D <0x2 0x35044000 0x0 0x4000>; + power-domains =3D <&ps_fpwm1>; + clocks =3D <&clkref>; + #pwm-cells =3D <2>; + status =3D "disabled"; + }; + serial0: serial@235200000 { compatible =3D "apple,s5l-uart"; reg =3D <0x2 0x35200000 0x0 0x1000>; --=20 2.37.1 (Apple Git-137.1)