Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config options for supporting openlabs 802.15.4 radio? #1151

Closed
katiska opened this issue Oct 2, 2015 · 16 comments
Closed

Config options for supporting openlabs 802.15.4 radio? #1151

katiska opened this issue Oct 2, 2015 · 16 comments

Comments

@katiska
Copy link

katiska commented Oct 2, 2015

Would it be possible to include the config options required by the openlabs 802.15.4 radio?

This allows the RasPi to be used as a 6LoWPAN border router using linux-wpan.

The required kernel options and .dts: (source)

CONFIG_IEEE802154
CONFIG_IEEE802154_6LOWPAN
CONFIG_MAC802154
CONFIG_IEEE802154_DRIVERS
CONFIG_IEEE802154_AT86RF230

&spi {
    status = "okay";
    at86rf233@0 {
        compatible = "atmel,at86rf233";
        reg = <0>;
        interrupts = <23 1>;
        interrupt-parent = <&gpio>;
        reset-gpio = <&gpio 24 1>;
        sleep-tpio = <&gpio 25 1>;
        spi-max-frequency = <500000>;
    };
};
popcornmix added a commit to raspberrypi/firmware that referenced this issue Oct 4, 2015
kernel: config: Add CONFIG_CRYPTO_USER_API_SKCIPHER
See: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=121892&p=824204&hilit=cryptsetup#p824204

kernel: config: Add options for supporting openlabs 802.15.4 radio
See: raspberrypi/linux#1151

firmware: arm_loader: Add clear of polled register so linux doesn't report a timeout in bcm2709_boot_secondary
See: #369

firmware: arm_loader: Fix HAT probing to always restore the original state
See: raspberrypi/linux#1144
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Oct 4, 2015
kernel: config: Add CONFIG_CRYPTO_USER_API_SKCIPHER
See: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=121892&p=824204&hilit=cryptsetup#p824204

kernel: config: Add options for supporting openlabs 802.15.4 radio
See: raspberrypi/linux#1151

firmware: arm_loader: Add clear of polled register so linux doesn't report a timeout in bcm2709_boot_secondary
See: raspberrypi/firmware#369

firmware: arm_loader: Fix HAT probing to always restore the original state
See: raspberrypi/linux#1144
@popcornmix
Copy link
Collaborator

I've added the config options to latest rpi-update.
@pelwell how do you want to do the overlay?

@pelwell
Copy link
Contributor

pelwell commented Oct 4, 2015

I'll write one tomorrow and attach the .dtb for testing.

@pelwell
Copy link
Contributor

pelwell commented Oct 5, 2015

A .tgz containing the source and .dtb file for the overlay can be found here. The extract from the README say:

Name:   at86rf233
Info:   Configures the Atmel AT86RF233 802.15.4 low-power WPAN transceiver,
        connected to spi0.0
Load:   dtoverlay=at86rf233,<param>=<val>
Params: interrupt                GPIO used for INT (default 23)
        reset                    GPIO used for Reset (default 24)
        sleep                    GPIO used for Sleep (default 25)
        speed                    SPI bus speed in Hz (default 750000)
        trim                     Fine tuning of the internal capacitance
                                 arrays (0=+0pF, 15=+4.5pF, default 15)

There have been some slight changes - SPI clock speed now 750KHz, the use of a level-sensitive interrupt, and the addition of the trim parameter - based on information found online.

Unless I hear of a problem this will appear in the next release.

@katiska
Copy link
Author

katiska commented Oct 5, 2015

That's great! Thank you for the quick response.

Would you, @alexaring (linux-wpan) or @benemorius (openlabs), have any comments on this?

pelwell pushed a commit that referenced this issue Oct 6, 2015
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: #1151
@pelwell
Copy link
Contributor

pelwell commented Oct 6, 2015

I've pushed the commit containing the overlay. Let me know if you experience any problems, and close the issue if it works.

pelwell pushed a commit that referenced this issue Oct 6, 2015
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: #1151
popcornmix added a commit to raspberrypi/firmware that referenced this issue Oct 10, 2015
See: #481

kernel: bcm2835-gpiomem: Fix for ARCH_BCM2835 builds
See: raspberrypi/linux#1154

