Lines Matching +full:pincfg +full:- +full:node
4 * SPDX-License-Identifier: Apache-2.0
20 #include <zephyr/dt-bindings/pinctrl/silabs-pinctrl-dbus.h>
22 #include <zephyr/dt-bindings/pinctrl/gecko-pinctrl-s1.h>
24 #include <zephyr/dt-bindings/pinctrl/gecko-pinctrl.h>
46 #define Z_PINCTRL_SILABS_MODE_INIT(node) \ argument
47 (DT_PROP(node, drive_push_pull) ? (4 + DT_PROP(node, silabs_alternate_port_control)) \
48 : DT_PROP(node, drive_open_source) ? (6 + DT_PROP(node, bias_pull_down)) \
49 : DT_PROP(node, drive_open_drain) \
50 ? (8 + DT_PROP(node, silabs_input_filter) + 2 * DT_PROP(node, bias_pull_up) + \
51 4 * DT_PROP(node, silabs_alternate_port_control)) \
52 : DT_PROP(node, input_enable) \
53 ? ((DT_PROP(node, bias_pull_down) || DT_PROP(node, bias_pull_up)) \
54 ? (2 + DT_PROP(node, silabs_input_filter)) \
58 #define Z_PINCTRL_SILABS_DOUT_INIT(node) \ argument
59 (DT_PROP(node, drive_push_pull) ? DT_PROP(node, output_high) \
60 : DT_PROP(node, drive_open_drain) ? 1 \
61 : DT_PROP(node, input_enable) \
62 ? ((DT_PROP(node, bias_pull_down) || DT_PROP(node, bias_pull_up)) \
63 ? DT_PROP(node, bias_pull_up) \
64 : DT_PROP(node, silabs_input_filter)) \
65 : DT_PROP(node, input_disable) ? DT_PROP(node, bias_pull_up) \
68 #define Z_PINCTRL_STATE_PIN_INIT(node, prop, idx) \ argument
70 FIELD_GET(SILABS_PINCTRL_PERIPH_BASE_MASK, DT_PROP_BY_IDX(node, prop, idx)), \
71 .port = FIELD_GET(SILABS_PINCTRL_GPIO_PORT_MASK, DT_PROP_BY_IDX(node, prop, idx)), \
72 .pin = FIELD_GET(SILABS_PINCTRL_GPIO_PIN_MASK, DT_PROP_BY_IDX(node, prop, idx)), \
74 (FIELD_GET(SILABS_PINCTRL_HAVE_EN_MASK, DT_PROP_BY_IDX(node, prop, idx)) \
75 ? FIELD_GET(SILABS_PINCTRL_EN_BIT_MASK, DT_PROP_BY_IDX(node, prop, idx)) \
77 .route_offset = FIELD_GET(SILABS_PINCTRL_ROUTE_MASK, DT_PROP_BY_IDX(node, prop, idx)), \
78 .mode = Z_PINCTRL_SILABS_MODE_INIT(node), \
79 .dout = Z_PINCTRL_SILABS_DOUT_INIT(node)},
81 #define Z_PINCTRL_STATE_ABUS_INIT(node, prop, idx) \ argument
84 FIELD_GET(SILABS_PINCTRL_ABUS_BUS_MASK, DT_PROP_BY_IDX(node, prop, idx)), \
86 DT_PROP_BY_IDX(node, prop, idx)), \
89 DT_PROP_BY_IDX(node, prop, idx)), \
109 * @param node_id Node identifier.
118 * @param node_id Node identifier.
130 * @param pincfg Pin configuration bit field.
132 #define GECKO_GET_FUN(pincfg) (((pincfg) >> GECKO_FUN_POS) & GECKO_FUN_MSK)
137 * @param pincfg port configuration bit field.
139 #define GECKO_GET_PORT(pincfg) (((pincfg) >> GECKO_PORT_POS) & GECKO_PORT_MSK)
144 * @param pincfg pin configuration bit field.
146 #define GECKO_GET_PIN(pincfg) (((pincfg) >> GECKO_PIN_POS) & GECKO_PIN_MSK)
151 * @param pincfg Loc configuration bit field.
153 #define GECKO_GET_LOC(pincfg) (((pincfg) >> GECKO_LOC_POS) & GECKO_LOC_MSK)
158 * @param pincfg speed configuration bit field.
160 #define GECKO_GET_SPEED(pincfg) (((pincfg) >> GECKO_SPEED_POS) & GECKO_SPEED_MSK)