Linux-MIPS Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/4] bmips: add BCM63xx power domain controller
@ 2020-06-09 10:52 Álvaro Fernández Rojas
  2020-06-09 10:52 ` [PATCH 1/4] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
                   ` (4 more replies)
  0 siblings, 5 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-09 10:52 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Álvaro Fernández Rojas (4):
  dt-bindings: soc: brcm: add BCM63xx power domain binding
  soc: bcm: add BCM63xx power domain driver
  mips: bmips: dts: add BCM6328 power domain support
  mips: bmips: dts: add BCM6362 power domain support

 .../devicetree/bindings/mips/brcm/soc.txt     |  17 +
 arch/mips/boot/dts/brcm/bcm6328.dtsi          |   6 +
 arch/mips/boot/dts/brcm/bcm6362.dtsi          |   6 +
 drivers/soc/bcm/Kconfig                       |   8 +
 drivers/soc/bcm/Makefile                      |   1 +
 drivers/soc/bcm/bcm63xx-power.c               | 374 ++++++++++++++++++
 6 files changed, 412 insertions(+)
 create mode 100644 drivers/soc/bcm/bcm63xx-power.c

-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 1/4] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-09 10:52 [PATCH 0/4] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
@ 2020-06-09 10:52 ` Álvaro Fernández Rojas
  2020-06-10  1:15   ` Florian Fainelli
  2020-06-09 10:52 ` [PATCH 2/4] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-09 10:52 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 .../devicetree/bindings/mips/brcm/soc.txt       | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/devicetree/bindings/mips/brcm/soc.txt b/Documentation/devicetree/bindings/mips/brcm/soc.txt
index 3a66d3c483e1..22ec9e39bff7 100644
--- a/Documentation/devicetree/bindings/mips/brcm/soc.txt
+++ b/Documentation/devicetree/bindings/mips/brcm/soc.txt
@@ -164,3 +164,20 @@ Example:
 		reg = <0x4067c0 0x40>;
 		interrupts = <&periph_intc 19>;
 	};
+
+BCM63xx
+-------
+
+= Power domain controller
+
+BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
+to enable/disable certain components in order to save power.
+
+- compatible		: should contain one of:
+			  "brcm,bcm6318-power-controller"
+			  "brcm,bcm6328-power-controller"
+			  "brcm,bcm6362-power-controller"
+			  "brcm,bcm63268-power-controller"
+- reg 			: the register start and length for the power domain
+			  controller block
+- #power-domain-cells	: must be 1
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 2/4] soc: bcm: add BCM63xx power domain driver
  2020-06-09 10:52 [PATCH 0/4] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  2020-06-09 10:52 ` [PATCH 1/4] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
@ 2020-06-09 10:52 ` Álvaro Fernández Rojas
  2020-06-10  2:19   ` Florian Fainelli
  2020-06-09 10:52 ` [PATCH 3/4] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-09 10:52 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 drivers/soc/bcm/Kconfig         |   8 +
 drivers/soc/bcm/Makefile        |   1 +
 drivers/soc/bcm/bcm63xx-power.c | 374 ++++++++++++++++++++++++++++++++
 3 files changed, 383 insertions(+)
 create mode 100644 drivers/soc/bcm/bcm63xx-power.c

diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig
index 648e32693b7e..a2e60d28370b 100644
--- a/drivers/soc/bcm/Kconfig
+++ b/drivers/soc/bcm/Kconfig
@@ -13,6 +13,14 @@ config BCM2835_POWER
 	  firmware means that Linux usage of the same power domain
 	  must be accessed using the RASPBERRYPI_POWER driver
 
+config BCM63XX_POWER
+	bool "BCM63xx power domain driver"
+	depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
+	select PM_GENERIC_DOMAINS if PM
+	help
+	  This enables support for the BCM63xx power domains controller on
+	  BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
+
 config RASPBERRYPI_POWER
 	bool "Raspberry Pi power domain driver"
 	depends on ARCH_BCM2835 || (COMPILE_TEST && OF)
diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile
index d92268a829a9..e6c3d04a4a83 100644
--- a/drivers/soc/bcm/Makefile
+++ b/drivers/soc/bcm/Makefile
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_BCM2835_POWER)	+= bcm2835-power.o
+obj-$(CONFIG_BCM63XX_POWER)	+= bcm63xx-power.o
 obj-$(CONFIG_RASPBERRYPI_POWER)	+= raspberrypi-power.o
 obj-$(CONFIG_SOC_BRCMSTB)	+= brcmstb/
diff --git a/drivers/soc/bcm/bcm63xx-power.c b/drivers/soc/bcm/bcm63xx-power.c
new file mode 100644
index 000000000000..b6e51b721f09
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx-power.c
@@ -0,0 +1,374 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * BCM63xx Power Domain Controller Driver
+ *
+ * Copyright (C) 2020 Álvaro Fernández Rojas <noltari@gmail.com>
+ */
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+
+struct bcm63xx_power_dev {
+	struct generic_pm_domain genpd;
+	struct bcm63xx_power *power;
+	uint32_t mask;
+};
+
+struct bcm63xx_power {
+	void __iomem *base;
+	spinlock_t lock;
+	struct bcm63xx_power_dev *dev;
+	struct genpd_onecell_data genpd_data;
+	struct generic_pm_domain **genpd;
+};
+
+struct bcm63xx_power_data {
+	const char * const name;
+	uint8_t bit;
+	unsigned int flags;
+};
+
+static int bcm63xx_power_get_state(struct bcm63xx_power_dev *pmd, bool *is_on)
+{
+	struct bcm63xx_power *power = pmd->power;
+
+	if (!pmd->mask) {
+		*is_on = false;
+		return -EINVAL;
+	}
+
+	*is_on = !(__raw_readl(power->base) & pmd->mask);
+
+	return 0;
+}
+
+static int bcm63xx_power_set_state(struct bcm63xx_power_dev *pmd, bool on)
+{
+	struct bcm63xx_power *power = pmd->power;
+	unsigned long flags;
+	uint32_t val;
+
+	if (!pmd->mask)
+		return -EINVAL;
+
+	spin_lock_irqsave(&power->lock, flags);
+	val = __raw_readl(power->base);
+	if (on)
+		val &= ~pmd->mask;
+	else
+		val |= pmd->mask;
+	__raw_writel(val, power->base);
+	spin_unlock_irqrestore(&power->lock, flags);
+
+	return 0;
+}
+
+static int bcm63xx_power_on(struct generic_pm_domain *genpd)
+{
+	struct bcm63xx_power_dev *pmd = container_of(genpd,
+		struct bcm63xx_power_dev, genpd);
+
+	return bcm63xx_power_set_state(pmd, true);
+}
+
+static int bcm63xx_power_off(struct generic_pm_domain *genpd)
+{
+	struct bcm63xx_power_dev *pmd = container_of(genpd,
+		struct bcm63xx_power_dev, genpd);
+
+	return bcm63xx_power_set_state(pmd, false);
+}
+
+static int bcm63xx_power_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct device_node *np = dev->of_node;
+	struct resource *res;
+	const struct bcm63xx_power_data *entry, *table;
+	struct bcm63xx_power *power;
+	unsigned int ndom;
+	uint8_t max_bit = 0;
+	int ret;
+
+	power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL);
+	if (!power)
+		return -ENOMEM;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	power->base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(power->base))
+		return PTR_ERR(power->base);
+
+	table = of_device_get_match_data(dev);
+	if (!table)
+		return -EINVAL;
+
+	power->genpd_data.num_domains = 0;
+	ndom = 0;
+	for (entry = table; entry->name; entry++) {
+		max_bit = max(max_bit, entry->bit);
+		ndom++;
+	}
+
+	if (!ndom)
+		return -ENODEV;
+
+	power->genpd_data.num_domains = max_bit + 1;
+
+	power->dev = devm_kcalloc(dev, power->genpd_data.num_domains,
+				  sizeof(struct bcm63xx_power_dev),
+				  GFP_KERNEL);
+	if (!power->dev)
+		return -ENOMEM;
+
+	power->genpd = devm_kcalloc(dev, power->genpd_data.num_domains,
+				    sizeof(struct generic_pm_domain *),
+				    GFP_KERNEL);
+	if (!power->genpd)
+		return -ENOMEM;
+
+	power->genpd_data.domains = power->genpd;
+
+	ndom = 0;
+	for (entry = table; entry->name; entry++) {
+		struct bcm63xx_power_dev *pmd = &power->dev[ndom];
+		bool is_on;
+
+		pmd->power = power;
+		pmd->mask = BIT(entry->bit);
+		pmd->genpd.name = entry->name;
+		pmd->genpd.flags = entry->flags;
+
+		ret = bcm63xx_power_get_state(pmd, &is_on);
+		if (ret)
+			dev_warn(dev, "unable to get current state for %s\n",
+				 pmd->genpd.name);
+
+		pmd->genpd.power_on = bcm63xx_power_on;
+		pmd->genpd.power_off = bcm63xx_power_off;
+
+		pm_genpd_init(&pmd->genpd, NULL, !is_on);
+		power->genpd[entry->bit] = &pmd->genpd;
+
+		ndom++;
+	}
+
+	spin_lock_init(&power->lock);
+
+	ret = of_genpd_add_provider_onecell(np, &power->genpd_data);
+	if (ret) {
+		dev_err(dev, "failed to register genpd driver: %d\n", ret);
+		return ret;
+	}
+
+	dev_info(dev, "registered %u power domains\n", ndom);
+
+	return 0;
+}
+
+static const struct bcm63xx_power_data bcm6318_power_domains[] = {
+	{
+		.name = "pcie",
+		.bit = 0,
+	}, {
+		.name = "usb",
+		.bit = 1,
+	}, {
+		.name = "ephy0",
+		.bit = 2,
+	}, {
+		.name = "ephy1",
+		.bit = 3,
+	}, {
+		.name = "ephy2",
+		.bit = 4,
+	}, {
+		.name = "ephy3",
+		.bit = 5,
+	}, {
+		.name = "ldo2p5",
+		.bit = 6,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "ldo2p9",
+		.bit = 7,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "sw1p0",
+		.bit = 8,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "pad",
+		.bit = 9,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm6328_power_domains[] = {
+	{
+		.name = "adsl2-mips",
+		.bit = 0,
+	}, {
+		.name = "adsl2-phy",
+		.bit = 1,
+	}, {
+		.name = "adsl2-afe",
+		.bit = 2,
+	}, {
+		.name = "sar",
+		.bit = 3,
+	}, {
+		.name = "pcm",
+		.bit = 4,
+	}, {
+		.name = "usbd",
+		.bit = 5,
+	}, {
+		.name = "usbh",
+		.bit = 6,
+	}, {
+		.name = "pcie",
+		.bit = 7,
+	}, {
+		.name = "robosw",
+		.bit = 8,
+	}, {
+		.name = "ephy",
+		.bit = 9,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm6362_power_domains[] = {
+	{
+		.name = "sar",
+		.bit = 0,
+	}, {
+		.name = "ipsec",
+		.bit = 1,
+	}, {
+		.name = "mips",
+		.bit = 2,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "dect",
+		.bit = 3,
+	}, {
+		.name = "usbh",
+		.bit = 4,
+	}, {
+		.name = "usbd",
+		.bit = 5,
+	}, {
+		.name = "robosw",
+		.bit = 6,
+	}, {
+		.name = "pcm",
+		.bit = 7,
+	}, {
+		.name = "periph",
+		.bit = 8,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "adsl-phy",
+		.bit = 9,
+	}, {
+		.name = "gmii-pads",
+		.bit = 10,
+	}, {
+		.name = "fap",
+		.bit = 11,
+	}, {
+		.name = "pcie",
+		.bit = 12,
+	}, {
+		.name = "wlan-pads",
+		.bit = 13,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm63268_power_domains[] = {
+	{
+		.name = "sar",
+		.bit = 0,
+	}, {
+		.name = "ipsec",
+		.bit = 1,
+	}, {
+		.name = "mips",
+		.bit = 2,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "dect",
+		.bit = 3,
+	}, {
+		.name = "usbh",
+		.bit = 4,
+	}, {
+		.name = "usbd",
+		.bit = 5,
+	}, {
+		.name = "robosw",
+		.bit = 6,
+	}, {
+		.name = "pcm",
+		.bit = 7,
+	}, {
+		.name = "periph",
+		.bit = 8,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "vdsl-phy",
+		.bit = 9,
+	}, {
+		.name = "vdsl-mips",
+		.bit = 10,
+	}, {
+		.name = "fap",
+		.bit = 11,
+	}, {
+		.name = "pcie",
+		.bit = 12,
+	}, {
+		.name = "wlan-pads",
+		.bit = 13,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct of_device_id bcm63xx_power_of_match[] = {
+	{
+		.compatible = "brcm,bcm6318-power-controller",
+		.data = &bcm6318_power_domains,
+	}, {
+		.compatible = "brcm,bcm6328-power-controller",
+		.data = &bcm6328_power_domains,
+	}, {
+		.compatible = "brcm,bcm6362-power-controller",
+		.data = &bcm6362_power_domains,
+	}, {
+		.compatible = "brcm,bcm63268-power-controller",
+		.data = &bcm63268_power_domains,
+	}, {
+		/* sentinel */
+	}
+};
+
+static struct platform_driver bcm63xx_power_driver = {
+	.driver = {
+		.name = "bcm63xx-power-controller",
+		.of_match_table = bcm63xx_power_of_match,
+	},
+	.probe  = bcm63xx_power_probe,
+};
+builtin_platform_driver(bcm63xx_power_driver);
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 3/4] mips: bmips: dts: add BCM6328 power domain support
  2020-06-09 10:52 [PATCH 0/4] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  2020-06-09 10:52 ` [PATCH 1/4] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
  2020-06-09 10:52 ` [PATCH 2/4] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
@ 2020-06-09 10:52 ` Álvaro Fernández Rojas
  2020-06-10  1:12   ` Florian Fainelli
  2020-06-09 10:52 ` [PATCH 4/4] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  4 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-09 10:52 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6328 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 arch/mips/boot/dts/brcm/bcm6328.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/brcm/bcm6328.dtsi b/arch/mips/boot/dts/brcm/bcm6328.dtsi
index af860d06def6..1f9edd710392 100644
--- a/arch/mips/boot/dts/brcm/bcm6328.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm6328.dtsi
@@ -110,6 +110,12 @@ leds0: led-controller@10000800 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@10001848 {
+			compatible = "brcm,bcm6328-power-controller";
+			reg = <0x10001848 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		ehci: usb@10002500 {
 			compatible = "brcm,bcm6328-ehci", "generic-ehci";
 			reg = <0x10002500 0x100>;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH 4/4] mips: bmips: dts: add BCM6362 power domain support
  2020-06-09 10:52 [PATCH 0/4] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                   ` (2 preceding siblings ...)
  2020-06-09 10:52 ` [PATCH 3/4] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
@ 2020-06-09 10:52 ` Álvaro Fernández Rojas
  2020-06-10  2:21   ` Florian Fainelli
  2020-06-10  2:27   ` Florian Fainelli
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  4 siblings, 2 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-09 10:52 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6362 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 arch/mips/boot/dts/brcm/bcm6362.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/brcm/bcm6362.dtsi b/arch/mips/boot/dts/brcm/bcm6362.dtsi
index 8ae6981735b8..c98f9111e3c8 100644
--- a/arch/mips/boot/dts/brcm/bcm6362.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm6362.dtsi
@@ -108,6 +108,12 @@ uart1: serial@10000120 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@10001848 {
+			compatible = "brcm,bcm6362-power-controller";
+			reg = <0x10001848 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		leds0: led-controller@10001900 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 3/4] mips: bmips: dts: add BCM6328 power domain support
  2020-06-09 10:52 ` [PATCH 3/4] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
@ 2020-06-10  1:12   ` Florian Fainelli
  0 siblings, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-10  1:12 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, jonas.gorski, bcm-kernel-feedback-list, linux-mips,
	devicetree, linux-kernel, linux-arm-kernel



On 6/9/2020 3:52 AM, Álvaro Fernández Rojas wrote:
> BCM6328 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/4] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-09 10:52 ` [PATCH 1/4] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
@ 2020-06-10  1:15   ` Florian Fainelli
  2020-06-10  6:03     ` Álvaro Fernández Rojas
  0 siblings, 1 reply; 58+ messages in thread
From: Florian Fainelli @ 2020-06-10  1:15 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/9/2020 3:52 AM, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  .../devicetree/bindings/mips/brcm/soc.txt       | 17 +++++++++++++++++

You should probably create a YAML binding from the beginning that way
you get validation for free. This file should ultimately be broken down
into separate YAML bindings, but I Have not had the time to do that yet
(you are welcome to if you feel like it).

Other than that, the binding definition looks good to me.
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 2/4] soc: bcm: add BCM63xx power domain driver
  2020-06-09 10:52 ` [PATCH 2/4] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
@ 2020-06-10  2:19   ` Florian Fainelli
  0 siblings, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-10  2:19 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, jonas.gorski, bcm-kernel-feedback-list, linux-mips,
	devicetree, linux-kernel, linux-arm-kernel



