-
Notifications
You must be signed in to change notification settings - Fork 16
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
ubuntu 20.04 support #6
Comments
made a new dts, this works for me
|
The invalid syntax is just the $ dtc -O dtb -o emc2301.dtbo overlays/cm4io-fan-overlay.dts
overlays/cm4io-fan-overlay.dts:22.17-30: Warning (reg_format): /fragment@1/__overlay__/emc2301@2f:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
overlays/cm4io-fan-overlay.dts:26.29-29.19: Warning (unit_address_vs_reg): /fragment@1/__overlay__/emc2301@2f/fan@0: node has a unit name, but no reg property
emc2301.dtbo: Warning (pci_device_reg): Failed prerequisite 'reg_format'
emc2301.dtbo: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
emc2301.dtbo: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
emc2301.dtbo: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
emc2301.dtbo: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
overlays/cm4io-fan-overlay.dts:21.33-30.15: Warning (avoid_default_addr_size): /fragment@1/__overlay__/emc2301@2f: Relying on default #address-cells value
overlays/cm4io-fan-overlay.dts:21.33-30.15: Warning (avoid_default_addr_size): /fragment@1/__overlay__/emc2301@2f: Relying on default #size-cells value
emc2301.dtbo: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
emc2301.dtbo: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size' We can make those warnings go away with this patch (I think I got the addressing right, but admittedly I have very little idea of what I'm doing): diff --git a/overlays/cm4io-fan-overlay.dts b/overlays/cm4io-fan-overlay.dts
index 64856b1..bf053d2 100644
--- a/overlays/cm4io-fan-overlay.dts
+++ b/overlays/cm4io-fan-overlay.dts
@@ -18,12 +18,14 @@
fragment@1 {
target = <&i2c_csi_dsi>;
__overlay__ {
+ #address-cells = <0x01>;
+ #size-cells = <0x00>;
fanctrl: emc2301@2f {
reg = <0x2f>;
compatible = "microchip,emc2301";
#cooling-cells = <0x02>;
- fan0: fan@0 {
+ fan0: fan {
min-rpm = /bits/ 16 <3500>;
max-rpm = /bits/ 16 <5500>;
}; That doesn't fix things though, as the build still outputs |
#11 gets things into a better place for 21.10, which is the suggested version to install (currently) for CM4 support of Ubuntu Server. |
There are a lot of changes between 5.4 and 5.10-and-up kernels that made implementing this driver a lot simpler and easier, and I don't have the necessary knowhow to backport this to 5.4, unfortunately. 5.4 support for the CM4 is rather lacking in general, to be honest. I'd recommend upgrading to 21.10 as @sdwilsh has suggested. I've not used Ubuntu on a Pi at all myself - I stick to more lightweight OSes - but if Ubuntu on the Pi offers HWE kernels like it does on x86_64, you should be able to bring yourself up to 5.11 that way (assuming you don't need to stay on 5.4 for some reason or another). The dtoverlay issue is going to come down to the older device tree bindings (and possibly older base device tree) in the older Ubuntu build. As for why |
Hi,
i couldnt figure out yet how to get it working on ubuntu 20.04
the latest kernel there is 5.4.0-1042-raspi
the module compiles fine but it requires changing the regex in dkms.conf
the bigger challange is getting the dtb to compile. right now it just doesnt... and i dont understand how its supposed to work
none of the makefiles contain any call to dtc, so i'm not sure how this works in the first place
calling dtc directly wont work either, since the dts is not valid syntax.
The text was updated successfully, but these errors were encountered: