[PATCH linux dev-4.7 v2 0/1] Enable pinctrl to modify SPI1 strap bits

Andrew Jeffery andrew at aj.id.au
Fri Nov 4 12:04:39 AEDT 2016


On Fri, 2016-11-04 at 10:10 +1030, Joel Stanley wrote:
> On Fri, Nov 4, 2016 at 4:13 AM, Kun Yi <kunyi at google.com> wrote:
> > 
> > Hi,
> > 
> > Context: re. Andrew's suggestion to a previous RFC proposal[1].
> > 
> > To modify SPI1 mode at runtime, pinctrl subsystem will need to add exception to
> > the read-only HWSTRAP rule. This patch does precisely that.
> > 
> > Sending this out as a standalone patch since it seems to me this change could
> > also make boot time SPI1 mode configuration easier. Instead of configuring
> > the strap bits in mach-aspeed/aspeed.c AND make sure device tree pinctrl
> > settings match what was configured, with this change device tree entry
> > should dictate default SPI1 mode regardless of what's set previously. E.g.
> > following node will be able to configure spi1 in master mode.
> > 
> > &spi1 {
> >         status = "okay";
> > 
> >         pinctrl-names = "default";
> >         pinctrl-0 = <&pinctrl_spi1_default>;
> > };
> > 
> > I saw Joel sent out a patch that configures SPI1 to master for every AST2500
> > machine, do we not have any uses currently for other modes?
> > 
> > [1] https://lists.ozlabs.org/pipermail/openbmc/2016-October/005194.html
> Not presently. All of the other systems have the BMC as the owner of
> the flash, and any operations go through the software on the BMC.
> 
> For instance, booting will be done by copying the relevant parts of
> flash into SDRAM and pointing the LPC mapping at this location. We
> call that 'memboot'.
> 
> I like your patches; it's much cleaner to put the desired
> configuration in the device tree and have the software do the right
> thing than to have hacks in the board file. If Andrew and yourself can
> agree on an implmeentaiton, I will remove the setting of the mux from
> the board file and go with your patch instead.

Absolutely agree here.

Andrew

> 
> Cheers,
> 
> Joel
> > 
> > 
> > Thanks,
> > Kun
> > 
> > Changes since v1:
> > 
> > - Allowed modifying partial bits of SPI1 strap bitmask instead of strictly
> >   allowing only bitmask == BIT[13:12] to go through
> > - Rename HW_STRAP_RESET to HW_STRAP_CLEAR and removed (to be obsoleted) macro
> > 
> > Kun Yi (1):
> >   pinctrl: aspeed: Enable ASPEED pinctrl driver to modify SPI1 strap
> >     bits
> > 
> >  drivers/pinctrl/aspeed/pinctrl-aspeed.c | 22 ++++++++++++++++++++--
> >  drivers/pinctrl/aspeed/pinctrl-aspeed.h |  2 +-
> >  2 files changed, 21 insertions(+), 3 deletions(-)
> > 
> > --
> > 2.8.0.rc3.226.g39d4020
> > 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20161104/0202a0ba/attachment.sig>


More information about the openbmc mailing list