linux-gbmc: 5.15: Add TPS53679 linear mode, TPS53685, and TPS53686 Split TPS53679 enhancements into two patches: 1. Dynamic linear mode detection in tps53679_identify_mode() based on VOUT_MODE register (PB_VOUT_MODE_LINEAR). 2. Global support for TPS53685 and TPS53686 controllers: - Enable PMBUS_HAVE_TEMP2 (temp3) on page 0 for controller die temperature. - Enable dual-page VIN/IIN/PIN/STATUS_INPUT telemetry on page 1. - Add chip ID and device tree compatible entries for TPS53685 and TPS53686. Google-Bug-Id: 467801199 Signed-off-by: William A. Kennington III <wak@google.com> Tested: Built image and verified TPS53686 telemetry live on hardware. Change-Id: Ia89544b7330efeb5a84eba66603fba6dc6f5b64f
diff --git a/recipes-kernel/linux/5.15/0001-hwmon-pmbus-tps53679-Add-linear-mode-support.patch b/recipes-kernel/linux/5.15/0001-hwmon-pmbus-tps53679-Add-linear-mode-support.patch new file mode 100644 index 0000000..aaec900 --- /dev/null +++ b/recipes-kernel/linux/5.15/0001-hwmon-pmbus-tps53679-Add-linear-mode-support.patch
@@ -0,0 +1,24 @@ +From: William A. Kennington III <wak@google.com> +Subject: [PATCH] hwmon: (pmbus/tps53679) Add linear mode support + +Support linear output voltage format dynamically in +tps53679_identify_mode() based on the VOUT_MODE register +(PB_VOUT_MODE_LINEAR). + +Upstream-Status: Pending +Signed-off-by: William A. Kennington III <wak@google.com> +--- +--- a/drivers/hwmon/pmbus/tps53679.c ++++ b/drivers/hwmon/pmbus/tps53679.c +@@ -50,6 +50,11 @@ + ret = pmbus_read_byte_data(client, i, PMBUS_VOUT_MODE); + if (ret < 0) + return ret; ++ ++ if ((ret & PB_VOUT_MODE_MODE_MASK) == PB_VOUT_MODE_LINEAR) { ++ info->format[PSC_VOLTAGE_OUT] = linear; ++ continue; ++ } + + vout_params = ret & GENMASK(4, 0); +
diff --git a/recipes-kernel/linux/5.15/0002-hwmon-pmbus-tps53679-Add-TPS53685-and-TPS53686-support.patch b/recipes-kernel/linux/5.15/0002-hwmon-pmbus-tps53679-Add-TPS53685-and-TPS53686-support.patch new file mode 100644 index 0000000..ce0cad8 --- /dev/null +++ b/recipes-kernel/linux/5.15/0002-hwmon-pmbus-tps53679-Add-TPS53685-and-TPS53686-support.patch
@@ -0,0 +1,58 @@ +From: William A. Kennington III <wak@google.com> +Subject: [PATCH] hwmon: (pmbus/tps53679) Add TPS53685 and TPS53686 support + +Add support for Texas Instruments TPS53685 and TPS53686 dual-channel +step-down controllers with per-channel input telemetry (VIN, IIN, PIN) +and controller die temperature (temp3). + +Upstream-Status: Pending +Signed-off-by: William A. Kennington III <wak@google.com> +--- +--- a/drivers/hwmon/pmbus/tps53679.c ++++ b/drivers/hwmon/pmbus/tps53679.c +@@ -16,7 +16,7 @@ + #include "pmbus.h" + + enum chips { +- tps53647, tps53667, tps53676, tps53679, tps53681, tps53688 ++ tps53647, tps53667, tps53676, tps53679, tps53681, tps53685, tps53686, tps53688 + }; + + #define TPS53647_PAGE_NUM 1 +@@ -140,6 +140,9 @@ + static int tps53679_identify(struct i2c_client *client, + struct pmbus_driver_info *info) + { ++ info->func[0] |= PMBUS_HAVE_TEMP2; ++ info->func[1] |= PMBUS_HAVE_VIN | PMBUS_HAVE_IIN | PMBUS_HAVE_PIN | ++ PMBUS_HAVE_STATUS_INPUT; + return tps53679_identify_mode(client, info); + } + +@@ -258,6 +261,8 @@ + info->identify = tps53676_identify; + break; + case tps53679: ++ case tps53685: ++ case tps53686: + case tps53688: + info->pages = TPS53679_PAGE_NUM; + info->identify = tps53679_identify; +@@ -282,6 +287,8 @@ + {"tps53676", tps53676}, + {"tps53679", tps53679}, + {"tps53681", tps53681}, ++ {"tps53685", tps53685}, ++ {"tps53686", tps53686}, + {"tps53688", tps53688}, + {} + }; +@@ -294,6 +301,8 @@ + {.compatible = "ti,tps53676", .data = (void *)tps53676}, + {.compatible = "ti,tps53679", .data = (void *)tps53679}, + {.compatible = "ti,tps53681", .data = (void *)tps53681}, ++ {.compatible = "ti,tps53685", .data = (void *)tps53685}, ++ {.compatible = "ti,tps53686", .data = (void *)tps53686}, + {.compatible = "ti,tps53688", .data = (void *)tps53688}, + {} + };
diff --git a/recipes-kernel/linux/linux-gbmc_5.15.bb b/recipes-kernel/linux/linux-gbmc_5.15.bb index 53b307a..573499d 100644 --- a/recipes-kernel/linux/linux-gbmc_5.15.bb +++ b/recipes-kernel/linux/linux-gbmc_5.15.bb
@@ -34,6 +34,8 @@ file://0001-add-tda38740-driver.patch \ file://0001-add-xdp730-driver.patch \ file://0001-Add-STEF48H28-driver.patch \ + file://0001-hwmon-pmbus-tps53679-Add-linear-mode-support.patch \ + file://0002-hwmon-pmbus-tps53679-Add-TPS53685-and-TPS53686-support.patch \ " SRC_URI:append:aspeed-g6 = " \