Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4609309rwl; Mon, 3 Apr 2023 07:20:23 -0700 (PDT) X-Google-Smtp-Source: AKy350bKyo0z+/QMR2hwGwY6yPoDesHunkRhjI7sPFTD63L/Vhe95guVLXIhbhfHAdfMGo3qQ4Sw X-Received: by 2002:a17:902:e84c:b0:1a0:53f3:3761 with SMTP id t12-20020a170902e84c00b001a053f33761mr19924271plg.15.1680531622902; Mon, 03 Apr 2023 07:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680531622; cv=none; d=google.com; s=arc-20160816; b=i9BRcyzutd/zQdF6MIza+MSH9fsNZkHD4WNcxZpy7NNgAZr/F7UTLNdHzmdz3yyzRi p4vH+XWSfZ6d7Eb3F4ZkUgR+nu2Hwk875acoTTBeEVI0C6Wx3LY6RXPD/E25eMeVt8oT JpXK/Bn1/EeZOiY91K8n/MQRogn7Xm7+Fg3jayanL3Ndac6UIL34yvohluLuObxLb69x aau08IhltFPOlKdmkNGL1p6V1+FFXirBvRyqAMGl//D0T5DpU5v4yb1eTTIoxLWMG/qm y55t+K+9a4RRGCbjAc7gpCcqRwvflZQr7uT2yCwTnFNc8Xd9L+30snB/Ztg9WA4aedFJ XLAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=fG5x9nZDoAwlRJXACu4xTqy22HEGSBn5P2RWiXcUHi4=; b=bJ0zMGAYFGbFiSxJ8UDyOJOFyL6DxLFTsugNCsdpQykCdDPnjG1xnBS3HtWUpf50Mh zERAsWoPEelG0/p4jcs4FVtp4A2C2Ng63u0L/lWT14WFhrFB5BYM2yMQqvIZLfCMYXG2 +IA2aKpOYgvJEhJuZOMDuhbdqxSlxGikgMja0tTWhzT41e99LRsgFFQZHSpfWHmQXsPb myBQ1HdE6uqHHUY8jiBHUllBbTl9gxwsEPF7KwLYZAazsqffByFPfB+ut67QNskawijh XN+UFcFmbS8bbPU0ugQBqFtse0Qt780REn/9EutLCw0s83DBoqdrIJtGsPyJKZ3fNq71 r4yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Zl6DZ2La; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a17090341d100b001a1f71d40adsi8459160ple.456.2023.04.03.07.20.11; Mon, 03 Apr 2023 07:20:22 -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=@kernel.org header.s=k20201202 header.b=Zl6DZ2La; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233111AbjDCOTu (ORCPT + 99 others); Mon, 3 Apr 2023 10:19:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233077AbjDCOTh (ORCPT ); Mon, 3 Apr 2023 10:19:37 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F1482CAFC; Mon, 3 Apr 2023 07:19:35 -0700 (PDT) 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 sin.source.kernel.org (Postfix) with ESMTPS id 141BBCE12BA; Mon, 3 Apr 2023 14:19:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id DF680C433AA; Mon, 3 Apr 2023 14:19:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680531570; bh=YGOWnWJQwvvh5UpvUUrRmW0IbHAce+aZgbXvLI4Slb4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Zl6DZ2LaBeG6Cujhp2Gd/eibufJN3ueM7YHOJzvWlU9b8dvYbdjm00JFKVUm0EwXz aybOkzpZP47zvyIU0G9vU/9RKLKhZ2X7d3DM+XcJtMQqAzKAY0IPn0E7pBgOS/14gZ ntOY2FWzRNCNW4akD2D7KE3VJniVFoVNs4qihuJ9j+sAPAvukFIBEX8n2KoyWhHLqn K5vPjavP8Aj7lA9920q/H7dE+m7ISEsfWTif+CwMD28aTRgJbnnhIw7w2Tdqqntlsq T+VSV9f3PpTc248kDuJRZn00p28PTISre2hzNh3oEHt2G9/eiAdK+KtQvcMR4aOowB gG4Sx6LpykRlQ== 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 CD935C77B6E; Mon, 3 Apr 2023 14:19:30 +0000 (UTC) From: Sasha Finkelstein via B4 Relay Date: Mon, 03 Apr 2023 16:19:22 +0200 Subject: [PATCH RESEND v9 4/5] arm64: dts: apple: t600x: Add PWM controller MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230214-fpwm-v9-4-f3094107b16b@gmail.com> References: <20230214-fpwm-v9-0-f3094107b16b@gmail.com> In-Reply-To: <20230214-fpwm-v9-0-f3094107b16b@gmail.com> To: Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , 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=1680531567; l=2059; i=fnkl.kernel@gmail.com; s=20230213; h=from:subject:message-id; bh=DV5VmTEOx5KbL8uEUkLa15NKi1OecZ41XyAaZ3KxIPQ=; b=xkSgFHvQFOSlywRTnOmQPxQqrc8vmXRGDblbLYIzpN0R2lBKwdtHgZr3RnB3r10ahmy4ggk9B j8WVuXwnmowDWsY4sahDEkofOebGS+940hh2ZBHPJHOjV28NJnKcg6r X-Developer-Key: i=fnkl.kernel@gmail.com; a=ed25519; pk=7LFSAJtxIWAs9LzCIyX0sSvCZy2wQTyEIu1zch6o804= X-Endpoint-Received: by B4 Relay for fnkl.kernel@gmail.com/20230213 with auth_id=28 X-Original-From: Sasha Finkelstein Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_REPLYTO,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 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; -- Git-143)