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

char: silabs: si446x (SiLabs Si446x Transceiver) driver added. #4430

Closed
wants to merge 3 commits into from

Conversation

sunipkm
Copy link

@sunipkm sunipkm commented Jul 4, 2021

Implements basic API calls over ioctl, and receive/transmit using read/write. Reads can be non-blocking with polling support. Writes are blocking. Overlay si446x-spi0 provided.
The device is initialized by an userspace program that requires inclusion of the radio configuration generated by the WDS tool from SiLabs, and patched following Zak Kemble's guide (https://blog.zakkemble.net/si4463-radio-library-avr-arduino/).

@pelwell
Copy link
Contributor

pelwell commented Jul 4, 2021

I'll accept the overlay (with an appropriate README entry), but the driver needs to be submitted upstream to the Linux kernel maintainers.

@sunipkm
Copy link
Author

sunipkm commented Jul 4, 2021

I have removed the driver, and updated the README for the overlay as requested.

Copy link
Contributor

@pelwell pelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few small issues with the overlay and README entry that I've commented on, but the real problem with this PR is that without the driver people can't use it, and if they're building their own kernel/module they might as well build the overlay with it.

@@ -2720,6 +2720,12 @@ Params: speed SPI bus speed (default 4000000)
reset_pin GPIO pin for RESET (default 25)
height Display height (32 or 64; default 64)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blank lines between overlays, please.

Load: dtoverlay=si446x-spi0,<param>=<val>
Params: speed SPI bus speed (default 4000000)
int_pin GPIO pin for interrupts (default 17)
reset_pin GPIO pin for RESET (default 27)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another blank line here.

@@ -2720,6 +2720,12 @@ Params: speed SPI bus speed (default 4000000)
reset_pin GPIO pin for RESET (default 25)
height Display height (32 or 64; default 64)

Name: si446x-spi0
Info: Overlay for Si446x UHF Transceiver via SPI using si446x driver (currently out-of-tree at https://github.com/sunipkmukherjee/silabs.git)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is far too long - there is a hard limit of 80 characters in this file.

/plugin/;

/ {
compatible = "brcm,bcm2708";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "brcm,bcm2835".

<&uhf0>, "irq_pin:0",
<&uhf0_pins>, "brcm,pins:0";
reset_pin = <&uhf0>, "sdn_pin:0",
<&uhf0_pins>, "brcm,pins:1";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offset for a parameter target is in bytes - this should say "brcm,pins:4".

@sunipkm
Copy link
Author

sunipkm commented Jul 5, 2021

There are a few small issues with the overlay and README entry that I've commented on, but the real problem with this PR is that without the driver people can't use it, and if they're building their own kernel/module they might as well build the overlay with it.

I agree with you that anyone using the driver can build their own overlay as well. I have submitted a message to LKML, and waiting for a follow up. In the mean time, the inclusion of the overlay can point people towards the code, and independent testing that will be very helpful. The available info/code about this transceiver is not large, which is why I am looking into getting this to a place that can benefit others.

Thanks for the corrections on the overlay.

pelwell pushed a commit that referenced this pull request Jul 13, 2021
@pelwell
Copy link
Contributor

pelwell commented Jul 13, 2021

Fixed up and merged offline.

@pelwell pelwell closed this Jul 13, 2021
pelwell pushed a commit that referenced this pull request Jul 14, 2021
pelwell pushed a commit that referenced this pull request Jul 14, 2021
pelwell pushed a commit that referenced this pull request Jul 14, 2021
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Jul 14, 2021
kernel: KMS and FKMS right/bottom margin fixes
See: raspberrypi/linux#4451

kernel: overlays: Add overlay for Si446x Transceiver SPI
See: raspberrypi/linux#4430

kernel: ARM: dts: bcm2711: fold in the correct interrupt

kernel: dtoverlays: Add overlay for cap1106 capacitive touch sensor
See: raspberrypi/linux#4442

firmware: arm_loader: Add rng-seed DT property
See: #1595

firmware: isp: Set the YUV420/YVU420 format stride to 64 byte
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Jul 14, 2021
kernel: KMS and FKMS right/bottom margin fixes
See: raspberrypi/linux#4451

kernel: overlays: Add overlay for Si446x Transceiver SPI
See: raspberrypi/linux#4430

kernel: ARM: dts: bcm2711: fold in the correct interrupt

kernel: dtoverlays: Add overlay for cap1106 capacitive touch sensor
See: raspberrypi/linux#4442

firmware: arm_loader: Add rng-seed DT property
See: raspberrypi/firmware#1595

firmware: isp: Set the YUV420/YVU420 format stride to 64 byte
popcornmix pushed a commit that referenced this pull request Jul 15, 2021
popcornmix pushed a commit that referenced this pull request Jul 15, 2021
popcornmix pushed a commit that referenced this pull request Jul 21, 2021
popcornmix pushed a commit that referenced this pull request Jul 21, 2021
limeng-linux pushed a commit to limeng-linux/linux-yocto-5.10 that referenced this pull request Jul 23, 2021
commit  4d94d5c99bf36f3a11529277d3c7eef455ca352c from
https://github.com/raspberrypi/linux.git rpi-5.10.y

See: raspberrypi/linux#4430

Signed-off-by: Sunip K. Mukherjee <[email protected]>
Signed-off-by: Meng Li <[email protected]>
popcornmix pushed a commit that referenced this pull request Jul 23, 2021
popcornmix pushed a commit that referenced this pull request Jul 27, 2021
popcornmix pushed a commit that referenced this pull request Jul 27, 2021
popcornmix pushed a commit that referenced this pull request Jul 27, 2021
popcornmix pushed a commit that referenced this pull request Aug 11, 2021
Noltari pushed a commit to Noltari/rpi-linux that referenced this pull request Aug 20, 2021
popcornmix pushed a commit that referenced this pull request Aug 21, 2021
popcornmix pushed a commit that referenced this pull request Sep 8, 2021
popcornmix pushed a commit that referenced this pull request Sep 15, 2021
popcornmix pushed a commit that referenced this pull request Sep 30, 2021
@pelwell
Copy link
Contributor

pelwell commented Mar 3, 2023

Did you get anywhere with the upstreaming? Some checking has just flagged silabs,si446x as a compatible string that isn't implemented by any drivers in our trees.

@sunipkm
Copy link
Author

sunipkm commented Mar 4, 2023 via email

@pelwell
Copy link
Contributor

pelwell commented Mar 6, 2023

No problem - I'll add the compatible string to the list of exceptions.

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

Successfully merging this pull request may close these issues.

2 participants