Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GPIO PI16 claimed by kernel

Featured Replies

I want to use GPIO Pi16 on the 13 pin expansion header of the board.

This pin is claimed by the kernel for the ethernet MAC.

According to the SOC Datasheet this pin has the option to provide a 25 MHz clock signal for the ethernet MAC,

which is not relevant for this board.

 

Thanks to this Topic https://forum.armbian.com/topic/30274-armbian-build-how-to-modify-dts-file-to-change-gpio-mapping/

and the device tree source files https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts,

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi and

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi

i managed to create an overlay named sun50i-h616-fix-emac-pin.dts to release the GPIO pin from the ethernet MAC/kernel.

 

/dts-v1/;
/plugin/;

/ {
        compatible = "allwinner,sun50i-h616";
        fragment@0 {
          target=<&pio>;
          __overlay__{
                ext_rgmii_pins: rgmii-pins {
                        pins = "PI0", "PI1", "PI2", "PI3", "PI4",
                               "PI5", "PI7", "PI8", "PI9", "PI10",
                               "PI11", "PI12", "PI13", "PI14", "PI15";
                                function = "emac0";
                                drive-strength = <40>;
                        };
                };
        };
        fragment@1 {
                target = <&emac0>;
                __overlay__ {
                        pinctrl-0 = <&ext_rgmii_pins>;
                        };
                };
        };

 

sudo armbian-add-overlay /boot/sun50i-h616-fix-emac-pin.dts

 

Even though I don't really understand how to write device tree overlays, surprisingly I could compile and apply the overlay to the kernel with the command above and it did its job.

The GPIO is available now and the ethernet connection still works.

 

Can someone who actually understands this subject review my code and include this change in the right form at the right spot?

Solved by going

19 часов назад, ARM_Bruzzler сказал:

i managed to create an overlay named sun50i-h616-fix-emac-pin.dts to release the GPIO pin from the ethernet MAC/kernel.

Unfortunately, you did not write which version of the kernel you wrote the overlay for.
I checked it out. For the EDGE kernel (v6.11.2), this is present.
No overlay is required.

  • Author

Thank you very much for checking.

 

I use the Debian (minimal/iot) image from https://www.armbian.com/orange-pi-zero-3/.

At the moment I have the kernel version 6.6.44.

I ran sudo apt update && sudo apt upgrade and verified the overlay is still required after the latest update.

So will the correction eventually be distributed over apt in a couple of days or weeks?

Edited by ARM_Bruzzler

08.10.2024 в 23:58, ARM_Bruzzler сказал:

I want to use GPIO Pi16 on the 13 pin expansion header of the board.

This pin is claimed by the kernel for the ethernet MAC.

According to the SOC Datasheet this pin has the option to provide a 25 MHz clock signal for the ethernet MAC,

which is not relevant for this board.

I think I've misled you.
For some reason I thought you wanted to add the whole node.
But you want to replace it with the same one but without the PI16 pin.
It's not in my power.
I don't have this board to check.

 

I apologize.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.