-
Notifications
You must be signed in to change notification settings - Fork 2
Changes for RPI5 -- somewhat functional? #3
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| #!/bin/sh | ||
| cp /usr/share/rpikernelhack/overlays/wlmio.dtbo /boot/overlays/ | ||
| cp /usr/share/rpikernelhack/overlays/wlmio.dtbo /boot/firmware/overlays/ | ||
| cp /usr/share/rpikernelhack/overlays/wlmio-pi5.dtbo /boot/firmware/overlays/ | ||
| rm -rf /usr/share/rpikernelhack/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,9 @@ | ||
| #!/bin/sh | ||
| if test "$1" = remove -a "$1" = abort-install -a "$1" = disappear; | ||
| then | ||
| dpkg-divert --no-rename --remove --package rpikernelhack /boot/overlays/wlmio.dtbo | ||
| rm /boot/overlays/wlmio.dtbo | ||
| dpkg-divert --no-rename --remove --package rpikernelhack /boot/firmware/overlays/wlmio.dtbo | ||
| rm /boot/firmware/overlays/wlmio.dtbo | ||
|
|
||
| dpkg-divert --no-rename --remove --package rpikernelhack /boot/firmware/overlays/wlmio-pi5.dtbo | ||
| rm /boot/firmware/overlays/wlmio-pi5.dtbo | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| #!/bin/sh | ||
| mkdir -p /usr/share/rpikernelhack/overlays/ | ||
| dpkg-divert --no-rename --package rpikernelhack --divert /usr/share/rpikernelhack/overlays/wlmio.dtbo /boot/overlays/wlmio.dtbo | ||
| dpkg-divert --no-rename --package rpikernelhack --divert /usr/share/rpikernelhack/overlays/wlmio.dtbo /boot/firmware/overlays/wlmio.dtbo | ||
| dpkg-divert --no-rename --package rpikernelhack --divert /usr/share/rpikernelhack/overlays/wlmio-pi5.dtbo /boot/firmware/overlays/wlmio-pi5.dtbo |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| /dts-v1/; | ||
| /plugin/; | ||
|
|
||
| / { | ||
| compatible = "brcm,bcm2712"; | ||
|
|
||
| fragment@0 { | ||
| target = <&spi0>; | ||
| __overlay__ { | ||
| status = "okay"; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@1 { | ||
| target = <&spidev0>; | ||
| __overlay__ { | ||
| status = "disabled"; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@2 { | ||
| target = <&gpio>; | ||
| __overlay__ { | ||
| can_pins: can_spi0_0_pins { | ||
| brcm,pins = <6 16>; | ||
| brcm,function = <0 0>; // GPIO INPUT | ||
| brcm,pull = <2 2>; // PULL-UP | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@3 { | ||
| target-path = "/clocks"; | ||
| __overlay__ { | ||
| can_osc: can_spi0_0_osc { | ||
| #clock-cells = <0>; | ||
| compatible = "fixed-clock"; | ||
| clock-frequency = <40000000>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@4 { | ||
| target = <&spi0>; | ||
| __overlay__ { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
|
|
||
| can: mcp2518fd@0 { | ||
| compatible = "microchip,mcp2518fd"; | ||
| reg = <0>; | ||
| pinctrl-names = "default"; | ||
| pinctrl-0 = <&can_pins>; | ||
| spi-max-frequency = <20000000>; | ||
| interrupt-parent = <&gpio>; | ||
| interrupts = <6 8>; // IRQ_TYPE_LEVEL_LOW | ||
| // interrupts-extended = <&gpio 6 8>; // IRQ_TYPE_LEVEL_LOW | ||
| clocks = <&can_osc>; | ||
| microchip,rx-int-gpios = <&gpio 16 1>; // GPIO_ACTIVE_LOW | ||
| }; | ||
|
|
||
| }; | ||
| }; | ||
|
|
||
| fragment@5 { | ||
| target = <&i2c_arm>; | ||
| __overlay__ { | ||
| #address-cells = <1>; | ||
| #size-cells = <0>; | ||
| status = "okay"; | ||
|
|
||
| mcp7941x: mcp7941x@6f { | ||
| compatible = "microchip,mcp7941x"; | ||
| reg = <0x6f>; | ||
| status = "okay"; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@6 { | ||
| target = <&uart2>; | ||
| __overlay__ { | ||
| pinctrl-names = "default"; | ||
| pinctrl-0 = <&uart2_pins>; | ||
| status = "okay"; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@7 { | ||
| target = <&uart4>; | ||
| __overlay__ { | ||
| pinctrl-names = "default"; | ||
| pinctrl-0 = <&uart4_pins>; | ||
| status = "okay"; | ||
| }; | ||
| }; | ||
|
|
||
| fragment@8 { | ||
| target = <&gpio>; | ||
| __overlay__ { | ||
| pinctrl-names = "default"; | ||
| pinctrl-0 = <&uavcan_address>; | ||
|
|
||
| uavcan_address: uavcan_address { | ||
| brcm,pins = <21 22 23 24 25 26 27>; | ||
| brcm,function = <0 0 0 0 0 0 0>; // GPIO INPUT | ||
| brcm,pull = <2 2 2 2 2 2 2>; // PULL-UP | ||
| }; | ||
| }; | ||
| }; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| executable('6040macal', '6040macal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('6050cal', '6050cal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('6070cal', '6070cal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('6090cal', '6090cal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('6090ccal', '6090ccal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('6180a_cal', '6180a_cal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('6190a_conf', '6190a_conf.c', dependencies: [wlmio_dep], install: true) | ||
| executable('factoryreset', 'factoryreset.c', dependencies: [wlmio_dep], install: true) | ||
| executable('fwupdate', 'fwupdate.c', dependencies: [canard_dep, libgpiod_dep], install: true) | ||
| executable('infodump', 'infodump.c', dependencies: [wlmio_dep], install: true) | ||
| executable('monitor', 'monitor.c', dependencies: [wlmio_dep], install: true) | ||
| executable('regtool', 'regtool.c', dependencies: [wlmio_dep], install: true) | ||
| executable('store', 'store.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_6040macal', '6040macal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_6050cal', '6050cal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_6070cal', '6070cal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_6090cal', '6090cal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_6090ccal', '6090ccal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_6180a_cal', '6180a_cal.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_6190a_conf', '6190a_conf.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_factoryreset', 'factoryreset.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_fwupdate', 'fwupdate.c', dependencies: [canard_dep, libgpiod_dep], install: true) | ||
| executable('wl_infodump', 'infodump.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_monitor', 'monitor.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_regtool', 'regtool.c', dependencies: [wlmio_dep], install: true) | ||
| executable('wl_store', 'store.c', dependencies: [wlmio_dep], install: true) | ||
|
Comment on lines
+8
to
+13
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These names specifically are problematic in their generic nature the better alternative might be changing the prefix to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you seen any conflicts in the wild? |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like this should be achieved via overlay_map.dtb with the common bits being targeted at any platform and the chip specific UART separately.
I tested breaking out the fragments it seemed to work as well as the whole file but the compatible directive doesn't seem to exclude application.
My current workaround is using dtoverlay wlmio-pi5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to remove overlays entirely for this package. overlay_map.dtb is a hack. Instead we are going to ship a wlmio.txt to be included with
include wlmio.txtin config.txt that will handle all of the platform differences in an easy way for users.There is a symlink to /boot/firmware/overlays at /boot/overlays so I think we will rely on this for now to support bullseye.