Coder Social home page Coder Social logo

seeed-studio / seeed-linux-dtoverlays Goto Github PK

View Code? Open in Web Editor NEW
74.0 18.0 52.0 3.5 MB

Device Tree Overlays for Seeed boards

License: Other

Makefile 0.25% Shell 0.76% C 98.78% Perl 0.02% Assembly 0.18%
device-trees overlays raspberry-pi seeed-linux-dtverlays

seeed-linux-dtoverlays's Introduction

seeed-linux-dtoverlays

On embedded systems, the Device Tree helps the kernel understand various peripherals that are connected to the board and how to initialize them. These hardware might be things like LDO regulators, various controllers, GPIO, etc which are generic, but yet needs certain configuration that should not be hard-coded into the kernel. To understand more about device trees I recommend you start with the Raspberry Pi documentation on this topic. There are more links at the end of this article.

Overlays:

Step 1: Clone this repo:

git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays
cd seeed-linux-dtoverlays

Step 2: Compile the code

#Select platform by replacing word <platform> to
#one of {jetsonnano bb stm32mp1 rpi imx6ull}.
#On iMx6ull-NPI
make all_imx6ull
#on RPI
make all_rpi
#On beagleboard
make all_bb
#On JetsonNano
make all_jetsonnano

Step 3: Install *.dtbo:

#On iMx6ull-NPI
sudo make install_imx6ull
#on RPI
sudo make install_rpi
#On beagleboard
sudo make install_bb
#On JetsonNano
sudo make install_jetsonnano

more:

@echo "Targets:"
@echo "  all_<PLATFORM>:            Build all device tree binaries for <PLATFORM>"
@echo "  clean_<PLATFORM>:          Clean all generated files for <PLATFORM>"
@echo "  install_<PLATFORM>:        Install all generated files for <PLATFORM> (sudo)"
@echo ""
@echo "  overlays/<PLATFORM>/<DTS>.dtbo   Build a single device tree binary"
@echo ""
@echo "PLATFORMES: jetsonnano bb stm32mp1 rpi imx6ull"

Further Reading

Modules:


Mainline does not have a kernel module, or there is controversy about a kernel module that does work well. We will also collect them together and put them here. The kernel modules will have the corresponding documentation and detailed instructions。

seeed-linux-dtoverlays's People

Contributors

aiwintermuteai avatar ansonhe97 avatar baorepo avatar bigbearishappy avatar hansen0314 avatar is-qian avatar jiacheng-lu avatar kkyarlagadda avatar kyletryon avatar lakshanthad avatar leadercxn avatar luhuadong avatar lynnl4 avatar matsujirushi avatar mingzhangqun avatar mnakai3 avatar neggles avatar paraphraser avatar pillar1989 avatar qvixoteroux avatar turmary avatar wangcoolc avatar zhenhualiang-seeed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seeed-linux-dtoverlays's Issues

reTerminal: Problems with LCD touch screen after installing Raspbian 64-bit Bullseye

Describe the bug
When reTerminal Drivers are installed and system is booted, is seems like Raspbian hits an infinite reboot condition. After 5-10 minutes it finally boots up and the system appears on the LCD screen. I am not sure if this I an LCD screen problem or something else, but it is not behaving as it should. When it boots, the touch screen is not working correctly either.

UPDATE 3/10-22:
I tried to reinstall the system several times, now it seems to be booting ok, however the touch screen is completely messed up. There is a huge displacement.

UPDATE 4/10-22:
I flashed the FW on the STM controller, however the touch interface is still messed up.

To Reproduce
Steps to reproduce the behavior:

  1. Follow the guide here https://wiki.seeedstudio.com/reTerminal/
  2. Replace Raspbian OS32-bit with 64-bit.
  3. Flash.

Expected behavior
That the system boots properly

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Raspbian 64-bit

Additional context
Add any other context about the problem here.

DKMS: install completed.
  DTC     overlays/rpi/reTerminal-overlay.dtbo
overlays/rpi/reTerminal-overlay.dts:23.15-33.5: Warning (avoid_unnecessary_addr_size): /fragment@1/__overlay__: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
'overlays/rpi/reTerminal-overlay.dtbo' -> '/boot/overlays/reTerminal.dtbo'
  DTC     overlays/rpi/reTerminal-bridge-overlay.dtbo
'overlays/rpi/reTerminal-bridge-overlay.dtbo' -> '/boot/overlays/reTerminal-bridge.dtbo'
'/home/pi/Downloads/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/' -> '/usr/share/plymouth/themes/seeed'
'/home/pi/Downloads/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/seeed.plymouth' -> '/usr/share/plymouth/themes/seeed/seeed.plymouth'
'/home/pi/Downloads/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/seeed.script' -> '/usr/share/plymouth/themes/seeed/seeed.script'
'/home/pi/Downloads/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/splash.png' -> '/usr/share/plymouth/themes/seeed/splash.png'
'/home/pi/Downloads/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/splash_v.png' -> '/usr/share/plymouth/themes/seeed/splash_v.png'
'/home/pi/Downloads/seeed-linux-dtoverlays/extras/reTerminal/resources/10-disp.conf' -> '/usr/share/X11/xorg.conf.d/10-disp.conf'
'/home/pi/Downloads/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/plymouthd.conf' -> '/etc/plymouth/plymouthd.conf'
No state is present for card vc4hdmi0
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card vc4hdmi0
No state is present for card vc4hdmi1
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card vc4hdmi1
------------------------------------------------------
Please reboot your device to apply all settings
Enjoy!

Enable monitor mode on the BCM2711 wifi chip

Issue:

I am currently attempting to make a pwnagotchi using the reTerminal. This is a tool that makes use of bettercap, a tool for monitoring wifi. For this to work, the wifi driver must have monitoring mode enabled. This will work if you custom flash the pwnagotchi image linked above. The issue comes when you attempt to install the drivers for the reTerminal screen, which will overwrite the BCM kernel module it seems.

Error

bettercap no interface matching 'mon0' found.

Steps to reproduce

  1. Flash the pwnagotchi
  2. Open http://<hostname>.local:8080 in the web browser
    a. You will actually first need to modify the pwnagotchi screen type in the config to inkyphat, reference this tutorial
    a. You should notice the pwnagotchi webui loads, and is operating correctly.
  3. Notice that at this point, Bettercap is working, the Pwnagotchi webui is running and everything except the screen is functional. You should currently see a powered off screen on the device.
  4. SSH into the device
  5. Flash the reTerminal drivers: https://wiki.seeedstudio.com/reTerminal/#install-reterminal-drivers-after-flashing-new-raspberry-pi-os-ubuntu-os-or-other-os
  6. Bettercap will no longer run due to the error above. This is because monitoring mode has been removed from the firmware.

More

I am not familiar with much relating the kernel, so I am not sure what in these drivers is effectively removing monitoring mode from the wifi chip, but I can see it is referenced as "compatible" in two overlays.dts files

Can't find mipi_dsi_host

你好,我接着 #26 进行尝试,在将linux-raspi更新至5.8后,scripts/reTerminal.sh可以顺利执行,不再出现编译错误。但是LCD屏幕仍然无法使用,启动时出现如下两行错误:

i2c_mipi_dsi 1-0045: Can't find mipi_dsi_host
i2c_mipi_dsi 1-0045: DSI device registration failed

我尝试了dtparam=i2c_arm=on,也没有用。请问下一步该如何排查?

Vertical flickering occurs during video playback

Describe the bug
When reTerminal is used in a horizontal style and a fast-moving video is played by a video player, a line of image misalignment in the vertical direction is observed in the view.

To Reproduce
Steps to reproduce the behavior:

  1. Use reTerminal in horizontal style.
  2. For example, with the VLC Player app, you can play a video.
  3. A line of vertical misalignment occurs in the image in the window.

Expected behavior
Normal video playback without vertical misalignment.

Screenshots
In the screenshots, the vertical line deviations could not be recorded.

reTerminal (please complete the following information):

  • OS: RaspberryPi OS(64bit) 2022-09-06
  • Video Player: VLC Media Player 3.0.17.4

Additional context
Similarly, the same symptoms occurred when using OpenCV and displaying with cv2.imshow().

Seeed 2 Channel Shield CAN Bus Error (spi0.0 can0)

Describe the bug
I am trying to test Seeed 2 Channel Shield with RPI4. I installed CAN-HAT as follow:

$ git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays
$ cd seeed-linux-dtoverlays/modules/CAN-HAT
$ sudo ./install.sh 
$ sudo reboot

$ sudo ip link set can0 up type can bitrate 250000
$ sudo ip link set can1 up type can bitrate 250000

As a result, the following messages are produced when trying dmesg | grep spi:

[    4.438050] mcp25xxfd spi1.0 can0: MCP2517FD rev0.0 (-RX_INT +MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD m:20.00MHz r:18.50MHz e:0.00MHz) successfully initialized.
[    4.475983] mcp25xxfd spi0.0 can1: MCP2517FD rev0.0 (-RX_INT +MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD m:20.00MHz r:18.50MHz e:0.00MHz) successfully initialized.
[    4.532107] mcp25xxfd spi0.1 (unnamed net_device) (uninitialized): Failed to detect MCP25xxFD (osc=0x00000000).
[    6.055171] mcp25xxfd spi0.0 rename4: renamed from can1
[    6.110287] mcp25xxfd spi1.0 can1: renamed from can0
[    6.184771] mcp25xxfd spi0.0 can0: renamed from rename4

can1 works fine as it prints out only a single line of can1 7DF [4] DE AD BE EF on the terminal when trying: cansend can1 7DF#DEADBEEF from a different machine through PEAK-CAN interface.

But when I try the same to can0: cansend can0 7DF#DEADBEEF, the terminal reads the same message repeatedly for infinite times and it never stops until I escape:

...
can0  7DF   [4]  DE AD BE EF
can0  7DF   [4]  DE AD BE EF
can0  7DF   [4]  DE AD BE EF
can0  7DF   [4]  DE AD BE EF
can0  7DF   [4]  DE AD BE EF
can0  7DF   [4]  DE AD BE EF
can0  7DF   [4]  DE AD BE EF
can0  7DF   [4]  DE AD BE EF
...

Eventually, the following messages are shown:

pi@raspberrypi:~ $ dmesg | grep spi
[    4.438050] mcp25xxfd spi1.0 can0: MCP2517FD rev0.0 (-RX_INT +MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD m:20.00MHz r:18.50MHz e:0.00MHz) successfully initialized.
[    4.475983] mcp25xxfd spi0.0 can1: MCP2517FD rev0.0 (-RX_INT +MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD m:20.00MHz r:18.50MHz e:0.00MHz) successfully initialized.
[    4.532107] mcp25xxfd spi0.1 (unnamed net_device) (uninitialized): Failed to detect MCP25xxFD (osc=0x00000000).
[    6.055171] mcp25xxfd spi0.0 rename4: renamed from can1
[    6.110287] mcp25xxfd spi1.0 can1: renamed from can0
[    6.184771] mcp25xxfd spi0.0 can0: renamed from rename4
[  454.319550] mcp25xxfd spi0.0 can0: RX-0: MAB overflow detected.
[  480.607262] mcp25xxfd spi0.0 can0: RX-0: MAB overflow detected.
[  738.291386] mcp25xxfd spi0.0 can0: RX-0: MAB overflow detected.
[  819.071143] mcp25xxfd spi0.0 can0: RX-0: MAB overflow detected.
[  821.486984] mcp25xxfd spi0.0 can0: RX-0: MAB overflow detected.
[  856.825086] mcp25xxfd spi0.0 can0: RX-0: MAB overflow detected.
[  869.799245] mcp25xxfd spi0.0 can0: RX-0: MAB overflow detected.

I am not sure if this is a HW or CAN-HAT problem.
Has anyone experienced the same or something similar?

Question regarding the can hat and the jetson nano

I have a couple of questions regarding the jtsn-mcp25xx branch.

  1. is it to the point that I can do some tests with it?
  2. does the mcp driver have a dependency on the spi-tegra114p driver?

I was able to build and install the mcp25xx driver but I don't get canx network cards.

CANFD and Jetson Nano B01 support

Is your feature request related to a problem? Please describe.
I am thinking about purchasing few B01 CANFD. Wiki page only describes rPI board but not Jetson Nano, which is mentioned at the above link.

Describe the solution you'd like
Update install.sh script to work with Jetson Nano

Describe alternatives you've considered
I did not try anything since I want to make sure that this works. I purchased something similar for a different vendor and it turns out it is not working.

Additional context
I am looking at the above link

git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays
cd seeed-linux-dtoverlays//modules/CAN-HAT
sudo ./install.sh 
sudo reboot

Install script only check for raspberry pi. But also looking at https://github.com/Seeed-Studio/seeed-linux-dtoverlays/tree/master/overlays/jetsonnano I see there is dst file for can0.
Can install.sh be updated to support Nano? There are a lot of guys on the NVIDIA support page struggling to get various can modules to work. I just order one CANFD to try it before I order several more.
I can also try to update the install.sh script and do pull request. Just want to know what is known to work.

reTerminal doesn't work with CM4 8/32GB

reTerminal doesn't work with CM4 8/32GB
I replaced the 4/16GB CM4 module came with reTerminal with CM4 8/32GB, which I confirmed to be working properly on the official CM4 expansion board.
The installation of Raspberry Pi OS was successfully, and SSH over wifi worked without problem.
After installing the dtoverlay, reTerminal hang on sudo reboot, and cannot boot after the power cycle.

To Reproduce
Steps to reproduce the behavior:

  1. Replace the CM4 module with CM4 8/32GB
  2. Install the Raspberry Pi OS by following the official wiki.
  3. Install dtoverlay by following the official wiki.
  4. The machine hangs.

Expected behavior
The reTerminal boot and run without issue.

I searched the website and didn't find any info about the reTerminal/CM4 compatibility, is there anything special in the CM4 that comes with reTerminal?

MCP2518FD Installation with the NANO Production module didn't work.

When you use the installation procedure with the development board is all ok. But when you try to use with the production module the command: config-by-hardware.py don't work.

I'm using the carrier board B02 with the NANO Production module.

The problem is the Jetson-io library don't work with the production module.

How is possible to solve it?

Can't detect mcp25xxfd spi0.1 can1

Hi there,

I just installed the driver on the Jetson nano following the documentation here. I have the latest "2-Channel CAN-BUS(FD) Shield for Raspberry Pi (MCP2518FD)" which should be support both can0 and can1 but I can't seem to detect can1. Any ideas of what to do? When I run:

dmesg | grep spi && ifconfig -a 

I get the following output:

[    0.470728] iommu: Adding device 7000d400.spi to group 7
[    0.471012] iommu: Adding device 7000d600.spi to group 8
[    0.471307] iommu: Adding device 70410000.spi to group 9
[    3.765799] tegra-qspi 70410000.spi: Prod settings list not found
[    3.773178] qspi_mtd spi32766.0: MX25U3235F (4096 Kbytes)
[    3.773186] qspi_mtd spi32766.0: mtd .name = spi32766.0, .size = 0x400000 (4MiB) .erasesize = 0x00001000 (4KiB) .numeraseregions = 0
[    8.096609] spi_tegra114p: loading out-of-tree module taints kernel.
[    9.500099] mcp25xxfd spi0.0 can0: MCP2518FD rev0.0 (-RX_INT -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD m:20.00MHz r:18.50MHz e:0.00MHz) successfully initialized.
[    9.559049] mcp25xxfd spi0.1 (unnamed net_device) (uninitialized): Failed to detect MCP2518FD (osc=0x00000000).
can0: flags=128<NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 112  

dummy0: flags=130<BROADCAST,NOARP>  mtu 1500
        ether b6:6c:91:1e:3c:20  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.112  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::4b4e:be42:1a82:64c0  prefixlen 64  scopeid 0x20<link>
        ether 00:04:4b:ec:96:f8  txqueuelen 1000  (Ethernet)
        RX packets 6474  bytes 5717617 (5.7 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3806  bytes 727322 (727.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 150  base 0xe000  

l4tbr0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether aa:71:21:60:f8:59  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 650  bytes 54536 (54.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 650  bytes 54536 (54.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether aa:71:21:60:f8:59  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether aa:71:21:60:f8:5b  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

failed to import hw:0 use case configuration -2

Error messages are displayed when running reTerminal.sh.

  • error: failed to import hw:0 use case configuration -2
  • error: failed to import hw:1 use case configuration -2

Is it okay to ignore it?

Environment:

  • reTerminal
  • Raspberry Pi OS 32-bit Bullseye (2022-01-28)

Procedure:

git clone --depth 1 https://github.com/Seeed-Studio/seeed-linux-dtoverlays
cd seeed-linux-dtoverlays
sudo ./scripts/reTerminal.sh

Displayed message:

'/home/pi/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/seeed.plymouth' -> '/usr/share/plymouth/themes/seeed/seeed.plymouth'
'/home/pi/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/seeed.script' -> '/usr/share/plymouth/themes/seeed/seeed.script'
'/home/pi/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/splash.png' -> '/usr/share/plymouth/themes/seeed/splash.png'
'/home/pi/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/seeed/splash_v.png' -> '/usr/share/plymouth/themes/seeed/splash_v.png'
'/home/pi/seeed-linux-dtoverlays/extras/reTerminal/resources/10-disp.conf' -> '/usr/share/X11/xorg.conf.d/10-disp.conf'
'/home/pi/seeed-linux-dtoverlays/extras/reTerminal/resources/plymouth/plymouthd.conf' -> '/etc/plymouth/plymouthd.conf'
No state is present for card vc4hdmi0
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card vc4hdmi0
No state is present for card vc4hdmi1
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -2
Found hardware: "vc4-hdmi" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card vc4hdmi1
------------------------------------------------------
Please reboot your device to apply all settings
Enjoy!
------------------------------------------------------

Ref:

No ACK for CanFD frame reception when FD and BRS are both on

Describe the bug

While the can0 is able to send out CanFD frames with BRS is on, it failed to receive any CanFD frames. The reason is the sample points of the arbitration and data fields are differently set.

To Reproduce
Steps to reproduce the behavior:

  1. start up one CAN interface:
    sudo ip link set can0 up type can bitrate 500000 dbitrate 2000000 restart-ms 1000 berr-reporting on fd on
  • we can check the sample points via "ip link -details"
  1. With a CAN bus tool, send a CAN-FD frame with BRS on
  2. The bus tool complains there is no ACK is given by other node, here, it should be the CAN-HAT.

Expected behavior

ACK bit should be set.

Screenshots
If applicable, add screenshots to help explain your problem.

** RPi **

Pi 3B

Additional context
Workaround: configure the sample point in the "ip link" command line.

sudo ip link set can0 up type can bitrate 500000 sample-point 0.8 dbitrate 2000000 dsample-point 0.8 restart-ms 1000 berr-reporting on fd on

The driver shall make sure the sample points between the two fields are identical, although this might be an issue of the MCP25xxFD, which failed to sample the data field due to different sample point, and the CRC was wrong, and then the controller refuses to set the ACK bit.

LEDs and Buzzer on reTerminal cannot be used after flashing new RPi OS

Describe the bug
After flashing the reTerminal with a different RPi OS other than the factory OS, LEDs and Buzzer do not work anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Flash reTerminal with a fresh RPi OS (32-bit Buster/ 64-bit Buster/ 32-bit Bullseye/ 64-bit Bullseye)
  2. Install reTerminal overlays
  3. "i2cdetect -y 1" shows that the "I/O Expansion chip drivers" are loaded at 0x20
pi@raspberrypi:~ $ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- --
20: UU -- -- -- -- -- -- -- -- UU -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
  1. However, when "/sys/class/leds/" directory is accessed, "usr_led0, usr_led1, usr_led2 and usr_buzzer" are not available
pi@raspberrypi:~ $ sudo -i
root@raspberrypi:~# ls /sys/class/leds/
default-on  mmc0  mmc0::

Expected behavior
This problem is not present when using the reTerminal images provided by Seeed

Temporary Workaround
This issue can be temporarily fixed by uncommenting the following line inside "/boot/config.txt" and rebooting the device

#dtoverlay=reTerminal-bridge

@bigbearishappy Please help to fix this issue

Thank you

Best Regards,
Lakshantha

Issues Installing DTBO on Jetson Nano 2GB

I just received the Can Bus V2 Hat that uses MCP2518FD chips. I followed the instruction on your wiki site for installing on Jetson Nano. The area that isnt working is when you say to run the sudo /opt/nvidia/jetson-io/config-by-hardware.py -n "Seeed 2xMCP2518FD"

This command returns the error:

Traceback (most recent call last):
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 64, in
main()
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 60, in main
configure_jetson(jetson, hwlist, args.name)
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 36, in configure_jetson
raise NameError("No configuration found for %s!" % hw)
NameError: No configuration found for Seeed 2xMCP2518FD!

With that failing the system does not detect the Hat even after reboot.

Please advise on how to fix this.

set up mcp2518 failed.

Hi,
I followed the tutorial to set up CAN FD. I can set up CAN FD successfully, but when I send data something went wrong.

Any advice is much appreciated!

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux

pi@raspberrypi:~ $ ifconfig
can0: flags=193<UP,RUNNING,NOARP>  mtu 72
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 65536  (UNSPEC)
        RX packets 1826911  bytes 14615288 (13.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 1826907  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 199

Error Info

[   17.315758] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   17.315780] Bluetooth: BNEP filters: protocol multicast
[   17.315813] Bluetooth: BNEP socket layer initialized
[   17.834233] Under-voltage detected! (0x00050005)
[   18.366871] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   24.074165] Voltage normalised (0x00000000)
[  243.630213] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[  273.147139] can: controller area network core
[  273.147281] NET: Registered protocol family 29
[  273.167759] can: raw protocol
[  273.171353] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.171874] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.172452] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.173041] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.173790] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.174330] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.174872] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.175378] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.175956] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!
[  273.176549] NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!

Issues with Ubuntu running on reTerminal

The following are issues when running Ubuntu on reTerminal.

  1. reTerminal cannot reboot from Ubuntu. It gets stuck and the "SYS LED" stays turned ON

  2. When reTerminal is powered off and powered back on, mipi LCD driver is not loaded. Need to do the following steps every time I turn on reTerminal

  • sudo modprobe -r mipi_dsi
  • sudo modprobe mipi_dsi
  • sudo systemctl restart systemd-logind
  1. Accelerometer is not loaded on boot. Need to load the accelerometer manually by:
  • sudo modprobe lis331dlh-i2c
  1. Sometimes when you type password in Ubuntu Desktop log in screen, the "Enter" button doesnt work and it is not possible to log in to Ubuntu.

The above has been tested after installing Ubuntu Server, installing reTerminal drivers and installing Ubuntu Desktop

Image Seeed ReTerminal CM4 with Ubuntu

I am having difficulty with overcoming the embedded OS on the reTerminal CM4 offered by Seeed Studios. I have tried everything I can find except cracking the screen off to access the rp unit itself and actually get access to the microSD port. Does anyone have any suggestions on what steps I may be able to take before I break this unit open?

Thank you all in advance.

reTerminal LCD has orientation problem with auto-rotate function in RPi OS Bullseye (Kernel 5.15)

Describe the bug
After flashing the reTerminal with the latest Raspberry Pi OS Bullseye found here, the LCD has orientation problem with auto-rotate function.

Expected behavior
It works well with RPi OS Buster

Tests performed

Test 1 with Bullseye and these changes:

  1. As soon as overlays are installed, the screen looks like this:
  1. After following these instructions and reboot the device, the device orientation looks normal
  1. However, when I lift the device and place the device in landscape orientation, the orientation changes
  1. Landscape (flipped) has same issue
  1. Portrait and portrait (flipped) have no issue

Test 2 with Bullseye without any changes:

  1. As soon as overlays are installed, the screen looks like this:
  1. However, even without following this, the screen behaves the same as 2,3,4,5 in test 1 above.

In conclusion, no matter whether we follow this or not, the screen behavior for auto-rotate is the same.

Thank you.

Best Regards,
Lakshantha

Fail to build lan78xx ethernet driver on Raspberry Pi OS lite (64 bit)

Describe the bug
On a fresh install of Raspberry Pi OS lite (64 bit), I'm following this guide:
https://wiki.seeedstudio.com/Dual-Gigabit-Ethernet-Carrier-Board-for-Raspberry-Pi-CM4/

Once you flash the Raspberry Pi OS onto the CM4 module, you will get the full Gigabit speed (1Gbps) only on the Ethernet port connected to the Gigabit Ethernet PHY of the CM4 module which is based on Broadcom BCM54210PE (right-side port). The port which is connected to the Microchip's LAN7800 USB 3.0 to GbE (Gigabit Ethernet Bridge) (left-side port), will not provide the full speed of 1Gbps, but rather a much reduced speed. This is because the lan78xx driver in the raspberry core is not up to date.

Building the driver fails with the following error:

root@seed:/home/pi/git/seeed-linux-dtoverlays# ./scripts/cm4_lan7800.sh
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Installed: /usr/src/linux-headers-5.15.32-v8+
make: Entering directory '/usr/src/linux-headers-5.15.32-v8+'
  CC [M]  /home/pi/git/seeed-linux-dtoverlays/modules/lan7800/lan78xx.o
/home/pi/git/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c: In function 'lan78xx_skb_return':
/home/pi/git/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:3511:20: error: 'GRO_DROP' undeclared (first use in this function)
 3511 |  if (gro_result == GRO_DROP)
      |                    ^~~~~~~~
/home/pi/git/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:3511:20: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [scripts/Makefile.build:277: /home/pi/git/seeed-linux-dtoverlays/modules/lan7800/lan78xx.o] Error 1
make: *** [Makefile:1868: /home/pi/git/seeed-linux-dtoverlays/modules/lan7800] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.32-v8+'
Build failed: lan7800

To Reproduce
On Raspberry Pi OS lite (64 bit):

> git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays.git
> cd seeed-linux-dtoverlays/
> sudo ./scripts/cm4_lan7800.sh

Additional context

root@seed:/home/pi/git/seeed-linux-dtoverlays# cat /etc/debian_version 
11.4
root@seed:/home/pi/git/seeed-linux-dtoverlays# uname -a 
Linux seed 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

Screen rotates automatically despite having it set to "right" orientation on reTerminal

Describe the bug
Whenever I physically rotate the reTerminal, it rotates the display to match. But I don't want it to autorotate, and I can't find any way to disable it.

To Reproduce
Steps to reproduce the behavior:

  1. Install Raspbian 32 bit
  2. Run the reTerminal setup script from this repository
  3. Configure the display as per https://wiki.seeedstudio.com/reTerminal-FAQ/#q11-the-screen-orientation-is-incorrect-after-installing-raspberry-pi-os-bullseye
  4. Reboot
  5. Rotate the reTerminal and observe rotation

Expected behavior
The display should not rotate.

NPi i.MX6ULL Dev Board - Make Errors

After cloning the git repo and running the make command in the correct directory, I am met with a lot of errors, that ultimately do not allow me to complete the make execute.

Output can be seen here:

