]> git.baikalelectronics.ru Git - kernel.git/commit
fsi: aspeed: Support CFAM reset GPIO
authorJoel Stanley <joel@jms.id.au>
Tue, 28 Jul 2020 02:55:27 +0000 (12:25 +0930)
committerJoel Stanley <joel@jms.id.au>
Thu, 10 Sep 2020 02:56:43 +0000 (12:26 +0930)
commitaf2ed03d2dac47f1eeb4f250b347723cd6ddf42c
treec8c917f9c05ec83efd97474e0bb2b4307e6f5bab
parentced0ba76414213aeecae2353301756f7194ae417
fsi: aspeed: Support CFAM reset GPIO

Systems have a line for restting the remote CFAM. This is not part of
the FSI master, but is associated with it, so it makes sense to include
it in the master driver.

This exposes a sysfs interface to reset the cfam, abstracting away the
direction and polarity of the GPIO, as well as the timing of the reset
pulse. Userspace will be blocked until the reset pulse is finished.

The reset is hard coded to be in the range of (900, 1000) us. It was
observed with a scope to regularly be just over 1ms.

If the device tree property is not preset the driver will silently
continue.

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Link: https://lore.kernel.org/r/20200728025527.174503-6-joel@jms.id.au
Signed-off-by: Joel Stanley <joel@jms.id.au>
Documentation/ABI/testing/sysfs-bus-fsi
drivers/fsi/fsi-master-aspeed.c