From patchwork Sun Nov 15 20:57:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 324368 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp2844062ils; Sun, 15 Nov 2020 12:58:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2D/I6T0w09QByopSeISjuny0qvburrXTgo08OZtFj2WvyFsigllrePa3mJmNOmD0+1NK1 X-Received: by 2002:aa7:c313:: with SMTP id l19mr13114363edq.293.1605473905590; Sun, 15 Nov 2020 12:58:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605473905; cv=none; d=google.com; s=arc-20160816; b=awrJIrG/9tyKzbNWkIA91O/UySE+6CfCnZdwtZ/2d6O6J9ES2jRv6bG3Z3cBsm051h UFpNQGsSibcocW/CSK/yqCDzIOTlxwTgvecVUz15sWGr74mVb/tC9RDLOYkiTXTZErlP uPCSHLXYwWln30ROd74Fiz8+dKjpRqr+5uV6H53vLu1wNuj65SYy4/yweP2hjU28AmWK xreTL2xxIVaMDNE7FODuKIBl7hXsSa/r4sG9Kkl8bPG64ak4I4ZnnVn7ml3OWKRkwZZ1 OF3EP72wXpigWzbO8kUwB4TxJE0YQ8XG9IiRRR8Hioz0eoaKCcAqmHBeqn+y70Kp4Psb 2qdQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=rnKSl2qWRJgBLP6TH3NnZE7MB45PnhqQS5bgJdVEwCM=; b=wWU4LPWVWEy1uba4ODpWAiYQD+bZ1WB+U6krBxMyPkAy81m3AWaDNyKdOzsYkc9G5I Fk6yKVRCxEPMqZfcJfUfonQo6o6ScIwfA9ZeB9yIMWW59zUDEo3a5WoDMEjf/RVZc4W4 eFc3vO1GThf06I0wkSVHO75JGuvhl7ChcUG0yB2KsWSS3lyAn5FLcDJqXy+jUwaDF9dv A4bK8KNJ5/Zay3kUNgTxpjaKjvIWLHVhxrYxpT7U+ivJ3WW3xW6PKaEg78asHWa74w8R ClSBwRkjoAjcq42zZFzU0NkVUgcwklaNJ5XjtCHwCSij2WwObNUCIjiJaA+8yOaNq1/8 AUCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmuYY5Cc; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g9si11435061edn.361.2020.11.15.12.58.25; Sun, 15 Nov 2020 12:58:25 -0800 (PST) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XmuYY5Cc; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727517AbgKOU5v (ORCPT + 6 others); Sun, 15 Nov 2020 15:57:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727434AbgKOU5u (ORCPT ); Sun, 15 Nov 2020 15:57:50 -0500 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5646FC0613CF for ; Sun, 15 Nov 2020 12:57:50 -0800 (PST) Received: by mail-lf1-x142.google.com with SMTP id e139so2790355lfd.1 for ; Sun, 15 Nov 2020 12:57:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rnKSl2qWRJgBLP6TH3NnZE7MB45PnhqQS5bgJdVEwCM=; b=XmuYY5Cce3uA3+VhP/7nIKX1vqsNH5OspAPfISjwov42gA8Fxo9SWOEtvc3v7GGfml UNio5RHf7w54jU/Htuh/j2Y4OqQyfzrUJBRgSE3ecEDVPHf26OFd3sMC1jGSQbWN9lXr g3Wb5U865C1Y75f0FS7zmLh+xYm29k0aBvnHKm18QwaAz2wZ6AJqdLuLOiA+lqPzpAup 5JXv5JD0TNIR8cP5vLuZNKuClA5yfYSytlhXvkNk9wGCqnjXrThuEFs6CaIsPoiDI+ZT IUEMAlLaTGiySkNYnAl12mDJtjmdZHjcNYeahUYcAPJONtQUQhKp9rC2XA1xbaWuf021 i6Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rnKSl2qWRJgBLP6TH3NnZE7MB45PnhqQS5bgJdVEwCM=; b=J2pw0wa1hawbwgKGP/h4djpQP/82feQd164jkGd0y0Ok18lWoECbARD68WtjLf2qug efmqDpO2N3gpdcA7PgTQhHttsYRnzXughSz+vLKjGzBkAs6g8izpYHUILVHOmQvldkx5 5KsJ4c0W0A62WZmdxCMG4vdqPDirUqnBRsVGDYlumk06xP/NiMjmTz1VFwY5FyNMOreP uiFY2mtyoTkwcBcmVpRQzYQU/ngNxnwqTN00dBh5a2Q+EXSk6aaxWnWAQ6eZ9bTdczy4 bNJyHnYvbAK3GmJSzDr6iJrjoU5vW6PkG/lFFokWU9GBRJ4m2FpqMAZOQptu5m7Fbr3S OFbg== X-Gm-Message-State: AOAM530lvyx48EE0Z3Z75HzON1ssTwepoSBNXBc5blpvtbkZtLV7rOqR ENH5AfQUOTUB5mfLDVwg1RHtQg== X-Received: by 2002:ac2:52b2:: with SMTP id r18mr4090972lfm.50.1605473868740; Sun, 15 Nov 2020 12:57:48 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id j4sm2458779lfk.275.2020.11.15.12.57.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 12:57:48 -0800 (PST) From: Linus Walleij To: Jonathan Cameron , linux-iio@vger.kernel.org Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Linus Walleij , devicetree@vger.kernel.org Subject: [PATCH 1/3 v3] iio: accel: bmc150-accel: Add DT bindings Date: Sun, 15 Nov 2020 21:57:43 +0100 Message-Id: <20201115205745.618455-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org These accelerometers have bindings used in the kernel and several device trees but no proper bindings documentation. Add it. Also add a compatible for the BMA222 that I am right now adding support for in the driver. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Fix up an include directive in the example to be outside of the I2C node. ChangeLog v1->v2: - Rename to simply bosch,bma255.yaml after one of the common accelerometers. - Specify that the SPI uses a 4-wire interface. - Specify maximum SPI clock frequency to 10MHz. (Checked all the datasheets.) --- .../bindings/iio/accel/bosch,bma255.yaml | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml -- 2.26.2 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml new file mode 100644 index 000000000000..6eef3480ea8f --- /dev/null +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml @@ -0,0 +1,73 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/accel/bosch,bma255.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Bosch BMA255 and Similar Accelerometers + +maintainers: + - Linus Walleij + +description: + 3 axis accelerometers with varying range and I2C or SPI + 4-wire interface. + +properties: + compatible: + enum: + - bosch,bmc150 + - bosch,bmi055 + - bosch,bma255 + - bosch,bma250e + - bosch,bma222 + - bosch,bma222e + - bosch,bma280 + + reg: + maxItems: 1 + + vdd-supply: true + vddio-supply: true + + interrupts: + maxItems: 1 + + mount-matrix: + description: an optional 3x3 mounting rotation matrix. + + spi-max-frequency: + maximum: 10000000 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + accelerometer@8 { + compatible = "bosch,bma222"; + reg = <0x08>; + vddio-supply = <&vddio>; + vdd-supply = <&vdd>; + interrupts = <57 IRQ_TYPE_EDGE_FALLING>; + }; + }; + - | + # include + spi { + #address-cells = <1>; + #size-cells = <0>; + accel@0 { + compatible = "bosch,bma222"; + reg = <0>; + spi-max-frequency = <10000000>; + }; + }; +...