Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73019 )
(
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: mb/siemens/mc_ehl2: Set RGMII output impedance manually
......................................................................
mb/siemens/mc_ehl2: Set RGMII output impedance manually
Measurements have shown that the automatic calibrated values for RGMII
output impedances are too low. For this reason, set the PMOS value to 16
and the NMOS to 13.
Change-Id: Ic3382889d3281faccb03819f9680a9763703b2a1
Signed-off-by: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73019
Reviewed-by: Werner Zeh <werner.zeh(a)siemens.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb
1 file changed, 23 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Werner Zeh: Looks good to me, approved
diff --git a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb
index 758c8b1..f14c225 100644
--- a/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb
+++ b/src/mainboard/siemens/mc_ehl/variants/mc_ehl2/devicetree.cb
@@ -191,6 +191,9 @@
# INTn is routed to LED[2] pin
register "enable_int" = "true"
register "downshift_cnt" = "2"
+ register "force_mos" = "true"
+ register "pmos_val" = "0xF"
+ register "nmos_val" = "0xA"
device mdio 0 on # PHY address
ops m88e1512_ops
end
@@ -207,6 +210,9 @@
# INTn is routed to LED[2] pin
register "enable_int" = "true"
register "downshift_cnt" = "2"
+ register "force_mos" = "true"
+ register "pmos_val" = "0xF"
+ register "nmos_val" = "0xA"
device mdio 1 on # PHY address
ops m88e1512_ops
end
--
To view, visit https://review.coreboot.org/c/coreboot/+/73019
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic3382889d3281faccb03819f9680a9763703b2a1
Gerrit-Change-Number: 73019
Gerrit-PatchSet: 3
Gerrit-Owner: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73018 )
Change subject: drivers/net/phy/m88e1512: Add a way to set output impedance manually
......................................................................
drivers/net/phy/m88e1512: Add a way to set output impedance manually
This patch provides the functionality to set the RGMII output impedance
manually. To ensure that no race condition occurs, the driver strength
values for PMOS and NMOS should be written to the RGMII output impedance
calibration override register first and then the force bit should be
enabled with a second write to this register.
Link to the Marvell PHY 88E1512 datasheet:
https://web.archive.org/web/20230125074158/https://www.marvell.com/content/…
Change-Id: I87fa03aa49514cdc33d2911d7f23386c8f69d95b
Signed-off-by: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73018
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh(a)siemens.com>
---
M src/drivers/net/phy/m88e1512/chip.h
M src/drivers/net/phy/m88e1512/m88e1512.c
M src/drivers/net/phy/m88e1512/m88e1512.h
3 files changed, 50 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Werner Zeh: Looks good to me, approved
diff --git a/src/drivers/net/phy/m88e1512/chip.h b/src/drivers/net/phy/m88e1512/chip.h
index 915001a..f1e313b 100644
--- a/src/drivers/net/phy/m88e1512/chip.h
+++ b/src/drivers/net/phy/m88e1512/chip.h
@@ -11,4 +11,7 @@
/* 1x, 2x,...8x is the number of times the PHY attempts to establish Gigabit link
before the PHY downshifts to the next highest speed. */
unsigned char downshift_cnt;
+ bool force_mos; /* Force PMOS/NMOS manually */
+ unsigned char pmos_val; /* Set PMOS calibration value */
+ unsigned char nmos_val; /* Set NMOS calibration value */
};
diff --git a/src/drivers/net/phy/m88e1512/m88e1512.c b/src/drivers/net/phy/m88e1512/m88e1512.c
index 5ce9b40..2e8994c 100644
--- a/src/drivers/net/phy/m88e1512/m88e1512.c
+++ b/src/drivers/net/phy/m88e1512/m88e1512.c
@@ -67,6 +67,25 @@
mdio_write(dev, LED_TIMER_CTRL_REG, reg);
}
+ /* Set RGMII output impedance manually. */
+ if (config->force_mos) {
+ printk(BIOS_DEBUG, "%s: Set RGMII driver strength manually for %s.\n",
+ dev_path(dev->bus->dev), dev->chip_ops->name);
+
+ /* Select page 2 to access RGMII output impedance calibration override
+ register. */
+ switch_page(dev, 2);
+
+ reg = mdio_read(dev, OUT_IMP_CAL_OVERRIDE_REG);
+ /* Set first only NMOS/PMOS values. */
+ clrsetbits16(®, MOS_VALUE_MASK, PMOS_VALUE(config->pmos_val) |
+ NMOS_VALUE(config->nmos_val));
+ mdio_write(dev, OUT_IMP_CAL_OVERRIDE_REG, reg);
+ /* Activate the new setting. */
+ setbits16(®, FORCE_MOS);
+ mdio_write(dev, OUT_IMP_CAL_OVERRIDE_REG, reg);
+ }
+
/* Switch back to page 0. */
switch_page(dev, 0);
}
diff --git a/src/drivers/net/phy/m88e1512/m88e1512.h b/src/drivers/net/phy/m88e1512/m88e1512.h
index 449cc57..3310c8b 100644
--- a/src/drivers/net/phy/m88e1512/m88e1512.h
+++ b/src/drivers/net/phy/m88e1512/m88e1512.h
@@ -13,6 +13,12 @@
#define DOWNSHIFT_CNT_MAX 8
#define DOWNSHIFT_CNT(cnt) ((cnt - 1) << 12)
#define DOWNSHIFT_EN (1 << 11)
+/* Page 2 registers */
+#define OUT_IMP_CAL_OVERRIDE_REG 0x18
+#define MOS_VALUE_MASK 0x0F4F
+#define PMOS_VALUE(pmos) (pmos << 8)
+#define FORCE_MOS (1 << 6)
+#define NMOS_VALUE(nmos) (nmos << 0)
/* Page 3 registers */
#define LED_FUNC_CTRL_REG 0x10
#define LED_FUNC_CTRL_MASK 0x0FFF
--
To view, visit https://review.coreboot.org/c/coreboot/+/73018
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I87fa03aa49514cdc33d2911d7f23386c8f69d95b
Gerrit-Change-Number: 73018
Gerrit-PatchSet: 3
Gerrit-Owner: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/73017 )
Change subject: drivers/net/phy/m88e1512: Switch the page back to 0 only once
......................................................................
drivers/net/phy/m88e1512: Switch the page back to 0 only once
When the configuration of Marvell PHY 88E1512 is finished, then switch
the page back to 0 only once at the end of the Init function.
Change-Id: I9e516870a7c5928724df2bd3ac9c5c8f3249af2e
Signed-off-by: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73017
Reviewed-by: Werner Zeh <werner.zeh(a)siemens.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/drivers/net/phy/m88e1512/m88e1512.c
1 file changed, 20 insertions(+), 6 deletions(-)
Approvals:
build bot (Jenkins): Verified
Werner Zeh: Looks good to me, approved
Arthur Heymans: Looks good to me, approved
diff --git a/src/drivers/net/phy/m88e1512/m88e1512.c b/src/drivers/net/phy/m88e1512/m88e1512.c
index f32991f..5ce9b40 100644
--- a/src/drivers/net/phy/m88e1512/m88e1512.c
+++ b/src/drivers/net/phy/m88e1512/m88e1512.c
@@ -52,9 +52,6 @@
clrsetbits16(®, LED_FUNC_CTRL_MASK, config->led_0_ctrl |
(config->led_1_ctrl << 4) | (config->led_2_ctrl << 8));
mdio_write(dev, LED_FUNC_CTRL_REG, reg);
-
- /* Switch back to page 0. */
- switch_page(dev, 0);
}
/* INTn can be routed to LED[2] pin. */
@@ -68,10 +65,10 @@
reg = mdio_read(dev, LED_TIMER_CTRL_REG);
setbits16(®, LED_IRQ_ENABLE);
mdio_write(dev, LED_TIMER_CTRL_REG, reg);
-
- /* Switch back to page 0. */
- switch_page(dev, 0);
}
+
+ /* Switch back to page 0. */
+ switch_page(dev, 0);
}
struct device_operations m88e1512_ops = {
--
To view, visit https://review.coreboot.org/c/coreboot/+/73017
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9e516870a7c5928724df2bd3ac9c5c8f3249af2e
Gerrit-Change-Number: 73017
Gerrit-PatchSet: 3
Gerrit-Owner: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/72667 )
Change subject: vc/siemens/hwilib: Change uint32_t return type to size_t
......................................................................
vc/siemens/hwilib: Change uint32_t return type to size_t
The commit fcff39f0ea47 ("vc/siemens/hwilib: Rename 'maxlen' to
'dstsize'") changed the 'dstsize' input parameter type from uint32_t to
size_t.
This patch changes also the return parameter, which is often directly
compared with the aforementioned input parameter value. This should
introduce no change on 32-bit builds and stay consistent across the
project in the case of 64-bit builds and avoid comparisons of integers
of different width here.
BUG=none
TEST=No changes to hwilib behavior on any of the siemens/mc_apl1 or
siemens/mc_ehl variants.
Change-Id: I0a623f55b596297cdb6e17232828b9536c9a43e6
Signed-off-by: Jan Samek <jan.samek(a)siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72667
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer(a)siemens.com>
---
M src/vendorcode/siemens/hwilib/hwilib.c
M src/vendorcode/siemens/hwilib/hwilib.h
2 files changed, 32 insertions(+), 5 deletions(-)
Approvals:
build bot (Jenkins): Verified
Mario Scheithauer: Looks good to me, approved
diff --git a/src/vendorcode/siemens/hwilib/hwilib.c b/src/vendorcode/siemens/hwilib/hwilib.c
index b6c8c6b..2a3c10a 100644
--- a/src/vendorcode/siemens/hwilib/hwilib.c
+++ b/src/vendorcode/siemens/hwilib/hwilib.c
@@ -53,7 +53,7 @@
struct param_pos pos[MAX_BLOCK_NUM];
uint64_t mask;
uint8_t mask_offset;
- uint32_t (*get_field)(const struct param_info *param, uint8_t *dst, size_t dstsize);
+ size_t (*get_field)(const struct param_info *param, uint8_t *dst, size_t dstsize);
};
/* Storage for pointers to the different blocks. The contents will be filled
@@ -69,7 +69,7 @@
/* Storage for the cbfs file name of the currently open hwi file. */
static char current_hwi[HWI_MAX_NAME_LEN];
-static uint32_t hwilib_read_bytes(const struct param_info *param, uint8_t *dst, size_t dstsize);
+static size_t hwilib_read_bytes(const struct param_info *param, uint8_t *dst, size_t dstsize);
/* Add all supported fields to this variable. It is important to use the
* field type of a given field as the array index so that all the information
@@ -385,7 +385,7 @@
* @param dstsize Size of the memory passed in via the *dst pointer
* @return Number of copied bytes on success, 0 on error
*/
-static uint32_t hwilib_read_bytes(const struct param_info *param, uint8_t *dst, size_t dstsize)
+static size_t hwilib_read_bytes(const struct param_info *param, uint8_t *dst, size_t dstsize)
{
uint8_t i = 0, *blk = NULL;
@@ -541,7 +541,7 @@
* @param dstsize Size of the memory passed in via the *dst pointer
* @return Number of copied bytes on success, 0 on error
*/
-uint32_t hwilib_get_field(hwinfo_field_t field, uint8_t *dst, size_t dstsize)
+size_t hwilib_get_field(hwinfo_field_t field, uint8_t *dst, size_t dstsize)
{
/* Check the boundaries of params-variable */
if ((uint32_t)field < ARRAY_SIZE(params))
diff --git a/src/vendorcode/siemens/hwilib/hwilib.h b/src/vendorcode/siemens/hwilib/hwilib.h
index e4b11dd..2a4f4cd 100644
--- a/src/vendorcode/siemens/hwilib/hwilib.h
+++ b/src/vendorcode/siemens/hwilib/hwilib.h
@@ -123,6 +123,6 @@
/* Use this function to get fields out of supported info blocks
* This function returns the number of copied bytes or 0 on error.
*/
-uint32_t hwilib_get_field(hwinfo_field_t field, uint8_t *dst, size_t dstsize);
+size_t hwilib_get_field(hwinfo_field_t field, uint8_t *dst, size_t dstsize);
#endif /* SIEMENS_HWI_LIB_H_ */
--
To view, visit https://review.coreboot.org/c/coreboot/+/72667
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0a623f55b596297cdb6e17232828b9536c9a43e6
Gerrit-Change-Number: 72667
Gerrit-PatchSet: 2
Gerrit-Owner: Jan Samek <jan.samek(a)siemens.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Mario Scheithauer <mario.scheithauer(a)siemens.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Bao Zheng, Zheng Bao, Felix Held.
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/66854 )
Change subject: amdfwtool:combo: Create the combo header earlier
......................................................................
Patch Set 9:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/66854/comment/7b773dcc_392b53f2
PS9, Line 7: amdfwtool:combo:
I’d add a space before combo.
--
To view, visit https://review.coreboot.org/c/coreboot/+/66854
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If6ba3d10dfc598133b9adbbb2b6658f356455608
Gerrit-Change-Number: 66854
Gerrit-PatchSet: 9
Gerrit-Owner: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Attention: Zheng Bao
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 02 Mar 2023 14:31:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Bao Zheng, Zheng Bao, Felix Held.
Fred Reitberger has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/66856 )
Change subject: amdfwtool:combo: Add combo feature for BIOS table
......................................................................
Patch Set 8: Code-Review+1
(1 comment)
File util/amdfwtool/amdfwtool.c:
https://review.coreboot.org/c/coreboot/+/66856/comment/22a10f9c_ca63f86d
PS8, Line 2605: adjust_current_pointer(&ctx, 0, 0x1000U); /* TODO: is it necessary? */
Is this TODO necessary? Is it just to align on a 4K boundary?
--
To view, visit https://review.coreboot.org/c/coreboot/+/66856
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If0523a4a0e1f31969e4bbaa6062dcc0f2d6da420
Gerrit-Change-Number: 66856
Gerrit-PatchSet: 8
Gerrit-Owner: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Attention: Zheng Bao
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 02 Mar 2023 13:44:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Bao Zheng, Paul Menzel, Zheng Bao.
Fred Reitberger has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/66855 )
Change subject: amdfwtool: Separate two cases of combo and non-combo clearly
......................................................................
Patch Set 10: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/66855
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0057165aea553d9dc8e4e719e2804557229a0002
Gerrit-Change-Number: 66855
Gerrit-PatchSet: 10
Gerrit-Owner: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Zheng Bao
Gerrit-Comment-Date: Thu, 02 Mar 2023 13:12:53 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Bao Zheng, Zheng Bao, Felix Held.
Fred Reitberger has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/66854 )
Change subject: amdfwtool:combo: Create the combo header earlier
......................................................................
Patch Set 9: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/66854
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If6ba3d10dfc598133b9adbbb2b6658f356455608
Gerrit-Change-Number: 66854
Gerrit-PatchSet: 9
Gerrit-Owner: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Attention: Zheng Bao
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 02 Mar 2023 13:12:03 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Bao Zheng, Zheng Bao, Felix Held.
Fred Reitberger has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/66852 )
Change subject: amdfwtool: Move the filling of table headers into functions
......................................................................
Patch Set 11: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/66852
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib02c68c9f2ea84020b12682c41fb1a6f8f93d725
Gerrit-Change-Number: 66852
Gerrit-PatchSet: 11
Gerrit-Owner: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Fred Reitberger <reitbergerfred(a)gmail.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Attention: Zheng Bao
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Thu, 02 Mar 2023 13:07:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment