From: Josua Mayer Date: Wed, 1 Jan 2025 12:30:22 +0000 (+0100) Subject: arm64: dts: ti: k3-am642-hummingboard-t: Convert overlay to board dts X-Git-Tag: v6.14-rc1~103^2~7^2~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e2b69180431968250bf3c0c581155f1b37d057c1;p=linux-block.git arm64: dts: ti: k3-am642-hummingboard-t: Convert overlay to board dts SolidRun HummingBoard-T has two options for M.2 connector, supporting either PCI-E or USB-3.1 Gen 1 - depending on configuration of a mux on the serdes lane. The required configurations in device-tree were modeled as overlays. The USB-3.1 overlay uses /delete-property/ to unset a boolean property on the usb controller limiting it to USB-2.0 by default. Overlays can not delete a property from the base dtb, therefore this overlay is at this time useless. Convert both overlays into full dts by including the base board dts. While the pcie overlay was functional, both are converted for a consistent user experience when selecting between the two mutually exclusive configurations. Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/linux-devicetree/CAMuHMdXTgpTnJ9U7egC2XjFXXNZ5uiY1O+WxNd6LPJW5Rs5KTw@mail.gmail.com Fixes: bbef42084cc1 ("arm64: dts: ti: hummingboard-t: add overlays for m.2 pci-e and usb-3") Signed-off-by: Josua Mayer Link: https://lore.kernel.org/r/20250101-am64-hb-fix-overlay-v2-1-78143f5da28c@solid-run.com Signed-off-by: Nishanth Menon --- diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index db5ae27467e7..8a4bdf87e2d4 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -42,10 +42,6 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-csi2-imx219.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-hdmi-audio.dtbo # Boards with AM64x SoC -k3-am642-hummingboard-t-pcie-dtbs := \ - k3-am642-hummingboard-t.dtb k3-am642-hummingboard-t-pcie.dtbo -k3-am642-hummingboard-t-usb3-dtbs := \ - k3-am642-hummingboard-t.dtb k3-am642-hummingboard-t-usb3.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-icssg1-dualemac.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-icssg1-dualemac-mii.dtbo diff --git a/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dts b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dts new file mode 100644 index 000000000000..023b2a6aaa56 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dts @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2023 Josua Mayer + * + * DTS for SolidRun AM642 HummingBoard-T, + * running on Cortex A53, with PCI-E. + * + */ + +#include "k3-am642-hummingboard-t.dts" + +#include "k3-serdes.h" + +/ { + model = "SolidRun AM642 HummingBoard-T with PCI-E"; +}; + +&pcie0_rc { + pinctrl-names = "default"; + pinctrl-0 = <&pcie0_default_pins>; + reset-gpios = <&main_gpio1 15 GPIO_ACTIVE_HIGH>; + phys = <&serdes0_link>; + phy-names = "pcie-phy"; + num-lanes = <1>; + status = "okay"; +}; + +&serdes0 { + #address-cells = <1>; + #size-cells = <0>; + + serdes0_link: phy@0 { + reg = <0>; + cdns,num-lanes = <1>; + cdns,phy-type = ; + #phy-cells = <0>; + resets = <&serdes_wiz0 1>; + }; +}; + +&serdes_ln_ctrl { + idle-states = ; +}; + +&serdes_mux { + idle-state = <1>; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dtso b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dtso deleted file mode 100644 index bd9a5caf20da..000000000000 --- a/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dtso +++ /dev/null @@ -1,45 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2023 Josua Mayer - * - * Overlay for SolidRun AM642 HummingBoard-T to enable PCI-E. - */ - -/dts-v1/; -/plugin/; - -#include -#include - -#include "k3-serdes.h" - -&pcie0_rc { - pinctrl-names = "default"; - pinctrl-0 = <&pcie0_default_pins>; - reset-gpios = <&main_gpio1 15 GPIO_ACTIVE_HIGH>; - phys = <&serdes0_link>; - phy-names = "pcie-phy"; - num-lanes = <1>; - status = "okay"; -}; - -&serdes0 { - #address-cells = <1>; - #size-cells = <0>; - - serdes0_link: phy@0 { - reg = <0>; - cdns,num-lanes = <1>; - cdns,phy-type = ; - #phy-cells = <0>; - resets = <&serdes_wiz0 1>; - }; -}; - -&serdes_ln_ctrl { - idle-states = ; -}; - -&serdes_mux { - idle-state = <1>; -}; diff --git a/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dts b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dts new file mode 100644 index 000000000000..ee9bd618f370 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dts @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2023 Josua Mayer + * + * DTS for SolidRun AM642 HummingBoard-T, + * running on Cortex A53, with USB-3.1 Gen 1. + * + */ + +#include "k3-am642-hummingboard-t.dts" + +#include "k3-serdes.h" + +/ { + model = "SolidRun AM642 HummingBoard-T with USB-3.1 Gen 1"; +}; + +&serdes0 { + #address-cells = <1>; + #size-cells = <0>; + + serdes0_link: phy@0 { + reg = <0>; + cdns,num-lanes = <1>; + cdns,phy-type = ; + #phy-cells = <0>; + resets = <&serdes_wiz0 1>; + }; +}; + +&serdes_ln_ctrl { + idle-states = ; +}; + +&serdes_mux { + idle-state = <0>; +}; + +&usbss0 { + /delete-property/ ti,usb2-only; +}; + +&usb0 { + maximum-speed = "super-speed"; + phys = <&serdes0_link>; + phy-names = "cdns3,usb3-phy"; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso deleted file mode 100644 index ffcc3bd3c7bc..000000000000 --- a/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso +++ /dev/null @@ -1,44 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (C) 2023 Josua Mayer - * - * Overlay for SolidRun AM642 HummingBoard-T to enable USB-3.1. - */ - -/dts-v1/; -/plugin/; - -#include - -#include "k3-serdes.h" - -&serdes0 { - #address-cells = <1>; - #size-cells = <0>; - - serdes0_link: phy@0 { - reg = <0>; - cdns,num-lanes = <1>; - cdns,phy-type = ; - #phy-cells = <0>; - resets = <&serdes_wiz0 1>; - }; -}; - -&serdes_ln_ctrl { - idle-states = ; -}; - -&serdes_mux { - idle-state = <0>; -}; - -&usbss0 { - /delete-property/ ti,usb2-only; -}; - -&usb0 { - maximum-speed = "super-speed"; - phys = <&serdes0_link>; - phy-names = "cdns3,usb3-phy"; -};