From fcb985a0642ee169c6cf4d2322873f853d50abb2 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 3 Dec 2020 14:25:43 +0100 Subject: [PATCH 1/5] ARM: dts: bcm2711: Use compatible string for BCM2711 DSI1 Updates the compatible string for DSI1 on BCM2711 to differentiate it from BCM2835. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20201203132543.861591-9-maxime@cerno.tech --- arch/arm/boot/dts/bcm2711.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index 4847dd305317..f53a51cc91f0 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -540,6 +540,7 @@ &dsi0 { &dsi1 { interrupts = ; + compatible = "brcm,bcm2711-dsi1"; }; &gpio { From 6b4233f70a914d932a8156950bf9114ba6a06f6c Mon Sep 17 00:00:00 2001 From: Nicolas Saenz Julienne Date: Tue, 12 Jan 2021 15:23:40 +0100 Subject: [PATCH 2/5] ARM: dts: bcm2711: Add reserved memory template to hold firmware configuration RPi4's co-processor will copy the board's bootloader[1] configuration into memory for the OS to consume. Specifically, for the bootloader configuration and upgrade user-space routines to query it through nvmem's sysfs interface. Introduce a reserved-memory area template for the co-processor to edit before booting the system so as for Linux not to overwrite that memory and to expose it as an nvmem device. Signed-off-by: Nicolas Saenz Julienne Tested-by: Tim Gover Link: https://lore.kernel.org/r/e8ca9365-a1f2-1f9d-377c-13bf97883cce@linaro.org [1] https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md --- arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts index 403bacf986eb..3b4ab947492a 100644 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts @@ -25,6 +25,7 @@ aliases { emmc2bus = &emmc2bus; ethernet0 = &genet; pcie0 = &pcie0; + blconfig = &blconfig; }; leds { @@ -218,6 +219,22 @@ &pwm1 { status = "okay"; }; +&rmem { + /* + * RPi4's co-processor will copy the board's bootloader configuration + * into memory for the OS to consume. It'll also update this node with + * its placement information. + */ + blconfig: nvram@0 { + compatible = "raspberrypi,bootloader-config", "nvmem-rmem"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x0 0x0 0x0>; + no-map; + status = "disabled"; + }; +}; + /* SDHCI is used to control the SDIO for wireless */ &sdhci { #address-cells = <1>; From 5878b8087904a5827c3551698be83da1ccf84e11 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 11 Jan 2021 15:23:08 +0100 Subject: [PATCH 3/5] ARM: dts: bcm2711: Add the BSC interrupt controller The BSC controllers used for the HDMI DDC have an interrupt controller shared between both instances. Let's add it to avoid polling. Reviewed-by: Florian Fainelli Signed-off-by: Maxime Ripard Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20210111142309.193441-1-maxime@cerno.tech --- arch/arm/boot/dts/bcm2711.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index f53a51cc91f0..d84e731799b3 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -308,6 +308,14 @@ dvp: clock@7ef00000 { #reset-cells = <1>; }; + bsc_intr: interrupt-controller@7ef00040 { + compatible = "brcm,bcm2711-l2-intc", "brcm,l2-intc"; + reg = <0x7ef00040 0x30>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <1>; + }; + hdmi0: hdmi@7ef00700 { compatible = "brcm,bcm2711-hdmi0"; reg = <0x7ef00700 0x300>, @@ -341,6 +349,8 @@ ddc0: i2c@7ef04500 { reg = <0x7ef04500 0x100>, <0x7ef00b00 0x300>; reg-names = "bsc", "auto-i2c"; clock-frequency = <97500>; + interrupt-parent = <&bsc_intr>; + interrupts = <0>; status = "disabled"; }; @@ -377,6 +387,8 @@ ddc1: i2c@7ef09500 { reg = <0x7ef09500 0x100>, <0x7ef05b00 0x300>; reg-names = "bsc", "auto-i2c"; clock-frequency = <97500>; + interrupt-parent = <&bsc_intr>; + interrupts = <1>; status = "disabled"; }; }; From fbdc88043c5e9b56368a43584d2d1af07c85fa71 Mon Sep 17 00:00:00 2001 From: Stanislav Jakubek Date: Sun, 24 Jan 2021 16:28:10 +0100 Subject: [PATCH 4/5] ARM: dts: bcm21664: Replace spaces with a tab Fix checkpatch warning: WARNING: please, no spaces at the start of a line Signed-off-by: Stanislav Jakubek Signed-off-by: Florian Fainelli --- arch/arm/boot/dts/bcm21664.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm21664.dtsi b/arch/arm/boot/dts/bcm21664.dtsi index 58ec1b2f8ef6..cc58f2b926b9 100644 --- a/arch/arm/boot/dts/bcm21664.dtsi +++ b/arch/arm/boot/dts/bcm21664.dtsi @@ -27,7 +27,7 @@ chosen { bootargs = "console=ttyS0,115200n8"; }; - cpus { + cpus { #address-cells = <1>; #size-cells = <0>; From e2b539707aeaba45574bb6532d2d0c804a8bfeac Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Mon, 11 Jan 2021 15:23:09 +0100 Subject: [PATCH 5/5] ARM: dts: bcm2711: Add the CEC interrupt controller The CEC and hotplug interrupts go through an interrupt controller shared between the two HDMI controllers. Let's add that interrupt controller and the interrupts for both HDMI controllers Reviewed-by: Florian Fainelli Signed-off-by: Maxime Ripard Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20210111142309.193441-16-maxime@cerno.tech --- arch/arm/boot/dts/bcm2711.dtsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index d84e731799b3..462b1dfb0385 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -316,6 +316,14 @@ bsc_intr: interrupt-controller@7ef00040 { #interrupt-cells = <1>; }; + aon_intr: interrupt-controller@7ef00100 { + compatible = "brcm,bcm2711-l2-intc", "brcm,l2-intc"; + reg = <0x7ef00100 0x30>; + interrupts = ; + interrupt-controller; + #interrupt-cells = <1>; + }; + hdmi0: hdmi@7ef00700 { compatible = "brcm,bcm2711-hdmi0"; reg = <0x7ef00700 0x300>, @@ -338,6 +346,11 @@ hdmi0: hdmi@7ef00700 { "hd"; clock-names = "hdmi", "bvb", "audio", "cec"; resets = <&dvp 0>; + interrupt-parent = <&aon_intr>; + interrupts = <0>, <1>, <2>, + <3>, <4>, <5>; + interrupt-names = "cec-tx", "cec-rx", "cec-low", + "wakeup", "hpd-connected", "hpd-removed"; ddc = <&ddc0>; dmas = <&dma 10>; dma-names = "audio-rx"; @@ -377,6 +390,11 @@ hdmi1: hdmi@7ef05700 { ddc = <&ddc1>; clock-names = "hdmi", "bvb", "audio", "cec"; resets = <&dvp 1>; + interrupt-parent = <&aon_intr>; + interrupts = <8>, <7>, <6>, + <9>, <10>, <11>; + interrupt-names = "cec-tx", "cec-rx", "cec-low", + "wakeup", "hpd-connected", "hpd-removed"; dmas = <&dma 17>; dma-names = "audio-rx"; status = "disabled";