Skip to contentSkip to conversation

AM57x EVM Device Tree Overlays

PATCH Superseded Andrew Davis 2 participants 5 messages Oct 14, 2022 – Nov 1, 2022

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

cover AM57x EVM Device Tree Overlays

Hello all,

These is an uncontroversial (hopefully) DT Overlay to support the TI AM57x EVM. More complex cases are staged and ready to follow but wanted to test the water with this one.

For some reason dtbs_check does not get run on overlays, this will need further investigation to fix in kbuild. For now I ran it through manually but am not 100% sure it actually checked it, so double checks here very welcome.

Series depends on https://www.spinics.net/lists/kernel/msg4548509.html

Thanks,
Andrew

Andrew Davis (2):
ARM: dts: ti: Add AM57xx GP EVM board support
ARM: dts: ti: Add AM57xx GP EVM Rev A3 board support

 arch/arm/boot/dts/Makefile        |   4 +
 arch/arm/boot/dts/am57xx-evm.dtso | 127 ++++++++++++++++++++++++++++++
 2 files changed, 131 insertions(+)
 create mode 100644 arch/arm/boot/dts/am57xx-evm.dtso
Signature · 1 line
2.37.3
#1 lore raw

PATCH 1/2 ARM: dts: ti: Add AM57xx GP EVM board support

The AM57xx GP EVM boards are built on top the AM57xx BeagleBoard-X15. The EVM extends the BeagleBoard by adding a touchscreen, some buttons, and a handful of peripheral extension slots.

Being a plugin extension of an existing standalone board; we define the am57xx-evm as a composite-DTB of the base am57xx-beagle-x15 and a new am57xx-evm overlay.

---
 arch/arm/boot/dts/Makefile        |   2 +
 arch/arm/boot/dts/am57xx-evm.dtso | 127 ++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+)
 create mode 100644 arch/arm/boot/dts/am57xx-evm.dtso
arch/arm/boot/dts/Makefile +2 -0
index 6aa7dc4db2fc..767220502021 100644
@@ -984,10 +984,12 @@ dtb-$(CONFIG_SOC_OMAP5) += \
 	omap5-igep0050.dtb \
 	omap5-sbc-t54.dtb \
 	omap5-uevm.dtb
+am57xx-evm-dtbs := am57xx-beagle-x15.dtb am57xx-evm.dtbo
 dtb-$(CONFIG_SOC_DRA7XX) += \
 	am57xx-beagle-x15.dtb \
 	am57xx-beagle-x15-revb1.dtb \
 	am57xx-beagle-x15-revc.dtb \
+	am57xx-evm.dtb \
 	am5729-beagleboneai.dtb \
 	am57xx-cl-som-am57x.dtb \
 	am57xx-sbc-am57x.dtb \
arch/arm/boot/dts/am57xx-evm.dtso new file +127 -0

127 lines not on this page · raw message

Signature · 1 line
2.37.3
#2 lore raw

Re: [PATCH 1/2] ARM: dts: ti: Add AM57xx GP EVM board support

Quoted 47 lines · Andrew Davis

The AM57xx GP EVM boards are built on top the AM57xx BeagleBoard-X15. The EVM extends the BeagleBoard by adding a touchscreen, some buttons, and a handful of peripheral extension slots.

Being a plugin extension of an existing standalone board; we define the am57xx-evm as a composite-DTB of the base am57xx-beagle-x15 and a new am57xx-evm overlay.

---
 arch/arm/boot/dts/Makefile        |   2 +
 arch/arm/boot/dts/am57xx-evm.dtso | 127 ++++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+)
 create mode 100644 arch/arm/boot/dts/am57xx-evm.dtso
arch/arm/boot/dts/Makefile +2 -0
index 6aa7dc4db2fc..767220502021 100644
@@ -984,10 +984,12 @@ dtb-$(CONFIG_SOC_OMAP5) += \
 	omap5-igep0050.dtb \
 	omap5-sbc-t54.dtb \
 	omap5-uevm.dtb
+am57xx-evm-dtbs := am57xx-beagle-x15.dtb am57xx-evm.dtbo
 dtb-$(CONFIG_SOC_DRA7XX) += \
 	am57xx-beagle-x15.dtb \
 	am57xx-beagle-x15-revb1.dtb \
 	am57xx-beagle-x15-revc.dtb \
+	am57xx-evm.dtb \
 	am5729-beagleboneai.dtb \
 	am57xx-cl-som-am57x.dtb \
 	am57xx-sbc-am57x.dtb \
arch/arm/boot/dts/am57xx-evm.dtso new file +6 -0
new file mode 100644
index 000000000000..6678aaef66ee
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * DT overlay for AM57xx GP EVM boards
+ *
+ * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
+ */

