Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add BME680 to i2c-sensor overlay #3400

Merged
merged 2 commits into from
Jan 10, 2020
Merged

add BME680 to i2c-sensor overlay #3400

merged 2 commits into from
Jan 10, 2020

Conversation

dremsol
Copy link

@dremsol dremsol commented Jan 9, 2020

Tested and working. Question remaining is if bme680 should be configured as a module in kernel configuration?

@dremsol
Copy link
Author

dremsol commented Jan 9, 2020

changed relevant defconfigs

@pelwell
Copy link
Contributor

pelwell commented Jan 10, 2020

There were a few issues with this PR (the bmp280 address setting was broken, a README line was too long, and there were whitespace problems in the overlay), but I've patched it up. If you're happy with the result I'll merge it.

@dremsol
Copy link
Author

dremsol commented Jan 10, 2020

Thanks for the feedback. The README is fine. Correct me if I'm wrong, but you've changed a broken address which wasn't broken. the PR adds the BME680 sensor, not the BMP680

@pelwell
Copy link
Contributor

pelwell commented Jan 10, 2020

If you diff my version to yours, excluding the whitespace changes, you get:

diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
index 41fadb7..917ce60 100644
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1159,8 +1159,8 @@ Name:   i2c-sensor
 Info:   Adds support for a number of I2C barometric pressure and temperature
         sensors on i2c_arm
 Load:   dtoverlay=i2c-sensor,<param>=<val>
-Params: addr                    Set the address for the BME280, BME680, BMP280, DS1621,
-                                HDC100X, LM75, SHT3x or TMP102
+Params: addr                    Set the address for the BME280, BME680, BMP280,
+                                DS1621, HDC100X, LM75, SHT3x or TMP102
 
         bme280                  Select the Bosch Sensortronic BME280
                                 Valid addresses 0x76-0x77, default 0x76
diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
index 96fec93..40881d7 100644
--- a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
+++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
@@ -233,7 +233,7 @@
 
 
        __overrides__ {
-               addr =  <&bme280>,"reg:0", <&bme680>,"reg:0", <&tmp102>,"reg:0",
+               addr =  <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
                        <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
                        <&ds1621>,"reg:0", <&bme680>,"reg:0";
                bme280 = <0>,"+0";

The README change just moves the line-wrap, but the overlay change restores the address setting for bmp280 that your patch had broken. Your original patch said:

        __overrides__ {
-               addr =  <&bme280>,"reg:0", <&bmp280>,"reg:0", <&tmp102>,"reg:0",
+               addr =  <&bme280>,"reg:0", <&bme680>,"reg:0", <&tmp102>,"reg:0",
                        <&lm75>,"reg:0", <&hdc100x>,"reg:0", <&sht3x>,"reg:0",
-                       <&ds1621>,"reg:0";
+                       <&ds1621>,"reg:0", <&bme680>,"reg:0";

i.e. you had bme680 in the list twice, once where bmp280 used to be.

@dremsol dremsol closed this Jan 10, 2020
@dremsol dremsol reopened this Jan 10, 2020
@dremsol
Copy link
Author

dremsol commented Jan 10, 2020

weird, not sure how I screwed up on my end. However, when pulling from bme680 branch in fork everything looks fine. PR could be merged.

@pelwell pelwell merged commit 7677227 into raspberrypi:rpi-4.19.y Jan 10, 2020
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jan 10, 2020
kernel: leds: pca963x: Fix open-drain initialization
See: raspberrypi/linux#3274

kernel: add BME680 to i2c-sensor overlay
See: raspberrypi/linux#3400

kernel: Pisound: MIDI communication fixes for scaled down CPU
See: raspberrypi/linux#3396

kernel: pinctrl: bcm2835: Change init order for gpio hogs
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=260600

firmware: Revert mmal: Support 64 bit clients
See: raspberrypi/userland#586

firmware: arm_dt/dtoverlay fixes for ARM side camera driver power control
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Jan 10, 2020
kernel: leds: pca963x: Fix open-drain initialization
See: raspberrypi/linux#3274

kernel: add BME680 to i2c-sensor overlay
See: raspberrypi/linux#3400

kernel: Pisound: MIDI communication fixes for scaled down CPU
See: raspberrypi/linux#3396

kernel: pinctrl: bcm2835: Change init order for gpio hogs
See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=260600

firmware: Revert mmal: Support 64 bit clients
See: raspberrypi/userland#586

firmware: arm_dt/dtoverlay fixes for ARM side camera driver power control
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants