Lines Matching +full:0 +full:x00020002
65 #define RK356XGMAC0 0xfe2a0000
66 #define RK356XGMAC1 0xfe010000
67 #define RK3588GMAC0 0xfe1b0000
68 #define RK3588GMAC1 0xfe1c0000
70 #define EQOS_GRF_GMAC0 0x0380
71 #define EQOS_GRF_GMAC1 0x0388
72 #define EQOS_CON0_OFFSET 0
75 #define EQOS_GMAC_PHY_INTF_SEL_RGMII 0x00fc0010
76 #define EQOS_GMAC_PHY_INTF_SEL_RMII 0x00fc0040
77 #define EQOS_GMAC_RXCLK_DLY_ENABLE 0x00020002
78 #define EQOS_GMAC_RXCLK_DLY_DISABLE 0x00020000
79 #define EQOS_GMAC_TXCLK_DLY_ENABLE 0x00010001
80 #define EQOS_GMAC_TXCLK_DLY_DISABLE 0x00010000
81 #define EQOS_GMAC_CLK_RX_DL_CFG(val) (0x7f000000 | val << 8)
82 #define EQOS_GMAC_CLK_TX_DL_CFG(val) (0x007f0000 | val)
88 { NULL, 0 }
104 gpio_prop, sizeof(gpio_prop)) <= 0) in eqos_phy_reset()
105 return (0); in eqos_phy_reset()
108 delay_prop, sizeof(delay_prop)) <= 0) { in eqos_phy_reset()
114 gpio_node = OF_node_from_xref(gpio_prop[0]); in eqos_phy_reset()
115 if ((gpio = OF_device_from_xref(gpio_prop[0])) == NULL) { in eqos_phy_reset()
123 gpio_prop + 1, &pin, &flags) != 0) { in eqos_phy_reset()
134 DELAY(delay_prop[0]); in eqos_phy_reset()
140 return (0); in eqos_phy_reset()
177 if (hwreset_get_by_ofw_idx(dev, node, 0, &eqos_reset)) { in eqos_fdt_init()
184 if (error != 0) { in eqos_fdt_init()
189 if (clk_get_by_ofw_name(dev, 0, "stmmaceth", &stmmaceth) == 0) { in eqos_fdt_init()
191 if (error != 0) { in eqos_fdt_init()
205 if (clk_get_by_ofw_name(dev, 0, "mac_clk_rx", &mac_clk_rx) != 0) { in eqos_fdt_init()
210 if (clk_get_by_ofw_name(dev, 0, "mac_clk_tx", &mac_clk_tx) != 0) { in eqos_fdt_init()
215 if (clk_get_by_ofw_name(dev, 0, "aclk_mac", &aclk_mac) != 0) { in eqos_fdt_init()
220 if (clk_get_by_ofw_name(dev, 0, "pclk_mac", &pclk_mac) != 0) { in eqos_fdt_init()
235 if (OF_getencprop(node, "tx_delay", &tx_delay, sizeof(tx_delay)) <= 0) in eqos_fdt_init()
236 tx_delay = 0x30; in eqos_fdt_init()
237 if (OF_getencprop(node, "rx_delay", &rx_delay, sizeof(rx_delay)) <= 0) in eqos_fdt_init()
238 rx_delay = 0x10; in eqos_fdt_init()
248 if (!regulator_get_by_ofw_property(dev, 0, "phy-supply", in eqos_fdt_init()
263 if (!RK_OTP_READ(dev, buffer, 0, sizeof(buffer))) { in eqos_fdt_init()
268 htobe32((mac & 0xffffff00) | 0x22)); in eqos_fdt_init()
272 htobe16((mac & 0x0000ffff) + (device_get_unit(dev) << 8))); in eqos_fdt_init()
275 return (0); in eqos_fdt_init()
284 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in eqos_fdt_probe()
305 DRIVER_MODULE(eqos, simplebus, eqos_fdt_driver, 0, 0);