On 6/9/2020 3:52 AM, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  drivers/soc/bcm/Kconfig         |   8 +
>  drivers/soc/bcm/Makefile        |   1 +
>  drivers/soc/bcm/bcm63xx-power.c | 374 ++++++++++++++++++++++++++++++++

I would create drivers/soc/bcm/bcm63xx because there are likely going to
be more changes for BCM63xx DSL SOCs in the future that would land
there, for instance the BCM63138 and newer SoCs have an entirely
different reset controller using the on-chip micro controller that would
be landing there.

Can you also make sure that the MAINTAINERS file still matches that
location?

With respect to the code, given that you have defined #reset-cells = <1>
in the Device Tree binding, I would expect that you create a header
under include/dt-bindings/ which defines constants for the various SoCs
which you are then using within your power domain provider driver.
bcm2835-power.c is a good example of how this works for instance.
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 4/4] mips: bmips: dts: add BCM6362 power domain support
  2020-06-09 10:52 ` [PATCH 4/4] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
@ 2020-06-10  2:21   ` Florian Fainelli
  2020-06-10  2:27   ` Florian Fainelli
  1 sibling, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-10  2:21 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, jonas.gorski, bcm-kernel-feedback-list, linux-mips,
	devicetree, linux-kernel, linux-arm-kernel



On 6/9/2020 3:52 AM, Álvaro Fernández Rojas wrote:
> BCM6362 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 4/4] mips: bmips: dts: add BCM6362 power domain support
  2020-06-09 10:52 ` [PATCH 4/4] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
  2020-06-10  2:21   ` Florian Fainelli
@ 2020-06-10  2:27   ` Florian Fainelli
  1 sibling, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-10  2:27 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, jonas.gorski, bcm-kernel-feedback-list, linux-mips,
	devicetree, linux-kernel, linux-arm-kernel



On 6/9/2020 3:52 AM, Álvaro Fernández Rojas wrote:
> BCM6362 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH 1/4] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-10  1:15   ` Florian Fainelli
@ 2020-06-10  6:03     ` Álvaro Fernández Rojas
  0 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10  6:03 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: hauke, zajec5, tsbogend, robh+dt, Jonas Gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel

Ok, I will send v2 with a separate YAML file.

> El 10 jun 2020, a las 3:15, Florian Fainelli <f.fainelli@gmail.com> escribió:
> 
> 
> 
> On 6/9/2020 3:52 AM, Álvaro Fernández Rojas wrote:
>> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
>> to enable/disable certain components in order to save power.
>> 
>> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
>> ---
>> .../devicetree/bindings/mips/brcm/soc.txt       | 17 +++++++++++++++++
> 
> You should probably create a YAML binding from the beginning that way
> you get validation for free. This file should ultimately be broken down
> into separate YAML bindings, but I Have not had the time to do that yet
> (you are welcome to if you feel like it).
> 
> Other than that, the binding definition looks good to me.
> -- 
> Florian


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v2 0/6] bmips: add BCM63xx power domain controller
  2020-06-09 10:52 [PATCH 0/4] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                   ` (3 preceding siblings ...)
  2020-06-09 10:52 ` [PATCH 4/4] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
