Lines Matching +full:reset +full:- +full:delays +full:- +full:us
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
28 * $Id: eqos_fdt.c 1049 2022-12-03 14:25:46Z sos $
84 #define WR4(sc, o, v) bus_write_4(sc->res[EQOS_RES_MEM], (o), (v))
87 {"snps,dwmac-4.20a", 1},
103 if (OF_getencprop(node, "snps,reset-gpio", in eqos_phy_reset()
107 if (OF_getencprop(node, "snps,reset-delays-us", in eqos_phy_reset()
110 "Wrong property for snps,reset-delays-us"); in eqos_phy_reset()
117 "Can't find gpio controller for phy reset\n"); in eqos_phy_reset()
122 nitems(gpio_prop) - 1, in eqos_phy_reset()
124 device_printf(dev, "Can't map gpio for phy reset\n"); in eqos_phy_reset()
129 if (OF_hasprop(node, "snps,reset-active-low")) in eqos_phy_reset()
157 syscon_get_by_ofw_property(dev, node, "rockchip,grf", &sc->grf)) { in eqos_fdt_init()
163 switch (rman_get_start(sc->res[EQOS_RES_MEM])) { in eqos_fdt_init()
165 sc->grf_offset = EQOS_GRF_GMAC0; in eqos_fdt_init()
168 sc->grf_offset = EQOS_GRF_GMAC1; in eqos_fdt_init()
178 device_printf(dev, "cannot get reset\n"); in eqos_fdt_init()
232 sc->csr_clock = 125000000; in eqos_fdt_init()
233 sc->csr_clock_range = GMAC_MAC_MDIO_ADDRESS_CR_100_150; in eqos_fdt_init()
240 SYSCON_WRITE_4(sc->grf, sc->grf_offset + EQOS_CON0_OFFSET, in eqos_fdt_init()
243 SYSCON_WRITE_4(sc->grf, sc->grf_offset + EQOS_CON1_OFFSET, in eqos_fdt_init()
248 if (!regulator_get_by_ofw_property(dev, 0, "phy-supply", in eqos_fdt_init()
254 device_printf(dev, "no phy-supply property\n"); in eqos_fdt_init()
284 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in eqos_fdt_probe()