From f1e01685f9f0523cac8badb236bf99ad51d9405a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20S=C3=A1?= Date: Mon, 27 Jan 2025 12:24:44 +0000 Subject: [PATCH] arm64: boot: xilinx: jupiter: re-arrange devicetrees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having zynqmp-jupiter-sdr-rx2tx2.dts directly including zynqmp-jupiter-sdr.dts and then removing nodes was clumsy and a bit confusing. That also lead to having DT tags ("/dts-v1/;") included in both files which can be problematic for some build systems like petalinux. Hence, just do things properly and place the common pieces in a common .dtsi file. Signed-off-by: Nuno Sá --- .../dts/xilinx/zynqmp-jupiter-sdr-rx2tx2.dts | 7 +- .../boot/dts/xilinx/zynqmp-jupiter-sdr.dts | 611 +----------------- .../boot/dts/xilinx/zynqmp-jupiter-sdr.dtsi | 558 ++++++++++++++++ 3 files changed, 589 insertions(+), 587 deletions(-) create mode 100644 arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr.dtsi diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr-rx2tx2.dts b/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr-rx2tx2.dts index 4fa099ec73ff88..b01b3b7e8668d4 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr-rx2tx2.dts +++ b/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr-rx2tx2.dts @@ -10,12 +10,7 @@ /dts-v1/; -#include "zynqmp-jupiter-sdr.dts" - -/delete-node/ &rx2_dma; -/delete-node/ &tx2_dma; -/delete-node/ &axi_adrv9002_core_rx2; -/delete-node/ &axi_adrv9002_core_tx2; +#include "zynqmp-jupiter-sdr.dtsi" &axi_adrv9002_core_tx1 { compatible = "adi,axi-adrv9002-rx2tx2-1.0"; diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr.dts b/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr.dts index fb9f2ad0b532da..9fbff1b0b643c4 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr.dts +++ b/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr.dts @@ -10,594 +10,43 @@ /dts-v1/; -#include "zynqmp.dtsi" -#include "zynqmp-clk-ccf.dtsi" -#include -#include -#include -#include -#include +#include "zynqmp-jupiter-sdr.dtsi" -#undef JUPITER_SDR_USB_ROLE_SW - -/ { - model = "Analog Devices, Inc. Jupiter SDR"; - compatible = "xlnx,zynqmp"; - - aliases { - ethernet0 = &gem3; - mmc0 = &sdhci1; - rtc0 = &rtc; - serial0 = &uart1; - i2c0 = &i2c1; - spi0 = &spi0; +&fpga_axi { + rx2_dma: dma@84A40000 { + compatible = "adi,axi-dmac-1.00.a"; + reg = <0x84A40000 0x10000>; + #dma-cells = <1>; + interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&zynqmp_clk 71>; }; - chosen { - bootargs = "earlycon"; - stdout-path = "serial0:115200n8"; + tx2_dma: dma@84A6000 { + compatible = "adi,axi-dmac-1.00.a"; + reg = <0x84A60000 0x10000>; + #dma-cells = <1>; + interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&zynqmp_clk 71>; }; - memory@0 { - device_type = "memory"; - reg = <0x0 0x0 0x0 0x80000000>; + axi_adrv9002_core_rx2: axi-adrv9002-rx2-lpc@84A02000 { + compatible = "adi,axi-adrv9002-rx2-1.0"; + reg = <0x84A09000 0x1000>; + clocks = <&adc0_adrv9002 3>; + clock-names = "sampl_clk"; + dmas = <&rx2_dma 0>; + dma-names = "rx"; }; - psgtr_ref0: ad9542_out0_b { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <26000000>; + axi_adrv9002_core_tx2: axi-adrv9002-tx2-lpc@84A06000 { + compatible = "adi,axi-adrv9002-tx-1.0"; + reg = <0x84A0C000 0x2000>; + clocks = <&adc0_adrv9002 4>; + clock-names = "sampl_clk"; + dmas = <&tx2_dma 0>; + dma-names = "tx"; + adi,axi-dds-default-scale = <0x800>; + adi,axi-dds-default-frequency = <2000000>; }; - - psgtr_ref1: ad9542_out0_a { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <108000000>; - }; - - psgtr_ref2: ad9542_out1_b { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <150000000>; - }; -}; - -&psgtr { - status = "okay"; - clocks = <&psgtr_ref0>, <&psgtr_ref1>, <&psgtr_ref2>; - clock-names = "ref0", "ref1", "ref2"; }; -&pinctrl0 { - status = "okay"; - - pinctrl_uart1_default: uart1-default { - mux { - groups = "uart1_4_grp"; - function = "uart1"; - }; - - conf { - groups = "uart1_4_grp"; - slew-rate = ; - io-standard = ; - }; - - conf-rx { - pins = "MIO17"; - bias-high-impedance; - }; - - conf-tx { - pins = "MIO16"; - bias-disable; - }; - }; - - pinctrl_gem3_default: gem3-default { - mux { - function = "ethernet3"; - groups = "ethernet3_0_grp"; - }; - - conf { - groups = "ethernet3_0_grp"; - slew-rate = ; - io-standard = ; - }; - - conf-rx { - pins = "MIO70", "MIO71", "MIO72", - "MIO73", "MIO74", "MIO75"; - bias-high-impedance; - low-power-disable; - }; - - conf-tx { - pins = "MIO64", "MIO65", "MIO66", - "MIO67", "MIO68", "MIO69"; - bias-disable; - low-power-enable; - }; - - mux-mdio { - function = "mdio3"; - groups = "mdio3_0_grp"; - }; - - conf-mdio { - groups = "mdio3_0_grp"; - slew-rate = ; - io-standard = ; - bias-disable; - }; - }; - - pinctrl_sdhci1_default: sdhci1-default { - mux { - groups = "sdio1_0_grp"; - function = "sdio1"; - }; - - conf { - groups = "sdio1_0_grp"; - slew-rate = ; - io-standard = ; - bias-disable; - }; - - mux-cd { - groups = "sdio1_cd_0_grp"; - function = "sdio1_cd"; - }; - - conf-cd { - groups = "sdio1_cd_0_grp"; - bias-high-impedance; - bias-pull-up; - slew-rate = ; - io-standard = ; - }; - - mux-wp { - groups = "sdio1_wp_0_grp"; - function = "sdio1_wp"; - }; - - conf-wp { - groups = "sdio1_wp_0_grp"; - bias-high-impedance; - bias-pull-up; - slew-rate = ; - io-standard = ; - }; - }; - - pinctrl_i2c1_default: i2c1-default { - mux { - groups = "i2c1_8_grp"; - function = "i2c1"; - }; - - conf { - groups = "i2c1_8_grp"; - bias-pull-up; - slew-rate = ; - io-standard = ; - }; - }; - - pinctrl_usb0_default: usb0-default { - mux { - groups = "usb0_0_grp"; - function = "usb0"; - }; - - conf { - groups = "usb0_0_grp"; - io-standard = ; - }; - - conf-rx { - pins = "MIO52", "MIO53", "MIO55"; - bias-high-impedance; - drive-strength = <12>; - slew-rate = ; - }; - - conf-tx { - pins = "MIO54", "MIO56", "MIO57", "MIO58", "MIO59", - "MIO60", "MIO61", "MIO62", "MIO63"; - bias-disable; - drive-strength = <4>; - slew-rate = ; - }; - }; -}; - -&qspi { - status = "okay"; - is-dual = <1>; - num-cs = <2>; - flash@0 { - compatible = "n25q512a", "jedec,spi-nor"; /* 32MB */ - #address-cells = <1>; - #size-cells = <1>; - reg = <0>, <1>; - parallel-memories = /bits/ 64 <0x4000000 0x4000000>; /* 64MB */ - spi-tx-bus-width = <4>; - spi-rx-bus-width = <4>; /* FIXME also DUAL configuration possible */ - spi-max-frequency = <108000000>; /* Based on DC1 spec */ - partition@0 { /* for testing purpose */ - label = "qspi-fsbl-uboot"; - reg = <0x0 0x100000>; - }; - partition@100000 { /* for testing purpose */ - label = "qspi-linux"; - reg = <0x100000 0x500000>; - }; - partition@600000 { /* for testing purpose */ - label = "qspi-device-tree"; - reg = <0x600000 0x20000>; - }; - partition@620000 { /* for testing purpose */ - label = "qspi-rootfs"; - reg = <0x620000 0x5E0000>; - }; - }; -}; - -&uart1 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart1_default>; -}; - -&gem3 { - status = "okay"; - phy-handle = <&phy0>; - phy-mode = "rgmii-id"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gem3_default>; - - nvmem-cells = <ð0_addr>; - nvmem-cell-names = "mac-address"; - - #address-cells = <1>; - #size-cells = <0>; - - phy0: phy@f { - reg = <0xf>; - }; -}; - -&sdhci1 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_sdhci1_default>; - xlnx,mio_bank = <1>; -}; - -&i2c1 { - status = "okay"; - clock-frequency = <400000>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_i2c1_default>; - - ltc2945@6a { - compatible = "adi,ltc2945"; - reg = <0x6a>; - }; - - eeprom_i2c: eeprom@50 { - compatible = "atmel,24c16"; - pagesize = <16>; - reg = <0x50>; - #address-cells = <1>; - #size-cells = <1>; - - eth0_addr: eth-mac-addr@B { - reg = <0xB 0x06>; - }; - }; - - typec_pd: usb-pd@38 { - compatible = "ti,tps6598x"; - reg = <0x38>; - interrupt-parent = <&gpio>; - interrupts = <31 IRQ_TYPE_LEVEL_LOW>; - interrupt-names = "irq"; - -#ifdef JUPITER_SDR_USB_ROLE_SW - typec_con: connector { - compatible = "usb-c-connector"; - label = "USB-C"; - port { - typec_ep: endpoint { - remote-endpoint = <&otg_ep>; - }; - }; - }; -#endif - }; - - typec_pd1: usb-pd@3f { - compatible = "ti,tps6598x"; - reg = <0x3F>; - interrupt-parent = <&gpio>; - interrupts = <31 IRQ_TYPE_LEVEL_LOW>; - interrupt-names = "irq"; - }; -}; - -&zynqmp_dpsub { - status = "okay"; - phy-names = "dp-phy0"; - phys = <&psgtr 3 PHY_TYPE_DP 0 1>, - <&psgtr 2 PHY_TYPE_DP 1 1>; -}; - -&zynqmp_dp_snd_codec0 { - status = "okay"; -}; - -&zynqmp_dp_snd_pcm0 { - status = "okay"; -}; - -&zynqmp_dp_snd_pcm1 { - status = "okay"; -}; - -&zynqmp_dp_snd_card0 { - status = "okay"; -}; - -&zynqmp_dpdma { - status = "okay"; -}; - -&sata { - status = "okay"; - ceva,p0-cominit-params = /bits/ 8 <0x18 0x40 0x18 0x28>; - ceva,p0-comwake-params = /bits/ 8 <0x06 0x14 0x08 0x0E>; - ceva,p0-burst-params = /bits/ 8 <0x13 0x08 0x4A 0x06>; - ceva,p0-retry-params = /bits/ 16 <0x96A4 0x3FFC>; - ceva,p1-cominit-params = /bits/ 8 <0x18 0x40 0x18 0x28>; - ceva,p1-comwake-params = /bits/ 8 <0x06 0x14 0x08 0x0E>; - ceva,p1-burst-params = /bits/ 8 <0x13 0x08 0x4A 0x06>; - ceva,p1-retry-params = /bits/ 16 <0x96A4 0x3FFC>; - phy-names = "sata-phy"; - phys = <&psgtr 1 PHY_TYPE_SATA 1 2>; -}; - -&usb0 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_usb0_default>; -}; - -&dwc3_0 { - status = "okay"; - dr_mode = "otg"; - phy-names = "usb3-phy"; - phys = <&psgtr 0 PHY_TYPE_USB3 0 0>; - maximum-speed = "super-speed"; -#ifdef JUPITER_SDR_USB_ROLE_SW - usb-role-switch; - role-switch-default-mode = "device"; - - port@0 { - reg = <0>; - - otg_ep: endpoint { - remote-endpoint = <&typec_con>; - }; - }; -#endif -}; - -&gpio { - status = "okay"; - - usb_reset { - gpio-hog; - gpios = <13 GPIO_ACTIVE_HIGH>; - output-high; - line-name = "usb-reset"; - }; - - fan_ctl { - gpio-hog; - gpios = <145 GPIO_ACTIVE_HIGH>; - output-low; - line-name = "fan-ctl"; - }; -}; - -&spi0 { - status = "okay"; -}; - -&watchdog0 { - status = "okay"; -}; - -&xilinx_ams { - status = "okay"; -}; - -&ams_ps { - status = "okay"; -}; - -&ams_pl { - status = "okay"; -}; - -&uart0 { - status = "okay"; -}; - -/ { - fpga_axi { - interrupt-parent = <&gic>; - compatible = "simple-bus"; - #address-cells = <0x1>; - #size-cells = <0x1>; - ranges = <0 0 0 0xffffffff>; - - rx1_dma: dma@84A30000 { - compatible = "adi,axi-dmac-1.00.a"; - reg = <0x84A30000 0x10000>; - #dma-cells = <1>; - interrupts = <0 109 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&zynqmp_clk 71>; - }; - - rx2_dma: dma@84A40000 { - compatible = "adi,axi-dmac-1.00.a"; - reg = <0x84A40000 0x10000>; - #dma-cells = <1>; - interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&zynqmp_clk 71>; - }; - - tx1_dma: dma@84A50000 { - compatible = "adi,axi-dmac-1.00.a"; - reg = <0x84A50000 0x10000>; - #dma-cells = <1>; - interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&zynqmp_clk 71>; - }; - - tx2_dma: dma@84A6000 { - compatible = "adi,axi-dmac-1.00.a"; - reg = <0x84A60000 0x10000>; - #dma-cells = <1>; - interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&zynqmp_clk 71>; - }; - - axi_adrv9002_core_rx1: axi-adrv9002-rx-lpc@84A00000 { - compatible = "adi,axi-adrv9002-rx-1.0"; - reg = <0x84A00000 0x6000>; - clocks = <&adc0_adrv9002 0>; - dmas = <&rx1_dma 0>; - dma-names = "rx"; - spibus-connected = <&adc0_adrv9002>; - }; - - axi_adrv9002_core_tx1: axi-adrv9002-tx-lpc@84A04000 { - compatible = "adi,axi-adrv9002-tx-1.0"; - reg = <0x84A0A000 0x2000>; - clocks = <&adc0_adrv9002 1>; - clock-names = "sampl_clk"; - dmas = <&tx1_dma 0>; - dma-names = "tx"; - adi,axi-dds-default-scale = <0x800>; - adi,axi-dds-default-frequency = <2000000>; - }; - - axi_adrv9002_core_rx2: axi-adrv9002-rx2-lpc@84A02000 { - compatible = "adi,axi-adrv9002-rx2-1.0"; - reg = <0x84A09000 0x1000>; - clocks = <&adc0_adrv9002 3>; - clock-names = "sampl_clk"; - dmas = <&rx2_dma 0>; - dma-names = "rx"; - }; - - axi_adrv9002_core_tx2: axi-adrv9002-tx2-lpc@84A06000 { - compatible = "adi,axi-adrv9002-tx-1.0"; - reg = <0x84A0C000 0x2000>; - clocks = <&adc0_adrv9002 4>; - clock-names = "sampl_clk"; - dmas = <&tx2_dma 0>; - dma-names = "tx"; - adi,axi-dds-default-scale = <0x800>; - adi,axi-dds-default-frequency = <2000000>; - }; - - axi_sysid_0: axi-sysid-0@85000000 { - compatible = "adi,axi-sysid-1.00.a"; - reg = <0x85000000 0x10000>; - }; - }; - - gpio-keys-power { - #address-cells = <1>; - #size-cells = <0>; - compatible = "gpio-keys"; - - power { - interrupt-parent = <&gpio>; - interrupts = <20 IRQ_TYPE_EDGE_FALLING>; - label = "Power"; - linux,code = ; - gpio-key,wakeup; - }; - }; -}; - -#define fmc_spi spi0 - -#include "adi-adrv9002.dtsi" - -/ { - clocks { - adrv9002_clkin2: clock2 { - compatible = "fixed-clock"; - - clock-frequency = <30720000>; - clock-output-names = "adrv9002_refclk_mux0"; - #clock-cells = <0>; - }; - }; - - adrv9002_clk_mux: clk-mux { - #clock-cells = <0>; - compatible = "gpio-mux-clock"; - /* 30.72MHz, 38.4MHz */ - clocks = <&adrv9002_clkin2>, <&adrv9002_clkin>; - clock-output-names = "adrv9002_ext_refclk"; - select-gpios = <&gpio 79 GPIO_ACTIVE_HIGH>; - }; -}; - -&adrv9002_clkin { - clock-output-names = "adrv9002_refclk_mux1"; -}; - -&adc0_adrv9002 { - reset-gpios = <&gpio 81 GPIO_ACTIVE_LOW>; - interrupts = <78 IRQ_TYPE_EDGE_RISING>; - - clocks = <&adrv9002_clk_mux>; - - adi,channels { - rx@0 { - mux-ctl-gpios = <&gpio 86 GPIO_ACTIVE_HIGH>; - mux-ctl2-gpios = <&gpio 87 GPIO_ACTIVE_LOW>; - enable-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>; - }; - - rx@1 { - mux-ctl-gpios = <&gpio 88 GPIO_ACTIVE_HIGH>; - mux-ctl2-gpios = <&gpio 89 GPIO_ACTIVE_LOW>; - enable-gpios = <&gpio 124 GPIO_ACTIVE_HIGH>; - }; - - tx@0 { - mux-ctl-gpios = <&gpio 90 GPIO_ACTIVE_HIGH>; - mux-ctl2-gpios = <&gpio 91 GPIO_ACTIVE_LOW>; - enable-gpios = <&gpio 123 GPIO_ACTIVE_HIGH>; - }; - - tx@1 { - mux-ctl-gpios = <&gpio 92 GPIO_ACTIVE_LOW>; - mux-ctl2-gpios = <&gpio 93 GPIO_ACTIVE_HIGH>; - enable-gpios = <&gpio 122 GPIO_ACTIVE_HIGH>; - }; - }; -}; diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr.dtsi new file mode 100644 index 00000000000000..3c072388976c64 --- /dev/null +++ b/arch/arm64/boot/dts/xilinx/zynqmp-jupiter-sdr.dtsi @@ -0,0 +1,558 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include "zynqmp.dtsi" +#include "zynqmp-clk-ccf.dtsi" +#include +#include +#include +#include +#include + +#undef JUPITER_SDR_USB_ROLE_SW + +/ { + model = "Analog Devices, Inc. Jupiter SDR"; + compatible = "xlnx,zynqmp"; + + aliases { + ethernet0 = &gem3; + mmc0 = &sdhci1; + rtc0 = &rtc; + serial0 = &uart1; + i2c0 = &i2c1; + spi0 = &spi0; + }; + + chosen { + bootargs = "earlycon"; + stdout-path = "serial0:115200n8"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x80000000>; + }; + + psgtr_ref0: ad9542_out0_b { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <26000000>; + }; + + psgtr_ref1: ad9542_out0_a { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <108000000>; + }; + + psgtr_ref2: ad9542_out1_b { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <150000000>; + }; +}; + +&psgtr { + status = "okay"; + clocks = <&psgtr_ref0>, <&psgtr_ref1>, <&psgtr_ref2>; + clock-names = "ref0", "ref1", "ref2"; +}; + +&pinctrl0 { + status = "okay"; + + pinctrl_uart1_default: uart1-default { + mux { + groups = "uart1_4_grp"; + function = "uart1"; + }; + + conf { + groups = "uart1_4_grp"; + slew-rate = ; + io-standard = ; + }; + + conf-rx { + pins = "MIO17"; + bias-high-impedance; + }; + + conf-tx { + pins = "MIO16"; + bias-disable; + }; + }; + + pinctrl_gem3_default: gem3-default { + mux { + function = "ethernet3"; + groups = "ethernet3_0_grp"; + }; + + conf { + groups = "ethernet3_0_grp"; + slew-rate = ; + io-standard = ; + }; + + conf-rx { + pins = "MIO70", "MIO71", "MIO72", + "MIO73", "MIO74", "MIO75"; + bias-high-impedance; + low-power-disable; + }; + + conf-tx { + pins = "MIO64", "MIO65", "MIO66", + "MIO67", "MIO68", "MIO69"; + bias-disable; + low-power-enable; + }; + + mux-mdio { + function = "mdio3"; + groups = "mdio3_0_grp"; + }; + + conf-mdio { + groups = "mdio3_0_grp"; + slew-rate = ; + io-standard = ; + bias-disable; + }; + }; + + pinctrl_sdhci1_default: sdhci1-default { + mux { + groups = "sdio1_0_grp"; + function = "sdio1"; + }; + + conf { + groups = "sdio1_0_grp"; + slew-rate = ; + io-standard = ; + bias-disable; + }; + + mux-cd { + groups = "sdio1_cd_0_grp"; + function = "sdio1_cd"; + }; + + conf-cd { + groups = "sdio1_cd_0_grp"; + bias-high-impedance; + bias-pull-up; + slew-rate = ; + io-standard = ; + }; + + mux-wp { + groups = "sdio1_wp_0_grp"; + function = "sdio1_wp"; + }; + + conf-wp { + groups = "sdio1_wp_0_grp"; + bias-high-impedance; + bias-pull-up; + slew-rate = ; + io-standard = ; + }; + }; + + pinctrl_i2c1_default: i2c1-default { + mux { + groups = "i2c1_8_grp"; + function = "i2c1"; + }; + + conf { + groups = "i2c1_8_grp"; + bias-pull-up; + slew-rate = ; + io-standard = ; + }; + }; + + pinctrl_usb0_default: usb0-default { + mux { + groups = "usb0_0_grp"; + function = "usb0"; + }; + + conf { + groups = "usb0_0_grp"; + io-standard = ; + }; + + conf-rx { + pins = "MIO52", "MIO53", "MIO55"; + bias-high-impedance; + drive-strength = <12>; + slew-rate = ; + }; + + conf-tx { + pins = "MIO54", "MIO56", "MIO57", "MIO58", "MIO59", + "MIO60", "MIO61", "MIO62", "MIO63"; + bias-disable; + drive-strength = <4>; + slew-rate = ; + }; + }; +}; + +&qspi { + status = "okay"; + is-dual = <1>; + num-cs = <2>; + flash@0 { + compatible = "n25q512a", "jedec,spi-nor"; /* 32MB */ + #address-cells = <1>; + #size-cells = <1>; + reg = <0>, <1>; + parallel-memories = /bits/ 64 <0x4000000 0x4000000>; /* 64MB */ + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; /* FIXME also DUAL configuration possible */ + spi-max-frequency = <108000000>; /* Based on DC1 spec */ + partition@0 { /* for testing purpose */ + label = "qspi-fsbl-uboot"; + reg = <0x0 0x100000>; + }; + partition@100000 { /* for testing purpose */ + label = "qspi-linux"; + reg = <0x100000 0x500000>; + }; + partition@600000 { /* for testing purpose */ + label = "qspi-device-tree"; + reg = <0x600000 0x20000>; + }; + partition@620000 { /* for testing purpose */ + label = "qspi-rootfs"; + reg = <0x620000 0x5E0000>; + }; + }; +}; + +&uart1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1_default>; +}; + +&gem3 { + status = "okay"; + phy-handle = <&phy0>; + phy-mode = "rgmii-id"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gem3_default>; + + nvmem-cells = <ð0_addr>; + nvmem-cell-names = "mac-address"; + + #address-cells = <1>; + #size-cells = <0>; + + phy0: phy@f { + reg = <0xf>; + }; +}; + +&sdhci1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sdhci1_default>; + xlnx,mio_bank = <1>; +}; + +&i2c1 { + status = "okay"; + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1_default>; + + ltc2945@6a { + compatible = "adi,ltc2945"; + reg = <0x6a>; + }; + + eeprom_i2c: eeprom@50 { + compatible = "atmel,24c16"; + pagesize = <16>; + reg = <0x50>; + #address-cells = <1>; + #size-cells = <1>; + + eth0_addr: eth-mac-addr@B { + reg = <0xB 0x06>; + }; + }; + + typec_pd: usb-pd@38 { + compatible = "ti,tps6598x"; + reg = <0x38>; + interrupt-parent = <&gpio>; + interrupts = <31 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + +#ifdef JUPITER_SDR_USB_ROLE_SW + typec_con: connector { + compatible = "usb-c-connector"; + label = "USB-C"; + port { + typec_ep: endpoint { + remote-endpoint = <&otg_ep>; + }; + }; + }; +#endif + }; + + typec_pd1: usb-pd@3f { + compatible = "ti,tps6598x"; + reg = <0x3F>; + interrupt-parent = <&gpio>; + interrupts = <31 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; +}; + +&zynqmp_dpsub { + status = "okay"; + phy-names = "dp-phy0"; + phys = <&psgtr 3 PHY_TYPE_DP 0 1>, + <&psgtr 2 PHY_TYPE_DP 1 1>; +}; + +&zynqmp_dp_snd_codec0 { + status = "okay"; +}; + +&zynqmp_dp_snd_pcm0 { + status = "okay"; +}; + +&zynqmp_dp_snd_pcm1 { + status = "okay"; +}; + +&zynqmp_dp_snd_card0 { + status = "okay"; +}; + +&zynqmp_dpdma { + status = "okay"; +}; + +&sata { + status = "okay"; + ceva,p0-cominit-params = /bits/ 8 <0x18 0x40 0x18 0x28>; + ceva,p0-comwake-params = /bits/ 8 <0x06 0x14 0x08 0x0E>; + ceva,p0-burst-params = /bits/ 8 <0x13 0x08 0x4A 0x06>; + ceva,p0-retry-params = /bits/ 16 <0x96A4 0x3FFC>; + ceva,p1-cominit-params = /bits/ 8 <0x18 0x40 0x18 0x28>; + ceva,p1-comwake-params = /bits/ 8 <0x06 0x14 0x08 0x0E>; + ceva,p1-burst-params = /bits/ 8 <0x13 0x08 0x4A 0x06>; + ceva,p1-retry-params = /bits/ 16 <0x96A4 0x3FFC>; + phy-names = "sata-phy"; + phys = <&psgtr 1 PHY_TYPE_SATA 1 2>; +}; + +&usb0 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usb0_default>; +}; + +&dwc3_0 { + status = "okay"; + dr_mode = "otg"; + phy-names = "usb3-phy"; + phys = <&psgtr 0 PHY_TYPE_USB3 0 0>; + maximum-speed = "super-speed"; +#ifdef JUPITER_SDR_USB_ROLE_SW + usb-role-switch; + role-switch-default-mode = "device"; + + port@0 { + reg = <0>; + + otg_ep: endpoint { + remote-endpoint = <&typec_con>; + }; + }; +#endif +}; + +&gpio { + status = "okay"; + + usb_reset { + gpio-hog; + gpios = <13 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "usb-reset"; + }; + + fan_ctl { + gpio-hog; + gpios = <145 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "fan-ctl"; + }; +}; + +&spi0 { + status = "okay"; +}; + +&watchdog0 { + status = "okay"; +}; + +&xilinx_ams { + status = "okay"; +}; + +&ams_ps { + status = "okay"; +}; + +&ams_pl { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +/ { + fpga_axi: axi_pl { + interrupt-parent = <&gic>; + compatible = "simple-bus"; + #address-cells = <0x1>; + #size-cells = <0x1>; + ranges = <0 0 0 0xffffffff>; + + rx1_dma: dma@84A30000 { + compatible = "adi,axi-dmac-1.00.a"; + reg = <0x84A30000 0x10000>; + #dma-cells = <1>; + interrupts = <0 109 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&zynqmp_clk 71>; + }; + + tx1_dma: dma@84A50000 { + compatible = "adi,axi-dmac-1.00.a"; + reg = <0x84A50000 0x10000>; + #dma-cells = <1>; + interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&zynqmp_clk 71>; + }; + + axi_adrv9002_core_rx1: axi-adrv9002-rx-lpc@84A00000 { + compatible = "adi,axi-adrv9002-rx-1.0"; + reg = <0x84A00000 0x6000>; + clocks = <&adc0_adrv9002 0>; + dmas = <&rx1_dma 0>; + dma-names = "rx"; + spibus-connected = <&adc0_adrv9002>; + }; + + axi_adrv9002_core_tx1: axi-adrv9002-tx-lpc@84A04000 { + compatible = "adi,axi-adrv9002-tx-1.0"; + reg = <0x84A0A000 0x2000>; + clocks = <&adc0_adrv9002 1>; + clock-names = "sampl_clk"; + dmas = <&tx1_dma 0>; + dma-names = "tx"; + adi,axi-dds-default-scale = <0x800>; + adi,axi-dds-default-frequency = <2000000>; + }; + + axi_sysid_0: axi-sysid-0@85000000 { + compatible = "adi,axi-sysid-1.00.a"; + reg = <0x85000000 0x10000>; + }; + }; + + gpio-keys-power { + #address-cells = <1>; + #size-cells = <0>; + compatible = "gpio-keys"; + + power { + interrupt-parent = <&gpio>; + interrupts = <20 IRQ_TYPE_EDGE_FALLING>; + label = "Power"; + linux,code = ; + gpio-key,wakeup; + }; + }; +}; + +#define fmc_spi spi0 + +#include "adi-adrv9002.dtsi" + +/ { + clocks { + adrv9002_clkin2: clock2 { + compatible = "fixed-clock"; + + clock-frequency = <30720000>; + clock-output-names = "adrv9002_refclk_mux0"; + #clock-cells = <0>; + }; + }; + + adrv9002_clk_mux: clk-mux { + #clock-cells = <0>; + compatible = "gpio-mux-clock"; + /* 30.72MHz, 38.4MHz */ + clocks = <&adrv9002_clkin2>, <&adrv9002_clkin>; + clock-output-names = "adrv9002_ext_refclk"; + select-gpios = <&gpio 79 GPIO_ACTIVE_HIGH>; + }; +}; + +&adrv9002_clkin { + clock-output-names = "adrv9002_refclk_mux1"; +}; + +&adc0_adrv9002 { + reset-gpios = <&gpio 81 GPIO_ACTIVE_LOW>; + interrupts = <78 IRQ_TYPE_EDGE_RISING>; + + clocks = <&adrv9002_clk_mux>; + + adi,channels { + rx@0 { + mux-ctl-gpios = <&gpio 86 GPIO_ACTIVE_HIGH>; + mux-ctl2-gpios = <&gpio 87 GPIO_ACTIVE_LOW>; + enable-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>; + }; + + rx@1 { + mux-ctl-gpios = <&gpio 88 GPIO_ACTIVE_HIGH>; + mux-ctl2-gpios = <&gpio 89 GPIO_ACTIVE_LOW>; + enable-gpios = <&gpio 124 GPIO_ACTIVE_HIGH>; + }; + + tx@0 { + mux-ctl-gpios = <&gpio 90 GPIO_ACTIVE_HIGH>; + mux-ctl2-gpios = <&gpio 91 GPIO_ACTIVE_LOW>; + enable-gpios = <&gpio 123 GPIO_ACTIVE_HIGH>; + }; + + tx@1 { + mux-ctl-gpios = <&gpio 92 GPIO_ACTIVE_LOW>; + mux-ctl2-gpios = <&gpio 93 GPIO_ACTIVE_HIGH>; + enable-gpios = <&gpio 122 GPIO_ACTIVE_HIGH>; + }; + }; +}; +