Re: [RFC] arm64: dts: ti: introduce a minimal am642 device tree

From: Krzysztof Kozlowski
Date: Tue Mar 22 2022 - 14:14:19 EST


On 21/03/2022 16:54, Bryan Brattlof wrote:
> Texas Instrument's am642 is one of many k3 based, low cost, low power,
> chips designed to work in a wide range of applications spanning an even
> wider range of industries that TI is actively developing
>
> With its pin-mux and peripheral rich designs, these chips will likely
> have a multitude of custom device trees that range wildly from one
> another and (hopefully) guarantee an influx of variants into the kernel
> in the coming years
>
> With overlays no longer a thing, I wanted to ask for opinions on how
> we can best help integrate these dt files as they begin to be developed
>
> I also wanted to introduce a skeletonized (nothing but uart) device tree
> to give others a good starting point while developing their projects.

Real hardware as DTS please. There is no need to add some skeleton for
specific SoC. What if every SoC goes that way?

Feel free to create re-usable components in DTSI ways, still reflecting
some hardware parts.

>
> Let me know what you think :)
>
> Signed-off-by: Bryan Brattlof <bb@xxxxxx>
> ---
> .../devicetree/bindings/arm/ti/k3.yaml | 1 +
> arch/arm64/boot/dts/ti/Makefile | 1 +
> arch/arm64/boot/dts/ti/k3-am642-skeleton.dts | 335 ++++++++++++++++++
> 3 files changed, 337 insertions(+)
> create mode 100644 arch/arm64/boot/dts/ti/k3-am642-skeleton.dts
>
> diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
> index 61c6ab4f52e26..e65053d6465bd 100644
> --- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
> +++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
> @@ -55,6 +55,7 @@ properties:
> - description: K3 AM642 SoC
> items:
> - enum:
> + - ti,am642-generic

Real hardware is needed.

> - ti,am642-evm
> - ti,am642-sk
> - const: ti,am642
> diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
> index 02e5d80344d00..df7bdf087558c 100644
> --- a/arch/arm64/boot/dts/ti/Makefile
> +++ b/arch/arm64/boot/dts/ti/Makefile
> @@ -19,6 +19,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j7200-common-proc-board.dtb
>
> dtb-$(CONFIG_ARCH_K3) += k3-j721s2-common-proc-board.dtb
>
> +dtb-$(CONFIG_ARCH_K3) += k3-am642-skeleton.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
> dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am642-skeleton.dts b/arch/arm64/boot/dts/ti/k3-am642-skeleton.dts
> new file mode 100644
> index 0000000000000..2b789c9c25ced
> --- /dev/null
> +++ b/arch/arm64/boot/dts/ti/k3-am642-skeleton.dts
> @@ -0,0 +1,335 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * The absolute minimum DTS file needed for an AM642
> + */
> +
> +/dts-v1/;
> +
> +#include <dt-bindings/pinctrl/k3.h>
> +#include "k3-am642.dtsi"
> +
> +/ {
> + compatible = "ti,am642-generic", "ti,am642";
> + model = "Texas Instruments AM642 Generic";
> +
> + chosen {
> + stdout-path = "serial2:115200n8";
> + bootargs = "console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000";


No development bootargs.

> + };
> +
> + cpus {
> + /delete-node/ cpu@1;

A bit weird... especially without any comment.

> + };
> +
> + memory@80000000 {
> + device_type = "memory";
> + reg = <0x00000000 0x20000000 0x00000000 0x20000000>;
> + };
> +
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> + ranges;
> +
> + secure_ddr: optee@9e800000 {
> + reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */
> + alignment = <0x1000>;
> + no-map;
> + };
> + };
> +};
> +
> +/* reserved for mcu firmware */
> +&mcu_gpio0 {
> + status = "reserved";
> +};
> +
> +&mcu_i2c0 {
> + status = "disabled";
> +};
> +

Judging by this file - several disabled or reserved blocks - this does
not look at all usable. What's the point? How does it even help anyone?


Best regards,
Krzysztof