blob: 36029dd7210bbd4db8411df49be2e9210a423517 [file] [log] [blame]
Brandon Wyman37a50502017-05-22 17:35:07 -05001FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
Ben_Pai2e396332019-09-04 15:48:18 +08003EXTRA_OECONF_append_mihawk = " --enable-negative-errno-on-fail"
4
Brad Bishopbb0e1d02019-07-17 17:35:55 -04005SRC_URI_append_ibm-ac-server = " \
Matt Spinler055e8612018-04-25 11:26:08 -05006 file://70-hwmon.rules \
7 file://70-max31785-hwmon.rules \
Matt Spinler0066e312018-04-25 10:53:41 -05008 file://start_max31785_hwmon.sh \
9 "
10
Matt Spinlerb9cd4832019-10-02 16:46:32 -050011CHIPS_witherspoon = " \
12 bus@1e78a000/i2c-bus@100/max31785@52_air \
13 bus@1e78a000/i2c-bus@100/max31785@52_water \
14 bus@1e78a000/i2c-bus@100/power-supply@68 \
15 bus@1e78a000/i2c-bus@100/power-supply@69 \
Matt Spinler706307d2019-03-22 09:57:13 -050016 bus@1e78a000/i2c-bus@100/bmp280@77 \
17 bus@1e78a000/i2c-bus@100/dps310@76 \
Matt Spinler706307d2019-03-22 09:57:13 -050018 bus@1e78a000/i2c-bus@140/ir35221@70 \
19 bus@1e78a000/i2c-bus@140/ir35221@71 \
20 bus@1e78a000/i2c-bus@180/ir35221@70 \
21 bus@1e78a000/i2c-bus@180/ir35221@71 \
22 bus@1e78a000/i2c-bus@380/tmp275@4a \
Andrew Geissler30077452017-05-23 15:48:33 -050023 "
Matt Spinlerb9cd4832019-10-02 16:46:32 -050024CHIPS_swift = " \
25 bus@1e78a000/i2c-bus@100/max31785@52_air \
26 bus@1e78a000/i2c-bus@100/max31785@52_water \
27 bus@1e78a000/i2c-bus@100/power-supply@68 \
28 bus@1e78a000/i2c-bus@100/power-supply@69 \
Matt Spinlerbd2a3a22019-04-26 11:37:13 -050029 bus@1e78a000/i2c-bus@440/tmp275@4a \
30 bus@1e78a000/i2c-bus@440/tmp275@48 \
Matthew Barth51daebf2019-05-31 13:30:53 -050031 bus@1e78a000/i2c-bus@300/tmp275@48 \
Matthew Barthb86d99a2019-05-31 13:39:52 -050032 bus@1e78a000/i2c-bus@300/dps310@76 \
Matthew Barth44d15152019-05-31 13:44:13 -050033 bus@1e78a000/i2c-bus@300/si7021a20@20 \
Matthew Barthe21e2d22019-05-31 16:27:24 -050034 bus@1e78a000/i2c-bus@380/ir35219@70 \
35 bus@1e78a000/i2c-bus@380/ir35221@71 \
36 bus@1e78a000/i2c-bus@380/ir35221@72 \
Matthew Bartha296aa32019-05-31 16:37:16 -050037 bus@1e78a000/i2c-bus@3c0/ir35219@70 \
38 bus@1e78a000/i2c-bus@3c0/ir35221@71 \
39 bus@1e78a000/i2c-bus@3c0/ir35221@72 \
Matt Spinlerbd2a3a22019-04-26 11:37:13 -050040 "
Ben_Pai949f9142019-08-05 18:34:34 +080041CHIPS_mihawk = " \
42 bus@1e78a000/i2c-bus@100/power-supply@58 \
43 bus@1e78a000/i2c-bus@100/power-supply@5b \
44 bus@1e78a000/i2c-bus@140/ir35221@70 \
45 bus@1e78a000/i2c-bus@140/ir35221@72 \
46 bus@1e78a000/i2c-bus@180/ir35221@70 \
47 bus@1e78a000/i2c-bus@180/ir35221@72 \
48 bus@1e78a000/i2c-bus@400/tmp275@48 \
49 bus@1e78a000/i2c-bus@400/tmp275@49 \
50 pwm-tacho-controller@1e786000 \
51 bus@1e78a000/i2c-bus@400/emc1403@4c \
52 bus@1e78a000/i2c-bus@440/pca9545@70/i2c@3/tmp275@48 \
53 "
Brandon Wyman37a50502017-05-22 17:35:07 -050054
Matt Spinlerb9cd4832019-10-02 16:46:32 -050055CHIPS_witherspoon-tacoma = " \
56 bus@1e78a000/i2c-bus@200/max31785@52_air \
57 bus@1e78a000/i2c-bus@200/max31785@52_water \
58 bus@1e78a000/i2c-bus@200/power-supply@68 \
59 bus@1e78a000/i2c-bus@200/power-supply@69 \
60 bus@1e78a000/i2c-bus@200/bmp280@77 \
61 bus@1e78a000/i2c-bus@200/dps310@76 \
62 bus@1e78a000/i2c-bus@280/ir35221@70 \
63 bus@1e78a000/i2c-bus@280/ir35221@71 \
64 bus@1e78a000/i2c-bus@300/ir35221@70 \
65 bus@1e78a000/i2c-bus@300/ir35221@71 \
66 bus@1e78a000/i2c-bus@500/tmp275@4a \
67 "
Matthew Barth84b1f2e2019-04-15 15:44:48 -050068ITEMSFMT = "ahb/apb/{0}.conf"
Matthew Barth6dec46d2019-04-15 15:51:23 -050069ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}"
Ben_Pai949f9142019-08-05 18:34:34 +080070ITEMS_append_mihawk += " iio-hwmon-vdd0.conf"
71ITEMS_append_mihawk += " iio-hwmon-vdd1.conf"
72ITEMS_append_mihawk += " iio-hwmon-vcs0.conf"
73ITEMS_append_mihawk += " iio-hwmon-vcs1.conf"
74ITEMS_append_mihawk += " iio-hwmon-vdn0.conf"
75ITEMS_append_mihawk += " iio-hwmon-vdn1.conf"
76ITEMS_append_mihawk += " iio-hwmon-vio0.conf"
77ITEMS_append_mihawk += " iio-hwmon-vio1.conf"
78ITEMS_append_mihawk += " iio-hwmon-vddra.conf"
79ITEMS_append_mihawk += " iio-hwmon-vddrb.conf"
80ITEMS_append_mihawk += " iio-hwmon-vddrc.conf"
81ITEMS_append_mihawk += " iio-hwmon-vddrd.conf"
82ITEMS_append_mihawk += " iio-hwmon-12v.conf"
83ITEMS_append_mihawk += " iio-hwmon-5v.conf"
84ITEMS_append_mihawk += " iio-hwmon-3v.conf"
85ITEMS_append_mihawk += " iio-hwmon-battery.conf"
Matthew Barth84b1f2e2019-04-15 15:44:48 -050086
Matthew Barth2bd366a2019-06-03 15:56:24 -050087OCCS = " \
88 00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \
Matt Spinler696d1d32019-10-04 14:47:42 -050089 00--00--00--0a/fsi-master/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \
Matthew Barth2bd366a2019-06-03 15:56:24 -050090 "
Matt Spinler696d1d32019-10-04 14:47:42 -050091OCCSFMT = "devices/platform/gpio-fsi/fsi-master/fsi0/slave@00--00/{0}.conf"
Matthew Barth2bd366a2019-06-03 15:56:24 -050092OCCITEMS = "${@compose_list(d, 'OCCSFMT', 'OCCS')}"
Andrew Geissler2e23fb62017-05-26 16:39:03 -050093
Brandon Wyman37a50502017-05-22 17:35:07 -050094ENVS = "obmc/hwmon/{0}"
Brad Bishopbb0e1d02019-07-17 17:35:55 -040095SYSTEMD_ENVIRONMENT_FILE_${PN}_append_ibm-ac-server = " ${@compose_list(d, 'ENVS', 'ITEMS')}"
96SYSTEMD_ENVIRONMENT_FILE_${PN}_append_ibm-ac-server = " ${@compose_list(d, 'ENVS', 'OCCITEMS')}"
Ben_Pai949f9142019-08-05 18:34:34 +080097SYSTEMD_ENVIRONMENT_FILE_${PN}_append_mihawk = " ${@compose_list(d, 'ENVS', 'ITEMS')}"
98SYSTEMD_ENVIRONMENT_FILE_${PN}_append_mihawk = " ${@compose_list(d, 'ENVS', 'OCCITEMS')}"
Brad Bishop59a36b62017-08-21 20:10:29 -040099
Brad Bishopbb0e1d02019-07-17 17:35:55 -0400100SYSTEMD_ENVIRONMENT_FILE_max31785-msl_append_ibm-ac-server = " obmc/hwmon-max31785/max31785.conf"
101SYSTEMD_LINK_max31785-msl_append_ibm-ac-server = " ../phosphor-max31785-msl@.service:multi-user.target.wants/phosphor-max31785-msl@${MACHINE}.service"
Matt Spinler0066e312018-04-25 10:53:41 -0500102
Brad Bishopbb0e1d02019-07-17 17:35:55 -0400103SYSTEMD_SERVICE_${PN}_append_ibm-ac-server = " max31785-hwmon-helper@.service"
Matt Spinler2c924c52018-04-25 11:20:32 -0500104
Brad Bishopbb0e1d02019-07-17 17:35:55 -0400105do_install_append_ibm-ac-server() {
Matt Spinler055e8612018-04-25 11:26:08 -0500106 install -d ${D}/${base_libdir}/udev/rules.d/
107 install ${WORKDIR}/70-max31785-hwmon.rules ${D}/${base_libdir}/udev/rules.d/
108
Matt Spinler0066e312018-04-25 10:53:41 -0500109 install -d ${D}${bindir}
110 install -m 0755 ${WORKDIR}/start_max31785_hwmon.sh ${D}${bindir}
111}