boards: nrf52_pca20020: add missing accelerometer support

The Thingy:52 has a LIS2DH12 low-power accelerometer on the external
I2C bus.  Add the necessary description to devicetree.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2019-10-17 14:42:03 -05:00 committed by Kumar Gala
parent f875c3fc48
commit e0aad0c94d
2 changed files with 23 additions and 0 deletions

View file

@ -118,6 +118,13 @@
clock-frequency = <I2C_BITRATE_FAST>;
sda-pin = <14>;
scl-pin = <15>;
lis2dh12: lis2dh12@19 {
compatible = "st,lis2dh12", "st,lis2dh";
reg = <0x19>;
irq-gpios = <&gpio0 12 GPIO_INT_ACTIVE_HIGH>;
label = "LIS2DH12-ACCEL";
};
};
&flash0 {

View file

@ -0,0 +1,16 @@
# Copyright (c) 2019 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
title: STMicroelectronics MEMS sensors LIS2DH12
description: >
This binding gives a base representation of LIS2DH12 3-axis accelerometer
compatible: "st,lis2dh12"
include: i2c-device.yaml
properties:
irq-gpios:
required: false
type: phandle-array