From patchwork Thu Nov 12 21:54:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 324250 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp699453ils; Thu, 12 Nov 2020 13:55:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJy8QizDtccGblGt4naYFHQFUdkXY1dyScv7fCmsduJaF/SUkAqr7dPIvrOq4b1cgEJt2AOL X-Received: by 2002:a17:906:604e:: with SMTP id p14mr1421946ejj.515.1605218118023; Thu, 12 Nov 2020 13:55:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605218118; cv=none; d=google.com; s=arc-20160816; b=oTzB9Xyc8uEov8JacTBkWS4dZI0A8YtUdUp6PHVGYnTJ4PLW71nBBiGnIS2cP6G5WP 28U+atQLVsTwtjNCP2VqQpPBV8aAe/G8cOyWT41a7F1zLXoC1yAHg0tLuT5VmISoERWk K0lROyUMy7U5e8lDeSbbXGDa802kTl7ggTHMJkVZg/QxLSX7mUUhI2psEHJz40AFwv0u 3GrSZnOQfihI6QYhKJhEOJWrUqpNNhWg2Q39pbBI3UDIVPFsKk4M4YuwRp+4H+gwtHVO edu5o+cove2I7H1l2lTy/O0vxjLFpwfaYhUr7YwZR4jnftOgl4b34Xsclkhld8puBcTH 2XDQ== 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=v/3CmVlipZFwgHhvcxuym7DjFXqNo5n9hsm6eQ+Z+yk=; b=Zwtw5j+J3lj2/7tqnwhYny/XBdVkMdKYeS5ikcD2zg4D0+EsYct5y0JCcUUf1v9Xrs vg4C5jlDl2RCDA/RjLhziB2UxmnbJYMHpM6BG5/RBJKglx3jHRbDha1WjnnNGG9Hq2Yd 68CPbP0Lszmn3xmxRiCIWQZFslVj93dc4gvcBayDu2xMrCXIuEyCmjgknho4RCefkR0t q8BndIM/cGChYt7KYrdcqmmHk/zlcrRKOz57w4CnT9PkIIyvKq8THLJkSbmYv1QSegwN qxHyk7ZFF+4o+McXw4JgJe325AwEkl/gpEFm8dGFNmvN56bCSTgtaLPmCdmeoPhME8NX p+mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i90VJSA7; 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 z25si4537376ejb.70.2020.11.12.13.55.17; Thu, 12 Nov 2020 13:55:18 -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=i90VJSA7; 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 S1727268AbgKLVzQ (ORCPT + 6 others); Thu, 12 Nov 2020 16:55:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727043AbgKLVzP (ORCPT ); Thu, 12 Nov 2020 16:55:15 -0500 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A79A0C0613D1 for ; Thu, 12 Nov 2020 13:55:05 -0800 (PST) Received: by mail-lj1-x241.google.com with SMTP id v20so8065841ljk.8 for ; Thu, 12 Nov 2020 13:55:05 -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=v/3CmVlipZFwgHhvcxuym7DjFXqNo5n9hsm6eQ+Z+yk=; b=i90VJSA79DqoRY0MYFhcvaAWxVXUBRbT4HSO1+XQM8Uk4+XrLGFgq7kaHiH9QUZd06 RKPW9IUmMOs+HaLVdlWx3LnfZKF4t61Nx6KuNu6Y09vyq8uYjHqgm/1atqO0e+5yT/v5 gS4jrqWD9DL+YDSNryxq+B/7C8BLawgUYVlWUxWAO7BpmYIg9w+3lO7AklGAr3wEc/mF b8a5TcjW6rCJGkLzeujPb/BWUllAdnCv6Xqaa2wK8FM3ZlxwHjJGoytvepePliy+XKRS 2MkLDeYJoAAfVJxAlXyFgFuYkAL07s9+ca7ZrXfo+OVk6KhhOlX4EQcVXshzJNWvoV7n B91g== 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=v/3CmVlipZFwgHhvcxuym7DjFXqNo5n9hsm6eQ+Z+yk=; b=p1omBPmI4BY7FDsCYD1MN0IBJ2Kwu3TrxtwpfYwJIHzJk8qlTEDEyQzGXmsXlfmY8x yEMpZ+w8i/n3oAH2oRSdH5oroTYr0EUCglOhdqhwIAi+Sa0dpjjUjzhgwaE/ojHv+sIS zWABHkiWajHVh/N/1dwn8WdHo2jnm03skNoyVVWP3sJ8PMa2bKttHn9RUwzoR4hrVQyK qOeJpTd9PdZsjhnv/23dTNXndo8/oqZjqsR1Cj/JpZ9clxss+XU6rKuxQWPR6yyr/nhe kiLBA4vyhEsTVmbNcXCRYaTnj+RbKbuMKwUq0oJgb3R3M6mBQsQgIab4vCTvRd7CZzr0 H1bA== X-Gm-Message-State: AOAM532Py1AJETHRUCwnBU57FmikcRHv4BgK1sbnWy4N49ompofOZbD+ x8xJDHzJ+6YrEjyV4QgvVQv46g== X-Received: by 2002:a2e:3a08:: with SMTP id h8mr751990lja.263.1605218104173; Thu, 12 Nov 2020 13:55:04 -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 x24sm967731ljj.112.2020.11.12.13.55.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2020 13:55:03 -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 v2] iio: accel: bmc150-accel: Add DT bindings Date: Thu, 12 Nov 2020 22:54:49 +0100 Message-Id: <20201112215451.2606136-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 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 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..5f48bdcf382c --- /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: + - | + i2c { + #include + #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>; + }; + }; +...