-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yosemite4: Adjust ina233 config for matching hardware design
Summary: # Description: Adjust ina233 config for matching hardware design. The external shunt is 5 mohm, so the resistor-calibration should be 0x0400. This patch is for hardware testing. According to the datasheet and upstream review comment, resistor-calibration should be calculated, and we should set external shunt on DTS instead. We will revise the ina233 driver by the upstream review comment and contribute the code once we finish. # Motivation: Hardware team reported that the current reading wasn't correct. X-link: facebookexternal/openbmc.wiwynn#2997 Test Plan: Measure the current with current load and compare with the BMC's reading - pass Reviewed By: wangx6f Differential Revision: D54569359 fbshipit-source-id: 134dfeb4881c93013e05469631c47ded1de0ad70
- Loading branch information
1 parent
c57fd02
commit 0a12bb3
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
...kernel/linux/linux-aspeed/0512-Adjust-resistor-calibration-for-matching-hardware-de.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
From 6e15f71291c5b1ab7bbed0d97ab5e865888fbfbe Mon Sep 17 00:00:00 2001 | ||
From: PeterHo-wiwynn <Peter_MH_Ho@wiwynn.com> | ||
Date: Tue, 5 Mar 2024 15:15:49 +0800 | ||
Subject: [PATCH] Adjust resistor-calibration for matching hardware design | ||
|
||
This patch is for hardware testing. According to the datasheet and | ||
upstream review comment, resistor-calibration should be calculated, | ||
and we should set external shunt on DTS instead. We will revise the | ||
ina233 driver by the upstream review comment and contribute the code | ||
once we finish. | ||
--- | ||
.../boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 10 +++++----- | ||
1 file changed, 5 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | ||
index 45248c31db22..a8b724049e83 100644 | ||
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | ||
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | ||
@@ -1079,35 +1079,35 @@ adc@37 { | ||
power-sensor@40 { | ||
compatible = "ti,ina233"; | ||
reg = <0x40>; | ||
- resistor-calibration = /bits/ 16 <0x0a00>; | ||
+ resistor-calibration = /bits/ 16 <0x0400>; | ||
current-lsb= /bits/ 16 <0x0001>; | ||
}; | ||
|
||
power-sensor@41 { | ||
compatible = "ti,ina233"; | ||
reg = <0x41>; | ||
- resistor-calibration = /bits/ 16 <0x0a00>; | ||
+ resistor-calibration = /bits/ 16 <0x0400>; | ||
current-lsb= /bits/ 16 <0x0001>; | ||
}; | ||
|
||
power-sensor@42 { | ||
compatible = "ti,ina233"; | ||
reg = <0x42>; | ||
- resistor-calibration = /bits/ 16 <0x0a00>; | ||
+ resistor-calibration = /bits/ 16 <0x0400>; | ||
current-lsb= /bits/ 16 <0x0001>; | ||
}; | ||
|
||
power-sensor@43 { | ||
compatible = "ti,ina233"; | ||
reg = <0x43>; | ||
- resistor-calibration = /bits/ 16 <0x0a00>; | ||
+ resistor-calibration = /bits/ 16 <0x0400>; | ||
current-lsb= /bits/ 16 <0x0001>; | ||
}; | ||
|
||
power-sensor@44 { | ||
compatible = "ti,ina233"; | ||
reg = <0x44>; | ||
- resistor-calibration = /bits/ 16 <0x0a00>; | ||
+ resistor-calibration = /bits/ 16 <0x0400>; | ||
current-lsb= /bits/ 16 <0x0001>; | ||
}; | ||
|
||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters