From patchwork Sat Jan 14 13:25:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13101957 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 3EC72C46467 for ; Sat, 14 Jan 2023 13:27:53 +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=J1xN4r1YiSZX9u eGcaNHx1wkuQfy2OM4XDouBF+mEXp+VuEKkKJ8c5mUZvcpaggAcmzgRGx1/LK1H2rTsatMXRHpWc0 eHVIPzbIkc6XmBcvsz/4pxlbt5KAqgj4uKvdjqmtqIthbDk0iNOCUlNpWkBXFZZmzYINoQEqo5wkq 1cmJwHe2Dz7If0ItdRPSawrqlBGz+ROkidDCGCK4TiC0CIZY0FUxV64DyRJ7xADsnNHtD9R/D4wBE gHWyLwKUb5WNmdWR7NIgdEcBqOMvimoegPkL3UYj7uJz4pyXzTRvAEqLj9hfnyfY5h6MBUgRUoeZb BVc192dAn0Y0koH8/LpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGgYe-005rX2-2P; Sat, 14 Jan 2023 13:26:52 +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 1pGgYa-005rVc-DD for linux-arm-kernel@lists.infradead.org; Sat, 14 Jan 2023 13:26:49 +0000 Received: by mail-wm1-x32e.google.com with SMTP id j34-20020a05600c1c2200b003da1b054057so4759614wms.5 for ; Sat, 14 Jan 2023 05:26:47 -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=LGJyVHoh7bFUcgHskMeiLfEebpwxP7jpmgJ2QOGPbwzKSPfWG88fc+eATSK+XMQdpH dl29IWyidRKX850QEHlEY9AjAVUJs6N9elD+IO36UMh0CgAFzFjFZsneML17Y6r8d5Uo 486v15sjYIMPdBg8OIe7stsWi3cTazN5yxuSH6EhvKMhTEQIl4T7L5Mr4r1XPcVJVjt6 geW5JjgujZPAqP0V0PumeOiPPuMMZ21Ftt+254U95MHyERyJxZ4RAnHCr9OL+qC7jRNs 4Jw/DNgDxVrANr37/24gOXGzeiGqSMX9ApakFkaD6d8XliFOT1xkzqUXw68BXhQRGZ9a HSbQ== 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=keCL1HEK5Vm3BztC4T8mH7i9H/xheEVHhVZFlhjGrszDPWu1aMANSExUZwvrYAfFod /irbOnYwRC4Xdl6Nw1J3WwajZ+NnpfY1yfnlZFcpwN4bGi4xG9Z3zzUb8bbTVVHYWzap yEIsLFbG30YuQOLTJPom3G1Rmr7nn+YXm5211opLBjZOWXnUtwW06C1OZVQoVedClyDz AFYMBu5yz62MYvDNk3x5HyZkOxrbe1OC5htV+Dq6LTnEmNiXvMKviBBziw8Gi6oKlbHq TzEtKysKZxANEVqx4wCLYmo0i9FGfwfOo7Mp8uAe9uwm81eyMNCjilUYbxHvXNuPVdaz QxOw== X-Gm-Message-State: AFqh2kovw8cem90bn7z/kJBGjMmy7c33IMjQiiHHh/RBnynRq1/vsWjL XXX70WVIaF7hC2zYj/9s2T0= X-Google-Smtp-Source: AMrXdXv2ygbzN0IqAO7jz1qfWtxdayFzAWT2QW9B4EUCVZZiRwTBzJY+EvkyQ1u9vF19laIqorIQHw== X-Received: by 2002:a05:600c:4e02:b0:3d3:5c21:dd94 with SMTP id b2-20020a05600c4e0200b003d35c21dd94mr2715473wmq.9.1673702805919; Sat, 14 Jan 2023 05:26:45 -0800 (PST) Received: from localhost ([176.234.9.57]) by smtp.gmail.com with UTF8SMTPSA id u2-20020a05600c210200b003d98f92692fsm6221455wml.17.2023.01.14.05.26.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Jan 2023 05:26:45 -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 v7 1/5] dt-bindings: pwm: Add Apple PWM controller Date: Sat, 14 Jan 2023 16:25:04 +0300 Message-Id: <20230114132508.96600-2-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_052648_468628_F7583A13 X-CRM114-Status: GOOD ( 12.61 ) 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 Sat Jan 14 13:25:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13101958 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 69D64C3DA78 for ; Sat, 14 Jan 2023 13:28:02 +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=y/qj0scMHCv48fjTDarsZ0v9o9fETVmJwRObs5B6l6A=; b=MWDMXnACeMi9t4 M9TkZWkYpFYUKoMEKD0uP65UvX7cJ//Gp1Nlc+8qTZZ50m9TU+XUWH7YnHNaOycEsDjAFfURPzaNE JvSBqO3GIEVsa7bCaHC8YUmbKy6V4havXD7pDMOCSTYWaBmw8MEIbo7+z6cdDe0dv4rKEkI6cBr2N uWI3TUg3ROhW8Xk0CtPoANtVtt4Sp1iM82f3zleZHqKd0g2CnRqF2bJbaK4e5iZKteEB/VwNjUNdD AxJhozCAuE7pgHSFOWNu1C6Aax06wvfKubECszW68EuzmILbLdupStiQTDpMfi6chaA5whDPQI+SR y7IhyJPnZnuIBCgMCNog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGgYo-005rcJ-Fy; Sat, 14 Jan 2023 13:27:02 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGgYh-005rXS-6T for linux-arm-kernel@lists.infradead.org; Sat, 14 Jan 2023 13:26:56 +0000 Received: by mail-wr1-x42e.google.com with SMTP id t5so18990138wrq.1 for ; Sat, 14 Jan 2023 05:26:53 -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=9QdtFduAUazoRi+gFa6YJzP5gQ4JWm55xKraka6mCaE=; b=d3LLx7AGzhiShDp19MfcigvkdYmCc/OUeoNj58UE5BRFst8jDWjmoNXx5Dfj9yvs37 L5SYxdpRzSMsmxkkhHWJcsra5dl6CxVDHo+dW366sxNCzv86yNi2HxUYzPcnt6UJof0V QLOlGK+oM8HiBZhdbD2CY+l1HaA4ODcbrCjntUQYAycH6hY2NClLFNkj+hccAv0f09H1 FypxsdU33JUdIPX8rZE/sVwpc8laFbmDpIOjppWxkU0EAa9c9ksoC6kizUzHzIn/T21K Z/E1olbmoCRwycQgfId6X+2jCsxY/G9x+byUCvHSP8f1XOtAmS+0KRxEyd0O5iJpoYeR rY7g== 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=9QdtFduAUazoRi+gFa6YJzP5gQ4JWm55xKraka6mCaE=; b=O0YkAupy5EJ8eWbrqMxIp/6ul3TchuVQbA+TTaeeQC2M8e971YNwQwDhsWkbdlufuD 4FyfHjlQoMS88IXvZeEnz2qwJreTmFPM6c++DEh7G2SwYLQ/2HSEKWR7JtD4tpFxJO2n nhyo7sqtx8AkqVSuLlCUYCr42DJyL16a8pUiWdOUtqSVzd+nrI9qHNkrhrEkvUln6f+o 46c1myWD6wxfcVtIBsptFSrD7kCkjow5/c84xau+oDim3R5PzuQ7i05gXB5eRrfly/53 UJ658WAE1F4V95DDh1WJwUgS4fjTOt9Ce8iY6zwuECcnxGBiCk4nrzaeAsAvKtDLjElU Qbdg== X-Gm-Message-State: AFqh2kqghO76FL+K+pSGDhJQJ9R8frQatNiclTSQv7IjLtimdKuDJnHv SwEJKSyHKYcBugxA2jYDyBA= X-Google-Smtp-Source: AMrXdXtX9XEYIJE30llAT5ls65UZ2GHzkbkLAid1iRkGfjXgMfgTOva4jdC+czEVjCgZNXO3qxjGtA== X-Received: by 2002:a05:6000:617:b0:242:1c5f:ee61 with SMTP id bn23-20020a056000061700b002421c5fee61mr57595065wrb.39.1673702811896; Sat, 14 Jan 2023 05:26:51 -0800 (PST) Received: from localhost ([176.234.9.57]) by smtp.gmail.com with UTF8SMTPSA id m5-20020a056000024500b00267bcb1bbe5sm22062872wrz.56.2023.01.14.05.26.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Jan 2023 05:26:51 -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 v7 2/5] pwm: Add Apple PWM controller Date: Sat, 14 Jan 2023 16:25:05 +0300 Message-Id: <20230114132508.96600-3-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_052655_268361_92E579D1 X-CRM114-Status: GOOD ( 27.85 ) 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 Reviewed-by: Uwe Kleine-König --- drivers/pwm/Kconfig | 12 +++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-apple.c | 159 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 172 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..551e07d49bf7 --- /dev/null +++ b/drivers/pwm/pwm-apple.c @@ -0,0 +1,159 @@ +// 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. + * - When APPLE_PWM_CTRL is set to 0, the output is constant low + */ + +#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_PWM_CTRL_ENABLE BIT(0) +#define APPLE_PWM_CTRL_MODE BIT(2) +#define APPLE_PWM_CTRL_UPDATE BIT(5) +#define APPLE_PWM_CTRL_TRIGGER BIT(9) +#define APPLE_PWM_CTRL_INVERT BIT(10) +#define APPLE_PWM_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_PWM_CTRL_ENABLE | APPLE_PWM_CTRL_OUTPUT_ENABLE | APPLE_PWM_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_PWM_CTRL_ENABLE) && (ctrl & APPLE_PWM_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 PTR_ERR(fpwm->base); + + 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 + * + * This check is done to prevent an overflow in .apply + */ + 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 Sat Jan 14 13:25:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13101959 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 B5274C3DA78 for ; Sat, 14 Jan 2023 13:28:31 +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=Y1u6uDZnV0B40F j6MFIhqaVvS3yZYRr/IlJy1DTVaGcMupw8ZhcKTGYuZvoTIhHsXP0RN7OdQzFnyVLEnsSgPLlCIfB QHkvUO/dGhCIgAEsqSH9Q0otvmFxrdgae3xCzKItKSLwiCi5bRFszVJLuNNWfMBE2Y1aVFkRD9G/1 axxhVcrLHxcE/A1mxgZmhBb5KSM70HT3mRIWDMYizq53Gbr6dvc+/nDaMblD2O8ViNOznP3HRWVZq OmU7wILf8RSlCM7ue7/PfYE08qe0MFMo9rY4ICs10Z3ij3bobzY6VtPqbajDrbGnnzuoloIK1chW7 v7IhnGSar7ZFEBYxLJOg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGgZB-005ro4-DY; Sat, 14 Jan 2023 13:27:25 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGgYn-005rbB-GO for linux-arm-kernel@lists.infradead.org; Sat, 14 Jan 2023 13:27:02 +0000 Received: by mail-wr1-x430.google.com with SMTP id z5so22336887wrt.6 for ; Sat, 14 Jan 2023 05:27:00 -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=pbFyCviih8VQPUB7txIKy8vlSLeMi1nXlBWiVdtlIQaZlU/Fi7wNKU0p8fxUbneMV4 3PaWN0szqHSBs9Se4sIpzBDQBAulbUUe24mk+37CprSRXPiflCoMJY87Uw+VDwYsO0Ms jbp11KwqaA729p1mvAQmMoDUNbtTOJR4HqVWOfnyeI7NIPWtsla3jtu8ujEeHwphli00 VCISBCU79ftydyS1TQcL4lV2mZU9mWkIVAi0pMXNN2IYHFkUBEEJ56XZ3cS7IH2ZQml6 mEWpKFhHNQRV8mM7Y6ZmX/lmgwedMQOjOiQGqT8aTKQVtZ/Kv+ndZ0PO9CGx3Vsy5OIy YOEg== 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=71nrx5cknMYhz2VnchYx07cVCyhvzHvz2cw+5UZYXYycY3Zhdg6EszRd3xI2JgTXNy Gw3Caz4AHVxbeaE2kPADKy968jPgAy4ppM5NtPva07ya1eS7nMPFX+cYLHA6ubGvBL9y zJUEuoPeUERpNWNgGNwSOZhz2T+o4rbhA7JO3RekFKMUMDlKLRK2M/HZn8+V60ftREqb 6X1s5RbPgUf/wC4P2kvJ87H9mDS7H+UdOu75NrHSzv1z8JUTlxuCWGFDB8t1Yb1Vvj79 xkLSDATGeVyqLHqXDQ4r8xO7HnY7pHQMQ9QdZWHPNTvr7TWMpUeRzqLPh7EMgjTLMUuU D7Zg== X-Gm-Message-State: AFqh2kptjkgXgg3KcUo/XgULYKXivoaxfKgluBdq5p2E3FBfrPrx3TJ9 4MgEwicr9dkCfAHUTo1OF2Q= X-Google-Smtp-Source: AMrXdXtA+z1KEpmc6DTllds+TJMItwHfv9cgQMfGzXKntFgdGc8gS+f0+rsfPMZD+JQ2m5jSlkNprg== X-Received: by 2002:adf:fd4b:0:b0:2bd:d966:7ffd with SMTP id h11-20020adffd4b000000b002bdd9667ffdmr5870139wrs.9.1673702819108; Sat, 14 Jan 2023 05:26:59 -0800 (PST) Received: from localhost ([176.234.9.57]) by smtp.gmail.com with UTF8SMTPSA id m9-20020a056000024900b002bdec340a1csm1812630wrz.110.2023.01.14.05.26.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Jan 2023 05:26:58 -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 v7 3/5] arm64: dts: apple: t8103: Add PWM controller Date: Sat, 14 Jan 2023 16:25:06 +0300 Message-Id: <20230114132508.96600-4-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_052701_577413_287F9025 X-CRM114-Status: GOOD ( 10.59 ) 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 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; From patchwork Sat Jan 14 13:25:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13101967 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 09217C3DA78 for ; Sat, 14 Jan 2023 13:29:03 +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=SYTHqX42APpqHI IrXTi4bp9sHtRP0NgLUZnUTRUAhX1R6h1mZo8zd5ZvSOW4esCDmB3j5+EAUpZ/shCfRys+RHeEWft Aajfb82Ze+Jmvedh8yWXQk1nsFeyKDjo8x8siCDGm1r7cz5y+SEFnLk1yjp4jV2Lxf6BMPfEgIvVA 5ysgrB7dZ0Thkbpon8FKTHlKFO15Tt5vDOmfFWFpbaqwKqq7U4XHRUtYUjZJxB8zkALzkgZkrhjBF V5/m+Dr0FaalcvPKnWmln5gpv7TvtAMNulBB2+CpyiylXZembOEqFqSB4qg694lTlGHihk8Z9ZmmB H0B+VmiyhWMLQo9uALbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGgZm-005s8e-Hk; Sat, 14 Jan 2023 13:28:02 +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 1pGgZ1-005rec-8r for linux-arm-kernel@lists.infradead.org; Sat, 14 Jan 2023 13:27:17 +0000 Received: by mail-wm1-x32c.google.com with SMTP id o15so16876109wmr.4 for ; Sat, 14 Jan 2023 05:27: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=kTaBsHHaxY4hxEZyw1070cz+vHDzIdLfWWrgADCbRU8=; b=KctgwPQpH9xCpSLXM53WC9mTpWK1PvFlynHp8iRqG1lMsjo9sB0rthg2CEF3rP3g8x Kqe3/qO1CLVN8Z2AvbJDYtDjapoCrmExuuzBLKv7pVcKYONevudbuMWCF8BJtCTR7yjy USX/U2WQW5J7PEnziHq82Ap8Mp9RV/W9vU/Avz3c6gr1Y43Zoa56txbi/NkoVU13SBUu OKxMoo0XNfBDFgaLDSnqcMvEWOsTQgrn/UBFrXjNT6+/JDVmM0plvZGYy33x3YffaA9D seqkCoyuB0bByMSTJOOTf4t60p3RNtEmWPz33zGfpIZNmvBPw2Mp24rzi9cJiwvUdPyP 8Chg== 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=ao/z/GTkjIqzTCO+X4eEawPJrA1oHbf4sWsMUqb7Lbnau/vP8KQiRQaN3YbpLqvbHj mb8lQEqiEjzAaUjS/Zi/PzjB0cmmOR2i5/VQAqV/bsO7o2UV6PNzqdlOFEPOQcs4jLAD RxCv6QTmwsvlhkqHpE6OaTlQehXeT67twb8Z68XqOmTLB10mZEEqNWAXJ/K5GmFOIN+K n87WpVFak9KrDV31oK7PHRnfqM+P31iLgKU+m2k7Igv/3pu3W4/z9cyFb7mzJi5tjSwe U3h7zqddXXtJPd78oIWA+HG3snIFvLRf9NQKCvD11ZYZE0+9VDgGNyvplbh0j1VYCpZb FIMQ== X-Gm-Message-State: AFqh2kohUWgUFoYt2B/+sVCfXOlDTsl8EP5v0W/TYzuwVqg/en5TeZwP giEV42CO/tbZcYwIgOhG0ls= X-Google-Smtp-Source: AMrXdXvxfcjO16Tfd57a8sefzot+ClnnfVVEzMxceMSpSs34TyOgYWX9y5BdDeILBBdMcapToQTN0A== X-Received: by 2002:a05:600c:3584:b0:3d9:719a:8f7d with SMTP id p4-20020a05600c358400b003d9719a8f7dmr54674605wmq.35.1673702834802; Sat, 14 Jan 2023 05:27:14 -0800 (PST) Received: from localhost ([176.234.9.57]) by smtp.gmail.com with UTF8SMTPSA id l36-20020a05600c1d2400b003d9fb59c16fsm16415818wms.11.2023.01.14.05.27.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 14 Jan 2023 05:27: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 v7 5/5] MAINTAINERS: Add entries for Apple PWM driver Date: Sat, 14 Jan 2023 16:25:08 +0300 Message-Id: <20230114132508.96600-6-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_052715_364154_ABF7CB48 X-CRM114-Status: GOOD ( 10.16 ) 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