From patchwork Fri Jan 6 13:58:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13091402 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 D4C6EC4708D for ; Fri, 6 Jan 2023 14:01:45 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YfqN92n6v8ozJPUxRl17YzuruMyLna+i5/IrvBcemGo=; b=igILG021aZjn+4 9cMnsaaADJb/GJiPiMoOHmbA0ByxAYbE3QCEA/303SwHvZioYk48qapkUZp+W3mhsRRcS+yXgF9iI XkQM0E1zoHwrECntipVCxxQiwVaUNYi9jy7sTZRXLXJG9cRT9W0prbJX5bakeTIdwygb6D5xLqF0M O9SNgiCz3Cjawolk9UOdGD5JHg+v8hVohylmGDwELBxgzeNrzsDWtn68MjGpIKAGS87ICihBcrfQz l6gWAXvvR32FMdgBJyVZ0MT8ZAcdn4mgyHHJ8u5M+AZRRXYSBFrg5n2gxx4VUUqg6343Hg+5C4X7G ybqT/UrkG3QrZ5ZZHt2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnGy-008d5r-MH; Fri, 06 Jan 2023 14:00:40 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnGu-008d29-Ms for linux-arm-kernel@lists.infradead.org; Fri, 06 Jan 2023 14:00:38 +0000 Received: by mail-wm1-x333.google.com with SMTP id k22-20020a05600c1c9600b003d1ee3a6289so1129897wms.2 for ; Fri, 06 Jan 2023 06:00:35 -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=PHp3o8QZ5KAEd3hXTm1YpH7fNbaNuTNn7S/5NjOZfjk=; b=HaugyF/ljCd+ZT+a7oplMrAc62W8m50iIxp+l8izfUUt7QcNLgTW7MafQqFcUGZahB rRYb21q81znIh67Bgfq81onyJ1jxtv82qK0qYn7V6KYaJMJ+vFlZBpEEeQEg2c5KALpU IF71udZv5xF8nuCHxeY5y8lisodBRTFY/glGr++N6m7JTB3VYSQ9OkhJU8fUOde6gC38 Zk46WFBC49QyGx29A73QNfuNNk1clVtYOv1+9on6/S/v6QNHul4mm8GA0VAWl98wmBjw aO4DjqjT9rVxcBSl02je5/b129U2Hn9G0ZKhZgX32gDW3+9cIzx3rG5PGI9v94IOdvLa 1/Qg== 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=PHp3o8QZ5KAEd3hXTm1YpH7fNbaNuTNn7S/5NjOZfjk=; b=s6O3CFxNvw3hfeh7tr1tb8nI03w43MAEowuPHhIjK12z5dhrb96nOazx5iF4KFq76u fCf33WyHu0MC+4vpcc11cSFkOMYmHxeWBV//jQcx0UHTSMaJRersb7Mw2wtjRHLzX1PZ Qrth3HYOdU5JykyqHhKEPON4FAffkWdtobfV9UvfbpukIPgpvK2hxsMYdWsSLPNMrFhn SV2CLrPC/UYH7fGTCAIc2N+36dqaLacqiXX+7UCmcnXY2Q55208mYTmte30SXTCFYr2W siIbFv2p1SR4tTwo6MPXTpRnWKXRnCoASEMmw+zs/xLOYdutqSRm7YvgDm//WesrDF4I zGkQ== X-Gm-Message-State: AFqh2kqGnhv2qUn1sjpZvzSK8NvpDkfJRyspY/mrpr8nizT1eWkfnxj1 fjaV7zp366PAIcd/y5zuHms= X-Google-Smtp-Source: AMrXdXtjG0BF2QnxbW/2QgclQNDmc7MjgEEz+VUROqGHCkOrB2l8GsnRy7csSk36p2sMuzeKifDJJg== X-Received: by 2002:a05:600c:19c7:b0:3d9:7096:262a with SMTP id u7-20020a05600c19c700b003d97096262amr33455819wmq.27.1673013633927; Fri, 06 Jan 2023 06:00:33 -0800 (PST) Received: from localhost ([212.253.112.114]) by smtp.gmail.com with UTF8SMTPSA id n23-20020a05600c3b9700b003cf71b1f66csm2149876wms.0.2023.01.06.06.00.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 06:00:33 -0800 (PST) From: Sasha Finkelstein To: u.kleine-koenig@pengutronix.de, 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 v6 4/5] arm64: dts: apple: t600x: Add PWM controller Date: Fri, 6 Jan 2023 16:58:43 +0300 Message-Id: <20230106135839.18676-5-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230106135839.18676-1-fnkl.kernel@gmail.com> References: <20230106135839.18676-1-fnkl.kernel@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230106_060036_774862_D13A6144 X-CRM114-Status: GOOD ( 10.23 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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..7065045dc43a 100644 --- a/arch/arm64/boot/dts/apple/t600x-die0.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-die0.dtsi @@ -154,6 +154,15 @@ i2c5: i2c@39b054000 { status = "disabled"; }; + 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"; + }; + serial0: serial@39b200000 { compatible = "apple,s5l-uart"; reg = <0x3 0x9b200000 0x0 0x1000>; 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;