summaryrefslogtreecommitdiff
path: root/include/dm
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-04-04 10:45:33 -0400
committerTom Rini <[email protected]>2022-04-04 10:48:44 -0400
commit01f1ab67f38882dc7665a0a6eca4bbeba6d84f81 (patch)
tree31b1febefe82731d94571f7442877c039efb602c /include/dm
parente4b6ebd3de982ae7185dbf689a030e73fd06e0d2 (diff)
parent8221c52d88fbe84ca9692dc23827e21403c952e8 (diff)
Merge branch 'next'
Signed-off-by: Tom Rini <[email protected]>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/device-internal.h10
-rw-r--r--include/dm/ofnode.h13
-rw-r--r--include/dm/pinctrl.h50
3 files changed, 48 insertions, 25 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index 02002acb787..c420726287e 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -10,6 +10,7 @@
#ifndef _DM_DEVICE_INTERNAL_H
#define _DM_DEVICE_INTERNAL_H
+#include <event.h>
#include <linker_lists.h>
#include <dm/ofnode.h>
@@ -426,4 +427,13 @@ static inline void devres_release_all(struct udevice *dev)
}
#endif /* ! CONFIG_DEVRES */
+
+static inline int device_notify(const struct udevice *dev, enum event_t type)
+{
+#if CONFIG_IS_ENABLED(DM_EVENT)
+ return event_notify(type, &dev, sizeof(dev));
+#else
+ return 0;
+#endif
+}
#endif
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index 0cb324c8b0c..744dffe0a2d 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -895,6 +895,19 @@ int ofnode_read_pci_addr(ofnode node, enum fdt_pci_space type,
int ofnode_read_pci_vendev(ofnode node, u16 *vendor, u16 *device);
/**
+ * ofnode_read_eth_phy_id() - look up eth phy vendor and device id
+ *
+ * Look at the compatible property of a device node that represents a eth phy
+ * device and extract phy vendor id and device id from it.
+ *
+ * @param node node to examine
+ * @param vendor vendor id of the eth phy device
+ * @param device device id of the eth phy device
+ * @return 0 if ok, negative on error
+ */
+int ofnode_read_eth_phy_id(ofnode node, u16 *vendor, u16 *device);
+
+/**
* ofnode_read_addr_cells() - Get the number of address cells for a node
*
* This walks back up the tree to find the closest #address-cells property
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h
index 8b869c4fbfb..a09b242fd99 100644
--- a/include/dm/pinctrl.h
+++ b/include/dm/pinctrl.h
@@ -7,7 +7,7 @@
#define __PINCTRL_H
#define PINNAME_SIZE 10
-#define PINMUX_SIZE 40
+#define PINMUX_SIZE 80
/**
* struct pinconf_param - pin config parameters
@@ -453,30 +453,30 @@ struct pinctrl_ops {
* presented using the packed format.
*/
enum pin_config_param {
- PIN_CONFIG_BIAS_BUS_HOLD,
- PIN_CONFIG_BIAS_DISABLE,
- PIN_CONFIG_BIAS_HIGH_IMPEDANCE,
- PIN_CONFIG_BIAS_PULL_DOWN,
- PIN_CONFIG_BIAS_PULL_PIN_DEFAULT,
- PIN_CONFIG_BIAS_PULL_UP,
- PIN_CONFIG_DRIVE_OPEN_DRAIN,
- PIN_CONFIG_DRIVE_OPEN_SOURCE,
- PIN_CONFIG_DRIVE_PUSH_PULL,
- PIN_CONFIG_DRIVE_STRENGTH,
- PIN_CONFIG_DRIVE_STRENGTH_UA,
- PIN_CONFIG_INPUT_DEBOUNCE,
- PIN_CONFIG_INPUT_ENABLE,
- PIN_CONFIG_INPUT_SCHMITT,
- PIN_CONFIG_INPUT_SCHMITT_ENABLE,
- PIN_CONFIG_LOW_POWER_MODE,
- PIN_CONFIG_OUTPUT_ENABLE,
- PIN_CONFIG_OUTPUT,
- PIN_CONFIG_POWER_SOURCE,
- PIN_CONFIG_SLEEP_HARDWARE_STATE,
- PIN_CONFIG_SLEW_RATE,
- PIN_CONFIG_SKEW_DELAY,
- PIN_CONFIG_END = 0x7F,
- PIN_CONFIG_MAX = 0xFF,
+ PIN_CONFIG_BIAS_BUS_HOLD = 0,
+ PIN_CONFIG_BIAS_DISABLE = 1,
+ PIN_CONFIG_BIAS_HIGH_IMPEDANCE = 2,
+ PIN_CONFIG_BIAS_PULL_DOWN = 3,
+ PIN_CONFIG_BIAS_PULL_PIN_DEFAULT = 4,
+ PIN_CONFIG_BIAS_PULL_UP = 5,
+ PIN_CONFIG_DRIVE_OPEN_DRAIN = 6,
+ PIN_CONFIG_DRIVE_OPEN_SOURCE = 7,
+ PIN_CONFIG_DRIVE_PUSH_PULL = 8,
+ PIN_CONFIG_DRIVE_STRENGTH = 9,
+ PIN_CONFIG_DRIVE_STRENGTH_UA = 10,
+ PIN_CONFIG_INPUT_DEBOUNCE = 11,
+ PIN_CONFIG_INPUT_ENABLE = 12,
+ PIN_CONFIG_INPUT_SCHMITT = 13,
+ PIN_CONFIG_INPUT_SCHMITT_ENABLE = 14,
+ PIN_CONFIG_LOW_POWER_MODE = 15,
+ PIN_CONFIG_OUTPUT_ENABLE = 16,
+ PIN_CONFIG_OUTPUT = 17,
+ PIN_CONFIG_POWER_SOURCE = 18,
+ PIN_CONFIG_SLEEP_HARDWARE_STATE = 19,
+ PIN_CONFIG_SLEW_RATE = 20,
+ PIN_CONFIG_SKEW_DELAY = 21,
+ PIN_CONFIG_END = 127, /* 0x7F */
+ PIN_CONFIG_MAX = 255, /* 0xFF */
};
#if CONFIG_IS_ENABLED(PINCTRL_GENERIC)