From patchwork Sat Jan 14 13:25:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13101966 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 2EEFFC67871 for ; Sat, 14 Jan 2023 13:28:49 +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=hRD7LLA7oeUe/NgoglUFc9cali1Cb1/qK6oYeUpO+MM=; b=tbP+8fdlCkIPh2 oOCdZle8OJLRBGxZXtEEAHLQkiUpdK4NtFQOIAaJdyfA9LoJUelQQhU69qrIBndiK685n/LIiWrCI tkaZdw885w+i0HMOYAP/LyLJRU43orgMT1IZjPuRGklqLHe+AY65jO/Yc3kNS9p/RQ29mxh8YBvC/ lry6m20eN/swcFsQbGRhQsU9tZDuaqvE5kqLd91aVLE28d1fg2k8EFUgaFcKRVqXcZpLeUdgF/o5Q WKVEmxWRb08rHkjEEbJk/WVW/Qgk/fWYV1d0EfuFUF7hPknHovN/ssYnloGvPRdLcnORekh5E6uj2 gkzEhFsY4QbdEbx9SYvw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGgZX-005s05-1D; Sat, 14 Jan 2023 13:27:47 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGgYu-005rec-09 for linux-arm-kernel@lists.infradead.org; Sat, 14 Jan 2023 13:27:09 +0000 Received: by mail-wm1-x32c.google.com with SMTP id o15so16875975wmr.4 for ; Sat, 14 Jan 2023 05:27:06 -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=I/Fxp0KlTmBwEo1nLuzPHrie4d14h9A0j9bTIw7gzKw=; b=TD8X0OMAzHCrbPiSDCwQFOC8jDyzGcm1xImUM4l7K3WQRocTAn/EDw2JtAH8xarawB agqs3rzbyzTa9O/+hSL3kpMG0M1CE40jItshSL/CrQUCydeYTIbTAjSSQJc0b8f0rkYS 1E44hapvinqgwYXI4vtfNRRPBos2qHBZxlybB1T3LncHgSS1/HgARtmcdagL7Ssjb0AP 1pHlmIq+RpS0LwWU+60Ugya/hzgYmO7LjSnQI+pxy7fhFrmpR8x5BZLjWmWiq3mlXsm7 X9ViIztl87/VXh6kt6EiklAVbzoUMAl+NWn++3sAS15rcogkqCptSMgtbmthEdgQdsBF 1rFA== 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=I/Fxp0KlTmBwEo1nLuzPHrie4d14h9A0j9bTIw7gzKw=; b=poXvTJw6Ugi4H0EwTPfw/+mRi/S/8gAqF1VGnq29CiBsOs8kKXJYcCl7YPRxSekZR6 1iIUkeL36U5IScvHggaCSl3+5BLUk0RFmw1Y4rK3TkbeZVmCSndrKM51ZbQsn2CmK9+m nPbNmSVJr8kyiD0lXruaG//yTedBKxMfAz8FYNLpYihUK1oIj3EYMcdOdvjdgH8QszMF b5uKmQagbYGUkVZuboC+LM1BnTJDzzBmwBtK6bwUz+3vOWWPVzR1x5FnuuBlABgfYGul csaJQ6wXwklwcms9TEVVCfG0WrFc5GUfXaDAeCXB2jFicdcMcOQX9ArFqeKon+7trrUh tfKw== X-Gm-Message-State: AFqh2krHHkmcF3Owe2aGVhSgB+r97NwvWM7E74K9srfEWZt3x4WGo83V BF7FCfnvkaZgEmeJpgvfNA4= X-Google-Smtp-Source: AMrXdXvBIJOlly8NqvtSZHg3EZPrc5ZqQPIiBQz8VemZlxvq4gfVHX5Oc1FEsv8l3rvtzcFliCBn0g== X-Received: by 2002:a05:600c:8505:b0:3da:f89:bc46 with SMTP id gw5-20020a05600c850500b003da0f89bc46mr9552087wmb.17.1673702825604; Sat, 14 Jan 2023 05:27:05 -0800 (PST) Received: from localhost ([176.234.9.57]) by smtp.gmail.com with UTF8SMTPSA id 2-20020a05600c020200b003d9ef8ad6b2sm19544558wmi.13.2023.01.14.05.27.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Jan 2023 05:27:05 -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 <7d578vix8hzw@opayq.net>, Sasha Finkelstein Subject: [PATCH v7 4/5] arm64: dts: apple: t600x: Add PWM controller Date: Sat, 14 Jan 2023 16:25:07 +0300 Message-Id: <20230114132508.96600-5-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230114132508.96600-1-fnkl.kernel@gmail.com> References: <20230114132508.96600-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-20230114_052708_083203_CB69BEA5 X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. 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 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;