Skip to content

Instantly share code, notes, and snippets.

@DhruvaG2000
Created February 6, 2026 05:50
Show Gist options
  • Select an option

  • Save DhruvaG2000/cae159f1dc0a8ac47877ddd0fc8c1525 to your computer and use it in GitHub Desktop.

Select an option

Save DhruvaG2000/cae159f1dc0a8ac47877ddd0fc8c1525 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: GPL-2.0-only or MIT
/*
* Low Power Mode Demo Device Tree file for the AM62L3 Starter Kit
* Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
*/
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/net/ti-dp83867.h>
#include "k3-am62l3.dtsi"
#include "k3-pinctrl.h"
/ {
compatible = "ti,am62l3-evm", "ti,am62l3";
model = "Texas Instruments AM62L3 EVM";
chosen {
stdout-path = &main_uart0;
};
idle-states {
entry-method = "psci";
CLST_STBY: STBY {
compatible = "arm,idle-state";
idle-state-name = "Standby";
arm,psci-suspend-param = <0x00000001>;
entry-latency-us = <300>;
exit-latency-us = <600>;
min-residency-us = <1000>;
};
CPU_PDOWN: CPUPDOWN {
compatible = "arm,idle-state";
/* arm,psci-suspend-param = <0x2012233>; */
arm,psci-suspend-param = <0x012233>;
/* arm,psci-suspend-param = <0x00001>; */
entry-latency-us = <10000>;
exit-latency-us = <10000>;
min-residency-us = <500000>;
local-timer-stop;
};
CLST_LOST: LOST {
compatible = "arm,idle-state";
/* arm,psci-suspend-param = <0x2012233>; */
arm,psci-suspend-param = <0x1012233>;
/* arm,psci-suspend-param = <0x00001>; */
entry-latency-us = <10000>;
exit-latency-us = <1000>;
min-residency-us = <500000>;
local-timer-stop;
};
};
domain-idle-states {
main_sleep_0: main-deep-sleep {
compatible = "domain-idle-state";
arm,psci-suspend-param = <0x2012235>;
/* arm,psci-suspend-param = <0x3>; */
entry-latency-us = <1000>;
exit-latency-us = <1000>;
min-residency-us = <500000>;
local-timer-stop;
};
main_sleep_1: main-sleep-rtcddr {
compatible = "domain-idle-state";
arm,psci-suspend-param = <0x2012234>;
/* arm,psci-suspend-param = <0x1000001>; */
local-timer-stop;
entry-latency-us = <300000>;
exit-latency-us = <600000>;
min-residency-us = <1000000>;
};
};
memory@80000000 {
/* 2G RAM */
reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
device_type = "memory";
bootph-all;
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
secure_tfa_ddr: tfa@80000000 {
reg = <0x00 0x80000000 0x00 0x200000>;
no-map;
bootph-all;
};
secure_ddr: optee@80200000 {
reg = <0x00 0x80200000 0x00 0x800000>;
no-map;
};
tifs_ctx_ddr: tifs@80a00000 {
reg = <0x00 0x80a00000 0x00 0x800000>;
no-map;
bootph-all;
};
};
gpio_keys: gpio-keys {
compatible = "gpio-keys";
autorepeat;
pinctrl-names = "default";
pinctrl-0 = <&usr_button_pins_default>;
usr: button-usr {
label = "User Key";
linux,code = <BTN_0>;
gpios = <&main_gpio0 90 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&usr_led_pins_default>;
led-0 {
label = "am62-sk:green:heartbeat";
gpios = <&main_gpio0 123 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
function = LED_FUNCTION_HEARTBEAT;
default-state = "on";
};
};
vmain_pd: regulator-0 {
/* TPS65988 PD CONTROLLER OUTPUT */
bootph-all;
compatible = "regulator-fixed";
regulator-name = "vmain_pd";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-always-on;
regulator-boot-on;
};
vcc_3v3_sys: regulator-1 {
/* output of LM61460-Q1 */
compatible = "regulator-fixed";
regulator-name = "vcc_3v3_sys";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
vin-supply = <&vmain_pd>;
regulator-always-on;
regulator-boot-on;
};
vcc_1v8: regulator-3 {
/* output of TPS6282518DMQ */
compatible = "regulator-fixed";
regulator-name = "vcc_1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&vcc_3v3_sys>;
regulator-always-on;
regulator-boot-on;
};
};
&pmx0 {
main_uart0_pins_default: main-uart0-default-pins {
pinctrl-single,pins = <
AM62LX_IOPAD(0x01b4, PIN_INPUT, 0) /* (D13) UART0_RXD */
AM62LX_IOPAD(0x01b8, PIN_OUTPUT, 0) /* (C13) UART0_TXD */
>;
bootph-all;
};
main_uart1_pins_default: main-uart1-default-pins {
pinctrl-single,pins = <
AM62LX_IOPAD(0x0180, PIN_INPUT, 2) /* (A8) MCASP0_AXR3.UART1_CTSn */
AM62LX_IOPAD(0x0184, PIN_OUTPUT, 2) /* (B10) MCASP0_AXR2.UART1_RTSn */
AM62LX_IOPAD(0x0198, PIN_INPUT, 2) /* (C11) MCASP0_AFSR.UART1_RXD */
AM62LX_IOPAD(0x019c, PIN_OUTPUT, 2) /* (A12) MCASP0_ACLKR.UART1_TXD */
>;
bootph-all;
};
main_i2c0_pins_default: main-i2c0-default-pins {
pinctrl-single,pins = <
AM62LX_IOPAD(0x01cc, PIN_INPUT_PULLUP, 0) /* (B7) I2C0_SCL */
AM62LX_IOPAD(0x01d0, PIN_INPUT_PULLUP, 0) /* (A7) I2C0_SDA */
>;
bootph-all;
};
main_i2c2_pins_default: main-i2c2-default-pins {
pinctrl-single,pins = <
AM62LX_IOPAD(0x01dc, PIN_INPUT_PULLUP, 0) /* (B8) I2C2_SCL */
AM62LX_IOPAD(0x01e0, PIN_INPUT_PULLUP, 0) /* (D8) I2C2_SDA */
>;
};
main_gpio0_ioexp_intr_pins_default: main-gpio0-ioexp-intr-default-pins {
pinctrl-single,pins = <
AM62LX_IOPAD(0x01b0, PIN_INPUT, 7) /* (B12) SPI0_D1.GPIO0_91 */
>;
bootph-all;
};
usr_led_pins_default: usr-led-pins-default {
pinctrl-single,pins = <
AM62LX_IOPAD(0x0238, PIN_OUTPUT, 7) /* (D24) MMC1_SDWP.GPIO0_123 */
>;
};
usr_button_pins_default: usr-button-pins-default {
pinctrl-single,pins = <
AM62LX_IOPAD(0x01ac, PIN_INPUT, 7) /* (E12) SPI0_D0.GPIO0_90 */
>;
};
main_mmc0_pins_default: main-mmc0-default-pins {
pinctrl-single,pins = <
AM62LX_IOPAD(0x0214, PIN_INPUT_PULLUP, 0) /* (D2) MMC0_CMD */
AM62LX_IOPAD(0x020c, PIN_OUTPUT, 0) /* (B2) MMC0_CLK */
AM62LX_IOPAD(0x0208, PIN_INPUT_PULLUP, 0) /* (D3) MMC0_DAT0 */
AM62LX_IOPAD(0x0204, PIN_INPUT_PULLUP, 0) /* (D4) MMC0_DAT1 */
AM62LX_IOPAD(0x0200, PIN_INPUT_PULLUP, 0) /* (C1) MMC0_DAT2 */
AM62LX_IOPAD(0x01fc, PIN_INPUT_PULLUP, 0) /* (C2) MMC0_DAT3 */
AM62LX_IOPAD(0x01f8, PIN_INPUT_PULLUP, 0) /* (C4) MMC0_DAT4 */
AM62LX_IOPAD(0x01f4, PIN_INPUT_PULLUP, 0) /* (B3) MMC0_DAT5 */
AM62LX_IOPAD(0x01f0, PIN_INPUT_PULLUP, 0) /* (A3) MMC0_DAT6 */
AM62LX_IOPAD(0x01ec, PIN_INPUT_PULLUP, 0) /* (B4) MMC0_DAT7 */
>;
bootph-all;
};
main_mmc1_pins_default: main-mmc1-default-pins {
pinctrl-single,pins = <
AM62LX_IOPAD(0x0230, PIN_INPUT, 0) /* (Y3) MMC1_CMD */
AM62LX_IOPAD(0x0228, PIN_OUTPUT, 0) /* (Y2) MMC1_CLK */
AM62LX_IOPAD(0x0224, PIN_INPUT, 0) /* (AA1) MMC1_DAT0 */
AM62LX_IOPAD(0x0220, PIN_INPUT_PULLUP, 0) /* (Y4) MMC1_DAT1 */
AM62LX_IOPAD(0x021c, PIN_INPUT_PULLUP, 0) /* (AA2) MMC1_DAT2 */
AM62LX_IOPAD(0x0218, PIN_INPUT_PULLUP, 0) /* (AB2) MMC1_DAT3 */
AM62LX_IOPAD(0x0234, PIN_INPUT, 0) /* (B6) MMC1_SDCD */
>;
bootph-all;
};
};
&main_uart0 {
pinctrl-names = "default";
pinctrl-0 = <&main_uart0_pins_default>;
status = "okay";
bootph-all;
};
&main_uart1 {
pinctrl-names = "default";
pinctrl-0 = <&main_uart1_pins_default>;
status = "okay";
bootph-all;
};
&main_i2c0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c0_pins_default>;
clock-frequency = <400000>;
bootph-all;
eeprom@51 {
/* AT24C512C-MAHM-T or M24512-DFMC6TG */
compatible = "atmel,24c512";
reg = <0x51>;
};
};
&main_i2c2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&main_i2c2_pins_default>;
clock-frequency = <400000>;
};
&main_gpio0 {
status = "okay";
bootph-all;
};
&main_gpio2 {
status = "okay";
bootph-all;
};
&sdhci0 {
/* eMMC */
non-removable;
pinctrl-names = "default";
pinctrl-0 = <&main_mmc0_pins_default>;
status = "okay";
bootph-all;
};
&sdhci1 {
/* SD/MMC */
pinctrl-names = "default";
pinctrl-0 = <&main_mmc1_pins_default>;
status = "okay";
bootph-all;
};
&scmi_pds {
/*
* Here's how we group the scmi pd ID of devices into their
* top level power domains, which happens to be the MAIN domain
* in this case.
*/
power-domain-map = <15 &MAIN_PD>, /* TIMER0 */
<16 &MAIN_PD>, /* TIMER1 */
<17 &MAIN_PD>, /* TIMER2 */
<18 &MAIN_PD>; /* TIMER3 */
};
&cpu1 {
power-domain-names = "psci";
power-domains = <&CPU_PD>;
};
&cpu0 {
power-domains = <&CPU_PD>;
power-domain-names = "psci";
};
&psci {
CPU_PD: power-controller-cpu {
#power-domain-cells = <0>;
power-domains = <&CLUSTER_PD>;
domain-idle-states = <&CPU_PDOWN>;
};
CLUSTER_PD: power-controller-cluster {
#power-domain-cells = <0>;
domain-idle-states = <&CLST_LOST>;
power-domains = <&MAIN_PD>;
};
MAIN_PD: power-controller-main {
#power-domain-cells = <0>;
domain-idle-states = <&main_sleep_0>, <&main_sleep_1>;
};
};
/delete-node/ &main_rti1;
/delete-node/ &main_bcdma;
/delete-node/ &mcasp0;
/delete-node/ &mcasp1;
/delete-node/ &mcasp2;
/delete-node/ &crypto;
/delete-node/ &main_uart1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment