summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-12-09 17:50:51 -0500
committerTom Rini <[email protected]>2022-12-09 17:50:51 -0500
commitbc71afc3c5399c062c724f01d6ff83af72e14a42 (patch)
treeeb0980e9bae9c719513173619c435b7147f93e96 /include
parent0494ab37c267a52c1deaa231b74d721b2991e904 (diff)
parent04150400c96785763d17bfee1c01e210cc60f642 (diff)
Merge branch '2022-12-09-platform-updates' into next
- Assorted TI platform updates - Add DM_RTC callback functions, and a related x86 clean-up.
Diffstat (limited to 'include')
-rw-r--r--include/configs/am62ax_evm.h68
-rw-r--r--include/dt-bindings/pinctrl/k3.h3
-rw-r--r--include/k3-clk.h1
-rw-r--r--include/k3-dev.h1
-rw-r--r--include/rtc.h32
5 files changed, 102 insertions, 3 deletions
diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h
new file mode 100644
index 00000000000..5406c39350f
--- /dev/null
+++ b/include/configs/am62ax_evm.h
@@ -0,0 +1,68 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration header file for K3 AM62Ax SoC family
+ *
+ * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef __CONFIG_AM62AX_EVM_H
+#define __CONFIG_AM62AX_EVM_H
+
+#include <linux/sizes.h>
+#include <config_distro_bootcmd.h>
+#include <environment/ti/mmc.h>
+#include <environment/ti/k3_dfu.h>
+
+/* DDR Configuration */
+#define CFG_SYS_SDRAM_BASE1 0x880000000
+
+#define PARTS_DEFAULT \
+ /* Linux partitions */ \
+ "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \
+
+/* U-Boot general configuration */
+#define EXTRA_ENV_AM62A7_BOARD_SETTINGS \
+ "default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+ "findfdt=" \
+ "setenv name_fdt ${default_device_tree};" \
+ "setenv fdtfile ${name_fdt}\0" \
+ "name_kern=Image\0" \
+ "console=ttyS2,115200n8\0" \
+ "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \
+ "${mtdparts}\0" \
+ "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0"
+
+/* U-Boot MMC-specific configuration */
+#define EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \
+ "boot=mmc\0" \
+ "mmcdev=1\0" \
+ "bootpart=1:2\0" \
+ "bootdir=/boot\0" \
+ "rd_spec=-\0" \
+ "init_mmc=run args_all args_mmc\0" \
+ "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \
+ "get_overlay_mmc=" \
+ "fdt address ${fdtaddr};" \
+ "fdt resize 0x100000;" \
+ "for overlay in $name_overlays;" \
+ "do;" \
+ "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \
+ "fdt apply ${dtboaddr};" \
+ "done;\0" \
+ "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \
+ "${bootdir}/${name_kern}\0" \
+ "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \
+ "${bootdir}/${name_fit}\0" \
+ "partitions=" PARTS_DEFAULT
+
+/* Incorporate settings into the U-Boot environment */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ DEFAULT_LINUX_BOOT_ENV \
+ DEFAULT_MMC_TI_ARGS \
+ EXTRA_ENV_AM62A7_BOARD_SETTINGS \
+ EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \
+
+/* Now for the remaining common defines */
+#include <configs/ti_armv7_common.h>
+
+#endif /* __CONFIG_AM62A7_EVM_H */
diff --git a/include/dt-bindings/pinctrl/k3.h b/include/dt-bindings/pinctrl/k3.h
index a5204ab91d3..e8418318eb9 100644
--- a/include/dt-bindings/pinctrl/k3.h
+++ b/include/dt-bindings/pinctrl/k3.h
@@ -44,4 +44,7 @@
#define AM62X_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
#define AM62X_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
+#define AM62AX_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
+#define AM62AX_MCU_IOPAD(pa, val, muxmode) (((pa) & 0x1fff)) ((val) | (muxmode))
+
#endif
diff --git a/include/k3-clk.h b/include/k3-clk.h
index 371f077c447..49ba53d20f7 100644
--- a/include/k3-clk.h
+++ b/include/k3-clk.h
@@ -175,6 +175,7 @@ extern const struct ti_k3_clk_platdata j721e_clk_platdata;
extern const struct ti_k3_clk_platdata j7200_clk_platdata;
extern const struct ti_k3_clk_platdata j721s2_clk_platdata;
extern const struct ti_k3_clk_platdata am62x_clk_platdata;
+extern const struct ti_k3_clk_platdata am62ax_clk_platdata;
struct clk *clk_register_ti_pll(const char *name, const char *parent_name,
void __iomem *reg);
diff --git a/include/k3-dev.h b/include/k3-dev.h
index 87e873b9ced..d288ae3be73 100644
--- a/include/k3-dev.h
+++ b/include/k3-dev.h
@@ -79,6 +79,7 @@ extern const struct ti_k3_pd_platdata j721e_pd_platdata;
extern const struct ti_k3_pd_platdata j7200_pd_platdata;
extern const struct ti_k3_pd_platdata j721s2_pd_platdata;
extern const struct ti_k3_pd_platdata am62x_pd_platdata;
+extern const struct ti_k3_pd_platdata am62ax_pd_platdata;
u8 ti_pd_state(struct ti_pd *pd);
u8 lpsc_get_state(struct ti_lpsc *lpsc);
diff --git a/include/rtc.h b/include/rtc.h
index 10104e3bf5a..b6fdbb60dc2 100644
--- a/include/rtc.h
+++ b/include/rtc.h
@@ -15,13 +15,12 @@
#include <bcd.h>
#include <rtc_def.h>
+#include <linux/errno.h>
typedef int64_t time64_t;
-
-#ifdef CONFIG_DM_RTC
-
struct udevice;
+#if CONFIG_IS_ENABLED(DM_RTC)
struct rtc_ops {
/**
* get() - get the current time
@@ -222,6 +221,33 @@ int rtc_enable_32khz_output(int busnum, int chip_addr);
#endif
#else
+static inline int dm_rtc_get(struct udevice *dev, struct rtc_time *time)
+{
+ return -ENOSYS;
+}
+
+static inline int dm_rtc_set(struct udevice *dev, struct rtc_time *time)
+{
+ return -ENOSYS;
+}
+
+static inline int dm_rtc_reset(struct udevice *dev)
+{
+ return -ENOSYS;
+}
+
+static inline int dm_rtc_read(struct udevice *dev, unsigned int reg, u8 *buf,
+ unsigned int len)
+{
+ return -ENOSYS;
+}
+
+static inline int dm_rtc_write(struct udevice *dev, unsigned int reg,
+ const u8 *buf, unsigned int len)
+{
+ return -ENOSYS;
+}
+
int rtc_get (struct rtc_time *);
int rtc_set (struct rtc_time *);
void rtc_reset (void);