Porting changes from islands-components/spin2
Merge pull request #971 from incrop/incrop.spin-port

spin: Port changes from islands-components/spin2