root@npi:~/seeed-linux-dtoverlays# cd ~
root@npi:~# rm -r ~/seeed-linux-dtoverlays/
root@npi:~# git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays
Cloning into 'seeed-linux-dtoverlays'...
remote: Enumerating objects: 385, done.
remote: Counting objects: 100% (385/385), done.
remote: Compressing objects: 100% (161/161), done.
remote: Total 1341 (delta 253), reused 341 (delta 222), pack-reused 956
Receiving objects: 100% (1341/1341), 1.73 MiB | 1.49 MiB/s, done.
Resolving deltas: 100% (592/592), done.
root@npi:~# cd seeed-linux-dtoverlays
root@npi:~/seeed-linux-dtoverlays# suo make all_imx6ull
-bash: suo: command not found
root@npi:~/seeed-linux-dtoverlays# sudo make all_imx6ull
  DTC     overlays/imx6ull/imx-gpio-grove-button.dtbo
  DTC     overlays/imx6ull/imx-seeed-voicecard-2mic-overlay.dtbo
  DTC     overlays/imx6ull/imx-MCP2517FD-can0-overlay.dtbo
  DTC     overlays/imx6ull/imx-uart3-e-ink.dtbo
  DTC     overlays/imx6ull/imx-i2c2-overlay.dtbo
  DTC     overlays/imx6ull/imx-fire-lcd5-01-overlay.dtbo
  CC [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/wm8960.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-wm8960.o
  CC [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/ac108.o
  CC [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/ac101.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-ac108.o
  CC [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/seeed-voicecard.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-seeed-voicecard.o
  Building modules, stage 2.
  MODPOST 3 modules
  CC      /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-ac108.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-ac108.ko
  CC      /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-seeed-voicecard.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-seeed-voicecard.ko
  CC      /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-wm8960.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/seeed-voicecard/snd-soc-wm8960.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/adxl34x/adxl34x.o
  CC [M]  /root/seeed-linux-dtoverlays/modules/adxl34x/adxl34x-i2c.o
  Building modules, stage 2.
  MODPOST 2 modules
  CC      /root/seeed-linux-dtoverlays/modules/adxl34x/adxl34x-i2c.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/adxl34x/adxl34x-i2c.ko
  CC      /root/seeed-linux-dtoverlays/modules/adxl34x/adxl34x.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/adxl34x/adxl34x.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/p9813/p9813.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/seeed-linux-dtoverlays/modules/p9813/p9813.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/p9813/p9813.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/hd44780/hd44780-i2c.o
  CC [M]  /root/seeed-linux-dtoverlays/modules/hd44780/hd44780-dev.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/hd44780/seeed-hd44780.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/seeed-linux-dtoverlays/modules/hd44780/seeed-hd44780.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/hd44780/seeed-hd44780.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/e-ink/eink-tty.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/seeed-linux-dtoverlays/modules/e-ink/eink-tty.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/e-ink/eink-tty.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/sht3x/sht3x.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/seeed-linux-dtoverlays/modules/sht3x/sht3x.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/sht3x/sht3x.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/lis3lv02d/lis3lv02d.o
  CC [M]  /root/seeed-linux-dtoverlays/modules/lis3lv02d/lis3lv02d_i2c.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/lis3lv02d/lis331dlh-i2c.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/seeed-linux-dtoverlays/modules/lis3lv02d/lis331dlh-i2c.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/lis3lv02d/lis331dlh-i2c.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/vl53l0x/vl53l0x.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/seeed-linux-dtoverlays/modules/vl53l0x/vl53l0x.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/vl53l0x/vl53l0x.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.o
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c: In function ‘gtp_probe’:
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c:2005:1: warning: label ‘exit_deinit_power’ defined but not used [-Wunused-label]
 exit_deinit_power:
 ^~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c:2002:1: warning: label ‘exit_power_off’ defined but not used [-Wunused-label]
 exit_power_off:
 ^~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c: In function ‘gtp_power_off’:
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c:1781:3: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result]
   regulator_enable(ts->vcc_i2c);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At top level:
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c:2382:12: warning: ‘gtp_esd_init’ defined but not used [-Wunused-function]
 static int gtp_esd_init(struct goodix_ts_data *ts)
            ^~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c:1791:12: warning: ‘gtp_power_init’ defined but not used [-Wunused-function]
 static int gtp_power_init(struct goodix_ts_data *ts)
            ^~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c:1353:12: warning: ‘gtp_request_io_port’ defined but not used [-Wunused-function]
 static int gtp_request_io_port(struct goodix_ts_data *ts)
            ^~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx.c:1297:12: warning: ‘gtp_pinctrl_init’ defined but not used [-Wunused-function]
 static int gtp_pinctrl_init(struct goodix_ts_data *ts)
            ^~~~~~~~~~~~~~~~
  CC [M]  /root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx_update.o
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx_update.c: In function ‘gup_init_panel’:
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx_update.c:93:5: warning: unused variable ‘check_sum’ [-Wunused-variable]
  u8 check_sum = 0;
     ^~~~~~~~~
/root/seeed-linux-dtoverlays/modules/gt9xx/gt9xx_update.c:92:6: warning: unused variable ‘i’ [-Wunused-variable]
  s32 i = 0;
      ^
  CC [M]  /root/seeed-linux-dtoverlays/modules/gt9xx/goodix_tool.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/gt9xx/touch-gt9xx.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/seeed-linux-dtoverlays/modules/gt9xx/touch-gt9xx.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/gt9xx/touch-gt9xx.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/bme280/bme280.o
In file included from ./arch/arm/include/asm/div64.h:127,
                 from ./include/linux/kernel.h:208,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:9,
                 from /root/seeed-linux-dtoverlays/modules/bme280/bme280.c:25:
/root/seeed-linux-dtoverlays/modules/bme280/bme280.c: In function ‘bme280_calibrate_press’:
./include/asm-generic/div64.h:222:28: warning: comparison of distinct pointer types lacks a cast
  (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
                            ^~
/root/seeed-linux-dtoverlays/modules/bme280/bme280.c:158:9: note: in expansion of macro ‘do_div’
  tmp4 = do_div(tmp3, tmp1);
         ^~~~~~
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/seeed-linux-dtoverlays/modules/bme280/bme280.mod.o
  LD [M]  /root/seeed-linux-dtoverlays/modules/bme280/bme280.ko
  CC [M]  /root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.o
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:60:34: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_set_pll(struct snd_soc_codec *codec,
                                  ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:134:31: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
  int (*set_bias_level)(struct snd_soc_codec *,
                               ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:179:37: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_set_deemph(struct snd_soc_codec *codec)
                                     ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_set_deemph’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:181:31: error: implicit declaration of function ‘snd_soc_codec_get_drvdata’; did you mean ‘snd_soc_dai_get_drvdata’? [-Werror=implicit-function-declaration]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
                               snd_soc_dai_get_drvdata
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:181:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
In file included from ./include/linux/i2c.h:30,
                 from /root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:19:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:200:15: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
  dev_dbg(codec->dev, "Set deemphasis %d\n", val);
               ^~
./include/linux/device.h:1461:26: note: in definition of macro ‘dev_dbg’
   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                          ^~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:202:9: error: implicit declaration of function ‘snd_soc_update_bits’; did you mean ‘snd_ac97_update_bits’? [-Werror=implicit-function-declaration]
  return snd_soc_update_bits(codec, WM8960_DACCTL1,
         ^~~~~~~~~~~~~~~~~~~
         snd_ac97_update_bits
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_get_deemph’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:209:32: error: implicit declaration of function ‘snd_soc_kcontrol_codec’; did you mean ‘snd_soc_kcontrol_component’? [-Werror=implicit-function-declaration]
  struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
                                ^~~~~~~~~~~~~~~~~~~~~~
                                snd_soc_kcontrol_component
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:209:32: warning: initialization of ‘struct snd_soc_codec *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:210:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_put_deemph’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:219:32: warning: initialization of ‘struct snd_soc_codec *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
                                ^~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:220:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:228:27: error: passing argument 1 of ‘wm8960_set_deemph’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  return wm8960_set_deemph(codec);
                           ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:179:52: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_set_deemph(struct snd_soc_codec *codec)
                              ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:481:38: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_add_widgets(struct snd_soc_codec *codec)
                                      ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_add_widgets’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:483:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:485:38: error: implicit declaration of function ‘snd_soc_codec_get_dapm’; did you mean ‘snd_soc_component_get_dapm’? [-Werror=implicit-function-declaration]
  struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
                                      ^~~~~~~~~~~~~~~~~~~~~~
                                      snd_soc_component_get_dapm
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:485:38: warning: initialization of ‘struct snd_soc_dapm_context *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
In file included from ./include/linux/list.h:9,
                 from ./include/linux/module.h:9,
                 from /root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:13:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:515:31: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
  list_for_each_entry(w, &codec->component.card->widgets, list) {
                               ^~
./include/linux/kernel.h:997:26: note: in definition of macro ‘container_of’
  void *__mptr = (void *)(ptr);     \
                          ^~~
./include/linux/list.h:407:2: note: in expansion of macro ‘list_entry’
  list_entry((ptr)->next, type, member)
  ^~~~~~~~~~
./include/linux/list.h:494:13: note: in expansion of macro ‘list_first_entry’
  for (pos = list_first_entry(head, typeof(*pos), member); \
             ^~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:515:2: note: in expansion of macro ‘list_for_each_entry’
  list_for_each_entry(w, &codec->component.card->widgets, list) {
  ^~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_set_dai_fmt’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:532:41: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  struct snd_soc_codec *codec = codec_dai->codec;
                                         ^~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:585:2: error: implicit declaration of function ‘snd_soc_write’; did you mean ‘snd_ac97_write’? [-Werror=implicit-function-declaration]
  snd_soc_write(codec, WM8960_IFACE1, iface);
  ^~~~~~~~~~~~~
  snd_ac97_write
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:616:45: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_configure_clocking(struct snd_soc_codec *codec)
                                             ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_configure_clocking’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:618:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:620:15: error: implicit declaration of function ‘snd_soc_read’; did you mean ‘snd_soc_cnew’? [-Werror=implicit-function-declaration]
  u16 iface1 = snd_soc_read(codec, WM8960_IFACE1);
               ^~~~~~~~~~~~
               snd_soc_cnew
In file included from ./include/linux/i2c.h:30,
                 from /root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:19:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:624:16: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
   dev_dbg(codec->dev,
                ^~
./include/linux/device.h:1461:26: note: in definition of macro ‘dev_dbg’
   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                          ^~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:645:18: error: passing argument 1 of ‘wm8960_set_pll’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   wm8960_set_pll(codec, 0, 0);
                  ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:60:49: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_set_pll(struct snd_soc_codec *codec,
                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:692:21: error: passing argument 1 of ‘wm8960_set_pll’ from incompatible pointer type [-Werror=incompatible-pointer-types]
      wm8960_set_pll(codec,
                     ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:60:49: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_set_pll(struct snd_soc_codec *codec,
                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_hw_params’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:731:35: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  struct snd_soc_codec *codec = dai->codec;
                                   ^~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:732:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/i2c.h:30,
                 from /root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:19:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:760:16: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
   dev_err(codec->dev, "unsupported width %d\n",
                ^~
./include/linux/device.h:1443:11: note: in definition of macro ‘dev_err’
  _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
           ^~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:768:21: error: passing argument 1 of ‘wm8960_set_deemph’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   wm8960_set_deemph(codec);
                     ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:179:52: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_set_deemph(struct snd_soc_codec *codec)
                              ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:784:6: error: implicit declaration of function ‘snd_soc_codec_get_bias_level’; did you mean ‘snd_soc_dapm_get_bias_level’? [-Werror=implicit-function-declaration]
  if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_ON &&
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      snd_soc_dapm_get_bias_level
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:786:36: error: passing argument 1 of ‘wm8960_configure_clocking’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   return wm8960_configure_clocking(codec);
                                    ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:616:60: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_configure_clocking(struct snd_soc_codec *codec)
                                      ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_hw_free’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:794:35: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  struct snd_soc_codec *codec = dai->codec;
                                   ^~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:795:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_mute’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:806:35: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  struct snd_soc_codec *codec = dai->codec;
                                   ^~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:816:46: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_set_bias_level_out3(struct snd_soc_codec *codec,
                                              ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_set_bias_level_out3’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:819:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/i2c.h:30,
                 from /root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:19:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:834:19: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
      dev_err(codec->dev,
                   ^~
./include/linux/device.h:1443:11: note: in definition of macro ‘dev_err’
  _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
           ^~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:841:36: error: passing argument 1 of ‘wm8960_configure_clocking’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    ret = wm8960_configure_clocking(codec);
                                    ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:616:60: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_configure_clocking(struct snd_soc_codec *codec)
                                      ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:855:20: error: passing argument 1 of ‘wm8960_set_pll’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     wm8960_set_pll(codec, 0, 0);
                    ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:60:49: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_set_pll(struct snd_soc_codec *codec,
                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:907:49: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_set_bias_level_capless(struct snd_soc_codec *codec,
                                                 ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_set_bias_level_capless’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:910:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/i2c.h:30,
                 from /root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:19:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:957:19: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
      dev_err(codec->dev,
                   ^~
./include/linux/device.h:1443:11: note: in definition of macro ‘dev_err’
  _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
           ^~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:964:36: error: passing argument 1 of ‘wm8960_configure_clocking’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    ret = wm8960_configure_clocking(codec);
                                    ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:616:60: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_configure_clocking(struct snd_soc_codec *codec)
                                      ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:976:20: error: passing argument 1 of ‘wm8960_set_pll’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     wm8960_set_pll(codec, 0, 0);
                    ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:60:49: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_set_pll(struct snd_soc_codec *codec,
                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1116:34: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_set_pll(struct snd_soc_codec *codec,
                                  ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1116:12: error: conflicting types for ‘wm8960_set_pll’
 static int wm8960_set_pll(struct snd_soc_codec *codec,
            ^~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:60:12: note: previous declaration of ‘wm8960_set_pll’ was here
 static int wm8960_set_pll(struct snd_soc_codec *codec,
            ^~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_set_dai_pll’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1168:41: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  struct snd_soc_codec *codec = codec_dai->codec;
                                         ^~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1169:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1177:24: error: passing argument 1 of ‘wm8960_set_pll’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  return wm8960_set_pll(codec, freq_in, freq_out);
                        ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1116:49: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_set_pll(struct snd_soc_codec *codec,
                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_set_dai_clkdiv’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1183:41: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  struct snd_soc_codec *codec = codec_dai->codec;
                                         ^~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1215:41: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_set_bias_level(struct snd_soc_codec *codec,
                                         ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_set_bias_level’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1218:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1220:32: error: passing argument 1 of ‘wm8960->set_bias_level’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  return wm8960->set_bias_level(codec, level);
                                ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1220:32: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_set_dai_sysclk’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1226:35: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  struct snd_soc_codec *codec = dai->codec;
                                   ^~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1227:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1289:32: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
 static int wm8960_probe(struct snd_soc_codec *codec)
                                ^~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_probe’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1291:31: warning: initialization of ‘struct wm8960_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1295:26: error: assignment to ‘int (*)(struct snd_soc_codec *, enum snd_soc_bias_level)’ from incompatible pointer type ‘int (*)(struct snd_soc_codec *, enum snd_soc_bias_level)’ [-Werror=incompatible-pointer-types]
   wm8960->set_bias_level = wm8960_set_bias_level_capless;
                          ^
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1297:26: error: assignment to ‘int (*)(struct snd_soc_codec *, enum snd_soc_bias_level)’ from incompatible pointer type ‘int (*)(struct snd_soc_codec *, enum snd_soc_bias_level)’ [-Werror=incompatible-pointer-types]
   wm8960->set_bias_level = wm8960_set_bias_level_out3;
                          ^
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1299:2: error: implicit declaration of function ‘snd_soc_add_codec_controls’; did you mean ‘snd_soc_add_dai_controls’? [-Werror=implicit-function-declaration]
  snd_soc_add_codec_controls(codec, wm8960_snd_controls,
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
  snd_soc_add_dai_controls
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1301:21: error: passing argument 1 of ‘wm8960_add_widgets’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  wm8960_add_widgets(codec);
                     ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:481:53: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
 static int wm8960_add_widgets(struct snd_soc_codec *codec)
                               ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1306:21: error: variable ‘soc_codec_dev_wm8960’ has initializer but incomplete type
 static const struct snd_soc_codec_driver soc_codec_dev_wm8960 = {
                     ^~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1307:3: error: ‘const struct snd_soc_codec_driver’ has no member named ‘probe’
  .probe = wm8960_probe,
   ^~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1307:11: warning: excess elements in struct initializer
  .probe = wm8960_probe,
           ^~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1307:11: note: (near initialization for ‘soc_codec_dev_wm8960’)
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1308:3: error: ‘const struct snd_soc_codec_driver’ has no member named ‘set_bias_level’
  .set_bias_level = wm8960_set_bias_level,
   ^~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1308:20: warning: excess elements in struct initializer
  .set_bias_level = wm8960_set_bias_level,
                    ^~~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1308:20: note: (near initialization for ‘soc_codec_dev_wm8960’)
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1309:3: error: ‘const struct snd_soc_codec_driver’ has no member named ‘suspend_bias_off’
  .suspend_bias_off = true,
   ^~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1309:22: warning: excess elements in struct initializer
  .suspend_bias_off = true,
                      ^~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1309:22: note: (near initialization for ‘soc_codec_dev_wm8960’)
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_i2c_probe’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1393:8: error: implicit declaration of function ‘snd_soc_register_codec’; did you mean ‘snd_soc_register_dai’? [-Werror=implicit-function-declaration]
  ret = snd_soc_register_codec(&i2c->dev,
        ^~~~~~~~~~~~~~~~~~~~~~
        snd_soc_register_dai
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: In function ‘wm8960_i2c_remove’:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1401:2: error: implicit declaration of function ‘snd_soc_unregister_codec’; did you mean ‘snd_soc_unregister_card’? [-Werror=implicit-function-declaration]
  snd_soc_unregister_codec(&client->dev);
  ^~~~~~~~~~~~~~~~~~~~~~~~
  snd_soc_unregister_card
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c: At top level:
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:1306:42: error: storage size of ‘soc_codec_dev_wm8960’ isn’t known
 static const struct snd_soc_codec_driver soc_codec_dev_wm8960 = {
                                          ^~~~~~~~~~~~~~~~~~~~
/root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.c:60:12: warning: ‘wm8960_set_pll’ used but never defined
 static int wm8960_set_pll(struct snd_soc_codec *codec,
            ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:304: /root/seeed-linux-dtoverlays/modules/jtsn-wm8960/wm8960.o] Error 1
make[1]: *** [Makefile:1519: _module_/root/seeed-linux-dtoverlays/modules/jtsn-wm8960] Error 2
make: *** [Makefile:151: all_imx6ull] Error 2

Error running make for stm32mp1

Describe the bug
A clear and concise description of what the bug is.

When running make for stm32mp1 (Odyssey STM32MP157C) get error "No such file"

To Reproduce

  1. Steps to reproduce the behavior:
make all_stm32mp1 && sudo make install_stm32mp1
  1. See errors in response below:
  DTC     overlays/stm32mp1/stm32mp1-seeed-spi5-overlay.dtbo
  DTC     overlays/stm32mp1/stm32mp1-MCP2517FD-can0-overlay.dtbo
  DTC     overlays/stm32mp1/stm32mp1-seeed-lcd-01-overlay.dtbo
  DTC     overlays/stm32mp1/stm32mp1-seeed-uart7-overlay.dtbo
  DTC     overlays/stm32mp1/stm32mp1-seeed-i2c4-overlay.dtbo
  DTC     overlays/stm32mp1/stm32mp1-seeed-ap6236-overlay.dtbo
  DTC     overlays/stm32mp1/stm32mp1-seeed-usart2-overlay.dtbo
scripts/Makefile.build:45: /home/debian/seeed-linux-dtverlays/modules/overlays/stm32mp1/config.txt/Makefile: No such file or directory
make[2]: *** No rule to make target '/home/debian/seeed-linux-dtverlays/modules/overlays/stm32mp1/config.txt/Makefile'.  Stop.
make[1]: *** [Makefile:1517: _module_/home/debian/seeed-linux-dtverlays/modules/overlays/stm32mp1/config.txt] Error 2
make: *** [Makefile:156: all_stm32mp1] Error 2

Expected behavior
I would expect no errors on running make. Seems to lead to other errors when trying to use interfaces via python.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Debian (STM32MP157C image)
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[reTerminal] fatal error: asm/types.h: No such file or directory with RasPi OS 32bit 2023-05-03

A compilation error occurs when running reTerminal.sh.

Environment:

  • Device: reTerminal 05/09/22
  • OS image: Raspberry Pi OS (32-bit) 2023-05-03

Procedure:

  1. Flash OS image Raspberry Pi OS (32-bit) 2023-05-03 to CM4 eMMC.
  2. Install the reTerminal driver.
$ git clone --depth 1 https://github.com/Seeed-Studio/seeed-linux-dtoverlays
$ cd seeed-linux-dtoverlays
$ sudo ./scripts/reTerminal.sh

Error message:

./include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
    5 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
Full messages
### Install required tool packages
Hit:1 http://archive.raspberrypi.org/debian bullseye InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  dctrl-tools
Suggested packages:
  debtags menu
Recommended packages:
  linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers
The following NEW packages will be installed:
  dctrl-tools dkms
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 172 kB of archives.
After this operation, 673 kB of additional disk space will be used.
Get:1 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bullseye/main armhf dctrl-tools armhf 2.24-3 [94.2 kB]
Get:2 http://ftp.udx.icscoe.jp/Linux/raspbian/raspbian bullseye/main armhf dkms all 2.8.4-3 [78.2 kB]
Fetched 172 kB in 2s (114 kB/s)
Selecting previously unselected package dctrl-tools.
(Reading database ... 106529 files and directories currently installed.)
Preparing to unpack .../dctrl-tools_2.24-3_armhf.deb ...
Unpacking dctrl-tools (2.24-3) ...
Selecting previously unselected package dkms.
Preparing to unpack .../archives/dkms_2.8.4-3_all.deb ...
Unpacking dkms (2.8.4-3) ...
Setting up dctrl-tools (2.24-3) ...
Setting up dkms (2.8.4-3) ...
Processing triggers for man-db (2.9.4-2) ...

### Will compile with the latest kernel...

### Uninstall previous dkms module

### Install required kernel package
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
raspberrypi-kernel is already the newest version (1:1.20230405-1).
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  raspberrypi-kernel-headers
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.0 MB of archives.
After this operation, 193 MB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian bullseye/main armhf raspberrypi-kernel-headers armhf 1:1.20230405-1 [30.0 MB]
Fetched 30.0 MB in 5s (6,140 kB/s)
Selecting previously unselected package raspberrypi-kernel-headers.
(Reading database ... 106628 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1%3a1.20230405-1_armhf.deb ...
Unpacking raspberrypi-kernel-headers (1:1.20230405-1) ...
Setting up raspberrypi-kernel-headers (1:1.20230405-1) ...
run-parts: executing /etc/kernel/header_postinst.d/dkms 6.1.21+
dkms: running auto installation service for kernel 6.1.21+:.
run-parts: executing /etc/kernel/header_postinst.d/dkms 6.1.21-v7+
dkms: running auto installation service for kernel 6.1.21-v7+:.
run-parts: executing /etc/kernel/header_postinst.d/dkms 6.1.21-v7l+
dkms: running auto installation service for kernel 6.1.21-v7l+:.
run-parts: executing /etc/kernel/header_postinst.d/dkms 6.1.21-v8+
dkms: running auto installation service for kernel 6.1.21-v8+:.
W: --force-yes is deprecated, use one of the options starting with --allow instead.
KBUILD: /lib/modules/6.1.21-v7l+/build

Creating symlink /var/lib/dkms/mipi_dsi/0.1/source ->
                 /usr/src/mipi_dsi-0.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...(bad exit status: 2)
make -j4 KERNELRELEASE=6.1.21-v7l+ all KVERSION=6.1.21-v7l+...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.21-v7l+ (aarch64)
Consult /var/lib/dkms/mipi_dsi/0.1/build/make.log for more information.
Can't compile with this kernel, aborting
Please try to compile with the option --compat-kernel
DKMS make.log for mipi_dsi-0.1 for kernel 6.1.21-v7l+ (aarch64)
Thu  4 May 17:20:21 JST 2023
make -C /lib/modules/6.1.21-v7l+/build M=/var/lib/dkms/mipi_dsi/0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.21-v7l+'
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.o
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/touch_panel.o
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.o
In file included from ./include/linux/types.h:6,
                 from ./include/linux/limits.h:6,
                 from ./include/linux/kernel.h:16,
                 from ./include/linux/interrupt.h:6,
                 from /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi.h:15,
                 from /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:11:
./include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
    5 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ./include/linux/types.h:6,
                 from ./include/linux/limits.h:6,
                 from ./include/linux/kernel.h:16,
                 from ./include/linux/interrupt.h:6,
                 from /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi.h:15,
                 from /var/lib/dkms/mipi_dsi/0.1/build/touch_panel.c:1:
./include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
    5 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/mipi_dsi/0.1/build/touch_panel.o] Error 1
In file included from ./include/linux/types.h:6,
                 from ./include/linux/limits.h:6,
                 from ./include/linux/kernel.h:16,
                 from ./include/linux/interrupt.h:6,
                 from /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi.h:15,
                 from /var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.c:8:
./include/uapi/linux/types.h:5:10: fatal error: asm/types.h: No such file or directory
    5 | #include <asm/types.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.build:250: /var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.o] Error 1
make[1]: *** [Makefile:2012: /var/lib/dkms/mipi_dsi/0.1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.21-v7l+'
make: *** [Makefile:15: all] Error 2

ReTerminal setup script fails on RPi OS Lite due to missing folders

I'm trying to run scripts/reTerminal.sh on a fresh lite rpi os install.

The script fails due to assuming a number of directories exist, presumably since they do exist on the non-lite os.

Missing folders:

  • /usr/share/plymouth/themes/
  • /usr/share/X11/xorg.conf.d/
  • /etc/plymouth/

Creating these directories lets the installer finish successfully. mkdir -p <folders> should probably be run prior to blindly copying files into them: https://github.com/Seeed-Studio/seeed-linux-dtoverlays/blob/master/scripts/reTerminal.sh#L281-L283

Changing screen resolution on reTerminal

Changing screen resolution in /boot/config.txt does nothing on the reTerminal. Is it possible to change the screen resolution? This is on raspberry pi OS, stock image.

Build fail on Kali 2021.3-rpi4-nexmon-armhf

Describe the bug
I tried to build the overlays on kali. I think the reTerminal would be a great application for kali.

Building the modules is failing.

DKMS make.log for mipi_dsi-0.1 for kernel 5.4.83-Re4son-v7l+ (armv7l)
Sun 19 Sep 2021 09:25:01 AM UTC
make -C /lib/modules/5.4.83-Re4son-v7l+/build M=/var/lib/dkms/mipi_dsi/0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.83-Re4son-v7l+'
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.o
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/touch_panel.o
  CC [M]  /var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.o
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c: In function ‘panel_get_modes’:
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:250:9: error: too many arguments to function ‘funcs->get_modes’
  250 |   ret = funcs->get_modes(panel, connector);
      |         ^~~~~
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c: At top level:
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:263:15: error: initialization of ‘int (*)(struct drm_panel *)’ from incompatible pointer type ‘int (*)(struct drm_panel *, struct drm_connector *)’ [-Werror=incompatible-pointer-types]
  263 |  .get_modes = panel_get_modes,
      |               ^~~~~~~~~~~~~~~
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:263:15: note: (near initialization for ‘panel_funcs.get_modes’)
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c: In function ‘i2c_md_probe’:
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:356:2: error: too many arguments to function ‘drm_panel_init’
  356 |  drm_panel_init(&md->panel, dev, &panel_funcs, DRM_MODE_CONNECTOR_DSI);
      |  ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi.h:35,
                 from /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:11:
./include/drm/drm_panel.h:150:6: note: declared here
  150 | void drm_panel_init(struct drm_panel *panel);
      |      ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
/var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.c:294:15: error: initialization of ‘int (*)(struct drm_panel *)’ from incompatible pointer type ‘int (*)(struct drm_panel *, struct drm_connector *)’ [-Werror=incompatible-pointer-types]
  294 |  .get_modes = ili9881d_get_modes,
      |               ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.c:294:15: note: (near initialization for ‘ili9881d_funcs.get_modes’)
make[2]: *** [scripts/Makefile.build:266: /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:265: /var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.o] Error 1
make[1]: *** [Makefile:1732: /var/lib/dkms/mipi_dsi/0.1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.83-Re4son-v7l+'
make: *** [Makefile:15: all] Error 2

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays.git
  2. change raspberrypi-kernel-headers raspberrypi-kernel to kalipi-kernel-headers kalipi-kernel in /seeed-linux-dtoverlays/scripts/reTerminal.sh
  3. run ./scripts/reTerminal.sh
  4. See error

Expected behavior
I expect that the code is compiling like on raspbian OS

Additional context
For me is unclear why the same code on raspbian is working and on kali failing with compile errors.

What can I do to fix this? Is there a way to compile it elsewhere and copy it to Kali? If that is possible how to do this.

Installation Bug with ReSpeaker 2-Mics Pi HAT / WM8960 on Jetson Nano

I tried to install the driver from the jtsn-wm8960 module to my Jetson Nano A02. I followed the described steps of the README. In the process I received the following error when executing sudo /opt/nvidia/jetson-io/config-by-hardware.py -n "Seeed Voice Card 2MIC":

$ sudo /opt/nvidia/jetson-io/config-by-hardware.py -n "Seeed Voice Card 2MIC"
Traceback (most recent call last):
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 125, in
main()
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 117, in main
dtbo = configure_jetson(jetson, header, hw)
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 55, in configure_jetson
% (hw, header))
NameError: No configuration found for Seeed Voice Card 2MIC on Jetson 40pin Header!

(I had to skip the command sudo cp overlays/jetsonnano/jetson-seeed-2mic-wm8960.dtbo /boot, because the file "jetson-seeed-2mic-voicecard.dtbo" is already created there. If I am not skipping this step of copying, the following error occurs instead:

Multiple DT overlays for 'Seeed Voice Card 2MIC' found!
Please remove duplicate(s)
/boot/jetson-seeed-2mic-wm8960.dtbo
/boot/jetson-seeed-2mic-voicecard.dtbo

)

To solve this issue, I added the following line jetson-header-name = "Jetson 40pin Header"; to jetson-seeed-2mic-wm8960.dts. The property "jetson-header-name" seems to be a requirement following the nvidia documentation and was missing in the compiled .dtbo file.
Now, the "Seeed Voice Card 2MIC" Device is listed when executing sudo /opt/nvidia/jetson-io/config-by-hardware.py -l. This wasnt the case before and seems to be a fix for the first problem.

However, there occurs another error, when trying to set the pin config of the Jetson 40pin Header to "Seeed Voice Card 2MIC" with config-by-hardware.py:

Traceback (most recent call last):
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 125, in
main()
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 117, in main
dtbo = configure_jetson(jetson, header, hw)
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 57, in configure_jetson
jetson.hw_addon_load(hw)
File "/opt/nvidia/jetson-io/Jetson/board.py", line 295, in hw_addon_load
node)
RuntimeError: Failed to get pin number for node /fragment@4/overlay/header-40pin-pinmux/pin12/!

Any idea on how to fix that and achieve setting the pin config correctly?

can-hat module does not build for kernel 5.15.32

I'm trying to build the CAN-HAT module on a Raspberry Pi 4 running 2022-04-04-raspios-bullseye-armhf-lite.img. This has kernel 5.15.32. Error output follows below. Apparently, things has changed in the CAN api. Build goes through on the 5.10.92 kernel of 2022-01-28-raspios-bullseye-armhf-lite.

CC [M]  /tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c: In function 'mcp25xxfd_handle_tefif_one':
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:1313:3: error: too few arguments to function 'can_rx_offload_get_echo_skb'
 1313 |   can_rx_offload_get_echo_skb(&priv->offload,
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/seeed-linux-dtoverlays/modules/CAN-HAT/spi_can_compatible.h:18,
                 from /tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd.h:15,
                 from /tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:26:
./include/linux/can/rx-offload.h:47:14: note: declared here
   47 | unsigned int can_rx_offload_get_echo_skb(struct can_rx_offload *offload,
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c: In function 'mcp25xxfd_hw_rx_obj_to_skb':
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:1482:14: error: implicit declaration of function 'can_dlc2len'; did you mean 'can_fd_dlc2len'? [-Werror=implicit-function-declaration]
 1482 |   cfd->len = can_dlc2len(get_canfd_dlc(dlc));
      |              ^~~~~~~~~~~
      |              can_fd_dlc2len
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:1482:26: error: implicit declaration of function 'get_canfd_dlc' [-Werror=implicit-function-declaration]
 1482 |   cfd->len = can_dlc2len(get_canfd_dlc(dlc));
      |                          ^~~~~~~~~~~~~
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:1487:14: error: implicit declaration of function 'get_can_dlc' [-Werror=implicit-function-declaration]
 1487 |   cfd->len = get_can_dlc(FIELD_GET(MCP25XXFD_OBJ_FLAGS_DLC,
      |              ^~~~~~~~~~~
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c: In function 'mcp25xxfd_tx_obj_from_skb':
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:2321:8: error: implicit declaration of function 'can_len2dlc'; did you mean 'can_fd_len2dlc'? [-Werror=implicit-function-declaration]
 2321 |  dlc = can_len2dlc(cfd->len);
      |        ^~~~~~~~~~~
      |        can_fd_len2dlc
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c: In function 'mcp25xxfd_start_xmit':
/tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:2423:2: error: too few arguments to function 'can_put_e
cho_skb'
 2423 |  can_put_echo_skb(skb, ndev, tx_head);
      |  ^~~~~~~~~~~~~~~~
In file included from ./include/linux/can/dev.h:23,
                 from /tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd.h:14,
                 from /tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.c:26:
./include/linux/can/skb.h:20:5: note: declared here
   20 | int can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
      |     ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /tmp/seeed-linux-dtoverlays/modules/CAN-HAT/mcp25xxfd-core.o] Error 1
make[1]: *** [Makefile:1868: /tmp/seeed-linux-dtoverlays/modules/CAN-HAT] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.32-v7l+'
make: *** [Makefile:43: all] Error 2

hw timestamp missing

Describe the bug
No hw timestamp provided when doing candump -x -ta -H can0
Time 0 is always returned

To Reproduce
Steps to reproduce the behavior:

wire can1 and can0 by physically connecting wires to can_h and can_l
in one terminal do:
candump -x -ta -H can0
in anoter terminal do:
cansend can1 123#123123

Expected behavior
some increasing time is expected as output

Removing -H does report kernel time as expected (1617269100.654171) can0 RX - - 123 [3] 12 31 23, but to get better precision -H is desired. And considering that the latest hat has a rtc onboard.

Summary
Thanks for providing and supporting a great can shield!

Trying to install reTerminal drivers on Ubuntu Mate 20.04, failed to build mipi_dsi

DKMS make.log for mipi_dsi-0.1 for kernel 5.4.0-1041-raspi (aarch64)
2021年 08月 08日 星期日 02:01:23 CST
make -C /lib/modules/5.4.0-1041-raspi/build M=/var/lib/dkms/mipi_dsi/0.1/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-1041-raspi'
CC [M] /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.o
CC [M] /var/lib/dkms/mipi_dsi/0.1/build/touch_panel.o
CC [M] /var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.o
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c: In function ‘panel_get_modes’:
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:242:9: error: too many arguments to function ‘funcs->get_modes’
242 | ret = funcs->get_modes(panel, connector);
| ^~~~~
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c: At top level:
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:255:15: error: initialization of ‘int (*)(struct drm_panel )’ from incompatible pointer type ‘int ()(struct drm_panel *, struct drm_connector *)’ [-Werror=incompatible-pointer-types]
255 | .get_modes = panel_get_modes,
| ^~~~~~~~~~~~~~~
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:255:15: note: (near initialization for ‘panel_funcs.get_modes’)
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c: In function ‘i2c_md_probe’:
/var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:348:2: error: too many arguments to function ‘drm_panel_init’
348 | drm_panel_init(&md->panel, dev, &panel_funcs, DRM_MODE_CONNECTOR_DSI);
| ^~~~~~~~~~~~~~
In file included from /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi.h:35,
from /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.c:11:
./include/drm/drm_panel.h:150:6: note: declared here
150 | void drm_panel_init(struct drm_panel panel);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:271: /var/lib/dkms/mipi_dsi/0.1/build/mipi_dsi_drv.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.c:284:15: error: initialization of ‘int (
)(struct drm_panel )’ from incompatible pointer type ‘int ()(struct drm_panel *, struct drm_connector *)’ [-Werror=incompatible-pointer-types]
284 | .get_modes = ili9881d_get_modes,
| ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.c:284:15: note: (near initialization for ‘ili9881d_funcs.get_modes’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:269: /var/lib/dkms/mipi_dsi/0.1/build/panel-ili9881d.o] Error 1
make[1]: *** [Makefile:1765: /var/lib/dkms/mipi_dsi/0.1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-1041-raspi'
make: *** [Makefile:15: all] Error 2

cannnot get events of user programmable buttons

Environment:

  • reTerminal
  • Raspberry Pi OS 32-bit Bullseye (2022-01-28)

Procedure:

  1. This fix can be used first:
    https://lab.seeed.co.jp/entry/2022/01/20/120000
  2. After that, you need to delete the line "dtoverlay=reTerminal-bridge" inside "/boot/config.txt" for LEDs and Buzzer to work

What happened:

I cannnot get events of user programmable buttons.
gpio_keys is not displayed.

pi@raspberrypi:~ $ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:      ST LIS3LV02DL Accelerometer
/dev/input/event1:      vc4
/dev/input/event2:      seeed-tp
/dev/input/event3:      vc4
Select the device event number [0-3]:

Links:

Installation fails for CAN-HAT on RPI3

Configuration:

  • RaspberryPi 3
  • Kernel: 4.19.118-v8+
  • RaspberryPi OS

While running seeed-linux-dtoverlays/modules/CAN-HAT/install.sh the following error bellow. I tried the installation also on the latest kernel for the RaspberryPi OS. Still, the installation fails.

Error:
------------------------------
Deleting module version: completely from the DKMS 
Done.                                                                                                                                                                                                                Creating symlink /var/lib/dkms/mcp25xxfd/0.1/source -> /usr/src/mcp25xxfd-0.1

DKMS: add completed.                                                                                                                 
Error! Your kernel headers for kernel 4.19.36+ cannot be found.
                                                                      
Please install the linux-headers-4.19.36+ package,                                                                                   
or use the --kernelsourcedir option to tell DKMS where it's located                                                                  
Error! Your kernel headers for kernel 4.19.36-v7+ cannot be found.                                                                   
Please install the linux-headers-4.19.36-v7+ package,                                                                                
or use the --kernelsourcedir option to tell DKMS where it's located                                                    
Error! Your kernel headers for kernel 4.19.36-v7l+ cannot be found.                                                                  
Please install the linux-headers-4.19.36-v7l+ package,                                                                               
or use the --kernelsourcedir option to tell DKMS where it's located                                                                  
------------------------------------------------------                                                                               
Please reboot your raspberry pi to apply all settings                                                                                
Enjoy!
------------------------------------------------------  

mipi_dsi reTerminal build fails: internal error in set_address, at ../../gold/output.h:322

Building the Yocto image for the reTerminal fails on Debian 11 with Yocto Hardknott:

      |   LD [M]  /home/remy/b2qt/build-raspberrypi4-64/tmp/work/raspberrypi4_64-poky-linux/seeed-linux-dtoverlays/1.0-r0/git/modules/mipi_dsi/mipi_dsi.ko
      | aarch64-poky-linux-ld: internal error in set_address, at ../../gold/output.h:322

Commit 7c846e23de9346d318fbdc8ac92dcc72b90fb6ce from the https://github.com/Seeed-Studio/meta-seeed-cm4 repository does work, no errors building mipi_dsi there.

When I use this on Jetson Nano, get an error ? "Can't switch mode"

Hi,

On Jetson nano, we get a problem and after a few minutes Nano rebooted.
dmesg log: (boot up)
mcp25xxfd spi0.0 can0: MCP2518FD rev0.0 (-RX_INT -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD m:20.00MHz
r:18.50MHz e:0.00MHz) successfully initialized.

kernel log: (sudo ip link set can0 up type can bitrate 1000000 dbitrate 8000000 restart-ms 1000 berr-reporting on fd on)
mcp25xxfd spi0.0 can0: Controller failed to enter mode Mixed (CAN FD/CAN 2.0) Mode (0) and stays in Config
uration Mode (4).

After a few minutes, Jetson nano rebooted, can you help to check about this bug on jetson nano? Thanks so much.

hm3301 doesn't work with iio_info

Describe the bug
Something in the driver causes an EINVAL failure when iio_create_local_context() is called.

To Reproduce
Steps to reproduce the behavior:

  1. Connect HM3301 Grove Module to BeagleBone Green Gateway with driver installed
  2. echo hm3301 0x40 > /sys/bus/i2c/devices/i2c-2/new_device
  3. iio_info
  4. See error

Expected behavior
A local context should be formed and information about the connected sensors should be displayed.

Screenshots

root@c70fa67:/sys/bus/iio/devices/iio:device2# ls
buffer           cleaning_period_available  dev                              in_massconcentration_pm1_input    in_massconcentration_scale  power          start_cleaning  trigger
cleaning_period  current_timestamp_clock    in_massconcentration_pm10_input  in_massconcentration_pm2p5_input  name                        scan_elements  subsystem       uevent
root@c70fa67:/sys/bus/iio/devices/iio:device2# iio_info 
Library version: 0.19 (git tag: v0.19)
Compiled with backends: local xml ip usb serial
Unable to create IIO context: Invalid argument

System version:

  • SeeedStudio BeagleBone Green Gateway
  • Debian Buster
  • Linux 5.4.70-ti-r21

reTerminal LCD does not work with RPi Kernel 6.1

Describe the bug
My reTerminal screen stopped worked after my Kernel was updated via RPi OS GUI interface. I tried download and run the reTerminal overlay script, but it aborts.

To Reproduce
Steps to reproduce the behavior:

  1. Flash reTerminal with latest RPi OS Bullseye (Kernel 5.15) using RPi Imager
  2. Update through the GUI interface, or
    1, sudo apt update
    2, sudo apt full-upgrade
    3, sudo apt install raspberrypi-kernel-headers, sudo reboot
  3. git clone --depth 1 https://github.com/Seeed-Studio/seeed-linux-dtoverlays
  4. cd seeed-linux-dtoverlays
  5. sudo ./scripts/reTerminal.sh
  6. Reboot

Expected behavior
LCD functioning, LCD worked with Kernal 5.15.x

Debug Output
The output of "dmesg | grep mipi" is as follows:

[    0.072037] platform fe700000.dsi: Fixed dependency cycle(s) with /soc/i2c@7e804000/mipi_dsi@45

LCD driver shows as not loaded at 0x45:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- 19 -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- 29 -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
40: -- -- -- -- -- 45 -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

./scripts/reTerminal.sh output:

### Install required tool packages
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dkms is already the newest version (2.8.4-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

### Will compile with the latest kernel...

### Uninstall previous dkms module

------------------------------
Deleting module version: 0.1
completely from the DKMS tree.
------------------------------
Done.

------------------------------
Deleting module version: 0.1
completely from the DKMS tree.
------------------------------
Done.

------------------------------
Deleting module version: 0.1
completely from the DKMS tree.
------------------------------
Done.

------------------------------
Deleting module version: 0.1
completely from the DKMS tree.
------------------------------
Done.
removed '/boot/overlays/reTerminal.dtbo'
removed '/boot/overlays/reTerminal-bridge.dtbo'
removed 'overlays/rpi/.reTerminal-bridge-overlay.dtbo.d.dtc.tmp'
removed 'overlays/rpi/.reTerminal-bridge-overlay.dtbo.d.pre.tmp'
removed 'overlays/rpi/.reTerminal-bridge-overlay.dtbo.dts.tmp'
removed 'overlays/rpi/.reTerminal-overlay.dtbo.d.dtc.tmp'
removed 'overlays/rpi/.reTerminal-overlay.dtbo.d.pre.tmp'
removed 'overlays/rpi/.reTerminal-overlay.dtbo.dts.tmp'
removed 'overlays/rpi/.reTerminal-bridge-overlay.dtbo.cmd'
removed 'overlays/rpi/.reTerminal-overlay.dtbo.cmd'
removed 'overlays/rpi/reTerminal-bridge-overlay.dtbo'
removed 'overlays/rpi/reTerminal-overlay.dtbo'

### Install required kernel package
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
raspberrypi-kernel is already the newest version (1:1.20230317-1).
raspberrypi-kernel-headers is already the newest version (1:1.20230317-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
W: --force-yes is deprecated, use one of the options starting with --allow instead.
 !!! Your kernel version is





6.1.19-v8+
     Couldn't find *** corresponding *** kernel headers with apt-get.
     This may happen if you ran 'rpi-update'.
 Choose  *** y *** to install kernel-headers to version 6.1.19-v8+ and continue.
 Choose  *** N *** to exit without this driver support, by default.
Would you like to proceed? (y/N)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
raspberrypi-kernel-headers is already the newest version (1:1.20230317-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Creating symlink /var/lib/dkms/mipi_dsi/0.1/source ->
                 /usr/src/mipi_dsi-0.1

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.1.19-v8+ all KVERSION=6.1.19-v8+....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.19-v8+ (aarch64)
Consult /var/lib/dkms/mipi_dsi/0.1/build/make.log for more information.
Can't compile with this kernel, aborting
Please try to compile with the option --compat-kernel

Please advise when this can be addressed. I need to send my reTerminal to another county this week as it is part of a test fixture. Anyone connecting this to the internet will be prompted to update the OS through the GUI, which will break screen functionality.

ReTerminal Debian support

I am trying to get Debian to load on the ReTerminal rather than Ubuntu (which I see there is already workarounds for).

I have tried installing Debian 11 Bullseye using both the tested image and daily images, and I can boot the ReTerminal, it gets stuck not being able to load bluetooth and network, and then lands me at the login screen...great!

The issue is that I have no USB and so I can't login, and since there is no network I can't SSH either. I think if I could actually login to the CM4 I might have a chance of fixing it, but as of now I'm out of ideas.

Any tips/suggestions?

(I know I could use Ubuntu or another, but I have an application that requires Debian 11)

MCP251xFD CAN HAT driver support and documentation outdated

The current script in https://github.com/Seeed-Studio/seeed-linux-dtoverlays/tree/master/modules/CAN-HAT which refers to the 5.4 kernel has different issues:

  1. The script states that the mcp25xxfd driver does not exist and therefore compiles and installs the mcp25xxfd driver
    In fact in the LATEST 5.4 kernel from RasPi already contains the mainline mcp251xfd (not mcp25xxfd!) driver in the drivers/net/can/spi/mcp251xfd directory which is not detected by your script. But using this existing driver with the provided overlay does not work.

  2. I used https://github.com/Hexxeh/rpi-update to update to the latest 5.10.11-v7l+ kernel with the latest mcp251xfd driver and the new combined overlays seeed-can-fd-hat-v1 and seeed-can-fd-hat-v2 from @marckleinebudde and @menschel which works like charm. Maybe these combined overlays also work for the latest 5.4 kernel out of the box - I didn't check that.

Please update your documentation / scripts to take care of the recent RasPi 5.4 kernel. The request for updating the documentation was already addressed by @menschel here: #13

Thanks!

Routine upgrade to Raspberry Pi OS Bullseye 6.x kernel breaks lan7800

Describe the bug

I have just done a routine:

$ sudo apt update
$ sudo apt upgrade -y

and the result is a broken reRouter CM4 1432.

Kernel change

uname -a output:

  • before: Linux sys-rtr 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux
  • after: Linux sys-rtr 6.1.19-v8+ #1637 SMP PREEMPT Tue Mar 14 11:11:47 GMT 2023 aarch64 GNU/Linux

lan7800 driver fails after kernel upgrade

$ grep lan7800 /var/log/syslog
Mar 21 09:07:13 sys-rtr systemd-modules-load[152]: Failed to find module 'lan7800'

This has happened several times since I acquired the reRouter CM4 1432 so I just follow the instructions at Ethernet Ports Configuration/

rebuilding lan7800 fails after kernel upgrade

$ git clone https://github.com/Seeed-Studio/seeed-linux-dtoverlays.git
Cloning into 'seeed-linux-dtoverlays'...
remote: Enumerating objects: 2928, done.
remote: Counting objects: 100% (498/498), done.
remote: Compressing objects: 100% (200/200), done.
remote: Total 2928 (delta 368), reused 398 (delta 298), pack-reused 2430
Receiving objects: 100% (2928/2928), 3.43 MiB | 8.27 MiB/s, done.
Resolving deltas: 100% (1568/1568), done.

$ cd seeed-linux-dtoverlays

$ sudo ./scripts/cm4_lan7800.sh
Installed: /usr/src/linux-headers-6.1.19-v8+
make: Entering directory '/usr/src/linux-headers-6.1.19-v8+'
  CC [M]  /home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.o
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c: In function ‘lan78xx_init_mac_address’:
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:1955:26: warning: passing argument 1 of ‘ether_addr_copy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1955 |  ether_addr_copy(dev->net->dev_addr, addr);
      |                  ~~~~~~~~^~~~~~~~~~
In file included from /home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:8:
./include/linux/etherdevice.h:295:40: note: expected ‘u8 *’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
  295 | static inline void ether_addr_copy(u8 *dst, const u8 *src)
      |                                    ~~~~^~~
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c: In function ‘lan78xx_set_mac_addr’:
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:2550:24: warning: passing argument 1 of ‘ether_addr_copy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 2550 |  ether_addr_copy(netdev->dev_addr, addr->sa_data);
      |                  ~~~~~~^~~~~~~~~~
In file included from /home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:8:
./include/linux/etherdevice.h:295:40: note: expected ‘u8 *’ {aka ‘unsigned char *’} but argument is of type ‘const unsigned char *’
  295 | static inline void ether_addr_copy(u8 *dst, const u8 *src)
      |                                    ~~~~^~~
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c: In function ‘lan78xx_probe’:
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:4312:2: error: implicit declaration of function ‘netif_set_gso_max_size’; did you mean ‘netif_set_tso_max_size’? [-Werror=implicit-function-declaration]
 4312 |  netif_set_gso_max_size(netdev, LAN78XX_TSO_SIZE(dev));
      |  ^~~~~~~~~~~~~~~~~~~~~~
      |  netif_set_tso_max_size
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:4314:2: error: too many arguments to function ‘netif_napi_add’
 4314 |  netif_napi_add(netdev, &dev->napi, lan78xx_poll, LAN78XX_NAPI_WEIGHT);
      |  ^~~~~~~~~~~~~~
In file included from /home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:7:
./include/linux/netdevice.h:2569:1: note: declared here
 2569 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:4361:9: error: too many arguments to function ‘usb_maxpacket’
 4361 |  maxp = usb_maxpacket(dev->udev, dev->pipe_intr, 0);
      |         ^~~~~~~~~~~~~
In file included from /home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:10:
./include/linux/usb.h:1981:19: note: declared here
 1981 | static inline u16 usb_maxpacket(struct usb_device *udev, int pipe)
      |                   ^~~~~~~~~~~~~
/home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:4377:19: error: too many arguments to function ‘usb_maxpacket’
 4377 |  dev->maxpacket = usb_maxpacket(dev->udev, dev->pipe_out, 1);
      |                   ^~~~~~~~~~~~~
In file included from /home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.c:10:
./include/linux/usb.h:1981:19: note: declared here
 1981 | static inline u16 usb_maxpacket(struct usb_device *udev, int pipe)
      |                   ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:250: /home/pi/seeed-linux-dtoverlays/modules/lan7800/lan78xx.o] Error 1
make: *** [Makefile:2012: /home/pi/seeed-linux-dtoverlays/modules/lan7800] Error 2
make: Leaving directory '/usr/src/linux-headers-6.1.19-v8+'
Build failed: lan7800

I went through this loop of finding and fixing a bug in cm4_lan7800.sh once before - #52 - but this one is beyond me. The result is I no longer have a working driver for the lan7800.

install_rpi fails

I also tried the instructions at Step 2: Install *.dtbo to see if they fared any better:

$ sudo make install_rpi
cp: cannot stat '2xMCP2517FD-overlay.dtbo': No such file or directory
make[2]: *** [Makefile:46: install] Error 1
make[1]: *** [Makefile:227: install_arch] Error 2
make: *** [Makefile:164: install_rpi] Error 2

If anything, I'd call that worse.

And, just for clarity, I retried sudo make install_rpi on a clean clone of the repo just to make sure the earlier attempt at running sudo ./scripts/cm4_lan7800.sh had not left a mess behind.

Discussion

The "obvious" solution is to downgrade Raspberry Pi OS to the previous kernel where I know lan7800 will still compile. Googling that topic arrives at the (unfortunate) answer that it isn't supported and a re-installation is in your future.

My original intention in purchasing the Seeed reRouter CM4 1432 was to go through the process of building my own router on top of Raspberry Pi OS. The notion of two Ethernet ports seemed like a good idea at the time and I got a fair way down the track, just short of putting it into production.

It is problems of this kind (what should be routine OS maintenance tasks causing breakages) that have given me pause.

If I only ever needed to recompile the driver, I could handle that. After all, the second Ethernet port still "works" without the driver, it just has asymmetric forwarding performance.

But rebuilding? It may just be me but any sentence including the word "rebuild" is never going to be high on my list of desirable features for a home router, particularly when a rebuild needs to begin with taking the router offline and opening the case.

I'm rapidly reaching the conclusion that the Seeed reRouter CM4 1432 was a nice idea in theory, shame about the practice.

Yes, I could switch to OpenWRT but that defeats my original purpose. The product claimed to run Raspberry Pi OS. It does, but only up to a point. The support for the additional features like the second Ethernet port seems to be a bit … lacking.

And, yes, I could just ignore the second Ethernet port and do everything with VLANs but then I'd be asking myself why I didn't just go with a standard Pi4 in the first place?

I realise that the last few paragraphs are editorialising and don't help solve the problem at hand. I've included them for two reasons:

  1. Anyone currently using the Seeed reRouter CM4 1432 + Raspberry Pi OS will be cautious before attempting a routine OS upgrade; and
  2. Anyone considering using the Seeed reRouter CM4 1432 + Raspberry Pi OS where they expect the second Ethernet port to "just work" goes into the challenge with their eyes open.

To Reproduce

Included above in commands.

Expected behavior

I expected sudo ./scripts/cm4_lan7800.sh to compile and install the driver, not chuck up errors.

Screenshots

Terminal output copy/paste in the above.

Desktop (please complete the following information):

  • not relevant - no desktop involved

Smartphone (please complete the following information):

  • not relevant - no phone/tablet involved

Additional context

Included above (eg sudo make install_rpi)

reTerminal LCD does not work after latest RPi Bullseye Update (Kernel 5.15)

Describe the bug
After flashing the reTerminal with the latest Raspberry Pi OS Bullseye found here, the LCD does not work anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Flash reTerminal with latest RPi OS Bullseye (Kernel 5.15) using RPi Imager
  2. git clone --depth 1 https://github.com/Seeed-Studio/seeed-linux-dtoverlays
  3. cd seeed-linux-dtoverlays
  4. sudo ./scripts/reTerminal.sh
  5. Reboot

Expected behavior
LCD worked with Kernal 5.10.x before

Debug output
The output of "dmesg | grep mipi" is as follows:

root@raspberrypi:~# dmesg | grep mipi
[    8.090686] i2c_mipi_dsi 1-0045: I2C read id: 0xc3
[    8.094604] [DSI]mipi_dsi_device:
[    8.315444] [DSI]mipi_dsi_probe:
[    8.899624] mipi_dsi fe700000.dsi.0: failed to attach dsi to host: -517
[    8.899791] [DSI]mipi_dsi_probe:

However. the LCD driver shows as loaded at 0x45:

root@raspberrypi:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- --
20: UU -- -- -- -- -- -- -- -- UU -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Please help to fix this. Thank you.

Best Regards,
Lakshantha

seeed-can-fd-hat-v1 and seeed-can-fd-hat-v2 dtoverlays no longer create can1 interface automatically on RPi 4

Describe the bug
Using a Raspberry Pi 4 with version 1 of the Seeed Studio 2-Channel CAN FD hat no longer creates a can1 interface automatically. I can use ip link to up can1 and it appears on the list and runs, but before that it is not present in the ifconfig list.

To Reproduce

  1. Obtain Raspberry Pi 4 with current Raspbian
~ $ uname -r
5.15.83-v7l+
  1. Add dtoverlay=seeed-can-fd-hat-v1 to /boot/config.txt
  2. Connect Seeed Studio CAN FD hat (v1, no battery holder) to a raspberry pi 4.
  3. Boot
  4. ifconfig -a, only can0 in the interface list.

Expected behavior
can0 and can1 present in ifconfig -a list after boot.

Desktop (please complete the following information):

  • OS: Raspian/Raspberry Pi OS, 5.15.84-v7l+

Additional context
I also tried the seeed-can-fd-hat-v2 dtoverlay, same result.

~ $ dmesg | grep spi
[   10.107092] spi_master spi0: will run message pump with realtime priority
[   10.264891] mcp251xfd spi0.0 can0: MCP2518FD rev0.0 (-RX_INT -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD c:40.00MHz m:20.00MHz r:17.00MHz e:16.66MHz) successfully initialized.
[   10.268304] spi_master spi1: will run message pump with realtime priority
[   10.277586] mcp251xfd spi1.0 can1: MCP2518FD rev0.0 (-RX_INT -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD c:40.00MHz m:20.00MHz r:17.00MHz e:16.66MHz) successfully initialized.
~ $ ifconfig -a
can0: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 81  

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether e4:5f:01:67:0b:47  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 23  bytes 2428 (2.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23  bytes 2428 (2.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.5.50.203  netmask 255.255.254.0  broadcast 10.5.51.255
        inet6 fe80::454a:9cb2:76ca:4806  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:67:0b:48  txqueuelen 1000  (Ethernet)
        RX packets 162  bytes 13057 (12.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 33  bytes 4417 (4.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
~ $ sudo ip link set can1 up type can bitrate 250000
~ $ ifconfig -a
can0: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 81  

can1: flags=193<UP,RUNNING,NOARP>  mtu 16
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 10  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 82  

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether e4:5f:01:67:0b:47  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 24  bytes 2523 (2.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24  bytes 2523 (2.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.5.50.203  netmask 255.255.254.0  broadcast 10.5.51.255
        inet6 fe80::454a:9cb2:76ca:4806  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:67:0b:48  txqueuelen 1000  (Ethernet)
        RX packets 3493  bytes 322973 (315.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1434  bytes 952976 (930.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I just noticed it looks like can0 is running by default now, and I saw something about the dtoverlay being built into the kernel now...do I still need to modify /boot/config.txt? Is there another way to have the can1 interface show on boot?

CAN-HAT Driver fails to initialize on Jetson Nano production module

After building and installing the mcp25xxfd driver for the can hat it fails to initialize.

Jetson module is the production one that has an EMMC module instead of the sdcard.
Using the latest L4T (v32.5.1)

dmesg output:
[ 8.853886] spi_tegra114p: loading out-of-tree module taints kernel.
[ 8.943685] tegra210-pinctrl 700008d4.pinmux: pin SPI1_CS1 PC4 already requested by 700008d4.pinmux; cannot claim for 7000d400.spi
[ 8.943689] tegra210-pinctrl 700008d4.pinmux: pin-20 (7000d400.spi) status -22
[ 8.943693] tegra210-pinctrl 700008d4.pinmux: could not request pin 20 (SPI1_CS1 PC4) from group spi1_cs1_pc4 on device 700008d4.pinmux
[ 8.943696] spi-tegra114p 7000d400.spi: Error applying setting, reverse things back
[ 8.943705] spi-tegra114p: probe of 7000d400.spi failed with error -22

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.