Brandon Wyman | 37a5050 | 2017-05-22 17:35:07 -0500 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
| 2 | |
Ben_Pai | 2e39633 | 2019-09-04 15:48:18 +0800 | [diff] [blame] | 3 | EXTRA_OECONF_append_mihawk = " --enable-negative-errno-on-fail" |
| 4 | |
Brad Bishop | bb0e1d0 | 2019-07-17 17:35:55 -0400 | [diff] [blame] | 5 | SRC_URI_append_ibm-ac-server = " \ |
Matt Spinler | 055e861 | 2018-04-25 11:26:08 -0500 | [diff] [blame] | 6 | file://70-hwmon.rules \ |
| 7 | file://70-max31785-hwmon.rules \ |
Matt Spinler | 0066e31 | 2018-04-25 10:53:41 -0500 | [diff] [blame] | 8 | file://start_max31785_hwmon.sh \ |
| 9 | " |
| 10 | |
Matt Spinler | b9cd483 | 2019-10-02 16:46:32 -0500 | [diff] [blame] | 11 | CHIPS_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 Spinler | 706307d | 2019-03-22 09:57:13 -0500 | [diff] [blame] | 16 | bus@1e78a000/i2c-bus@100/bmp280@77 \ |
| 17 | bus@1e78a000/i2c-bus@100/dps310@76 \ |
Matt Spinler | 706307d | 2019-03-22 09:57:13 -0500 | [diff] [blame] | 18 | 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 Geissler | 3007745 | 2017-05-23 15:48:33 -0500 | [diff] [blame] | 23 | " |
Matt Spinler | b9cd483 | 2019-10-02 16:46:32 -0500 | [diff] [blame] | 24 | CHIPS_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 Spinler | bd2a3a2 | 2019-04-26 11:37:13 -0500 | [diff] [blame] | 29 | bus@1e78a000/i2c-bus@440/tmp275@4a \ |
| 30 | bus@1e78a000/i2c-bus@440/tmp275@48 \ |
Matthew Barth | 51daebf | 2019-05-31 13:30:53 -0500 | [diff] [blame] | 31 | bus@1e78a000/i2c-bus@300/tmp275@48 \ |
Matthew Barth | b86d99a | 2019-05-31 13:39:52 -0500 | [diff] [blame] | 32 | bus@1e78a000/i2c-bus@300/dps310@76 \ |
Matthew Barth | 44d1515 | 2019-05-31 13:44:13 -0500 | [diff] [blame] | 33 | bus@1e78a000/i2c-bus@300/si7021a20@20 \ |
Matthew Barth | e21e2d2 | 2019-05-31 16:27:24 -0500 | [diff] [blame] | 34 | bus@1e78a000/i2c-bus@380/ir35219@70 \ |
| 35 | bus@1e78a000/i2c-bus@380/ir35221@71 \ |
| 36 | bus@1e78a000/i2c-bus@380/ir35221@72 \ |
Matthew Barth | a296aa3 | 2019-05-31 16:37:16 -0500 | [diff] [blame] | 37 | bus@1e78a000/i2c-bus@3c0/ir35219@70 \ |
| 38 | bus@1e78a000/i2c-bus@3c0/ir35221@71 \ |
| 39 | bus@1e78a000/i2c-bus@3c0/ir35221@72 \ |
Matt Spinler | bd2a3a2 | 2019-04-26 11:37:13 -0500 | [diff] [blame] | 40 | " |
Ben_Pai | 949f914 | 2019-08-05 18:34:34 +0800 | [diff] [blame] | 41 | CHIPS_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 \ |
Ben Pai | 731297e | 2020-09-29 20:01:12 +0800 | [diff] [blame] | 48 | bus@1e78a000/i2c-bus@380/pca9545riser@70/i2c@0/tmp431@4c \ |
| 49 | bus@1e78a000/i2c-bus@380/pca9545riser@70/i2c@1/tmp431@4c \ |
Ben Pai | 74b7557 | 2020-06-11 16:40:40 +0800 | [diff] [blame] | 50 | bus@1e78a000/i2c-bus@380/pca9545@71/i2c@0/tmp431@4c \ |
| 51 | bus@1e78a000/i2c-bus@380/pca9545@71/i2c@1/tmp431@4c \ |
Ben Pai | 731297e | 2020-09-29 20:01:12 +0800 | [diff] [blame] | 52 | bus@1e78a000/i2c-bus@3c0/pca9545riser@70/i2c@0/tmp431@4c \ |
| 53 | bus@1e78a000/i2c-bus@3c0/pca9545riser@70/i2c@1/tmp431@4c \ |
Ben Pai | 74b7557 | 2020-06-11 16:40:40 +0800 | [diff] [blame] | 54 | bus@1e78a000/i2c-bus@3c0/pca9545@71/i2c@0/tmp431@4c \ |
| 55 | bus@1e78a000/i2c-bus@3c0/pca9545@71/i2c@1/tmp431@4c \ |
Ben_Pai | 949f914 | 2019-08-05 18:34:34 +0800 | [diff] [blame] | 56 | bus@1e78a000/i2c-bus@400/tmp275@48 \ |
| 57 | bus@1e78a000/i2c-bus@400/tmp275@49 \ |
| 58 | pwm-tacho-controller@1e786000 \ |
| 59 | bus@1e78a000/i2c-bus@400/emc1403@4c \ |
| 60 | bus@1e78a000/i2c-bus@440/pca9545@70/i2c@3/tmp275@48 \ |
| 61 | " |
Brandon Wyman | 37a5050 | 2017-05-22 17:35:07 -0500 | [diff] [blame] | 62 | |
Matt Spinler | b9cd483 | 2019-10-02 16:46:32 -0500 | [diff] [blame] | 63 | CHIPS_witherspoon-tacoma = " \ |
| 64 | bus@1e78a000/i2c-bus@200/max31785@52_air \ |
| 65 | bus@1e78a000/i2c-bus@200/max31785@52_water \ |
| 66 | bus@1e78a000/i2c-bus@200/power-supply@68 \ |
| 67 | bus@1e78a000/i2c-bus@200/power-supply@69 \ |
| 68 | bus@1e78a000/i2c-bus@200/bmp280@77 \ |
| 69 | bus@1e78a000/i2c-bus@200/dps310@76 \ |
| 70 | bus@1e78a000/i2c-bus@280/ir35221@70 \ |
| 71 | bus@1e78a000/i2c-bus@280/ir35221@71 \ |
| 72 | bus@1e78a000/i2c-bus@300/ir35221@70 \ |
| 73 | bus@1e78a000/i2c-bus@300/ir35221@71 \ |
| 74 | bus@1e78a000/i2c-bus@500/tmp275@4a \ |
| 75 | " |
Matthew Barth | 71404ba | 2020-11-23 18:10:30 -0600 | [diff] [blame] | 76 | |
| 77 | CHIPS_rainier = " \ |
| 78 | bus@1e78a000/i2c-bus@400/max31785@52 \ |
| 79 | " |
| 80 | |
Matthew Barth | 84b1f2e | 2019-04-15 15:44:48 -0500 | [diff] [blame] | 81 | ITEMSFMT = "ahb/apb/{0}.conf" |
Matthew Barth | 6dec46d | 2019-04-15 15:51:23 -0500 | [diff] [blame] | 82 | ITEMS = "${@compose_list(d, 'ITEMSFMT', 'CHIPS')}" |
Ben_Pai | 949f914 | 2019-08-05 18:34:34 +0800 | [diff] [blame] | 83 | ITEMS_append_mihawk += " iio-hwmon-vdd0.conf" |
| 84 | ITEMS_append_mihawk += " iio-hwmon-vdd1.conf" |
| 85 | ITEMS_append_mihawk += " iio-hwmon-vcs0.conf" |
| 86 | ITEMS_append_mihawk += " iio-hwmon-vcs1.conf" |
| 87 | ITEMS_append_mihawk += " iio-hwmon-vdn0.conf" |
| 88 | ITEMS_append_mihawk += " iio-hwmon-vdn1.conf" |
| 89 | ITEMS_append_mihawk += " iio-hwmon-vio0.conf" |
| 90 | ITEMS_append_mihawk += " iio-hwmon-vio1.conf" |
| 91 | ITEMS_append_mihawk += " iio-hwmon-vddra.conf" |
| 92 | ITEMS_append_mihawk += " iio-hwmon-vddrb.conf" |
| 93 | ITEMS_append_mihawk += " iio-hwmon-vddrc.conf" |
| 94 | ITEMS_append_mihawk += " iio-hwmon-vddrd.conf" |
| 95 | ITEMS_append_mihawk += " iio-hwmon-12v.conf" |
| 96 | ITEMS_append_mihawk += " iio-hwmon-5v.conf" |
| 97 | ITEMS_append_mihawk += " iio-hwmon-3v.conf" |
| 98 | ITEMS_append_mihawk += " iio-hwmon-battery.conf" |
Matthew Barth | 84b1f2e | 2019-04-15 15:44:48 -0500 | [diff] [blame] | 99 | |
Matthew Barth | 2bd366a | 2019-06-03 15:56:24 -0500 | [diff] [blame] | 100 | OCCS = " \ |
| 101 | 00--00--00--06/sbefifo1-dev0/occ-hwmon.1 \ |
Matt Spinler | 696d1d3 | 2019-10-04 14:47:42 -0500 | [diff] [blame] | 102 | 00--00--00--0a/fsi-master/fsi1/slave@01--00/01--01--00--06/sbefifo2-dev0/occ-hwmon.2 \ |
Matthew Barth | 2bd366a | 2019-06-03 15:56:24 -0500 | [diff] [blame] | 103 | " |
Matt Spinler | 696d1d3 | 2019-10-04 14:47:42 -0500 | [diff] [blame] | 104 | OCCSFMT = "devices/platform/gpio-fsi/fsi-master/fsi0/slave@00--00/{0}.conf" |
Matthew Barth | 2bd366a | 2019-06-03 15:56:24 -0500 | [diff] [blame] | 105 | OCCITEMS = "${@compose_list(d, 'OCCSFMT', 'OCCS')}" |
Andrew Geissler | 2e23fb6 | 2017-05-26 16:39:03 -0500 | [diff] [blame] | 106 | |
Brandon Wyman | 37a5050 | 2017-05-22 17:35:07 -0500 | [diff] [blame] | 107 | ENVS = "obmc/hwmon/{0}" |
Brad Bishop | bb0e1d0 | 2019-07-17 17:35:55 -0400 | [diff] [blame] | 108 | SYSTEMD_ENVIRONMENT_FILE_${PN}_append_ibm-ac-server = " ${@compose_list(d, 'ENVS', 'ITEMS')}" |
| 109 | SYSTEMD_ENVIRONMENT_FILE_${PN}_append_ibm-ac-server = " ${@compose_list(d, 'ENVS', 'OCCITEMS')}" |
Ben_Pai | 949f914 | 2019-08-05 18:34:34 +0800 | [diff] [blame] | 110 | SYSTEMD_ENVIRONMENT_FILE_${PN}_append_mihawk = " ${@compose_list(d, 'ENVS', 'ITEMS')}" |
| 111 | SYSTEMD_ENVIRONMENT_FILE_${PN}_append_mihawk = " ${@compose_list(d, 'ENVS', 'OCCITEMS')}" |
Matthew Barth | 71404ba | 2020-11-23 18:10:30 -0600 | [diff] [blame] | 112 | SYSTEMD_ENVIRONMENT_FILE_${PN}_append_rainier = " ${@compose_list(d, 'ENVS', 'ITEMS')}" |
Brad Bishop | 59a36b6 | 2017-08-21 20:10:29 -0400 | [diff] [blame] | 113 | |
Matthew Barth | 3318405 | 2020-11-17 08:45:37 -0600 | [diff] [blame] | 114 | # Enable and install the max31785-msl package |
| 115 | PACKAGECONFIG_append_ibm-ac-server = " max31785-msl" |
Brad Bishop | bb0e1d0 | 2019-07-17 17:35:55 -0400 | [diff] [blame] | 116 | SYSTEMD_ENVIRONMENT_FILE_max31785-msl_append_ibm-ac-server = " obmc/hwmon-max31785/max31785.conf" |
| 117 | SYSTEMD_LINK_max31785-msl_append_ibm-ac-server = " ../phosphor-max31785-msl@.service:multi-user.target.wants/phosphor-max31785-msl@${MACHINE}.service" |
Matt Spinler | 0066e31 | 2018-04-25 10:53:41 -0500 | [diff] [blame] | 118 | |
Brad Bishop | bb0e1d0 | 2019-07-17 17:35:55 -0400 | [diff] [blame] | 119 | SYSTEMD_SERVICE_${PN}_append_ibm-ac-server = " max31785-hwmon-helper@.service" |
Matt Spinler | 2c924c5 | 2018-04-25 11:20:32 -0500 | [diff] [blame] | 120 | |
Brad Bishop | bb0e1d0 | 2019-07-17 17:35:55 -0400 | [diff] [blame] | 121 | do_install_append_ibm-ac-server() { |
Matt Spinler | 055e861 | 2018-04-25 11:26:08 -0500 | [diff] [blame] | 122 | install -d ${D}/${base_libdir}/udev/rules.d/ |
Matthew Barth | 46984b5 | 2020-10-15 10:03:26 -0500 | [diff] [blame] | 123 | install -m 0644 ${WORKDIR}/70-max31785-hwmon.rules ${D}/${base_libdir}/udev/rules.d/ |
Matt Spinler | 055e861 | 2018-04-25 11:26:08 -0500 | [diff] [blame] | 124 | |
Matt Spinler | 0066e31 | 2018-04-25 10:53:41 -0500 | [diff] [blame] | 125 | install -d ${D}${bindir} |
| 126 | install -m 0755 ${WORKDIR}/start_max31785_hwmon.sh ${D}${bindir} |
| 127 | } |