* [PATCH v2 0/8] Add Simple Power-Managed Bus Support
@ 2014-12-17 18:49 Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 1/8] drivers: bus: Sort Kconfig entries alphabetically Geert Uytterhoeven
` (8 more replies)
0 siblings, 9 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm
Cc: Laurent Pinchart, Ulrich Hecht, Arnd Bergmann, Kevin Hilman,
linux-sh, linux-arm-kernel, devicetree, linux-kernel,
Geert Uytterhoeven
Hi all,
The Renesas Bus State Controller (BSC) provides an external bus for
connecting multiple external devices to an SoC, driving several chip
select lines, for e.g. NOR FLASH, Ethernet and USB.
On the kzm9g and ape6evm development boards, an smsc9220 Ethernet
controller is connnected to the BSC of an SH-Mobile AG5 (sh73a0) resp.
R-Mobile APE6 (r8a73a4) SoC.
The BSC is a fairly simple memory-mapped bus, hence a "simple-bus"
compatibility seems suitable. However, the BSC is special in two ways:
1. It is part of a PM domain (A4S),
2. It has a gateable functional clock (ZB).
Before a device connected to the BSC can be accessed, the PM domain
containing the BSC must be powered on, and the functional clock driving
the BSC must be enabled.
Both special properties can be described in DT in a standardized way
("power-domains = <&pd_a4s>" and "clocks = <&zb_clk>", cfr. patch 1).
Externally connected devices are described as children of the BSC node
(cfr. patch 2).
Unfortunately this doesn't mean everything will work out-of-the-box.
There are two problems:
1. Without a device driver bound to the bus device, this device is not
attached to the PM domain. And although a child device is present
and active, the PM domain may be powered down, as it's considered
unused by the PM domain core.
2. Without a device driver calling pm_runtime_enable(), its functional
clock is not enabled. Once runtime PM is enabled, the R-Mobile PM
domain platform driver manages the functional clock using runtime
PM.
As none of the above is really bus hardware-specific (PM domains and
functional clocks in clock domains are handled from genpd and platform
code), this series adds a Simple Power-Managed Bus driver for
transparent busses, which just enables runtime PM for the bus device.
Due to the child-parent relationship of devices connected to the bus, as
long as the device drivers for the child devices are runtime PM enabled,
the bus's PM domain will be powered, and the bus's clock will be enabled
automatically when needed, for both runtime PM and s2ram.
Currently this driver supports the Renesas Bus State Controller only,
but support for other SoCs and other bus controllers can easily be added
later by adding more compatible values.
Note that this driver cannot just bind against "simple-bus", as that
may prevent a device-specific driver from taking precedence.
The last 4 patches add support in the DTSes for the sh73a0/kzm9g and
r8a73a4/ape6evm development boards.
This was tested on sh73a0/kzm9g-multiplatform. Without this, Ethernet
doesn't work, as the ZB clock is disabled by clk_disable_unused().
Testing on r8a73a4/ape6evm-multiplatform would be appreciated.
Changes compared to v1 (more detailed change logs in the individual
patches):
- Added sorting of drivers/bus Kconfig and Makefile entries,
- Added DT binding documentation,
- Rename from "Renesas Bus State Controller Driver" (renesas-bsc) to
"Simple Power-Managed Bus Driver" (simple-pm-bus),
- Postponed adding power-domains properties to the dtsi,
- Added updates for r8a73a4/ape6evm.
Dependencies:
1. The shmobile DTS updates depend on the following series:
- [PATCH v7 0/6] sh73a0 common clock framework implementation
- [PATCH v2 00/05] ARM: shmobile: sh73a0 and kzm9g Multiplatform revisit
- [PATCH v4 0/6] clk: shmobile: r8a73a4 common clock framework
implementation
- [PATCH v3 0/9] ARM: shmobile: ape6evm: multiplatform support
2. [PATCH] net/smsc911x: Add minimal runtime PM support
(https://lkml.org/lkml/2014/11/24/610, now upstream),
3. [PATCH] clk: shmobile: div6: Avoid changing divisor in .disable()
(http://marc.info/?l=linux-sh&m=141684607012727&w=2),
References:
1. This is v2 of the series "[PATCH RFC 0/3] Add "Simple" / Renesas Bus
State Controller Driver" (https://lkml.org/lkml/2014/11/24/661).
2. [PATCH v3 7/7] ARM: shmobile: kzm9g-reference: require ZB clock for
Ethernet controller (http://www.spinics.net/lists/linux-sh/msg36601.html)
is an earlier workaround for getting the functional clock enabled, by
letting the smc911x driver handle it. This predates sh73a0 PM domain
support.
Thanks!
Geert Uytterhoeven (8):
drivers: bus: Sort Kconfig entries alphabetically
drivers: bus: Sort Makefile entries alphabetically
drivers: bus: Add Simple Power-Managed Bus DT Bindings
drivers: bus: Add Simple Power-Managed Bus Driver
ARM: shmobile: sh73a0 dtsi: Add Bus State Controller node
ARM: shmobile: kzm9g dts: Move Ethernet node to BSC
ARM: shmobile: r8a73a4 dtsi: Add Bus State Controller node
ARM: shmobile: ape6evm dts: Move Ethernet node to BSC
.../devicetree/bindings/bus/simple-pm-bus.txt | 49 ++++++++++++++++++++
arch/arm/boot/dts/r8a73a4-ape6evm.dts | 35 ++++++--------
arch/arm/boot/dts/r8a73a4.dtsi | 9 ++++
arch/arm/boot/dts/sh73a0-kzm9g.dts | 28 ++++++------
arch/arm/boot/dts/sh73a0.dtsi | 10 ++++
drivers/bus/Kconfig | 53 ++++++++++++++--------
drivers/bus/Makefile | 15 +++---
drivers/bus/simple-pm-bus.c | 51 +++++++++++++++++++++
8 files changed, 190 insertions(+), 60 deletions(-)
create mode 100644 Documentation/devicetree/bindings/bus/simple-pm-bus.txt
create mode 100644 drivers/bus/simple-pm-bus.c
--
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/8] drivers: bus: Sort Kconfig entries alphabetically
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
@ 2014-12-17 18:49 ` Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 2/8] drivers: bus: Sort Makefile " Geert Uytterhoeven
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm
Cc: Laurent Pinchart, Ulrich Hecht, Arnd Bergmann, Kevin Hilman,
linux-sh, linux-arm-kernel, devicetree, linux-kernel,
Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- New
---
drivers/bus/Kconfig | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index b99729e368608bda..626960819e6df16c 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -4,6 +4,21 @@
menu "Bus devices"
+config ARM_CCI
+ bool "ARM CCI driver support"
+ depends on ARM && OF && CPU_V7
+ help
+ Driver supporting the CCI cache coherent interconnect for ARM
+ platforms.
+
+config ARM_CCN
+ bool "ARM CCN driver support"
+ depends on ARM || ARM64
+ depends on PERF_EVENTS
+ help
+ PMU (perf) driver supporting the ARM CCN (Cache Coherent Network)
+ interconnect.
+
config BRCMSTB_GISB_ARB
bool "Broadcom STB GISB bus arbiter"
depends on ARM || MIPS
@@ -27,15 +42,6 @@ config MVEBU_MBUS
Driver needed for the MBus configuration on Marvell EBU SoCs
(Kirkwood, Dove, Orion5x, MV78XX0 and Armada 370/XP).
-config OMAP_OCP2SCP
- tristate "OMAP OCP2SCP DRIVER"
- depends on ARCH_OMAP2PLUS
- help
- Driver to enable ocp2scp module which transforms ocp interface
- protocol to scp protocol. In OMAP4, USB PHY is connected via
- OCP2SCP and in OMAP5, both USB PHY and SATA PHY is connected via
- OCP2SCP.
-
config OMAP_INTERCONNECT
tristate "OMAP INTERCONNECT DRIVER"
depends on ARCH_OMAP2PLUS
@@ -43,20 +49,14 @@ config OMAP_INTERCONNECT
help
Driver to enable OMAP interconnect error handling driver.
-config ARM_CCI
- bool "ARM CCI driver support"
- depends on ARM && OF && CPU_V7
- help
- Driver supporting the CCI cache coherent interconnect for ARM
- platforms.
-
-config ARM_CCN
- bool "ARM CCN driver support"
- depends on ARM || ARM64
- depends on PERF_EVENTS
+config OMAP_OCP2SCP
+ tristate "OMAP OCP2SCP DRIVER"
+ depends on ARCH_OMAP2PLUS
help
- PMU (perf) driver supporting the ARM CCN (Cache Coherent Network)
- interconnect.
+ Driver to enable ocp2scp module which transforms ocp interface
+ protocol to scp protocol. In OMAP4, USB PHY is connected via
+ OCP2SCP and in OMAP5, both USB PHY and SATA PHY is connected via
+ OCP2SCP.
config VEXPRESS_CONFIG
bool "Versatile Express configuration bus"
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/8] drivers: bus: Sort Makefile entries alphabetically
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 1/8] drivers: bus: Sort Kconfig entries alphabetically Geert Uytterhoeven
@ 2014-12-17 18:49 ` Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 3/8] drivers: bus: Add Simple Power-Managed Bus DT Bindings Geert Uytterhoeven
` (6 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm
Cc: devicetree, Geert Uytterhoeven, Arnd Bergmann, linux-sh,
Kevin Hilman, linux-kernel, Laurent Pinchart, Ulrich Hecht,
linux-arm-kernel
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- New
---
drivers/bus/Makefile | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 2973c18cbcc27816..3cfaf2c7f25ac4f0 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -2,16 +2,16 @@
# Makefile for the bus drivers.
#
+# Interconnect bus drivers for ARM platforms
+obj-$(CONFIG_ARM_CCI) += arm-cci.o
+obj-$(CONFIG_ARM_CCN) += arm-ccn.o
+
obj-$(CONFIG_BRCMSTB_GISB_ARB) += brcmstb_gisb.o
-obj-$(CONFIG_IMX_WEIM) += imx-weim.o
-obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o
-obj-$(CONFIG_OMAP_OCP2SCP) += omap-ocp2scp.o
+obj-$(CONFIG_IMX_WEIM) += imx-weim.o
+obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o
# Interconnect bus driver for OMAP SoCs.
obj-$(CONFIG_OMAP_INTERCONNECT) += omap_l3_smx.o omap_l3_noc.o
-# Interconnect bus drivers for ARM platforms
-obj-$(CONFIG_ARM_CCI) += arm-cci.o
-obj-$(CONFIG_ARM_CCN) += arm-ccn.o
-
+obj-$(CONFIG_OMAP_OCP2SCP) += omap-ocp2scp.o
obj-$(CONFIG_VEXPRESS_CONFIG) += vexpress-config.o
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/8] drivers: bus: Add Simple Power-Managed Bus DT Bindings
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 1/8] drivers: bus: Sort Kconfig entries alphabetically Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 2/8] drivers: bus: Sort Makefile " Geert Uytterhoeven
@ 2014-12-17 18:49 ` Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 4/8] drivers: bus: Add Simple Power-Managed Bus Driver Geert Uytterhoeven
` (5 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm
Cc: Laurent Pinchart, Ulrich Hecht, Arnd Bergmann, Kevin Hilman,
linux-sh, linux-arm-kernel, devicetree, linux-kernel,
Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- New
---
.../devicetree/bindings/bus/simple-pm-bus.txt | 49 ++++++++++++++++++++++
1 file changed, 49 insertions(+)
create mode 100644 Documentation/devicetree/bindings/bus/simple-pm-bus.txt
diff --git a/Documentation/devicetree/bindings/bus/simple-pm-bus.txt b/Documentation/devicetree/bindings/bus/simple-pm-bus.txt
new file mode 100644
index 0000000000000000..bc5f985fd5463afa
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/simple-pm-bus.txt
@@ -0,0 +1,49 @@
+Simple Power-Managed Bus
+========================
+
+A Simple Power-Managed Bus is a transparent bus that doesn't need a real
+driver, as it's typically initialized by the boot loader.
+
+However, its bus controller is part of a PM domain, or under the control of a
+functional clock. Hence, the bus controller's PM domain and/or clock must be
+enabled for child devices connected to the bus (either on-SoC or externally)
+to function.
+
+
+Generic compatible values and properties
+----------------------------------------
+
+Required properties:
+ - compatible: Must be at least one of the vendor-specific compatible values
+ from a vendor-specific section below, and "simple-bus" as a
+ fallback.
+
+Optional platform-specific properties for clock or PM domain control (at least
+one of them is required):
+ - clocks: Must contain a reference to the functional clock(s),
+ - power-domains: Must contain a reference to the PM domain.
+
+
+Vendor-specific compatible values and properties
+------------------------------------------------
+
+Renesas Bus State Controller (BSC):
+ - compatible: Must be an SoC-specific value, and "renesas,bsc" as a fallback.
+ SoC-specific values can be:
+ "renesas,bsc-r8a73a4" for R-Mobile APE6 (r8a73a4)
+ "renesas,bsc-sh73a0" for SH-Mobile AG5 (sh73a0)
+ - interrupts: Must contain a reference to the BSC interrupt, if available.
+
+
+Example:
+
+ bsc: bus@fec10000 {
+ compatible = "renesas,bsc-sh73a0", "renesas,bsc", "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0xfec10000 0x400>;
+ ranges = <0 0 0x20000000>;
+ interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&zb_clk>;
+ power-domains = <&pd_a4s>;
+ };
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/8] drivers: bus: Add Simple Power-Managed Bus Driver
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
` (2 preceding siblings ...)
2014-12-17 18:49 ` [PATCH 3/8] drivers: bus: Add Simple Power-Managed Bus DT Bindings Geert Uytterhoeven
@ 2014-12-17 18:49 ` Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 5/8] ARM: shmobile: sh73a0 dtsi: Add Bus State Controller node Geert Uytterhoeven
` (4 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm
Cc: devicetree, Geert Uytterhoeven, Arnd Bergmann, linux-sh,
Kevin Hilman, linux-kernel, Laurent Pinchart, Ulrich Hecht,
linux-arm-kernel
Add a driver for transparent busses that don't need a real driver (think
"simple-bus"), where the bus controller is part of a PM domain, or under
the control of a functional clock. Typically, the bus controller's
PM domain and/or clock must be enabled for child devices connected to
the bus (either on-SoC or externally) to function.
Hence the sole purpose of this driver is to enable its clock and PM
domain (if exist(s)), which are specified in the DT and managed from
platform and PM domain code.
Due to the child-parent relationship with devices connected to the bus,
PM domain and clock state transitions are handled in the correct order.
Currently this driver handles the Renesas Bus State Controller (BSC,
sometimes called "LBSC within Bus Bridge", or "External Bus Interface")
found on several Renesas ARM SoCs. Support for other bus controllers can
easily be added by adding more compatible values.
Note that this driver cannot just bind against "simple-bus", as that
may prevent a device-specific driver from taking precedence.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- Rename from "Renesas Bus State Controller Driver" (renesas-bsc) to
"Simple Power-Managed Bus Driver" (simple-pm-bus),
- Change module license to GPL v2,
- Change email address to geert+renesas@glider.be.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/bus/Kconfig | 13 ++++++++++++
drivers/bus/Makefile | 1 +
drivers/bus/simple-pm-bus.c | 51 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+)
create mode 100644 drivers/bus/simple-pm-bus.c
diff --git a/drivers/bus/Kconfig b/drivers/bus/Kconfig
index 626960819e6df16c..1addb707bf8100e3 100644
--- a/drivers/bus/Kconfig
+++ b/drivers/bus/Kconfig
@@ -58,6 +58,19 @@ config OMAP_OCP2SCP
OCP2SCP and in OMAP5, both USB PHY and SATA PHY is connected via
OCP2SCP.
+config SIMPLE_PM_BUS
+ bool "Simple Power-Managed Bus Driver"
+ depends on OF && PM
+ depends on ARCH_SHMOBILE || COMPILE_TEST
+ help
+ Driver for transparent busses that don't need a real driver (think
+ "simple-bus"), where the bus controller is part of a PM domain, or
+ under the control of a functional clock, and thus relies on runtime
+ PM for managing this PM domain and/or clock.
+ An example of such a bus controller is the Renesas Bus State
+ Controller (BSC, sometimes called "LBSC within Bus Bridge", or
+ "External Bus Interface") as found on several Renesas ARM SoCs.
+
config VEXPRESS_CONFIG
bool "Versatile Express configuration bus"
default y if ARCH_VEXPRESS
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 3cfaf2c7f25ac4f0..e023a2bec664d900 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -14,4 +14,5 @@ obj-$(CONFIG_MVEBU_MBUS) += mvebu-mbus.o
obj-$(CONFIG_OMAP_INTERCONNECT) += omap_l3_smx.o omap_l3_noc.o
obj-$(CONFIG_OMAP_OCP2SCP) += omap-ocp2scp.o
+obj-$(CONFIG_SIMPLE_PM_BUS) += simple-pm-bus.o
obj-$(CONFIG_VEXPRESS_CONFIG) += vexpress-config.o
diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c
new file mode 100644
index 0000000000000000..e55872d2695bd551
--- /dev/null
+++ b/drivers/bus/simple-pm-bus.c
@@ -0,0 +1,51 @@
+/*
+ * Simple Power-Managed Bus Driver
+ *
+ * Copyright (C) 2014 Glider bvba
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
+
+
+static int simple_pm_bus_probe(struct platform_device *pdev)
+{
+ dev_dbg(&pdev->dev, "%s\n", __func__);
+
+ pm_runtime_enable(&pdev->dev);
+ return 0;
+}
+
+static int simple_pm_bus_remove(struct platform_device *pdev)
+{
+ dev_dbg(&pdev->dev, "%s\n", __func__);
+
+ pm_runtime_disable(&pdev->dev);
+ return 0;
+}
+
+static const struct of_device_id simple_pm_bus_of_match[] = {
+ { .compatible = "renesas,bsc", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, simple_pm_bus_of_match);
+
+static struct platform_driver simple_pm_bus_driver = {
+ .probe = simple_pm_bus_probe,
+ .remove = simple_pm_bus_remove,
+ .driver = {
+ .name = "simple-pm-bus",
+ .of_match_table = simple_pm_bus_of_match,
+ },
+};
+
+module_platform_driver(simple_pm_bus_driver);
+
+MODULE_DESCRIPTION("Simple Power-Managed Bus Driver");
+MODULE_AUTHOR("Geert Uytterhoeven <geert+renesas@glider.be>");
+MODULE_LICENSE("GPL v2");
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/8] ARM: shmobile: sh73a0 dtsi: Add Bus State Controller node
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
` (3 preceding siblings ...)
2014-12-17 18:49 ` [PATCH 4/8] drivers: bus: Add Simple Power-Managed Bus Driver Geert Uytterhoeven
@ 2014-12-17 18:49 ` Geert Uytterhoeven
[not found] ` <1418842153-17113-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
` (3 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm
Cc: Laurent Pinchart, Ulrich Hecht, Arnd Bergmann, Kevin Hilman,
linux-sh, linux-arm-kernel, devicetree, linux-kernel,
Geert Uytterhoeven
Add a node for the Bus State Controller (BSC) on sh73a0, to which
multiple external devices can be connected.
The BSC is driven by the ZB clock, and located in PM domain A4S.
A reference to the latter will be added later.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v2:
- Postpone power-domains
---
arch/arm/boot/dts/sh73a0.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
index b60d0456fc7a0c00..8989b63d6993adb9 100644
--- a/arch/arm/boot/dts/sh73a0.dtsi
+++ b/arch/arm/boot/dts/sh73a0.dtsi
@@ -357,6 +357,16 @@
status = "disabled";
};
+ bsc: bus@fec10000 {
+ compatible = "renesas,bsc-sh73a0", "renesas,bsc", "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0xfec10000 0x400>;
+ ranges = <0 0 0x20000000>;
+ interrupts = <0 39 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&zb_clk>;
+ };
+
clocks {
#address-cells = <1>;
#size-cells = <1>;
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/8] ARM: shmobile: kzm9g dts: Move Ethernet node to BSC
[not found] ` <1418842153-17113-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2014-12-17 18:49 ` Geert Uytterhoeven
0 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm-u79uwXL29TY76Z2rM5mHXA
Cc: Laurent Pinchart, Ulrich Hecht, Arnd Bergmann, Kevin Hilman,
linux-sh-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven
Move the Ethernet node from the root of the device tree to the BSC node,
as its connected to the Bus State Controller. This allows the system to
know the right position of the Ethernet node in the clock and PM domain
hierarchy, and manage the clock and PM domain appropriately.
Also rename the node's name from "lan9220" to "ethernet", to conform to
ePAPR generic name recomendations.
Signed-off-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
---
v2:
- s/confirm/conform/
- Moved from kzm9g-reference to kzm9g
---
arch/arm/boot/dts/sh73a0-kzm9g.dts | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boot/dts/sh73a0-kzm9g.dts b/arch/arm/boot/dts/sh73a0-kzm9g.dts
index fce37b96394d0ee3..3e8aacb6ca1f2d06 100644
--- a/arch/arm/boot/dts/sh73a0-kzm9g.dts
+++ b/arch/arm/boot/dts/sh73a0-kzm9g.dts
@@ -84,19 +84,6 @@
enable-active-high;
};
- lan9220@10000000 {
- compatible = "smsc,lan9220", "smsc,lan9115";
- reg = <0x10000000 0x100>;
- phy-mode = "mii";
- interrupt-parent = <&irqpin0>;
- interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
- reg-io-width = <4>;
- smsc,irq-push-pull;
- smsc,save-mac-address;
- vddvario-supply = <®_1p8v>;
- vdd33a-supply = <®_3p3v>;
- };
-
leds {
compatible = "gpio-leds";
led1 {
@@ -178,6 +165,21 @@
};
};
+&bsc {
+ ethernet@10000000 {
+ compatible = "smsc,lan9220", "smsc,lan9115";
+ reg = <0x10000000 0x100>;
+ phy-mode = "mii";
+ interrupt-parent = <&irqpin0>;
+ interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
+ reg-io-width = <4>;
+ smsc,irq-push-pull;
+ smsc,save-mac-address;
+ vddvario-supply = <®_1p8v>;
+ vdd33a-supply = <®_3p3v>;
+ };
+};
+
&cmt1 {
status = "okay";
};
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/8] ARM: shmobile: r8a73a4 dtsi: Add Bus State Controller node
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
` (5 preceding siblings ...)
[not found] ` <1418842153-17113-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
@ 2014-12-17 18:49 ` Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 8/8] ARM: shmobile: ape6evm dts: Move Ethernet node to BSC Geert Uytterhoeven
2015-01-08 19:28 ` [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
8 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm
Cc: Laurent Pinchart, Ulrich Hecht, Arnd Bergmann, Kevin Hilman,
linux-sh, linux-arm-kernel, devicetree, linux-kernel,
Geert Uytterhoeven
Add a node for the Bus State Controller (BSC) on r8a73a4, to which
multiple external devices can be connected.
The BSC is driven by the ZB clock, and located in PM domain C4.
A reference to the latter will be added later.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested
v2:
- New
---
arch/arm/boot/dts/r8a73a4.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
index d0b81bd64e439174..960a810456bd7e26 100644
--- a/arch/arm/boot/dts/r8a73a4.dtsi
+++ b/arch/arm/boot/dts/r8a73a4.dtsi
@@ -399,6 +399,15 @@
interrupts = <1 9 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>;
};
+ bsc: bus@fec10000 {
+ compatible = "renesas,bsc-r8a73a4", "renesas,bsc", "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0 0xfec10000 0 0x400>;
+ ranges = <0 0 0 0x20000000>;
+ clocks = <&zb_clk>;
+ };
+
clocks {
#address-cells = <2>;
#size-cells = <2>;
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 8/8] ARM: shmobile: ape6evm dts: Move Ethernet node to BSC
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
` (6 preceding siblings ...)
2014-12-17 18:49 ` [PATCH 7/8] ARM: shmobile: r8a73a4 dtsi: Add Bus State Controller node Geert Uytterhoeven
@ 2014-12-17 18:49 ` Geert Uytterhoeven
2015-01-08 19:28 ` [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
8 siblings, 0 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2014-12-17 18:49 UTC (permalink / raw)
To: Simon Horman, Magnus Damm, linux-pm
Cc: Laurent Pinchart, Ulrich Hecht, Arnd Bergmann, Kevin Hilman,
linux-sh, linux-arm-kernel, devicetree, linux-kernel,
Geert Uytterhoeven
Move the Ethernet node from the ad-hoc lbsc node to the BSC node,
as its connected to the Bus State Controller. This allows the system to
know the right position of the Ethernet node in the clock and PM domain
hierarchy, and manage the clock and PM domain appropriately.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Untested
v2:
- New
---
arch/arm/boot/dts/r8a73a4-ape6evm.dts | 35 +++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm.dts b/arch/arm/boot/dts/r8a73a4-ape6evm.dts
index 0d50bef0123449f5..44c4cac1820a4dfe 100644
--- a/arch/arm/boot/dts/r8a73a4-ape6evm.dts
+++ b/arch/arm/boot/dts/r8a73a4-ape6evm.dts
@@ -72,26 +72,6 @@
regulator-always-on;
};
- lbsc {
- compatible = "simple-bus";
- #address-cells = <1>;
- #size-cells = <1>;
- ranges = <0 0 0 0x20000000>;
-
- ethernet@8000000 {
- compatible = "smsc,lan9220", "smsc,lan9115";
- reg = <0x08000000 0x1000>;
- interrupt-parent = <&irqc1>;
- interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
- phy-mode = "mii";
- reg-io-width = <4>;
- smsc,irq-active-high;
- smsc,irq-push-pull;
- vdd33a-supply = <&ape6evm_fixed_3v3>;
- vddvario-supply = <&ape6evm_fixed_1v8>;
- };
- };
-
leds {
compatible = "gpio-leds";
led1 {
@@ -184,6 +164,21 @@
voltage-tolerance = <1>; /* 1% */
};
+&bsc {
+ ethernet@8000000 {
+ compatible = "smsc,lan9220", "smsc,lan9115";
+ reg = <0x08000000 0x1000>;
+ interrupt-parent = <&irqc1>;
+ interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
+ phy-mode = "mii";
+ reg-io-width = <4>;
+ smsc,irq-active-high;
+ smsc,irq-push-pull;
+ vdd33a-supply = <&ape6evm_fixed_3v3>;
+ vddvario-supply = <&ape6evm_fixed_1v8>;
+ };
+};
+
&cmt1 {
status = "okay";
};
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/8] Add Simple Power-Managed Bus Support
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
` (7 preceding siblings ...)
2014-12-17 18:49 ` [PATCH 8/8] ARM: shmobile: ape6evm dts: Move Ethernet node to BSC Geert Uytterhoeven
@ 2015-01-08 19:28 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVeEmKiqGTOmevaBDbJ=nBTbSi6d6Xrm0eyvbMTtyU=sA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-09 10:57 ` Ulrich Hecht
8 siblings, 2 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2015-01-08 19:28 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Simon Horman, Magnus Damm, Linux PM list, Laurent Pinchart,
Ulrich Hecht, Arnd Bergmann, Kevin Hilman, Linux-sh list,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
On Wed, Dec 17, 2014 at 7:49 PM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
> The Renesas Bus State Controller (BSC) provides an external bus for
> connecting multiple external devices to an SoC, driving several chip
> select lines, for e.g. NOR FLASH, Ethernet and USB.
> On the kzm9g and ape6evm development boards, an smsc9220 Ethernet
> controller is connnected to the BSC of an SH-Mobile AG5 (sh73a0) resp.
> R-Mobile APE6 (r8a73a4) SoC.
[...]
> This was tested on sh73a0/kzm9g-multiplatform. Without this, Ethernet
> doesn't work, as the ZB clock is disabled by clk_disable_unused().
> Testing on r8a73a4/ape6evm-multiplatform would be appreciated.
Has anyone tried this on r8a73a4/ape6evm-multiplatform?
Thanks again!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/8] Add Simple Power-Managed Bus Support
[not found] ` <CAMuHMdVeEmKiqGTOmevaBDbJ=nBTbSi6d6Xrm0eyvbMTtyU=sA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-01-08 22:51 ` Laurent Pinchart
0 siblings, 0 replies; 12+ messages in thread
From: Laurent Pinchart @ 2015-01-08 22:51 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Linux PM list,
Ulrich Hecht, Arnd Bergmann, Kevin Hilman, Linux-sh list,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hi Geert,
On Thursday 08 January 2015 20:28:45 Geert Uytterhoeven wrote:
> On Wed, Dec 17, 2014 at 7:49 PM, Geert Uytterhoeven wrote:
> > The Renesas Bus State Controller (BSC) provides an external bus for
> > connecting multiple external devices to an SoC, driving several chip
> > select lines, for e.g. NOR FLASH, Ethernet and USB.
> > On the kzm9g and ape6evm development boards, an smsc9220 Ethernet
> > controller is connnected to the BSC of an SH-Mobile AG5 (sh73a0) resp.
> > R-Mobile APE6 (r8a73a4) SoC.
>
> [...]
>
> > This was tested on sh73a0/kzm9g-multiplatform. Without this, Ethernet
> > doesn't work, as the ZB clock is disabled by clk_disable_unused().
> > Testing on r8a73a4/ape6evm-multiplatform would be appreciated.
>
> Has anyone tried this on r8a73a4/ape6evm-multiplatform?
I'm afraid I can't help there, as I have no APE6EVM board.
--
Regards,
Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/8] Add Simple Power-Managed Bus Support
2015-01-08 19:28 ` [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
[not found] ` <CAMuHMdVeEmKiqGTOmevaBDbJ=nBTbSi6d6Xrm0eyvbMTtyU=sA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2015-01-09 10:57 ` Ulrich Hecht
1 sibling, 0 replies; 12+ messages in thread
From: Ulrich Hecht @ 2015-01-09 10:57 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Geert Uytterhoeven, Simon Horman, Magnus Damm, Linux PM list,
Laurent Pinchart, Arnd Bergmann, Kevin Hilman, Linux-sh list,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
On Thu, Jan 8, 2015 at 8:28 PM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> On Wed, Dec 17, 2014 at 7:49 PM, Geert Uytterhoeven
> <geert+renesas@glider.be> wrote:
>> The Renesas Bus State Controller (BSC) provides an external bus for
>> connecting multiple external devices to an SoC, driving several chip
>> select lines, for e.g. NOR FLASH, Ethernet and USB.
>> On the kzm9g and ape6evm development boards, an smsc9220 Ethernet
>> controller is connnected to the BSC of an SH-Mobile AG5 (sh73a0) resp.
>> R-Mobile APE6 (r8a73a4) SoC.
>
> [...]
>
>> This was tested on sh73a0/kzm9g-multiplatform. Without this, Ethernet
>> doesn't work, as the ZB clock is disabled by clk_disable_unused().
>> Testing on r8a73a4/ape6evm-multiplatform would be appreciated.
>
> Has anyone tried this on r8a73a4/ape6evm-multiplatform?
Works like a charm.
Tested-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
CU
Uli
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-01-09 10:57 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 18:49 [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 1/8] drivers: bus: Sort Kconfig entries alphabetically Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 2/8] drivers: bus: Sort Makefile " Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 3/8] drivers: bus: Add Simple Power-Managed Bus DT Bindings Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 4/8] drivers: bus: Add Simple Power-Managed Bus Driver Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 5/8] ARM: shmobile: sh73a0 dtsi: Add Bus State Controller node Geert Uytterhoeven
[not found] ` <1418842153-17113-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2014-12-17 18:49 ` [PATCH 6/8] ARM: shmobile: kzm9g dts: Move Ethernet node to BSC Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 7/8] ARM: shmobile: r8a73a4 dtsi: Add Bus State Controller node Geert Uytterhoeven
2014-12-17 18:49 ` [PATCH 8/8] ARM: shmobile: ape6evm dts: Move Ethernet node to BSC Geert Uytterhoeven
2015-01-08 19:28 ` [PATCH v2 0/8] Add Simple Power-Managed Bus Support Geert Uytterhoeven
[not found] ` <CAMuHMdVeEmKiqGTOmevaBDbJ=nBTbSi6d6Xrm0eyvbMTtyU=sA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-08 22:51 ` Laurent Pinchart
2015-01-09 10:57 ` Ulrich Hecht
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).