/* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ staticint ksz9021rn_phy_fixup(struct phy_device *phydev)
{ if (IS_BUILTIN(CONFIG_PHYLIB)) { /* min rx data delay */
phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL,
0x8000 | MICREL_KSZ9021_RGMII_RX_DATA_PAD_SCEW);
phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0x0000);
/* max rx/tx clock delay, min rx/tx control delay */
phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL,
0x8000 | MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW);
phy_write(phydev, MICREL_KSZ9021_EXTREG_DATA_WRITE, 0xf0f0);
phy_write(phydev, MICREL_KSZ9021_EXTREG_CTRL,
MICREL_KSZ9021_RGMII_CLK_CTRL_PAD_SCEW);
}
return 0;
}
/* * fixup for PLX PEX8909 bridge to configure GPIO1-7 as output High * as they are used for slots1-7 PERST#
*/ staticvoid ventana_pciesw_early_fixup(struct pci_dev *dev)
{
u32 dw;
if (!of_machine_is_compatible("gw,ventana")) return;
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-fec"); if (!np) {
pr_warn("%s: failed to find fec node\n", __func__); return;
}
/* * If enet_clk_ref configured, we assume DT did it properly and . * clk-imx6q.c will do needed configuration.
*/
fec_enet_ref = of_clk_get_by_name(np, "enet_clk_ref"); if (!IS_ERR(fec_enet_ref)) goto put_node;
ptp_clk = of_clk_get(np, 2); if (IS_ERR(ptp_clk)) {
pr_warn("%s: failed to get ptp clock\n", __func__); goto put_node;
}
enet_ref = clk_get_sys(NULL, "enet_ref"); if (IS_ERR(enet_ref)) {
pr_warn("%s: failed to get enet clock\n", __func__); goto put_ptp_clk;
}
/* * If enet_ref from ANATOP/CCM is the PTP clock source, we need to * set bit IOMUXC_GPR1[21]. Or the PTP clock must be from pad * (external OSC), and we need to clear the bit.
*/
clksel = clk_is_match(ptp_clk, enet_ref) ?
IMX6Q_GPR1_ENET_CLK_SEL_ANATOP :
IMX6Q_GPR1_ENET_CLK_SEL_PAD;
gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); if (!IS_ERR(gpr))
regmap_update_bits(gpr, IOMUXC_GPR1,
IMX6Q_GPR1_ENET_CLK_SEL_MASK,
clksel); else
pr_err("failed to find fsl,imx6q-iomuxc-gpr regmap\n");
staticvoid __init imx6q_init_late(void)
{ /* * WAIT mode is broken on imx6 Dual/Quad revision 1.0 and 1.1 so * there is no point to run cpuidle on them. * * It does work on imx6 Solo/DualLite starting from 1.1
*/ if ((cpu_is_imx6q() && imx_get_soc_revision() > IMX_CHIP_REVISION_1_1) ||
(cpu_is_imx6dl() && imx_get_soc_revision() > IMX_CHIP_REVISION_1_0))
imx6q_cpuidle_init();
if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ))
platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.