kernel: BCM270X_DT: Add at86rf233 overlay
See: raspberrypi/linux#1151

kernel: BCM270X_DT: Make mmc overlay compatible with current firmware

firmware: arm_loader: Support DT commands in included files
See: #414

firmware: di_adv: Need up align up height to at least 4
See: https://discourse.osmc.tv/t/problems-with-divx5-videos-after-september-update/8499/7

firmware: Allow loading of tuning data from a memory block
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Oct 10, 2015
See: raspberrypi/firmware#481

kernel: bcm2835-gpiomem: Fix for ARCH_BCM2835 builds
See: raspberrypi/linux#1154

kernel: BCM270X_DT: Add at86rf233 overlay
See: raspberrypi/linux#1151

kernel: BCM270X_DT: Make mmc overlay compatible with current firmware

firmware: arm_loader: Support DT commands in included files
See: raspberrypi/firmware#414

firmware: di_adv: Need up align up height to at least 4
See: https://discourse.osmc.tv/t/problems-with-divx5-videos-after-september-update/8499/7

firmware: Allow loading of tuning data from a memory block
@alexaring
Copy link
Contributor

Hi,
sorry for the delay. I had the experience that some of the openlabs module can't run at the highest 7.5 Mhz clockrate. I set it to 6 Mhz and then it's working fine again, otherwise I had some incorrect data on the spi bus.

Otherwise it's looking good. Thanks.

Please refer: http://lists.infradead.org/pipermail/linux-rpi-kernel/2015-May/001685.html

pelwell pushed a commit that referenced this issue Oct 12, 2015
The AT86RF233 has been found to be unreliable on a 7.5MHz SPI bus,
so reduce the default frequency to 6MHz.

See: #1151
pelwell pushed a commit that referenced this issue Oct 12, 2015
The AT86RF233 has been found to be unreliable on a 7.5MHz SPI bus,
so reduce the default frequency to 6MHz.

See: #1151
@pelwell
Copy link
Contributor

pelwell commented Oct 12, 2015

Thanks for the feedback, @alexaring - I've reduced the default clock frequency to 6MHz,

@katiska OK to close?

@katiska
Copy link
Author

katiska commented Oct 12, 2015

I'm still hitting that data corruption issue at 6 MHz. In my case it seems that the frequency needs to be lowered down to 4 MHz to make it work properly.

@alexaring
Copy link
Contributor

Okay, make it so. I am still fine with 4 Mhz to be sure all openlabs module will working properly.

Did you test it with 4 Mhz and everything was working fine then?

@katiska
Copy link
Author

katiska commented Oct 12, 2015

Well, I haven't really managed to set up a proper WSN system yet. Just by looking at the periodic RPL DIS packets sent by a CC2650 SensorTag (Contiki), Wireshark showed a lot of corrupt packets at 6 MHz and 5 MHz. At 4 Mhz all the packets I saw were OK. I need to do more testing with proper configuration and traffic.

@njarvis
Copy link

njarvis commented Oct 16, 2015

On Raspberry PI 2 with the openlabs 802.15.4 radio, I had to reduce the speed to 2MHz.

In my /boot/config.txt:

dtoverlay=at86rf233,speed=2000000

@pelwell
Copy link
Contributor

pelwell commented Oct 16, 2015

Any advance on 2MHz? It would be nice to establish a safe maximum.

@njarvis
Copy link

njarvis commented Oct 16, 2015

OK, did a further binary chop, and it is also stable at 3Mhz. Definitely does not work for me at 4MHz (I retested).

My setup is three Raspberry PI 2s; one radio in monitor and the other two running 6lowpan and showing IPv6 traffic successfully passing.

@alexaring
Copy link
Contributor

I am fine with 3 Mhz if this seems to be working correct as a maximum safe value.
This is already under the half of possible maximum clock rate. We should not go lower than this value.

pelwell pushed a commit that referenced this issue Oct 23, 2015
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: #1151
pelwell pushed a commit that referenced this issue Oct 23, 2015
The AT86RF233 has been found to be unreliable on a 7.5MHz SPI bus,
so reduce the default frequency to 6MHz.

