Lines Matching +full:smi +full:- +full:mdio

6  * Copyright (C) 2004-2017 Cavium, Inc.
16 #include <asm/octeon/cvmx-helper-board.h>
22 #include <asm/octeon/cvmx-uctlx-defs.h>
76 if (dev->of_node) { in octeon2_usb_clocks_start()
80 uctl_node = of_get_parent(dev->of_node); in octeon2_usb_clocks_start()
86 "refclk-frequency", &clock_rate); in octeon2_usb_clocks_start()
88 dev_err(dev, "No UCTL \"refclk-frequency\"\n"); in octeon2_usb_clocks_start()
93 "refclk-type", &clock_type); in octeon2_usb_clocks_start()
201 * Step 4: Program the power-on reset field in the UCTL in octeon2_usb_clocks_start()
202 * clock-reset-control register. in octeon2_usb_clocks_start()
263 octeon2_usb_clock_start_cnt--; in octeon2_usb_clocks_stop()
269 octeon2_usb_clocks_start(&pdev->dev); in octeon_ehci_power_on()
299 /* Use 64-bit addressing. */ in octeon_ehci_hw_start()
330 pd->dev.platform_data = &octeon_ehci_pdata; in octeon_ehci_device_init()
331 octeon_ehci_hw_start(&pd->dev); in octeon_ehci_device_init()
332 put_device(&pd->dev); in octeon_ehci_device_init()
340 octeon2_usb_clocks_start(&pdev->dev); in octeon_ohci_power_on()
394 pd->dev.platform_data = &octeon_ohci_pdata; in octeon_ohci_device_init()
395 octeon_ohci_hw_start(&pd->dev); in octeon_ohci_device_init()
396 put_device(&pd->dev); in octeon_ohci_device_init()
422 pd = platform_device_alloc("octeon_rng", -1); in octeon_rng_device_init()
424 ret = -ENOMEM; in octeon_rng_device_init()
447 { .compatible = "simple-bus", },
448 { .compatible = "cavium,octeon-6335-uctl", },
449 { .compatible = "cavium,octeon-5750-usbn", },
450 { .compatible = "cavium,octeon-3860-bootbus", },
451 { .compatible = "cavium,mdio-mux", },
452 { .compatible = "gpio-leds", },
453 { .compatible = "cavium,octeon-7130-usb-uctl", },
466 switch (cvmx_sysinfo_get()->board_type) { in octeon_has_fixed_link()
493 phy_handle = fdt_getprop(initial_boot_params, eth, "phy-handle", NULL); in octeon_fdt_set_phy()
500 alt_phy_handle = fdt_getprop(initial_boot_params, eth, "cavium,alt-phy-handle", NULL); in octeon_fdt_set_phy()
506 alt_phy = -1; in octeon_fdt_set_phy()
511 fdt_nop_property(initial_boot_params, eth, "phy-handle"); in octeon_fdt_set_phy()
513 fdt_nop_property(initial_boot_params, eth, "cavium,alt-phy-handle"); in octeon_fdt_set_phy()
527 phy_prop = fdt_get_property(initial_boot_params, eth, "phy-handle", NULL); in octeon_fdt_set_phy()
528 phy_handle_name = phy_prop->nameoff; in octeon_fdt_set_phy()
530 fdt_nop_property(initial_boot_params, eth, "phy-handle"); in octeon_fdt_set_phy()
531 alt_prop = fdt_get_property_w(initial_boot_params, eth, "cavium,alt-phy-handle", NULL); in octeon_fdt_set_phy()
532 alt_prop->nameoff = phy_handle_name; in octeon_fdt_set_phy()
539 fdt_nop_property(initial_boot_params, phy, "marvell,reg-init"); in octeon_fdt_set_phy()
555 snprintf(new_name, sizeof(new_name), "ethernet-phy@%x", phy_addr); in octeon_fdt_set_phy()
572 old_mac = fdt_getprop(initial_boot_params, n, "local-mac-address", in octeon_fdt_set_mac_addr()
584 r = fdt_setprop_inplace(initial_boot_params, n, "local-mac-address", in octeon_fdt_set_mac_addr()
588 pr_err("Setting \"local-mac-address\" failed %d", r); in octeon_fdt_set_mac_addr()
598 phy_handle = fdt_getprop(initial_boot_params, node, "phy-handle", NULL); in octeon_fdt_rm_ethernet()
611 fdt_setprop_inplace_cell(initial_boot_params, eth, "rx-delay", in _octeon_rx_tx_delay()
613 fdt_setprop_inplace_cell(initial_boot_params, eth, "tx-delay", in _octeon_rx_tx_delay()
619 switch (cvmx_sysinfo_get()->board_type) { in octeon_rx_tx_delay()
644 fdt_nop_property(initial_boot_params, eth, "rx-delay"); in octeon_rx_tx_delay()
645 fdt_nop_property(initial_boot_params, eth, "tx-delay"); in octeon_rx_tx_delay()
673 fixed_link = fdt_subnode_offset(initial_boot_params, eth, "fixed-link"); in octeon_fdt_pip_port()
697 octeon_fdt_pip_port(iface, idx, p, count - 1); in octeon_fdt_pip_iface()
714 ((octeon_bootinfo->mac_addr_base[0] & 0xffull)) << 40 | in octeon_fill_mac_addresses()
715 ((octeon_bootinfo->mac_addr_base[1] & 0xffull)) << 32 | in octeon_fill_mac_addresses()
716 ((octeon_bootinfo->mac_addr_base[2] & 0xffull)) << 24 | in octeon_fill_mac_addresses()
717 ((octeon_bootinfo->mac_addr_base[3] & 0xffull)) << 16 | in octeon_fill_mac_addresses()
718 ((octeon_bootinfo->mac_addr_base[4] & 0xffull)) << 8 | in octeon_fill_mac_addresses()
719 (octeon_bootinfo->mac_addr_base[5] & 0xffull); in octeon_fill_mac_addresses()
777 WARN(octeon_bootinfo->board_type == CVMX_BOARD_TYPE_CUST_DSR1000N, in octeon_prune_device_tree()
778 "Built-in DTB booting is deprecated on %s. Please switch to use appended DTB.", in octeon_prune_device_tree()
779 cvmx_board_type_to_string(octeon_bootinfo->board_type)); in octeon_prune_device_tree()
784 return -EINVAL; in octeon_prune_device_tree()
794 if (octeon_bootinfo->board_type == CVMX_BOARD_TYPE_NIC10E) in octeon_prune_device_tree()
860 /* SMI/MDIO */ in octeon_prune_device_tree()
874 "smi%d", i); in octeon_prune_device_tree()
882 pr_debug("Deleting smi%d\n", i); in octeon_prune_device_tree()
912 uart, "clock-frequency", in octeon_prune_device_tree()
941 if (octeon_bootinfo->major_version == 1 in octeon_prune_device_tree()
942 && octeon_bootinfo->minor_version >= 1) { in octeon_prune_device_tree()
943 if (octeon_bootinfo->compact_flash_common_base_addr) in octeon_prune_device_tree()
944 base_ptr = octeon_bootinfo->compact_flash_common_base_addr; in octeon_prune_device_tree()
985 fdt_nop_property(initial_boot_params, cf, "cavium,true-ide"); in octeon_prune_device_tree()
986 fdt_nop_property(initial_boot_params, cf, "cavium,dma-engine-handle"); in octeon_prune_device_tree()
991 "cavium,bus-width", &width, sizeof(width)); in octeon_prune_device_tree()
1039 base_ptr = octeon_bootinfo->led_display_base_addr; in octeon_prune_device_tree()
1090 octeon_bootinfo->board_type == CVMX_BOARD_TYPE_NIC2E)) { in octeon_prune_device_tree()
1094 } else if (octeon_bootinfo->board_type == CVMX_BOARD_TYPE_NIC10E || in octeon_prune_device_tree()
1095 octeon_bootinfo->board_type == CVMX_BOARD_TYPE_NIC4E) { in octeon_prune_device_tree()
1096 /* Missing "refclk-type" defaults to crystal. */ in octeon_prune_device_tree()
1097 fdt_nop_property(initial_boot_params, uctl, "refclk-type"); in octeon_prune_device_tree()
1121 "refclk-frequency", new_f, sizeof(new_f)); in octeon_prune_device_tree()
1124 /* Missing "refclk-type" defaults to external. */ in octeon_prune_device_tree()
1125 fdt_nop_property(initial_boot_params, usbn, "refclk-type"); in octeon_prune_device_tree()