Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2551564rwb; Fri, 9 Dec 2022 03:41:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf42JWFjrOUafF9r5iLr1bkUUJBdwMzNaX/UijRP9a/vDMdj4+s10MNEWmgy+I3bngDU0o1I X-Received: by 2002:a17:90a:9310:b0:218:9b6c:d1c7 with SMTP id p16-20020a17090a931000b002189b6cd1c7mr5341607pjo.11.1670586065928; Fri, 09 Dec 2022 03:41:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670586065; cv=none; d=google.com; s=arc-20160816; b=dMIRbXpooNpaleT98BrrjcUIexCigh+MjvwV8SmbzlaL+36ozAei1REkW/TxoH254E EXzNA0Egk00FxLXLEm5IwaDhrfhRO2uPWTUxgR40PNzXwe2W7gSAtTWImq2PoKv6Hbb/ aPDQocfqT793s2F0tWjGDHc/zrE2FJR6A8ruRGfEbBta0dRiEXKe98G5a4l5PJNjnU4D G6NwmlhyEyDv0cMnRfsix6XUbUo2vVepbxu5lpmxwIlHCsHS9CPkYdpL6r6Mne5ZqetA 4W+cvXXsmOZ73/3coerazG/kN2y0atBR1fKutxn3lmBWXbGZpoWr3FQ9jfUYvIQp0N+B xqLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZXoAAIlGGmSpSwozdUzhwnxLFmPcWjZw/9cTYhXVqxI=; b=yMOKgbty2iUGteBdjuzFgZj17hJjJPew3F1D4QC3XtOL0N6UI5zQITCuaJiq+1PSGT 5G+K0tyIA2okwdMWoQ6dJzWXCe9W7HddT5sqviXeeCDVMyJxlByjv8m2/6Phyi1uxNdD dFxbT+97TQg0DrxuA/KrxuNPPd2Vr263Nn82VdUvrWtAQ7JpLmUbXrPWejBxlARwTdJb BN88fypECrB6O3BvyQ1M5Bo4m75wRdF7FjQ9KreFr1coqrbqJ6WGBZ4ud7yE5026MxJ0 iSkYAcMuhbg9zx7sIcFdAZdUXsaKDoYjgTzeSz773b0IlbfI4uf9oiBSFw6oelPzCy5M wsnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M5jxKsen; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e21-20020a637455000000b00478b57ca9e2si1344978pgn.228.2022.12.09.03.40.55; Fri, 09 Dec 2022 03:41:05 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=M5jxKsen; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229965AbiLILPZ (ORCPT + 74 others); Fri, 9 Dec 2022 06:15:25 -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-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: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 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 @@ #include "t8103.dtsi" #include "t8103-jxxx.dtsi" +#include / { compatible = "apple,j293", "apple,t8103", "apple,arm-platform"; @@ -43,3 +44,21 @@ &i2c2 { &i2c4 { status = "okay"; }; + +/ { + 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"; + }; + }; +}; + +&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..57e75e6ddf63 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,21 @@ &pcie0_dart_2 { /delete-node/ &port01; /delete-node/ &port02; + +/ { + 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"; + }; + }; +}; + +&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.37.1 (Apple Git-137.1)