Lines Matching full:nodes

25 	struct txgbe_nodes *nodes = &txgbe->nodes;  in txgbe_swnodes_register()  local
32 snprintf(nodes->gpio_name, sizeof(nodes->gpio_name), "txgbe_gpio-%x", id); in txgbe_swnodes_register()
33 snprintf(nodes->i2c_name, sizeof(nodes->i2c_name), "txgbe_i2c-%x", id); in txgbe_swnodes_register()
34 snprintf(nodes->sfp_name, sizeof(nodes->sfp_name), "txgbe_sfp-%x", id); in txgbe_swnodes_register()
35 snprintf(nodes->phylink_name, sizeof(nodes->phylink_name), "txgbe_phylink-%x", id); in txgbe_swnodes_register()
37 swnodes = nodes->swnodes; in txgbe_swnodes_register()
46 nodes->gpio_props[0] = PROPERTY_ENTRY_STRING("pinctrl-names", "default"); in txgbe_swnodes_register()
47 swnodes[SWNODE_GPIO] = NODE_PROP(nodes->gpio_name, nodes->gpio_props); in txgbe_swnodes_register()
48 nodes->gpio0_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 0, GPIO_ACTIVE_HIGH); in txgbe_swnodes_register()
49 nodes->gpio1_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 1, GPIO_ACTIVE_HIGH); in txgbe_swnodes_register()
50 nodes->gpio2_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 2, GPIO_ACTIVE_LOW); in txgbe_swnodes_register()
51 nodes->gpio3_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 3, GPIO_ACTIVE_HIGH); in txgbe_swnodes_register()
52 nodes->gpio4_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 4, GPIO_ACTIVE_HIGH); in txgbe_swnodes_register()
53 nodes->gpio5_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_GPIO], 5, GPIO_ACTIVE_HIGH); in txgbe_swnodes_register()
55 nodes->i2c_props[0] = PROPERTY_ENTRY_STRING("compatible", "snps,designware-i2c"); in txgbe_swnodes_register()
56 nodes->i2c_props[1] = PROPERTY_ENTRY_BOOL("wx,i2c-snps-model"); in txgbe_swnodes_register()
57 nodes->i2c_props[2] = PROPERTY_ENTRY_U32("clock-frequency", I2C_MAX_STANDARD_MODE_FREQ); in txgbe_swnodes_register()
58 swnodes[SWNODE_I2C] = NODE_PROP(nodes->i2c_name, nodes->i2c_props); in txgbe_swnodes_register()
59 nodes->i2c_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_I2C]); in txgbe_swnodes_register()
61 nodes->sfp_props[0] = PROPERTY_ENTRY_STRING("compatible", "sff,sfp"); in txgbe_swnodes_register()
62 nodes->sfp_props[1] = PROPERTY_ENTRY_REF_ARRAY("i2c-bus", nodes->i2c_ref); in txgbe_swnodes_register()
63 nodes->sfp_props[2] = PROPERTY_ENTRY_REF_ARRAY("tx-fault-gpios", nodes->gpio0_ref); in txgbe_swnodes_register()
64 nodes->sfp_props[3] = PROPERTY_ENTRY_REF_ARRAY("tx-disable-gpios", nodes->gpio1_ref); in txgbe_swnodes_register()
65 nodes->sfp_props[4] = PROPERTY_ENTRY_REF_ARRAY("mod-def0-gpios", nodes->gpio2_ref); in txgbe_swnodes_register()
66 nodes->sfp_props[5] = PROPERTY_ENTRY_REF_ARRAY("los-gpios", nodes->gpio3_ref); in txgbe_swnodes_register()
67 nodes->sfp_props[6] = PROPERTY_ENTRY_REF_ARRAY("rate-select1-gpios", nodes->gpio4_ref); in txgbe_swnodes_register()
68 nodes->sfp_props[7] = PROPERTY_ENTRY_REF_ARRAY("rate-select0-gpios", nodes->gpio5_ref); in txgbe_swnodes_register()
69 swnodes[SWNODE_SFP] = NODE_PROP(nodes->sfp_name, nodes->sfp_props); in txgbe_swnodes_register()
70 nodes->sfp_ref[0] = SOFTWARE_NODE_REFERENCE(&swnodes[SWNODE_SFP]); in txgbe_swnodes_register()
72 nodes->phylink_props[0] = PROPERTY_ENTRY_STRING("managed", "in-band-status"); in txgbe_swnodes_register()
73 nodes->phylink_props[1] = PROPERTY_ENTRY_REF_ARRAY("sfp", nodes->sfp_ref); in txgbe_swnodes_register()
74 swnodes[SWNODE_PHYLINK] = NODE_PROP(nodes->phylink_name, nodes->phylink_props); in txgbe_swnodes_register()
76 nodes->group[SWNODE_GPIO] = &swnodes[SWNODE_GPIO]; in txgbe_swnodes_register()
77 nodes->group[SWNODE_I2C] = &swnodes[SWNODE_I2C]; in txgbe_swnodes_register()
78 nodes->group[SWNODE_SFP] = &swnodes[SWNODE_SFP]; in txgbe_swnodes_register()
79 nodes->group[SWNODE_PHYLINK] = &swnodes[SWNODE_PHYLINK]; in txgbe_swnodes_register()
81 return software_node_register_node_group(nodes->group); in txgbe_swnodes_register()
270 fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_PHYLINK]); in txgbe_phylink_init()
519 gc->fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_GPIO]); in txgbe_gpio_init()
616 info.fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_I2C]); in txgbe_i2c_register()
638 info.fwnode = software_node_fwnode(txgbe->nodes.group[SWNODE_SFP]); in txgbe_sfp_register()
763 wx_err(txgbe->wx, "failed to register software nodes\n"); in txgbe_init_phy()
815 software_node_unregister_node_group(txgbe->nodes.group); in txgbe_init_phy()
834 software_node_unregister_node_group(txgbe->nodes.group); in txgbe_remove_phy()