From e0222ec45497774b7b1e01aa6d13a9e62c80cb7f Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 4 Aug 2022 08:36:14 +0200 Subject: [PATCH] Add LED control through device tree overrides (#2038) --- ...Add-device-tree-for-Home-Assistant-Y.patch | 4 +- ...yellow-Mux-UART4-for-SiLabs-radio-mo.patch | 8 +-- ...M-dts-bcm2711-yellow-Mux-debug-UART5.patch | 8 +-- ...cm2711-yellow-Enable-I2C6-by-default.patch | 8 +-- ...s-bcm2711-yellow-add-I2S-audio-codec.patch | 8 +-- ...-dts-bcm2711-yellow-enable-GPIO-keys.patch | 8 +-- ...-ARM-dts-bcm2711-yellow-add-user-LED.patch | 8 +-- ...bcm2711-yellow-add-NXP-PCF85063A-RTC.patch | 8 +-- ...yellow-enable-USB-host-mode-by-defau.patch | 8 +-- ...yellow-use-generic-activity-trigger-.patch | 8 +-- ...1-yellow-use-USB-OTG-mode-by-default.patch | 8 +-- ...-exp-Workaround-polarity-firmware-bu.patch | 41 +++++++++++ ...dts-bcm2711-yellow-Add-LED-overrides.patch | 68 +++++++++++++++++++ 13 files changed, 151 insertions(+), 42 deletions(-) create mode 100644 buildroot-external/board/raspberrypi/yellow/patches/linux/0012-gpio-raspberrypi-exp-Workaround-polarity-firmware-bu.patch create mode 100644 buildroot-external/board/raspberrypi/yellow/patches/linux/0013-ARM-dts-bcm2711-yellow-Add-LED-overrides.patch diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0001-ARM-dts-bcm2711-Add-device-tree-for-Home-Assistant-Y.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0001-ARM-dts-bcm2711-Add-device-tree-for-Home-Assistant-Y.patch index 0094a825f..5ab42ca43 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0001-ARM-dts-bcm2711-Add-device-tree-for-Home-Assistant-Y.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0001-ARM-dts-bcm2711-Add-device-tree-for-Home-Assistant-Y.patch @@ -1,8 +1,8 @@ From 2d3d8c091bc692999a1c519c1dc1570cc8be2358 Mon Sep 17 00:00:00 2001 -Message-Id: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Mon, 11 Apr 2022 14:47:59 +0200 -Subject: [PATCH 01/11] ARM: dts: bcm2711: Add device tree for Home Assistant +Subject: [PATCH 01/13] ARM: dts: bcm2711: Add device tree for Home Assistant Yellow Add device tree for Home Assistant Yellow, a Compute Module 4 based I/O diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0002-ARM-dts-bcm2711-yellow-Mux-UART4-for-SiLabs-radio-mo.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0002-ARM-dts-bcm2711-yellow-Mux-UART4-for-SiLabs-radio-mo.patch index d4082e77a..bd5b7cb79 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0002-ARM-dts-bcm2711-yellow-Mux-UART4-for-SiLabs-radio-mo.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0002-ARM-dts-bcm2711-yellow-Mux-UART4-for-SiLabs-radio-mo.patch @@ -1,10 +1,10 @@ From a4a63bb6f6789c00762b92f0469d10bac525d1f9 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Thu, 4 Mar 2021 14:33:09 +0100 -Subject: [PATCH 02/11] ARM: dts: bcm2711: yellow: Mux UART4 for SiLabs radio +Subject: [PATCH 02/13] ARM: dts: bcm2711: yellow: Mux UART4 for SiLabs radio module Enable UART4 by default and mux pins including hardware flow control. diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0003-ARM-dts-bcm2711-yellow-Mux-debug-UART5.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0003-ARM-dts-bcm2711-yellow-Mux-debug-UART5.patch index a405d689d..7369a9d97 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0003-ARM-dts-bcm2711-yellow-Mux-debug-UART5.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0003-ARM-dts-bcm2711-yellow-Mux-debug-UART5.patch @@ -1,10 +1,10 @@ From c0ddd45166d5aa922045da915202540db3ef2dc2 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Thu, 4 Mar 2021 14:44:23 +0100 -Subject: [PATCH 03/11] ARM: dts: bcm2711: yellow: Mux debug UART5 +Subject: [PATCH 03/13] ARM: dts: bcm2711: yellow: Mux debug UART5 Signed-off-by: Stefan Agner --- diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0004-ARM-dts-bcm2711-yellow-Enable-I2C6-by-default.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0004-ARM-dts-bcm2711-yellow-Enable-I2C6-by-default.patch index 24927fc9f..41c06e48f 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0004-ARM-dts-bcm2711-yellow-Enable-I2C6-by-default.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0004-ARM-dts-bcm2711-yellow-Enable-I2C6-by-default.patch @@ -1,10 +1,10 @@ From 606dcdc896ffc18001ad4983d45a2e23cacd040a Mon Sep 17 00:00:00 2001 -Message-Id: <606dcdc896ffc18001ad4983d45a2e23cacd040a.1658843713.git.stefan@agner.ch> -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: <606dcdc896ffc18001ad4983d45a2e23cacd040a.1659172941.git.stefan@agner.ch> +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Thu, 4 Mar 2021 14:48:48 +0100 -Subject: [PATCH 04/11] ARM: dts: bcm2711: yellow: Enable I2C6 by default +Subject: [PATCH 04/13] ARM: dts: bcm2711: yellow: Enable I2C6 by default The main I2C bus used on Yellow is I2C6. Enable it by default. diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0005-ARM-dts-bcm2711-yellow-add-I2S-audio-codec.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0005-ARM-dts-bcm2711-yellow-add-I2S-audio-codec.patch index 6d3216e01..a8c2f52e6 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0005-ARM-dts-bcm2711-yellow-add-I2S-audio-codec.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0005-ARM-dts-bcm2711-yellow-add-I2S-audio-codec.patch @@ -1,10 +1,10 @@ From 298d5254c1c2151b34eaf87f7e2f44205d34d909 Mon Sep 17 00:00:00 2001 -Message-Id: <298d5254c1c2151b34eaf87f7e2f44205d34d909.1658843713.git.stefan@agner.ch> -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: <298d5254c1c2151b34eaf87f7e2f44205d34d909.1659172941.git.stefan@agner.ch> +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Thu, 4 Mar 2021 17:19:01 +0100 -Subject: [PATCH 05/11] ARM: dts: bcm2711: yellow: add I2S audio codec +Subject: [PATCH 05/13] ARM: dts: bcm2711: yellow: add I2S audio codec Add TI PCM5122 I2S audio codec. diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0006-ARM-dts-bcm2711-yellow-enable-GPIO-keys.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0006-ARM-dts-bcm2711-yellow-enable-GPIO-keys.patch index 1ae933611..c17739811 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0006-ARM-dts-bcm2711-yellow-enable-GPIO-keys.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0006-ARM-dts-bcm2711-yellow-enable-GPIO-keys.patch @@ -1,10 +1,10 @@ From 41127a02d66d07d0a17e904557899b15a067a692 Mon Sep 17 00:00:00 2001 -Message-Id: <41127a02d66d07d0a17e904557899b15a067a692.1658843713.git.stefan@agner.ch> -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: <41127a02d66d07d0a17e904557899b15a067a692.1659172941.git.stefan@agner.ch> +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Tue, 9 Mar 2021 15:02:53 +0100 -Subject: [PATCH 06/11] ARM: dts: bcm2711: yellow: enable GPIO keys +Subject: [PATCH 06/13] ARM: dts: bcm2711: yellow: enable GPIO keys Signed-off-by: Stefan Agner --- diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0007-ARM-dts-bcm2711-yellow-add-user-LED.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0007-ARM-dts-bcm2711-yellow-add-user-LED.patch index 48518d16a..530c2a0a6 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0007-ARM-dts-bcm2711-yellow-add-user-LED.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0007-ARM-dts-bcm2711-yellow-add-user-LED.patch @@ -1,10 +1,10 @@ From efe5e827dc0653066ebc9f71de2ccf391a4bb27e Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Thu, 28 Oct 2021 19:38:04 +0200 -Subject: [PATCH 07/11] ARM: dts: bcm2711: yellow: add user LED +Subject: [PATCH 07/13] ARM: dts: bcm2711: yellow: add user LED Add yellow user LED. diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0008-ARM-dts-bcm2711-yellow-add-NXP-PCF85063A-RTC.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0008-ARM-dts-bcm2711-yellow-add-NXP-PCF85063A-RTC.patch index 078a9e82c..b03069a92 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0008-ARM-dts-bcm2711-yellow-add-NXP-PCF85063A-RTC.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0008-ARM-dts-bcm2711-yellow-add-NXP-PCF85063A-RTC.patch @@ -1,10 +1,10 @@ From 31ab383d0803e39e94472eea192e712fcc6e3cd6 Mon Sep 17 00:00:00 2001 -Message-Id: <31ab383d0803e39e94472eea192e712fcc6e3cd6.1658843713.git.stefan@agner.ch> -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: <31ab383d0803e39e94472eea192e712fcc6e3cd6.1659172941.git.stefan@agner.ch> +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Fri, 12 Nov 2021 17:33:32 +0100 -Subject: [PATCH 08/11] ARM: dts: bcm2711: yellow: add NXP PCF85063A RTC +Subject: [PATCH 08/13] ARM: dts: bcm2711: yellow: add NXP PCF85063A RTC Signed-off-by: Stefan Agner --- diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0009-ARM-dts-bcm2711-yellow-enable-USB-host-mode-by-defau.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0009-ARM-dts-bcm2711-yellow-enable-USB-host-mode-by-defau.patch index bf5b44e4a..6fe27aaf1 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0009-ARM-dts-bcm2711-yellow-enable-USB-host-mode-by-defau.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0009-ARM-dts-bcm2711-yellow-enable-USB-host-mode-by-defau.patch @@ -1,10 +1,10 @@ From f1553f413c8f53694d2f27db5b5c43d19cf1ff4f Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Fri, 7 Jan 2022 17:10:00 +0100 -Subject: [PATCH 09/11] ARM: dts: bcm2711: yellow: enable USB host mode by +Subject: [PATCH 09/13] ARM: dts: bcm2711: yellow: enable USB host mode by default The DWC2 controller is disable by default. Enable it since Home diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0010-ARM-dts-bcm2711-yellow-use-generic-activity-trigger-.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0010-ARM-dts-bcm2711-yellow-use-generic-activity-trigger-.patch index 7675ee855..dbbc43909 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0010-ARM-dts-bcm2711-yellow-use-generic-activity-trigger-.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0010-ARM-dts-bcm2711-yellow-use-generic-activity-trigger-.patch @@ -1,10 +1,10 @@ From 6f5e8133651df38d187c05bc27fd8fa25f0216da Mon Sep 17 00:00:00 2001 -Message-Id: <6f5e8133651df38d187c05bc27fd8fa25f0216da.1658843713.git.stefan@agner.ch> -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: <6f5e8133651df38d187c05bc27fd8fa25f0216da.1659172941.git.stefan@agner.ch> +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Wed, 27 Apr 2022 20:36:19 +0200 -Subject: [PATCH 10/11] ARM: dts: bcm2711: yellow: use generic activity trigger +Subject: [PATCH 10/13] ARM: dts: bcm2711: yellow: use generic activity trigger for green LED Use the generic trigger "activity" for the green LED so that any diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0011-ARM-dts-bcm2711-yellow-use-USB-OTG-mode-by-default.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0011-ARM-dts-bcm2711-yellow-use-USB-OTG-mode-by-default.patch index 096d736c1..4fca6fcb5 100644 --- a/buildroot-external/board/raspberrypi/yellow/patches/linux/0011-ARM-dts-bcm2711-yellow-use-USB-OTG-mode-by-default.patch +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0011-ARM-dts-bcm2711-yellow-use-USB-OTG-mode-by-default.patch @@ -1,10 +1,10 @@ From f626368d2e2c7b5fc9066e80ef33d58071c297b6 Mon Sep 17 00:00:00 2001 -Message-Id: -In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> -References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1658843713.git.stefan@agner.ch> +Message-Id: +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> From: Stefan Agner Date: Tue, 26 Jul 2022 15:53:59 +0200 -Subject: [PATCH 11/11] ARM: dts: bcm2711: yellow: use USB OTG mode by default +Subject: [PATCH 11/13] ARM: dts: bcm2711: yellow: use USB OTG mode by default OTG seems to work fine, and allows to use the USB-C port as a USB peripheral (e.g. in U-Boot via UMS command). diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0012-gpio-raspberrypi-exp-Workaround-polarity-firmware-bu.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0012-gpio-raspberrypi-exp-Workaround-polarity-firmware-bu.patch new file mode 100644 index 000000000..367c33df2 --- /dev/null +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0012-gpio-raspberrypi-exp-Workaround-polarity-firmware-bu.patch @@ -0,0 +1,41 @@ +From 01e15ae929bb8442f3c9cb31b7cad182ecc4d520 Mon Sep 17 00:00:00 2001 +Message-Id: <01e15ae929bb8442f3c9cb31b7cad182ecc4d520.1659172941.git.stefan@agner.ch> +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +From: Stefan Agner +Date: Sat, 30 Jul 2022 11:12:13 +0200 +Subject: [PATCH 12/13] gpio: raspberrypi-exp: Workaround polarity firmware bug + +When configuring a GPIO as output, the firmware seems to invert the +initial state when active low polarity is declared in the device tree. +The bug has been acknowledged by the firmware team and will be fixed +in a future firmware release: +https://github.com/raspberrypi/linux/issues/5107 + +Fix this by inverting the polarity on our side as well to make sure +the initial output is set correctly. + +Signed-off-by: Stefan Agner +--- + drivers/gpio/gpio-raspberrypi-exp.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/gpio/gpio-raspberrypi-exp.c b/drivers/gpio/gpio-raspberrypi-exp.c +index 64a552ecc2ad..f986940c3a5d 100644 +--- a/drivers/gpio/gpio-raspberrypi-exp.c ++++ b/drivers/gpio/gpio-raspberrypi-exp.c +@@ -119,6 +119,11 @@ static int rpi_exp_gpio_dir_out(struct gpio_chip *gc, unsigned int off, int val) + return ret; + set_out.polarity = ret; /* Retain existing setting */ + ++ /* Need to invert the GPIO in first config set if inverted polarity */ ++ /* See https://github.com/raspberrypi/linux/issues/5107 */ ++ if (set_out.polarity) ++ set_out.state = !val; ++ + ret = rpi_firmware_property(gpio->fw, RPI_FIRMWARE_SET_GPIO_CONFIG, + &set_out, sizeof(set_out)); + if (ret || set_out.gpio != 0) { +-- +2.37.1 + diff --git a/buildroot-external/board/raspberrypi/yellow/patches/linux/0013-ARM-dts-bcm2711-yellow-Add-LED-overrides.patch b/buildroot-external/board/raspberrypi/yellow/patches/linux/0013-ARM-dts-bcm2711-yellow-Add-LED-overrides.patch new file mode 100644 index 000000000..a11060bee --- /dev/null +++ b/buildroot-external/board/raspberrypi/yellow/patches/linux/0013-ARM-dts-bcm2711-yellow-Add-LED-overrides.patch @@ -0,0 +1,68 @@ +From 713afd6c80d4635306682a5643799195846271b1 Mon Sep 17 00:00:00 2001 +Message-Id: <713afd6c80d4635306682a5643799195846271b1.1659172941.git.stefan@agner.ch> +In-Reply-To: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +References: <2d3d8c091bc692999a1c519c1dc1570cc8be2358.1659172941.git.stefan@agner.ch> +From: Stefan Agner +Date: Sat, 30 Jul 2022 11:21:31 +0200 +Subject: [PATCH 13/13] ARM: dts: bcm2711: yellow: Add LED overrides + +Add device tree overrides for all three LEDs. + +Signed-off-by: Stefan Agner +--- + arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +diff --git a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts +index f354bfb69093..2d272a02128b 100644 +--- a/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts ++++ b/arch/arm/boot/dts/bcm2711-rpi-cm4-ha-yellow.dts +@@ -621,20 +621,24 @@ audio_pins: audio_pins { + + &leds { + act_led: led-act { +- label = "led0"; ++ label = "act"; + linux,default-trigger = "activity"; ++ default-state = "off"; + gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; + }; + + pwr_led: led-pwr { +- label = "led1"; ++ label = "pwr"; + linux,default-trigger = "default-on"; ++ default-state = "off"; + gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; + }; + +- user_led: led-user { +- label = "led2"; ++ usr_led: led-usr { ++ label = "usr"; + linux,default-trigger = "heartbeat"; ++ default-state = "off"; ++ panic-indicator; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + }; +@@ -670,14 +674,13 @@ cam0_reg: &cam1_reg { + + / { + __overrides__ { +- act_led_gpio = <&act_led>,"gpios:4"; +- act_led_activelow = <&act_led>,"gpios:8"; + act_led_trigger = <&act_led>,"linux,default-trigger"; + +- pwr_led_gpio = <&pwr_led>,"gpios:4"; + pwr_led_activelow = <&pwr_led>,"gpios:8"; + pwr_led_trigger = <&pwr_led>,"linux,default-trigger"; + ++ usr_led_trigger = <&usr_led>,"linux,default-trigger"; ++ + eth_led0 = <&phy1>,"led-modes:0"; + eth_led1 = <&phy1>,"led-modes:4"; + +-- +2.37.1 +