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 led dts netdev trigger option

Featured Replies

Hello everyone :-).

I would like help, I checked on the Web and I found using the forum a script (that I modified) to trigger using DTS LEDs.
I adapted the script found here at the end of the page: Topic 112-dtb-howto-add-leds

I think that for the section "disk-activity" and "netdev" it misses options but I'm not a developer just a scheming.

Can you please explain to me how to add options to the mentioned trigger?

I searched a lot of time but did not find any information.

Here is my script, everything works fine (compiled with armbian-add-overlay), but "disk-activity" and "netdev" do not work. I tested the write / read trigger on disk but did not work either.
Can you explain to me how to add the (device) options for disk-activity (with usb-nand-sata on / dev / sda) and netdev (for eth0)? thank you for the one who can help me to understand or to work this script.
My card is OrangePi PC2 H5 1GB

Sorry for bad english, my mother language is french. (this message is translatted in english from french)

here is my script:

/dts-v1/;
/plugin/;

/ {
compatible = "allwinner,sun50i-h5";

fragment@0 {
  target = <&pio>;
  __overlay__ {
   gpio_pin: gpio_pin {
    pins = "PA19","PA7","PA8","PA9","PA10","PD11","PA6","PA1","PA0","PA3";
    function = "gpio_out";
   };
  };
};

fragment@1 {
  target-path = "/";
  __overlay__ {
   gpiopull: gpiopull {
    compatible = "gpio-leds";
    pinctrl-names = "default";
    pinctrl-0 = <&gpio_pin>;
    status = "okay";
     gpio_out_19 {
     label = "P19:orange:wifiRx";
     gpios = <&pio 0 19 0>;
     linux,default-trigger = "phy0rx";
    };
     gpio_out_7 {
     label = "P7:red:wifiTX";
     gpios = <&pio 0 7 0>;
     default-state = "om";
     linux,default-trigger = "phy0tx";
	 };
     gpio_out_8 {
     label = "P8:orange:wifiConnect";
     gpios = <&pio 0 8 0>;
     linux,default-trigger = "phy0assoc";
    };
     gpio_out_9 {
     label = "P9:green:wifiDetectUSB";
     gpios = <&pio 0 9 0>;
     linux,default-trigger = "phy0radio";
   };
     gpio_out_10 {
     label = "P10:blue:cpuOnline";
     gpios = <&pio 0 10 0>;
     linux,default-trigger = "cpu";
   };
     gpio_out_11 { 
     label = "P11:white:Act";
     gpios = <&pio 3 11 0>;
     linux,default-trigger = "activity";
   };
     gpio_out_0 { 
     label = "P0:mmc0";
     gpios = <&pio 0 0 0>;
     linux,default-trigger = "mmc0";
   };
     gpio_out_1 { 
     label = "P1:disk-activity";
     gpios = <&pio 0 1 0>;
     linux,default-trigger = "disk-activity";
   };
     gpio_out_3 { 
     label = "P3:etherLink1gbps";
     gpios = <&pio 0 3 0>;
     linux,default-trigger = "0.2:01:1Gbps";
   };
     gpio_out_6 { 
     label = "P6:cpuled";
     gpios = <&pio 0 6 0>;
     linux,default-trigger = "netdev";    
   };
  };
 };
};
};

 

addDTBTest2.dts

Guest
This topic is now closed to further replies.

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.