Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arm64: dts: ti: Add DT overlay for PCIe + USB2.0 SERDES personality card

Enable both SERDES and PCIe DT nodes in order to get PCIe working on
the SERDES PCIe x2 personality card.

The daughter card also has a USB 2.0 dual-role port. As the base board
already supports a 2.0 dual-role port, enable the port on the SERDES
card to be a host only port.

This will prevent user confusion as having 2 ports in device mode often
leads to confusion as to which port is bound to the gadget function driver.

The PCIe x2 card is provided with the AM65x IDK configuration [1]
so apply the overlay to k3-am654-idk.dtb

[1] https://www.ti.com/lit/ug/spruim6a/spruim6a.pdf

Co-developed-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Link: https://lore.kernel.org/r/20240208-for-v6-9-am65-overlays-2-0-v2-2-70bae3e91597@kernel.org
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>

authored by

Roger Quadros and committed by
Vignesh Raghavendra
32b366a5 8ada14ca

+61 -1
+2 -1
arch/arm64/boot/dts/ti/Makefile
··· 47 47 # Boards with AM65x SoC 48 48 k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb k3-am654-base-board-rocktech-rk101-panel.dtbo 49 49 k3-am654-evm-dtbs := k3-am654-base-board.dtb k3-am654-icssg2.dtbo 50 - k3-am654-idk-dtbs := k3-am654-evm.dtb k3-am654-idk.dtbo 50 + k3-am654-idk-dtbs := k3-am654-evm.dtb k3-am654-idk.dtbo k3-am654-pcie-usb2.dtbo 51 51 dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb 52 52 dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic-pg2.dtb 53 53 dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb ··· 58 58 dtb-$(CONFIG_ARCH_K3) += k3-am654-evm.dtb 59 59 dtb-$(CONFIG_ARCH_K3) += k3-am654-idk.dtb 60 60 dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board-rocktech-rk101-panel.dtbo 61 + dtb-$(CONFIG_ARCH_K3) += k3-am654-pcie-usb2.dtbo 61 62 62 63 # Boards with J7200 SoC 63 64 k3-j7200-evm-dtbs := k3-j7200-common-proc-board.dtb k3-j7200-evm-quad-port-eth-exp.dtbo
+59
arch/arm64/boot/dts/ti/k3-am654-pcie-usb2.dtso
··· 1 + // SPDX-License-Identifier: GPL-2.0-only OR MIT 2 + /** 3 + * DT overlay for SERDES personality card: 2lane PCIe + USB2.0 Host on AM654 EVM 4 + * 5 + * Copyright (C) 2018-2024 Texas Instruments Incorporated - https://www.ti.com/ 6 + */ 7 + 8 + /dts-v1/; 9 + /plugin/; 10 + #include <dt-bindings/gpio/gpio.h> 11 + #include <dt-bindings/phy/phy.h> 12 + #include <dt-bindings/phy/phy-am654-serdes.h> 13 + #include "k3-pinctrl.h" 14 + 15 + &serdes0 { 16 + assigned-clocks = <&k3_clks 153 4>, 17 + <&serdes0 AM654_SERDES_CMU_REFCLK>, 18 + <&serdes0 AM654_SERDES_RO_REFCLK>; 19 + assigned-clock-parents = <&k3_clks 153 8>, 20 + <&k3_clks 153 4>, 21 + <&k3_clks 153 4>; 22 + status = "okay"; 23 + }; 24 + 25 + &serdes1 { 26 + assigned-clocks = <&serdes1 AM654_SERDES_CMU_REFCLK>; 27 + assigned-clock-parents = <&serdes0 AM654_SERDES_RO_REFCLK>; 28 + status = "okay"; 29 + }; 30 + 31 + &pcie0_rc { 32 + num-lanes = <2>; 33 + phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>; 34 + phy-names = "pcie-phy0", "pcie-phy1"; 35 + reset-gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>; 36 + status = "okay"; 37 + }; 38 + 39 + &main_pmx0 { 40 + usb0_pins_default: usb0-default-pins { 41 + pinctrl-single,pins = < 42 + AM65X_IOPAD(0x02bc, PIN_OUTPUT, 0) /* (AD9) USB0_DRVVBUS */ 43 + >; 44 + }; 45 + }; 46 + 47 + &dwc3_0 { 48 + status = "okay"; 49 + }; 50 + 51 + &usb0_phy { 52 + status = "okay"; 53 + }; 54 + 55 + &usb0 { 56 + pinctrl-names = "default"; 57 + pinctrl-0 = <&usb0_pins_default>; 58 + dr_mode = "host"; 59 + };