See: #1151
pelwell pushed a commit that referenced this issue Oct 25, 2015
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: #1151
pelwell pushed a commit that referenced this issue Oct 25, 2015
The AT86RF233 has been found to be unreliable on a 7.5MHz SPI bus,
so reduce the default frequency to 6MHz.

See: #1151
pelwell pushed a commit that referenced this issue Oct 27, 2015
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: #1151
pelwell pushed a commit that referenced this issue Oct 27, 2015
The AT86RF233 has been found to be unreliable on a 7.5MHz SPI bus,
so reduce the default frequency to 6MHz.

See: #1151
tabp0le pushed a commit to tabp0le/ubuntu_xenial_kernel that referenced this issue Dec 22, 2016
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
tabp0le pushed a commit to tabp0le/ubuntu_xenial_kernel that referenced this issue Dec 22, 2016
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
perfecto-devops pushed a commit to perfecto-devops/ubuntu-xenial that referenced this issue Feb 2, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
perfecto-devops pushed a commit to perfecto-devops/ubuntu-xenial that referenced this issue Feb 2, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
Noltari pushed a commit to Noltari/linux that referenced this issue Feb 6, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
Noltari pushed a commit to Noltari/linux that referenced this issue Feb 6, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
kernel: config: Add CONFIG_CRYPTO_USER_API_SKCIPHER
See: https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=121892&p=824204&hilit=cryptsetup#p824204

kernel: config: Add options for supporting openlabs 802.15.4 radio
See: raspberrypi/linux#1151

firmware: arm_loader: Add clear of polled register so linux doesn't report a timeout in bcm2709_boot_secondary
See: raspberrypi#369

firmware: arm_loader: Fix HAT probing to always restore the original state
See: raspberrypi/linux#1144
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
See: raspberrypi#481

kernel: bcm2835-gpiomem: Fix for ARCH_BCM2835 builds
See: raspberrypi/linux#1154

kernel: BCM270X_DT: Add at86rf233 overlay
See: raspberrypi/linux#1151

kernel: BCM270X_DT: Make mmc overlay compatible with current firmware

firmware: arm_loader: Support DT commands in included files
See: raspberrypi#414

firmware: di_adv: Need up align up height to at least 4
See: https://discourse.osmc.tv/t/problems-with-divx5-videos-after-september-update/8499/7

firmware: Allow loading of tuning data from a memory block
JackieLiu1 pushed a commit to JackieLiu1/kernel that referenced this issue Mar 23, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
JackieLiu1 pushed a commit to JackieLiu1/kernel that referenced this issue Mar 23, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
woshihuangzhijie pushed a commit to woshihuangzhijie/linuxcode that referenced this issue Sep 20, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
woshihuangzhijie pushed a commit to woshihuangzhijie/linuxcode that referenced this issue Sep 20, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
amichelotti pushed a commit to amichelotti/ubuntu-vme-xenial that referenced this issue Oct 19, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
amichelotti pushed a commit to amichelotti/ubuntu-vme-xenial that referenced this issue Oct 19, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
lianhaidong pushed a commit to lianhaidong/ubuntu-xenial that referenced this issue Nov 6, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
lianhaidong pushed a commit to lianhaidong/ubuntu-xenial that referenced this issue Nov 6, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 14, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 14, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
polceanum pushed a commit to polceanum/ubuntu-xenial that referenced this issue Feb 6, 2018
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
polceanum pushed a commit to polceanum/ubuntu-xenial that referenced this issue Feb 6, 2018
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
APokorny pushed a commit to ubports/ubuntu_kernel_xenial that referenced this issue Oct 11, 2018
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
APokorny pushed a commit to ubports/ubuntu_kernel_xenial that referenced this issue Oct 11, 2018
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
hisenyiu2015 pushed a commit to hisenyiu2015/msm-4.14 that referenced this issue May 20, 2021
Add an overlay to support the Atmel AT86RF233 WPAN transceiver on spi0.0.

See: raspberrypi/linux#1151
hisenyiu2015 pushed a commit to hisenyiu2015/msm-4.14 that referenced this issue May 20, 2021
The consensus is that 6MHz is too fast, but that 3MHz is OK.

See: raspberrypi/linux#1294
     raspberrypi/linux#1151
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants