Disable SPI on ICSP Header

I'm trying to use pins 15 and 16 on the Yun as additional GPIO, but I'm running into trouble because something else is also active on those pins (I'm guessing SPI / that little tranceiver chip). When I create a very simple sketch that enables pull-ups and probe pins 15 and 16 (which are the MOSI and SCK pins on the ICSP header), they're only pulled up to 0.5V. Pin 11 gets pulled up all the way to 5V as it should. Pin 13 is just there to make sure that my Yun was still alive :)

void setup() {
  // put your setup code here, to run once:
  pinMode(11, INPUT_PULLUP);
  pinMode(15, INPUT_PULLUP);
  pinMode(16, INPUT_PULLUP);
  pinMode(13, OUTPUT);

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second

My suspicion as mentioned before is that the little NTB0104 chip is active and fighting my pullups. Is there a way to disable this chip &/or ensure that these pins are 100% freed up to be used as basic inputs?

Go figure... just needed a little more patience and the right search terms. I was able to shut down the NTB0104 by forcing GP21 low on the linux side with the following:

echo 21 > /sys/class/gpio/export
echo "high" > /sys/class/gpio/gpio21/direction
echo 0 > /sys/class/gpio/gpio21/value
echo 21 > /sys/class/gpio/unexport

This allowed my pullups to work perfectly!

I have exactly the same issue - 1x NFR24l01 Transceiver on the Yuns SPI pins (ICSP header).

Tried for ages to and everything to get it working.

I have tried your code it shows this error. But magically cleared the problem and starts the SPI working with the NRF ? - No idea My full Post here:-


Maybe someone knows what to do to fix it.? For now I've ran this in the .rc file as a startup Bash to try clear the issue. Feels like a "brush under the carpet fix" but hey.

root@arduinoyun:~# reset-mcu2
ash: write error: Device or resource busy
/usr/bin/reset-mcu2: line 3: can't create /sys/class/gpio/gpio21/direction: nonexistent directory
ash: write error: Invalid argument