arm64: zynqmp: Update SOM boards
Subsystems (2)
cover arm64: zynqmp: Update SOM boards
Hi,
kv-g boards have been moved to new model where u-boot configures a lot of things at run time which requires updates in DTs especially in connection to enabling clocks for these platforms.
There are also small adjustment to match the latest state.
Thanks,
Michal
Michal Simek (6):
arm64: zynqmp: Move usb hub from i2c to usb node
arm64: zynqmp: Setup clock for DP and DPDMA
arm64: zynqmp: Use assigned-clock-rates for setting up clock in SOM
arm64: zynqmp: Switch to ethernet-phy-id in kv260
arm64: zynqmp: Enable DP driver for SOMs
arm64: zynqmp: Fix level of gpio reset for usb on kv260 boards
arch/arm/dts/zynqmp-clk-ccf.dtsi | 8 ++++++++ arch/arm/dts/zynqmp-sck-kv-g-revA.dts | 12 +++++++++--- arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 26 ++++++++++++++++++-------- arch/arm/dts/zynqmp-sm-k26-revA.dts | 5 +++++ 4 files changed, 40 insertions(+), 11 deletions(-)
Signature · 1 line
2.35.1
PATCH 1/6 arm64: zynqmp: Move usb hub from i2c to usb node
Based on upstream discussion based on link below usb hub should be placed to usb node directly as child node. Based on this Linux driver was updated and the same change should be also reflected in kv260 board.
---
arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
arch/arm/dts/zynqmp-sck-kv-g-revB.dts +8 -5
@@ -36,11 +36,7 @@ label = "ina260-u14"; reg = <0x40>; }; - usbhub: usb5744@2d { /* u43 */ - compatible = "microchip,usb5744"; - reg = <0x2d>; - reset-gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; - }; + /* u43 - 0x2d - USB hub */ /* u27 - 0xe0 - STDP4320 DP/HDMI splitter */ };
@@ -111,6 +107,13 @@ pinctrl-0 = <&pinctrl_usb0_default>; phy-names = "usb3-phy"; phys = <&psgtr 2 PHY_TYPE_USB3 0 1>; + + usb5744: usb-hub { /* u43 */ + status = "okay"; + compatible = "microchip,usb5744"; + i2c-bus = <&i2c1>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; + }; }; &dwc3_0 {
Signature · 1 line
2.35.1
PATCH 2/6 arm64: zynqmp: Setup clock for DP and DPDMA
In reply to Michal SimekClocks are coming from shared HW design where these frequencies should be aligned with PLL setup.
---
arch/arm/dts/zynqmp-clk-ccf.dtsi | 4 ++++ arch/arm/dts/zynqmp-sck-kv-g-revA.dts | 2 ++ arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 2 ++ 3 files changed, 8 insertions(+)
arch/arm/dts/zynqmp-clk-ccf.dtsi +4 -0
@@ -279,10 +279,14 @@ &zynqmp_dpdma { clocks = <&zynqmp_clk DPDMA_REF>; + assigned-clocks = <&zynqmp_clk DPDMA_REF>; /* apll */ }; &zynqmp_dpsub { clocks = <&zynqmp_clk TOPSW_LSBUS>, <&zynqmp_clk DP_AUDIO_REF>, <&zynqmp_clk DP_VIDEO_REF>; + assigned-clocks = <&zynqmp_clk DP_STC_REF>, + <&zynqmp_clk DP_AUDIO_REF>, + <&zynqmp_clk DP_VIDEO_REF>; /* rpll, rpll, vpll */ };
arch/arm/dts/zynqmp-sck-kv-g-revA.dts +2 -0
@@ -115,10 +115,12 @@ status = "disabled"; phy-names = "dp-phy0", "dp-phy1"; phys = <&psgtr 1 PHY_TYPE_DP 0 0>, <&psgtr 0 PHY_TYPE_DP 1 0>; + assigned-clock-rates = <27000000>, <25000000>, <300000000>; }; &zynqmp_dpdma { status = "okay"; + assigned-clock-rates = <600000000>; }; &usb0 {
arch/arm/dts/zynqmp-sck-kv-g-revB.dts +2 -0
@@ -95,10 +95,12 @@ status = "disabled"; phy-names = "dp-phy0", "dp-phy1"; phys = <&psgtr 1 PHY_TYPE_DP 0 0>, <&psgtr 0 PHY_TYPE_DP 1 0>; + assigned-clock-rates = <27000000>, <25000000>, <300000000>; }; &zynqmp_dpdma { status = "okay"; + assigned-clock-rates = <600000000>; }; &usb0 {
Signature · 1 line
2.35.1
PATCH 3/6 arm64: zynqmp: Use assigned-clock-rates for setting up clock in SOM
In reply to Michal SimekWith limited low level configuration done via psu-init only IPs connected on SOM are initialized and configured. All IPs connected to carrier card are not initialized. There is a need to do proper reset, pin configuration and also clock setting.
The patch targets the last part which is setting up proper clock for USBs and SDs.
Also setup proper bus width for SD cards.
---
arch/arm/dts/zynqmp-clk-ccf.dtsi | 4 ++++ arch/arm/dts/zynqmp-sck-kv-g-revA.dts | 2 ++ arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 3 +++ arch/arm/dts/zynqmp-sm-k26-revA.dts | 1 + 4 files changed, 10 insertions(+)
arch/arm/dts/zynqmp-clk-ccf.dtsi +4 -0
@@ -215,10 +215,12 @@ &sdhci0 { clocks = <&zynqmp_clk SDIO0_REF>, <&zynqmp_clk LPD_LSBUS>; + assigned-clocks = <&zynqmp_clk SDIO0_REF>; }; &sdhci1 { clocks = <&zynqmp_clk SDIO1_REF>, <&zynqmp_clk LPD_LSBUS>; + assigned-clocks = <&zynqmp_clk SDIO1_REF>; }; &spi0 {
@@ -255,10 +257,12 @@ &usb0 { clocks = <&zynqmp_clk USB0_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; + assigned-clocks = <&zynqmp_clk USB0_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; }; &usb1 { clocks = <&zynqmp_clk USB1_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; + assigned-clocks = <&zynqmp_clk USB1_BUS_REF>, <&zynqmp_clk USB3_DUAL_REF>; }; &watchdog0 {
arch/arm/dts/zynqmp-sck-kv-g-revA.dts +2 -0
@@ -154,6 +154,8 @@ no-1-8-v; disable-wp; xlnx,mio-bank = <1>; + assigned-clock-rates = <187498123>; + bus-width = <8>; }; &gem3 { /* required by spec */
arch/arm/dts/zynqmp-sck-kv-g-revB.dts +3 -0
@@ -109,6 +109,7 @@ pinctrl-0 = <&pinctrl_usb0_default>; phy-names = "usb3-phy"; phys = <&psgtr 2 PHY_TYPE_USB3 0 1>; + assigned-clock-rates = <250000000>, <20000000>; usb5744: usb-hub { /* u43 */ status = "okay";
@@ -140,6 +141,8 @@ clk-phase-sd-hs = <126>, <60>; clk-phase-uhs-sdr25 = <120>, <60>; clk-phase-uhs-ddr50 = <126>, <48>; + assigned-clock-rates = <187498123>; + bus-width = <8>; }; &gem3 { /* required by spec */
arch/arm/dts/zynqmp-sm-k26-revA.dts +1 -0
@@ -189,6 +189,7 @@ disable-wp; bus-width = <8>; xlnx,mio-bank = <0>; + assigned-clock-rates = <187498123>; }; &spi1 { /* MIO6, 9-11 */
Signature · 1 line
2.35.1
PATCH 4/6 arm64: zynqmp: Switch to ethernet-phy-id in kv260
In reply to Michal SimekUse ethernet-phy-id compatible string to properly describe phy reset on kv260 boards. Previous description wasn't correct because reset was done for mdio bus to operate and it was in this case used for different purpose which was eth phy reset. With ethernet-phy-id phy reset happens only for the phy via phy framework.
---
arch/arm/dts/zynqmp-sck-kv-g-revA.dts | 6 ++++-- arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-)
arch/arm/dts/zynqmp-sck-kv-g-revA.dts +4 -2
@@ -168,16 +168,18 @@ mdio: mdio { #address-cells = <1>; #size-cells = <0>; - reset-gpios = <&gpio 38 GPIO_ACTIVE_LOW>; - reset-delay-us = <2>; phy0: ethernet-phy@1 { #phy-cells = <1>; reg = <1>; + compatible = "ethernet-phy-id2000.a231"; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; ti,dp83867-rxctrl-strap-quirk; + reset-assert-us = <100>; + reset-deassert-us = <280>; + reset-gpios = <&gpio 38 GPIO_ACTIVE_LOW>; }; }; };
arch/arm/dts/zynqmp-sck-kv-g-revB.dts +4 -2
@@ -155,16 +155,18 @@ mdio: mdio { #address-cells = <1>; #size-cells = <0>; - reset-gpios = <&gpio 38 GPIO_ACTIVE_LOW>; - reset-delay-us = <2>; phy0: ethernet-phy@1 { #phy-cells = <1>; reg = <1>; + compatible = "ethernet-phy-id2000.a231"; ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; ti,dp83867-rxctrl-strap-quirk; + reset-assert-us = <100>; + reset-deassert-us = <280>; + reset-gpios = <&gpio 38 GPIO_ACTIVE_LOW>; }; }; };
Signature · 1 line
2.35.1
PATCH 5/6 arm64: zynqmp: Enable DP driver for SOMs
In reply to Michal SimekThe main reason is to send pmufw cfg overlay from U-Boot to PMUFW to enable access to DP. Overlay is sent when cls command is called and for that IP has to be enabled in carrier cards.
And IP needs to be also enabled in SOM dt because with DTB reselection new DT is not parsed in pre reloc U-Boot instance. It is called from board_f via embedded_dtb_select(). That's why bind function is not able to allocate memory and it ends up with error:
"Video device 'display@fd4a0000' cannot allocate frame buffer memory -ensure the device is set up before relocation"
To avoid this situation DP is placed also to SOM where bind function is called and frame buffer memory is allocated and just reused after DTB reselection. Result is the same. There could be a problem in Linux with different DP configurations but that's need to be solved there because console should be on from u-boot already.
---
arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 2 +- arch/arm/dts/zynqmp-sm-k26-revA.dts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arm/dts/zynqmp-sck-kv-g-revB.dts +1 -1
@@ -92,7 +92,7 @@ }; &zynqmp_dpsub { - status = "disabled"; + status = "okay"; phy-names = "dp-phy0", "dp-phy1"; phys = <&psgtr 1 PHY_TYPE_DP 0 0>, <&psgtr 0 PHY_TYPE_DP 1 0>; assigned-clock-rates = <27000000>, <25000000>, <300000000>;
arch/arm/dts/zynqmp-sm-k26-revA.dts +4 -0
@@ -317,3 +317,7 @@ &ams_pl { status = "okay"; }; + +&zynqmp_dpsub { + status = "okay"; +};
Signature · 1 line
2.35.1
PATCH 6/6 arm64: zynqmp: Fix level of gpio reset for usb on kv260 boards
In reply to Michal SimekActive level is low that's why it should be fixed.
---
arch/arm/dts/zynqmp-sck-kv-g-revA.dts | 2 +- arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/dts/zynqmp-sck-kv-g-revA.dts +1 -1
@@ -131,7 +131,7 @@ phys = <&psgtr 2 PHY_TYPE_USB3 0 1>; usbhub: usb5744 { /* u43 */ compatible = "microchip,usb5744"; - reset-gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; };
arch/arm/dts/zynqmp-sck-kv-g-revB.dts +1 -1
@@ -115,7 +115,7 @@ status = "okay"; compatible = "microchip,usb5744"; i2c-bus = <&i2c1>; - reset-gpios = <&gpio 44 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; };
Signature · 1 line
2.35.1
Michal Simek
Appliedst 23. 2. 2022 v 16:17 odesílatel Michal Simek <[email protected]> napsal:
Quoted 20 lines
Hi,
kv-g boards have been moved to new model where u-boot configures a lot of things at run time which requires updates in DTs especially in connection to enabling clocks for these platforms.
There are also small adjustment to match the latest state.Thanks,
MichalMichal Simek (6):
arm64: zynqmp: Move usb hub from i2c to usb node
arm64: zynqmp: Setup clock for DP and DPDMA
arm64: zynqmp: Use assigned-clock-rates for setting up clock in SOM
arm64: zynqmp: Switch to ethernet-phy-id in kv260
arm64: zynqmp: Enable DP driver for SOMs
arm64: zynqmp: Fix level of gpio reset for usb on kv260 boards
Quoted 9 lines
arch/arm/dts/zynqmp-clk-ccf.dtsi | 8 ++++++++ arch/arm/dts/zynqmp-sck-kv-g-revA.dts | 12 +++++++++--- arch/arm/dts/zynqmp-sck-kv-g-revB.dts | 26 ++++++++++++++++++-------- arch/arm/dts/zynqmp-sm-k26-revA.dts | 5 +++++ 4 files changed, 40 insertions(+), 11 deletions(-)--
2.35.1
Applied.
M
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs