aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0558-BCM270X_DT-Add-i2c-sensor-overlay.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2017-03-08 09:46:30 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2017-03-08 09:54:01 +0100
commit8b52a8906bf376610e5a8d051ead1d50610e6da1 (patch)
treef8e0b6467501c56f03fc6782433a765417b21ce5 /target/linux/brcm2708/patches-4.4/0558-BCM270X_DT-Add-i2c-sensor-overlay.patch
parentb3ba3764d0e81097229ffeb0eff9d72ee42a801d (diff)
downloadupstream-8b52a8906bf376610e5a8d051ead1d50610e6da1.tar.gz
upstream-8b52a8906bf376610e5a8d051ead1d50610e6da1.tar.bz2
upstream-8b52a8906bf376610e5a8d051ead1d50610e6da1.zip
brcm2708: update linux 4.4 patches to latest version
As usual these patches were extracted and rebased from the raspberry pi repo: https://github.com/raspberrypi/linux/tree/rpi-4.4.y - led1 can't be controlled on rpi-3 for linux 4.4, remove it. - Fix modules.mk typos. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0558-BCM270X_DT-Add-i2c-sensor-overlay.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0558-BCM270X_DT-Add-i2c-sensor-overlay.patch102
1 files changed, 102 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0558-BCM270X_DT-Add-i2c-sensor-overlay.patch b/target/linux/brcm2708/patches-4.4/0558-BCM270X_DT-Add-i2c-sensor-overlay.patch
new file mode 100644
index 0000000000..2248fe8113
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.4/0558-BCM270X_DT-Add-i2c-sensor-overlay.patch
@@ -0,0 +1,102 @@
+From ec94d922b57bb7d6586eaf1e1af02e9383680d15 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.org>
+Date: Mon, 5 Dec 2016 17:10:44 +0000
+Subject: [PATCH] BCM270X_DT: Add i2c-sensor overlay
+
+The i2c-sensor overlay is a container for various pressure and
+temperature sensors, currently bmp085 and bmp280. The standalone
+bmp085_i2c-sensor overlay is now deprecated.
+
+Signed-off-by: Phil Elwell <phil@raspberrypi.org>
+---
+ arch/arm/boot/dts/overlays/Makefile | 1 +
+ arch/arm/boot/dts/overlays/README | 12 ++++++--
+ arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts | 34 +++++++++++++++++++++++
+ 3 files changed, 45 insertions(+), 2 deletions(-)
+ create mode 100644 arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
+
+diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
+index c4186aa..bc7f4a9 100644
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -42,6 +42,7 @@ dtbo-$(RPI_DT_OVERLAYS) += i2c-gpio.dtbo
+ dtbo-$(RPI_DT_OVERLAYS) += i2c-mux.dtbo
+ dtbo-$(RPI_DT_OVERLAYS) += i2c-pwm-pca9685a.dtbo
+ dtbo-$(RPI_DT_OVERLAYS) += i2c-rtc.dtbo
++dtbo-$(RPI_DT_OVERLAYS) += i2c-sensor.dtbo
+ dtbo-$(RPI_DT_OVERLAYS) += i2c0-bcm2708.dtbo
+ dtbo-$(RPI_DT_OVERLAYS) += i2c1-bcm2708.dtbo
+ dtbo-$(RPI_DT_OVERLAYS) += i2s-gpio28-31.dtbo
+diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
+index 4a77ee6..80ea3de 100644
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -283,8 +283,7 @@ Params: swap_lr Reverse the channel allocation, which will also
+
+
+ Name: bmp085_i2c-sensor
+-Info: Configures the BMP085/BMP180 digital barometric pressure and temperature
+- sensors from Bosch Sensortec
++Info: This overlay is now deprecated - see i2c-sensor
+ Load: dtoverlay=bmp085_i2c-sensor
+ Params: <None>
+
+@@ -536,6 +535,15 @@ Params: abx80x Select one of the ABx80x family:
+ source
+
+
++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: bmp085 Select the Bosch sensortronic BMP085
++
++ bmp280 Select the Bosch sensortronic BMP280
++
++
+ Name: i2c0-bcm2708
+ Info: Enable the i2c_bcm2708 driver for the i2c0 bus. Not all pin combinations
+ are usable on all platforms.
+diff --git a/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
+new file mode 100644
+index 0000000..f6d134c
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/i2c-sensor-overlay.dts
+@@ -0,0 +1,34 @@
++// Definitions for a few digital barometric pressure and temperature sensors
++/dts-v1/;
++/plugin/;
++
++/ {
++ compatible = "brcm,bcm2708";
++
++ fragment@0 {
++ target = <&i2c_arm>;
++ __overlay__ {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ status = "okay";
++
++ bmp085: bmp085@77 {
++ compatible = "bosch,bmp085";
++ reg = <0x77>;
++ default-oversampling = <3>;
++ status = "disable";
++ };
++
++ bmp280: bmp280@76 {
++ compatible = "bosch,bmp280";
++ reg = <0x76>;
++ status = "disable";
++ };
++ };
++ };
++
++ __overrides__ {
++ bmp085 = <&bmp085>,"status";
++ bmp280 = <&bmp280>,"status";
++ };
++};
+--
+2.1.4
+