Skip to contentSkip to conversation

arm64: dts: rockchip: Reorder LED triggers from mmc devices on rk3399-roc-pc.

PATCH Applied Markus Reichl 4 participants 4 messages Nov 4, 2020 – Nov 8, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: rockchip: Reorder LED triggers from mmc devices on rk3399-roc-pc.

After patch [1] SD-card becomes mmc1 and eMMC becomes mmc2. Correct trigger of LEDs accordingly.

[1]
https://patchwork.kernel.org/patch/11881427

---
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +2 -2
index e7a459fa4322..20309076dbac 100644
@@ -74,14 +74,14 @@ diy_led: led-1 {
 			label = "red:diy";
 			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
 			default-state = "off";
-			linux,default-trigger = "mmc1";
+			linux,default-trigger = "mmc2";
 		};
 
 		yellow_led: led-2 {
 			label = "yellow:yellow-led";
 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
 			default-state = "off";
-			linux,default-trigger = "mmc0";
+			linux,default-trigger = "mmc1";
 		};
 	};
 
Signature · 1 line
2.28.0
#1 lore raw

Hi Markus,

Quoted 16 lines · Markus Reichl

After patch [1] SD-card becomes mmc1 and eMMC becomes mmc2. Correct trigger of LEDs accordingly.

[1]
https://patchwork.kernel.org/patch/11881427

---
 arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +0 -0
index e7a459fa4322..20309076dbac 100644

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi diy_led: led-1 { · line 78

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1 -1
@@ -74,14 +74,14 @@ diy_led: led-1 {
 			label = "red:diy";
 			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
 			default-state = "off";
-			linux,default-trigger = "mmc1";
 
+			linux,default-trigger = "mmc2";

remove

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi diy_led: led-1 {

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1 -1
 		};
 
 		yellow_led: led-2 {
 			label = "yellow:yellow-led";
 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
 			default-state = "off";
-			linux,default-trigger = "mmc0";
 
+			linux,default-trigger = "mmc1";

remove

Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +0 -0
 		};

};

The "mmc1" and "mmc2" options are custom values and invalid to the automated dt check in the mainline kernel.

make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yaml

linux,default-trigger:
description:
This parameter, if present, is a string defining the trigger
assigned to
the LED.
$ref: /schemas/types.yaml#definitions/string

enum:
# LED will act as a back-light, controlled by the framebuffer system
- backlight
# LED will turn on (but for leds-gpio see "default-state"
property in
# Documentation/devicetree/bindings/leds/leds-gpio.yaml)
- default-on
# LED "double" flashes at a load average based rate
- heartbeat
# LED indicates disk activity
- disk-activity
# LED indicates IDE disk activity (deprecated), in new
implementations

        # use "disk-activity"
      - ide-disk
        # LED flashes at a fixed, configurable rate
      - timer
        # LED alters the brightness for the specified duration with one
software
        # timer (requires "led-pattern" property)
      - pattern
#2 lore raw
Quoted 39 lines · Johan Jonker

Hi Markus,

Quoted 16 lines · Markus Reichl

After patch [1] SD-card becomes mmc1 and eMMC becomes mmc2. Correct trigger of LEDs accordingly.

[1]
https://patchwork.kernel.org/patch/11881427

---
  arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +0 -0
index e7a459fa4322..20309076dbac 100644

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi diy_led: led-1 { · line 78

Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1 -1
@@ -74,14 +74,14 @@ diy_led: led-1 {
  			label = "red:diy";
  			gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
  			default-state = "off";
-			linux,default-trigger = "mmc1";
 
+			linux,default-trigger = "mmc2";

remove

arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi diy_led: led-1 {

Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1 -1
  		};
 
  		yellow_led: led-2 {
  			label = "yellow:yellow-led";
  			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
  			default-state = "off";
-			linux,default-trigger = "mmc0";
 
+			linux,default-trigger = "mmc1";

remove

Quoted 7 lines
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +0 -0
  		};
  	};

The "mmc1" and "mmc2" options are custom values and invalid to the automated dt check in the mainline kernel.

It's already been established that the binding is at fault here. Effort should be spent on fixing *that*, not sacrificing useful and intended DT functionality in blind deference to the schema gods.

Robin.

Quoted 34 lines

make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/leds-gpio.yaml

linux,default-trigger:
description:
This parameter, if present, is a string defining the trigger
assigned to
the LED.
$ref: /schemas/types.yaml#definitions/string

enum:
# LED will act as a back-light, controlled by the framebuffer system
- backlight
# LED will turn on (but for leds-gpio see "default-state"
property in
# Documentation/devicetree/bindings/leds/leds-gpio.yaml)
- default-on
# LED "double" flashes at a load average based rate
- heartbeat
# LED indicates disk activity
- disk-activity
# LED indicates IDE disk activity (deprecated), in new
implementations

         # use "disk-activity"
       - ide-disk
         # LED flashes at a fixed, configurable rate
       - timer
         # LED alters the brightness for the specified duration with one
software
         # timer (requires "led-pattern" property)
       - pattern