Message ID | 20240228133236.748225-1-dima.fedrau@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-85096-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3346980dyb; Wed, 28 Feb 2024 05:33:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV2w+7tJq2f71NjD+yoh2OTaz+Qby7w1hNcg5eX/8B/1gizHouYfQfXI9048ytD5zOC6wzqSJM/Fy9AxN/GNUPpiYYPng== X-Google-Smtp-Source: AGHT+IHgRccDxLNh5v4T+ZNzFpNYGMa7K6VArBXuFppIaKUbE8KjrUCIsaqtSWgT7NMl7taElM9Y X-Received: by 2002:a05:620a:3903:b0:787:8ed8:f2aa with SMTP id qr3-20020a05620a390300b007878ed8f2aamr5920794qkn.35.1709127185010; Wed, 28 Feb 2024 05:33:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709127184; cv=pass; d=google.com; s=arc-20160816; b=U8ZD/Yk3aXp9J5Czjd7LhKOAnIBeK2tYSGWLpBlFGPD4OCKwvHJtbEBy2JurFK83hd TTUgHwP437dM4p/TZSWNM6m/aCeh8lmjizY4A64j+hYk2r1x+tnuKKkxPndAiNxjUTEc eGkCTOkmsysxAVClfVbQ1cTtGvwlwNm5itjzmmerO2gzx2rIJDL+F0EC7D7RnWVWBC8y e+4LRbwlPvmN36WOc/Iu+4EZydP6DDMCCe8kD/2GZyVMdXdzGH2enyb3Jrhzqlcwz+GI E//Fu8jDG/rNzYVD75qRLwduWKsXkrF7A52rRX3BlcywXyB3nBPIu67V8Du1cl+JAngf ZPaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=SGffkzKw9aWjyaI9NbO+R8+MY5GFHI3Uh82PpzNp7MM=; fh=veft7aWgWCYPuWsXyhk81cwTiS8HD08QXM4vvq5Q+z0=; b=Rz370vix0XUcGr7mwpElk3bhkwkbyRwQr3azp8YJr++8eeYQbtq2LZzk97TgRoudSU xBTmsa/6/Y5c3989V5KKBGPT4G/OkwfV4sm+8FIrUDBLOpAJqLuNp4zQqycfVootuaQN wNlt9TSaopEsO/k7CZ+GZZDu3FiI2Ml9v4k1BZgNZrJ5CaIWCjdjHoghOujOyi24AFMR dGjpzbHaK2U/teOlwUqfmWP6FPLHjax4mg/qvzMp1yjeiMv+18oSIUDk/Xm8lOoJ0Ci0 QhAy6lBdNaRsjZS9oIPWpvE5mTI9RgPW23rBanmnwu+iLRAlHQu7O2xvhtsEnMbGFYCk mptA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LVFKWhz5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-85096-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85096-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w5-20020a05620a094500b00787de90a0basi4788994qkw.345.2024.02.28.05.33.04 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 05:33:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85096-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LVFKWhz5; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-85096-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85096-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C7E921C22FA0 for <ouuuleilei@gmail.com>; Wed, 28 Feb 2024 13:33:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EF2714EFC8; Wed, 28 Feb 2024 13:32:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LVFKWhz5" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A39B73508; Wed, 28 Feb 2024 13:32:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709127171; cv=none; b=Pk86fr8XCnZ4tmgsQXXv090DH7KAaeAdpGXOTTwu0LCkEzsQwxNLbqmHFuqcamhAtTqwUJlRRMJNMCagK33hzlDXQgxsFxKHef9dCfy8DQSsR1tHzT5ktenwDRtnz14rI3jRilGSWeP1yswU7UnJcR6s4ovApDoFuceroBn+MJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709127171; c=relaxed/simple; bh=Lby5HVffdFeSTS3gB0WIyrCXbyHZBM8gbK0CvSpYeWA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=myBxf4aI/35elz+s/shdw0cDP4aymybRFYfLn4cjvOgLFpZStHnG8B8GL9oK6k5059pCsAr1DchICeEoKxnybkiwr/FK15hb1F8E9kxgZo1KCubLkv/bYdVcVrdQxAeHdns5zSpLdBbz/PjcYB8OIx5x4atduk3f9bnHsYJYaGg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LVFKWhz5; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a3e706f50beso692900666b.0; Wed, 28 Feb 2024 05:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709127168; x=1709731968; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SGffkzKw9aWjyaI9NbO+R8+MY5GFHI3Uh82PpzNp7MM=; b=LVFKWhz5RuGHRXZbmhnKmS/oJ3YlHR6a4RjqZBpBiNZ1V1xhlZm8WUcEipdKsvli91 B0KQ0Yw4GjUS2bvvHAhnfj+ODCe46jR8+IboHFXrDsA93A9PH80OugO0mTerbL2CzEEU 2TyuCzPKjoWc9cZLwyUGpTMTIpUMT6k4SFVx3WKUo1scBu1PQoqavgbd7zBWmLuhwGsO KqYPncYCX5y6GNQnTQscNCF+yn3TXaaNkZKyzbMDeBch3lv5NjLRuETWTWkIym6FIJmu pXuLrt3FLfOaqUWjyUF+/FT0lPBDORnN9MOuL7fQ6luFTXmIF7uqYzMU8wlSRZu+XYrb kJLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709127168; x=1709731968; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SGffkzKw9aWjyaI9NbO+R8+MY5GFHI3Uh82PpzNp7MM=; b=RMyjAtV3TVm35Onok7fSbr3pd44aX8URYlUVH1zAljitMrqlPt6H1RcPvw8rJAP7Ez PHHxCLtkMNKKqagGn3Q9yTdYl0WdrLMoa0dRcs02ApK/sikF0zEfz8X3Ra3yeUJkg843 6Q1kmCE+ZadZWTgL5GIwC+SQ9bvv4r3l9DLHTYHaXLfzKdnrvcLYFYOFnPPpgCOdxWRK J8DFKa7TJbRgVEh8FgflOuYLg9WJJ+pU2jB5ne44r9SUa9g3PR9e8lx4EkzATniT+d8b /I0G8i6ysjFvjiefv5UR0CuRJtoeCLg7jY1kFDEOilr/lM7s6XtsZmky6rtrg8Wq0jZf k9vA== X-Forwarded-Encrypted: i=1; AJvYcCX/PW9n0Y9UPgXv41a/HqlfXFtnGYfZFt95AsoQuVB+81hK5baHeY7uWmRAXBfGNPX9YfKPUo7BeF6mLsRcXdMPalJb3WVO/IDfDG0XJK/koq69a30D1YwMuIAQIA/dwRYpHD/iJy+q X-Gm-Message-State: AOJu0YyMDwtqrdMFO7jN9ptqP3suGaPoz/3wyPk4aON6v2rnM5aG6K0+ 2eBoLj7Wpw0QbNs7/dgmHaq7PHM0UKt+/N44m4Ead/FqTmk057Zg X-Received: by 2002:a17:906:191a:b0:a43:fac5:8e87 with SMTP id a26-20020a170906191a00b00a43fac58e87mr1250562eje.65.1709127168409; Wed, 28 Feb 2024 05:32:48 -0800 (PST) Received: from debian.fritz.box ([93.184.186.109]) by smtp.gmail.com with ESMTPSA id vx5-20020a170907a78500b00a3f20a8d2f6sm1856952ejc.112.2024.02.28.05.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 05:32:47 -0800 (PST) From: Dimitri Fedrau <dima.fedrau@gmail.com> To: Cc: Dimitri Fedrau <dima.fedrau@gmail.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Subject: [PATCH 0/3] pwm: add support for NXPs high-side switch MC33XS2410 Date: Wed, 28 Feb 2024 14:32:32 +0100 Message-Id: <20240228133236.748225-1-dima.fedrau@gmail.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792149747286183303 X-GMAIL-MSGID: 1792149747286183303 |
Series |
pwm: add support for NXPs high-side switch MC33XS2410
|
|
Message
Dimitri Fedrau
Feb. 28, 2024, 1:32 p.m. UTC
The MC33XS2410 is a four channel high-side switch. Featuring advanced monitoring and control function, the device is operational from 3.0 V to 60 V. The device is controlled by SPI port for configuration. Dimitri Fedrau (3): dt-bindings: pwm: add support for MC33XS2410 pwm: add support for NXPs high-side switch MC33XS2410 pwm: mc33xs2410: add support for direct inputs .../bindings/pwm/nxp,mc33xs2410.yaml | 105 +++++ drivers/pwm/Kconfig | 12 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-mc33xs2410.c | 418 ++++++++++++++++++ 4 files changed, 536 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml create mode 100644 drivers/pwm/pwm-mc33xs2410.c
Comments
On 28/02/2024 14:32, Dimitri Fedrau wrote: > Adding documentation for MC33XS2410 pwm driver. Driver as Linux driver? If so, please rephrase to describe hardware. > > Signed-off-by: Dimitri Fedrau <dima.fedrau@gmail.com> > --- > .../bindings/pwm/nxp,mc33xs2410.yaml | 105 ++++++++++++++++++ > 1 file changed, 105 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml > > diff --git a/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml b/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml > new file mode 100644 > index 000000000000..bd387dbe69be > --- /dev/null > +++ b/Documentation/devicetree/bindings/pwm/nxp,mc33xs2410.yaml > @@ -0,0 +1,105 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pwm/nxp,mc33xs2410.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MC33XS2410 PWM driver Driver as Linux driver? If so, please rephrase to describe hardware. > + > +maintainers: > + - Dimitri Fedrau <dima.fedrau@gmail.com> > + > +allOf: > + - $ref: pwm.yaml# > + - $ref: /schemas/spi/spi-peripheral-props.yaml# > + > +properties: > + compatible: > + const: nxp,mc33xs2410 > + > + reg: > + maxItems: 1 > + > + spi-max-frequency: > + maximum: 10000000 > + > + spi-cpha: true > + > + spi-cs-setup-delay-ns: > + minimum: 100 > + default: 100 > + > + spi-cs-hold-delay-ns: > + minimum: 10 > + default: 10 > + > + spi-cs-inactive-delay-ns: > + minimum: 300 > + default: 300 > + > + reset-gpios: > + description: > + GPIO connected to the active low reset pin. > + maxItems: 1 > + > + "#pwm-cells": > + const: 3 > + > + pwms: > + description: > + Direct inputs(di0-3) are used to directly turn-on or turn-off the > + outputs. The external PWM clock can be used if the internal clock > + doesn't meet timing requirements. pwm is input for pwm? > + maxItems: 5 > + > + pwm-names: > + items: > + - const: di0 > + - const: di1 > + - const: di2 > + - const: di3 > + - const: ext_clk Aren't these clocks? > + > + vdd-supply: > + description: > + Logic supply voltage > + > + vspi-supply: > + description: > + Supply voltage for SPI > + > + vpwr-supply: > + description: > + Power switch supply > + > + interrupts: > + maxItems: 1 > + > +required: > + - compatible > + - reg > + > +additionalProperties: false Instead: unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/gpio/gpio.h> > + spi { > + #address-cells = <1>; > + #size-cells = <0>; > + > + pwm@0 { > + compatible = "nxp,mc33xs2410"; > + reg = <0x0>; > + spi-max-frequency = <4000000>; > + spi-cpha; > + spi-cs-setup-delay-ns = <100>; > + spi-cs-hold-delay-ns = <10>; > + spi-cs-inactive-delay-ns = <300>; > + reset-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>; > + #pwm-cells = <3>; Make example complete, so provide all properties, like interrupts, pwms and whatever you have in the binding. Best regards, Krzysztof
On 28/02/2024 16:41, Dimitri Fedrau wrote: >>> + maxItems: 5 >>> + >>> + pwm-names: >>> + items: >>> + - const: di0 >>> + - const: di1 >>> + - const: di2 >>> + - const: di3 >>> + - const: ext_clk >> >> Aren't these clocks? >> > di0-3 are PWM input signals which are translated to output voltage "vpwr". > ext_clk is described as PWM clock in the datasheet. Didn't used it, just > mentioned it here for completeness. Then it looks more like a clock, so clocks: property. >>> + >>> + vdd-supply: >>> + description: >>> + Logic supply voltage >>> + Best regards, Krzysztof