* [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-24 17:40 ` Florian Fainelli
` (3 more replies)
2020-02-24 9:06 ` [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding Maxime Ripard
` (10 subsequent siblings)
11 siblings, 4 replies; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Kamal Dasu, Florian Fainelli,
Rob Herring, Wolfram Sang, linux-i2c, devicetree
Switch the DT binding to a YAML schema to enable the DT validation.
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: linux-i2c@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml | 59 +++++++-
Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt | 26 +---
MAINTAINERS | 2 +-
3 files changed, 60 insertions(+), 27 deletions(-)
create mode 100644 Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
diff --git a/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml b/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
new file mode 100644
index 000000000000..3189d74096e8
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/brcm,brcmstb-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom STB BSC IIC Master Controller
+
+maintainers:
+ - Kamal Dasu <kdasu.kdev@gmail.com>
+
+allOf:
+ - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+ compatible:
+ enum:
+ - brcm,brcmstb-i2c
+ - brcm,brcmper-i2c
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ maxItems: 1
+
+ clock-frequency:
+ enum:
+ - 46875
+ - 50000
+ - 93750
+ - 97500
+ - 187500
+ - 200000
+ - 375000
+ - 390000
+
+required:
+ - compatible
+ - reg
+ - clock-frequency
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ bsca: i2c@f0406200 {
+ clock-frequency = <390000>;
+ compatible = "brcm,brcmstb-i2c";
+ interrupt-parent = <&irq0_intc>;
+ reg = <0xf0406200 0x58>;
+ interrupts = <0x18>;
+ interrupt-names = "upg_bsca";
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt b/Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
deleted file mode 100644
index 0380609b177a..000000000000
--- a/Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Broadcom stb bsc iic master controller
-
-Required properties:
-
-- compatible: should be "brcm,brcmstb-i2c" or "brcm,brcmper-i2c"
-- clock-frequency: 32-bit decimal value of iic master clock freqency in Hz
- valid values are 375000, 390000, 187500, 200000
- 93750, 97500, 46875 and 50000
-- reg: specifies the base physical address and size of the registers
-
-Optional properties :
-
-- interrupts: specifies the interrupt number, the irq line to be used
-- interrupt-names: Interrupt name string
-
-Example:
-
-bsca: i2c@f0406200 {
- clock-frequency = <390000>;
- compatible = "brcm,brcmstb-i2c";
- interrupt-parent = <&irq0_intc>;
- reg = <0xf0406200 0x58>;
- interrupts = <0x18>;
- interrupt-names = "upg_bsca";
-};
-
diff --git a/MAINTAINERS b/MAINTAINERS
index 38fe2f3f7b6f..9e45ed8be540 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3431,7 +3431,7 @@ L: linux-i2c@vger.kernel.org
L: bcm-kernel-feedback-list@broadcom.com
S: Supported
F: drivers/i2c/busses/i2c-brcmstb.c
-F: Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
+F: Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER
M: Al Cooper <alcooperx@gmail.com>
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
2020-02-24 9:06 ` [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-24 17:48 ` Florian Fainelli
` (2 more replies)
2020-02-24 9:06 ` [PATCH 06/89] dt-bindings: clock: Add a binding for the RPi Firmware clocks Maxime Ripard
` (9 subsequent siblings)
11 siblings, 3 replies; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Kamal Dasu, Florian Fainelli,
Rob Herring, Wolfram Sang, linux-i2c, devicetree
The HDMI blocks in the BCM2771 have an i2c controller to retrieve the
EDID. This block is split into two parts, the BSC and the AUTO_I2C,
lying in two separate register areas.
The AUTO_I2C block has a mailbox-like interface and will take away the
BSC control from the CPU if enabled. However, the BSC is the actually
the same controller than the one supported by the brcmstb driver, and
the AUTO_I2C doesn't really bring any immediate benefit.
We can model it in the DT as a single device with two register range,
which will allow us to use or or the other in the driver without
changing anything in the DT.
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: linux-i2c@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml | 40 ++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml b/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
index 3189d74096e8..edbca2476128 100644
--- a/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
@@ -15,11 +15,21 @@ allOf:
properties:
compatible:
enum:
+ - brcm,bcm2711-hdmi-i2c
- brcm,brcmstb-i2c
- brcm,brcmper-i2c
reg:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
+ items:
+ - description: BSC register range
+ - description: Auto-I2C register range
+
+ reg-names:
+ items:
+ - const: bsc
+ - const: auto-i2c
interrupts:
maxItems: 1
@@ -45,6 +55,26 @@ required:
unevaluatedProperties: false
+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - brcm,bcm2711-hdmi-i2c
+
+then:
+ properties:
+ reg:
+ minItems: 2
+
+ required:
+ - reg-names
+
+else:
+ properties:
+ reg:
+ maxItems: 1
+
examples:
- |
bsca: i2c@f0406200 {
@@ -56,4 +86,12 @@ examples:
interrupt-names = "upg_bsca";
};
+ - |
+ ddc0: i2c@7ef04500 {
+ compatible = "brcm,bcm2711-hdmi-i2c";
+ reg = <0x7ef04500 0x100>, <0x7ef00b00 0x300>;
+ reg-names = "bsc", "auto-i2c";
+ clock-frequency = <390000>;
+ };
+
...
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 06/89] dt-bindings: clock: Add a binding for the RPi Firmware clocks
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
2020-02-24 9:06 ` [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema Maxime Ripard
2020-02-24 9:06 ` [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-25 18:16 ` Rob Herring
2020-02-24 9:06 ` [PATCH 26/89] dt-bindings: clock: Add BCM2711 DVP binding Maxime Ripard
` (8 subsequent siblings)
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Michael Turquette, Stephen Boyd,
Rob Herring, linux-clk, devicetree
The firmare running on the RPi VideoCore can be used to discover and
change the various clocks running in the BCM2711. Since devices will
need to use them through the DT, let's add a pretty simple binding.
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml b/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
new file mode 100644
index 000000000000..d37bc311321d
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
@@ -0,0 +1,39 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/raspberrypi,firmware-clocks.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RaspberryPi Firmware Clocks Device Tree Bindings
+
+maintainers:
+ - Maxime Ripard <mripard@kernel.org>
+
+properties:
+ "#clock-cells":
+ const: 1
+
+ compatible:
+ const: raspberrypi,firmware-clocks
+
+ raspberrypi,firmware:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: >
+ Phandle to the mailbox node to communicate with the firmware.
+
+required:
+ - "#clock-cells"
+ - compatible
+ - raspberrypi,firmware
+
+additionalProperties: false
+
+examples:
+ - |
+ firmware_clocks: firmware-clocks {
+ compatible = "raspberrypi,firmware-clocks";
+ raspberrypi,firmware = <&firmware>;
+ #clock-cells = <1>;
+ };
+
+...
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 26/89] dt-bindings: clock: Add BCM2711 DVP binding
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (2 preceding siblings ...)
2020-02-24 9:06 ` [PATCH 06/89] dt-bindings: clock: Add a binding for the RPi Firmware clocks Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-25 18:17 ` Rob Herring
2020-02-24 9:06 ` [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver Maxime Ripard
` (7 subsequent siblings)
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Philipp Zabel, Rob Herring,
devicetree
The BCM2711 has a unit controlling the HDMI0 and HDMI1 clock and reset
signals. Let's add a binding for it.
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/clock/brcm,bcm2711-dvp.yaml | 47 +++++++-
1 file changed, 47 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm2711-dvp.yaml
diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2711-dvp.yaml b/Documentation/devicetree/bindings/clock/brcm,bcm2711-dvp.yaml
new file mode 100644
index 000000000000..08543ecbe35b
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/brcm,bcm2711-dvp.yaml
@@ -0,0 +1,47 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/brcm,bcm2711-dvp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom BCM2711 HDMI DVP Device Tree Bindings
+
+maintainers:
+ - Maxime Ripard <mripard@kernel.org>
+
+properties:
+ "#clock-cells":
+ const: 1
+
+ "#reset-cells":
+ const: 1
+
+ compatible:
+ const: brcm,brcm2711-dvp
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+required:
+ - "#clock-cells"
+ - "#reset-cells"
+ - compatible
+ - reg
+ - clocks
+
+additionalProperties: false
+
+examples:
+ - |
+ dvp: clock@7ef00000 {
+ compatible = "brcm,brcm2711-dvp";
+ reg = <0x7ef00000 0x10>;
+ clocks = <&clk_108MHz>;
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
+
+...
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (3 preceding siblings ...)
2020-02-24 9:06 ` [PATCH 26/89] dt-bindings: clock: Add BCM2711 DVP binding Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-03-13 1:00 ` Stephen Boyd
2020-02-24 9:06 ` [PATCH 29/89] dt-bindings: display: Convert VC4 bindings to schemas Maxime Ripard
` (6 subsequent siblings)
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Michael Turquette, Stephen Boyd,
Rob Herring, linux-clk, devicetree
The HDMI block has a block that controls clocks and reset signals to the
HDMI0 and HDMI1 controllers.
Let's expose that through a clock driver implementing a clock and reset
provider.
Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/clk/bcm/Kconfig | 1 +-
drivers/clk/bcm/Makefile | 1 +-
drivers/clk/bcm/clk-bcm2711-dvp.c | 113 +++++++++++++++++++++++++++++++-
3 files changed, 115 insertions(+)
create mode 100644 drivers/clk/bcm/clk-bcm2711-dvp.c
diff --git a/drivers/clk/bcm/Kconfig b/drivers/clk/bcm/Kconfig
index 8c83977a7dc4..03bbd8040451 100644
--- a/drivers/clk/bcm/Kconfig
+++ b/drivers/clk/bcm/Kconfig
@@ -4,6 +4,7 @@ config CLK_BCM2835
depends on ARCH_BCM2835 || ARCH_BRCMSTB || COMPILE_TEST
depends on COMMON_CLK
default ARCH_BCM2835 || ARCH_BRCMSTB
+ select RESET_SIMPLE
help
Enable common clock framework support for Broadcom BCM2835
SoCs.
diff --git a/drivers/clk/bcm/Makefile b/drivers/clk/bcm/Makefile
index 0070ddf6cdd2..2c1349062147 100644
--- a/drivers/clk/bcm/Makefile
+++ b/drivers/clk/bcm/Makefile
@@ -6,6 +6,7 @@ obj-$(CONFIG_CLK_BCM_KONA) += clk-kona-setup.o
obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm281xx.o
obj-$(CONFIG_CLK_BCM_KONA) += clk-bcm21664.o
obj-$(CONFIG_COMMON_CLK_IPROC) += clk-iproc-armpll.o clk-iproc-pll.o clk-iproc-asiu.o
+obj-$(CONFIG_CLK_BCM2835) += clk-bcm2711-dvp.o
obj-$(CONFIG_CLK_BCM2835) += clk-bcm2835.o
obj-$(CONFIG_CLK_BCM2835) += clk-bcm2835-aux.o
obj-$(CONFIG_CLK_RASPBERRYPI) += clk-raspberrypi.o
diff --git a/drivers/clk/bcm/clk-bcm2711-dvp.c b/drivers/clk/bcm/clk-bcm2711-dvp.c
new file mode 100644
index 000000000000..f4773cc92724
--- /dev/null
+++ b/drivers/clk/bcm/clk-bcm2711-dvp.c
@@ -0,0 +1,113 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+// Copyright 2020 Cerno
+
+#include <linux/clk-provider.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/reset-controller.h>
+#include <linux/reset/reset-simple.h>
+
+#define DVP_HT_RPI_SW_INIT 0x04
+#define DVP_HT_RPI_MISC_CONFIG 0x08
+
+#define NR_CLOCKS 2
+#define NR_RESETS 6
+
+struct clk_dvp {
+ struct clk *clks[NR_CLOCKS];
+ struct clk_onecell_data clk_data;
+ struct reset_simple_data reset;
+};
+
+static int clk_dvp_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct clk_dvp *dvp;
+ void __iomem *base;
+ const char *parent;
+ int ret;
+
+ dvp = devm_kzalloc(&pdev->dev, sizeof(*dvp), GFP_KERNEL);
+ if (!dvp)
+ return -ENOMEM;
+ platform_set_drvdata(pdev, dvp);
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
+
+ dvp->reset.rcdev.owner = THIS_MODULE;
+ dvp->reset.rcdev.nr_resets = NR_RESETS;
+ dvp->reset.rcdev.ops = &reset_simple_ops;
+ dvp->reset.rcdev.of_node = pdev->dev.of_node;
+ dvp->reset.membase = base + DVP_HT_RPI_SW_INIT;
+ spin_lock_init(&dvp->reset.lock);
+
+ ret = reset_controller_register(&dvp->reset.rcdev);
+ if (ret)
+ return ret;
+
+ parent = of_clk_get_parent_name(pdev->dev.of_node, 0);
+ if (!parent)
+ goto unregister_reset;
+
+ dvp->clks[0] = clk_register_gate(&pdev->dev, "hdmi0-108MHz",
+ parent, CLK_IS_CRITICAL,
+ base + DVP_HT_RPI_MISC_CONFIG, 3,
+ CLK_GATE_SET_TO_DISABLE, &dvp->reset.lock);
+ if (IS_ERR(dvp->clks[0])) {
+ ret = PTR_ERR(dvp->clks[0]);
+ goto unregister_reset;
+ }
+
+ dvp->clks[1] = clk_register_gate(&pdev->dev, "hdmi1-108MHz",
+ parent, CLK_IS_CRITICAL,
+ base + DVP_HT_RPI_MISC_CONFIG, 4,
+ CLK_GATE_SET_TO_DISABLE, &dvp->reset.lock);
+ if (IS_ERR(dvp->clks[1])) {
+ ret = PTR_ERR(dvp->clks[1]);
+ goto unregister_clk0;
+ }
+
+ dvp->clk_data.clks = dvp->clks;
+ dvp->clk_data.clk_num = NR_CLOCKS;
+ of_clk_add_provider(pdev->dev.of_node, of_clk_src_onecell_get,
+ &dvp->clk_data);
+
+ return 0;
+
+
+unregister_clk0:
+ clk_unregister_gate(dvp->clks[0]);
+
+unregister_reset:
+ reset_controller_unregister(&dvp->reset.rcdev);
+ return ret;
+};
+
+static int clk_dvp_remove(struct platform_device *pdev)
+{
+ struct clk_dvp *dvp = platform_get_drvdata(pdev);
+
+ clk_unregister_gate(dvp->clks[1]);
+ clk_unregister_gate(dvp->clks[0]);
+ reset_controller_unregister(&dvp->reset.rcdev);
+
+ return 0;
+}
+
+static const struct of_device_id clk_dvp_dt_ids[] = {
+ { .compatible = "brcm,brcm2711-dvp", },
+ { /* sentinel */ },
+};
+
+static struct platform_driver clk_dvp_driver = {
+ .probe = clk_dvp_probe,
+ .remove = clk_dvp_remove,
+ .driver = {
+ .name = "brcm2711-dvp",
+ .of_match_table = clk_dvp_dt_ids,
+ },
+};
+module_platform_driver(clk_dvp_driver);
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 29/89] dt-bindings: display: Convert VC4 bindings to schemas
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (4 preceding siblings ...)
2020-02-24 9:06 ` [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-24 18:41 ` Rob Herring
2020-02-24 9:06 ` [PATCH 30/89] dt-bindings: display: vc4: dpi: Add missing clock-names property Maxime Ripard
` (5 subsequent siblings)
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Rob Herring, devicetree
The BCM283x SoCs have a display pipeline composed of several controllers
with device tree bindings that are supported by Linux.
Now that we have the DT validation in place, let's split into separate
files and convert the device tree bindings for those controllers to
schemas.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 174 +------------------------------------------------------------------------
Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml | 66 +++++++++++++++++++++++++++-
Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 73 ++++++++++++++++++++++++++++++-
Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 75 +++++++++++++++++++++++++++++++-
Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml | 37 +++++++++++++++-
Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml | 40 +++++++++++++++++-
Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml | 37 +++++++++++++++-
Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml | 42 +++++++++++++++++-
Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml | 34 ++++++++++++++-
Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml | 44 ++++++++++++++++++-
MAINTAINERS | 2 +-
11 files changed, 449 insertions(+), 175 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt b/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
deleted file mode 100644
index 26649b4c4dd8..000000000000
--- a/Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
+++ /dev/null
@@ -1,174 +0,0 @@
-Broadcom VC4 (VideoCore4) GPU
-
-The VC4 device present on the Raspberry Pi includes a display system
-with HDMI output and the HVS (Hardware Video Scaler) for compositing
-display planes.
-
-Required properties for VC4:
-- compatible: Should be "brcm,bcm2835-vc4" or "brcm,cygnus-vc4"
-
-Required properties for Pixel Valve:
-- compatible: Should be one of "brcm,bcm2835-pixelvalve0",
- "brcm,bcm2835-pixelvalve1", or "brcm,bcm2835-pixelvalve2"
-- reg: Physical base address and length of the PV's registers
-- interrupts: The interrupt number
- See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-
-Required properties for HVS:
-- compatible: Should be "brcm,bcm2835-hvs"
-- reg: Physical base address and length of the HVS's registers
-- interrupts: The interrupt number
- See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-
-Required properties for HDMI
-- compatible: Should be "brcm,bcm2835-hdmi"
-- reg: Physical base address and length of the two register ranges
- ("HDMI" and "HD", in that order)
-- interrupts: The interrupt numbers
- See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-- ddc: phandle of the I2C controller used for DDC EDID probing
-- clocks: a) hdmi: The HDMI state machine clock
- b) pixel: The pixel clock.
-
-Optional properties for HDMI:
-- hpd-gpios: The GPIO pin for HDMI hotplug detect (if it doesn't appear
- as an interrupt/status bit in the HDMI controller
- itself). See bindings/pinctrl/brcm,bcm2835-gpio.txt
-- dmas: Should contain one entry pointing to the DMA channel used to
- transfer audio data
-- dma-names: Should contain "audio-rx"
-
-Required properties for DPI:
-- compatible: Should be "brcm,bcm2835-dpi"
-- reg: Physical base address and length of the registers
-- clocks: a) core: The core clock the unit runs on
- b) pixel: The pixel clock that feeds the pixelvalve
-- port: Port node with a single endpoint connecting to the panel
- device, as defined in [1]
-
-Required properties for VEC:
-- compatible: Should be "brcm,bcm2835-vec"
-- reg: Physical base address and length of the registers
-- clocks: The core clock the unit runs on
-- interrupts: The interrupt number
- See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-
-Required properties for V3D:
-- compatible: Should be "brcm,bcm2835-v3d" or "brcm,cygnus-v3d"
-- reg: Physical base address and length of the V3D's registers
-- interrupts: The interrupt number
- See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-
-Optional properties for V3D:
-- clocks: The clock the unit runs on
-
-Required properties for DSI:
-- compatible: Should be "brcm,bcm2835-dsi0" or "brcm,bcm2835-dsi1"
-- reg: Physical base address and length of the DSI block's registers
-- interrupts: The interrupt number
- See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-- clocks: a) phy: The DSI PLL clock feeding the DSI analog PHY
- b) escape: The DSI ESC clock from CPRMAN
- c) pixel: The DSI pixel clock from CPRMAN
-- clock-output-names:
- The 3 clocks output from the DSI analog PHY: dsi[01]_byte,
- dsi[01]_ddr2, and dsi[01]_ddr
-
-Required properties for the TXP (writeback) block:
-- compatible: Should be "brcm,bcm2835-txp"
-- reg: Physical base address and length of the TXP block's registers
-- interrupts: The interrupt number
- See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
-
-[1] Documentation/devicetree/bindings/media/video-interfaces.txt
-
-Example:
-pixelvalve@7e807000 {
- compatible = "brcm,bcm2835-pixelvalve2";
- reg = <0x7e807000 0x100>;
- interrupts = <2 10>; /* pixelvalve */
-};
-
-hvs@7e400000 {
- compatible = "brcm,bcm2835-hvs";
- reg = <0x7e400000 0x6000>;
- interrupts = <2 1>;
-};
-
-hdmi: hdmi@7e902000 {
- compatible = "brcm,bcm2835-hdmi";
- reg = <0x7e902000 0x600>,
- <0x7e808000 0x100>;
- interrupts = <2 8>, <2 9>;
- ddc = <&i2c2>;
- hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
- clocks = <&clocks BCM2835_PLLH_PIX>,
- <&clocks BCM2835_CLOCK_HSM>;
- clock-names = "pixel", "hdmi";
-};
-
-dpi: dpi@7e208000 {
- compatible = "brcm,bcm2835-dpi";
- reg = <0x7e208000 0x8c>;
- clocks = <&clocks BCM2835_CLOCK_VPU>,
- <&clocks BCM2835_CLOCK_DPI>;
- clock-names = "core", "pixel";
- #address-cells = <1>;
- #size-cells = <0>;
-
- port {
- dpi_out: endpoint@0 {
- remote-endpoint = <&panel_in>;
- };
- };
-};
-
-dsi1: dsi@7e700000 {
- compatible = "brcm,bcm2835-dsi1";
- reg = <0x7e700000 0x8c>;
- interrupts = <2 12>;
- #address-cells = <1>;
- #size-cells = <0>;
- #clock-cells = <1>;
-
- clocks = <&clocks BCM2835_PLLD_DSI1>,
- <&clocks BCM2835_CLOCK_DSI1E>,
- <&clocks BCM2835_CLOCK_DSI1P>;
- clock-names = "phy", "escape", "pixel";
-
- clock-output-names = "dsi1_byte", "dsi1_ddr2", "dsi1_ddr";
-
- pitouchscreen: panel@0 {
- compatible = "raspberrypi,touchscreen";
- reg = <0>;
-
- <...>
- };
-};
-
-vec: vec@7e806000 {
- compatible = "brcm,bcm2835-vec";
- reg = <0x7e806000 0x1000>;
- clocks = <&clocks BCM2835_CLOCK_VEC>;
- interrupts = <2 27>;
-};
-
-v3d: v3d@7ec00000 {
- compatible = "brcm,bcm2835-v3d";
- reg = <0x7ec00000 0x1000>;
- interrupts = <1 10>;
-};
-
-vc4: gpu {
- compatible = "brcm,bcm2835-vc4";
-};
-
-panel: panel {
- compatible = "ontat,yx700wv03", "simple-panel";
-
- port {
- panel_in: endpoint {
- remote-endpoint = <&dpi_out>;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
new file mode 100644
index 000000000000..288494b70e82
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
@@ -0,0 +1,66 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-dpi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) DPI Controller
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+properties:
+ compatible:
+ const: brcm,bcm2835-dpi
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: The core clock the unit runs on
+ - description: The pixel clock that feeds the pixelvalve
+
+ port:
+ type: object
+ description: >
+ Port node with a single endpoint connecting to the panel, as
+ defined in Documentation/devicetree/bindings/media/video-interfaces.txt.
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/bcm2835.h>
+
+ panel: panel {
+ compatible = "ontat,yx700wv03", "simple-panel";
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&dpi_out>;
+ };
+ };
+ };
+
+ dpi: dpi@7e208000 {
+ compatible = "brcm,bcm2835-dpi";
+ reg = <0x7e208000 0x8c>;
+ clocks = <&clocks BCM2835_CLOCK_VPU>,
+ <&clocks BCM2835_CLOCK_DPI>;
+ clock-names = "core", "pixel";
+
+ port {
+ dpi_out: endpoint {
+ remote-endpoint = <&panel_in>;
+ };
+ };
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
new file mode 100644
index 000000000000..3887675f844e
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-dsi0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) DSI Controller
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+properties:
+ compatible:
+ enum:
+ - brcm,bcm2835-dsi0
+ - brcm,bcm2835-dsi1
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: The DSI PLL clock feeding the DSI analog PHY
+ - description: The DSI ESC clock
+ - description: The DSI pixel clock
+
+ clock-output-names: true
+ # FIXME: The meta-schemas don't seem to allow it for now
+ # items:
+ # - description: The DSI byte clock for the PHY
+ # - description: The DSI DDR2 clock
+ # - description: The DSI DDR clock
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-output-names
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/bcm2835.h>
+
+ dsi1: dsi@7e700000 {
+ compatible = "brcm,bcm2835-dsi1";
+ reg = <0x7e700000 0x8c>;
+ interrupts = <2 12>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #clock-cells = <1>;
+
+ clocks = <&clocks BCM2835_PLLD_DSI1>,
+ <&clocks BCM2835_CLOCK_DSI1E>,
+ <&clocks BCM2835_CLOCK_DSI1P>;
+ clock-names = "phy", "escape", "pixel";
+
+ clock-output-names = "dsi1_byte", "dsi1_ddr2", "dsi1_ddr";
+
+ pitouchscreen: panel@0 {
+ compatible = "raspberrypi,touchscreen";
+ reg = <0>;
+
+ /* ... */
+ };
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
new file mode 100644
index 000000000000..834cc5f1c254
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-hdmi.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) HDMI Controller
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+properties:
+ compatible:
+ const: brcm,bcm2835-hdmi
+
+ reg:
+ items:
+ - description: HDMI register range
+ - description: HD register range
+
+ interrupts:
+ minItems: 2
+
+ clocks:
+ items:
+ - description: The HDMI state machine clock
+ - description: The pixel clock
+
+ ddc:
+ allOf:
+ - $ref: /schemas/types.yaml#/definitions/phandle
+ description: >
+ Phandle of the I2C controller used for DDC EDID probing
+
+ hpd-gpios:
+ description: >
+ The GPIO pin for the HDMI hotplug detect (if it doesn't appear
+ as an interrupt/status bit in the HDMI controller itself)
+
+ dmas:
+ maxItems: 1
+ description: >
+ Should contain one entry pointing to the DMA channel used to
+ transfer audio data.
+
+ dma-names:
+ const: audio-rx
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - ddc
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/bcm2835.h>
+ #include <dt-bindings/gpio/gpio.h>
+
+ hdmi: hdmi@7e902000 {
+ compatible = "brcm,bcm2835-hdmi";
+ reg = <0x7e902000 0x600>,
+ <0x7e808000 0x100>;
+ interrupts = <2 8>, <2 9>;
+ ddc = <&i2c2>;
+ hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
+ clocks = <&clocks BCM2835_PLLH_PIX>,
+ <&clocks BCM2835_CLOCK_HSM>;
+ clock-names = "pixel", "hdmi";
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
new file mode 100644
index 000000000000..02410f8d6d49
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-hvs.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) Hardware Video Scaler
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+properties:
+ compatible:
+ const: brcm,bcm2835-hvs
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ hvs@7e400000 {
+ compatible = "brcm,bcm2835-hvs";
+ reg = <0x7e400000 0x6000>;
+ interrupts = <2 1>;
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
new file mode 100644
index 000000000000..e60791db1fa1
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-pixelvalve0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) PixelValve
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+properties:
+ compatible:
+ enum:
+ - brcm,bcm2835-pixelvalve0
+ - brcm,bcm2835-pixelvalve1
+ - brcm,bcm2835-pixelvalve2
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ pixelvalve@7e807000 {
+ compatible = "brcm,bcm2835-pixelvalve2";
+ reg = <0x7e807000 0x100>;
+ interrupts = <2 10>; /* pixelvalve */
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml
new file mode 100644
index 000000000000..bb186197e471
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-txp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) TXP (writeback) Controller
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+properties:
+ compatible:
+ const: brcm,bcm2835-txp
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ txp: txp@7e004000 {
+ compatible = "brcm,bcm2835-txp";
+ reg = <0x7e004000 0x20>;
+ interrupts = <1 11>;
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
new file mode 100644
index 000000000000..8a73780f573d
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
@@ -0,0 +1,42 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-v3d.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) V3D GPU
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+properties:
+ compatible:
+ enum:
+ - brcm,bcm2835-v3d
+ - brcm,cygnus-v3d
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ v3d: v3d@7ec00000 {
+ compatible = "brcm,bcm2835-v3d";
+ reg = <0x7ec00000 0x1000>;
+ interrupts = <1 10>;
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
new file mode 100644
index 000000000000..0dcf0c397375
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
@@ -0,0 +1,34 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-vc4.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) GPU
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+description: >
+ The VC4 device present on the Raspberry Pi includes a display system
+ with HDMI output and the HVS (Hardware Video Scaler) for compositing
+ display planes.
+
+properties:
+ compatible:
+ enum:
+ - brcm,bcm2835-vc4
+ - brcm,cygnus-vc4
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ vc4: gpu {
+ compatible = "brcm,bcm2835-vc4";
+ };
+
+...
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
new file mode 100644
index 000000000000..d900cc57b4ec
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/brcm,bcm2835-vec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom VC4 (VideoCore4) VEC
+
+maintainers:
+ - Eric Anholt <eric@anholt.net>
+
+properties:
+ compatible:
+ const: brcm,bcm2835-vec
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/bcm2835.h>
+
+ vec: vec@7e806000 {
+ compatible = "brcm,bcm2835-vec";
+ reg = <0x7e806000 0x1000>;
+ clocks = <&clocks BCM2835_CLOCK_VEC>;
+ interrupts = <2 27>;
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 9e45ed8be540..a1ab16c8f592 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5698,7 +5698,7 @@ T: git git://github.com/anholt/linux
S: Supported
F: drivers/gpu/drm/vc4/
F: include/uapi/drm/vc4_drm.h
-F: Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
+F: Documentation/devicetree/bindings/display/brcm,bcm2835-*.yaml
T: git git://anongit.freedesktop.org/drm/drm-misc
DRM DRIVERS FOR VIVANTE GPU IP
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 30/89] dt-bindings: display: vc4: dpi: Add missing clock-names property
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (5 preceding siblings ...)
2020-02-24 9:06 ` [PATCH 29/89] dt-bindings: display: Convert VC4 bindings to schemas Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-25 18:17 ` Rob Herring
2020-02-24 9:06 ` [PATCH 31/89] dt-bindings: display: vc4: dsi: Add missing clock properties Maxime Ripard
` (4 subsequent siblings)
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Rob Herring, devicetree
While the device tree and the driver expected a clock-names property, it
wasn't explicitly documented in the previous binding. Make sure it is now.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
index 288494b70e82..58213c564e03 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
@@ -21,6 +21,11 @@ properties:
- description: The core clock the unit runs on
- description: The pixel clock that feeds the pixelvalve
+ clock-names:
+ items:
+ - const: core
+ - const: pixel
+
port:
type: object
description: >
@@ -31,6 +36,7 @@ required:
- compatible
- reg
- clocks
+ - clock-names
- port
additionalProperties: false
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 31/89] dt-bindings: display: vc4: dsi: Add missing clock properties
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (6 preceding siblings ...)
2020-02-24 9:06 ` [PATCH 30/89] dt-bindings: display: vc4: dpi: Add missing clock-names property Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-25 18:18 ` Rob Herring
2020-02-24 9:06 ` [PATCH 32/89] dt-bindings: display: vc4: hdmi: Add missing clock-names property Maxime Ripard
` (3 subsequent siblings)
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Rob Herring, devicetree
While the device tree and the driver expected a clock-names and a
clock-cells properties, it wasn't explicitly documented in the previous
binding. Make sure it is now.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 11 +++++++-
1 file changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
index 3887675f844e..3c643b227a70 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
@@ -10,6 +10,9 @@ maintainers:
- Eric Anholt <eric@anholt.net>
properties:
+ "#clock-cells":
+ const: 1
+
compatible:
enum:
- brcm,bcm2835-dsi0
@@ -24,6 +27,12 @@ properties:
- description: The DSI ESC clock
- description: The DSI pixel clock
+ clock-names:
+ items:
+ - const: phy
+ - const: escape
+ - const: pixel
+
clock-output-names: true
# FIXME: The meta-schemas don't seem to allow it for now
# items:
@@ -35,9 +44,11 @@ properties:
maxItems: 1
required:
+ - "#clock-cells"
- compatible
- reg
- clocks
+ - clock-names
- clock-output-names
- interrupts
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 32/89] dt-bindings: display: vc4: hdmi: Add missing clock-names property
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (7 preceding siblings ...)
2020-02-24 9:06 ` [PATCH 31/89] dt-bindings: display: vc4: dsi: Add missing clock properties Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-25 18:18 ` Rob Herring
2020-02-24 9:06 ` [PATCH 33/89] dt-bindings: display: vc4: Document BCM2711 VC5 Maxime Ripard
` (2 subsequent siblings)
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Rob Herring, devicetree
While the device tree and the driver expected a clock-names property, it
wasn't explicitly documented in the previous binding. The documented order
was wrong too, so make sure clock-names is there and in the proper order.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
index 834cc5f1c254..52b3cdac0bdf 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
@@ -23,8 +23,13 @@ properties:
clocks:
items:
- - description: The HDMI state machine clock
- description: The pixel clock
+ - description: The HDMI state machine clock
+
+ clock-names:
+ items:
+ - const: pixel
+ - const: hdmi
ddc:
allOf:
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 33/89] dt-bindings: display: vc4: Document BCM2711 VC5
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (8 preceding siblings ...)
2020-02-24 9:06 ` [PATCH 32/89] dt-bindings: display: vc4: hdmi: Add missing clock-names property Maxime Ripard
@ 2020-02-24 9:06 ` Maxime Ripard
2020-02-25 18:18 ` Rob Herring
2020-02-24 9:07 ` [PATCH 59/89] dt-bindings: display: vc4: pv: Add BCM2711 pixel valves Maxime Ripard
2020-02-24 9:07 ` [PATCH 88/89] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings Maxime Ripard
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:06 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Rob Herring, devicetree
The BCM2711 comes with a new VideoCore. Add a compatible for it.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
index 0dcf0c397375..49a5e041aa49 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
@@ -17,6 +17,7 @@ description: >
properties:
compatible:
enum:
+ - brcm,bcm2711-vc5
- brcm,bcm2835-vc4
- brcm,cygnus-vc4
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 59/89] dt-bindings: display: vc4: pv: Add BCM2711 pixel valves
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (9 preceding siblings ...)
2020-02-24 9:06 ` [PATCH 33/89] dt-bindings: display: vc4: Document BCM2711 VC5 Maxime Ripard
@ 2020-02-24 9:07 ` Maxime Ripard
2020-02-25 18:19 ` Rob Herring
2020-02-24 9:07 ` [PATCH 88/89] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings Maxime Ripard
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:07 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Rob Herring, devicetree
The BCM2711 comes with other pixelvalves that have different requirements
and capabilities. Let's document their compatible.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
index e60791db1fa1..4e1ba03f6477 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
@@ -15,6 +15,11 @@ properties:
- brcm,bcm2835-pixelvalve0
- brcm,bcm2835-pixelvalve1
- brcm,bcm2835-pixelvalve2
+ - brcm,bcm2711-pixelvalve0
+ - brcm,bcm2711-pixelvalve1
+ - brcm,bcm2711-pixelvalve2
+ - brcm,bcm2711-pixelvalve3
+ - brcm,bcm2711-pixelvalve4
reg:
maxItems: 1
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 88/89] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
` (10 preceding siblings ...)
2020-02-24 9:07 ` [PATCH 59/89] dt-bindings: display: vc4: pv: Add BCM2711 pixel valves Maxime Ripard
@ 2020-02-24 9:07 ` Maxime Ripard
2020-02-25 18:24 ` Rob Herring
11 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-24 9:07 UTC (permalink / raw)
To: Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Rob Herring, devicetree
The HDMI controllers found in the BCM2711 SoC need some adjustments to the
bindings, especially since the registers have been shuffled around in more
register ranges.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 109 insertions(+), 9 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
index 52b3cdac0bdf..a9d24e1cf684 100644
--- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
@@ -11,24 +11,58 @@ maintainers:
properties:
compatible:
- const: brcm,bcm2835-hdmi
+ enum:
+ - brcm,bcm2835-hdmi
+ - brcm,bcm2711-hdmi0
+ - brcm,bcm2711-hdmi1
reg:
+ oneOf:
+ - items:
+ - description: HDMI register range
+ - description: HD register range
+
+ - items:
+ - description: HDMI controller register range
+ - description: DVP register range
+ - description: HDMI PHY register range
+ - description: Rate Manager register range
+ - description: Packet RAM register range
+ - description: Metadata RAM register range
+ - description: CSC register range
+ - description: CEC register range
+ - description: HD register range
+
+ reg-names:
items:
- - description: HDMI register range
- - description: HD register range
+ - const: hdmi
+ - const: dvp
+ - const: phy
+ - const: rm
+ - const: packet
+ - const: metadata
+ - const: csc
+ - const: cec
+ - const: hd
interrupts:
minItems: 2
clocks:
- items:
- - description: The pixel clock
- - description: The HDMI state machine clock
+ oneOf:
+ - items:
+ - description: The pixel clock
+ - description: The HDMI state machine clock
+
+ - items:
+ - description: The HDMI state machine clock
clock-names:
- items:
- - const: pixel
+ oneOf:
+ - items:
+ - const: pixel
+ - const: hdmi
+
- const: hdmi
ddc:
@@ -51,15 +85,54 @@ properties:
dma-names:
const: audio-rx
+ resets:
+ maxItems: 1
+
required:
- compatible
- reg
- - interrupts
- clocks
- ddc
additionalProperties: false
+if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - brcm,bcm2711-hdmi0
+ - brcm,bcm2711-hdmi1
+
+then:
+ properties:
+ reg:
+ minItems: 9
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ maxItems: 1
+
+ required:
+ - reg-names
+ - resets
+
+else:
+ properties:
+ reg:
+ maxItems: 2
+
+ clocks:
+ minItems: 2
+
+ clock-names:
+ minItems: 2
+
+ required:
+ - interrupts
+
examples:
- |
#include <dt-bindings/clock/bcm2835.h>
@@ -77,4 +150,31 @@ examples:
clock-names = "pixel", "hdmi";
};
+ - |
+ hdmi0: hdmi@7ef00700 {
+ compatible = "brcm,bcm2711-hdmi0";
+ reg = <0x7ef00700 0x300>,
+ <0x7ef00300 0x200>,
+ <0x7ef00f00 0x80>,
+ <0x7ef00f80 0x80>,
+ <0x7ef01b00 0x200>,
+ <0x7ef01f00 0x400>,
+ <0x7ef00200 0x80>,
+ <0x7ef04300 0x100>,
+ <0x7ef20000 0x100>;
+ reg-names = "hdmi",
+ "dvp",
+ "phy",
+ "rm",
+ "packet",
+ "metadata",
+ "csc",
+ "cec",
+ "hd";
+ clocks = <&firmware_clocks 13>;
+ clock-names = "hdmi";
+ resets = <&dvp 0>;
+ ddc = <&ddc0>;
+ };
+
...
--
git-series 0.9.1
^ permalink raw reply related [flat|nested] 34+ messages in thread
* Re: [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema
2020-02-24 9:06 ` [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema Maxime Ripard
@ 2020-02-24 17:40 ` Florian Fainelli
2020-02-25 18:14 ` Rob Herring
` (2 subsequent siblings)
3 siblings, 0 replies; 34+ messages in thread
From: Florian Fainelli @ 2020-02-24 17:40 UTC (permalink / raw)
To: Maxime Ripard, Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Kamal Dasu, Florian Fainelli, Rob Herring,
Wolfram Sang, linux-i2c, devicetree
On 2/24/20 1:06 AM, Maxime Ripard wrote:
> Switch the DT binding to a YAML schema to enable the DT validation.
>
> Cc: Kamal Dasu <kdasu.kdev@gmail.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding
2020-02-24 9:06 ` [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding Maxime Ripard
@ 2020-02-24 17:48 ` Florian Fainelli
2020-02-25 18:15 ` Rob Herring
2020-03-10 10:07 ` Wolfram Sang
2 siblings, 0 replies; 34+ messages in thread
From: Florian Fainelli @ 2020-02-24 17:48 UTC (permalink / raw)
To: Maxime Ripard, Nicolas Saenz Julienne, Eric Anholt
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Kamal Dasu, Florian Fainelli, Rob Herring,
Wolfram Sang, linux-i2c, devicetree
On 2/24/20 1:06 AM, Maxime Ripard wrote:
> The HDMI blocks in the BCM2771 have an i2c controller to retrieve the
> EDID. This block is split into two parts, the BSC and the AUTO_I2C,
> lying in two separate register areas.
>
> The AUTO_I2C block has a mailbox-like interface and will take away the
> BSC control from the CPU if enabled. However, the BSC is the actually
> the same controller than the one supported by the brcmstb driver, and
> the AUTO_I2C doesn't really bring any immediate benefit.
>
> We can model it in the DT as a single device with two register range,
> which will allow us to use or or the other in the driver without
> changing anything in the DT.
>
> Cc: Kamal Dasu <kdasu.kdev@gmail.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 29/89] dt-bindings: display: Convert VC4 bindings to schemas
2020-02-24 9:06 ` [PATCH 29/89] dt-bindings: display: Convert VC4 bindings to schemas Maxime Ripard
@ 2020-02-24 18:41 ` Rob Herring
2020-02-25 11:54 ` Maxime Ripard
0 siblings, 1 reply; 34+ messages in thread
From: Rob Herring @ 2020-02-24 18:41 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Maxime Ripard, devicetree
On Mon, 24 Feb 2020 10:06:31 +0100, Maxime Ripard wrote:
> The BCM283x SoCs have a display pipeline composed of several controllers
> with device tree bindings that are supported by Linux.
>
> Now that we have the DT validation in place, let's split into separate
> files and convert the device tree bindings for those controllers to
> schemas.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 174 +------------------------------------------------------------------------
> Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml | 66 +++++++++++++++++++++++++++-
> Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 73 ++++++++++++++++++++++++++++++-
> Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 75 +++++++++++++++++++++++++++++++-
> Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml | 37 +++++++++++++++-
> Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml | 40 +++++++++++++++++-
> Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml | 37 +++++++++++++++-
> Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml | 42 +++++++++++++++++-
> Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml | 34 ++++++++++++++-
> Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml | 44 ++++++++++++++++++-
> MAINTAINERS | 2 +-
> 11 files changed, 449 insertions(+), 175 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
> create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
warning: no schema found in file: Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml: ignoring, error in schema: properties
Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml: properties: '#clock-cells' is a dependency of 'clock-output-names'
Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.example.dts' failed
make[1]: *** [Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.example.dts] Error 1
Makefile:1263: recipe for target 'dt_binding_check' failed
make: *** [dt_binding_check] Error 2
See https://patchwork.ozlabs.org/patch/1242907
Please check and re-submit.
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 29/89] dt-bindings: display: Convert VC4 bindings to schemas
2020-02-24 18:41 ` Rob Herring
@ 2020-02-25 11:54 ` Maxime Ripard
2020-02-25 14:02 ` Rob Herring
0 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-02-25 11:54 UTC (permalink / raw)
To: Rob Herring
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, devicetree
[-- Attachment #1: Type: text/plain, Size: 4072 bytes --]
Hi Rob,
On Mon, Feb 24, 2020 at 12:41:07PM -0600, Rob Herring wrote:
> On Mon, 24 Feb 2020 10:06:31 +0100, Maxime Ripard wrote:
> > The BCM283x SoCs have a display pipeline composed of several controllers
> > with device tree bindings that are supported by Linux.
> >
> > Now that we have the DT validation in place, let's split into separate
> > files and convert the device tree bindings for those controllers to
> > schemas.
> >
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: devicetree@vger.kernel.org
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > ---
> > Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 174 +------------------------------------------------------------------------
> > Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml | 66 +++++++++++++++++++++++++++-
> > Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 73 ++++++++++++++++++++++++++++++-
> > Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 75 +++++++++++++++++++++++++++++++-
> > Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml | 37 +++++++++++++++-
> > Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml | 40 +++++++++++++++++-
> > Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml | 37 +++++++++++++++-
> > Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml | 42 +++++++++++++++++-
> > Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml | 34 ++++++++++++++-
> > Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml | 44 ++++++++++++++++++-
> > MAINTAINERS | 2 +-
> > 11 files changed, 449 insertions(+), 175 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
> > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> warning: no schema found in file: Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml: ignoring, error in schema: properties
> Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
> /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml: properties: '#clock-cells' is a dependency of 'clock-output-names'
> Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.example.dts' failed
> make[1]: *** [Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.example.dts] Error 1
> Makefile:1263: recipe for target 'dt_binding_check' failed
> make: *** [dt_binding_check] Error 2
>
> See https://patchwork.ozlabs.org/patch/1242907
> Please check and re-submit.
Yeah, that was fixed in patch 31 ("dt-bindings: display: vc4: dsi: Add
missing clock properties"). I'm not quite sure what the preferred
approach here would be: I did a conversion as is of the binding, and
then fixed it, or do you prefer having it all in the same patch?
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 29/89] dt-bindings: display: Convert VC4 bindings to schemas
2020-02-25 11:54 ` Maxime Ripard
@ 2020-02-25 14:02 ` Rob Herring
0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 14:02 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel,
moderated list:BROADCOM BCM2835 ARM ARCHITECTURE,
maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
linux-kernel@vger.kernel.org, Dave Stevenson, Tim Gover,
Phil Elwell, devicetree
On Tue, Feb 25, 2020 at 5:54 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> Hi Rob,
>
> On Mon, Feb 24, 2020 at 12:41:07PM -0600, Rob Herring wrote:
> > On Mon, 24 Feb 2020 10:06:31 +0100, Maxime Ripard wrote:
> > > The BCM283x SoCs have a display pipeline composed of several controllers
> > > with device tree bindings that are supported by Linux.
> > >
> > > Now that we have the DT validation in place, let's split into separate
> > > files and convert the device tree bindings for those controllers to
> > > schemas.
> > >
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: devicetree@vger.kernel.org
> > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > ---
> > > Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt | 174 +------------------------------------------------------------------------
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml | 66 +++++++++++++++++++++++++++-
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 73 ++++++++++++++++++++++++++++++-
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 75 +++++++++++++++++++++++++++++++-
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml | 37 +++++++++++++++-
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml | 40 +++++++++++++++++-
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml | 37 +++++++++++++++-
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml | 42 +++++++++++++++++-
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml | 34 ++++++++++++++-
> > > Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml | 44 ++++++++++++++++++-
> > > MAINTAINERS | 2 +-
> > > 11 files changed, 449 insertions(+), 175 deletions(-)
> > > delete mode 100644 Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-hvs.yaml
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-txp.yaml
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-v3d.yaml
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml
> > > create mode 100644 Documentation/devicetree/bindings/display/brcm,bcm2835-vec.yaml
> > >
> >
> > My bot found errors running 'make dt_binding_check' on your patch:
> >
> > warning: no schema found in file: Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml
> > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml: ignoring, error in schema: properties
> > Documentation/devicetree/bindings/display/simple-framebuffer.example.dts:21.16-37.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node
> > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml: properties: '#clock-cells' is a dependency of 'clock-output-names'
> > Documentation/devicetree/bindings/Makefile:12: recipe for target 'Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.example.dts' failed
> > make[1]: *** [Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.example.dts] Error 1
> > Makefile:1263: recipe for target 'dt_binding_check' failed
> > make: *** [dt_binding_check] Error 2
> >
> > See https://patchwork.ozlabs.org/patch/1242907
> > Please check and re-submit.
>
> Yeah, that was fixed in patch 31 ("dt-bindings: display: vc4: dsi: Add
> missing clock properties"). I'm not quite sure what the preferred
> approach here would be: I did a conversion as is of the binding, and
> then fixed it, or do you prefer having it all in the same patch?
A note in this patch should be enough. I do review these before
sending them. I was puzzled having one from you fail.
Rob
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema
2020-02-24 9:06 ` [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema Maxime Ripard
2020-02-24 17:40 ` Florian Fainelli
@ 2020-02-25 18:14 ` Rob Herring
2020-03-10 10:07 ` Wolfram Sang
2020-03-10 10:07 ` Wolfram Sang
3 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:14 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, devicetree, Florian Fainelli,
Tim Gover, Dave Stevenson, Wolfram Sang, Kamal Dasu, linux-kernel,
dri-devel, linux-i2c, bcm-kernel-feedback-list, linux-rpi-kernel,
Phil Elwell, linux-arm-kernel, Maxime Ripard
On Mon, 24 Feb 2020 10:06:03 +0100, Maxime Ripard wrote:
> Switch the DT binding to a YAML schema to enable the DT validation.
>
> Cc: Kamal Dasu <kdasu.kdev@gmail.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml | 59 +++++++-
> Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt | 26 +---
> MAINTAINERS | 2 +-
> 3 files changed, 60 insertions(+), 27 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml
> delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-brcmstb.txt
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding
2020-02-24 9:06 ` [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding Maxime Ripard
2020-02-24 17:48 ` Florian Fainelli
@ 2020-02-25 18:15 ` Rob Herring
2020-03-10 10:07 ` Wolfram Sang
2 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:15 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, devicetree, Florian Fainelli,
Tim Gover, Dave Stevenson, Wolfram Sang, Kamal Dasu, linux-kernel,
dri-devel, linux-i2c, bcm-kernel-feedback-list, linux-rpi-kernel,
Phil Elwell, linux-arm-kernel, Maxime Ripard
On Mon, 24 Feb 2020 10:06:04 +0100, Maxime Ripard wrote:
> The HDMI blocks in the BCM2771 have an i2c controller to retrieve the
> EDID. This block is split into two parts, the BSC and the AUTO_I2C,
> lying in two separate register areas.
>
> The AUTO_I2C block has a mailbox-like interface and will take away the
> BSC control from the CPU if enabled. However, the BSC is the actually
> the same controller than the one supported by the brcmstb driver, and
> the AUTO_I2C doesn't really bring any immediate benefit.
>
> We can model it in the DT as a single device with two register range,
> which will allow us to use or or the other in the driver without
> changing anything in the DT.
>
> Cc: Kamal Dasu <kdasu.kdev@gmail.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/i2c/brcm,brcmstb-i2c.yaml | 40 ++++++-
> 1 file changed, 39 insertions(+), 1 deletion(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 06/89] dt-bindings: clock: Add a binding for the RPi Firmware clocks
2020-02-24 9:06 ` [PATCH 06/89] dt-bindings: clock: Add a binding for the RPi Firmware clocks Maxime Ripard
@ 2020-02-25 18:16 ` Rob Herring
2020-03-12 23:14 ` Stephen Boyd
0 siblings, 1 reply; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:16 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, devicetree, Tim Gover,
Dave Stevenson, Stephen Boyd, Michael Turquette, linux-kernel,
dri-devel, linux-clk, bcm-kernel-feedback-list, linux-rpi-kernel,
Phil Elwell, linux-arm-kernel
On Mon, Feb 24, 2020 at 10:06:08AM +0100, Maxime Ripard wrote:
> The firmare running on the RPi VideoCore can be used to discover and
> change the various clocks running in the BCM2711. Since devices will
> need to use them through the DT, let's add a pretty simple binding.
>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: linux-clk@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
>
> diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml b/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
> new file mode 100644
> index 000000000000..d37bc311321d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/raspberrypi,firmware-clocks.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: RaspberryPi Firmware Clocks Device Tree Bindings
> +
> +maintainers:
> + - Maxime Ripard <mripard@kernel.org>
> +
> +properties:
> + "#clock-cells":
> + const: 1
> +
> + compatible:
> + const: raspberrypi,firmware-clocks
> +
> + raspberrypi,firmware:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: >
> + Phandle to the mailbox node to communicate with the firmware.
Can't this be a child node of the phandle instead? Or just add
'#clock-cells' to the firmware node.
> +
> +required:
> + - "#clock-cells"
> + - compatible
> + - raspberrypi,firmware
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + firmware_clocks: firmware-clocks {
> + compatible = "raspberrypi,firmware-clocks";
> + raspberrypi,firmware = <&firmware>;
> + #clock-cells = <1>;
> + };
> +
> +...
> --
> git-series 0.9.1
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 26/89] dt-bindings: clock: Add BCM2711 DVP binding
2020-02-24 9:06 ` [PATCH 26/89] dt-bindings: clock: Add BCM2711 DVP binding Maxime Ripard
@ 2020-02-25 18:17 ` Rob Herring
0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:17 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Maxime Ripard,
Philipp Zabel, devicetree
On Mon, 24 Feb 2020 10:06:28 +0100, Maxime Ripard wrote:
> The BCM2711 has a unit controlling the HDMI0 and HDMI1 clock and reset
> signals. Let's add a binding for it.
>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/clock/brcm,bcm2711-dvp.yaml | 47 +++++++-
> 1 file changed, 47 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/brcm,bcm2711-dvp.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 30/89] dt-bindings: display: vc4: dpi: Add missing clock-names property
2020-02-24 9:06 ` [PATCH 30/89] dt-bindings: display: vc4: dpi: Add missing clock-names property Maxime Ripard
@ 2020-02-25 18:17 ` Rob Herring
0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:17 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Maxime Ripard, devicetree
On Mon, 24 Feb 2020 10:06:32 +0100, Maxime Ripard wrote:
> While the device tree and the driver expected a clock-names property, it
> wasn't explicitly documented in the previous binding. Make sure it is now.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/display/brcm,bcm2835-dpi.yaml | 6 ++++++
> 1 file changed, 6 insertions(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 31/89] dt-bindings: display: vc4: dsi: Add missing clock properties
2020-02-24 9:06 ` [PATCH 31/89] dt-bindings: display: vc4: dsi: Add missing clock properties Maxime Ripard
@ 2020-02-25 18:18 ` Rob Herring
0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:18 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Maxime Ripard, devicetree
On Mon, 24 Feb 2020 10:06:33 +0100, Maxime Ripard wrote:
> While the device tree and the driver expected a clock-names and a
> clock-cells properties, it wasn't explicitly documented in the previous
> binding. Make sure it is now.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 11 +++++++-
> 1 file changed, 11 insertions(+)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 32/89] dt-bindings: display: vc4: hdmi: Add missing clock-names property
2020-02-24 9:06 ` [PATCH 32/89] dt-bindings: display: vc4: hdmi: Add missing clock-names property Maxime Ripard
@ 2020-02-25 18:18 ` Rob Herring
0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:18 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Maxime Ripard, devicetree
On Mon, 24 Feb 2020 10:06:34 +0100, Maxime Ripard wrote:
> While the device tree and the driver expected a clock-names property, it
> wasn't explicitly documented in the previous binding. The documented order
> was wrong too, so make sure clock-names is there and in the proper order.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 33/89] dt-bindings: display: vc4: Document BCM2711 VC5
2020-02-24 9:06 ` [PATCH 33/89] dt-bindings: display: vc4: Document BCM2711 VC5 Maxime Ripard
@ 2020-02-25 18:18 ` Rob Herring
0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:18 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Maxime Ripard, devicetree
On Mon, 24 Feb 2020 10:06:35 +0100, Maxime Ripard wrote:
> The BCM2711 comes with a new VideoCore. Add a compatible for it.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 59/89] dt-bindings: display: vc4: pv: Add BCM2711 pixel valves
2020-02-24 9:07 ` [PATCH 59/89] dt-bindings: display: vc4: pv: Add BCM2711 pixel valves Maxime Ripard
@ 2020-02-25 18:19 ` Rob Herring
0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:19 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Maxime Ripard, devicetree
On Mon, 24 Feb 2020 10:07:01 +0100, Maxime Ripard wrote:
> The BCM2711 comes with other pixelvalves that have different requirements
> and capabilities. Let's document their compatible.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/display/brcm,bcm2835-pixelvalve0.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 88/89] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings
2020-02-24 9:07 ` [PATCH 88/89] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings Maxime Ripard
@ 2020-02-25 18:24 ` Rob Herring
0 siblings, 0 replies; 34+ messages in thread
From: Rob Herring @ 2020-02-25 18:24 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, devicetree
On Mon, Feb 24, 2020 at 10:07:30AM +0100, Maxime Ripard wrote:
> The HDMI controllers found in the BCM2711 SoC need some adjustments to the
> bindings, especially since the registers have been shuffled around in more
> register ranges.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
> 1 file changed, 109 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
> index 52b3cdac0bdf..a9d24e1cf684 100644
> --- a/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
> +++ b/Documentation/devicetree/bindings/display/brcm,bcm2835-hdmi.yaml
> @@ -11,24 +11,58 @@ maintainers:
>
> properties:
> compatible:
> - const: brcm,bcm2835-hdmi
> + enum:
> + - brcm,bcm2835-hdmi
> + - brcm,bcm2711-hdmi0
> + - brcm,bcm2711-hdmi1
>
> reg:
> + oneOf:
> + - items:
> + - description: HDMI register range
> + - description: HD register range
> +
> + - items:
> + - description: HDMI controller register range
> + - description: DVP register range
> + - description: HDMI PHY register range
> + - description: Rate Manager register range
> + - description: Packet RAM register range
> + - description: Metadata RAM register range
> + - description: CSC register range
> + - description: CEC register range
> + - description: HD register range
> +
> + reg-names:
> items:
> - - description: HDMI register range
> - - description: HD register range
> + - const: hdmi
> + - const: dvp
> + - const: phy
> + - const: rm
> + - const: packet
> + - const: metadata
> + - const: csc
> + - const: cec
> + - const: hd
Don't you want 'hd' 2nd or need to define the 2 entry case separately?
Really, I think this should be 2 files. All but interrupts and ddc have
a difference.
>
> interrupts:
> minItems: 2
>
> clocks:
> - items:
> - - description: The pixel clock
> - - description: The HDMI state machine clock
> + oneOf:
> + - items:
> + - description: The pixel clock
> + - description: The HDMI state machine clock
> +
> + - items:
> + - description: The HDMI state machine clock
>
> clock-names:
> - items:
> - - const: pixel
> + oneOf:
> + - items:
> + - const: pixel
> + - const: hdmi
> +
> - const: hdmi
>
> ddc:
> @@ -51,15 +85,54 @@ properties:
> dma-names:
> const: audio-rx
>
> + resets:
> + maxItems: 1
> +
> required:
> - compatible
> - reg
> - - interrupts
> - clocks
> - ddc
>
> additionalProperties: false
>
> +if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - brcm,bcm2711-hdmi0
> + - brcm,bcm2711-hdmi1
> +
> +then:
> + properties:
> + reg:
> + minItems: 9
> +
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + maxItems: 1
> +
> + required:
> + - reg-names
> + - resets
> +
> +else:
> + properties:
> + reg:
> + maxItems: 2
> +
> + clocks:
> + minItems: 2
> +
> + clock-names:
> + minItems: 2
> +
> + required:
> + - interrupts
> +
> examples:
> - |
> #include <dt-bindings/clock/bcm2835.h>
> @@ -77,4 +150,31 @@ examples:
> clock-names = "pixel", "hdmi";
> };
>
> + - |
> + hdmi0: hdmi@7ef00700 {
> + compatible = "brcm,bcm2711-hdmi0";
> + reg = <0x7ef00700 0x300>,
> + <0x7ef00300 0x200>,
> + <0x7ef00f00 0x80>,
> + <0x7ef00f80 0x80>,
> + <0x7ef01b00 0x200>,
> + <0x7ef01f00 0x400>,
> + <0x7ef00200 0x80>,
> + <0x7ef04300 0x100>,
> + <0x7ef20000 0x100>;
> + reg-names = "hdmi",
> + "dvp",
> + "phy",
> + "rm",
> + "packet",
> + "metadata",
> + "csc",
> + "cec",
> + "hd";
> + clocks = <&firmware_clocks 13>;
> + clock-names = "hdmi";
> + resets = <&dvp 0>;
> + ddc = <&ddc0>;
> + };
> +
> ...
> --
> git-series 0.9.1
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema
2020-02-24 9:06 ` [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema Maxime Ripard
2020-02-24 17:40 ` Florian Fainelli
2020-02-25 18:14 ` Rob Herring
@ 2020-03-10 10:07 ` Wolfram Sang
2020-03-10 10:07 ` Wolfram Sang
3 siblings, 0 replies; 34+ messages in thread
From: Wolfram Sang @ 2020-03-10 10:07 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Kamal Dasu,
Florian Fainelli, Rob Herring, linux-i2c, devicetree
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On Mon, Feb 24, 2020 at 10:06:03AM +0100, Maxime Ripard wrote:
> Switch the DT binding to a YAML schema to enable the DT validation.
>
> Cc: Kamal Dasu <kdasu.kdev@gmail.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
I didn't get the cover letter, so I assume I shall pick the I2C patches.
Please let me have the cover letter next time.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema
2020-02-24 9:06 ` [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema Maxime Ripard
` (2 preceding siblings ...)
2020-03-10 10:07 ` Wolfram Sang
@ 2020-03-10 10:07 ` Wolfram Sang
3 siblings, 0 replies; 34+ messages in thread
From: Wolfram Sang @ 2020-03-10 10:07 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Kamal Dasu,
Florian Fainelli, Rob Herring, linux-i2c, devicetree
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
On Mon, Feb 24, 2020 at 10:06:03AM +0100, Maxime Ripard wrote:
> Switch the DT binding to a YAML schema to enable the DT validation.
>
> Cc: Kamal Dasu <kdasu.kdev@gmail.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding
2020-02-24 9:06 ` [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding Maxime Ripard
2020-02-24 17:48 ` Florian Fainelli
2020-02-25 18:15 ` Rob Herring
@ 2020-03-10 10:07 ` Wolfram Sang
2 siblings, 0 replies; 34+ messages in thread
From: Wolfram Sang @ 2020-03-10 10:07 UTC (permalink / raw)
To: Maxime Ripard
Cc: Nicolas Saenz Julienne, Eric Anholt, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Kamal Dasu,
Florian Fainelli, Rob Herring, linux-i2c, devicetree
[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]
On Mon, Feb 24, 2020 at 10:06:04AM +0100, Maxime Ripard wrote:
> The HDMI blocks in the BCM2771 have an i2c controller to retrieve the
> EDID. This block is split into two parts, the BSC and the AUTO_I2C,
> lying in two separate register areas.
>
> The AUTO_I2C block has a mailbox-like interface and will take away the
> BSC control from the CPU if enabled. However, the BSC is the actually
> the same controller than the one supported by the brcmstb driver, and
> the AUTO_I2C doesn't really bring any immediate benefit.
>
> We can model it in the DT as a single device with two register range,
> which will allow us to use or or the other in the driver without
> changing anything in the DT.
>
> Cc: Kamal Dasu <kdasu.kdev@gmail.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: bcm-kernel-feedback-list@broadcom.com
> Cc: linux-i2c@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 06/89] dt-bindings: clock: Add a binding for the RPi Firmware clocks
2020-02-25 18:16 ` Rob Herring
@ 2020-03-12 23:14 ` Stephen Boyd
0 siblings, 0 replies; 34+ messages in thread
From: Stephen Boyd @ 2020-03-12 23:14 UTC (permalink / raw)
To: Maxime Ripard, Rob Herring
Cc: Nicolas Saenz Julienne, Eric Anholt, devicetree, Tim Gover,
Dave Stevenson, Michael Turquette, linux-kernel, dri-devel,
linux-clk, bcm-kernel-feedback-list, linux-rpi-kernel,
Phil Elwell, linux-arm-kernel
Quoting Rob Herring (2020-02-25 10:16:54)
> On Mon, Feb 24, 2020 at 10:06:08AM +0100, Maxime Ripard wrote:
> > The firmare running on the RPi VideoCore can be used to discover and
> > change the various clocks running in the BCM2711. Since devices will
> > need to use them through the DT, let's add a pretty simple binding.
> >
> > Cc: Michael Turquette <mturquette@baylibre.com>
> > Cc: Stephen Boyd <sboyd@kernel.org>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: linux-clk@vger.kernel.org
> > Cc: devicetree@vger.kernel.org
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > ---
> > Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml | 39 +++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 39 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml b/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
> > new file mode 100644
> > index 000000000000..d37bc311321d
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/raspberrypi,firmware-clocks.yaml
> > @@ -0,0 +1,39 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/clock/raspberrypi,firmware-clocks.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: RaspberryPi Firmware Clocks Device Tree Bindings
> > +
> > +maintainers:
> > + - Maxime Ripard <mripard@kernel.org>
> > +
> > +properties:
> > + "#clock-cells":
> > + const: 1
> > +
> > + compatible:
> > + const: raspberrypi,firmware-clocks
> > +
> > + raspberrypi,firmware:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > + description: >
> > + Phandle to the mailbox node to communicate with the firmware.
>
> Can't this be a child node of the phandle instead? Or just add
> '#clock-cells' to the firmware node.
Yeah, just add the clock-cells to the firmware node unless that doesn't
work for some reason?
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver
2020-02-24 9:06 ` [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver Maxime Ripard
@ 2020-03-13 1:00 ` Stephen Boyd
2020-03-23 10:56 ` Maxime Ripard
0 siblings, 1 reply; 34+ messages in thread
From: Stephen Boyd @ 2020-03-13 1:00 UTC (permalink / raw)
To: Eric Anholt, Maxime Ripard, Nicolas Saenz Julienne
Cc: dri-devel, linux-rpi-kernel, bcm-kernel-feedback-list,
linux-arm-kernel, linux-kernel, Dave Stevenson, Tim Gover,
Phil Elwell, Maxime Ripard, Michael Turquette, Rob Herring,
linux-clk, devicetree
Quoting Maxime Ripard (2020-02-24 01:06:29)
> diff --git a/drivers/clk/bcm/clk-bcm2711-dvp.c b/drivers/clk/bcm/clk-bcm2711-dvp.c
> new file mode 100644
> index 000000000000..f4773cc92724
> --- /dev/null
> +++ b/drivers/clk/bcm/clk-bcm2711-dvp.c
> @@ -0,0 +1,113 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +// Copyright 2020 Cerno
> +
> +#include <linux/clk-provider.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/reset-controller.h>
> +#include <linux/reset/reset-simple.h>
> +
> +#define DVP_HT_RPI_SW_INIT 0x04
> +#define DVP_HT_RPI_MISC_CONFIG 0x08
> +
> +#define NR_CLOCKS 2
> +#define NR_RESETS 6
> +
> +struct clk_dvp {
> + struct clk *clks[NR_CLOCKS];
> + struct clk_onecell_data clk_data;
> + struct reset_simple_data reset;
> +};
> +
> +static int clk_dvp_probe(struct platform_device *pdev)
> +{
> + struct resource *res;
> + struct clk_dvp *dvp;
> + void __iomem *base;
> + const char *parent;
> + int ret;
> +
> + dvp = devm_kzalloc(&pdev->dev, sizeof(*dvp), GFP_KERNEL);
> + if (!dvp)
> + return -ENOMEM;
> + platform_set_drvdata(pdev, dvp);
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(base))
> + return PTR_ERR(base);
> +
> + dvp->reset.rcdev.owner = THIS_MODULE;
> + dvp->reset.rcdev.nr_resets = NR_RESETS;
> + dvp->reset.rcdev.ops = &reset_simple_ops;
> + dvp->reset.rcdev.of_node = pdev->dev.of_node;
> + dvp->reset.membase = base + DVP_HT_RPI_SW_INIT;
> + spin_lock_init(&dvp->reset.lock);
> +
> + ret = reset_controller_register(&dvp->reset.rcdev);
> + if (ret)
> + return ret;
> +
> + parent = of_clk_get_parent_name(pdev->dev.of_node, 0);
> + if (!parent)
> + goto unregister_reset;
> +
> + dvp->clks[0] = clk_register_gate(&pdev->dev, "hdmi0-108MHz",
> + parent, CLK_IS_CRITICAL,
> + base + DVP_HT_RPI_MISC_CONFIG, 3,
> + CLK_GATE_SET_TO_DISABLE, &dvp->reset.lock);
> + if (IS_ERR(dvp->clks[0])) {
> + ret = PTR_ERR(dvp->clks[0]);
> + goto unregister_reset;
> + }
> +
> + dvp->clks[1] = clk_register_gate(&pdev->dev, "hdmi1-108MHz",
> + parent, CLK_IS_CRITICAL,
> + base + DVP_HT_RPI_MISC_CONFIG, 4,
> + CLK_GATE_SET_TO_DISABLE, &dvp->reset.lock);
Can we use clk_hw APIs, document why CLK_IS_CRITICAL, and use something
like clk_hw_register_gate_parent_data() so that we don't have to use
of_clk_get_parent_name() above?
> + if (IS_ERR(dvp->clks[1])) {
> + ret = PTR_ERR(dvp->clks[1]);
> + goto unregister_clk0;
> + }
> +
> + dvp->clk_data.clks = dvp->clks;
> + dvp->clk_data.clk_num = NR_CLOCKS;
> + of_clk_add_provider(pdev->dev.of_node, of_clk_src_onecell_get,
> + &dvp->clk_data);
This can fail. Please recover. Also, please use clk_hw based APIs.
> +
> + return 0;
> +
> +
> +unregister_clk0:
> + clk_unregister_gate(dvp->clks[0]);
> +
> +unregister_reset:
> + reset_controller_unregister(&dvp->reset.rcdev);
> + return ret;
> +};
> +
> +static int clk_dvp_remove(struct platform_device *pdev)
> +{
> + struct clk_dvp *dvp = platform_get_drvdata(pdev);
> +
> + clk_unregister_gate(dvp->clks[1]);
> + clk_unregister_gate(dvp->clks[0]);
> + reset_controller_unregister(&dvp->reset.rcdev);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id clk_dvp_dt_ids[] = {
> + { .compatible = "brcm,brcm2711-dvp", },
> + { /* sentinel */ },
Please drop comma after this so we can't put anything after lest it
cause a compiler error.
> +};
> +
> +static struct platform_driver clk_dvp_driver = {
> + .probe = clk_dvp_probe,
> + .remove = clk_dvp_remove,
> + .driver = {
> + .name = "brcm2711-dvp",
> + .of_match_table = clk_dvp_dt_ids,
> + },
> +};
> +module_platform_driver(clk_dvp_driver);
> --
> git-series 0.9.1
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver
2020-03-13 1:00 ` Stephen Boyd
@ 2020-03-23 10:56 ` Maxime Ripard
2020-03-25 2:20 ` Stephen Boyd
0 siblings, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2020-03-23 10:56 UTC (permalink / raw)
To: Stephen Boyd
Cc: Eric Anholt, Nicolas Saenz Julienne, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Michael Turquette,
Rob Herring, linux-clk, devicetree
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
Hi Stephen,
On Thu, Mar 12, 2020 at 06:00:59PM -0700, Stephen Boyd wrote:
> > + dvp->clks[1] = clk_register_gate(&pdev->dev, "hdmi1-108MHz",
> > + parent, CLK_IS_CRITICAL,
> > + base + DVP_HT_RPI_MISC_CONFIG, 4,
> > + CLK_GATE_SET_TO_DISABLE, &dvp->reset.lock);
>
> Can we use clk_hw APIs, document why CLK_IS_CRITICAL, and use something
> like clk_hw_register_gate_parent_data() so that we don't have to use
> of_clk_get_parent_name() above?
That function is new to me, and I'm not sure how I'm supposed to use it?
It looks like clk_hw_register_gate, clk_hw_register_gate_parent_hw and
clk_hw_register_gate_parent_data all call __clk_hw_register_gate with
the same arguments, each expecting the parent_name, so they look
equivalent?
It looks like the original intent was to have the parent name, clk_hw
or clk_parent_data as argument, but the macro itself was copy pasted
without changing the arguments it's calling __clk_hw_register_gate
with?
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver
2020-03-23 10:56 ` Maxime Ripard
@ 2020-03-25 2:20 ` Stephen Boyd
0 siblings, 0 replies; 34+ messages in thread
From: Stephen Boyd @ 2020-03-25 2:20 UTC (permalink / raw)
To: Maxime Ripard
Cc: Eric Anholt, Nicolas Saenz Julienne, dri-devel, linux-rpi-kernel,
bcm-kernel-feedback-list, linux-arm-kernel, linux-kernel,
Dave Stevenson, Tim Gover, Phil Elwell, Michael Turquette,
Rob Herring, linux-clk, devicetree
Quoting Maxime Ripard (2020-03-23 03:56:16)
> Hi Stephen,
>
> On Thu, Mar 12, 2020 at 06:00:59PM -0700, Stephen Boyd wrote:
> > > + dvp->clks[1] = clk_register_gate(&pdev->dev, "hdmi1-108MHz",
> > > + parent, CLK_IS_CRITICAL,
> > > + base + DVP_HT_RPI_MISC_CONFIG, 4,
> > > + CLK_GATE_SET_TO_DISABLE, &dvp->reset.lock);
> >
> > Can we use clk_hw APIs, document why CLK_IS_CRITICAL, and use something
> > like clk_hw_register_gate_parent_data() so that we don't have to use
> > of_clk_get_parent_name() above?
>
> That function is new to me, and I'm not sure how I'm supposed to use it?
>
> It looks like clk_hw_register_gate, clk_hw_register_gate_parent_hw and
> clk_hw_register_gate_parent_data all call __clk_hw_register_gate with
> the same arguments, each expecting the parent_name, so they look
> equivalent?
>
> It looks like the original intent was to have the parent name, clk_hw
> or clk_parent_data as argument, but the macro itself was copy pasted
> without changing the arguments it's calling __clk_hw_register_gate
> with?
>
Yeah! It looks like nobody has tried to use it yet so you've come across
that problem where nobody reviews things and I just merge it anyway.
I'll send a fix shortly.
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2020-03-25 2:20 UTC | newest]
Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.6c896ace9a5a7840e9cec008b553cbb004ca1f91.1582533919.git-series.maxime@cerno.tech>
2020-02-24 9:06 ` [PATCH 01/89] dt-bindings: i2c: brcmstb: Convert the BRCMSTB binding to a schema Maxime Ripard
2020-02-24 17:40 ` Florian Fainelli
2020-02-25 18:14 ` Rob Herring
2020-03-10 10:07 ` Wolfram Sang
2020-03-10 10:07 ` Wolfram Sang
2020-02-24 9:06 ` [PATCH 02/89] dt-bindings: i2c: brcmstb: Add BCM2711 BSC/AUTO-I2C binding Maxime Ripard
2020-02-24 17:48 ` Florian Fainelli
2020-02-25 18:15 ` Rob Herring
2020-03-10 10:07 ` Wolfram Sang
2020-02-24 9:06 ` [PATCH 06/89] dt-bindings: clock: Add a binding for the RPi Firmware clocks Maxime Ripard
2020-02-25 18:16 ` Rob Herring
2020-03-12 23:14 ` Stephen Boyd
2020-02-24 9:06 ` [PATCH 26/89] dt-bindings: clock: Add BCM2711 DVP binding Maxime Ripard
2020-02-25 18:17 ` Rob Herring
2020-02-24 9:06 ` [PATCH 27/89] clk: bcm: Add BCM2711 DVP driver Maxime Ripard
2020-03-13 1:00 ` Stephen Boyd
2020-03-23 10:56 ` Maxime Ripard
2020-03-25 2:20 ` Stephen Boyd
2020-02-24 9:06 ` [PATCH 29/89] dt-bindings: display: Convert VC4 bindings to schemas Maxime Ripard
2020-02-24 18:41 ` Rob Herring
2020-02-25 11:54 ` Maxime Ripard
2020-02-25 14:02 ` Rob Herring
2020-02-24 9:06 ` [PATCH 30/89] dt-bindings: display: vc4: dpi: Add missing clock-names property Maxime Ripard
2020-02-25 18:17 ` Rob Herring
2020-02-24 9:06 ` [PATCH 31/89] dt-bindings: display: vc4: dsi: Add missing clock properties Maxime Ripard
2020-02-25 18:18 ` Rob Herring
2020-02-24 9:06 ` [PATCH 32/89] dt-bindings: display: vc4: hdmi: Add missing clock-names property Maxime Ripard
2020-02-25 18:18 ` Rob Herring
2020-02-24 9:06 ` [PATCH 33/89] dt-bindings: display: vc4: Document BCM2711 VC5 Maxime Ripard
2020-02-25 18:18 ` Rob Herring
2020-02-24 9:07 ` [PATCH 59/89] dt-bindings: display: vc4: pv: Add BCM2711 pixel valves Maxime Ripard
2020-02-25 18:19 ` Rob Herring
2020-02-24 9:07 ` [PATCH 88/89] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings Maxime Ripard
2020-02-25 18:24 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).