From patchwork Fri Jan 6 13:58:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13091399 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 27FF1C3DA7A for ; Fri, 6 Jan 2023 14:00:44 +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=RZ1I031qUPTw4gEr/FWAVMvhPBQLGM2bh2JV7ZVpk3M=; b=jsKKcRigj3owB3 yV1PaM1sRBY/gDfZHNtSUGz4oKpa00QB6rUZEMBN2SFhnnW4eCJlNqcM5UBH8o4U2UattXpJkUM6N B/v6YorPfNk2+sSWdv7vGlfrAABgFwnRm1FP4Ri8Li90I5IJYmSsMESkO+DUIpLEQGfVwX/HvZq/X adzvCAfvyHwLjATkPa7hkb3cMjqgVnVi+f+ITG61GU+cCcPGMWX6ULTdpna8P/loXEDrXfBTp1HFA xS05dN+JRF0vQ05XklF5jgTzsUUKstIgodmRqDFWioTzumEpFUaJn0zvIaYQ00IwRu5COtX63nLYx ogPH0o2KrD6PkgKINlaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnG8-008cgZ-Bt; Fri, 06 Jan 2023 13:59:48 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnG5-008ce0-5q for linux-arm-kernel@lists.infradead.org; Fri, 06 Jan 2023 13:59:46 +0000 Received: by mail-wm1-x331.google.com with SMTP id o15so1098674wmr.4 for ; Fri, 06 Jan 2023 05:59:44 -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=6k6iH6ye4eNPwympT1HKSV19Z/5AZl0oVvTiapSuckY=; b=d5wSGisgrvwYafyq3ycpqsF857ErZCeCRhvsVrA0CxojhnPy9m3G6+nR0o9CYOCKmo i1y22ry6WnjF/LXPgItplCXXO1SrDVbma1vah1FnmoxWLn4H4YszS9Qmkk50umr0kFKI CsDUoT/xIu/DzkgvRHNgUqPvRPIahVJnjkKyUHCAcDbtgXphQ6KNff85c+4ZFa2JuVnm Twrir9GN22TLT0YA4g0x6z167dCCtcCHWQUxwedJhNhoHU4Z0GI3SXzGhPpshJltvOXZ eD5twvkn68nUmYsqXEqH/Q35X3BFfWXqL8RRpNX568bS/rHGlifExpQFdBR5PjN8N6hY LXHg== 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=6k6iH6ye4eNPwympT1HKSV19Z/5AZl0oVvTiapSuckY=; b=ncRXfZEkNRcwzfV54gaRLOqzf7rBEu5h3toZsU31nbb/t4Q0WeavH0hx3607nRE+9z +YfC9GbaC+vW0xVYTssUQ4wxXBtvyzJQJwMazPO3l2lVVt+s85Co/sP6WbqUkLvX/Co4 NwZiBWpJYaC0cEt7KU2wNut6CUU7YjXIUUZTLInqmcP3SgxluxA5GDhI//HgeeqXscPP 5SIMfsPjEykueYp2pfbXH3gempXn2bLiZAOvJgynwNNEfuMGfNWbrTtRSnicUgmZ9tMV emKVk7hieGPRTlEdnSuhDw2tg15f6+45o5RR34MeGQY/NbdHglPocPgSzsISbJm552ja 20lw== X-Gm-Message-State: AFqh2kpyiJcADRxA/elxdbmKytRcS8pRBQr7tL98tGHd4/npX93qyXne 0ls2v6KPL03SOWetc1IzIwY= X-Google-Smtp-Source: AMrXdXuygvfm8mRFWYnSTzY5jUBvxaGI27pFQrKR8DN0dYm+bpUC4Egl9CsTDYkvmgxAFoOm5QyGXg== X-Received: by 2002:a05:600c:2d91:b0:3cf:735c:9d54 with SMTP id i17-20020a05600c2d9100b003cf735c9d54mr38771335wmg.1.1673013583162; Fri, 06 Jan 2023 05:59:43 -0800 (PST) Received: from localhost ([212.253.112.114]) by smtp.gmail.com with UTF8SMTPSA id o9-20020a05600c510900b003c6f8d30e40sm7279485wms.31.2023.01.06.05.59.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 05:59:42 -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 , Krzysztof Kozlowski Subject: [PATCH v6 1/5] dt-bindings: pwm: Add Apple PWM controller Date: Fri, 6 Jan 2023 16:58:37 +0300 Message-Id: <20230106135839.18676-2-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_055945_237570_4C8FC01D X-CRM114-Status: GOOD ( 13.42 ) 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 Apple SoCs such as the M1 contain a PWM controller used among other things to control the keyboard backlight. Signed-off-by: Sasha Finkelstein Reviewed-by: Krzysztof Kozlowski Acked-by: Sven Peter --- .../bindings/pwm/apple,s5l-fpwm.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml diff --git a/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml b/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml new file mode 100644 index 000000000000..142157bff0cd --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/apple,s5l-fpwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple FPWM controller + +maintainers: + - asahi@lists.linux.dev + - Sasha Finkelstein + +description: PWM controller used for keyboard backlight on ARM Macs + +properties: + compatible: + items: + - enum: + - apple,t8103-fpwm + - apple,t6000-fpwm + - apple,t8112-fpwm + - const: apple,s5l-fpwm + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + power-domains: + maxItems: 1 + + "#pwm-cells": + const: 2 + +required: + - compatible + - reg + - clocks + +additionalProperties: false + +examples: + - | + pwm@235044000 { + compatible = "apple,t8103-fpwm", "apple,s5l-fpwm"; + reg = <0x35044000 0x4000>; + power-domains = <&ps_fpwm1>; + clocks = <&clkref>; + #pwm-cells = <2>; + }; From patchwork Fri Jan 6 13:58:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13091400 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 13F18C4708D for ; Fri, 6 Jan 2023 14:01:09 +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=+w6H0A5c6mr5d8kRCE3U9Sxso8jZadXSbug84bDYP9w=; b=1bl+fNYtkLTkKI NLRxlt2ObwYifyiiYdhr0LBCTJhoPrOlq4EVaJfVA8qaJ6uh9k5ekVTUeOXcED2F/co0C721icgrK 3Z5Xvl4FiyfIRO1TasblngJL1IgoHnAnPLFnhu/KmHEcS2xQvto3aUrLbjFSZhKbC+Hl8KTKDpQYf MonWw6nqzzfD4QRP6E49Gf17oatt/rw4rXh04jc5ISXvRjEDpG4c4g3u1HVbR4CK8ErX2E4TsfJBu SKDATcxHhEqaOyVqp+MuKsM5I5WmFNgMMSVDp+DdwOBIb+LSsyIRKon/jfggMQUmOkWM+CD0Qtcv6 DdvWCIZyJtxMhX7KsHmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnGN-008cnz-QI; Fri, 06 Jan 2023 14:00:03 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnGJ-008ckp-Jy for linux-arm-kernel@lists.infradead.org; Fri, 06 Jan 2023 14:00:01 +0000 Received: by mail-wm1-x329.google.com with SMTP id i17-20020a05600c355100b003d99434b1cfso1132956wmq.1 for ; Fri, 06 Jan 2023 05:59:58 -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=CpKI3Dve8qIUFTav6wfzesFYfqvUQrR/d52mIqaXNlo=; b=ZAYHfi0kZx7qqZ0PzIxwP6FZbzAUp28dAlyQmkDoInWRJTj2yvNokH/HLpXMaJdCdm 38I+yTAq87kb6xy56fDaXNdLVdtxiHj6pti19tEDKjflDhfJ2L9k4LnE4PQva5GAn8VN eEeyhymGQMY2KhdSicaCHA7wd9EVQVlhx+h6xpzhwqrARqd6cJxUiH0DVu4x/fsaehUj R3jMpS9iAseqVQpkvxWYNBWZDIt56pu+UEr7bTeLDUBzjb+a2c4MHRqaL6UhfswsssPh GSw2BGVBNnJtJVYaI74YTi3Y+nyYdtQfV0Cx5wFc9nYdkY1SQn/sVbGkRjfVYNlGuNVa lQGw== 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=CpKI3Dve8qIUFTav6wfzesFYfqvUQrR/d52mIqaXNlo=; b=mOdmFrGX+20W3rm3138P3vNmXso2tmQKuYn1AnrUz4f+ACBg79keM5NObhCLlNwc7r 9C9z1voKtGGjLIR+ALZXlrPE2PGQbYPVndigo9EHzkRspCFSXldDax256DDYFHjs5riF GNik00vmyiXZ/0ck7uUb2jwgg00UNxn2xeb/C6CdWwojqWODS5a/FzsPNzXSTalji6KP sUR9pChwk0SwyvF1JpU7EG85/z6gyALKKcJT7UWD7OuLbsMFDR/86Gg188BdNcKrHOe9 ykeBNPLXZXTGS0Y0u3orxXktUciAd/YSQOpL5T0QvedwDXJUKBu3EnSd0cGEfhTkKxuf fzpw== X-Gm-Message-State: AFqh2kprwbcSonCw/iT7cyKx+DptDzJPFJ3DShlITC7QDs8kxQT5+rmM 9RIi4lcFKmkW52oz1PhbW6w= X-Google-Smtp-Source: AMrXdXu7AXrqyayN7eUbLn303bteLCBAlTFDpJriCuAl2+p3hHMObOfyTzHxJu4JylAYZ8oJVp6SOg== X-Received: by 2002:a05:600c:54ef:b0:3d0:5254:8a43 with SMTP id jb15-20020a05600c54ef00b003d052548a43mr48649243wmb.38.1673013597501; Fri, 06 Jan 2023 05:59:57 -0800 (PST) Received: from localhost ([212.253.112.114]) by smtp.gmail.com with UTF8SMTPSA id h15-20020a05600c314f00b003d99469ece1sm6831042wmo.24.2023.01.06.05.59.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 05:59:57 -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 2/5] pwm: Add Apple PWM controller Date: Fri, 6 Jan 2023 16:58:39 +0300 Message-Id: <20230106135839.18676-3-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_055959_683835_53F214E0 X-CRM114-Status: GOOD ( 27.80 ) 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 the Apple PWM controller driver. Signed-off-by: Sasha Finkelstein Acked-by: Sven Peter --- drivers/pwm/Kconfig | 12 ++++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-apple.c | 156 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 drivers/pwm/pwm-apple.c diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index dae023d783a2..8df861b1f4a3 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -51,6 +51,18 @@ config PWM_AB8500 To compile this driver as a module, choose M here: the module will be called pwm-ab8500. +config PWM_APPLE + tristate "Apple SoC PWM support" + depends on ARCH_APPLE || COMPILE_TEST + help + Generic PWM framework driver for PWM controller present on + Apple SoCs + + Say Y here if you have an ARM Apple laptop, otherwise say N + + To compile this driver as a module, choose M here: the module + will be called pwm-apple. + config PWM_ATMEL tristate "Atmel PWM support" depends on ARCH_AT91 || COMPILE_TEST diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile index 7bf1a29f02b8..19899b912e00 100644 --- a/drivers/pwm/Makefile +++ b/drivers/pwm/Makefile @@ -2,6 +2,7 @@ obj-$(CONFIG_PWM) += core.o obj-$(CONFIG_PWM_SYSFS) += sysfs.o obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.o +obj-$(CONFIG_PWM_APPLE) += pwm-apple.o obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o diff --git a/drivers/pwm/pwm-apple.c b/drivers/pwm/pwm-apple.c new file mode 100644 index 000000000000..5360583a5fa6 --- /dev/null +++ b/drivers/pwm/pwm-apple.c @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT +/* + * Driver for the Apple SoC PWM controller + * + * Copyright The Asahi Linux Contributors + * + * Limitations: + * - The writes to cycle registers are shadowed until a write to + * the control register. + * - If both OFF_CYCLES and ON_CYCLES are set to 0, the output + * is a constant off signal. + */ + +#include +#include +#include +#include +#include +#include + +#define APPLE_PWM_CTRL 0x00 +#define APPLE_PWM_ON_CYCLES 0x1c +#define APPLE_PWM_OFF_CYCLES 0x18 + +#define APPLE_CTRL_ENABLE BIT(0) +#define APPLE_CTRL_MODE BIT(2) +#define APPLE_CTRL_UPDATE BIT(5) +#define APPLE_CTRL_TRIGGER BIT(9) +#define APPLE_CTRL_INVERT BIT(10) +#define APPLE_CTRL_OUTPUT_ENABLE BIT(14) + +struct apple_pwm { + struct pwm_chip chip; + void __iomem *base; + u64 clkrate; +}; + +static inline struct apple_pwm *to_apple_pwm(struct pwm_chip *chip) +{ + return container_of(chip, struct apple_pwm, chip); +} + +static int apple_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm, + const struct pwm_state *state) +{ + struct apple_pwm *fpwm; + + if (state->polarity == PWM_POLARITY_INVERSED) + return -EINVAL; + + fpwm = to_apple_pwm(chip); + if (state->enabled) { + u64 on_cycles, off_cycles; + + on_cycles = mul_u64_u64_div_u64(fpwm->clkrate, + state->duty_cycle, NSEC_PER_SEC); + if (on_cycles > 0xFFFFFFFF) + return -ERANGE; + + off_cycles = mul_u64_u64_div_u64(fpwm->clkrate, + state->period, NSEC_PER_SEC) - on_cycles; + if (off_cycles > 0xFFFFFFFF) + return -ERANGE; + + writel(on_cycles, fpwm->base + APPLE_PWM_ON_CYCLES); + writel(off_cycles, fpwm->base + APPLE_PWM_OFF_CYCLES); + writel(APPLE_CTRL_ENABLE | APPLE_CTRL_OUTPUT_ENABLE | APPLE_CTRL_UPDATE, + fpwm->base + APPLE_PWM_CTRL); + } else { + writel(0, fpwm->base + APPLE_PWM_CTRL); + } + return 0; +} + +static int apple_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, + struct pwm_state *state) +{ + struct apple_pwm *fpwm; + u32 on_cycles, off_cycles, ctrl; + + fpwm = to_apple_pwm(chip); + + ctrl = readl(fpwm->base + APPLE_PWM_CTRL); + on_cycles = readl(fpwm->base + APPLE_PWM_ON_CYCLES); + off_cycles = readl(fpwm->base + APPLE_PWM_OFF_CYCLES); + + state->enabled = (ctrl & APPLE_CTRL_ENABLE) && (ctrl & APPLE_CTRL_OUTPUT_ENABLE); + state->polarity = PWM_POLARITY_NORMAL; + // on_cycles + off_cycles is 33 bits, NSEC_PER_SEC is 30, there is no overflow + state->duty_cycle = DIV64_U64_ROUND_UP((u64)on_cycles * NSEC_PER_SEC, fpwm->clkrate); + state->period = DIV64_U64_ROUND_UP(((u64)off_cycles + (u64)on_cycles) * + NSEC_PER_SEC, fpwm->clkrate); + + return 0; +} + +static const struct pwm_ops apple_pwm_ops = { + .apply = apple_pwm_apply, + .get_state = apple_pwm_get_state, + .owner = THIS_MODULE, +}; + +static int apple_pwm_probe(struct platform_device *pdev) +{ + struct apple_pwm *fpwm; + struct clk *clk; + int ret; + + fpwm = devm_kzalloc(&pdev->dev, sizeof(*fpwm), GFP_KERNEL); + if (!fpwm) + return -ENOMEM; + + fpwm->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(fpwm->base)) + return dev_err_probe(&pdev->dev, PTR_ERR(fpwm->base), "unable to map mmio"); + + clk = devm_clk_get_enabled(&pdev->dev, NULL); + if (IS_ERR(clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(clk), "unable to get the clock"); + + /* + * uses the 24MHz system clock on all existing devices, can only + * happen if the device tree is broken + */ + fpwm->clkrate = clk_get_rate(clk); + if (fpwm->clkrate > NSEC_PER_SEC) + return dev_err_probe(&pdev->dev, -EINVAL, "pwm clock out of range"); + + fpwm->chip.dev = &pdev->dev; + fpwm->chip.npwm = 1; + fpwm->chip.ops = &apple_pwm_ops; + + ret = devm_pwmchip_add(&pdev->dev, &fpwm->chip); + if (ret < 0) + return dev_err_probe(&pdev->dev, ret, "unable to add pwm chip"); + + return 0; +} + +static const struct of_device_id apple_pwm_of_match[] = { + { .compatible = "apple,s5l-fpwm" }, + {} +}; +MODULE_DEVICE_TABLE(of, apple_pwm_of_match); + +static struct platform_driver apple_pwm_driver = { + .probe = apple_pwm_probe, + .driver = { + .name = "apple-pwm", + .of_match_table = apple_pwm_of_match, + }, +}; +module_platform_driver(apple_pwm_driver); + +MODULE_DESCRIPTION("Apple SoC PWM driver"); +MODULE_LICENSE("Dual MIT/GPL"); From patchwork Fri Jan 6 13:58:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13091401 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 B5C6CC4708D for ; Fri, 6 Jan 2023 14:01:23 +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=o5m8j1SSeSrMQ5KJ/Kkbn1Mb6zCig9Y91DIDa7oeTfU=; b=UONxi005UEb8Bd 8S5+U4BDCjinGihcnL52dwLdbSsMpdYChG5MI0gJiaRSS3c/G7Ej0bpvCWKYqLyYrwh4hP95lqciB tQL3515D4eg+KpZWwyufGDfYUVzEDCxv0kCXlSiuSw4+K5CKSPV//uClD0khIPsbpF0CRhxxlw8Lm rFQFjkrZbnODkvz85GNVniMd+7JKjkPVyoOt2KGa8O63kKGlCdHKWCC/AiEIS4RjxNjWDTujDoOne gRI/2G1vhYbmYb8Oum7MRjL41dyTW3P0sxQ3uxghm1je5j36mZ1tXnO9UbgaKdGZlggnzDLUCoEAe deBGmZKDX7tAHSaqVugQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnGe-008cvX-I2; Fri, 06 Jan 2023 14:00:20 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnGa-008ctH-NC for linux-arm-kernel@lists.infradead.org; Fri, 06 Jan 2023 14:00:18 +0000 Received: by mail-wm1-x32e.google.com with SMTP id g25-20020a7bc4d9000000b003d97c8d4941so3580157wmk.4 for ; Fri, 06 Jan 2023 06:00:15 -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=K3DSO2nFSdxMzrHJBYG74NM4oJgLnjp9dkanZv0gHOQ=; b=JIOlZ/Nx0g107umrYRbaqvobCR6S11fvHIgf4M1VeCTHgVTR5BO7ilFAatFWxVZAcH AbfDbThGcBs/JVtVcKOGYeZuOh5nljp+QtqvfAxbT1b53cmFqHw0FZXCUrj7ZXMd3pkj +OtHqOwPbIqn41qMeyKRHz6OUHhg1SMMsJDT93cFrvJ9k0XyNdWAai2ggqn8w64DFdLF oyIC4CKtrgH6PGhuZdXIZ2BaznuO0YtNTK0U6jU7IamLf50aNUWaVD5Zn9To2h/qhr9t 1eN44rEm+GOh24KU9enUB2P+oz+iv8mDFGt8Mf1O8X6V2SKvv4hpazG0olnZGbEmG9Ap NJ8Q== 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=K3DSO2nFSdxMzrHJBYG74NM4oJgLnjp9dkanZv0gHOQ=; b=6hZpS6vDyOzchQFRP/kuGEQ5Pw/8QmTWc6DUaS3V0e9yO5yMtSSWPvk/JPSeQsRWdq tyx7NAtvT5Bf+ox7GrOyQwJ8Se1206yERdCFn4tV7wbq9JpXZ+U6v61Oi6owsoP3R/YN +Fay2ajwD87KQYK5vJrp4RoiPvQNiGK8B3NKpAld0COtWU3+CqwtJO9I09DSkrDh1+aj DTjLkYhr3J15pFg6jYXi5r1I4ixS1kj2EBzB1fPnsrj38zk8rGVOODhx/nUpXQYAkFp2 edUcMa5uuWTwLSlyZpTDN5ZN5Py05s3186+QVxn0Iw7/Wky5WbZHwBqFGAvi1XWoHmr+ k16w== X-Gm-Message-State: AFqh2kooC1JWPFEWR7k9kBFbdR684dWn7qPEmmHvdN67LHepNavbZ3yF wpkV6wiPc3M5uAsp3v4mP10= X-Google-Smtp-Source: AMrXdXsYq4D+WnUsWLyK0xKopnwsG6pFgkxKUMrZEJ6/pn3r8RHOzSWaRJYnqCuDU7F1PH/2JWFV3w== X-Received: by 2002:a05:600c:3b0a:b0:3d9:91cb:bbff with SMTP id m10-20020a05600c3b0a00b003d991cbbbffmr24761921wms.26.1673013614525; Fri, 06 Jan 2023 06:00:14 -0800 (PST) Received: from localhost ([212.253.112.114]) by smtp.gmail.com with UTF8SMTPSA id r5-20020a05600c35c500b003d98f92692fsm2102274wmq.17.2023.01.06.06.00.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 06:00:14 -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 3/5] arm64: dts: apple: t8103: Add PWM controller Date: Fri, 6 Jan 2023 16:58:41 +0300 Message-Id: <20230106135839.18676-4-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_060016_820757_F55C6B0B X-CRM114-Status: GOOD ( 11.40 ) 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 MacBooks Signed-off-by: Sasha Finkelstein Acked-by: Sven Peter --- arch/arm64/boot/dts/apple/t8103-j293.dts | 17 +++++++++++++++++ arch/arm64/boot/dts/apple/t8103-j313.dts | 17 +++++++++++++++++ arch/arm64/boot/dts/apple/t8103.dtsi | 9 +++++++++ 3 files changed, 43 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts/apple/t8103-j293.dts index 151074109a11..7381dccc1613 100644 --- a/arch/arm64/boot/dts/apple/t8103-j293.dts +++ b/arch/arm64/boot/dts/apple/t8103-j293.dts @@ -11,10 +11,23 @@ #include "t8103.dtsi" #include "t8103-jxxx.dtsi" +#include / { compatible = "apple,j293", "apple,t8103", "apple,arm-platform"; model = "Apple MacBook Pro (13-inch, M1, 2020)"; + + 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"; + }; + }; }; &bluetooth0 { @@ -47,3 +60,7 @@ &i2c2 { &i2c4 { status = "okay"; }; + +&fpwm1 { + status = "okay"; +}; \ No newline at end of file diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts/apple/t8103-j313.dts index bc1f865aa790..1e26aa1ef525 100644 --- a/arch/arm64/boot/dts/apple/t8103-j313.dts +++ b/arch/arm64/boot/dts/apple/t8103-j313.dts @@ -11,10 +11,23 @@ #include "t8103.dtsi" #include "t8103-jxxx.dtsi" +#include / { compatible = "apple,j313", "apple,t8103", "apple,arm-platform"; model = "Apple MacBook Air (M1, 2020)"; + + 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"; + }; + }; }; &bluetooth0 { @@ -39,3 +52,7 @@ &pcie0_dart_2 { /delete-node/ &port01; /delete-node/ &port02; + +&fpwm1 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi index 9859219699f4..5300fd115561 100644 --- a/arch/arm64/boot/dts/apple/t8103.dtsi +++ b/arch/arm64/boot/dts/apple/t8103.dtsi @@ -432,6 +432,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>; 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; From patchwork Fri Jan 6 13:58:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13091403 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 3F3AAC3DA7A for ; Fri, 6 Jan 2023 14:01:52 +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=WRLG+XjmmJvq9JKJDN1fBRhO+wbt4HFVOBDpPHnx4z4=; b=b4HAOAViPjhY5J bO6L5SHkM7H6UMqF3i5PPJwGwd2X6IUMuR7d1CjMj5xU7mHRk1qyFwrsJkXNWFO0Jo3kVaJKvu6oy o9migS2MpUvZggtv7ZaMMic2ZZ2nhaSEKYoI8B6qutkynnddY1R6RIsFG0gzmFnkofK8paf8m52y4 XynFQL2PluZPAe/XHKaNzOZbq4EcZ8E62qc7lnNnmMR6Rd4oS0X0IVGW3CHuR0PLzClt+GHCQ0Rq8 hid7SSeXUChkCBR7esa3Hu0BGuSQhLinwL66JMGAH0fkQ9Pp2Z7NJprZl1f8d7FvWICePjXzHCxpC IDvtoYoy5b6tEQMt23aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnHA-008dER-O5; Fri, 06 Jan 2023 14:00:52 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDnGz-008d66-No for linux-arm-kernel@lists.infradead.org; Fri, 06 Jan 2023 14:00:43 +0000 Received: by mail-wm1-x32d.google.com with SMTP id g10so1114671wmo.1 for ; Fri, 06 Jan 2023 06:00:41 -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=kTaBsHHaxY4hxEZyw1070cz+vHDzIdLfWWrgADCbRU8=; b=kMVALwwUOsuXe2H9tiPvLnP6NJwlyxfFypCBmI0D/6IIZtFAulwtGv1gn7ileo9q2Y 2IkdjoXJON8sBxMRlrRPDgAkYJjpXXDgsuPD2GBKrP1iaPq8hK9izxaa3ptkUUDWkg8p Yx190q4Cx6R3xYh0cbHYDGrm+SmaPex4zzWOGfJpEan3TqiEQy2X68zMlMuGv3zYhNO+ bDxustxsaVG7DxLPPIiRXYU9nLcewdrOZA9LtnX/3c6M2FCpX0PXgYSlx0h6is32iEYq DxB5kIe8G2G3jkpDt9xlytnBpOhC25/ZkqeEDymmyT6+KKphiul0y3SyJsi/HjjWX1t3 P7DQ== 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=kTaBsHHaxY4hxEZyw1070cz+vHDzIdLfWWrgADCbRU8=; b=5IAuv8tCqw7+sxwdi8aA7IEn+QF9Z1nYs8haEdQT7G5QTAZDh/FlDG3uJMv0c/NWzs sXDx3O51JRTsAUPXeyquEoJudTNxT6oID7IA7QIfx0ExAi6x6010g3qzqJ5C97VZ1QLJ 4YmjhbmxvmUFUY+xPoppGmGyUpFVi1sxsfUEMAcyIo5itMDHYVIM3sKON+rei2ZCxZay zEWQ+FoPXc7XtuBAIPYnh6/xFzKQdQjfp9tSUt3PPAXx7L4twfWIyP3E1V27dp2K+NBP O4cJ9/xuOmb72kxx5Q6/XHYPPAF/5ntySumAbnWNgMYxRBnsOICiTEBn6e7CMDDgRlls QG5A== X-Gm-Message-State: AFqh2koDy0XRQyx1KuE820PF3GBZYGBpAa90D4gD+ssijUz/RKeqHTjR OCoYaHFUBkXg1NMUPJDtZoM= X-Google-Smtp-Source: AMrXdXtcxMb1sjh4Foy0c4Wo2XOB2rnnybH27bS0t4t2gZCoL++LW+Qf93N8JOewORmLz95/NAJuLw== X-Received: by 2002:a05:600c:3ba4:b0:3cf:d428:21d6 with SMTP id n36-20020a05600c3ba400b003cfd42821d6mr38001751wms.3.1673013640025; Fri, 06 Jan 2023 06:00:40 -0800 (PST) Received: from localhost ([212.253.112.114]) by smtp.gmail.com with UTF8SMTPSA id f19-20020a05600c155300b003d98a7aa12csm7246306wmg.16.2023.01.06.06.00.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Jan 2023 06:00:39 -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 5/5] MAINTAINERS: Add entries for Apple PWM driver Date: Fri, 6 Jan 2023 16:58:45 +0300 Message-Id: <20230106135839.18676-6-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_060041_885302_4CFE9DD7 X-CRM114-Status: GOOD ( 10.87 ) 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 Add the MAINTAINERS entries for the driver Signed-off-by: Sasha Finkelstein Acked-by: Sven Peter --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7f86d02cb427..75bda5ab704d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1970,6 +1970,7 @@ F: Documentation/devicetree/bindings/nvmem/apple,efuses.yaml F: Documentation/devicetree/bindings/pci/apple,pcie.yaml F: Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml F: Documentation/devicetree/bindings/power/apple* +F: Documentation/devicetree/bindings/pwm/pwm-apple.yaml F: Documentation/devicetree/bindings/watchdog/apple,wdt.yaml F: arch/arm64/boot/dts/apple/ F: drivers/bluetooth/hci_bcm4377.c @@ -1985,6 +1986,7 @@ F: drivers/mailbox/apple-mailbox.c F: drivers/nvme/host/apple.c F: drivers/nvmem/apple-efuses.c F: drivers/pinctrl/pinctrl-apple-gpio.c +F: drivers/pwm/pwm-apple.c F: drivers/soc/apple/* F: drivers/watchdog/apple_wdt.c F: include/dt-bindings/interrupt-controller/apple-aic.h