mirror of
https://github.com/lxsang/meta-rpi-diya.git
synced 2025-08-28 23:02:40 +02:00
Compare commits
2 Commits
ac3f82a2c1
...
d98a5c440b
Author | SHA1 | Date | |
---|---|---|---|
|
d98a5c440b | ||
|
62886eba57 |
103
recipes-bsp/waveshare-2.8-lcd/files/dts/ads1115-i2c-gpio.dts
Normal file
103
recipes-bsp/waveshare-2.8-lcd/files/dts/ads1115-i2c-gpio.dts
Normal file
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* TI ADS1115 multi-channel ADC overlay
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
/plugin/;
|
||||
|
||||
/ {
|
||||
compatible = "brcm,bcm2835";
|
||||
|
||||
fragment@0 {
|
||||
target = <&i2c_gpio>;
|
||||
__overlay__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
ads1115: ads1115@48 {
|
||||
compatible = "ti,ads1115";
|
||||
status = "okay";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0x48>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@1 {
|
||||
target = <&ads1115>;
|
||||
__dormant__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel_a: channel_a {
|
||||
reg = <4>;
|
||||
ti,gain = <1>;
|
||||
ti,datarate = <7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@2 {
|
||||
target = <&ads1115>;
|
||||
__dormant__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel_b: channel_b {
|
||||
reg = <5>;
|
||||
ti,gain = <1>;
|
||||
ti,datarate = <7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@3 {
|
||||
target = <&ads1115>;
|
||||
__dormant__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel_c: channel_c {
|
||||
reg = <6>;
|
||||
ti,gain = <1>;
|
||||
ti,datarate = <7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fragment@4 {
|
||||
target = <&ads1115>;
|
||||
__dormant__ {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel_d: channel_d {
|
||||
reg = <7>;
|
||||
ti,gain = <1>;
|
||||
ti,datarate = <7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
__overrides__ {
|
||||
addr = <&ads1115>,"reg:0";
|
||||
cha_enable = <0>,"=1";
|
||||
cha_cfg = <&channel_a>,"reg:0";
|
||||
cha_gain = <&channel_a>,"ti,gain:0";
|
||||
cha_datarate = <&channel_a>,"ti,datarate:0";
|
||||
chb_enable = <0>,"=2";
|
||||
chb_cfg = <&channel_b>,"reg:0";
|
||||
chb_gain = <&channel_b>,"ti,gain:0";
|
||||
chb_datarate = <&channel_b>,"ti,datarate:0";
|
||||
chc_enable = <0>,"=3";
|
||||
chc_cfg = <&channel_c>,"reg:0";
|
||||
chc_gain = <&channel_c>,"ti,gain:0";
|
||||
chc_datarate = <&channel_c>,"ti,datarate:0";
|
||||
chd_enable = <0>,"=4";
|
||||
chd_cfg = <&channel_d>,"reg:0";
|
||||
chd_gain = <&channel_d>,"ti,gain:0";
|
||||
chd_datarate = <&channel_d>,"ti,datarate:0";
|
||||
};
|
||||
};
|
@@ -7,9 +7,14 @@ inherit devicetree
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
|
||||
SRC_URI = " file://dts/ads1115-i2c-gpio.dts "
|
||||
|
||||
S = "${WORKDIR}/dts"
|
||||
DT_FILES = "ads1115-i2c-gpio.dtbo"
|
||||
|
||||
COMPATIBLE_MACHINE = "raspberrypi.*"
|
||||
|
||||
do_deploy:append () {
|
||||
install -d ${DEPLOY_DIR_IMAGE}
|
||||
install -m 0755 ${THISDIR}/files/dts/ads1115-i2c-gpio.dtbo ${DEPLOY_DIR_IMAGE}/ads1115-i2c-gpio.dtbo
|
||||
install -m 0755 ${B}/ads1115-i2c-gpio.dtbo ${DEPLOY_DIR_IMAGE}/ads1115-i2c-gpio.dtbo
|
||||
install -m 0755 ${THISDIR}/files/vc4-kms-DPI-28inch.dtbo ${DEPLOY_DIR_IMAGE}/vc4-kms-DPI-28inch.dtbo
|
||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b-4b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b-4b.dtbo
|
||||
install -m 0755 ${THISDIR}/files/waveshare-28dpi-3b.dtbo ${DEPLOY_DIR_IMAGE}/waveshare-28dpi-3b.dtbo
|
||||
|
@@ -1,6 +1,6 @@
|
||||
inherit extrausers
|
||||
|
||||
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/ads1115-i2c-gpio.dtbo overlays/vc4-kms-DPI-28inch.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
||||
KERNEL_DEVICETREE:append = "${@bb.utils.contains('RPI_USE_wS_28_DPI_LCD', '1', ' overlays/ads1115-i2c-gpio.dtbo overlays/ads1115-i2c-gpio.dtbo overlays/vc4-kms-DPI-28inch.dtbo overlays/waveshare-28dpi-3b-4b.dtbo overlays/waveshare-28dpi-3b.dtbo overlays/waveshare-28dpi-4b.dtbo ', ' ', d)}"
|
||||
|
||||
|
||||
EXTRA_USERS_PARAMS = "usermod -p BJpK8ADNDLsGg root; \
|
||||
|
Reference in New Issue
Block a user