Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1292562 > unrolled thread
| Started by | Eric Anholt <eric@anholt.net> |
|---|---|
| First post | 2015-12-15 22:50 +0100 |
| Last post | 2015-12-17 22:10 +0100 |
| Articles | 8 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/4] Raspberry Pi power domains Eric Anholt <eric@anholt.net> - 2015-12-15 22:50 +0100
[PATCH v3 1/4] ARM: bcm2835: Define two new packets from the latest firmware. Eric Anholt <eric@anholt.net> - 2015-12-15 22:50 +0100
[PATCH v3 4/4] ARM: bcm2835: Add the Raspberry Pi power domain driver to the DT. Eric Anholt <eric@anholt.net> - 2015-12-15 22:50 +0100
[PATCH v3 3/4] dt-bindings: add rpi power domain driver bindings Eric Anholt <eric@anholt.net> - 2015-12-15 22:50 +0100
Re: [PATCH v3 0/4] Raspberry Pi power domains Ulf Hansson <ulf.hansson@linaro.org> - 2015-12-17 17:40 +0100
Re: [PATCH v3 0/4] Raspberry Pi power domains Eric Anholt <eric@anholt.net> - 2015-12-17 20:10 +0100
Re: [PATCH v3 0/4] Raspberry Pi power domains Arnd Bergmann <arnd@arndb.de> - 2015-12-17 21:20 +0100
Re: [PATCH v3 0/4] Raspberry Pi power domains Ulf Hansson <ulf.hansson@linaro.org> - 2015-12-17 22:10 +0100
| From | Eric Anholt <eric@anholt.net> |
|---|---|
| Date | 2015-12-15 22:50 +0100 |
| Subject | [PATCH v3 0/4] Raspberry Pi power domains |
| Message-ID | <qG5DP-1iE-11@gated-at.bofh.it> |
Since the pm_genpd_exit() patch is still going through review, and other drivers in the tree just ignore the error cases, Ulf offered to merge the series as a builtin driver not depending on that interface. We still avoid dangling pointer references, by just continuing with probing if of_genpd_add_provider_onecell() fails. We can easily go back and update the driver when a pm_genpd_exit() lands. Alexander Aring (3): ARM: bcm2835: add rpi power domain driver dt-bindings: add rpi power domain driver bindings ARM: bcm2835: Add the Raspberry Pi power domain driver to the DT. Eric Anholt (1): ARM: bcm2835: Define two new packets from the latest firmware. .../bindings/arm/bcm/raspberrypi,bcm2835-power.txt | 47 ++++ arch/arm/boot/dts/bcm2835-rpi.dtsi | 11 + arch/arm/boot/dts/bcm2835.dtsi | 2 +- arch/arm/mach-bcm/Kconfig | 10 + arch/arm/mach-bcm/Makefile | 1 + arch/arm/mach-bcm/raspberrypi-power.c | 247 +++++++++++++++++++++ include/dt-bindings/arm/raspberrypi-power.h | 41 ++++ include/soc/bcm2835/raspberrypi-firmware.h | 2 + 8 files changed, 360 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt create mode 100644 arch/arm/mach-bcm/raspberrypi-power.c create mode 100644 include/dt-bindings/arm/raspberrypi-power.h -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Eric Anholt <eric@anholt.net> |
|---|---|
| Date | 2015-12-15 22:50 +0100 |
| Subject | [PATCH v3 1/4] ARM: bcm2835: Define two new packets from the latest firmware. |
| Message-ID | <qG5DQ-1iE-27@gated-at.bofh.it> |
| In reply to | #1292562 |
These packets give us direct access to the firmware's power management
code, as opposed to GET/SET_POWER_STATE packets that only had a couple
of domains implemented.
Signed-off-by: Eric Anholt <eric@anholt.net>
---
include/soc/bcm2835/raspberrypi-firmware.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h
index c07d74a..3fb3571 100644
--- a/include/soc/bcm2835/raspberrypi-firmware.h
+++ b/include/soc/bcm2835/raspberrypi-firmware.h
@@ -72,10 +72,12 @@ enum rpi_firmware_property_tag {
RPI_FIRMWARE_SET_ENABLE_QPU = 0x00030012,
RPI_FIRMWARE_GET_DISPMANX_RESOURCE_MEM_HANDLE = 0x00030014,
RPI_FIRMWARE_GET_EDID_BLOCK = 0x00030020,
+ RPI_FIRMWARE_GET_DOMAIN_STATE = 0x00030030,
RPI_FIRMWARE_SET_CLOCK_STATE = 0x00038001,
RPI_FIRMWARE_SET_CLOCK_RATE = 0x00038002,
RPI_FIRMWARE_SET_VOLTAGE = 0x00038003,
RPI_FIRMWARE_SET_TURBO = 0x00038009,
+ RPI_FIRMWARE_SET_DOMAIN_STATE = 0x00038030,
/* Dispmanx TAGS */
RPI_FIRMWARE_FRAMEBUFFER_ALLOCATE = 0x00040001,
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Eric Anholt <eric@anholt.net> |
|---|---|
| Date | 2015-12-15 22:50 +0100 |
| Subject | [PATCH v3 4/4] ARM: bcm2835: Add the Raspberry Pi power domain driver to the DT. |
| Message-ID | <qG5DQ-1iE-23@gated-at.bofh.it> |
| In reply to | #1292562 |
From: Alexander Aring <alex.aring@gmail.com>
This connects the USB driver to the USB power domain, so that USB can
actually be turned on at boot if the bootloader didn't do it for us.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
---
arch/arm/boot/dts/bcm2835-rpi.dtsi | 11 +++++++++++
arch/arm/boot/dts/bcm2835.dtsi | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 3572f03..f828202 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -1,3 +1,4 @@
+#include <dt-bindings/arm/raspberrypi-power.h>
#include "bcm2835.dtsi"
/ {
@@ -20,6 +21,12 @@
compatible = "raspberrypi,bcm2835-firmware";
mboxes = <&mailbox>;
};
+
+ power: power {
+ compatible = "raspberrypi,bcm2835-power";
+ firmware = <&firmware>;
+ #power-domain-cells = <1>;
+ };
};
};
@@ -60,3 +67,7 @@
status = "okay";
bus-width = <4>;
};
+
+&usb {
+ power-domains = <&power RPI_POWER_DOMAIN_USB>;
+};
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index aef64de..6d62af0 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -177,7 +177,7 @@
status = "disabled";
};
- usb@7e980000 {
+ usb: usb@7e980000 {
compatible = "brcm,bcm2835-usb";
reg = <0x7e980000 0x10000>;
interrupts = <1 9>;
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Eric Anholt <eric@anholt.net> |
|---|---|
| Date | 2015-12-15 22:50 +0100 |
| Subject | [PATCH v3 3/4] dt-bindings: add rpi power domain driver bindings |
| Message-ID | <qG5DR-1iE-41@gated-at.bofh.it> |
| In reply to | #1292562 |
From: Alexander Aring <alex.aring@gmail.com>
This patch adds devicetree tree bindings for the Raspberry Pi power
domain driver.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
---
v2: Add the new domains present in v2 to the list.
.../bindings/arm/bcm/raspberrypi,bcm2835-power.txt | 47 ++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt
diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt
new file mode 100644
index 0000000..30942cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt
@@ -0,0 +1,47 @@
+Raspberry Pi power domain driver
+
+Required properties:
+
+- compatible: Should be "raspberrypi,bcm2835-power".
+- firmware: Reference to the RPi firmware device node.
+- #power-domain-cells: Should be <1>, we providing multiple power domains.
+
+The valid defines for power domain are:
+
+ RPI_POWER_DOMAIN_I2C0
+ RPI_POWER_DOMAIN_I2C1
+ RPI_POWER_DOMAIN_I2C2
+ RPI_POWER_DOMAIN_VIDEO_SCALER
+ RPI_POWER_DOMAIN_VPU1
+ RPI_POWER_DOMAIN_HDMI
+ RPI_POWER_DOMAIN_USB
+ RPI_POWER_DOMAIN_VEC
+ RPI_POWER_DOMAIN_JPEG
+ RPI_POWER_DOMAIN_H264
+ RPI_POWER_DOMAIN_V3D
+ RPI_POWER_DOMAIN_ISP
+ RPI_POWER_DOMAIN_UNICAM0
+ RPI_POWER_DOMAIN_UNICAM1
+ RPI_POWER_DOMAIN_CCP2RX
+ RPI_POWER_DOMAIN_CSI2
+ RPI_POWER_DOMAIN_CPI
+ RPI_POWER_DOMAIN_DSI0
+ RPI_POWER_DOMAIN_DSI1
+ RPI_POWER_DOMAIN_TRANSPOSER
+ RPI_POWER_DOMAIN_CCP2TX
+ RPI_POWER_DOMAIN_CDP
+ RPI_POWER_DOMAIN_ARM
+
+Example:
+
+power: power {
+ compatible = "raspberrypi,bcm2835-power";
+ firmware = <&firmware>;
+ #power-domain-cells = <1>;
+};
+
+Example for using power domain:
+
+&usb {
+ power-domains = <&power RPI_POWER_DOMAIN_USB>;
+};
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2015-12-17 17:40 +0100 |
| Message-ID | <qGJKV-1SE-7@gated-at.bofh.it> |
| In reply to | #1292562 |
On 15 December 2015 at 22:40, Eric Anholt <eric@anholt.net> wrote: > Since the pm_genpd_exit() patch is still going through review, and > other drivers in the tree just ignore the error cases, Ulf offered to > merge the series as a builtin driver not depending on that interface. > We still avoid dangling pointer references, by just continuing with > probing if of_genpd_add_provider_onecell() fails. We can easily go > back and update the driver when a pm_genpd_exit() lands. > > Alexander Aring (3): > ARM: bcm2835: add rpi power domain driver > dt-bindings: add rpi power domain driver bindings > ARM: bcm2835: Add the Raspberry Pi power domain driver to the DT. > > Eric Anholt (1): > ARM: bcm2835: Define two new packets from the latest firmware. > > .../bindings/arm/bcm/raspberrypi,bcm2835-power.txt | 47 ++++ > arch/arm/boot/dts/bcm2835-rpi.dtsi | 11 + > arch/arm/boot/dts/bcm2835.dtsi | 2 +- > arch/arm/mach-bcm/Kconfig | 10 + > arch/arm/mach-bcm/Makefile | 1 + > arch/arm/mach-bcm/raspberrypi-power.c | 247 +++++++++++++++++++++ > include/dt-bindings/arm/raspberrypi-power.h | 41 ++++ > include/soc/bcm2835/raspberrypi-firmware.h | 2 + > 8 files changed, 360 insertions(+), 1 deletion(-) > create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt > create mode 100644 arch/arm/mach-bcm/raspberrypi-power.c > create mode 100644 include/dt-bindings/arm/raspberrypi-power.h > > -- > 2.6.2 > Besides a nitpick for patch2, I would also reverse the order of patch3 and patch2. DT docs should go in before the actual parsing of the new bindings/compatibles. Anyway, for the hole series, you may add my: Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Eric Anholt <eric@anholt.net> |
|---|---|
| Date | 2015-12-17 20:10 +0100 |
| Message-ID | <qGM65-3xH-11@gated-at.bofh.it> |
| In reply to | #1294023 |
[Multipart message — attachments visible in raw view] — view raw
Ulf Hansson <ulf.hansson@linaro.org> writes: > On 15 December 2015 at 22:40, Eric Anholt <eric@anholt.net> wrote: >> Since the pm_genpd_exit() patch is still going through review, and >> other drivers in the tree just ignore the error cases, Ulf offered to >> merge the series as a builtin driver not depending on that interface. >> We still avoid dangling pointer references, by just continuing with >> probing if of_genpd_add_provider_onecell() fails. We can easily go >> back and update the driver when a pm_genpd_exit() lands. >> >> Alexander Aring (3): >> ARM: bcm2835: add rpi power domain driver >> dt-bindings: add rpi power domain driver bindings >> ARM: bcm2835: Add the Raspberry Pi power domain driver to the DT. >> >> Eric Anholt (1): >> ARM: bcm2835: Define two new packets from the latest firmware. >> >> .../bindings/arm/bcm/raspberrypi,bcm2835-power.txt | 47 ++++ >> arch/arm/boot/dts/bcm2835-rpi.dtsi | 11 + >> arch/arm/boot/dts/bcm2835.dtsi | 2 +- >> arch/arm/mach-bcm/Kconfig | 10 + >> arch/arm/mach-bcm/Makefile | 1 + >> arch/arm/mach-bcm/raspberrypi-power.c | 247 +++++++++++++++++++++ >> include/dt-bindings/arm/raspberrypi-power.h | 41 ++++ >> include/soc/bcm2835/raspberrypi-firmware.h | 2 + >> 8 files changed, 360 insertions(+), 1 deletion(-) >> create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt >> create mode 100644 arch/arm/mach-bcm/raspberrypi-power.c >> create mode 100644 include/dt-bindings/arm/raspberrypi-power.h >> >> -- >> 2.6.2 >> > > Besides a nitpick for patch2, I would also reverse the order of patch3 > and patch2. DT docs should go in before the actual parsing of the new > bindings/compatibles. > > Anyway, for the hole series, you may add my: > > Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Would your tree be pulling the series (since it's power domains), or should I (since it's SOC stuff)?
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-12-17 21:20 +0100 |
| Message-ID | <qGNbP-4c8-1@gated-at.bofh.it> |
| In reply to | #1294142 |
On Thursday 17 December 2015 11:03:47 Eric Anholt wrote: > >> > >> .../bindings/arm/bcm/raspberrypi,bcm2835-power.txt | 47 ++++ > >> arch/arm/boot/dts/bcm2835-rpi.dtsi | 11 + > >> arch/arm/boot/dts/bcm2835.dtsi | 2 +- > >> arch/arm/mach-bcm/Kconfig | 10 + > >> arch/arm/mach-bcm/Makefile | 1 + > >> arch/arm/mach-bcm/raspberrypi-power.c | 247 +++++++++++++++++++++ > >> include/dt-bindings/arm/raspberrypi-power.h | 41 ++++ > >> include/soc/bcm2835/raspberrypi-firmware.h | 2 + > >> 8 files changed, 360 insertions(+), 1 deletion(-) > >> create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt > >> create mode 100644 arch/arm/mach-bcm/raspberrypi-power.c > >> create mode 100644 include/dt-bindings/arm/raspberrypi-power.h > >> > >> -- > >> 2.6.2 > >> > > > > Besides a nitpick for patch2, I would also reverse the order of patch3 > > and patch2. DT docs should go in before the actual parsing of the new > > bindings/compatibles. > > > > Anyway, for the hole series, you may add my: > > > > Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> > > Would your tree be pulling the series (since it's power domains), or > should I (since it's SOC stuff)? > All of the above files go through the arm-soc tree by default. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ulf Hansson <ulf.hansson@linaro.org> |
|---|---|
| Date | 2015-12-17 22:10 +0100 |
| Message-ID | <qGNYe-4LR-9@gated-at.bofh.it> |
| In reply to | #1294240 |
On 17 December 2015 at 21:11, Arnd Bergmann <arnd@arndb.de> wrote: > On Thursday 17 December 2015 11:03:47 Eric Anholt wrote: >> >> >> >> .../bindings/arm/bcm/raspberrypi,bcm2835-power.txt | 47 ++++ >> >> arch/arm/boot/dts/bcm2835-rpi.dtsi | 11 + >> >> arch/arm/boot/dts/bcm2835.dtsi | 2 +- >> >> arch/arm/mach-bcm/Kconfig | 10 + >> >> arch/arm/mach-bcm/Makefile | 1 + >> >> arch/arm/mach-bcm/raspberrypi-power.c | 247 +++++++++++++++++++++ >> >> include/dt-bindings/arm/raspberrypi-power.h | 41 ++++ >> >> include/soc/bcm2835/raspberrypi-firmware.h | 2 + >> >> 8 files changed, 360 insertions(+), 1 deletion(-) >> >> create mode 100644 Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-power.txt >> >> create mode 100644 arch/arm/mach-bcm/raspberrypi-power.c >> >> create mode 100644 include/dt-bindings/arm/raspberrypi-power.h >> >> >> >> -- >> >> 2.6.2 >> >> >> > >> > Besides a nitpick for patch2, I would also reverse the order of patch3 >> > and patch2. DT docs should go in before the actual parsing of the new >> > bindings/compatibles. >> > >> > Anyway, for the hole series, you may add my: >> > >> > Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> >> >> Would your tree be pulling the series (since it's power domains), or >> should I (since it's SOC stuff)? >> > > All of the above files go through the arm-soc tree by default. That should work as I don't see any other dependency, unless Eric/Alexander think there is. Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web