lkml.org 
[lkml]   [2024]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 5/5] arm64: dts: ti: hummingboard-t: add descriptions for m.2 pci-e and usb-3
From
On 1/12/24 11:12 AM, Josua Mayer wrote:
> HummingBoard-T features two M.2 connectors labeled "M1" and "M2".
> The single SerDes lane of the SoC can be routed to either M1 pci-e
> signals, or M2 usb-3 signals by a gpio-controlled mux.
>
> Add dedicated dts for each configuration.
> - k3-am642-hummingboard-t.dts enables neither configuration
> - k3-am642-hummingboard-t-pcie.dts (new)
> configures serdes mux and pci-e controller for M1
> - k3-am642-hummingboard-t-usb3.dts (new)
> configures serdes mux and usb-3 controller for M2
>
> Signed-off-by: Josua Mayer <josua@solid-run.com>
> ---
> arch/arm64/boot/dts/ti/Makefile | 2 ++
> .../boot/dts/ti/k3-am642-hummingboard-t-pcie.dts | 31 ++++++++++++++++++
> .../boot/dts/ti/k3-am642-hummingboard-t-usb3.dts | 37 ++++++++++++++++++++++
> 3 files changed, 70 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
> index 041c3b71155e..0e408555edf1 100644
> --- a/arch/arm64/boot/dts/ti/Makefile
> +++ b/arch/arm64/boot/dts/ti/Makefile
> @@ -33,6 +33,8 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
> # Boards with AM64x SoC
> dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t.dtb
> +dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-pcie.dtb
> +dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-usb3.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb
> 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..5ba0029fcfb9
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dts
> @@ -0,0 +1,31 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2023 Josua Mayer <josua@solid-run.com>
> + *
> + * DTS for SolidRun AM642 HummingBoard-T,
> + * running on Cortex A53, with PCI-E.
> + *
> + */
> +
> +#include "k3-am642-hummingboard-t.dts"

Avoid including .dts files, if this file is for an option that
can be chosen (PCIe vs USB3), then it should be a DT overlay.

> +#include "k3-serdes.h"
> +
> +/ {
> + model = "SolidRun AM642 HummingBoard-T with PCI-E";
> +};
> +
> +&pcie0_rc {
> + status = "okay";

If PCIe is only available here when using this add-on then
all of the node data should be in this add-on file.

Andrew

> +};
> +
> +&serdes0_link {
> + cdns,phy-type = <PHY_TYPE_PCIE>;
> +};
> +
> +&serdes_ln_ctrl {
> + idle-states = <AM64_SERDES0_LANE0_PCIE0>;
> +};
> +
> +&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..12b0fedcd2bc
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dts
> @@ -0,0 +1,37 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2023 Josua Mayer <josua@solid-run.com>
> + *
> + * 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_link {
> + cdns,phy-type = <PHY_TYPE_USB3>;
> +};
> +
> +&serdes_ln_ctrl {
> + idle-states = <AM64_SERDES0_LANE0_USB>;
> +};
> +
> +&serdes_mux {
> + idle-state = <0>;
> +};
> +
> +&usbss0 {
> + /delete-property/ ti,usb2-only;
> +};
> +
> +&usb0 {
> + maximum-speed = "super-speed";
> + phys = <&serdes0_link>;
> + phy-names = "cdns3,usb3-phy";
> +};
>

\
 
 \ /
  Last update: 2024-01-12 19:00    [W:0.116 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site