drivers/phy/ti/phy-j721e-wiz.c
Source file repositories/reference/linux-study-clean/drivers/phy/ti/phy-j721e-wiz.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/phy/ti/phy-j721e-wiz.c- Extension
.c- Size
- 44820 bytes
- Lines
- 1716
- Domain
- Driver Families
- Bucket
- drivers/phy
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
dt-bindings/phy/phy.hdt-bindings/phy/phy-ti.hlinux/slab.hlinux/clk.hlinux/clk-provider.hlinux/gpio.hlinux/gpio/consumer.hlinux/io.hlinux/module.hlinux/mfd/syscon.hlinux/mux/consumer.hlinux/of_address.hlinux/of_platform.hlinux/platform_device.hlinux/pm_runtime.hlinux/regmap.hlinux/reset-controller.h
Detected Declarations
struct wiz_clk_muxstruct wiz_clk_dividerstruct wiz_clk_mux_selstruct wiz_clk_div_selstruct wiz_phy_en_refclkstruct wiz_datastruct wizenum wiz_lane_standard_modeenum wiz_typec_master_laneenum wiz_refclk_mux_selenum wiz_refclk_div_selenum wiz_clock_inputenum p_enableenum wiz_typefunction wiz_resetfunction wiz_p_mac_div_selfunction wiz_mode_selectfunction wiz_init_raw_interfacefunction wiz_initfunction wiz_regfield_initfunction wiz_phy_en_refclk_enablefunction wiz_phy_en_refclk_disablefunction wiz_phy_en_refclk_is_enabledfunction wiz_phy_en_refclk_registerfunction wiz_clk_mux_get_parentfunction wiz_clk_mux_set_parentfunction wiz_mux_clk_registerfunction wiz_mux_of_clk_registerfunction wiz_clk_div_recalc_ratefunction wiz_clk_div_determine_ratefunction wiz_clk_div_set_ratefunction wiz_div_clk_registerfunction wiz_clock_cleanupfunction wiz_clock_registerfunction wiz_clock_initfunction wiz_clock_probefunction wiz_phy_reset_assertfunction wiz_phy_fullrt_divfunction wiz_phy_reset_deassertfunction wiz_get_lane_phy_typesfunction for_each_child_of_node_scopedfunction wiz_probefunction wiz_removefunction wiz_suspend_noirqfunction wiz_resume_noirq
Annotated Snippet
struct wiz_clk_mux {
struct clk_hw hw;
struct regmap_field *field;
const u32 *table;
struct clk_init_data clk_data;
};
#define to_wiz_clk_mux(_hw) container_of(_hw, struct wiz_clk_mux, hw)
struct wiz_clk_divider {
struct clk_hw hw;
struct regmap_field *field;
const struct clk_div_table *table;
struct clk_init_data clk_data;
};
#define to_wiz_clk_div(_hw) container_of(_hw, struct wiz_clk_divider, hw)
struct wiz_clk_mux_sel {
u32 table[WIZ_MAX_INPUT_CLOCKS];
const char *node_name;
u32 num_parents;
u32 parents[WIZ_MAX_INPUT_CLOCKS];
};
struct wiz_clk_div_sel {
const struct clk_div_table *table;
const char *node_name;
};
struct wiz_phy_en_refclk {
struct clk_hw hw;
struct regmap_field *phy_en_refclk;
struct clk_init_data clk_data;
};
#define to_wiz_phy_en_refclk(_hw) container_of(_hw, struct wiz_phy_en_refclk, hw)
static const struct wiz_clk_mux_sel clk_mux_sel_16g[] = {
{
/*
* Mux value to be configured for each of the input clocks
* in the order populated in device tree
*/
.table = { 1, 0 },
.node_name = "pll0-refclk",
},
{
.table = { 1, 0 },
.node_name = "pll1-refclk",
},
{
.table = { 1, 3, 0, 2 },
.node_name = "refclk-dig",
},
};
static const struct wiz_clk_mux_sel clk_mux_sel_10g[] = {
{
/*
* Mux value to be configured for each of the input clocks
* in the order populated in device tree
*/
.num_parents = 2,
.parents = { WIZ_CORE_REFCLK, WIZ_EXT_REFCLK },
.table = { 1, 0 },
.node_name = "pll0-refclk",
},
{
.num_parents = 2,
.parents = { WIZ_CORE_REFCLK, WIZ_EXT_REFCLK },
.table = { 1, 0 },
.node_name = "pll1-refclk",
},
{
.num_parents = 2,
.parents = { WIZ_CORE_REFCLK, WIZ_EXT_REFCLK },
.table = { 1, 0 },
.node_name = "refclk-dig",
},
};
static const struct wiz_clk_mux_sel clk_mux_sel_10g_2_refclk[] = {
{
.num_parents = 3,
.parents = { WIZ_CORE_REFCLK, WIZ_CORE_REFCLK1, WIZ_EXT_REFCLK },
.table = { 2, 3, 0 },
.node_name = "pll0-refclk",
},
{
Annotation
- Immediate include surface: `dt-bindings/phy/phy.h`, `dt-bindings/phy/phy-ti.h`, `linux/slab.h`, `linux/clk.h`, `linux/clk-provider.h`, `linux/gpio.h`, `linux/gpio/consumer.h`, `linux/io.h`.
- Detected declarations: `struct wiz_clk_mux`, `struct wiz_clk_divider`, `struct wiz_clk_mux_sel`, `struct wiz_clk_div_sel`, `struct wiz_phy_en_refclk`, `struct wiz_data`, `struct wiz`, `enum wiz_lane_standard_mode`, `enum wiz_typec_master_lane`, `enum wiz_refclk_mux_sel`.
- Atlas domain: Driver Families / drivers/phy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.