From 030cc6cb1b6ccc09b74a7957958559dee00ec038 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Fri, 13 Dec 2019 11:51:02 -0800 Subject: [PATCH 1/3] ARM: dts: NSP: Use hardware I2C for BCM958625HR Now that the i2c-bcm-iproc driver has been fixed to permit reading more than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c: iproc: Fix i2c master read more than 63 bytes") we no longer need to bitbang i2c over GPIOs which was necessary before to allow the PHYLINK/SFP subsystems to read SFP modules. Reviewed-by: Ray Jui Signed-off-by: Florian Fainelli --- arch/arm/boot/dts/bcm958625hr.dts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/bcm958625hr.dts b/arch/arm/boot/dts/bcm958625hr.dts index a2c9de35ddfb..536fb24f38bb 100644 --- a/arch/arm/boot/dts/bcm958625hr.dts +++ b/arch/arm/boot/dts/bcm958625hr.dts @@ -55,18 +55,9 @@ gpio-restart { priority = <200>; }; - /* Hardware I2C block cannot do more than 63 bytes per transfer, - * which would prevent reading from a SFP's EEPROM (256 byte). - */ - i2c1: i2c { - compatible = "i2c-gpio"; - sda-gpios = <&gpioa 5 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; - scl-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; - }; - sfp: sfp { compatible = "sff,sfp"; - i2c-bus = <&i2c1>; + i2c-bus = <&i2c0>; mod-def0-gpios = <&gpioa 28 GPIO_ACTIVE_LOW>; los-gpios = <&gpioa 24 GPIO_ACTIVE_HIGH>; tx-fault-gpios = <&gpioa 30 GPIO_ACTIVE_HIGH>; @@ -74,6 +65,10 @@ sfp: sfp { }; }; +&i2c0 { + status = "okay"; +}; + &amac0 { status = "okay"; }; From c4414cac85b623bd43f78174c5acac28a0795f13 Mon Sep 17 00:00:00 2001 From: Stephen Brennan Date: Tue, 19 Nov 2019 19:16:21 -0800 Subject: [PATCH 2/3] ARM: dts: bcm2835: Move rng definition to common location BCM2711 inherits from BCM283X, but has an incompatible HWRNG. Move this node to bcm2835-common.dtsi, so that BCM2711 can define its own. Signed-off-by: Stephen Brennan Acked-by: Stefan Wahren Signed-off-by: Nicolas Saenz Julienne --- arch/arm/boot/dts/bcm2835-common.dtsi | 6 ++++++ arch/arm/boot/dts/bcm283x.dtsi | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/bcm2835-common.dtsi b/arch/arm/boot/dts/bcm2835-common.dtsi index fe1ab40c7f22..2b1d9d4c0cde 100644 --- a/arch/arm/boot/dts/bcm2835-common.dtsi +++ b/arch/arm/boot/dts/bcm2835-common.dtsi @@ -70,6 +70,12 @@ pm: watchdog@7e100000 { system-power-controller; }; + rng@7e104000 { + compatible = "brcm,bcm2835-rng"; + reg = <0x7e104000 0x10>; + interrupts = <2 29>; + }; + pixelvalve@7e206000 { compatible = "brcm,bcm2835-pixelvalve0"; reg = <0x7e206000 0x100>; diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index 3caaa57eb6c8..5219339fc27c 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -84,12 +84,6 @@ clocks: cprman@7e101000 { <&dsi1 0>, <&dsi1 1>, <&dsi1 2>; }; - rng@7e104000 { - compatible = "brcm,bcm2835-rng"; - reg = <0x7e104000 0x10>; - interrupts = <2 29>; - }; - mailbox: mailbox@7e00b880 { compatible = "brcm,bcm2835-mbox"; reg = <0x7e00b880 0x40>; From 530735df62582d5d1f41faf0e0d1ca7d21dca571 Mon Sep 17 00:00:00 2001 From: Stephen Brennan Date: Tue, 19 Nov 2019 19:16:22 -0800 Subject: [PATCH 3/3] ARM: dts: bcm2711: Enable HWRNG support This enables hardware random number generator support for the BCM2711 on the Raspberry Pi 4 board. Signed-off-by: Stephen Brennan Acked-by: Stefan Wahren [nsaenzjulienne@suse.de: remove unnecessary status="okay"] Signed-off-by: Nicolas Saenz Julienne --- arch/arm/boot/dts/bcm2711.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index 961bed832755..ccf917de5e1a 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -112,10 +112,8 @@ pm: watchdog@7e100000 { }; rng@7e104000 { - interrupts = ; - - /* RNG is incompatible with brcm,bcm2835-rng */ - status = "disabled"; + compatible = "brcm,bcm2711-rng200"; + reg = <0x7e104000 0x28>; }; uart2: serial@7e201400 {