@ 2020-06-10 16:32 ` Álvaro Fernández Rojas
  2020-06-10 16:32   ` [PATCH v2 1/6] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
                     ` (7 more replies)
  4 siblings, 8 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 16:32 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

v2: Introduce changes suggested by Florian:
  - Add separate YAML file for dt-bindings.
  - Add bcm63xx folder in drivers/soc/bcm.
  - Update MAINTAINERS.
  - Add dt-bindings header files.
  - Also add BCM63268 support.

Álvaro Fernández Rojas (6):
  dt-bindings: soc: brcm: add BCM63xx power domain binding
  soc: bcm: add BCM63xx power domain driver
  mips: bmips: dts: add BCM6328 power domain support
  mips: bmips: dts: add BCM6362 power domain support
  mips: bmips: dts: add BCM63268 power domain support
  mips: bmips: add BCM6318 power domain definitions

 .../bindings/soc/bcm/brcm,bcm63xx-power.yaml  |  44 +++
 MAINTAINERS                                   |   1 +
 arch/mips/boot/dts/brcm/bcm63268.dtsi         |   6 +
 arch/mips/boot/dts/brcm/bcm6328.dtsi          |   6 +
 arch/mips/boot/dts/brcm/bcm6362.dtsi          |   6 +
 drivers/soc/bcm/Kconfig                       |  10 +
 drivers/soc/bcm/Makefile                      |   1 +
 drivers/soc/bcm/bcm63xx/Kconfig               |  12 +
 drivers/soc/bcm/bcm63xx/Makefile              |   2 +
 drivers/soc/bcm/bcm63xx/bcm63xx-power.c       | 374 ++++++++++++++++++
 include/dt-bindings/soc/bcm6318-pm.h          |  17 +
 include/dt-bindings/soc/bcm63268-pm.h         |  21 +
 include/dt-bindings/soc/bcm6328-pm.h          |  17 +
 include/dt-bindings/soc/bcm6362-pm.h          |  21 +
 14 files changed, 538 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
 create mode 100644 drivers/soc/bcm/bcm63xx/Kconfig
 create mode 100644 drivers/soc/bcm/bcm63xx/Makefile
 create mode 100644 drivers/soc/bcm/bcm63xx/bcm63xx-power.c
 create mode 100644 include/dt-bindings/soc/bcm6318-pm.h
 create mode 100644 include/dt-bindings/soc/bcm63268-pm.h
 create mode 100644 include/dt-bindings/soc/bcm6328-pm.h
 create mode 100644 include/dt-bindings/soc/bcm6362-pm.h

-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v2 1/6] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
@ 2020-06-10 16:32   ` Álvaro Fernández Rojas
  2020-06-10 16:44     ` Florian Fainelli
  2020-06-10 16:32   ` [PATCH v2 2/6] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
                     ` (6 subsequent siblings)
  7 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 16:32 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v2: Add separate YAML file.

 .../bindings/soc/bcm/brcm,bcm63xx-power.yaml  | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
new file mode 100644
index 000000000000..804d8b31679e
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/brcm/brcm,bcm63xx-power.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: BCM63xx power domain driver
+
+maintainers:
+  - Álvaro Fernández Rojas <noltari@gmail.com>
+
+description: |
+  BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
+  to enable/disable certain components in order to save power.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm6318-power-controller
+          - brcm,bcm6328-power-controller
+          - brcm,bcm6362-power-controller
+          - brcm,bcm63268-power-controller
+
+  reg:
+    maxItems: 1
+
+  #power-domain-cells:
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - #power-domain-cells
+
+additionalProperties: false
+
+examples:
+  - |
+    periph_pwr: power-controller@10001848 {
+        compatible = "brcm,bcm6328-power-controller";
+        reg = <0x10001848 0x4>;
+        #power-domain-cells = <1>;
+    };
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v2 2/6] soc: bcm: add BCM63xx power domain driver
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  2020-06-10 16:32   ` [PATCH v2 1/6] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
@ 2020-06-10 16:32   ` Álvaro Fernández Rojas
  2020-06-10 16:49     ` Florian Fainelli
  2020-06-10 16:32   ` [PATCH v2 3/6] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
                     ` (5 subsequent siblings)
  7 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 16:32 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v2: Introduce bcm63xx folder in drivers/soc/bcm and update MAINTAINERS.

 MAINTAINERS                             |   1 +
 drivers/soc/bcm/Kconfig                 |  10 +
 drivers/soc/bcm/Makefile                |   1 +
 drivers/soc/bcm/bcm63xx/Kconfig         |  12 +
 drivers/soc/bcm/bcm63xx/Makefile        |   2 +
 drivers/soc/bcm/bcm63xx/bcm63xx-power.c | 374 ++++++++++++++++++++++++
 6 files changed, 400 insertions(+)
 create mode 100644 drivers/soc/bcm/bcm63xx/Kconfig
 create mode 100644 drivers/soc/bcm/bcm63xx/Makefile
 create mode 100644 drivers/soc/bcm/bcm63xx/bcm63xx-power.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 77a3fa5e3edd..e9ba7b955d5f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3442,6 +3442,7 @@ F:	arch/mips/bmips/*
 F:	arch/mips/boot/dts/brcm/bcm*.dts*
 F:	arch/mips/include/asm/mach-bmips/*
 F:	arch/mips/kernel/*bmips*
+F:	drivers/soc/bcm/bcm63xx
 F:	drivers/irqchip/irq-bcm63*
 F:	drivers/irqchip/irq-bcm7*
 F:	drivers/irqchip/irq-brcmstb*
diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig
index 648e32693b7e..24f92a6e882a 100644
--- a/drivers/soc/bcm/Kconfig
+++ b/drivers/soc/bcm/Kconfig
@@ -22,6 +22,15 @@ config RASPBERRYPI_POWER
 	  This enables support for the RPi power domains which can be enabled
 	  or disabled via the RPi firmware.
 
+config SOC_BCM63XX
+	bool "Broadcom 63xx SoC drivers"
+	depends on BMIPS_GENERIC || COMPILE_TEST
+	help
+	  Enables drivers for the Broadcom 63xx series of chips.
+	  Drivers can be enabled individually within this menu.
+
+	  If unsure, say N.
+
 config SOC_BRCMSTB
 	bool "Broadcom STB SoC drivers"
 	depends on ARM || ARM64 || BMIPS_GENERIC || COMPILE_TEST
@@ -33,6 +42,7 @@ config SOC_BRCMSTB
 
 	  If unsure, say N.
 
+source "drivers/soc/bcm/bcm63xx/Kconfig"
 source "drivers/soc/bcm/brcmstb/Kconfig"
 
 endmenu
diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile
index d92268a829a9..7bc90e0bd773 100644
--- a/drivers/soc/bcm/Makefile
+++ b/drivers/soc/bcm/Makefile
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_BCM2835_POWER)	+= bcm2835-power.o
 obj-$(CONFIG_RASPBERRYPI_POWER)	+= raspberrypi-power.o
+obj-$(CONFIG_SOC_BCM63XX)	+= bcm63xx/
 obj-$(CONFIG_SOC_BRCMSTB)	+= brcmstb/
diff --git a/drivers/soc/bcm/bcm63xx/Kconfig b/drivers/soc/bcm/bcm63xx/Kconfig
new file mode 100644
index 000000000000..16f648a6c70a
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/Kconfig
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-only
+if SOC_BCM63XX
+
+config BCM63XX_POWER
+	bool "BCM63xx power domain driver"
+	depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
+	select PM_GENERIC_DOMAINS if PM
+	help
+	  This enables support for the BCM63xx power domains controller on
+	  BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
+
+endif # SOC_BCM63XX
diff --git a/drivers/soc/bcm/bcm63xx/Makefile b/drivers/soc/bcm/bcm63xx/Makefile
new file mode 100644
index 000000000000..0710d5e018cc
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_BCM63XX_POWER) += bcm63xx-power.o
diff --git a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
new file mode 100644
index 000000000000..b6e51b721f09
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
@@ -0,0 +1,374 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * BCM63xx Power Domain Controller Driver
+ *
+ * Copyright (C) 2020 Álvaro Fernández Rojas <noltari@gmail.com>
+ */
+
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+
+struct bcm63xx_power_dev {
+	struct generic_pm_domain genpd;
+	struct bcm63xx_power *power;
+	uint32_t mask;
+};
+
+struct bcm63xx_power {
+	void __iomem *base;
+	spinlock_t lock;
+	struct bcm63xx_power_dev *dev;
+	struct genpd_onecell_data genpd_data;
+	struct generic_pm_domain **genpd;
+};
+
+struct bcm63xx_power_data {
+	const char * const name;
+	uint8_t bit;
+	unsigned int flags;
+};
+
+static int bcm63xx_power_get_state(struct bcm63xx_power_dev *pmd, bool *is_on)
+{
+	struct bcm63xx_power *power = pmd->power;
+
+	if (!pmd->mask) {
+		*is_on = false;
+		return -EINVAL;
+	}
+
+	*is_on = !(__raw_readl(power->base) & pmd->mask);
+
+	return 0;
+}
+
+static int bcm63xx_power_set_state(struct bcm63xx_power_dev *pmd, bool on)
+{
+	struct bcm63xx_power *power = pmd->power;
+	unsigned long flags;
+	uint32_t val;
+
+	if (!pmd->mask)
+		return -EINVAL;
+
+	spin_lock_irqsave(&power->lock, flags);
+	val = __raw_readl(power->base);
+	if (on)
+		val &= ~pmd->mask;
+	else
+		val |= pmd->mask;
+	__raw_writel(val, power->base);
+	spin_unlock_irqrestore(&power->lock, flags);
+
+	return 0;
+}
+
+static int bcm63xx_power_on(struct generic_pm_domain *genpd)
+{
+	struct bcm63xx_power_dev *pmd = container_of(genpd,
+		struct bcm63xx_power_dev, genpd);
+
+	return bcm63xx_power_set_state(pmd, true);
+}
+
+static int bcm63xx_power_off(struct generic_pm_domain *genpd)
+{
+	struct bcm63xx_power_dev *pmd = container_of(genpd,
+		struct bcm63xx_power_dev, genpd);
+
+	return bcm63xx_power_set_state(pmd, false);
+}
+
+static int bcm63xx_power_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct device_node *np = dev->of_node;
+	struct resource *res;
+	const struct bcm63xx_power_data *entry, *table;
+	struct bcm63xx_power *power;
+	unsigned int ndom;
+	uint8_t max_bit = 0;
+	int ret;
+
+	power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL);
+	if (!power)
+		return -ENOMEM;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	power->base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(power->base))
+		return PTR_ERR(power->base);
+
+	table = of_device_get_match_data(dev);
+	if (!table)
+		return -EINVAL;
+
+	power->genpd_data.num_domains = 0;
+	ndom = 0;
+	for (entry = table; entry->name; entry++) {
+		max_bit = max(max_bit, entry->bit);
+		ndom++;
+	}
+
+	if (!ndom)
+		return -ENODEV;
+
+	power->genpd_data.num_domains = max_bit + 1;
+
+	power->dev = devm_kcalloc(dev, power->genpd_data.num_domains,
+				  sizeof(struct bcm63xx_power_dev),
+				  GFP_KERNEL);
+	if (!power->dev)
+		return -ENOMEM;
+
+	power->genpd = devm_kcalloc(dev, power->genpd_data.num_domains,
+				    sizeof(struct generic_pm_domain *),
+				    GFP_KERNEL);
+	if (!power->genpd)
+		return -ENOMEM;
+
+	power->genpd_data.domains = power->genpd;
+
+	ndom = 0;
+	for (entry = table; entry->name; entry++) {
+		struct bcm63xx_power_dev *pmd = &power->dev[ndom];
+		bool is_on;
+
+		pmd->power = power;
+		pmd->mask = BIT(entry->bit);
+		pmd->genpd.name = entry->name;
+		pmd->genpd.flags = entry->flags;
+
+		ret = bcm63xx_power_get_state(pmd, &is_on);
+		if (ret)
+			dev_warn(dev, "unable to get current state for %s\n",
+				 pmd->genpd.name);
+
+		pmd->genpd.power_on = bcm63xx_power_on;
+		pmd->genpd.power_off = bcm63xx_power_off;
+
+		pm_genpd_init(&pmd->genpd, NULL, !is_on);
+		power->genpd[entry->bit] = &pmd->genpd;
+
+		ndom++;
+	}
+
+	spin_lock_init(&power->lock);
+
+	ret = of_genpd_add_provider_onecell(np, &power->genpd_data);
+	if (ret) {
+		dev_err(dev, "failed to register genpd driver: %d\n", ret);
+		return ret;
+	}
+
+	dev_info(dev, "registered %u power domains\n", ndom);
+
+	return 0;
+}
+
+static const struct bcm63xx_power_data bcm6318_power_domains[] = {
+	{
+		.name = "pcie",
+		.bit = 0,
+	}, {
+		.name = "usb",
+		.bit = 1,
+	}, {
+		.name = "ephy0",
+		.bit = 2,
+	}, {
+		.name = "ephy1",
+		.bit = 3,
+	}, {
+		.name = "ephy2",
+		.bit = 4,
+	}, {
+		.name = "ephy3",
+		.bit = 5,
+	}, {
+		.name = "ldo2p5",
+		.bit = 6,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "ldo2p9",
+		.bit = 7,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "sw1p0",
+		.bit = 8,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "pad",
+		.bit = 9,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm6328_power_domains[] = {
+	{
+		.name = "adsl2-mips",
+		.bit = 0,
+	}, {
+		.name = "adsl2-phy",
+		.bit = 1,
+	}, {
+		.name = "adsl2-afe",
+		.bit = 2,
+	}, {
+		.name = "sar",
+		.bit = 3,
+	}, {
+		.name = "pcm",
+		.bit = 4,
+	}, {
+		.name = "usbd",
+		.bit = 5,
+	}, {
+		.name = "usbh",
+		.bit = 6,
+	}, {
+		.name = "pcie",
+		.bit = 7,
+	}, {
+		.name = "robosw",
+		.bit = 8,
+	}, {
+		.name = "ephy",
+		.bit = 9,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm6362_power_domains[] = {
+	{
+		.name = "sar",
+		.bit = 0,
+	}, {
+		.name = "ipsec",
+		.bit = 1,
+	}, {
+		.name = "mips",
+		.bit = 2,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "dect",
+		.bit = 3,
+	}, {
+		.name = "usbh",
+		.bit = 4,
+	}, {
+		.name = "usbd",
+		.bit = 5,
+	}, {
+		.name = "robosw",
+		.bit = 6,
+	}, {
+		.name = "pcm",
+		.bit = 7,
+	}, {
+		.name = "periph",
+		.bit = 8,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "adsl-phy",
+		.bit = 9,
+	}, {
+		.name = "gmii-pads",
+		.bit = 10,
+	}, {
+		.name = "fap",
+		.bit = 11,
+	}, {
+		.name = "pcie",
+		.bit = 12,
+	}, {
+		.name = "wlan-pads",
+		.bit = 13,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm63268_power_domains[] = {
+	{
+		.name = "sar",
+		.bit = 0,
+	}, {
+		.name = "ipsec",
+		.bit = 1,
+	}, {
+		.name = "mips",
+		.bit = 2,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "dect",
+		.bit = 3,
+	}, {
+		.name = "usbh",
+		.bit = 4,
+	}, {
+		.name = "usbd",
+		.bit = 5,
+	}, {
+		.name = "robosw",
+		.bit = 6,
+	}, {
+		.name = "pcm",
+		.bit = 7,
+	}, {
+		.name = "periph",
+		.bit = 8,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "vdsl-phy",
+		.bit = 9,
+	}, {
+		.name = "vdsl-mips",
+		.bit = 10,
+	}, {
+		.name = "fap",
+		.bit = 11,
+	}, {
+		.name = "pcie",
+		.bit = 12,
+	}, {
+		.name = "wlan-pads",
+		.bit = 13,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct of_device_id bcm63xx_power_of_match[] = {
+	{
+		.compatible = "brcm,bcm6318-power-controller",
+		.data = &bcm6318_power_domains,
+	}, {
+		.compatible = "brcm,bcm6328-power-controller",
+		.data = &bcm6328_power_domains,
+	}, {
+		.compatible = "brcm,bcm6362-power-controller",
+		.data = &bcm6362_power_domains,
+	}, {
+		.compatible = "brcm,bcm63268-power-controller",
+		.data = &bcm63268_power_domains,
+	}, {
+		/* sentinel */
+	}
+};
+
+static struct platform_driver bcm63xx_power_driver = {
+	.driver = {
+		.name = "bcm63xx-power-controller",
+		.of_match_table = bcm63xx_power_of_match,
+	},
+	.probe  = bcm63xx_power_probe,
+};
+builtin_platform_driver(bcm63xx_power_driver);
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v2 3/6] mips: bmips: dts: add BCM6328 power domain support
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  2020-06-10 16:32   ` [PATCH v2 1/6] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
  2020-06-10 16:32   ` [PATCH v2 2/6] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
@ 2020-06-10 16:32   ` Álvaro Fernández Rojas
  2020-06-10 16:32   ` [PATCH v2 4/6] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
                     ` (4 subsequent siblings)
  7 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 16:32 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6328 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
 v2: Add dt-bindings header files.

 arch/mips/boot/dts/brcm/bcm6328.dtsi |  6 ++++++
 include/dt-bindings/soc/bcm6328-pm.h | 17 +++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6328-pm.h

diff --git a/arch/mips/boot/dts/brcm/bcm6328.dtsi b/arch/mips/boot/dts/brcm/bcm6328.dtsi
index af860d06def6..1f9edd710392 100644
--- a/arch/mips/boot/dts/brcm/bcm6328.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm6328.dtsi
@@ -110,6 +110,12 @@ leds0: led-controller@10000800 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@10001848 {
+			compatible = "brcm,bcm6328-power-controller";
+			reg = <0x10001848 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		ehci: usb@10002500 {
 			compatible = "brcm,bcm6328-ehci", "generic-ehci";
 			reg = <0x10002500 0x100>;
diff --git a/include/dt-bindings/soc/bcm6328-pm.h b/include/dt-bindings/soc/bcm6328-pm.h
new file mode 100644
index 000000000000..557e1a69b7f7
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6328-pm.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6328_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6328_PM_H
+
+#define BCM6328_POWER_DOMAIN_ADSL2_MIPS	0
+#define BCM6328_POWER_DOMAIN_ADSL2_PHY	1
+#define BCM6328_POWER_DOMAIN_ADSL2_AFE	2
+#define BCM6328_POWER_DOMAIN_SAR	3
+#define BCM6328_POWER_DOMAIN_PCM	4
+#define BCM6328_POWER_DOMAIN_USBD	5
+#define BCM6328_POWER_DOMAIN_USBH	6
+#define BCM6328_POWER_DOMAIN_PCIE	7
+#define BCM6328_POWER_DOMAIN_ROBOSW	8
+#define BCM6328_POWER_DOMAIN_EPHY	9
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6328_PM_H */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v2 4/6] mips: bmips: dts: add BCM6362 power domain support
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                     ` (2 preceding siblings ...)
  2020-06-10 16:32   ` [PATCH v2 3/6] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
@ 2020-06-10 16:32   ` Álvaro Fernández Rojas
  2020-06-10 16:33   ` [PATCH v2 5/6] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
                     ` (3 subsequent siblings)
  7 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 16:32 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6362 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
 v2: Add dt-bindings header files.

 arch/mips/boot/dts/brcm/bcm6362.dtsi |  6 ++++++
 include/dt-bindings/soc/bcm6362-pm.h | 21 +++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6362-pm.h

diff --git a/arch/mips/boot/dts/brcm/bcm6362.dtsi b/arch/mips/boot/dts/brcm/bcm6362.dtsi
index 8ae6981735b8..c98f9111e3c8 100644
--- a/arch/mips/boot/dts/brcm/bcm6362.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm6362.dtsi
@@ -108,6 +108,12 @@ uart1: serial@10000120 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@10001848 {
+			compatible = "brcm,bcm6362-power-controller";
+			reg = <0x10001848 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		leds0: led-controller@10001900 {
 			#address-cells = <1>;
 			#size-cells = <0>;
diff --git a/include/dt-bindings/soc/bcm6362-pm.h b/include/dt-bindings/soc/bcm6362-pm.h
new file mode 100644
index 000000000000..d087ba63c7a1
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6362-pm.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6362_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6362_PM_H
+
+#define BCM6362_POWER_DOMAIN_SAR	0
+#define BCM6362_POWER_DOMAIN_IPSEC	1
+#define BCM6362_POWER_DOMAIN_MIPS	2
+#define BCM6362_POWER_DOMAIN_DECT	3
+#define BCM6362_POWER_DOMAIN_USBH	4
+#define BCM6362_POWER_DOMAIN_USBD	5
+#define BCM6362_POWER_DOMAIN_ROBOSW	6
+#define BCM6362_POWER_DOMAIN_PCM	7
+#define BCM6362_POWER_DOMAIN_PERIPH	8
+#define BCM6362_POWER_DOMAIN_ADSL_PHY	9
+#define BCM6362_POWER_DOMAIN_GMII_PADS	10
+#define BCM6362_POWER_DOMAIN_FAP	11
+#define BCM6362_POWER_DOMAIN_PCIE	12
+#define BCM6362_POWER_DOMAIN_WLAN_PADS	13
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6362_PM_H */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v2 5/6] mips: bmips: dts: add BCM63268 power domain support
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                     ` (3 preceding siblings ...)
  2020-06-10 16:32   ` [PATCH v2 4/6] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
@ 2020-06-10 16:33   ` Álvaro Fernández Rojas
  2020-06-10 16:33   ` [PATCH v2 6/6] mips: bmips: add BCM6318 power domain definitions Álvaro Fernández Rojas
                     ` (2 subsequent siblings)
  7 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 16:33 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM63268 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v2: Add support for BCM63268 too.

 arch/mips/boot/dts/brcm/bcm63268.dtsi |  6 ++++++
 include/dt-bindings/soc/bcm63268-pm.h | 21 +++++++++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm63268-pm.h

diff --git a/arch/mips/boot/dts/brcm/bcm63268.dtsi b/arch/mips/boot/dts/brcm/bcm63268.dtsi
index beec24145af7..5acb49b61867 100644
--- a/arch/mips/boot/dts/brcm/bcm63268.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm63268.dtsi
@@ -117,6 +117,12 @@ leds0: led-controller@10001900 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@1000184c {
+			compatible = "brcm,bcm6328-power-controller";
+			reg = <0x1000184c 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		ehci: usb@10002500 {
 			compatible = "brcm,bcm63268-ehci", "generic-ehci";
 			reg = <0x10002500 0x100>;
diff --git a/include/dt-bindings/soc/bcm63268-pm.h b/include/dt-bindings/soc/bcm63268-pm.h
new file mode 100644
index 000000000000..84ded53a732f
--- /dev/null
+++ b/include/dt-bindings/soc/bcm63268-pm.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM63268_PM_H
+#define __DT_BINDINGS_BMIPS_BCM63268_PM_H
+
+#define BCM63268_POWER_DOMAIN_SAR	0
+#define BCM63268_POWER_DOMAIN_IPSEC	1
+#define BCM63268_POWER_DOMAIN_MIPS	2
+#define BCM63268_POWER_DOMAIN_DECT	3
+#define BCM63268_POWER_DOMAIN_USBH	4
+#define BCM63268_POWER_DOMAIN_USBD	5
+#define BCM63268_POWER_DOMAIN_ROBOSW	6
+#define BCM63268_POWER_DOMAIN_PCM	7
+#define BCM63268_POWER_DOMAIN_PERIPH	8
+#define BCM63268_POWER_DOMAIN_VDSL_PHY	9
+#define BCM63268_POWER_DOMAIN_VDSL_MIPS	10
+#define BCM63268_POWER_DOMAIN_FAP	11
+#define BCM63268_POWER_DOMAIN_PCIE	12
+#define BCM63268_POWER_DOMAIN_WLAN_PADS	13
+
+#endif /* __DT_BINDINGS_BMIPS_BCM63268_PM_H */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v2 6/6] mips: bmips: add BCM6318 power domain definitions
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                     ` (4 preceding siblings ...)
  2020-06-10 16:33   ` [PATCH v2 5/6] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
@ 2020-06-10 16:33   ` Álvaro Fernández Rojas
  2020-06-10 16:49   ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Florian Fainelli
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
  7 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 16:33 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v2: Add BCM6318 dt-bindings header file.

 include/dt-bindings/soc/bcm6318-pm.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6318-pm.h

diff --git a/include/dt-bindings/soc/bcm6318-pm.h b/include/dt-bindings/soc/bcm6318-pm.h
new file mode 100644
index 000000000000..05931dce8333
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6318-pm.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6318_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6318_PM_H
+
+#define BCM6318_POWER_DOMAIN_PCIE	0
+#define BCM6318_POWER_DOMAIN_USB	1
+#define BCM6318_POWER_DOMAIN_EPHY0	2
+#define BCM6318_POWER_DOMAIN_EPHY1	3
+#define BCM6318_POWER_DOMAIN_EPHY2	4
+#define BCM6318_POWER_DOMAIN_EPHY3	5
+#define BCM6318_POWER_DOMAIN_LDO2P5	6
+#define BCM6318_POWER_DOMAIN_LDO2P9	7
+#define BCM6318_POWER_DOMAIN_SW1P0	8
+#define BCM6318_POWER_DOMAIN_PAD	9
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6318_PM_H */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v2 1/6] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-10 16:32   ` [PATCH v2 1/6] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
@ 2020-06-10 16:44     ` Florian Fainelli
  0 siblings, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-10 16:44 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, jonas.gorski, bcm-kernel-feedback-list, linux-mips,
	devicetree, linux-kernel, linux-arm-kernel



On 6/10/2020 9:32 AM, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v2 0/6] bmips: add BCM63xx power domain controller
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                     ` (5 preceding siblings ...)
  2020-06-10 16:33   ` [PATCH v2 6/6] mips: bmips: add BCM6318 power domain definitions Álvaro Fernández Rojas
@ 2020-06-10 16:49   ` Florian Fainelli
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
  7 siblings, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-10 16:49 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/10/2020 9:32 AM, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> v2: Introduce changes suggested by Florian:
>   - Add separate YAML file for dt-bindings.
>   - Add bcm63xx folder in drivers/soc/bcm.
>   - Update MAINTAINERS.
>   - Add dt-bindings header files.
>   - Also add BCM63268 support.

Thomas, since I typically send pull requests to soc@kernel.org for
drivers/soc/bcm/, do you want me to take the full series and updatse to
drivers/soc/bcm/bcm63xx/ in the future as well?
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v2 2/6] soc: bcm: add BCM63xx power domain driver
  2020-06-10 16:32   ` [PATCH v2 2/6] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
@ 2020-06-10 16:49     ` Florian Fainelli
  0 siblings, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-10 16:49 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/10/2020 9:32 AM, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Thanks for addressing the previous comments, this looks good to me,
there is just a single request below:

[snip]

> +static const struct bcm63xx_power_data bcm6318_power_domains[] = {
> +	{
> +		.name = "pcie",
> +		.bit = 0,

All of these bits definition should use the constants that you add in
patches 3 through 6, this means you would have to re-order the patches
to maintain bisectability obviously.

Thanks!
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 0/9] bmips: add BCM63xx power domain controller
  2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                     ` (6 preceding siblings ...)
  2020-06-10 16:49   ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Florian Fainelli
@ 2020-06-10 17:16   ` Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
                       ` (9 more replies)
  7 siblings, 10 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

v3: Introduce changes suggested by Florian:
  - Use dt-bindings definitions in power domain driver.
  - Separate dt-bindings definitions from power domain .dtsi support.
v2: Introduce changes suggested by Florian:
  - Add separate YAML file for dt-bindings.
  - Add bcm63xx folder in drivers/soc/bcm.
  - Update MAINTAINERS.
  - Add dt-bindings header files.
  - Also add BCM63268 support.

Álvaro Fernández Rojas (9):
  dt-bindings: soc: brcm: add BCM63xx power domain binding
  mips: bmips: dts: add BCM6328 power domain definitions
  mips: bmips: dts: add BCM6362 power domain definitions
  mips: bmips: dts: add BCM63268 power domain definitions
  mips: bmips: add BCM6318 power domain definitions
  soc: bcm: add BCM63xx power domain driver
  mips: bmips: dts: add BCM6328 power domain support
  mips: bmips: dts: add BCM6362 power domain support
  mips: bmips: dts: add BCM63268 power domain support

 .../bindings/soc/bcm/brcm,bcm63xx-power.yaml  |  44 ++
 MAINTAINERS                                   |   1 +
 arch/mips/boot/dts/brcm/bcm63268.dtsi         |   6 +
 arch/mips/boot/dts/brcm/bcm6328.dtsi          |   6 +
 arch/mips/boot/dts/brcm/bcm6362.dtsi          |   6 +
 drivers/soc/bcm/Kconfig                       |  10 +
 drivers/soc/bcm/Makefile                      |   1 +
 drivers/soc/bcm/bcm63xx/Kconfig               |  12 +
 drivers/soc/bcm/bcm63xx/Makefile              |   2 +
 drivers/soc/bcm/bcm63xx/bcm63xx-power.c       | 378 ++++++++++++++++++
 include/dt-bindings/soc/bcm6318-pm.h          |  17 +
 include/dt-bindings/soc/bcm63268-pm.h         |  21 +
 include/dt-bindings/soc/bcm6328-pm.h          |  17 +
 include/dt-bindings/soc/bcm6362-pm.h          |  21 +
 14 files changed, 542 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
 create mode 100644 drivers/soc/bcm/bcm63xx/Kconfig
 create mode 100644 drivers/soc/bcm/bcm63xx/Makefile
 create mode 100644 drivers/soc/bcm/bcm63xx/bcm63xx-power.c
 create mode 100644 include/dt-bindings/soc/bcm6318-pm.h
 create mode 100644 include/dt-bindings/soc/bcm63268-pm.h
 create mode 100644 include/dt-bindings/soc/bcm6328-pm.h
 create mode 100644 include/dt-bindings/soc/bcm6362-pm.h

-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-12 21:55       ` Rob Herring
  2020-06-12 21:56       ` Rob Herring
  2020-06-10 17:16     ` [PATCH v3 2/9] mips: bmips: dts: add BCM6328 power domain definitions Álvaro Fernández Rojas
                       ` (8 subsequent siblings)
  9 siblings, 2 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
 v3: fix reg maxItems and quote #power-domain-cells.
 v2: Add separate YAML file.

 .../bindings/soc/bcm/brcm,bcm63xx-power.yaml  | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml

diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
new file mode 100644
index 000000000000..fd4204d9aaf6
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/soc/brcm/brcm,bcm63xx-power.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: BCM63xx power domain driver
+
+maintainers:
+  - Álvaro Fernández Rojas <noltari@gmail.com>
+
+description: |
+  BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
+  to enable/disable certain components in order to save power.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm6318-power-controller
+          - brcm,bcm6328-power-controller
+          - brcm,bcm6362-power-controller
+          - brcm,bcm63268-power-controller
+
+  reg:
+    maxItems: 2
+
+  "#power-domain-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - "#power-domain-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    periph_pwr: power-controller@10001848 {
+        compatible = "brcm,bcm6328-power-controller";
+        reg = <0x10001848 0x4>;
+        #power-domain-cells = <1>;
+    };
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 2/9] mips: bmips: dts: add BCM6328 power domain definitions
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 3/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
                       ` (7 subsequent siblings)
  9 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6328 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v3: Separate dt-bindings definitions from power domain .dtsi support.

 include/dt-bindings/soc/bcm6328-pm.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6328-pm.h

diff --git a/include/dt-bindings/soc/bcm6328-pm.h b/include/dt-bindings/soc/bcm6328-pm.h
new file mode 100644
index 000000000000..557e1a69b7f7
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6328-pm.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6328_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6328_PM_H
+
+#define BCM6328_POWER_DOMAIN_ADSL2_MIPS	0
+#define BCM6328_POWER_DOMAIN_ADSL2_PHY	1
+#define BCM6328_POWER_DOMAIN_ADSL2_AFE	2
+#define BCM6328_POWER_DOMAIN_SAR	3
+#define BCM6328_POWER_DOMAIN_PCM	4
+#define BCM6328_POWER_DOMAIN_USBD	5
+#define BCM6328_POWER_DOMAIN_USBH	6
+#define BCM6328_POWER_DOMAIN_PCIE	7
+#define BCM6328_POWER_DOMAIN_ROBOSW	8
+#define BCM6328_POWER_DOMAIN_EPHY	9
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6328_PM_H */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 3/9] mips: bmips: dts: add BCM6362 power domain definitions
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 2/9] mips: bmips: dts: add BCM6328 power domain definitions Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 4/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
                       ` (6 subsequent siblings)
  9 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6362 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v3: Separate dt-bindings definitions from power domain .dtsi support.

 include/dt-bindings/soc/bcm6362-pm.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6362-pm.h

diff --git a/include/dt-bindings/soc/bcm6362-pm.h b/include/dt-bindings/soc/bcm6362-pm.h
new file mode 100644
index 000000000000..d087ba63c7a1
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6362-pm.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6362_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6362_PM_H
+
+#define BCM6362_POWER_DOMAIN_SAR	0
+#define BCM6362_POWER_DOMAIN_IPSEC	1
+#define BCM6362_POWER_DOMAIN_MIPS	2
+#define BCM6362_POWER_DOMAIN_DECT	3
+#define BCM6362_POWER_DOMAIN_USBH	4
+#define BCM6362_POWER_DOMAIN_USBD	5
+#define BCM6362_POWER_DOMAIN_ROBOSW	6
+#define BCM6362_POWER_DOMAIN_PCM	7
+#define BCM6362_POWER_DOMAIN_PERIPH	8
+#define BCM6362_POWER_DOMAIN_ADSL_PHY	9
+#define BCM6362_POWER_DOMAIN_GMII_PADS	10
+#define BCM6362_POWER_DOMAIN_FAP	11
+#define BCM6362_POWER_DOMAIN_PCIE	12
+#define BCM6362_POWER_DOMAIN_WLAN_PADS	13
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6362_PM_H */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 4/9] mips: bmips: dts: add BCM63268 power domain definitions
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
                       ` (2 preceding siblings ...)
  2020-06-10 17:16     ` [PATCH v3 3/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 5/9] mips: bmips: add BCM6318 " Álvaro Fernández Rojas
                       ` (5 subsequent siblings)
  9 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM63268 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v3: Separate dt-bindings definitions from power domain .dtsi support.

 include/dt-bindings/soc/bcm63268-pm.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm63268-pm.h

diff --git a/include/dt-bindings/soc/bcm63268-pm.h b/include/dt-bindings/soc/bcm63268-pm.h
new file mode 100644
index 000000000000..84ded53a732f
--- /dev/null
+++ b/include/dt-bindings/soc/bcm63268-pm.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM63268_PM_H
+#define __DT_BINDINGS_BMIPS_BCM63268_PM_H
+
+#define BCM63268_POWER_DOMAIN_SAR	0
+#define BCM63268_POWER_DOMAIN_IPSEC	1
+#define BCM63268_POWER_DOMAIN_MIPS	2
+#define BCM63268_POWER_DOMAIN_DECT	3
+#define BCM63268_POWER_DOMAIN_USBH	4
+#define BCM63268_POWER_DOMAIN_USBD	5
+#define BCM63268_POWER_DOMAIN_ROBOSW	6
+#define BCM63268_POWER_DOMAIN_PCM	7
+#define BCM63268_POWER_DOMAIN_PERIPH	8
+#define BCM63268_POWER_DOMAIN_VDSL_PHY	9
+#define BCM63268_POWER_DOMAIN_VDSL_MIPS	10
+#define BCM63268_POWER_DOMAIN_FAP	11
+#define BCM63268_POWER_DOMAIN_PCIE	12
+#define BCM63268_POWER_DOMAIN_WLAN_PADS	13
+
+#endif /* __DT_BINDINGS_BMIPS_BCM63268_PM_H */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 5/9] mips: bmips: add BCM6318 power domain definitions
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
                       ` (3 preceding siblings ...)
  2020-06-10 17:16     ` [PATCH v3 4/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 6/9] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
                       ` (4 subsequent siblings)
  9 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v3: no changes (patch reordered).
 v2: Add BCM6318 dt-bindings header file.

 include/dt-bindings/soc/bcm6318-pm.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6318-pm.h

diff --git a/include/dt-bindings/soc/bcm6318-pm.h b/include/dt-bindings/soc/bcm6318-pm.h
new file mode 100644
index 000000000000..05931dce8333
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6318-pm.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6318_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6318_PM_H
+
+#define BCM6318_POWER_DOMAIN_PCIE	0
+#define BCM6318_POWER_DOMAIN_USB	1
+#define BCM6318_POWER_DOMAIN_EPHY0	2
+#define BCM6318_POWER_DOMAIN_EPHY1	3
+#define BCM6318_POWER_DOMAIN_EPHY2	4
+#define BCM6318_POWER_DOMAIN_EPHY3	5
+#define BCM6318_POWER_DOMAIN_LDO2P5	6
+#define BCM6318_POWER_DOMAIN_LDO2P9	7
+#define BCM6318_POWER_DOMAIN_SW1P0	8
+#define BCM6318_POWER_DOMAIN_PAD	9
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6318_PM_H */
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 6/9] soc: bcm: add BCM63xx power domain driver
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
                       ` (4 preceding siblings ...)
  2020-06-10 17:16     ` [PATCH v3 5/9] mips: bmips: add BCM6318 " Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 7/9] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
                       ` (3 subsequent siblings)
  9 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v3: Use dt-bindings definitions in power domain driver.
 v2: Introduce bcm63xx folder in drivers/soc/bcm and update MAINTAINERS.

 MAINTAINERS                             |   1 +
 drivers/soc/bcm/Kconfig                 |  10 +
 drivers/soc/bcm/Makefile                |   1 +
 drivers/soc/bcm/bcm63xx/Kconfig         |  12 +
 drivers/soc/bcm/bcm63xx/Makefile        |   2 +
 drivers/soc/bcm/bcm63xx/bcm63xx-power.c | 378 ++++++++++++++++++++++++
 6 files changed, 404 insertions(+)
 create mode 100644 drivers/soc/bcm/bcm63xx/Kconfig
 create mode 100644 drivers/soc/bcm/bcm63xx/Makefile
 create mode 100644 drivers/soc/bcm/bcm63xx/bcm63xx-power.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 77a3fa5e3edd..e9ba7b955d5f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3442,6 +3442,7 @@ F:	arch/mips/bmips/*
 F:	arch/mips/boot/dts/brcm/bcm*.dts*
 F:	arch/mips/include/asm/mach-bmips/*
 F:	arch/mips/kernel/*bmips*
+F:	drivers/soc/bcm/bcm63xx
 F:	drivers/irqchip/irq-bcm63*
 F:	drivers/irqchip/irq-bcm7*
 F:	drivers/irqchip/irq-brcmstb*
diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig
index 648e32693b7e..24f92a6e882a 100644
--- a/drivers/soc/bcm/Kconfig
+++ b/drivers/soc/bcm/Kconfig
@@ -22,6 +22,15 @@ config RASPBERRYPI_POWER
 	  This enables support for the RPi power domains which can be enabled
 	  or disabled via the RPi firmware.
 
+config SOC_BCM63XX
+	bool "Broadcom 63xx SoC drivers"
+	depends on BMIPS_GENERIC || COMPILE_TEST
+	help
+	  Enables drivers for the Broadcom 63xx series of chips.
+	  Drivers can be enabled individually within this menu.
+
+	  If unsure, say N.
+
 config SOC_BRCMSTB
 	bool "Broadcom STB SoC drivers"
 	depends on ARM || ARM64 || BMIPS_GENERIC || COMPILE_TEST
@@ -33,6 +42,7 @@ config SOC_BRCMSTB
 
 	  If unsure, say N.
 
+source "drivers/soc/bcm/bcm63xx/Kconfig"
 source "drivers/soc/bcm/brcmstb/Kconfig"
 
 endmenu
diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile
index d92268a829a9..7bc90e0bd773 100644
--- a/drivers/soc/bcm/Makefile
+++ b/drivers/soc/bcm/Makefile
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_BCM2835_POWER)	+= bcm2835-power.o
 obj-$(CONFIG_RASPBERRYPI_POWER)	+= raspberrypi-power.o
+obj-$(CONFIG_SOC_BCM63XX)	+= bcm63xx/
 obj-$(CONFIG_SOC_BRCMSTB)	+= brcmstb/
diff --git a/drivers/soc/bcm/bcm63xx/Kconfig b/drivers/soc/bcm/bcm63xx/Kconfig
new file mode 100644
index 000000000000..16f648a6c70a
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/Kconfig
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-only
+if SOC_BCM63XX
+
+config BCM63XX_POWER
+	bool "BCM63xx power domain driver"
+	depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
+	select PM_GENERIC_DOMAINS if PM
+	help
+	  This enables support for the BCM63xx power domains controller on
+	  BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
+
+endif # SOC_BCM63XX
diff --git a/drivers/soc/bcm/bcm63xx/Makefile b/drivers/soc/bcm/bcm63xx/Makefile
new file mode 100644
index 000000000000..0710d5e018cc
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_BCM63XX_POWER) += bcm63xx-power.o
diff --git a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
new file mode 100644
index 000000000000..515fe182dc34
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
@@ -0,0 +1,378 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * BCM63xx Power Domain Controller Driver
+ *
+ * Copyright (C) 2020 Álvaro Fernández Rojas <noltari@gmail.com>
+ */
+
+#include <dt-bindings/soc/bcm6318-pm.h>
+#include <dt-bindings/soc/bcm6328-pm.h>
+#include <dt-bindings/soc/bcm6362-pm.h>
+#include <dt-bindings/soc/bcm63268-pm.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+
+struct bcm63xx_power_dev {
+	struct generic_pm_domain genpd;
+	struct bcm63xx_power *power;
+	uint32_t mask;
+};
+
+struct bcm63xx_power {
+	void __iomem *base;
+	spinlock_t lock;
+	struct bcm63xx_power_dev *dev;
+	struct genpd_onecell_data genpd_data;
+	struct generic_pm_domain **genpd;
+};
+
+struct bcm63xx_power_data {
+	const char * const name;
+	uint8_t bit;
+	unsigned int flags;
+};
+
+static int bcm63xx_power_get_state(struct bcm63xx_power_dev *pmd, bool *is_on)
+{
+	struct bcm63xx_power *power = pmd->power;
+
+	if (!pmd->mask) {
+		*is_on = false;
+		return -EINVAL;
+	}
+
+	*is_on = !(__raw_readl(power->base) & pmd->mask);
+
+	return 0;
+}
+
+static int bcm63xx_power_set_state(struct bcm63xx_power_dev *pmd, bool on)
+{
+	struct bcm63xx_power *power = pmd->power;
+	unsigned long flags;
+	uint32_t val;
+
+	if (!pmd->mask)
+		return -EINVAL;
+
+	spin_lock_irqsave(&power->lock, flags);
+	val = __raw_readl(power->base);
+	if (on)
+		val &= ~pmd->mask;
+	else
+		val |= pmd->mask;
+	__raw_writel(val, power->base);
+	spin_unlock_irqrestore(&power->lock, flags);
+
+	return 0;
+}
+
+static int bcm63xx_power_on(struct generic_pm_domain *genpd)
+{
+	struct bcm63xx_power_dev *pmd = container_of(genpd,
+		struct bcm63xx_power_dev, genpd);
+
+	return bcm63xx_power_set_state(pmd, true);
+}
+
+static int bcm63xx_power_off(struct generic_pm_domain *genpd)
+{
+	struct bcm63xx_power_dev *pmd = container_of(genpd,
+		struct bcm63xx_power_dev, genpd);
+
+	return bcm63xx_power_set_state(pmd, false);
+}
+
+static int bcm63xx_power_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct device_node *np = dev->of_node;
+	struct resource *res;
+	const struct bcm63xx_power_data *entry, *table;
+	struct bcm63xx_power *power;
+	unsigned int ndom;
+	uint8_t max_bit = 0;
+	int ret;
+
+	power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL);
+	if (!power)
+		return -ENOMEM;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	power->base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(power->base))
+		return PTR_ERR(power->base);
+
+	table = of_device_get_match_data(dev);
+	if (!table)
+		return -EINVAL;
+
+	power->genpd_data.num_domains = 0;
+	ndom = 0;
+	for (entry = table; entry->name; entry++) {
+		max_bit = max(max_bit, entry->bit);
+		ndom++;
+	}
+
+	if (!ndom)
+		return -ENODEV;
+
+	power->genpd_data.num_domains = max_bit + 1;
+
+	power->dev = devm_kcalloc(dev, power->genpd_data.num_domains,
+				  sizeof(struct bcm63xx_power_dev),
+				  GFP_KERNEL);
+	if (!power->dev)
+		return -ENOMEM;
+
+	power->genpd = devm_kcalloc(dev, power->genpd_data.num_domains,
+				    sizeof(struct generic_pm_domain *),
+				    GFP_KERNEL);
+	if (!power->genpd)
+		return -ENOMEM;
+
+	power->genpd_data.domains = power->genpd;
+
+	ndom = 0;
+	for (entry = table; entry->name; entry++) {
+		struct bcm63xx_power_dev *pmd = &power->dev[ndom];
+		bool is_on;
+
+		pmd->power = power;
+		pmd->mask = BIT(entry->bit);
+		pmd->genpd.name = entry->name;
+		pmd->genpd.flags = entry->flags;
+
+		ret = bcm63xx_power_get_state(pmd, &is_on);
+		if (ret)
+			dev_warn(dev, "unable to get current state for %s\n",
+				 pmd->genpd.name);
+
+		pmd->genpd.power_on = bcm63xx_power_on;
+		pmd->genpd.power_off = bcm63xx_power_off;
+
+		pm_genpd_init(&pmd->genpd, NULL, !is_on);
+		power->genpd[entry->bit] = &pmd->genpd;
+
+		ndom++;
+	}
+
+	spin_lock_init(&power->lock);
+
+	ret = of_genpd_add_provider_onecell(np, &power->genpd_data);
+	if (ret) {
+		dev_err(dev, "failed to register genpd driver: %d\n", ret);
+		return ret;
+	}
+
+	dev_info(dev, "registered %u power domains\n", ndom);
+
+	return 0;
+}
+
+static const struct bcm63xx_power_data bcm6318_power_domains[] = {
+	{
+		.name = "pcie",
+		.bit = BCM6318_POWER_DOMAIN_PCIE,
+	}, {
+		.name = "usb",
+		.bit = BCM6318_POWER_DOMAIN_USB,
+	}, {
+		.name = "ephy0",
+		.bit = BCM6318_POWER_DOMAIN_EPHY0,
+	}, {
+		.name = "ephy1",
+		.bit = BCM6318_POWER_DOMAIN_EPHY1,
+	}, {
+		.name = "ephy2",
+		.bit = BCM6318_POWER_DOMAIN_EPHY2,
+	}, {
+		.name = "ephy3",
+		.bit = BCM6318_POWER_DOMAIN_EPHY3,
+	}, {
+		.name = "ldo2p5",
+		.bit = BCM6318_POWER_DOMAIN_LDO2P5,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "ldo2p9",
+		.bit = BCM6318_POWER_DOMAIN_LDO2P9,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "sw1p0",
+		.bit = BCM6318_POWER_DOMAIN_SW1P0,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "pad",
+		.bit = BCM6318_POWER_DOMAIN_PAD,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm6328_power_domains[] = {
+	{
+		.name = "adsl2-mips",
+		.bit = BCM6328_POWER_DOMAIN_ADSL2_MIPS,
+	}, {
+		.name = "adsl2-phy",
+		.bit = BCM6328_POWER_DOMAIN_ADSL2_PHY,
+	}, {
+		.name = "adsl2-afe",
+		.bit = BCM6328_POWER_DOMAIN_ADSL2_AFE,
+	}, {
+		.name = "sar",
+		.bit = BCM6328_POWER_DOMAIN_SAR,
+	}, {
+		.name = "pcm",
+		.bit = BCM6328_POWER_DOMAIN_PCM,
+	}, {
+		.name = "usbd",
+		.bit = BCM6328_POWER_DOMAIN_USBD,
+	}, {
+		.name = "usbh",
+		.bit = BCM6328_POWER_DOMAIN_USBH,
+	}, {
+		.name = "pcie",
+		.bit = BCM6328_POWER_DOMAIN_PCIE,
+	}, {
+		.name = "robosw",
+		.bit = BCM6328_POWER_DOMAIN_ROBOSW,
+	}, {
+		.name = "ephy",
+		.bit = BCM6328_POWER_DOMAIN_EPHY,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm6362_power_domains[] = {
+	{
+		.name = "sar",
+		.bit = BCM6362_POWER_DOMAIN_SAR,
+	}, {
+		.name = "ipsec",
+		.bit = BCM6362_POWER_DOMAIN_IPSEC,
+	}, {
+		.name = "mips",
+		.bit = BCM6362_POWER_DOMAIN_MIPS,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "dect",
+		.bit = BCM6362_POWER_DOMAIN_DECT,
+	}, {
+		.name = "usbh",
+		.bit = BCM6362_POWER_DOMAIN_USBH,
+	}, {
+		.name = "usbd",
+		.bit = BCM6362_POWER_DOMAIN_USBD,
+	}, {
+		.name = "robosw",
+		.bit = BCM6362_POWER_DOMAIN_ROBOSW,
+	}, {
+		.name = "pcm",
+		.bit = BCM6362_POWER_DOMAIN_PCM,
+	}, {
+		.name = "periph",
+		.bit = BCM6362_POWER_DOMAIN_PERIPH,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "adsl-phy",
+		.bit = BCM6362_POWER_DOMAIN_ADSL_PHY,
+	}, {
+		.name = "gmii-pads",
+		.bit = BCM6362_POWER_DOMAIN_GMII_PADS,
+	}, {
+		.name = "fap",
+		.bit = BCM6362_POWER_DOMAIN_FAP,
+	}, {
+		.name = "pcie",
+		.bit = BCM6362_POWER_DOMAIN_PCIE,
+	}, {
+		.name = "wlan-pads",
+		.bit = BCM6362_POWER_DOMAIN_WLAN_PADS,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm63268_power_domains[] = {
+	{
+		.name = "sar",
+		.bit = BCM63268_POWER_DOMAIN_SAR,
+	}, {
+		.name = "ipsec",
+		.bit = BCM63268_POWER_DOMAIN_IPSEC,
+	}, {
+		.name = "mips",
+		.bit = BCM63268_POWER_DOMAIN_MIPS,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "dect",
+		.bit = BCM63268_POWER_DOMAIN_DECT,
+	}, {
+		.name = "usbh",
+		.bit = BCM63268_POWER_DOMAIN_USBH,
+	}, {
+		.name = "usbd",
+		.bit = BCM63268_POWER_DOMAIN_USBD,
+	}, {
+		.name = "robosw",
+		.bit = BCM63268_POWER_DOMAIN_ROBOSW,
+	}, {
+		.name = "pcm",
+		.bit = BCM63268_POWER_DOMAIN_PCM,
+	}, {
+		.name = "periph",
+		.bit = BCM63268_POWER_DOMAIN_PERIPH,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "vdsl-phy",
+		.bit = BCM63268_POWER_DOMAIN_VDSL_PHY,
+	}, {
+		.name = "vdsl-mips",
+		.bit = BCM63268_POWER_DOMAIN_VDSL_MIPS,
+	}, {
+		.name = "fap",
+		.bit = BCM63268_POWER_DOMAIN_FAP,
+	}, {
+		.name = "pcie",
+		.bit = BCM63268_POWER_DOMAIN_PCIE,
+	}, {
+		.name = "wlan-pads",
+		.bit = BCM63268_POWER_DOMAIN_WLAN_PADS,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct of_device_id bcm63xx_power_of_match[] = {
+	{
+		.compatible = "brcm,bcm6318-power-controller",
+		.data = &bcm6318_power_domains,
+	}, {
+		.compatible = "brcm,bcm6328-power-controller",
+		.data = &bcm6328_power_domains,
+	}, {
+		.compatible = "brcm,bcm6362-power-controller",
+		.data = &bcm6362_power_domains,
+	}, {
+		.compatible = "brcm,bcm63268-power-controller",
+		.data = &bcm63268_power_domains,
+	}, {
+		/* sentinel */
+	}
+};
+
+static struct platform_driver bcm63xx_power_driver = {
+	.driver = {
+		.name = "bcm63xx-power-controller",
+		.of_match_table = bcm63xx_power_of_match,
+	},
+	.probe  = bcm63xx_power_probe,
+};
+builtin_platform_driver(bcm63xx_power_driver);
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 7/9] mips: bmips: dts: add BCM6328 power domain support
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
                       ` (5 preceding siblings ...)
  2020-06-10 17:16     ` [PATCH v3 6/9] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 8/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
                       ` (2 subsequent siblings)
  9 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6328 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
 v3: Separate dt-bindings definitions from power domain .dtsi support.
 v2: Add dt-bindings header files.

 arch/mips/boot/dts/brcm/bcm6328.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/brcm/bcm6328.dtsi b/arch/mips/boot/dts/brcm/bcm6328.dtsi
index af860d06def6..1f9edd710392 100644
--- a/arch/mips/boot/dts/brcm/bcm6328.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm6328.dtsi
@@ -110,6 +110,12 @@ leds0: led-controller@10000800 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@10001848 {
+			compatible = "brcm,bcm6328-power-controller";
+			reg = <0x10001848 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		ehci: usb@10002500 {
 			compatible = "brcm,bcm6328-ehci", "generic-ehci";
 			reg = <0x10002500 0x100>;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 8/9] mips: bmips: dts: add BCM6362 power domain support
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
                       ` (6 preceding siblings ...)
  2020-06-10 17:16     ` [PATCH v3 7/9] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-10 17:16     ` [PATCH v3 9/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  9 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6362 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
 v3: Separate dt-bindings definitions from power domain .dtsi support.
 v2: Add dt-bindings header files.

 arch/mips/boot/dts/brcm/bcm6362.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/brcm/bcm6362.dtsi b/arch/mips/boot/dts/brcm/bcm6362.dtsi
index 8ae6981735b8..c98f9111e3c8 100644
--- a/arch/mips/boot/dts/brcm/bcm6362.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm6362.dtsi
@@ -108,6 +108,12 @@ uart1: serial@10000120 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@10001848 {
+			compatible = "brcm,bcm6362-power-controller";
+			reg = <0x10001848 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		leds0: led-controller@10001900 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v3 9/9] mips: bmips: dts: add BCM63268 power domain support
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
                       ` (7 preceding siblings ...)
  2020-06-10 17:16     ` [PATCH v3 8/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
@ 2020-06-10 17:16     ` Álvaro Fernández Rojas
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  9 siblings, 0 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-10 17:16 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM63268 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v3: Separate dt-bindings definitions from power domain .dtsi support.
 v2: Add dt-bindings header files.

 arch/mips/boot/dts/brcm/bcm63268.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/brcm/bcm63268.dtsi b/arch/mips/boot/dts/brcm/bcm63268.dtsi
index beec24145af7..5acb49b61867 100644
--- a/arch/mips/boot/dts/brcm/bcm63268.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm63268.dtsi
@@ -117,6 +117,12 @@ leds0: led-controller@10001900 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@1000184c {
+			compatible = "brcm,bcm6328-power-controller";
+			reg = <0x1000184c 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		ehci: usb@10002500 {
 			compatible = "brcm,bcm63268-ehci", "generic-ehci";
 			reg = <0x10002500 0x100>;
-- 
2.26.2


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-10 17:16     ` [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
@ 2020-06-12 21:55       ` Rob Herring
  2020-06-12 21:56       ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Rob Herring @ 2020-06-12 21:55 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: tsbogend, hauke, devicetree, robh+dt, jonas.gorski, zajec5,
	linux-mips, linux-arm-kernel, linux-kernel,
	bcm-kernel-feedback-list, f.fainelli

On Wed, 10 Jun 2020 19:16:22 +0200, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  v3: fix reg maxItems and quote #power-domain-cells.
>  v2: Add separate YAML file.
> 
>  .../bindings/soc/bcm/brcm,bcm63xx-power.yaml  | 44 +++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
> 


My bot found errors running 'make dt_binding_check' on your patch:

Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml: $id: relative path/filename doesn't match actual path or filename
	expected: http://devicetree.org/schemas/soc/bcm/brcm,bcm63xx-power.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.example.dt.yaml: power-controller@10001848: reg: [[268441672, 4]] is too short


See https://patchwork.ozlabs.org/patch/1307099

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-10 17:16     ` [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
  2020-06-12 21:55       ` Rob Herring
@ 2020-06-12 21:56       ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Rob Herring @ 2020-06-12 21:56 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: hauke, zajec5, tsbogend, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel

On Wed, Jun 10, 2020 at 07:16:22PM +0200, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  v3: fix reg maxItems and quote #power-domain-cells.
>  v2: Add separate YAML file.
> 
>  .../bindings/soc/bcm/brcm,bcm63xx-power.yaml  | 44 +++++++++++++++++++

Goes in bindings/power/

>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
> 
> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
> new file mode 100644
> index 000000000000..fd4204d9aaf6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm63xx-power.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later

Okay with GPLv9? Dual license new bindings:

(GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/soc/brcm/brcm,bcm63xx-power.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: BCM63xx power domain driver
> +
> +maintainers:
> +  - Álvaro Fernández Rojas <noltari@gmail.com>
> +
> +description: |
> +  BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> +  to enable/disable certain components in order to save power.
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - brcm,bcm6318-power-controller
> +          - brcm,bcm6328-power-controller
> +          - brcm,bcm6362-power-controller
> +          - brcm,bcm63268-power-controller
> +
> +  reg:
> +    maxItems: 2
> +
> +  "#power-domain-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#power-domain-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    periph_pwr: power-controller@10001848 {
> +        compatible = "brcm,bcm6328-power-controller";
> +        reg = <0x10001848 0x4>;
> +        #power-domain-cells = <1>;
> +    };
> -- 
> 2.26.2
> 

^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 0/9] bmips: add BCM63xx power domain controller
  2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
                       ` (8 preceding siblings ...)
  2020-06-10 17:16     ` [PATCH v3 9/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
@ 2020-06-13  8:21     ` Álvaro Fernández Rojas
  2020-06-13  8:21       ` [PATCH v4 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
                         ` (9 more replies)
  9 siblings, 10 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

v4: Fix device tree bindings documentation.
v3: Introduce changes suggested by Florian:
  - Use dt-bindings definitions in power domain driver.
  - Separate dt-bindings definitions from power domain .dtsi support.
v2: Introduce changes suggested by Florian:
  - Add separate YAML file for dt-bindings.
  - Add bcm63xx folder in drivers/soc/bcm.
  - Update MAINTAINERS.
  - Add dt-bindings header files.
  - Also add BCM63268 support.

Álvaro Fernández Rojas (9):
  dt-bindings: soc: brcm: add BCM63xx power domain binding
  mips: bmips: add BCM6328 power domain definitions
  mips: bmips: add BCM6362 power domain definitions
  mips: bmips: add BCM63268 power domain definitions
  mips: bmips: add BCM6318 power domain definitions
  soc: bcm: add BCM63xx power domain driver
  mips: bmips: dts: add BCM6328 power domain support
  mips: bmips: dts: add BCM6362 power domain support
  mips: bmips: dts: add BCM63268 power domain support

 .../bindings/power/brcm,bcm63xx-power.yaml    |  44 ++
 MAINTAINERS                                   |   1 +
 arch/mips/boot/dts/brcm/bcm63268.dtsi         |   6 +
 arch/mips/boot/dts/brcm/bcm6328.dtsi          |   6 +
 arch/mips/boot/dts/brcm/bcm6362.dtsi          |   6 +
 drivers/soc/bcm/Kconfig                       |  10 +
 drivers/soc/bcm/Makefile                      |   1 +
 drivers/soc/bcm/bcm63xx/Kconfig               |  12 +
 drivers/soc/bcm/bcm63xx/Makefile              |   2 +
 drivers/soc/bcm/bcm63xx/bcm63xx-power.c       | 378 ++++++++++++++++++
 include/dt-bindings/soc/bcm6318-pm.h          |  17 +
 include/dt-bindings/soc/bcm63268-pm.h         |  21 +
 include/dt-bindings/soc/bcm6328-pm.h          |  17 +
 include/dt-bindings/soc/bcm6362-pm.h          |  21 +
 14 files changed, 542 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/brcm,bcm63xx-power.yaml
 create mode 100644 drivers/soc/bcm/bcm63xx/Kconfig
 create mode 100644 drivers/soc/bcm/bcm63xx/Makefile
 create mode 100644 drivers/soc/bcm/bcm63xx/bcm63xx-power.c
 create mode 100644 include/dt-bindings/soc/bcm6318-pm.h
 create mode 100644 include/dt-bindings/soc/bcm63268-pm.h
 create mode 100644 include/dt-bindings/soc/bcm6328-pm.h
 create mode 100644 include/dt-bindings/soc/bcm6362-pm.h

-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-07-09 22:59         ` Rob Herring
  2020-06-13  8:21       ` [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions Álvaro Fernández Rojas
                         ` (8 subsequent siblings)
  9 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
---
 v4: change license and move to bindings/power.
 v3: fix reg maxItems and quote #power-domain-cells.
 v2: Add separate YAML file.

 .../bindings/power/brcm,bcm63xx-power.yaml    | 44 +++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/brcm,bcm63xx-power.yaml

diff --git a/Documentation/devicetree/bindings/power/brcm,bcm63xx-power.yaml b/Documentation/devicetree/bindings/power/brcm,bcm63xx-power.yaml
new file mode 100644
index 000000000000..63b15ac6dde4
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/brcm,bcm63xx-power.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/power/brcm,bcm63xx-power.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: BCM63xx power domain driver
+
+maintainers:
+  - Álvaro Fernández Rojas <noltari@gmail.com>
+
+description: |
+  BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
+  to enable/disable certain components in order to save power.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,bcm6318-power-controller
+          - brcm,bcm6328-power-controller
+          - brcm,bcm6362-power-controller
+          - brcm,bcm63268-power-controller
+
+  reg:
+    maxItems: 1
+
+  "#power-domain-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - "#power-domain-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    periph_pwr: power-controller@10001848 {
+        compatible = "brcm,bcm6328-power-controller";
+        reg = <0x10001848 0x4>;
+        #power-domain-cells = <1>;
+    };
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  2020-06-13  8:21       ` [PATCH v4 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-06-14  4:45         ` Florian Fainelli
  2020-07-09 23:00         ` Rob Herring
  2020-06-13  8:21       ` [PATCH v4 3/9] mips: bmips: add BCM6362 " Álvaro Fernández Rojas
                         ` (7 subsequent siblings)
  9 siblings, 2 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6328 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v4: Remove "dts: " from commit title.
 v3: Separate dt-bindings definitions from power domain .dtsi support.

 include/dt-bindings/soc/bcm6328-pm.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6328-pm.h

diff --git a/include/dt-bindings/soc/bcm6328-pm.h b/include/dt-bindings/soc/bcm6328-pm.h
new file mode 100644
index 000000000000..557e1a69b7f7
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6328-pm.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6328_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6328_PM_H
+
+#define BCM6328_POWER_DOMAIN_ADSL2_MIPS	0
+#define BCM6328_POWER_DOMAIN_ADSL2_PHY	1
+#define BCM6328_POWER_DOMAIN_ADSL2_AFE	2
+#define BCM6328_POWER_DOMAIN_SAR	3
+#define BCM6328_POWER_DOMAIN_PCM	4
+#define BCM6328_POWER_DOMAIN_USBD	5
+#define BCM6328_POWER_DOMAIN_USBH	6
+#define BCM6328_POWER_DOMAIN_PCIE	7
+#define BCM6328_POWER_DOMAIN_ROBOSW	8
+#define BCM6328_POWER_DOMAIN_EPHY	9
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6328_PM_H */
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 3/9] mips: bmips: add BCM6362 power domain definitions
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
  2020-06-13  8:21       ` [PATCH v4 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
  2020-06-13  8:21       ` [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-06-14  4:46         ` Florian Fainelli
  2020-07-09 23:00         ` Rob Herring
  2020-06-13  8:21       ` [PATCH v4 4/9] mips: bmips: add BCM63268 " Álvaro Fernández Rojas
                         ` (6 subsequent siblings)
  9 siblings, 2 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6362 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v4: Remove "dts: " from commit title.
 v3: Separate dt-bindings definitions from power domain .dtsi support.

 include/dt-bindings/soc/bcm6362-pm.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6362-pm.h

diff --git a/include/dt-bindings/soc/bcm6362-pm.h b/include/dt-bindings/soc/bcm6362-pm.h
new file mode 100644
index 000000000000..d087ba63c7a1
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6362-pm.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6362_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6362_PM_H
+
+#define BCM6362_POWER_DOMAIN_SAR	0
+#define BCM6362_POWER_DOMAIN_IPSEC	1
+#define BCM6362_POWER_DOMAIN_MIPS	2
+#define BCM6362_POWER_DOMAIN_DECT	3
+#define BCM6362_POWER_DOMAIN_USBH	4
+#define BCM6362_POWER_DOMAIN_USBD	5
+#define BCM6362_POWER_DOMAIN_ROBOSW	6
+#define BCM6362_POWER_DOMAIN_PCM	7
+#define BCM6362_POWER_DOMAIN_PERIPH	8
+#define BCM6362_POWER_DOMAIN_ADSL_PHY	9
+#define BCM6362_POWER_DOMAIN_GMII_PADS	10
+#define BCM6362_POWER_DOMAIN_FAP	11
+#define BCM6362_POWER_DOMAIN_PCIE	12
+#define BCM6362_POWER_DOMAIN_WLAN_PADS	13
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6362_PM_H */
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 4/9] mips: bmips: add BCM63268 power domain definitions
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                         ` (2 preceding siblings ...)
  2020-06-13  8:21       ` [PATCH v4 3/9] mips: bmips: add BCM6362 " Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-06-14  4:46         ` Florian Fainelli
  2020-07-09 23:01         ` Rob Herring
  2020-06-13  8:21       ` [PATCH v4 5/9] mips: bmips: add BCM6318 " Álvaro Fernández Rojas
                         ` (5 subsequent siblings)
  9 siblings, 2 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM63268 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v4: Remove "dts: " from commit title.
 v3: Separate dt-bindings definitions from power domain .dtsi support.

 include/dt-bindings/soc/bcm63268-pm.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm63268-pm.h

diff --git a/include/dt-bindings/soc/bcm63268-pm.h b/include/dt-bindings/soc/bcm63268-pm.h
new file mode 100644
index 000000000000..84ded53a732f
--- /dev/null
+++ b/include/dt-bindings/soc/bcm63268-pm.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM63268_PM_H
+#define __DT_BINDINGS_BMIPS_BCM63268_PM_H
+
+#define BCM63268_POWER_DOMAIN_SAR	0
+#define BCM63268_POWER_DOMAIN_IPSEC	1
+#define BCM63268_POWER_DOMAIN_MIPS	2
+#define BCM63268_POWER_DOMAIN_DECT	3
+#define BCM63268_POWER_DOMAIN_USBH	4
+#define BCM63268_POWER_DOMAIN_USBD	5
+#define BCM63268_POWER_DOMAIN_ROBOSW	6
+#define BCM63268_POWER_DOMAIN_PCM	7
+#define BCM63268_POWER_DOMAIN_PERIPH	8
+#define BCM63268_POWER_DOMAIN_VDSL_PHY	9
+#define BCM63268_POWER_DOMAIN_VDSL_MIPS	10
+#define BCM63268_POWER_DOMAIN_FAP	11
+#define BCM63268_POWER_DOMAIN_PCIE	12
+#define BCM63268_POWER_DOMAIN_WLAN_PADS	13
+
+#endif /* __DT_BINDINGS_BMIPS_BCM63268_PM_H */
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 5/9] mips: bmips: add BCM6318 power domain definitions
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                         ` (3 preceding siblings ...)
  2020-06-13  8:21       ` [PATCH v4 4/9] mips: bmips: add BCM63268 " Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-06-14  4:46         ` Florian Fainelli
  2020-07-09 23:01         ` Rob Herring
  2020-06-13  8:21       ` [PATCH v4 6/9] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
                         ` (4 subsequent siblings)
  9 siblings, 2 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v4: no changes.
 v3: no changes (patch reordered).
 v2: Add BCM6318 dt-bindings header file.

 include/dt-bindings/soc/bcm6318-pm.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 include/dt-bindings/soc/bcm6318-pm.h

diff --git a/include/dt-bindings/soc/bcm6318-pm.h b/include/dt-bindings/soc/bcm6318-pm.h
new file mode 100644
index 000000000000..05931dce8333
--- /dev/null
+++ b/include/dt-bindings/soc/bcm6318-pm.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __DT_BINDINGS_BMIPS_BCM6318_PM_H
+#define __DT_BINDINGS_BMIPS_BCM6318_PM_H
+
+#define BCM6318_POWER_DOMAIN_PCIE	0
+#define BCM6318_POWER_DOMAIN_USB	1
+#define BCM6318_POWER_DOMAIN_EPHY0	2
+#define BCM6318_POWER_DOMAIN_EPHY1	3
+#define BCM6318_POWER_DOMAIN_EPHY2	4
+#define BCM6318_POWER_DOMAIN_EPHY3	5
+#define BCM6318_POWER_DOMAIN_LDO2P5	6
+#define BCM6318_POWER_DOMAIN_LDO2P9	7
+#define BCM6318_POWER_DOMAIN_SW1P0	8
+#define BCM6318_POWER_DOMAIN_PAD	9
+
+#endif /* __DT_BINDINGS_BMIPS_BCM6318_PM_H */
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 6/9] soc: bcm: add BCM63xx power domain driver
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                         ` (4 preceding siblings ...)
  2020-06-13  8:21       ` [PATCH v4 5/9] mips: bmips: add BCM6318 " Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-06-14  4:48         ` Florian Fainelli
  2020-06-13  8:21       ` [PATCH v4 7/9] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
                         ` (3 subsequent siblings)
  9 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
to enable/disable certain components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v4: no changes.
 v3: Use dt-bindings definitions in power domain driver.
 v2: Introduce bcm63xx folder in drivers/soc/bcm and update MAINTAINERS.

 MAINTAINERS                             |   1 +
 drivers/soc/bcm/Kconfig                 |  10 +
 drivers/soc/bcm/Makefile                |   1 +
 drivers/soc/bcm/bcm63xx/Kconfig         |  12 +
 drivers/soc/bcm/bcm63xx/Makefile        |   2 +
 drivers/soc/bcm/bcm63xx/bcm63xx-power.c | 378 ++++++++++++++++++++++++
 6 files changed, 404 insertions(+)
 create mode 100644 drivers/soc/bcm/bcm63xx/Kconfig
 create mode 100644 drivers/soc/bcm/bcm63xx/Makefile
 create mode 100644 drivers/soc/bcm/bcm63xx/bcm63xx-power.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 56d7d27fc114..4eb0f248d440 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3450,6 +3450,7 @@ F:	arch/mips/bmips/*
 F:	arch/mips/boot/dts/brcm/bcm*.dts*
 F:	arch/mips/include/asm/mach-bmips/*
 F:	arch/mips/kernel/*bmips*
+F:	drivers/soc/bcm/bcm63xx
 F:	drivers/irqchip/irq-bcm63*
 F:	drivers/irqchip/irq-bcm7*
 F:	drivers/irqchip/irq-brcmstb*
diff --git a/drivers/soc/bcm/Kconfig b/drivers/soc/bcm/Kconfig
index 648e32693b7e..24f92a6e882a 100644
--- a/drivers/soc/bcm/Kconfig
+++ b/drivers/soc/bcm/Kconfig
@@ -22,6 +22,15 @@ config RASPBERRYPI_POWER
 	  This enables support for the RPi power domains which can be enabled
 	  or disabled via the RPi firmware.
 
+config SOC_BCM63XX
+	bool "Broadcom 63xx SoC drivers"
+	depends on BMIPS_GENERIC || COMPILE_TEST
+	help
+	  Enables drivers for the Broadcom 63xx series of chips.
+	  Drivers can be enabled individually within this menu.
+
+	  If unsure, say N.
+
 config SOC_BRCMSTB
 	bool "Broadcom STB SoC drivers"
 	depends on ARM || ARM64 || BMIPS_GENERIC || COMPILE_TEST
@@ -33,6 +42,7 @@ config SOC_BRCMSTB
 
 	  If unsure, say N.
 
+source "drivers/soc/bcm/bcm63xx/Kconfig"
 source "drivers/soc/bcm/brcmstb/Kconfig"
 
 endmenu
diff --git a/drivers/soc/bcm/Makefile b/drivers/soc/bcm/Makefile
index d92268a829a9..7bc90e0bd773 100644
--- a/drivers/soc/bcm/Makefile
+++ b/drivers/soc/bcm/Makefile
@@ -1,4 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-$(CONFIG_BCM2835_POWER)	+= bcm2835-power.o
 obj-$(CONFIG_RASPBERRYPI_POWER)	+= raspberrypi-power.o
+obj-$(CONFIG_SOC_BCM63XX)	+= bcm63xx/
 obj-$(CONFIG_SOC_BRCMSTB)	+= brcmstb/
diff --git a/drivers/soc/bcm/bcm63xx/Kconfig b/drivers/soc/bcm/bcm63xx/Kconfig
new file mode 100644
index 000000000000..16f648a6c70a
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/Kconfig
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0-only
+if SOC_BCM63XX
+
+config BCM63XX_POWER
+	bool "BCM63xx power domain driver"
+	depends on BMIPS_GENERIC || (COMPILE_TEST && OF)
+	select PM_GENERIC_DOMAINS if PM
+	help
+	  This enables support for the BCM63xx power domains controller on
+	  BCM6318, BCM6328, BCM6362 and BCM63268 SoCs.
+
+endif # SOC_BCM63XX
diff --git a/drivers/soc/bcm/bcm63xx/Makefile b/drivers/soc/bcm/bcm63xx/Makefile
new file mode 100644
index 000000000000..0710d5e018cc
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_BCM63XX_POWER) += bcm63xx-power.o
diff --git a/drivers/soc/bcm/bcm63xx/bcm63xx-power.c b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
new file mode 100644
index 000000000000..515fe182dc34
--- /dev/null
+++ b/drivers/soc/bcm/bcm63xx/bcm63xx-power.c
@@ -0,0 +1,378 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * BCM63xx Power Domain Controller Driver
+ *
+ * Copyright (C) 2020 Álvaro Fernández Rojas <noltari@gmail.com>
+ */
+
+#include <dt-bindings/soc/bcm6318-pm.h>
+#include <dt-bindings/soc/bcm6328-pm.h>
+#include <dt-bindings/soc/bcm6362-pm.h>
+#include <dt-bindings/soc/bcm63268-pm.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+
+struct bcm63xx_power_dev {
+	struct generic_pm_domain genpd;
+	struct bcm63xx_power *power;
+	uint32_t mask;
+};
+
+struct bcm63xx_power {
+	void __iomem *base;
+	spinlock_t lock;
+	struct bcm63xx_power_dev *dev;
+	struct genpd_onecell_data genpd_data;
+	struct generic_pm_domain **genpd;
+};
+
+struct bcm63xx_power_data {
+	const char * const name;
+	uint8_t bit;
+	unsigned int flags;
+};
+
+static int bcm63xx_power_get_state(struct bcm63xx_power_dev *pmd, bool *is_on)
+{
+	struct bcm63xx_power *power = pmd->power;
+
+	if (!pmd->mask) {
+		*is_on = false;
+		return -EINVAL;
+	}
+
+	*is_on = !(__raw_readl(power->base) & pmd->mask);
+
+	return 0;
+}
+
+static int bcm63xx_power_set_state(struct bcm63xx_power_dev *pmd, bool on)
+{
+	struct bcm63xx_power *power = pmd->power;
+	unsigned long flags;
+	uint32_t val;
+
+	if (!pmd->mask)
+		return -EINVAL;
+
+	spin_lock_irqsave(&power->lock, flags);
+	val = __raw_readl(power->base);
+	if (on)
+		val &= ~pmd->mask;
+	else
+		val |= pmd->mask;
+	__raw_writel(val, power->base);
+	spin_unlock_irqrestore(&power->lock, flags);
+
+	return 0;
+}
+
+static int bcm63xx_power_on(struct generic_pm_domain *genpd)
+{
+	struct bcm63xx_power_dev *pmd = container_of(genpd,
+		struct bcm63xx_power_dev, genpd);
+
+	return bcm63xx_power_set_state(pmd, true);
+}
+
+static int bcm63xx_power_off(struct generic_pm_domain *genpd)
+{
+	struct bcm63xx_power_dev *pmd = container_of(genpd,
+		struct bcm63xx_power_dev, genpd);
+
+	return bcm63xx_power_set_state(pmd, false);
+}
+
+static int bcm63xx_power_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct device_node *np = dev->of_node;
+	struct resource *res;
+	const struct bcm63xx_power_data *entry, *table;
+	struct bcm63xx_power *power;
+	unsigned int ndom;
+	uint8_t max_bit = 0;
+	int ret;
+
+	power = devm_kzalloc(dev, sizeof(*power), GFP_KERNEL);
+	if (!power)
+		return -ENOMEM;
+
+	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+	power->base = devm_ioremap_resource(&pdev->dev, res);
+	if (IS_ERR(power->base))
+		return PTR_ERR(power->base);
+
+	table = of_device_get_match_data(dev);
+	if (!table)
+		return -EINVAL;
+
+	power->genpd_data.num_domains = 0;
+	ndom = 0;
+	for (entry = table; entry->name; entry++) {
+		max_bit = max(max_bit, entry->bit);
+		ndom++;
+	}
+
+	if (!ndom)
+		return -ENODEV;
+
+	power->genpd_data.num_domains = max_bit + 1;
+
+	power->dev = devm_kcalloc(dev, power->genpd_data.num_domains,
+				  sizeof(struct bcm63xx_power_dev),
+				  GFP_KERNEL);
+	if (!power->dev)
+		return -ENOMEM;
+
+	power->genpd = devm_kcalloc(dev, power->genpd_data.num_domains,
+				    sizeof(struct generic_pm_domain *),
+				    GFP_KERNEL);
+	if (!power->genpd)
+		return -ENOMEM;
+
+	power->genpd_data.domains = power->genpd;
+
+	ndom = 0;
+	for (entry = table; entry->name; entry++) {
+		struct bcm63xx_power_dev *pmd = &power->dev[ndom];
+		bool is_on;
+
+		pmd->power = power;
+		pmd->mask = BIT(entry->bit);
+		pmd->genpd.name = entry->name;
+		pmd->genpd.flags = entry->flags;
+
+		ret = bcm63xx_power_get_state(pmd, &is_on);
+		if (ret)
+			dev_warn(dev, "unable to get current state for %s\n",
+				 pmd->genpd.name);
+
+		pmd->genpd.power_on = bcm63xx_power_on;
+		pmd->genpd.power_off = bcm63xx_power_off;
+
+		pm_genpd_init(&pmd->genpd, NULL, !is_on);
+		power->genpd[entry->bit] = &pmd->genpd;
+
+		ndom++;
+	}
+
+	spin_lock_init(&power->lock);
+
+	ret = of_genpd_add_provider_onecell(np, &power->genpd_data);
+	if (ret) {
+		dev_err(dev, "failed to register genpd driver: %d\n", ret);
+		return ret;
+	}
+
+	dev_info(dev, "registered %u power domains\n", ndom);
+
+	return 0;
+}
+
+static const struct bcm63xx_power_data bcm6318_power_domains[] = {
+	{
+		.name = "pcie",
+		.bit = BCM6318_POWER_DOMAIN_PCIE,
+	}, {
+		.name = "usb",
+		.bit = BCM6318_POWER_DOMAIN_USB,
+	}, {
+		.name = "ephy0",
+		.bit = BCM6318_POWER_DOMAIN_EPHY0,
+	}, {
+		.name = "ephy1",
+		.bit = BCM6318_POWER_DOMAIN_EPHY1,
+	}, {
+		.name = "ephy2",
+		.bit = BCM6318_POWER_DOMAIN_EPHY2,
+	}, {
+		.name = "ephy3",
+		.bit = BCM6318_POWER_DOMAIN_EPHY3,
+	}, {
+		.name = "ldo2p5",
+		.bit = BCM6318_POWER_DOMAIN_LDO2P5,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "ldo2p9",
+		.bit = BCM6318_POWER_DOMAIN_LDO2P9,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "sw1p0",
+		.bit = BCM6318_POWER_DOMAIN_SW1P0,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "pad",
+		.bit = BCM6318_POWER_DOMAIN_PAD,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm6328_power_domains[] = {
+	{
+		.name = "adsl2-mips",
+		.bit = BCM6328_POWER_DOMAIN_ADSL2_MIPS,
+	}, {
+		.name = "adsl2-phy",
+		.bit = BCM6328_POWER_DOMAIN_ADSL2_PHY,
+	}, {
+		.name = "adsl2-afe",
+		.bit = BCM6328_POWER_DOMAIN_ADSL2_AFE,
+	}, {
+		.name = "sar",
+		.bit = BCM6328_POWER_DOMAIN_SAR,
+	}, {
+		.name = "pcm",
+		.bit = BCM6328_POWER_DOMAIN_PCM,
+	}, {
+		.name = "usbd",
+		.bit = BCM6328_POWER_DOMAIN_USBD,
+	}, {
+		.name = "usbh",
+		.bit = BCM6328_POWER_DOMAIN_USBH,
+	}, {
+		.name = "pcie",
+		.bit = BCM6328_POWER_DOMAIN_PCIE,
+	}, {
+		.name = "robosw",
+		.bit = BCM6328_POWER_DOMAIN_ROBOSW,
+	}, {
+		.name = "ephy",
+		.bit = BCM6328_POWER_DOMAIN_EPHY,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm6362_power_domains[] = {
+	{
+		.name = "sar",
+		.bit = BCM6362_POWER_DOMAIN_SAR,
+	}, {
+		.name = "ipsec",
+		.bit = BCM6362_POWER_DOMAIN_IPSEC,
+	}, {
+		.name = "mips",
+		.bit = BCM6362_POWER_DOMAIN_MIPS,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "dect",
+		.bit = BCM6362_POWER_DOMAIN_DECT,
+	}, {
+		.name = "usbh",
+		.bit = BCM6362_POWER_DOMAIN_USBH,
+	}, {
+		.name = "usbd",
+		.bit = BCM6362_POWER_DOMAIN_USBD,
+	}, {
+		.name = "robosw",
+		.bit = BCM6362_POWER_DOMAIN_ROBOSW,
+	}, {
+		.name = "pcm",
+		.bit = BCM6362_POWER_DOMAIN_PCM,
+	}, {
+		.name = "periph",
+		.bit = BCM6362_POWER_DOMAIN_PERIPH,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "adsl-phy",
+		.bit = BCM6362_POWER_DOMAIN_ADSL_PHY,
+	}, {
+		.name = "gmii-pads",
+		.bit = BCM6362_POWER_DOMAIN_GMII_PADS,
+	}, {
+		.name = "fap",
+		.bit = BCM6362_POWER_DOMAIN_FAP,
+	}, {
+		.name = "pcie",
+		.bit = BCM6362_POWER_DOMAIN_PCIE,
+	}, {
+		.name = "wlan-pads",
+		.bit = BCM6362_POWER_DOMAIN_WLAN_PADS,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct bcm63xx_power_data bcm63268_power_domains[] = {
+	{
+		.name = "sar",
+		.bit = BCM63268_POWER_DOMAIN_SAR,
+	}, {
+		.name = "ipsec",
+		.bit = BCM63268_POWER_DOMAIN_IPSEC,
+	}, {
+		.name = "mips",
+		.bit = BCM63268_POWER_DOMAIN_MIPS,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "dect",
+		.bit = BCM63268_POWER_DOMAIN_DECT,
+	}, {
+		.name = "usbh",
+		.bit = BCM63268_POWER_DOMAIN_USBH,
+	}, {
+		.name = "usbd",
+		.bit = BCM63268_POWER_DOMAIN_USBD,
+	}, {
+		.name = "robosw",
+		.bit = BCM63268_POWER_DOMAIN_ROBOSW,
+	}, {
+		.name = "pcm",
+		.bit = BCM63268_POWER_DOMAIN_PCM,
+	}, {
+		.name = "periph",
+		.bit = BCM63268_POWER_DOMAIN_PERIPH,
+		.flags = GENPD_FLAG_ALWAYS_ON,
+	}, {
+		.name = "vdsl-phy",
+		.bit = BCM63268_POWER_DOMAIN_VDSL_PHY,
+	}, {
+		.name = "vdsl-mips",
+		.bit = BCM63268_POWER_DOMAIN_VDSL_MIPS,
+	}, {
+		.name = "fap",
+		.bit = BCM63268_POWER_DOMAIN_FAP,
+	}, {
+		.name = "pcie",
+		.bit = BCM63268_POWER_DOMAIN_PCIE,
+	}, {
+		.name = "wlan-pads",
+		.bit = BCM63268_POWER_DOMAIN_WLAN_PADS,
+	}, {
+		/* sentinel */
+	},
+};
+
+static const struct of_device_id bcm63xx_power_of_match[] = {
+	{
+		.compatible = "brcm,bcm6318-power-controller",
+		.data = &bcm6318_power_domains,
+	}, {
+		.compatible = "brcm,bcm6328-power-controller",
+		.data = &bcm6328_power_domains,
+	}, {
+		.compatible = "brcm,bcm6362-power-controller",
+		.data = &bcm6362_power_domains,
+	}, {
+		.compatible = "brcm,bcm63268-power-controller",
+		.data = &bcm63268_power_domains,
+	}, {
+		/* sentinel */
+	}
+};
+
+static struct platform_driver bcm63xx_power_driver = {
+	.driver = {
+		.name = "bcm63xx-power-controller",
+		.of_match_table = bcm63xx_power_of_match,
+	},
+	.probe  = bcm63xx_power_probe,
+};
+builtin_platform_driver(bcm63xx_power_driver);
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 7/9] mips: bmips: dts: add BCM6328 power domain support
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                         ` (5 preceding siblings ...)
  2020-06-13  8:21       ` [PATCH v4 6/9] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-07-23  9:10         ` Thomas Bogendoerfer
  2020-06-13  8:21       ` [PATCH v4 8/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
                         ` (2 subsequent siblings)
  9 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6328 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
 v4: no changes.
 v3: Separate dt-bindings definitions from power domain .dtsi support.
 v2: Add dt-bindings header files.

 arch/mips/boot/dts/brcm/bcm6328.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/brcm/bcm6328.dtsi b/arch/mips/boot/dts/brcm/bcm6328.dtsi
index af860d06def6..1f9edd710392 100644
--- a/arch/mips/boot/dts/brcm/bcm6328.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm6328.dtsi
@@ -110,6 +110,12 @@ leds0: led-controller@10000800 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@10001848 {
+			compatible = "brcm,bcm6328-power-controller";
+			reg = <0x10001848 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		ehci: usb@10002500 {
 			compatible = "brcm,bcm6328-ehci", "generic-ehci";
 			reg = <0x10002500 0x100>;
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 8/9] mips: bmips: dts: add BCM6362 power domain support
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                         ` (6 preceding siblings ...)
  2020-06-13  8:21       ` [PATCH v4 7/9] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-07-23  9:10         ` Thomas Bogendoerfer
  2020-06-13  8:21       ` [PATCH v4 9/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
  2020-07-24 22:15       ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Florian Fainelli
  9 siblings, 1 reply; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM6362 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
---
 v4: no changes.
 v3: Separate dt-bindings definitions from power domain .dtsi support.
 v2: Add dt-bindings header files.

 arch/mips/boot/dts/brcm/bcm6362.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/brcm/bcm6362.dtsi b/arch/mips/boot/dts/brcm/bcm6362.dtsi
index 8ae6981735b8..c98f9111e3c8 100644
--- a/arch/mips/boot/dts/brcm/bcm6362.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm6362.dtsi
@@ -108,6 +108,12 @@ uart1: serial@10000120 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@10001848 {
+			compatible = "brcm,bcm6362-power-controller";
+			reg = <0x10001848 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		leds0: led-controller@10001900 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* [PATCH v4 9/9] mips: bmips: dts: add BCM63268 power domain support
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                         ` (7 preceding siblings ...)
  2020-06-13  8:21       ` [PATCH v4 8/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
@ 2020-06-13  8:21       ` Álvaro Fernández Rojas
  2020-06-14  4:48         ` Florian Fainelli
  2020-07-23  9:10         ` Thomas Bogendoerfer
  2020-07-24 22:15       ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Florian Fainelli
  9 siblings, 2 replies; 58+ messages in thread
From: Álvaro Fernández Rojas @ 2020-06-13  8:21 UTC (permalink / raw)
  To: hauke, zajec5, tsbogend, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel
  Cc: Álvaro Fernández Rojas

BCM63268 SoCs have a power domain controller to enable/disable certain
components in order to save power.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 v4: no changes.
 v3: Separate dt-bindings definitions from power domain .dtsi support.
 v2: Add dt-bindings header files.

 arch/mips/boot/dts/brcm/bcm63268.dtsi | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/mips/boot/dts/brcm/bcm63268.dtsi b/arch/mips/boot/dts/brcm/bcm63268.dtsi
index beec24145af7..5acb49b61867 100644
--- a/arch/mips/boot/dts/brcm/bcm63268.dtsi
+++ b/arch/mips/boot/dts/brcm/bcm63268.dtsi
@@ -117,6 +117,12 @@ leds0: led-controller@10001900 {
 			status = "disabled";
 		};
 
+		periph_pwr: power-controller@1000184c {
+			compatible = "brcm,bcm6328-power-controller";
+			reg = <0x1000184c 0x4>;
+			#power-domain-cells = <1>;
+		};
+
 		ehci: usb@10002500 {
 			compatible = "brcm,bcm63268-ehci", "generic-ehci";
 			reg = <0x10002500 0x100>;
-- 
2.27.0


^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions
  2020-06-13  8:21       ` [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions Álvaro Fernández Rojas
@ 2020-06-14  4:45         ` Florian Fainelli
  2020-07-09 23:00         ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-14  4:45 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote:
> BCM6328 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Reviewed-by: Florian Fainelli <F.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 3/9] mips: bmips: add BCM6362 power domain definitions
  2020-06-13  8:21       ` [PATCH v4 3/9] mips: bmips: add BCM6362 " Álvaro Fernández Rojas
@ 2020-06-14  4:46         ` Florian Fainelli
  2020-07-09 23:00         ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-14  4:46 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote:
> BCM6362 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Reviewed-by: Florian Fainelli <F.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 4/9] mips: bmips: add BCM63268 power domain definitions
  2020-06-13  8:21       ` [PATCH v4 4/9] mips: bmips: add BCM63268 " Álvaro Fernández Rojas
@ 2020-06-14  4:46         ` Florian Fainelli
  2020-07-09 23:01         ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-14  4:46 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote:
> BCM63268 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Reviewed-by: Florian Fainelli <F.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 5/9] mips: bmips: add BCM6318 power domain definitions
  2020-06-13  8:21       ` [PATCH v4 5/9] mips: bmips: add BCM6318 " Álvaro Fernández Rojas
@ 2020-06-14  4:46         ` Florian Fainelli
  2020-07-09 23:01         ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-14  4:46 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote:
> BCM6318 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Reviewed-by: Florian Fainelli <F.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 9/9] mips: bmips: dts: add BCM63268 power domain support
  2020-06-13  8:21       ` [PATCH v4 9/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
@ 2020-06-14  4:48         ` Florian Fainelli
  2020-07-23  9:10         ` Thomas Bogendoerfer
  1 sibling, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-14  4:48 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote:
> BCM63268 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 6/9] soc: bcm: add BCM63xx power domain driver
  2020-06-13  8:21       ` [PATCH v4 6/9] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
@ 2020-06-14  4:48         ` Florian Fainelli
  0 siblings, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-06-14  4:48 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel



On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Reviewed-by: Florian Fainelli <F.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding
  2020-06-13  8:21       ` [PATCH v4 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
@ 2020-07-09 22:59         ` Rob Herring
  0 siblings, 0 replies; 58+ messages in thread
From: Rob Herring @ 2020-07-09 22:59 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: jonas.gorski, bcm-kernel-feedback-list, linux-kernel, hauke,
	f.fainelli, zajec5, linux-mips, devicetree, linux-arm-kernel,
	tsbogend, robh+dt

On Sat, 13 Jun 2020 10:21:32 +0200, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  v4: change license and move to bindings/power.
>  v3: fix reg maxItems and quote #power-domain-cells.
>  v2: Add separate YAML file.
> 
>  .../bindings/power/brcm,bcm63xx-power.yaml    | 44 +++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/power/brcm,bcm63xx-power.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions
  2020-06-13  8:21       ` [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions Álvaro Fernández Rojas
  2020-06-14  4:45         ` Florian Fainelli
@ 2020-07-09 23:00         ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Rob Herring @ 2020-07-09 23:00 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: jonas.gorski, robh+dt, tsbogend, linux-kernel, f.fainelli,
	devicetree, linux-arm-kernel, bcm-kernel-feedback-list, zajec5,
	hauke, linux-mips

On Sat, 13 Jun 2020 10:21:33 +0200, Álvaro Fernández Rojas wrote:
> BCM6328 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  v4: Remove "dts: " from commit title.
>  v3: Separate dt-bindings definitions from power domain .dtsi support.
> 
>  include/dt-bindings/soc/bcm6328-pm.h | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 include/dt-bindings/soc/bcm6328-pm.h
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 3/9] mips: bmips: add BCM6362 power domain definitions
  2020-06-13  8:21       ` [PATCH v4 3/9] mips: bmips: add BCM6362 " Álvaro Fernández Rojas
  2020-06-14  4:46         ` Florian Fainelli
@ 2020-07-09 23:00         ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Rob Herring @ 2020-07-09 23:00 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: f.fainelli, devicetree, linux-mips, tsbogend, hauke, zajec5,
	jonas.gorski, linux-arm-kernel, bcm-kernel-feedback-list,
	robh+dt, linux-kernel

On Sat, 13 Jun 2020 10:21:34 +0200, Álvaro Fernández Rojas wrote:
> BCM6362 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  v4: Remove "dts: " from commit title.
>  v3: Separate dt-bindings definitions from power domain .dtsi support.
> 
>  include/dt-bindings/soc/bcm6362-pm.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 include/dt-bindings/soc/bcm6362-pm.h
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 4/9] mips: bmips: add BCM63268 power domain definitions
  2020-06-13  8:21       ` [PATCH v4 4/9] mips: bmips: add BCM63268 " Álvaro Fernández Rojas
  2020-06-14  4:46         ` Florian Fainelli
@ 2020-07-09 23:01         ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Rob Herring @ 2020-07-09 23:01 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: devicetree, linux-arm-kernel, zajec5, robh+dt,
	bcm-kernel-feedback-list, linux-kernel, f.fainelli, hauke,
	linux-mips, jonas.gorski, tsbogend

On Sat, 13 Jun 2020 10:21:35 +0200, Álvaro Fernández Rojas wrote:
> BCM63268 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  v4: Remove "dts: " from commit title.
>  v3: Separate dt-bindings definitions from power domain .dtsi support.
> 
>  include/dt-bindings/soc/bcm63268-pm.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 include/dt-bindings/soc/bcm63268-pm.h
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 5/9] mips: bmips: add BCM6318 power domain definitions
  2020-06-13  8:21       ` [PATCH v4 5/9] mips: bmips: add BCM6318 " Álvaro Fernández Rojas
  2020-06-14  4:46         ` Florian Fainelli
@ 2020-07-09 23:01         ` Rob Herring
  1 sibling, 0 replies; 58+ messages in thread
From: Rob Herring @ 2020-07-09 23:01 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: f.fainelli, zajec5, linux-mips, devicetree, linux-arm-kernel,
	bcm-kernel-feedback-list, linux-kernel, robh+dt, tsbogend, hauke,
	jonas.gorski

On Sat, 13 Jun 2020 10:21:36 +0200, Álvaro Fernández Rojas wrote:
> BCM6318 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  v4: no changes.
>  v3: no changes (patch reordered).
>  v2: Add BCM6318 dt-bindings header file.
> 
>  include/dt-bindings/soc/bcm6318-pm.h | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>  create mode 100644 include/dt-bindings/soc/bcm6318-pm.h
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 7/9] mips: bmips: dts: add BCM6328 power domain support
  2020-06-13  8:21       ` [PATCH v4 7/9] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
@ 2020-07-23  9:10         ` Thomas Bogendoerfer
  0 siblings, 0 replies; 58+ messages in thread
From: Thomas Bogendoerfer @ 2020-07-23  9:10 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: hauke, zajec5, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel

On Sat, Jun 13, 2020 at 10:21:38AM +0200, Álvaro Fernández Rojas wrote:
> BCM6328 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  v4: no changes.
>  v3: Separate dt-bindings definitions from power domain .dtsi support.
>  v2: Add dt-bindings header files.
> 
>  arch/mips/boot/dts/brcm/bcm6328.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 8/9] mips: bmips: dts: add BCM6362 power domain support
  2020-06-13  8:21       ` [PATCH v4 8/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
@ 2020-07-23  9:10         ` Thomas Bogendoerfer
  0 siblings, 0 replies; 58+ messages in thread
From: Thomas Bogendoerfer @ 2020-07-23  9:10 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: hauke, zajec5, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel

On Sat, Jun 13, 2020 at 10:21:39AM +0200, Álvaro Fernández Rojas wrote:
> BCM6362 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  v4: no changes.
>  v3: Separate dt-bindings definitions from power domain .dtsi support.
>  v2: Add dt-bindings header files.
> 
>  arch/mips/boot/dts/brcm/bcm6362.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 9/9] mips: bmips: dts: add BCM63268 power domain support
  2020-06-13  8:21       ` [PATCH v4 9/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
  2020-06-14  4:48         ` Florian Fainelli
@ 2020-07-23  9:10         ` Thomas Bogendoerfer
  1 sibling, 0 replies; 58+ messages in thread
From: Thomas Bogendoerfer @ 2020-07-23  9:10 UTC (permalink / raw)
  To: Álvaro Fernández Rojas
  Cc: hauke, zajec5, robh+dt, f.fainelli, jonas.gorski,
	bcm-kernel-feedback-list, linux-mips, devicetree, linux-kernel,
	linux-arm-kernel

On Sat, Jun 13, 2020 at 10:21:40AM +0200, Álvaro Fernández Rojas wrote:
> BCM63268 SoCs have a power domain controller to enable/disable certain
> components in order to save power.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
> ---
>  v4: no changes.
>  v3: Separate dt-bindings definitions from power domain .dtsi support.
>  v2: Add dt-bindings header files.
> 
>  arch/mips/boot/dts/brcm/bcm63268.dtsi | 6 ++++++
>  1 file changed, 6 insertions(+)

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 58+ messages in thread

* Re: [PATCH v4 0/9] bmips: add BCM63xx power domain controller
  2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
                         ` (8 preceding siblings ...)
  2020-06-13  8:21       ` [PATCH v4 9/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
@ 2020-07-24 22:15       ` Florian Fainelli
  9 siblings, 0 replies; 58+ messages in thread
From: Florian Fainelli @ 2020-07-24 22:15 UTC (permalink / raw)
  To: Álvaro Fernández Rojas, hauke, zajec5, tsbogend,
	robh+dt, f.fainelli, jonas.gorski, bcm-kernel-feedback-list,
	linux-mips, devicetree, linux-kernel, linux-arm-kernel

On 6/13/20 1:21 AM, Álvaro Fernández Rojas wrote:
> BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller
> to enable/disable certain components in order to save power.
> 
> v4: Fix device tree bindings documentation.
> v3: Introduce changes suggested by Florian:
>   - Use dt-bindings definitions in power domain driver.
>   - Separate dt-bindings definitions from power domain .dtsi support.
> v2: Introduce changes suggested by Florian:
>   - Add separate YAML file for dt-bindings.
>   - Add bcm63xx folder in drivers/soc/bcm.
>   - Update MAINTAINERS.
>   - Add dt-bindings header files.
>   - Also add BCM63268 support.

Series applied to drivers/next after capitalizing MIPS and BMIPS to
follow prior contributions to these files, thanks!
-- 
Florian

^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, back to index

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-09 10:52 [PATCH 0/4] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
2020-06-09 10:52 ` [PATCH 1/4] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
2020-06-10  1:15   ` Florian Fainelli
2020-06-10  6:03     ` Álvaro Fernández Rojas
2020-06-09 10:52 ` [PATCH 2/4] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
2020-06-10  2:19   ` Florian Fainelli
2020-06-09 10:52 ` [PATCH 3/4] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
2020-06-10  1:12   ` Florian Fainelli
2020-06-09 10:52 ` [PATCH 4/4] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
2020-06-10  2:21   ` Florian Fainelli
2020-06-10  2:27   ` Florian Fainelli
2020-06-10 16:32 ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
2020-06-10 16:32   ` [PATCH v2 1/6] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
2020-06-10 16:44     ` Florian Fainelli
2020-06-10 16:32   ` [PATCH v2 2/6] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
2020-06-10 16:49     ` Florian Fainelli
2020-06-10 16:32   ` [PATCH v2 3/6] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
2020-06-10 16:32   ` [PATCH v2 4/6] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
2020-06-10 16:33   ` [PATCH v2 5/6] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
2020-06-10 16:33   ` [PATCH v2 6/6] mips: bmips: add BCM6318 power domain definitions Álvaro Fernández Rojas
2020-06-10 16:49   ` [PATCH v2 0/6] bmips: add BCM63xx power domain controller Florian Fainelli
2020-06-10 17:16   ` [PATCH v3 0/9] " Álvaro Fernández Rojas
2020-06-10 17:16     ` [PATCH v3 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
2020-06-12 21:55       ` Rob Herring
2020-06-12 21:56       ` Rob Herring
2020-06-10 17:16     ` [PATCH v3 2/9] mips: bmips: dts: add BCM6328 power domain definitions Álvaro Fernández Rojas
2020-06-10 17:16     ` [PATCH v3 3/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
2020-06-10 17:16     ` [PATCH v3 4/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
2020-06-10 17:16     ` [PATCH v3 5/9] mips: bmips: add BCM6318 " Álvaro Fernández Rojas
2020-06-10 17:16     ` [PATCH v3 6/9] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
2020-06-10 17:16     ` [PATCH v3 7/9] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
2020-06-10 17:16     ` [PATCH v3 8/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
2020-06-10 17:16     ` [PATCH v3 9/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
2020-06-13  8:21     ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Álvaro Fernández Rojas
2020-06-13  8:21       ` [PATCH v4 1/9] dt-bindings: soc: brcm: add BCM63xx power domain binding Álvaro Fernández Rojas
2020-07-09 22:59         ` Rob Herring
2020-06-13  8:21       ` [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions Álvaro Fernández Rojas
2020-06-14  4:45         ` Florian Fainelli
2020-07-09 23:00         ` Rob Herring
2020-06-13  8:21       ` [PATCH v4 3/9] mips: bmips: add BCM6362 " Álvaro Fernández Rojas
2020-06-14  4:46         ` Florian Fainelli
2020-07-09 23:00         ` Rob Herring
2020-06-13  8:21       ` [PATCH v4 4/9] mips: bmips: add BCM63268 " Álvaro Fernández Rojas
2020-06-14  4:46         ` Florian Fainelli
2020-07-09 23:01         ` Rob Herring
2020-06-13  8:21       ` [PATCH v4 5/9] mips: bmips: add BCM6318 " Álvaro Fernández Rojas
2020-06-14  4:46         ` Florian Fainelli
2020-07-09 23:01         ` Rob Herring
2020-06-13  8:21       ` [PATCH v4 6/9] soc: bcm: add BCM63xx power domain driver Álvaro Fernández Rojas
2020-06-14  4:48         ` Florian Fainelli
2020-06-13  8:21       ` [PATCH v4 7/9] mips: bmips: dts: add BCM6328 power domain support Álvaro Fernández Rojas
2020-07-23  9:10         ` Thomas Bogendoerfer
2020-06-13  8:21       ` [PATCH v4 8/9] mips: bmips: dts: add BCM6362 " Álvaro Fernández Rojas
2020-07-23  9:10         ` Thomas Bogendoerfer
2020-06-13  8:21       ` [PATCH v4 9/9] mips: bmips: dts: add BCM63268 " Álvaro Fernández Rojas
2020-06-14  4:48         ` Florian Fainelli
2020-07-23  9:10         ` Thomas Bogendoerfer
2020-07-24 22:15       ` [PATCH v4 0/9] bmips: add BCM63xx power domain controller Florian Fainelli

Linux-MIPS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mips/0 linux-mips/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mips linux-mips/ https://lore.kernel.org/linux-mips \
		linux-mips@vger.kernel.org
	public-inbox-index linux-mips

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mips


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git