950-0820-overlays-Add-bmp380-to-i2c-sensor-overlay.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. From e1016d61e3dcb058932e8ec5072f2c4bbb05fcb7 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <[email protected]>
  3. Date: Sun, 30 Jul 2023 18:27:03 +0100
  4. Subject: [PATCH] overlays: Add bmp380 to i2c-sensor overlay
  5. Add support for the BMP380 pressor sensor to the i2c-sensor overlay.
  6. See: https://github.com/raspberrypi/linux/issues/5558
  7. Signed-off-by: Phil Elwell <[email protected]>
  8. ---
  9. arch/arm/boot/dts/overlays/README | 7 +++++--
  10. .../boot/dts/overlays/i2c-sensor-common.dtsi | 19 ++++++++++++++++++-
  11. 2 files changed, 23 insertions(+), 3 deletions(-)
  12. --- a/arch/arm/boot/dts/overlays/README
  13. +++ b/arch/arm/boot/dts/overlays/README
  14. @@ -2052,8 +2052,8 @@ Info: Adds support for a number of I2C
  15. light level and chemical sensors on i2c_arm
  16. Load: dtoverlay=i2c-sensor,<param>=<val>
  17. Params: addr Set the address for the BH1750, BME280, BME680,
  18. - BMP280, CCS811, DS1621, HDC100X, JC42, LM75,
  19. - MCP980x, MPU6050, MPU9250, MS5637, MS5803,
  20. + BMP280, BMP380, CCS811, DS1621, HDC100X, JC42,
  21. + LM75, MCP980x, MPU6050, MPU9250, MS5637, MS5803,
  22. MS5805, MS5837, MS8607, SHT3x or TMP102
  23. aht10 Select the Aosong AHT10 temperature and humidity
  24. @@ -2075,6 +2075,9 @@ Params: addr Set the
  25. bmp280 Select the Bosch Sensortronic BMP280
  26. Valid addresses 0x76-0x77, default 0x76
  27. + bmp380 Select the Bosch Sensortronic BMP380
  28. + Valid addresses 0x76-0x77, default 0x76
  29. +
  30. bno055 Select the Bosch Sensortronic BNO055 IMU
  31. Valid address 0x28-0x29, default 0x29
  32. --- a/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
  33. +++ b/arch/arm/boot/dts/overlays/i2c-sensor-common.dtsi
  34. @@ -493,11 +493,27 @@
  35. };
  36. };
  37. + fragment@33 {
  38. + target = <&i2cbus>;
  39. + __dormant__ {
  40. + #address-cells = <1>;
  41. + #size-cells = <0>;
  42. + status = "okay";
  43. +
  44. + bmp380: bmp380@76 {
  45. + compatible = "bosch,bmp380";
  46. + reg = <0x76>;
  47. + status = "okay";
  48. + };
  49. + };
  50. + };
  51. +
  52. __overrides__ {
  53. bme280 = <0>,"+0";
  54. bmp085 = <0>,"+1";
  55. bmp180 = <0>,"+2";
  56. bmp280 = <0>,"+3";
  57. + bmp380 = <0>,"+33";
  58. htu21 = <0>,"+4";
  59. lm75 = <0>,"+5";
  60. lm75addr = <&lm75>,"reg:0";
  61. @@ -535,7 +551,8 @@
  62. <&ms5637>,"reg:0", <&ms5803>,"reg:0", <&ms5805>,"reg:0",
  63. <&ms5837>,"reg:0", <&ms8607>,"reg:0",
  64. <&mpu6050>,"reg:0", <&mpu9250>,"reg:0",
  65. - <&bno055>,"reg:0", <&sht4x>,"reg:0";
  66. + <&bno055>,"reg:0", <&sht4x>,"reg:0",
  67. + <&bmp380>,"reg:0";
  68. int_pin = <&max30102>, "interrupts:0",
  69. <&mpu6050>, "interrupts:0",
  70. <&mpu9250>, "interrupts:0";