arch/arm/boot/dts/am57xx-evm.dtso line 16

Quoted 10 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +10 -0
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+&{/} {
+	compatible = "ti,am5728-evm", "ti,am572x-beagle-x15", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";

You should start documenting these...

Quoted 52 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +52 -0
+	model = "TI AM5728 EVM";
+
+	aliases {
+		display0 = "/display";
+		display1 = "/connector"; // Fixme: &lcd0 and &hdmi0 could be
+					 // resolved here correcly based on
+					 // information in the base dtb symbol
+					 // table with a fix in dtc
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		button-user1 {
+			gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
+			label = "USER1";
+			linux,code = <BTN_1>;
+		};
+
+		button-user2 {
+			gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
+			label = "USER2";
+			linux,code = <BTN_2>;
+		};
+
+		button-user3 {
+			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
+			label = "USER3";
+			linux,code = <BTN_3>;
+		};
+
+		button-user4 {
+			gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
+			label = "USER4";
+			linux,code = <BTN_4>;
+		};
+
+		button-user5 {
+			gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+			label = "USER5";
+			linux,code = <BTN_5>;
+		};
+	};
+
+	lcd0: display {
+		compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
+		backlight = <&lcd_bl>;
+		enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+		label = "lcd";
+
+		port {
+			lcd_in: endpoint {

arch/arm/boot/dts/am57xx-evm.dtso line 78

Quoted 10 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +10 -0
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+	};
+
+	lcd_bl: backlight {
+		compatible = "pwm-backlight";
+		brightness-levels = <0 243 245 247 249 251 252 253 255>;
+		default-brightness-level = <8>;
+		pwms = <&ehrpwm1 0 50000 0>;

Don't you have here PWM flag?

Quoted 9 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +9 -0
+	};
+};
+
+&ehrpwm1 {
+	status = "okay";
+};
+
+&epwmss1 {
+	status = "okay";

arch/arm/boot/dts/am57xx-evm.dtso line 97

Quoted 10 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +10 -0
+};
+
+&i2c5 {
+	status = "okay";
+	clock-frequency = <400000>;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	pixcir_ts@5c {

No underscores in node names.

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

arch/arm/boot/dts/am57xx-evm.dtso line 101

Quoted 4 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +4 -0
+		compatible = "pixcir,pixcir_tangoc";
+		attb-gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
+		interrupt-parent = <&gpio2>;
+		interrupts = <4 0>;

Use proper flags (and not NONE).

arch/arm/boot/dts/am57xx-evm.dtso line 105

Quoted 4 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +4 -0
+		reg = <0x5c>;
+		reset-gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
+		touchscreen-size-x = <1024>;
+		touchscreen-size-y = <600>;

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH 1/2] ARM: dts: ti: Add AM57xx GP EVM board support

Quoted 52 lines · Krzysztof Kozlowski
Quoted 51 lines · Andrew Davis

The AM57xx GP EVM boards are built on top the AM57xx BeagleBoard-X15. The EVM extends the BeagleBoard by adding a touchscreen, some buttons, and a handful of peripheral extension slots.

Being a plugin extension of an existing standalone board; we define the am57xx-evm as a composite-DTB of the base am57xx-beagle-x15 and a new am57xx-evm overlay.

---
  arch/arm/boot/dts/Makefile        |   2 +
  arch/arm/boot/dts/am57xx-evm.dtso | 127 ++++++++++++++++++++++++++++++
  2 files changed, 129 insertions(+)

create mode 100644 arch/arm/boot/dts/am57xx-evm.dtso

arch/arm/boot/dts/Makefile +2 -0
index 6aa7dc4db2fc..767220502021 100644
@@ -984,10 +984,12 @@ dtb-$(CONFIG_SOC_OMAP5) += \
  	omap5-igep0050.dtb \
  	omap5-sbc-t54.dtb \
  	omap5-uevm.dtb
+am57xx-evm-dtbs := am57xx-beagle-x15.dtb am57xx-evm.dtbo
  dtb-$(CONFIG_SOC_DRA7XX) += \
  	am57xx-beagle-x15.dtb \
  	am57xx-beagle-x15-revb1.dtb \
  	am57xx-beagle-x15-revc.dtb \
+	am57xx-evm.dtb \
  	am5729-beagleboneai.dtb \
  	am57xx-cl-som-am57x.dtb \
  	am57xx-sbc-am57x.dtb \
arch/arm/boot/dts/am57xx-evm.dtso new file +10 -0
new file mode 100644
index 000000000000..6678aaef66ee
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * DT overlay for AM57xx GP EVM boards
+ *
+ * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
Quoted 9 lines

arch/arm/boot/dts/am57xx-evm.dtso line 16

Quoted 6 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +6 -0
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+&{/} {
+	compatible = "ti,am5728-evm", "ti,am572x-beagle-x15", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";

You should start documenting these...

There are some odd bindings in the current txt based docs, will need some time the fixup:

https://www.kernel.org/doc/Documentation/devicetree/bindings/arm/omap/omap.txt

I'll try converting this over to yaml after this series.

Quoted 56 lines
Quoted 56 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +56 -0
+	model = "TI AM5728 EVM";
+
+	aliases {
+		display0 = "/display";
+		display1 = "/connector"; // Fixme: &lcd0 and &hdmi0 could be
+					 // resolved here correcly based on
+					 // information in the base dtb symbol
+					 // table with a fix in dtc
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		button-user1 {
+			gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
+			label = "USER1";
+			linux,code = <BTN_1>;
+		};
+
+		button-user2 {
+			gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
+			label = "USER2";
+			linux,code = <BTN_2>;
+		};
+
+		button-user3 {
+			gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
+			label = "USER3";
+			linux,code = <BTN_3>;
+		};
+
+		button-user4 {
+			gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
+			label = "USER4";
+			linux,code = <BTN_4>;
+		};
+
+		button-user5 {
+			gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+			label = "USER5";
+			linux,code = <BTN_5>;
+		};
+	};
+
+	lcd0: display {
+		compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
+		backlight = <&lcd_bl>;
+		enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+		label = "lcd";
+
+		port {
+			lcd_in: endpoint {
+				remote-endpoint = <&dpi_out>;
+			};
+		};
+	};
Quoted 9 lines

arch/arm/boot/dts/am57xx-evm.dtso line 78

Quoted 6 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +6 -0
+
+	lcd_bl: backlight {
+		compatible = "pwm-backlight";
+		brightness-levels = <0 243 245 247 249 251 252 253 255>;
+		default-brightness-level = <8>;
+		pwms = <&ehrpwm1 0 50000 0>;

Don't you have here PWM flag?

The invert flag? Nope, this is not inverted. And there is no define for none, just 0.

Quoted 22 lines
Quoted 9 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +9 -0
+	};
+};
+
+&ehrpwm1 {
+	status = "okay";
+};
+
+&epwmss1 {
+	status = "okay";

arch/arm/boot/dts/am57xx-evm.dtso line 97

Quoted 10 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +10 -0
+};
+
+&i2c5 {
+	status = "okay";
+	clock-frequency = <400000>;
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	pixcir_ts@5c {

No underscores in node names.

Quoted 3 lines

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

ACK

Quoted 7 lines

arch/arm/boot/dts/am57xx-evm.dtso line 101

Quoted 4 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +4 -0
+		compatible = "pixcir,pixcir_tangoc";
+		attb-gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
+		interrupt-parent = <&gpio2>;
+		interrupts = <4 0>;

Use proper flags (and not NONE).

ACK, will fix.

Thanks,
Andrew

Quoted 7 lines

arch/arm/boot/dts/am57xx-evm.dtso line 105

Quoted 4 lines
arch/arm/boot/dts/am57xx-evm.dtso new file +4 -0
+		reg = <0x5c>;
+		reset-gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
+		touchscreen-size-x = <1024>;
+		touchscreen-size-y = <600>;

Best regards,
Krzysztof

#4 lore raw

PATCH 2/2 ARM: dts: ti: Add AM57xx GP EVM Rev A3 board support

In reply to Andrew Davis

The A3 revision of the AM57xx GP EVM has the same EVM feature set as the original but is paired with an updated revision C BeagleBoard X15.

DT Overlays allow us to model this in the same way, we simply apply the EVM overlay to the Rev C BeagleBoard to create the Rev A3 AM57xx GP EVM.

---
 arch/arm/boot/dts/Makefile | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/boot/dts/Makefile +2 -0
index 767220502021..d9a20473e947 100644
@@ -985,11 +985,13 @@ dtb-$(CONFIG_SOC_OMAP5) += \
 	omap5-sbc-t54.dtb \
 	omap5-uevm.dtb
 am57xx-evm-dtbs := am57xx-beagle-x15.dtb am57xx-evm.dtbo
+am57xx-evm-reva3-dtbs := am57xx-beagle-x15-revc.dtb am57xx-evm.dtbo
 dtb-$(CONFIG_SOC_DRA7XX) += \
 	am57xx-beagle-x15.dtb \
 	am57xx-beagle-x15-revb1.dtb \
 	am57xx-beagle-x15-revc.dtb \
 	am57xx-evm.dtb \
+	am57xx-evm-reva3.dtb \
 	am5729-beagleboneai.dtb \
 	am57xx-cl-som-am57x.dtb \
 	am57xx-sbc-am57x.dtb \
Signature · 1 line
2.37.3