arm64: dts: renesas: ulcb-kf: Add 9-asix sensor device
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>
Wed, 12 Jan 2022 20:52:05 +0000 (23:52 +0300)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 28 Jan 2022 09:59:13 +0000 (10:59 +0100)
This adds nodes for the lsm9ds0 sensor installed on the KF board.

With this patch, the sensor data becomes available over the IIO sysfs
interface.

The interrupt definition is not added yet, because the interrupt lines
of lsm9ds0 are pulled to VCC on the board, which implies a need for
active-low configuration. But the st_sensors drivers currently can't
work with active-low interrupts on this chip.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220112205205.4082026-1-nikita.yoush@cogentembedded.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
arch/arm64/boot/dts/renesas/ulcb-kf.dtsi

index 222097d..30f1855 100644 (file)
                };
        };
 
+       accel_3v3: regulator-acc-3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "accel-3v3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
        hdmi_1v8: regulator-hdmi-1v8 {
                compatible = "regulator-fixed";
                regulator-name = "hdmi-1v8";
                        #size-cells = <0>;
                        reg = <7>;
 
+                       accelerometer@1d {
+                               compatible = "st,lsm9ds0-imu";
+                               reg = <0x1d>;
+
+                               vdd-supply = <&accel_3v3>;
+                               vddio-supply = <&accel_3v3>;
+                       };
+
                        pcm3168a: audio-codec@44 {
                                #sound-dai-cells = <0>;
                                compatible = "ti,pcm3168a";
                                        };
                                };
                        };
+
+                       gyroscope@6b {
+                               compatible = "st,lsm9ds0-gyro";
+                               reg = <0x6b>;
+
+                               vdd-supply = <&accel_3v3>;
+                               vddio-supply = <&accel_3v3>;
+                       };
                };
        };