Commit 1156e3a7 authored by Stefan Wahren's avatar Stefan Wahren Committed by Florian Fainelli
Browse files

ARM: dts: bcm283x: Move ACT LED into separate dtsi



The usage of the label property for gpio-leds has been deprecated
a long time ago. In bcm2835-rpi.dtsi the ACT LED uses such a label
and derive it to almost every Raspberry Pi board. Since we cannot break
userspace interface this property must be kept. But we can move the
ACT LED into a separate dtsi and include them from the board files.

This change have two benefits:
- with both new refs it's now clear the LED part is included from a dtsi
- new boards do not include the deprecated stuff automatically

Reported-by: default avatarAlexander Dahl <ada@thorsis.com>
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/20221110173105.6633-3-stefan.wahren@i2se.com


Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
parent a9865ec3
Loading
Loading
Loading
Loading
+14 −13
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
/dts-v1/;
#include "bcm2711.dtsi"
#include "bcm2711-rpi.dtsi"
#include "bcm283x-rpi-led-deprecated.dtsi"
#include "bcm283x-rpi-usb-peripheral.dtsi"
#include "bcm283x-rpi-wifi-bt.dtsi"

@@ -14,19 +15,6 @@ chosen {
		stdout-path = "serial1:115200n8";
	};

	leds {
		led-act {
			gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
		};

		led-pwr {
			label = "PWR";
			gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
			default-state = "keep";
			linux,default-trigger = "default-on";
		};
	};

	sd_io_1v8_reg: regulator-sd-io-1v8 {
		compatible = "regulator-gpio";
		regulator-name = "vdd-sd-io";
@@ -156,6 +144,19 @@ &hdmi1 {
	status = "okay";
};

&led_act {
	gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};

&leds {
	led_pwr: led-pwr {
		label = "PWR";
		gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
		default-state = "keep";
		linux,default-trigger = "default-on";
	};
};

&pixelvalve0 {
	status = "okay";
};
+8 −8
Original line number Diff line number Diff line
@@ -11,14 +11,6 @@ chosen {
		stdout-path = "serial1:115200n8";
	};

	leds {
		/delete-node/ led-act;

		led-pwr {
			gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
		};
	};

	gpio-poweroff {
		compatible = "gpio-poweroff";
		gpios = <&expgpio 5 GPIO_ACTIVE_HIGH>;
@@ -40,6 +32,14 @@ &genet_mdio {
	clock-frequency = <1950000>;
};

&led_pwr {
	gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};

&leds {
	/delete-node/ led_act;
};

&pm {
	/delete-property/ system-power-controller;
};
+14 −13
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "bcm2711-rpi-cm4.dtsi"
#include "bcm283x-rpi-led-deprecated.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"

/ {
	model = "Raspberry Pi Compute Module 4 IO Board";

	leds {
		led-act {
			gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
		};

		led-pwr {
			label = "PWR";
			gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
			default-state = "keep";
			linux,default-trigger = "default-on";
		};
	};
};

&ddc0 {
@@ -113,6 +101,19 @@ &genet {
	status = "okay";
};

&led_act {
	gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};

&leds {
	led-pwr {
		label = "PWR";
		gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
		default-state = "keep";
		linux,default-trigger = "default-on";
	};
};

&pixelvalve0 {
	status = "okay";
};
+14 −13
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
#include "bcm2835.dtsi"
#include "bcm2835-rpi.dtsi"
#include "bcm2835-rpi-common.dtsi"
#include "bcm283x-rpi-led-deprecated.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"

/ {
@@ -13,19 +14,6 @@ memory@0 {
		device_type = "memory";
		reg = <0 0x10000000>;
	};

	leds {
		led-act {
			gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
		};

		led-pwr {
			label = "PWR";
			gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
			default-state = "keep";
			linux,default-trigger = "default-on";
		};
	};
};

&gpio {
@@ -108,6 +96,19 @@ &hdmi {
	status = "okay";
};

&led_act {
	gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
};

&leds {
	led-pwr {
		label = "PWR";
		gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
		default-state = "keep";
		linux,default-trigger = "default-on";
	};
};

&pwm {
	pinctrl-names = "default";
	pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
+5 −6
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
#include "bcm2835.dtsi"
#include "bcm2835-rpi.dtsi"
#include "bcm2835-rpi-common.dtsi"
#include "bcm283x-rpi-led-deprecated.dtsi"
#include "bcm283x-rpi-usb-host.dtsi"

/ {
@@ -13,12 +14,6 @@ memory@0 {
		device_type = "memory";
		reg = <0 0x10000000>;
	};

	leds {
		led-act {
			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
		};
	};
};

&gpio {
@@ -103,6 +98,10 @@ &hdmi {
	status = "okay";
};

&led_act {
	gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};

&pwm {
	pinctrl-names = "default";
	pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>;
Loading