From patchwork Wed Jan 25 15:10: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: 13115780 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 0AD34C27C76 for ; Wed, 25 Jan 2023 15:13:07 +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=PsEg8r1GTRr+db oq2Glk/sNcnXmbdvYOPjiMe2TK3YtF/J3H3bPKP8iiuUvlOGKsps1Q20iaoJ5SoulxYiL/5tiFiQG B3i6YCKUdmIKV5nx3bEQFFoHXjK0huV3h9JQgHmpdi1GAmo7UbafxbgZJr6BJdtVQDjFhUBb66b22 kUAaqZbHwiGvm4Ji3rpHz1zt4F9vtGcK01wXytToKZa2wMaD0ELdBLPfLaj64y03t7loRNQ21BeWh wvfZW4uZIJcu4hd1gfcZ+x812xVuTSg0JH4D5u/SV4MOQdsJH3yIffWs8uzgfhYZty2PKDf4MCgJU m9t3CH/Bj1eV5qvBjzQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhRU-007kSg-2c; Wed, 25 Jan 2023 15:12:04 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhQa-007k3Y-5Y for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 15:11:09 +0000 Received: by mail-wm1-x336.google.com with SMTP id k16so14002166wms.2 for ; Wed, 25 Jan 2023 07:11:05 -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=ahtGBzXJtFuPzd0YkuxCd/KNvneyK5hNhBtxCyDok0bmmfzkA61L1PVcwdXDyYVd8j ZWhDdz9OXQCZ95mAAk3Sw7HS1SA0qZYOJ75si6XBZ85tW70ux8fwL1xmLi5YplYW9z2a PH041UV2DgwwizTC+w20XPFaHaQZUOZiQ9lDUH+jQEaZQptQNcU3Fcl1/0+NDdzMmmte 7mW/hiIyrLN1j7QGBH+wRbNCOmKP3IsrkUnPah1SGSQ3zYxfGUF2EwuSMrCz0DvHj4bu c6Ma6go8K5KIFjNDud9ycHukymznll+Dg9ShlbbSIfTJDCWcvZcman0/qVvK6R3xP87Q c9Qw== 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=454MWDrtoUujiewm0Vymk3ZEdDI/MKRXYXvYPyNFoRAMMZdyCHcya+QrGxgycVUWG3 NUCpCtG+X+J028IPG0TZN+q3NDcjnURiR6De9xTPHs1n1pbxtPZg0BnIuHHwy064gP/7 CieOZUasgjlWeM0Ve3uG/yAXmk/QlEl/MhyPjbi+kYViIqSChAnYKtKtb/JqKjMPKOG6 nkZbqWVAVxZWysxNWr3WnQWhHN4LM33Y+dkQCbzutooujUIyuP2UtYoThdAqAVL/Pqgi X+Y87cd3HL4p6DcVdysflYlx7omU7Ai9g3axy5neJ5Yc0u9d4ZcYSWFMWnPvw2SZ5a5X iOgw== X-Gm-Message-State: AFqh2krttsgZkqe4FOTN71AX87VQL1ik2n0sMNBeJ8zHcTdgWLk9Gv2j p2rXjmmGGuR6m7VB/PFsPSA= X-Google-Smtp-Source: AMrXdXvTpleKmDKo3XRUkgwFgruiRcTXHdOiIS+BOchozQho/sHJzli4AG0NzfGbY3k3fda9lkwFoQ== X-Received: by 2002:a05:600c:310e:b0:3db:eb0:6f6 with SMTP id g14-20020a05600c310e00b003db0eb006f6mr28834474wmo.13.1674659464119; Wed, 25 Jan 2023 07:11:04 -0800 (PST) Received: from localhost ([82.222.96.52]) by smtp.gmail.com with UTF8SMTPSA id t19-20020a1c7713000000b003c71358a42dsm2528563wmi.18.2023.01.25.07.11.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 07:11:03 -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: Wed, 25 Jan 2023 18:10:37 +0300 Message-Id: <20230125151041.55483-2-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230125151041.55483-1-fnkl.kernel@gmail.com> References: <20230125151041.55483-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-20230125_071108_244241_2F9AD1E7 X-CRM114-Status: GOOD ( 13.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 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 Wed Jan 25 15:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13115781 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 33EDCC54E94 for ; Wed, 25 Jan 2023 15:13:39 +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=xgqQTM1TC+aAcp 1YrTyFYVVdj7GssPIP5yUrg87G3uWDO926PfHCqefINtm9yj2snGWAW6tWTZVgDLJCQS4nHz1MhX+ B3ZOt4yzV6BsIFH/0+NXUqlkizYxcBiF4wtXHVXiWA/AwHHUrhNLbBm+Qi3VN6vFdPn64/cpABYBl 3nq/+aGtK19Mggg9mnH+CXtu9FK84DedaHMvntKlnNCOwUS7RDN9kNtvTjB5rMVJJ5ZFfAMI2jAi8 tyIEFm4CfonBJJfwkMnWR5l+BqgO3SQPukHdzW1UCuyLi9DFVuDCjDt5GAQyZPemxKMINw8YPolO3 EZBo/XZ3uekcydlAnulw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhS3-007ket-9s; Wed, 25 Jan 2023 15:12:39 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhQb-007k4j-Fi for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 15:11:11 +0000 Received: by mail-wr1-x434.google.com with SMTP id n7so17359181wrx.5 for ; Wed, 25 Jan 2023 07:11:09 -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=lXbGlhq05uJS0Pyf8RfesexY78MgfQw+69VaRAoGa4nEy8L+Y4SUx1b55gVjEC6G5L +4dml6/S25KghUBYj7cMpgir6NK+U+lJvLGZbXN809PWdp5jcOx63Xb+3YGerofmtXo+ c9NTE67Z896DDSmoM9iD/gAnDh2kpm2veFmUG1P7km1MjImMhd7GYKd5QB+IuFirGD9g XYtqrk3OhmHmMygk/1KcH7Qh3S2q+Wum2k4Z3ABicmdVHqaUazxUMpfAd30ViU8zLPvU 62uMpnEePNpM7l1w4dlAkHXENn4dKjUJs1hA+qfNLs0eQ7mZ5/bVwiR+qGs0sA60pVvJ METg== 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=C9Szsv3E2giAgvBfQM850JtCdIJK0vRZkP708RAqpmBdztwYXrN5JnloLpzxkAvQ1l Wit8hlfZ6G7KvCfMMWF78vxszML7tZOEk6ovQvPGbtYzDchS4JdG1cglAbYNb6LiBDa8 EIPtyVthL/bTiuEqI8HUQqBW8Wp9eGRnxPsOMjmZPvY3sXvDsTKGbAZZOf0Xexk+VMzU mh6ddxQwJp7/tEdqXOchOfb2ULKVIT6tNQugddR2aGI2Ijkn4Rajr2l3tzBwUtiBSvW6 jgY341tkJuNKyO9wheqgM+l5hNSPCrhirEMl7NTWA5EgsB40h1aLW3MslaM1ziUQ8tpq c5ag== X-Gm-Message-State: AO0yUKXtE3Cpjz5C8H94d5SfwHzANnCo2Q+JpskSZTDAzZ51pvh5bkPr j35v7Hs3lY6S0UwEhUVW7Dc= X-Google-Smtp-Source: AK7set/wtbF3+5CCefTbcW6nAY8InllI2YFh1DVZbqqQkvI4VGT9t6jAS5+ZerrcllKE4BSArSFDnw== X-Received: by 2002:a5d:6e05:0:b0:2bf:b92b:8a8a with SMTP id h5-20020a5d6e05000000b002bfb92b8a8amr2340757wrz.7.1674659467800; Wed, 25 Jan 2023 07:11:07 -0800 (PST) Received: from localhost ([82.222.96.52]) by smtp.gmail.com with UTF8SMTPSA id l14-20020a5d410e000000b002bdd8f12effsm4534513wrp.30.2023.01.25.07.11.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 07:11:06 -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: Wed, 25 Jan 2023 18:10:38 +0300 Message-Id: <20230125151041.55483-3-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230125151041.55483-1-fnkl.kernel@gmail.com> References: <20230125151041.55483-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-20230125_071109_565765_33213092 X-CRM114-Status: GOOD ( 28.47 ) 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 | 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 Wed Jan 25 15:10: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: 13115782 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 A110EC27C76 for ; Wed, 25 Jan 2023 15:13:54 +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=q9dZkC45Oo7aoy 7PA3PmEuP7Rosgl/D/4DjKNq4JFM8KIIx1/11ewi8nopFaGgcxPHyqsuIi/AVmZgSGovqotXg8D5U S1XUWPtB/RgNckUlYJTSG6VLSSeWVEDr+I4RSP9URGHr14BOSp60jndwWC107vFHAWBEAZtFkqfnx 6AoHiLCNDBR3rNsnIZlYKaC0hmclMGcTFOJ/1Z1QlIYEgze0JqzpjZhzVUx/G8U41zRLgkUcTfMhw xf/nidcUcjkqJTftPLeCUSrVkLAekGbgt75J0vzedCu/g09V4FZWVgsGAP1Itx1fFYMbYumfOUW8X 4Z4/PbuEjm25FyZVqN5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhSG-007kjv-BP; Wed, 25 Jan 2023 15:12:52 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhQf-007k5p-OW for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 15:11:15 +0000 Received: by mail-wr1-x435.google.com with SMTP id y1so12884301wru.2 for ; Wed, 25 Jan 2023 07:11:11 -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=GzphiZhuHao9jPC9vjQFPlzT9IJrCylsU+4m3KXtOX00+BmO5IRM1GSRoAugm694zR 93SM/T/Tze+uTscTLgK2IEFkLvPHUWkwtdLa5wnVYhrA9N4y+CW7OiD06zf3ckv9VWNF gpiFPVIqUkfz6ujLO5vRasiZNQv7Krd3rQaxtpOd9rGYO6cbpbwz+YNxR3sRUbZMtclw lsc/8ATNTLld2Z2U175ps/mp3HSM/987iDnnXgoDGcJJtpGLXc05FpN0Y870m8Rxb3VT kPm1q/2YIUFsE45dSU3Sk9huw55o2VlWtt7mqwTJ57gKMMRVAfcTzIUOjIDhN7E/THXr h/6Q== 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=A7DHYpnTlOUngiX391s6fOyKX/g19NfnKkk1iKNDp/uwcmFcYttZImzTCFJAX7MD+y XnCbKFFZvoBNja74o/Yo5lcEffRM0eB1jlaEaUS0xVDyWVBn64DF/kcl8urh5tVcWLqd +I5GQqlGFZTi068z1zirpBC46rtRRRdO8AAltpazpe3ZPtP4mD+dpynHXVRQjn00xif6 KiEUuTr52rTGmcSH27fxE+DhLmXsZQ6b1jVHMMDFJdkROI6nU5CpPqIgFffOw+2Y3dzE ByvDeCBW2WapO9MDLed8im52kN23M8p56pSaQ1VHtmQb2ZQgzDiVpxVi1kKaV6/1aIAv 8pwA== X-Gm-Message-State: AFqh2kpEbPKdLQt7qQxyTlY0tJpXHwcNRNvV9JzKo05YYa0X/NiOZArm F5dY352w8Jb6hNzH8LglG3I= X-Google-Smtp-Source: AMrXdXsCJOUQOjCBEGo9t9JRbe1DNwBYlQw2Rgo557yI4jIZI9Y+nSYoPF2LjDtzy3XZEkdvsqX0Rw== X-Received: by 2002:adf:e9d2:0:b0:2bd:dca8:a4b with SMTP id l18-20020adfe9d2000000b002bddca80a4bmr27598619wrn.63.1674659469853; Wed, 25 Jan 2023 07:11:09 -0800 (PST) Received: from localhost ([82.222.96.52]) by smtp.gmail.com with UTF8SMTPSA id a17-20020a5d53d1000000b0024274a5db0asm4739095wrw.2.2023.01.25.07.11.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 07:11:09 -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: Wed, 25 Jan 2023 18:10:39 +0300 Message-Id: <20230125151041.55483-4-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230125151041.55483-1-fnkl.kernel@gmail.com> References: <20230125151041.55483-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-20230125_071113_855006_BD1A07AC X-CRM114-Status: GOOD ( 11.21 ) 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 Wed Jan 25 15:10:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Finkelstein X-Patchwork-Id: 13115783 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 C30D4C27C76 for ; Wed, 25 Jan 2023 15:14:24 +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=wpS2hLc71Xtnhh 0nYX/fJeo1kb4aqo6/O9qVkAgiDnRFJwEQhYMeD2k8etXt+4BrCDWM49D4bITdkxAfmJJgYSVAe1h xvf+5UL1E/hJ4rjSD6w4X2DjwLMFxtD9q7nL8T7CsMZco3a5l8cz1e8tJgzyNyKiucNhOkDOw0Phf wWUz4CSelV9SjdrpMQb9RlOzmZPtw7EcW56B4ITEx7VS2NMZflZeie6gvlRFGErOSEStkbG3Q+JxY tMltAvuoINL6d3/qK2poANjdBKFJkYWfyj38G43nydGaUFIFrR74WoOBoEs/gDwUVqx1D2QW4xVKy EJBT94qPRNxD3+h8u45g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhSh-007kw2-OX; Wed, 25 Jan 2023 15:13:20 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhQh-007k7C-Q6 for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 15:11:17 +0000 Received: by mail-wr1-x431.google.com with SMTP id h12so13378209wrv.10 for ; Wed, 25 Jan 2023 07:11:13 -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=CtGwkl+IS46rp3qQgGyErQWm/hgEB6SyCGQkoL1x+tBLynIrmC7mEtQgDewk4s45Tx HzrwbYIx3LH+JJhQmpwBYvSKaHQ5bTcoMeYGkHdek5p9vGBkgF/SRw8oKYNTHb0kQcV/ DNdar1mAUffK1FG/eh6TsGdscVDdaGEHF/ZkP0ByjX1yDgkKTd9nqCts9tmH/nv1ADL1 JbZXQnnBt5VeJPTeIa2xQqxjDvOa03K3iwOUXZfLNKIjldQ0Z1kl+vmWz65QDiS1q7C9 bUN+1F5AaXjddy9O61D4zWUQL03JteKpoI/aN6rK3t4LvNmE0arodkP7iwVIcLrqdcz2 IYCw== 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=c7lH2CfFQ3WFQn84vcw9FK1oAMWFLp5Cyrkj13FrmHggza/VJdoWmc0z5MjnABQXdw kRT6wYl4Oc6bhwGZjNvlDe24djmUYxCL00cLFAzUKxTz9yB/P48KpOKAeyKXqb/e/PGr NWQuxy7uEeoFJ5HzYAPdHQMRpYh8n97Ar1uTAi3lw5vLb4TkntEYsEIp/RDgcTTQggqs KF2vXT3AlVHaRmXLX6UyPIzJqSexhNcUS5y/RUte5KLhfypPouYNeFrTE7nOReThjD4N FU73JbUiZ4suSp8IGO3t14cIiseXqjuhC1og9SATvxVe7BnW8Fe7CGberYczfwWyBSl8 1maA== X-Gm-Message-State: AFqh2ko6FfWY246XKr3QS6NDhxPU1jVTxun4PmwI9Q/iboGoo92DlJa4 IV0QVnrfUQ4AGWa4ewYbagU= X-Google-Smtp-Source: AMrXdXuMkOQtZcZ4+FN91hG07gKC0iqbiy2giQLh12TtWsSBclabn/wzC+MMIA1i0c6/GJZ1lWA1mA== X-Received: by 2002:adf:eec6:0:b0:2be:57b9:f569 with SMTP id a6-20020adfeec6000000b002be57b9f569mr17246547wrp.23.1674659471989; Wed, 25 Jan 2023 07:11:11 -0800 (PST) Received: from localhost ([82.222.96.52]) by smtp.gmail.com with UTF8SMTPSA id t9-20020adff049000000b002bddaea7a0bsm4672475wro.57.2023.01.25.07.11.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 07:11:11 -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: Wed, 25 Jan 2023 18:10:40 +0300 Message-Id: <20230125151041.55483-5-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230125151041.55483-1-fnkl.kernel@gmail.com> References: <20230125151041.55483-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-20230125_071115_888177_C76E4C29 X-CRM114-Status: GOOD ( 10.02 ) 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 Wed Jan 25 15:10: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: 13115784 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 6DC73C27C76 for ; Wed, 25 Jan 2023 15:14:58 +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=mYldEPhuRDNPSw ttYCcTcDhvuW2X0OBNUKtqr8fV9il1dXTs2PyyJ2RZFEa6HD7wZZgxnB/9P5XSZ2saN4+h89AA4Df fiqlTU5czDgZuH5YP/jBu/Lb39an5Q0FWrRfCYqt2RZTETTYdw0+xasrFQtH5VqbW3FGvgPiLUHJu Am7jjzoSNLAWrfBMawU68oPYKF1S6FcwXSKbsnkea8FS9AtT1rhi1VEuf/WrSRh2UiwyyVZJtmM9g UirgmWZu1bjQqA6euphc5itMMQEXdUGSQFRIENOMCgEuw/sFQ4f+7uuYFJidq5czCQgfRjvdrjIVm o4Uh9b2MGqyzHkR16JoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhTC-007lB4-2b; Wed, 25 Jan 2023 15:13:50 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKhQk-007k7w-7v for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 15:11:19 +0000 Received: by mail-wm1-x32b.google.com with SMTP id l41-20020a05600c1d2900b003daf986faaeso1517846wms.3 for ; Wed, 25 Jan 2023 07:11: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=BRnb5DYVXtWCtvc3qdQxtfQDSxjmp+yfOM2pXEVaEXc37OixGwC1jFBPFhmKTx4PoM cphL1s7CofBvz5JRbnWE6RQqU6B4RL5Umhs+nBBVGb+ijp8jDNNvX5ik1SUFv9XCg1BF nuNwfWqorONjLl4u53U774sFsM/0aCGUxeRaILHFFBh5SbBGYExmc/Lk52S9RAgt7m4z 5H8oQszL77/msmmj8xT9qURuXzeNvUYbdIqW4wgm4N3ci2pRXIOfanmDlu3loqIzIEzs wXoD8IBN/nCKqB1owFuvw267FFffKotZDSwEPcp1M49ubhfphBeY+axb5FSCnGPNSZyn eycg== 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=nipz5wf+wPpA5CxRbcuxvgd9Lwqo8nHpG9nR9nSB0SvQu8xK7vONNlDyzrwMStprmT dBKNalLNfdzI+JuZ2lRBvnZnAHxR4UjWtVLA1gp8qEyCpNd9PzMLlxZzwCfhxWPpmXBS EGnYXwJsEB/+mvsjYQH4wdFRE6z4H+enx2s6y8+xSE1fwQ5ma9HuyIJ79g4zqCGILANl +kjESVGU1McD32VDroUmoEPuxqlVphHmixDTigpI4ZswKgh0n49r4HsAfQB4Ef3KaLxL Z0fWfKS6ENVhQqjJzcUVzMRkPfDueXRM3gVQC3P0E2MXTKWpORB12Kqg4jla7tfV6+Nd hLPA== X-Gm-Message-State: AFqh2kot9v0kNvva8jBGpXfipCD15/KV9VNkgG74yTRXjPoWqoAYQMyZ NkOQLZq6froo6G61z1UAdFY= X-Google-Smtp-Source: AMrXdXsVMi89xiI+4LxZntiDgxj2YfyHgKghAGbA2sAo4gVujJ7zwlCxsirbMUpVHQC35a6Lk+uuNA== X-Received: by 2002:a05:600c:1d22:b0:3d9:6bc3:b8b9 with SMTP id l34-20020a05600c1d2200b003d96bc3b8b9mr32542581wms.9.1674659474298; Wed, 25 Jan 2023 07:11:14 -0800 (PST) Received: from localhost ([82.222.96.52]) by smtp.gmail.com with UTF8SMTPSA id f39-20020a05600c492700b003dc0cb5e3f1sm2003392wmp.46.2023.01.25.07.11.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jan 2023 07:11:13 -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: Wed, 25 Jan 2023 18:10:41 +0300 Message-Id: <20230125151041.55483-6-fnkl.kernel@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230125151041.55483-1-fnkl.kernel@gmail.com> References: <20230125151041.55483-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-20230125_071118_325205_33D34BC6 X-CRM114-Status: GOOD ( 10.69 ) 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