Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp746868rdb; Fri, 17 Nov 2023 11:23:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuMV3+SpHsc6ekyUiwQbrAgZzScYKES5z/klcAA2TK1eTAQ96jhHwq+Y7fYkM0IY13qVNE X-Received: by 2002:a17:902:eb53:b0:1cc:7af4:d12c with SMTP id i19-20020a170902eb5300b001cc7af4d12cmr625799pli.62.1700249031783; Fri, 17 Nov 2023 11:23:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700249031; cv=none; d=google.com; s=arc-20160816; b=jbT3cQjlG7SSZ1deoK+yIW0QnA8dkzlaq3XFy0AtAMNsq0ReRyZ1f5GgYoU/H8XxBz y6ckavNXM64ZaFblNLPgfIdj+XnQXJ4/u+XdacN0F1U/Ssdm0U7aj0KmLM8u0/lMpL6A vFlfPLFKajeLLDEkSumLe8KYuaIXFBl/YuBTtXxilZhG1MSDYs1FV2jli5ssn8Lwxzcv q88WVuIxg1e2ELCRfJL/e1mfISX3nA6OTJ4WDkqcv08RpkRUuEkEI+IBFO+0HsvHLuZK 3LoJ/QMddoVb/DhGmDiftL9dVMcdzKIwyoNlsk/pmLcYQTsaweSycn4m8UbEmj6spbSx VoTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dndM9CSaUrzf366top9G6KiXa5Ksl0jeddaouE+fXLc=; fh=6mSjKzypCXWzOqYZWBJgjlCFqECeLbAEnZFcfdVhmdI=; b=iLYwhEKQIEDMf3M7shYDjEsm1PT6mPm8yqzSii1mCBCbEdT6bxJzm5Tpj/gIQRm8xy I7oGawSmbknuUygFdkeivRRwBcq9KsJhi6EEZzP0nC88nL7SN4/yc15HxsJ2cdju9wIk JcjmV5/SYYibbkcEDEaduEY0gPbj4LdPMHNeKyRYGEgcaqRItunMv1if9Ywl9vle2VS/ IIa72sYQqc/nLlArKCdxb4b0GBmtbe6++zauHakLhqhzPY60bp8ey1K4jXEWKzxq6ETT znlzxSCw8EG8bHyoS9QZmwWGq6KmDi6sgdd0baH2y8JUCQ3BzOXKmKWc82UeCI7EBhU1 QrXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b=eWcPjy6o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=subdimension.ro Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id h9-20020a170902748900b001b86ddfd49bsi2332179pll.6.2023.11.17.11.23.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 11:23:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@subdimension.ro header.s=skycaves header.b=eWcPjy6o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=subdimension.ro Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 34F7F81EB0CA; Fri, 17 Nov 2023 11:23:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231857AbjKQTX3 (ORCPT + 99 others); Fri, 17 Nov 2023 14:23:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjKQTX2 (ORCPT ); Fri, 17 Nov 2023 14:23:28 -0500 Received: from mail.subdimension.ro (skycaves.subdimension.ro [172.104.132.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35D09D4B; Fri, 17 Nov 2023 11:23:24 -0800 (PST) Received: from localhost.localdomain (unknown [188.24.94.216]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail.subdimension.ro (Postfix) with ESMTPSA id 89D6A28F040; Fri, 17 Nov 2023 19:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=subdimension.ro; s=skycaves; t=1700249002; bh=WwNgEfUL7AsMa3dejpCXesMzNmnY3tanbmMGBdRVRRk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eWcPjy6oa2wGm6i6YN7h+qOwT4PpafXPQXgnBF2A+XfsBzlnHgc7h3NCdY/bdKoZX /R9NJN84MxcfzNqHZ2aKpnxWI7lGANPkPXTzVIAl4F1U3+4h+/kerutPTfR7O0RXNM TIa0Taqp7OuUGUFK9nl147Fdv2c5JXhsEi2U3SJU= From: Petre Rodan To: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org Cc: Petre Rodan , Conor Dooley , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , linux-kernel-mentees@lists.linuxfoundation.org, Jonathan Cameron Subject: [PATCH v2 1/2] dt-bindings: iio: pressure: add honeywell,hsc030 Date: Fri, 17 Nov 2023 21:22:57 +0200 Message-ID: <20231117192305.17612-1-petre.rodan@subdimension.ro> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231117164232.8474-1-petre.rodan@subdimension.ro> References: <20231117164232.8474-1-petre.rodan@subdimension.ro> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 17 Nov 2023 11:23:48 -0800 (PST) Adds binding for digital Honeywell TruStability HSC and SSC series pressure and temperature sensors. Datasheet: [HSC] https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf [SSC] https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-ssc-series/documents/sps-siot-trustability-ssc-series-standard-accuracy-board-mount-pressure-sensors-50099533-a-en-ciid-151134.pdf Signed-off-by: Petre Rodan --- Changes for v2: - Removed redundant quotations reported by robh's bot - Fixed yamllint warnings I'm failing to run 'make DT_CHECKER_FLAGS=-m dt_binding_check' due to python errors and exceptions --- .../iio/pressure/honeywell,hsc030pa.yaml | 156 ++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml diff --git a/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml new file mode 100644 index 000000000000..c7e5d3bd5ef4 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/pressure/honeywell,hsc030pa.yaml @@ -0,0 +1,156 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/pressure/honeywell,hsc030pa.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Honeywell TruStability HSC and SSC pressure sensor families + +description: | + support for Honeywell TruStability HSC and SSC digital pressure sensor + families. + + These sensors have either an I2C, an SPI or an analog interface. Only the + digital versions are supported by this driver. + + There are 118 models with different pressure ranges available in each family. + The vendor calls them "HSC series" and "SSC series". All of them have an + identical programming model but differ in pressure range, unit and transfer + function. + + To support different models one need to specify the pressure range as well as + the transfer function. Pressure range can either be provided via range_str or + in case it's a custom chip via numerical range limits converted to pascals. + + The transfer function defines the ranges of raw conversion values delivered + by the sensor. pmin-pascal and pmax-pascal corespond to the minimum and + maximum pressure that can be measured. + + Specifications about the devices can be found at: + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf + https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-ssc-series/documents/sps-siot-trustability-ssc-series-standard-accuracy-board-mount-pressure-sensors-50099533-a-en-ciid-151134.pdf + +maintainers: + - Petre Rodan + +properties: + compatible: + enum: + - honeywell,hsc + - honeywell,ssc + + reg: + maxItems: 1 + + honeywell,transfer-function: + description: | + Transfer function which defines the range of valid values delivered by + the sensor. + 0 - A, 10% to 90% of 2^14 + 1 - B, 5% to 95% of 2^14 + 2 - C, 5% to 85% of 2^14 + 3 - F, 4% to 94% of 2^14 + $ref: /schemas/types.yaml#/definitions/uint32 + + honeywell,range_str: + description: | + Five character string that defines "pressure range, unit and type" + as part of the device nomenclature. In the unlikely case of a custom + chip, set to "NA" and provide honeywell,pmin-pascal honeywell,pmax-pascal + enum: [001BA, 1.6BA, 2.5BA, 004BA, 006BA, 010BA, 1.6MD, 2.5MD, 004MD, + 006MD, 010MD, 016MD, 025MD, 040MD, 060MD, 100MD, 160MD, 250MD, + 400MD, 600MD, 001BD, 1.6BD, 2.5BD, 004BD, 2.5MG, 004MG, 006MG, + 010MG, 016MG, 025MG, 040MG, 060MG, 100MG, 160MG, 250MG, 400MG, + 600MG, 001BG, 1.6BG, 2.5BG, 004BG, 006BG, 010BG, 100KA, 160KA, + 250KA, 400KA, 600KA, 001GA, 160LD, 250LD, 400LD, 600LD, 001KD, + 1.6KD, 2.5KD, 004KD, 006KD, 010KD, 016KD, 025KD, 040KD, 060KD, + 100KD, 160KD, 250KD, 400KD, 250LG, 400LG, 600LG, 001KG, 1.6KG, + 2.5KG, 004KG, 006KG, 010KG, 016KG, 025KG, 040KG, 060KG, 100KG, + 160KG, 250KG, 400KG, 600KG, 001GG, 015PA, 030PA, 060PA, 100PA, + 150PA, 0.5ND, 001ND, 002ND, 004ND, 005ND, 010ND, 020ND, 030ND, + 001PD, 005PD, 015PD, 030PD, 060PD, 001NG, 002NG, 004NG, 005NG, + 010NG, 020NG, 030NG, 001PG, 005PG, 015PG, 030PG, 060PG, 100PG, + 150PG, NA] + $ref: /schemas/types.yaml#/definitions/string + + honeywell,pmin-pascal: + description: | + Minimum pressure value the sensor can measure in pascal. + To be specified only if honeywell,range_str is set to "NA". + $ref: /schemas/types.yaml#/definitions/int32 + + honeywell,pmax-pascal: + description: | + Maximum pressure value the sensor can measure in pascal. + To be specified only if honeywell,range_str is set to "NA". + $ref: /schemas/types.yaml#/definitions/int32 + + vdd-supply: + description: | + Provide VDD power to the sensor (either 3.3V or 5V depending on the chip). + Optional, activate only if required by the target board. + + spi-max-frequency: + description: SPI clock to be kept between 50 and 800kHz + + clock-frequency: + description: i2c clock to be kept between 100 and 400kHz + +required: + - compatible + - reg + - honeywell,transfer-function + - honeywell,range_str + - clock-frequency + - spi-max-frequency + +additionalProperties: false + +examples: + - | + #include + i2c { + status = "okay"; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + + HSCMRNN030PA2A3@28 { + status = "okay"; + compatible = "honeywell,hsc"; + reg = <0x28>; + + honeywell,transfer-function = <0>; + honeywell,range_str = "030PA"; + }; + }; + + spi { + # note that MOSI is not required by this sensor + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + HSCMLNN100PASA3@0 { + status = "okay"; + compatible = "honeywell,hsc"; + reg = <0>; + spi-max-frequency = <800000>; + + honeywell,transfer-function = <0>; + honeywell,range_str = "100PA"; + }; + + HSC_CUSTOM_CHIP@0 { + status = "okay"; + compatible = "honeywell,hsc"; + reg = <1>; + spi-max-frequency = <800000>; + + honeywell,transfer-function = <0>; + honeywell,range_str = "NA"; + honeywell,pmin-pascal = <0>; + honeywell,pmax-pascal = <206850>; + }; + + }; -- 2.41.0