From patchwork Tue Feb 14 15:57:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein via B4 Relay X-Patchwork-Id: 13140452 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6A96AC61DA4 for ; Tue, 14 Feb 2023 15:59:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References: Message-Id:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H9SOgwDhqDOD829aAfaq22eC1dlM7Fl4xP3BAdXfNgs=; b=T4qEIO+hupLKDi vFFr0g23l51Av0tErMxg2pqt+CIwt0kxOWIs5G1rKjL/ZS+NBjT7P+391Ki850HxgH9D/o4bEqB7i 68BQhNoakepp2KbeWfmpxw9BcJCN9PzuuJsP7C+7qxrlQoTdSih8kksSLIfwqmecJ4KaeSoQDsjeq UE3x8EiM/q5Xtmjwe+Cw4DV2PrcbOCNn2/ttu/cPsZ7IaRNgeY+8Kuk1ye5cA5XwOMODUr5tr+NV/ 0NCOaGBySI3E6Pu3cpnyDB14SPdajOasnwFNP6ye+qCfJWIYsgkshSbRlhbp95QTtJcKcvdADbnCd 3u2ANWbw4A4mZbeTpLOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRxhN-002g8a-1h; Tue, 14 Feb 2023 15:58:29 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRxgm-002fuE-FQ for linux-arm-kernel@lists.infradead.org; Tue, 14 Feb 2023 15:57:54 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E53DCB81E25; Tue, 14 Feb 2023 15:57:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 69FD1C433A4; Tue, 14 Feb 2023 15:57:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676390262; bh=T0yrlYh6fLNBmEygIOf06ax4LoeO/yfEvilUDk3ALb0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=vJyOZJRS85OiH26Yuvz9dUda7A9oXYAjobYN/6Od0l+4sV5O7txxj8sCVw3uTKSxf O1QVipiWdi3So8NwVAXDrXyirSJuhQmBwhzkjuKAzVUau/vHzRoxhlnlAExBrC4eM9 rhof3qeMFEzfoWxuL2tH5d3guOLEza2AKDylFlltPlzVIEzE9Ey273AqkXu3QIb34r cMcOaASPk/SsjRQlkAGpbP48R2ng4dEgr/0KYodN1dxMUeG3rTwkyHOXDqej03Bs6Z lJ9xwX/ZmV/fzaxMZ/oEjveDj+Y6CyNdudFWhUVEXIsZDli+kApMvPkiuLVWGXUnjT GLvmrlrI3nNGA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5751FC61DA4; Tue, 14 Feb 2023 15:57:42 +0000 (UTC) From: Sasha Finkelstein via B4 Submission Endpoint Date: Tue, 14 Feb 2023 16:57:26 +0100 Subject: [PATCH RESEND 2 v7 4/5] arm64: dts: apple: t600x: Add PWM controller MIME-Version: 1.0 Message-Id: <20230214-fpwm-v7-4-fb0a6bfbd037@gmail.com> References: <20230214-fpwm-v7-0-fb0a6bfbd037@gmail.com> In-Reply-To: <20230214-fpwm-v7-0-fb0a6bfbd037@gmail.com> To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Rob Herring , Krzysztof Kozlowski , - , Sasha Finkelstein , Hector Martin , Sven Peter , Alyssa Rosenzweig Cc: linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sasha Finkelstein <7d578vix8hzw@opayq.net> X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676390260; l=2061; i=fnkl.kernel@gmail.com; s=20230213; h=from:subject:message-id; bh=kC8e0IqG+WMbKwdUXKBwuQCvwcxm5IAUASQM0mxJcPI=; b=zGEWaepBrbPEkQW+DCCoHr+t9lOmeP0pCzkIVcJZXf01/1a4XZzv1NyxN1Mlf8HrqymEXgxpC UYK160mvLHrCGy8/njLg3+Tgsu8mcEYZDktFIQb2iHTSN3bXNKSk90r X-Developer-Key: i=fnkl.kernel@gmail.com; a=ed25519; pk=7LFSAJtxIWAs9LzCIyX0sSvCZy2wQTyEIu1zch6o804= X-Endpoint-Received: by B4 Submission Endpoint for fnkl.kernel@gmail.com/20230213 with auth_id=28 X-Original-From: Sasha Finkelstein X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230214_075752_845436_4A235DAC X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: fnkl.kernel@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Sasha Finkelstein <7d578vix8hzw@opayq.net> Adds PWM controller and keyboard backlight bindings for M1 Pro/Max MacBook Pros Signed-off-by: Sasha Finkelstein Acked-by: Hector Martin --- arch/arm64/boot/dts/apple/t600x-die0.dtsi | 9 +++++++++ arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t600x-die0.dtsi b/arch/arm64/boot/dts/apple/t600x-die0.dtsi index 1c41954e3899..9157ae2a9f7f 100644 --- a/arch/arm64/boot/dts/apple/t600x-die0.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-die0.dtsi @@ -71,6 +71,15 @@ sio_dart_1: iommu@39b008000 { power-domains = <&ps_sio_cpu>; }; + fpwm0: pwm@39b030000 { + compatible = "apple,t6000-fpwm", "apple,s5l-fpwm"; + reg = <0x3 0x9b030000 0x0 0x4000>; + power-domains = <&ps_fpwm0>; + clocks = <&clkref>; + #pwm-cells = <2>; + status = "disabled"; + }; + i2c0: i2c@39b040000 { compatible = "apple,t6000-i2c", "apple,i2c"; reg = <0x3 0x9b040000 0x0 0x4000>; diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi index 34906d522f0a..96de7165df6d 100644 --- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi @@ -9,6 +9,8 @@ * Copyright The Asahi Linux Contributors */ +#include + / { aliases { serial0 = &serial0; @@ -34,6 +36,18 @@ memory@10000000000 { device_type = "memory"; reg = <0x100 0 0x2 0>; /* To be filled by loader */ }; + + led-controller { + compatible = "pwm-leds"; + led-0 { + pwms = <&fpwm0 0 40000>; + label = "kbd_backlight"; + function = LED_FUNCTION_KBD_BACKLIGHT; + color = ; + max-brightness = <255>; + default-state = "keep"; + }; + }; }; &serial0 { @@ -110,5 +124,9 @@ &pcie0_dart_3 { status = "disabled"; }; +&fpwm0 { + status = "okay"; +}; + /delete-node/ &port02; /delete-node/ &port03;