From 5e9b59bd37371ef1e627b24483c0388a2567cc1c Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 22 Mar 2022 11:58:56 +0100 Subject: [PATCH 1/6] arm64: dts: uDPU: update partition table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Partition currently called "uboot" does not only contain U-boot, but rather it contains TF-A, U-boot and U-boot environment. So, to avoid accidentally deleting the U-boot environment which is located at 0x180000 split the partition. "uboot" is not the correct name as you can't boot these boards with U-boot only, TF-A must be present as well, so rename the "uboot" partition to "firmware". While we are here, describe the NOR node as "spi-flash@0" instead of "m25p80@0" which is the old SPI-NOR driver name. This won't break booting for existing devices as the SoC-s BootROM is not partition aware at all, it will simply try booting from 0x0 of the boot device that is set by bootstrap pins. This will however prevent accidental or automated flashing of just U-boot to the partition. Signed-off-by: Robert Marko Reviewed-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT --- arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts index 95d46e8d081c..ac64949bb53e 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts @@ -99,7 +99,7 @@ &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi_quad_pins>; - m25p80@0 { + spi-flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <54000000>; @@ -108,10 +108,15 @@ partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; - /* only bootloader is located on the SPI */ + partition@0 { - label = "uboot"; - reg = <0 0x400000>; + label = "firmware"; + reg = <0x0 0x180000>; + }; + + partition@180000 { + label = "u-boot-env"; + reg = <0x180000 0x10000>; }; }; }; From e4fde76fa54a6f13da7fd5fd6601474c16c54d8d Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 22 Mar 2022 11:58:57 +0100 Subject: [PATCH 2/6] arm64: dts: uDPU: correct temperature sensors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit uDPU has a pair of NCT375 temperature sensors, which are TMP75C compatible as far as the driver is concerned. The current LM75 compatible worked as all of the LM75 compatible sensors are backwards compatible with the original part, but it meant that lower resolution and incorrect sample rate was being used. The "lm75" compatible has been deprecated anyway and is meant as fallback in order to keep older DTS-es working. Signed-off-by: Robert Marko Reviewed-by: Pali Rohár Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT --- arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts index ac64949bb53e..1f534c0c65f7 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts @@ -153,15 +153,15 @@ &i2c1 { scl-gpios = <&gpionb 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; sda-gpios = <&gpionb 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; - lm75@48 { + nct375@48 { status = "okay"; - compatible = "lm75"; + compatible = "ti,tmp75c"; reg = <0x48>; }; - lm75@49 { + nct375@49 { status = "okay"; - compatible = "lm75"; + compatible = "ti,tmp75c"; reg = <0x49>; }; }; From 5202f4c3816b42e989f9cad49a73c7e88fba89f4 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 28 Sep 2021 19:09:17 +0200 Subject: [PATCH 3/6] arm64: dts: marvell: espressobin-ultra: fix SPI-NOR config SPI config for the SPI-NOR is incorrect and completely breaking reading/writing to the onboard SPI-NOR. SPI-NOR is connected in the single(x1) IO mode and not in the quad (x4) mode. Also, there is no need to override the max frequency from the DTSI as the mx25u3235f that is used supports 104Mhz. Fixes: 3404fe15a60f ("arm64: dts: marvell: add DT for ESPRESSObin-Ultra") Signed-off-by: Robert Marko Signed-off-by: Gregory CLEMENT --- arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts index c5eb3604dd5b..610ff6f385c7 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts @@ -71,10 +71,6 @@ &sdhci1 { &spi0 { flash@0 { - spi-max-frequency = <108000000>; - spi-rx-bus-width = <4>; - spi-tx-bus-width = <4>; - partitions { compatible = "fixed-partitions"; #address-cells = <1>; From e836070f94619af5325fd69d3fb48bd1a9e569b4 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 28 Sep 2021 19:09:18 +0200 Subject: [PATCH 4/6] arm64: dts: marvell: espressobin-ultra: add PHY and switch reset pins Both the Topaz switch and 88E1512 PHY have their reset and interrupts connected to the SoC. So, define the Topaz and 88E1512 reset pins in the DTS. Defining the interrupt pins wont work as both the 88E1512 and the Topaz switch uses active LOW IRQ signals but the A37xx GPIO controller only supports edge triggers. 88E1512 would require special setup anyway as its INT pin is shared with the LED2 and you first need to configure it as INT. Signed-off-by: Robert Marko Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT --- arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts index 610ff6f385c7..7c786d218f1b 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts @@ -114,12 +114,16 @@ &usb3 { &mdio { extphy: ethernet-phy@1 { reg = <1>; + + reset-gpios = <&gpionb 2 GPIO_ACTIVE_LOW>; }; }; &switch0 { reg = <3>; + reset-gpios = <&gpiosb 23 GPIO_ACTIVE_LOW>; + ports { switch0port1: port@1 { reg = <1>; From eacec7ebc16cf5d2f6a6c7cf5d57156da2c3e98f Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 28 Sep 2021 19:09:19 +0200 Subject: [PATCH 5/6] arm64: dts: marvell: espressobin-ultra: enable front USB3 port Espressobin Ultra has a front panel USB3.0 Type-A port which works just fine so enable it. I dont see a reason why it was disabled in the first place anyway. Fixes: 3404fe15a60f ("arm64: dts: marvell: add DT for ESPRESSObin-Ultra") Signed-off-by: Robert Marko Signed-off-by: Gregory CLEMENT --- arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts index 7c786d218f1b..070725b81be5 100644 --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts @@ -108,7 +108,6 @@ rtc@51 { &usb3 { usb-phy = <&usb3_phy>; - status = "disabled"; }; &mdio { From 239466bddfc02f9643f64be74ba9a1d80c286f4b Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 30 Mar 2022 11:05:43 +1300 Subject: [PATCH 6/6] arm64: dts: marvell: Update sdhci node names to match schema Update the node names of the sdhci@ interfaces to be mmc@ to match the node name enforced by the mmc-controller.yaml schema. Signed-off-by: Chris Packham Acked-by: Krzysztof Kozlowski Signed-off-by: Gregory CLEMENT --- arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 4 ++-- arch/arm64/boot/dts/marvell/armada-ap80x.dtsi | 2 +- arch/arm64/boot/dts/marvell/armada-cp11x.dtsi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi index 8c8bb97c9d30..df152c72276b 100644 --- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi @@ -444,7 +444,7 @@ rwtm: mailbox@b0000 { #mbox-cells = <1>; }; - sdhci1: sdhci@d0000 { + sdhci1: mmc@d0000 { compatible = "marvell,armada-3700-sdhci", "marvell,sdhci-xenon"; reg = <0xd0000 0x300>, @@ -455,7 +455,7 @@ sdhci1: sdhci@d0000 { status = "disabled"; }; - sdhci0: sdhci@d8000 { + sdhci0: mmc@d8000 { compatible = "marvell,armada-3700-sdhci", "marvell,sdhci-xenon"; reg = <0xd8000 0x300>, diff --git a/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi b/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi index 6614472100c2..a06a0a889c43 100644 --- a/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-ap80x.dtsi @@ -250,7 +250,7 @@ watchdog: watchdog@610000 { interrupts = ; }; - ap_sdhci0: sdhci@6e0000 { + ap_sdhci0: mmc@6e0000 { compatible = "marvell,armada-ap806-sdhci"; reg = <0x6e0000 0x300>; interrupts = ; diff --git a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi b/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi index 3bd2182817fb..d6c0990a267d 100644 --- a/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi +++ b/arch/arm64/boot/dts/marvell/armada-cp11x.dtsi @@ -493,7 +493,7 @@ CP11X_LABEL(trng): trng@760000 { status = "okay"; }; - CP11X_LABEL(sdhci0): sdhci@780000 { + CP11X_LABEL(sdhci0): mmc@780000 { compatible = "marvell,armada-cp110-sdhci"; reg = <0x780000 0x300>; interrupts = <27 IRQ_TYPE_LEVEL_HIGH>;