Attention is currently required from: Jason Glenesk, Raul Rangel, Furquan Shaikh, Marshall Dawson, Felix Held. Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/52763 )
Change subject: soc/amd/common: Add placeholder GPIO macro, PAD_UNCHANGED ......................................................................
Patch Set 1:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/52763/comment/90341026_6d718e52 PS1, Line 9: GPIOs can only be updated in gpio_configure_pads_with_override() if they : are present in the base table. If they are not there, the override : does not work. This allows them to be in the base table so that they can : be overridden without changing the existing configuration.
This is nothing to do about "behavior in Intel ChromeOS platforms". […]
Why must a mainboard configure all pads in ramstage? You say this like it's a given and should be obvious but I don't understand the reason other than it being a rule that needs to be followed. I mean, I absolutely agree with the rule that all of the pads must be configured, but saying that they must be configured in ramstage seems arbitrary.
Also, if all registers must be configured in ramstage, why don't we implement a check in ramstage to verify that all the gpios have gotten run through the setup pad routine? If that's the goal, saying that the variant can't update it unless it's configured in ramstage seems like an odd way to check it.
As far as the PAD_UNCHANGED register, thats a convenience so that we don't have to reconfigure the programming in the ramstage table every time we update a setting PRIOR to ramstage, but can still allow it to be updated in the board variant. I'm trying to avoid the issue that *WILL* happen of where someone updates a setting prior to ramstage and then forgets to update it in both places.
If that's a bad plan, and we really want to update every gpio pad in ramstage, whether they've already been set or not I can do that, but I honestly believe that it will lead to bugs down the line.