* [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream
@ 2018-12-07 18:21 Stefan Wahren
2018-12-07 18:21 ` [PATCH 2/2] firmware: raspberrypi: notify VC4 firmware of a reboot Stefan Wahren
2018-12-08 5:49 ` [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream Eric Anholt
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Wahren @ 2018-12-07 18:21 UTC (permalink / raw)
To: Florian Fainelli, Ray Jui, Scott Branden, Eric Anholt,
Arnd Bergmann
Cc: Stefan Wahren, bcm-kernel-feedback-list, linux-rpi-kernel,
linux-arm-kernel
Add latest firmware property tags from the latest Raspberry Pi downstream
kernel. This is needed to use the reboot notify in the following
commit.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
include/soc/bcm2835/raspberrypi-firmware.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
index 4be1aa4..7800e12 100644
--- a/include/soc/bcm2835/raspberrypi-firmware.h
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
@@ -73,6 +73,8 @@ enum rpi_firmware_property_tag {
RPI_FIRMWARE_GET_CUSTOMER_OTP = 0x00030021,
RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030,
RPI_FIRMWARE_GET_THROTTLED = 0x00030046,
+ RPI_FIRMWARE_GET_CLOCK_MEASURED = 0x00030047,
+ RPI_FIRMWARE_NOTIFY_REBOOT = 0x00030048,
RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001,
RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002,
RPI_FIRMWARE_SET_VOLTAGE = 0x00038003,
@@ -86,6 +88,8 @@ enum rpi_firmware_property_tag {
RPI_FIRMWARE_SET_GPIO_CONFIG = 0x00038043,
RPI_FIRMWARE_GET_PERIPH_REG = 0x00030045,
RPI_FIRMWARE_SET_PERIPH_REG = 0x00038045,
+ RPI_FIRMWARE_GET_POE_HAT_VAL = 0x00030049,
+ RPI_FIRMWARE_SET_POE_HAT_VAL = 0x00030050,
/* Dispmanx TAGS */
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] firmware: raspberrypi: notify VC4 firmware of a reboot
2018-12-07 18:21 [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream Stefan Wahren
@ 2018-12-07 18:21 ` Stefan Wahren
2018-12-08 5:49 ` [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream Eric Anholt
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2018-12-07 18:21 UTC (permalink / raw)
To: Florian Fainelli, Ray Jui, Scott Branden, Eric Anholt,
Arnd Bergmann
Cc: Stefan Wahren, bcm-kernel-feedback-list, linux-rpi-kernel,
linux-arm-kernel
The firmware-owned GPIO expander on RPi 3 B+ must be in same state
after a reboot as initial power on. Otherwise this would cause a
network boot failure of the BOOTROM. So inform the VC4 firmware to restore
the expander before doing a reboot.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Tested-by: Phil Elwell <phil@raspberrypi.org>
---
drivers/firmware/raspberrypi.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
index a135581..61be15d 100644
--- a/drivers/firmware/raspberrypi.c
+++ b/drivers/firmware/raspberrypi.c
@@ -238,6 +238,16 @@ static int rpi_firmware_probe(struct platform_device *pdev)
return 0;
}
+static void rpi_firmware_shutdown(struct platform_device *pdev)
+{
+ struct rpi_firmware *fw = platform_get_drvdata(pdev);
+
+ if (!fw)
+ return;
+
+ rpi_firmware_property(fw, RPI_FIRMWARE_NOTIFY_REBOOT, NULL, 0);
+}
+
static int rpi_firmware_remove(struct platform_device *pdev)
{
struct rpi_firmware *fw = platform_get_drvdata(pdev);
@@ -278,6 +288,7 @@ static struct platform_driver rpi_firmware_driver = {
.of_match_table = rpi_firmware_of_match,
},
.probe = rpi_firmware_probe,
+ .shutdown = rpi_firmware_shutdown,
.remove = rpi_firmware_remove,
};
module_platform_driver(rpi_firmware_driver);
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream
2018-12-07 18:21 [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream Stefan Wahren
2018-12-07 18:21 ` [PATCH 2/2] firmware: raspberrypi: notify VC4 firmware of a reboot Stefan Wahren
@ 2018-12-08 5:49 ` Eric Anholt
2019-01-09 18:48 ` Stefan Wahren
1 sibling, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2018-12-08 5:49 UTC (permalink / raw)
To: Stefan Wahren, Florian Fainelli, Ray Jui, Scott Branden,
Arnd Bergmann
Cc: Stefan Wahren, bcm-kernel-feedback-list, linux-rpi-kernel,
linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 315 bytes --]
Stefan Wahren <stefan.wahren@i2se.com> writes:
> Add latest firmware property tags from the latest Raspberry Pi downstream
> kernel. This is needed to use the reboot notify in the following
> commit.
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
These are:
Reviewed-by: Eric Anholt <eric@anholt.net>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream
2018-12-08 5:49 ` [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream Eric Anholt
@ 2019-01-09 18:48 ` Stefan Wahren
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Wahren @ 2019-01-09 18:48 UTC (permalink / raw)
To: Eric Anholt, Florian Fainelli, Ray Jui, Scott Branden,
Arnd Bergmann
Cc: bcm-kernel-feedback-list, linux-rpi-kernel, linux-arm-kernel
> Eric Anholt <eric@anholt.net> hat am 8. Dezember 2018 um 06:49 geschrieben:
>
>
> Stefan Wahren <stefan.wahren@i2se.com> writes:
>
> > Add latest firmware property tags from the latest Raspberry Pi downstream
> > kernel. This is needed to use the reboot notify in the following
> > commit.
> >
> > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
>
> These are:
>
> Reviewed-by: Eric Anholt <eric@anholt.net>
Applied to bcm2835-drivers-next
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-09 18:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-07 18:21 [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream Stefan Wahren
2018-12-07 18:21 ` [PATCH 2/2] firmware: raspberrypi: notify VC4 firmware of a reboot Stefan Wahren
2018-12-08 5:49 ` [PATCH 1/2] soc: bcm2835: sync firmware properties with downstream Eric Anholt
2019-01-09 18:48 ` Stefan Wahren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).