[RESEND PATCH linux] aspeed: pinctrl: Allow disabling Port D and Port E loopback mode

Joel Stanley joel at jms.id.au
Fri Feb 17 13:24:09 AEDT 2017


[removing upstream cc]

On Thu, Feb 16, 2017 at 12:02 PM, Andrew Jeffery <andrew at aj.id.au> wrote:
> On Tue, 2017-02-14 at 22:55 -0800, Rick Altherr wrote:
>> Port D and port E GPIO loopback modes are commonly enabled via hardware
>> straps for use with front-panel buttons.  When the BMC is powered
>> off or fails to boot, the front-panel buttons are directly connected to
>> the host chipset via the loopback to allow direct power-on and reset
>> control. Once the BMC has booted, the loopback mode must be disabled for
>> the BMC to take over control of host power-on and reset.
>>
>> Disabling these loopback modes requires writing to the hardware strap
>> register which violates the current design of assuming the system
>> designer chose the strap settings for a specific reason and they should
>> be treated as read-only. Only the two bits of the strap register related
>> to these loopback modes are allowed to be written and comments have been
>> added to explain why.
>>
>> Signed-off-by: Rick Altherr <raltherr at google.com>
>
> For the record this is one of at least two awkward cases. The other is
> runtime switching between the using the SoC as an SPI master, and
> simply performing SPI pass-through for an external controller (e.g. to
> allow either the BMC or the host to reprogram the host BIOS image).
>
> If the list of exceptions continues to grow we should pull the tests
> out to a separate function so we can keep the condition readable.
>
> Reviewed-by: Andrew Jeffery <andrew at aj.id.au>

I have applied this to dev-4.7.

Cheers,

Joel

>
>> ---
>>  drivers/pinctrl/aspeed/pinctrl-aspeed.c | 14 ++++++++++++--
>>  1 file changed, 12 insertions(+), 2 deletions(-)


More information about the openbmc mailing list