Compare commits
9 Commits
673d379028
...
f96b6422c7
| Author | SHA1 | Date | |
|---|---|---|---|
| f96b6422c7 | |||
| b4e0de2901 | |||
| 15fc9ffef3 | |||
| ba8dfd3c9d | |||
| 60151bd535 | |||
| 86a0b495f9 | |||
| 35f8da1188 | |||
| 42a7892dea | |||
| 8d194cf27f |
@@ -12,10 +12,14 @@
|
|||||||
|
|
||||||
dc@54200000 {
|
dc@54200000 {
|
||||||
nvidia,outputs = <&dsia &dsib &sor1>;
|
nvidia,outputs = <&dsia &dsib &sor1>;
|
||||||
|
/delete-property/ interconnects;
|
||||||
|
/delete-property/ interconnect-names;
|
||||||
};
|
};
|
||||||
|
|
||||||
dc@54240000 {
|
dc@54240000 {
|
||||||
nvidia,outputs = <&dsia &dsib &sor1>;
|
nvidia,outputs = <&dsia &dsib &sor1>;
|
||||||
|
/delete-property/ interconnects;
|
||||||
|
/delete-property/ interconnect-names;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -29,6 +33,67 @@
|
|||||||
/delete-property/ pinctrl-names;
|
/delete-property/ pinctrl-names;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
emc: external-memory-controller@7001b000 {
|
||||||
|
compatible = "nvidia,tegra210b01-emc";
|
||||||
|
|
||||||
|
clocks = <&bpmp 0>;
|
||||||
|
clock-names = "emc";
|
||||||
|
|
||||||
|
nvidia,bpmp = <&bpmp>;
|
||||||
|
/delete-property/ operating-points-v2;
|
||||||
|
};
|
||||||
|
|
||||||
|
actmon@6000c800 {
|
||||||
|
// clocks = <&tegra_car TEGRA210_CLK_ACTMON>,
|
||||||
|
// <&bpmp 0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
mmc@700b0600 {
|
||||||
|
nvidia,default-tap = <9>;
|
||||||
|
nvidia,default-trim = <13>;
|
||||||
|
|
||||||
|
clocks = <&tegra_car TEGRA210_CLK_SDMMC4>,
|
||||||
|
<&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
|
||||||
|
|
||||||
|
assigned-clocks = <&tegra_car TEGRA210_CLK_SDMMC4>,
|
||||||
|
<&tegra_car TEGRA210_CLK_PLL_C4_OUT2>;
|
||||||
|
assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
mmc@700b0400 {
|
||||||
|
nvidia,default-tap = <11>;
|
||||||
|
nvidia,default-trim = <18>;
|
||||||
|
|
||||||
|
clocks = <&tegra_car TEGRA210_CLK_SDMMC3>,
|
||||||
|
<&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
|
||||||
|
};
|
||||||
|
|
||||||
|
mmc@700b0200 {
|
||||||
|
nvidia,default-tap = <8>;
|
||||||
|
nvidia,default-trim = <13>;
|
||||||
|
|
||||||
|
clocks = <&tegra_car TEGRA210_CLK_SDMMC2>,
|
||||||
|
<&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
|
||||||
|
};
|
||||||
|
|
||||||
|
mmc@700b0000 {
|
||||||
|
nvidia,default-tap = <11>;
|
||||||
|
nvidia,default-trim = <14>;
|
||||||
|
|
||||||
|
clocks = <&tegra_car TEGRA210_CLK_SDMMC1>,
|
||||||
|
<&tegra_car TEGRA210_CLK_SDMMC_LEGACY>;
|
||||||
|
|
||||||
|
assigned-clocks = <&tegra_car TEGRA210_CLK_SDMMC4>,
|
||||||
|
<&tegra_car TEGRA210_CLK_PLL_C4_OUT2>,
|
||||||
|
<&tegra_car TEGRA210_CLK_PLL_C4>;
|
||||||
|
assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
pcie@1003000 {
|
||||||
|
compatible = "nvidia,tegra210b01-pcie";
|
||||||
|
};
|
||||||
|
|
||||||
/* Tegra210B01 has MBIST patched and is missing VI unit */
|
/* Tegra210B01 has MBIST patched and is missing VI unit */
|
||||||
pmc@7000e400 {
|
pmc@7000e400 {
|
||||||
compatible = "nvidia,tegra210b01-pmc";
|
compatible = "nvidia,tegra210b01-pmc";
|
||||||
@@ -40,6 +105,8 @@
|
|||||||
|
|
||||||
bpmp@70016000 {
|
bpmp@70016000 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
|
#clock-cells = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
usb@70090000 {
|
usb@70090000 {
|
||||||
@@ -50,6 +117,41 @@
|
|||||||
compatible = "nvidia,tegra210b01-xusb-padctl";
|
compatible = "nvidia,tegra210b01-xusb-padctl";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pinmux@700008d4 {
|
||||||
|
status = "okay";
|
||||||
|
sdmmc1_drv_code_1_8V: sdmmc1_drv_code {
|
||||||
|
sdmmc1 {
|
||||||
|
nvidia,pins = "drive_sdmmc1";
|
||||||
|
nvidia,pull-down-strength = <8>;
|
||||||
|
nvidia,pull-up-strength = <8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sdmmc1_default_drv_code_3_3V: sdmmc1_default_drv_code {
|
||||||
|
sdmmc1 {
|
||||||
|
nvidia,pins = "drive_sdmmc1";
|
||||||
|
nvidia,pull-down-strength = <8>;
|
||||||
|
nvidia,pull-up-strength = <8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sdmmc3_drv_code_1_8V: sdmmc3_drv_code {
|
||||||
|
sdmmc3 {
|
||||||
|
nvidia,pins = "drive_sdmmc3";
|
||||||
|
nvidia,pull-down-strength = <8>;
|
||||||
|
nvidia,pull-up-strength = <8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sdmmc3_default_drv_code_3_3V: sdmmc3_default_drv_code {
|
||||||
|
sdmmc3 {
|
||||||
|
nvidia,pins = "drive_sdmmc3";
|
||||||
|
nvidia,pull-down-strength = <8>;
|
||||||
|
nvidia,pull-up-strength = <8>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
usb@700d0000 {
|
usb@700d0000 {
|
||||||
compatible = "nvidia,tegra210b01-xudc";
|
compatible = "nvidia,tegra210b01-xudc";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -516,6 +516,9 @@ static const struct of_device_id tegra186_emc_of_match[] = {
|
|||||||
#if defined(CONFIG_ARCH_TEGRA_186_SOC)
|
#if defined(CONFIG_ARCH_TEGRA_186_SOC)
|
||||||
{ .compatible = "nvidia,tegra186-emc" },
|
{ .compatible = "nvidia,tegra186-emc" },
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_ARCH_TEGRA_210_SOC)
|
||||||
|
{ .compatible = "nvidia,tegra210b01-emc" },
|
||||||
|
#endif
|
||||||
#if defined(CONFIG_ARCH_TEGRA_194_SOC)
|
#if defined(CONFIG_ARCH_TEGRA_194_SOC)
|
||||||
{ .compatible = "nvidia,tegra194-emc" },
|
{ .compatible = "nvidia,tegra194-emc" },
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1846,6 +1846,15 @@ static void tegra_pcie_disable_interrupts(struct tegra_pcie *pcie)
|
|||||||
afi_writel(pcie, value, AFI_INTR_MASK);
|
afi_writel(pcie, value, AFI_INTR_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void update_rp_lanes(struct tegra_pcie *pcie, u32 lanes)
|
||||||
|
{
|
||||||
|
struct tegra_pcie_port *port = NULL;
|
||||||
|
|
||||||
|
list_for_each_entry(port, &pcie->ports, list)
|
||||||
|
port->lanes = (lanes >> (port->index << 3)) & 0xFF;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static int tegra_pcie_get_xbar_config(struct tegra_pcie *pcie, u32 lanes,
|
static int tegra_pcie_get_xbar_config(struct tegra_pcie *pcie, u32 lanes,
|
||||||
u32 *xbar)
|
u32 *xbar)
|
||||||
{
|
{
|
||||||
@@ -1874,6 +1883,21 @@ static int tegra_pcie_get_xbar_config(struct tegra_pcie *pcie, u32 lanes,
|
|||||||
"switching to default 2x1, 1x1, 1x1 "
|
"switching to default 2x1, 1x1, 1x1 "
|
||||||
"configuration\n");
|
"configuration\n");
|
||||||
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_211;
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_211;
|
||||||
|
update_rp_lanes(pcie, 0x010102);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else if (of_device_is_compatible(np, "nvidia,tegra210b01-pcie")) {
|
||||||
|
switch (lanes) {
|
||||||
|
case 0x0104:
|
||||||
|
dev_info(pcie->dev, "4x1, 1x1 configuration\n");
|
||||||
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X4_X1;
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
dev_info(pcie->dev, "wrong configuration updated in DT, "
|
||||||
|
"switching to default 4x1, 1x1 configuration\n");
|
||||||
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X4_X1;
|
||||||
|
update_rp_lanes(pcie, 0x0104);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (of_device_is_compatible(np, "nvidia,tegra124-pcie") ||
|
} else if (of_device_is_compatible(np, "nvidia,tegra124-pcie") ||
|
||||||
@@ -1888,6 +1912,13 @@ static int tegra_pcie_get_xbar_config(struct tegra_pcie *pcie, u32 lanes,
|
|||||||
dev_info(dev, "2x1, 1x1 configuration\n");
|
dev_info(dev, "2x1, 1x1 configuration\n");
|
||||||
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X2_X1;
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X2_X1;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
dev_info(pcie->dev, "wrong configuration updated in DT, "
|
||||||
|
"switching to default 4x1, 1x1 configuration\n");
|
||||||
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_X4_X1;
|
||||||
|
update_rp_lanes(pcie, 0x0104);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (of_device_is_compatible(np, "nvidia,tegra30-pcie")) {
|
} else if (of_device_is_compatible(np, "nvidia,tegra30-pcie")) {
|
||||||
switch (lanes) {
|
switch (lanes) {
|
||||||
@@ -1905,6 +1936,14 @@ static int tegra_pcie_get_xbar_config(struct tegra_pcie *pcie, u32 lanes,
|
|||||||
dev_info(dev, "4x1, 1x2 configuration\n");
|
dev_info(dev, "4x1, 1x2 configuration\n");
|
||||||
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_411;
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_411;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
dev_info(dev, "wrong configuration updated in DT, "
|
||||||
|
"switching to default 4x1, 1x2 "
|
||||||
|
"configuration\n");
|
||||||
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_411;
|
||||||
|
update_rp_lanes(pcie, 0x010104);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (of_device_is_compatible(np, "nvidia,tegra20-pcie")) {
|
} else if (of_device_is_compatible(np, "nvidia,tegra20-pcie")) {
|
||||||
switch (lanes) {
|
switch (lanes) {
|
||||||
@@ -1917,6 +1956,14 @@ static int tegra_pcie_get_xbar_config(struct tegra_pcie *pcie, u32 lanes,
|
|||||||
dev_info(dev, "dual-mode configuration\n");
|
dev_info(dev, "dual-mode configuration\n");
|
||||||
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_DUAL;
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_DUAL;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
default:
|
||||||
|
dev_info(dev, "wrong configuration updated in DT, "
|
||||||
|
"switching to default dual-mode "
|
||||||
|
"configuration\n");
|
||||||
|
*xbar = AFI_PCIE_CONFIG_SM2TMS0_XBAR_CONFIG_DUAL;
|
||||||
|
update_rp_lanes(pcie, 0x000202);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2010,7 +2057,8 @@ static int tegra_pcie_get_regulators(struct tegra_pcie *pcie, u32 lane_mask)
|
|||||||
pcie->supplies[i++].supply = "hvdd-pex-pll";
|
pcie->supplies[i++].supply = "hvdd-pex-pll";
|
||||||
pcie->supplies[i++].supply = "hvdd-pex";
|
pcie->supplies[i++].supply = "hvdd-pex";
|
||||||
pcie->supplies[i++].supply = "vddio-pexctl-aud";
|
pcie->supplies[i++].supply = "vddio-pexctl-aud";
|
||||||
} else if (of_device_is_compatible(np, "nvidia,tegra210-pcie")) {
|
} else if (of_device_is_compatible(np, "nvidia,tegra210-pcie") ||
|
||||||
|
of_device_is_compatible(np, "nvidia,tegra210b01-pcie")) {
|
||||||
pcie->num_supplies = 3;
|
pcie->num_supplies = 3;
|
||||||
|
|
||||||
pcie->supplies = devm_kcalloc(pcie->dev, pcie->num_supplies,
|
pcie->supplies = devm_kcalloc(pcie->dev, pcie->num_supplies,
|
||||||
@@ -2490,6 +2538,40 @@ static const struct tegra_pcie_soc tegra210_pcie = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct tegra_pcie_soc tegra210b01_pcie = {
|
||||||
|
.num_ports = 2,
|
||||||
|
.ports = tegra20_pcie_ports,
|
||||||
|
.msi_base_shift = 8,
|
||||||
|
.pads_pll_ctl = PADS_PLL_CTL_TEGRA30,
|
||||||
|
.tx_ref_sel = PADS_PLL_CTL_TXCLKREF_BUF_EN,
|
||||||
|
.pads_refclk_cfg0 = 0x90b890b8,
|
||||||
|
/* FC threshold is bit[25:18] */
|
||||||
|
.update_fc_threshold = 0x01800000,
|
||||||
|
.has_pex_clkreq_en = true,
|
||||||
|
.has_pex_bias_ctrl = true,
|
||||||
|
.has_intr_prsnt_sense = true,
|
||||||
|
.has_cml_clk = true,
|
||||||
|
.has_gen2 = true,
|
||||||
|
.force_pca_enable = true,
|
||||||
|
.program_uphy = true,
|
||||||
|
.program_deskew_time = true,
|
||||||
|
.update_fc_timer = true,
|
||||||
|
.has_cache_bars = false,
|
||||||
|
.ectl = {
|
||||||
|
.regs = {
|
||||||
|
.rp_ectl_2_r1 = 0x0000000f,
|
||||||
|
.rp_ectl_4_r1 = 0x00000067,
|
||||||
|
.rp_ectl_5_r1 = 0x55010000,
|
||||||
|
.rp_ectl_6_r1 = 0x00000001,
|
||||||
|
.rp_ectl_2_r2 = 0x0000008f,
|
||||||
|
.rp_ectl_4_r2 = 0x000000c7,
|
||||||
|
.rp_ectl_5_r2 = 0x55010000,
|
||||||
|
.rp_ectl_6_r2 = 0x00000001,
|
||||||
|
},
|
||||||
|
.enable = true,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
static const struct tegra_pcie_port_soc tegra186_pcie_ports[] = {
|
static const struct tegra_pcie_port_soc tegra186_pcie_ports[] = {
|
||||||
{ .pme.turnoff_bit = 0, .pme.ack_bit = 5 },
|
{ .pme.turnoff_bit = 0, .pme.ack_bit = 5 },
|
||||||
{ .pme.turnoff_bit = 8, .pme.ack_bit = 10 },
|
{ .pme.turnoff_bit = 8, .pme.ack_bit = 10 },
|
||||||
@@ -2522,6 +2604,7 @@ static const struct tegra_pcie_soc tegra186_pcie = {
|
|||||||
static const struct of_device_id tegra_pcie_of_match[] = {
|
static const struct of_device_id tegra_pcie_of_match[] = {
|
||||||
{ .compatible = "nvidia,tegra186-pcie", .data = &tegra186_pcie },
|
{ .compatible = "nvidia,tegra186-pcie", .data = &tegra186_pcie },
|
||||||
{ .compatible = "nvidia,tegra210-pcie", .data = &tegra210_pcie },
|
{ .compatible = "nvidia,tegra210-pcie", .data = &tegra210_pcie },
|
||||||
|
{ .compatible = "nvidia,tegra210b01-pcie", .data = &tegra210b01_pcie },
|
||||||
{ .compatible = "nvidia,tegra124-pcie", .data = &tegra124_pcie },
|
{ .compatible = "nvidia,tegra124-pcie", .data = &tegra124_pcie },
|
||||||
{ .compatible = "nvidia,tegra30-pcie", .data = &tegra30_pcie },
|
{ .compatible = "nvidia,tegra30-pcie", .data = &tegra30_pcie },
|
||||||
{ .compatible = "nvidia,tegra20-pcie", .data = &tegra20_pcie },
|
{ .compatible = "nvidia,tegra20-pcie", .data = &tegra20_pcie },
|
||||||
|
|||||||
@@ -525,6 +525,8 @@ static void tegra_xusb_port_release(struct device *dev)
|
|||||||
{
|
{
|
||||||
struct tegra_xusb_port *port = to_tegra_xusb_port(dev);
|
struct tegra_xusb_port *port = to_tegra_xusb_port(dev);
|
||||||
|
|
||||||
|
printk("release\n");
|
||||||
|
|
||||||
if (port->ops->release)
|
if (port->ops->release)
|
||||||
port->ops->release(port);
|
port->ops->release(port);
|
||||||
}
|
}
|
||||||
@@ -541,19 +543,23 @@ static int tegra_xusb_port_init(struct tegra_xusb_port *port,
|
|||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
printk("init list\n");
|
||||||
INIT_LIST_HEAD(&port->list);
|
INIT_LIST_HEAD(&port->list);
|
||||||
port->padctl = padctl;
|
port->padctl = padctl;
|
||||||
port->index = index;
|
port->index = index;
|
||||||
|
|
||||||
|
printk("init device\n");
|
||||||
device_initialize(&port->dev);
|
device_initialize(&port->dev);
|
||||||
port->dev.type = &tegra_xusb_port_type;
|
port->dev.type = &tegra_xusb_port_type;
|
||||||
port->dev.of_node = of_node_get(np);
|
port->dev.of_node = of_node_get(np);
|
||||||
port->dev.parent = padctl->dev;
|
port->dev.parent = padctl->dev;
|
||||||
|
|
||||||
|
printk("set name\n");
|
||||||
err = dev_set_name(&port->dev, "%s-%u", name, index);
|
err = dev_set_name(&port->dev, "%s-%u", name, index);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto put_device;
|
goto put_device;
|
||||||
|
|
||||||
|
printk("device add\n");
|
||||||
err = device_add(&port->dev);
|
err = device_add(&port->dev);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto put_device;
|
goto put_device;
|
||||||
@@ -561,6 +567,7 @@ static int tegra_xusb_port_init(struct tegra_xusb_port *port,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
put_device:
|
put_device:
|
||||||
|
printk("put device\n");
|
||||||
put_device(&port->dev);
|
put_device(&port->dev);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@@ -969,6 +976,7 @@ static int tegra_xusb_usb3_port_parse_dt(struct tegra_xusb_usb3_port *usb3)
|
|||||||
u32 value;
|
u32 value;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
printk("check usb2-companion\n");
|
||||||
err = of_property_read_u32(np, "nvidia,usb2-companion", &value);
|
err = of_property_read_u32(np, "nvidia,usb2-companion", &value);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
dev_err(&port->dev, "failed to read port: %d\n", err);
|
dev_err(&port->dev, "failed to read port: %d\n", err);
|
||||||
@@ -1004,6 +1012,7 @@ static int tegra_xusb_add_usb3_port(struct tegra_xusb_padctl *padctl,
|
|||||||
* port is unusable. But it is valid to configure only a single port,
|
* port is unusable. But it is valid to configure only a single port,
|
||||||
* hence return 0 instead of an error to allow ports to be optional.
|
* hence return 0 instead of an error to allow ports to be optional.
|
||||||
*/
|
*/
|
||||||
|
printk("find port node usb3\n");
|
||||||
np = tegra_xusb_find_port_node(padctl, "usb3", index);
|
np = tegra_xusb_find_port_node(padctl, "usb3", index);
|
||||||
if (!np || !of_device_is_available(np))
|
if (!np || !of_device_is_available(np))
|
||||||
goto out;
|
goto out;
|
||||||
@@ -1014,6 +1023,7 @@ static int tegra_xusb_add_usb3_port(struct tegra_xusb_padctl *padctl,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printk("xusb port init\n");
|
||||||
err = tegra_xusb_port_init(&usb3->base, padctl, np, "usb3", index);
|
err = tegra_xusb_port_init(&usb3->base, padctl, np, "usb3", index);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto out;
|
goto out;
|
||||||
@@ -1026,6 +1036,7 @@ static int tegra_xusb_add_usb3_port(struct tegra_xusb_padctl *padctl,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printk("xusb usb3 port parse dt\n");
|
||||||
err = tegra_xusb_usb3_port_parse_dt(usb3);
|
err = tegra_xusb_usb3_port_parse_dt(usb3);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
tegra_xusb_port_unregister(&usb3->base);
|
tegra_xusb_port_unregister(&usb3->base);
|
||||||
@@ -1118,24 +1129,28 @@ static int tegra_xusb_setup_ports(struct tegra_xusb_padctl *padctl)
|
|||||||
mutex_lock(&padctl->lock);
|
mutex_lock(&padctl->lock);
|
||||||
|
|
||||||
for (i = 0; i < padctl->soc->ports.usb2.count; i++) {
|
for (i = 0; i < padctl->soc->ports.usb2.count; i++) {
|
||||||
|
printk("add usb2 port %d\n", i);
|
||||||
err = tegra_xusb_add_usb2_port(padctl, i);
|
err = tegra_xusb_add_usb2_port(padctl, i);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto remove_ports;
|
goto remove_ports;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < padctl->soc->ports.ulpi.count; i++) {
|
for (i = 0; i < padctl->soc->ports.ulpi.count; i++) {
|
||||||
|
printk("add ulpi port %d\n", i);
|
||||||
err = tegra_xusb_add_ulpi_port(padctl, i);
|
err = tegra_xusb_add_ulpi_port(padctl, i);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto remove_ports;
|
goto remove_ports;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < padctl->soc->ports.hsic.count; i++) {
|
for (i = 0; i < padctl->soc->ports.hsic.count; i++) {
|
||||||
|
printk("add hsic port %d\n", i);
|
||||||
err = tegra_xusb_add_hsic_port(padctl, i);
|
err = tegra_xusb_add_hsic_port(padctl, i);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto remove_ports;
|
goto remove_ports;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < padctl->soc->ports.usb3.count; i++) {
|
for (i = 0; i < padctl->soc->ports.usb3.count; i++) {
|
||||||
|
printk("add usb3 port %d\n", i);
|
||||||
err = tegra_xusb_add_usb3_port(padctl, i);
|
err = tegra_xusb_add_usb3_port(padctl, i);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto remove_ports;
|
goto remove_ports;
|
||||||
@@ -1143,10 +1158,12 @@ static int tegra_xusb_setup_ports(struct tegra_xusb_padctl *padctl)
|
|||||||
|
|
||||||
if (padctl->soc->need_fake_usb3_port) {
|
if (padctl->soc->need_fake_usb3_port) {
|
||||||
for (i = 0; i < padctl->soc->ports.usb2.count; i++) {
|
for (i = 0; i < padctl->soc->ports.usb2.count; i++) {
|
||||||
|
printk("checking usb2 port %d\n", i);
|
||||||
usb2 = tegra_xusb_find_usb2_port(padctl, i);
|
usb2 = tegra_xusb_find_usb2_port(padctl, i);
|
||||||
if (!usb2)
|
if (!usb2)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
printk("update usb3 fake port %d\n", i);
|
||||||
err = tegra_xusb_update_usb3_fake_port(usb2);
|
err = tegra_xusb_update_usb3_fake_port(usb2);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto remove_ports;
|
goto remove_ports;
|
||||||
@@ -1154,12 +1171,14 @@ static int tegra_xusb_setup_ports(struct tegra_xusb_padctl *padctl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
list_for_each_entry(port, &padctl->ports, list) {
|
list_for_each_entry(port, &padctl->ports, list) {
|
||||||
|
printk("enable port\n");
|
||||||
err = port->ops->enable(port);
|
err = port->ops->enable(port);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
dev_err(padctl->dev, "failed to enable port %s: %d\n",
|
dev_err(padctl->dev, "failed to enable port %s: %d\n",
|
||||||
dev_name(&port->dev), err);
|
dev_name(&port->dev), err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printk("unlock\n");
|
||||||
goto unlock;
|
goto unlock;
|
||||||
|
|
||||||
remove_ports:
|
remove_ports:
|
||||||
|
|||||||
@@ -110,6 +110,15 @@ config TYPEC_WUSB3801
|
|||||||
If you choose to build this driver as a dynamically linked module, the
|
If you choose to build this driver as a dynamically linked module, the
|
||||||
module will be called wusb3801.ko.
|
module will be called wusb3801.ko.
|
||||||
|
|
||||||
|
config TYPEC_BM92TXX
|
||||||
|
tristate "Rohm Semiconductor BM92TXX USB Type-C Support"
|
||||||
|
depends on I2C
|
||||||
|
depends on USB_ROLE_SWITCH
|
||||||
|
help
|
||||||
|
Say yes here to support for Rohm Semiconductor BM92TXX. This is a USB
|
||||||
|
Type-C connection IC. This driver provies common support for power
|
||||||
|
negotiation, USB ID detection and Hot-plug-detection on Display Port.
|
||||||
|
|
||||||
source "drivers/usb/typec/mux/Kconfig"
|
source "drivers/usb/typec/mux/Kconfig"
|
||||||
|
|
||||||
source "drivers/usb/typec/altmodes/Kconfig"
|
source "drivers/usb/typec/altmodes/Kconfig"
|
||||||
|
|||||||
@@ -11,4 +11,5 @@ obj-$(CONFIG_TYPEC_HD3SS3220) += hd3ss3220.o
|
|||||||
obj-$(CONFIG_TYPEC_STUSB160X) += stusb160x.o
|
obj-$(CONFIG_TYPEC_STUSB160X) += stusb160x.o
|
||||||
obj-$(CONFIG_TYPEC_RT1719) += rt1719.o
|
obj-$(CONFIG_TYPEC_RT1719) += rt1719.o
|
||||||
obj-$(CONFIG_TYPEC_WUSB3801) += wusb3801.o
|
obj-$(CONFIG_TYPEC_WUSB3801) += wusb3801.o
|
||||||
|
obj-$(CONFIG_TYPEC_BM92TXX) += bm92txx.o
|
||||||
obj-$(CONFIG_TYPEC) += mux/
|
obj-$(CONFIG_TYPEC) += mux/
|
||||||
|
|||||||
2631
drivers/usb/typec/bm92txx.c
Normal file
2631
drivers/usb/typec/bm92txx.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -125397,23 +125397,29 @@ member {
|
|||||||
offset: 2880
|
offset: 2880
|
||||||
}
|
}
|
||||||
member {
|
member {
|
||||||
id: 0x8998723d
|
id: 0x716f03bc
|
||||||
name: "gpu_process_id"
|
name: "gpu_iddq_value"
|
||||||
type_id: 0x6720d32f
|
type_id: 0x6720d32f
|
||||||
offset: 256
|
offset: 384
|
||||||
}
|
}
|
||||||
member {
|
member {
|
||||||
id: 0xc59015c8
|
id: 0x8998764f
|
||||||
name: "gpu_speedo_id"
|
name: "gpu_process_id"
|
||||||
type_id: 0x6720d32f
|
type_id: 0x6720d32f
|
||||||
offset: 288
|
offset: 288
|
||||||
}
|
}
|
||||||
member {
|
member {
|
||||||
id: 0x1839ab9c
|
id: 0xc59016d6
|
||||||
name: "gpu_speedo_value"
|
name: "gpu_speedo_id"
|
||||||
type_id: 0x6720d32f
|
type_id: 0x6720d32f
|
||||||
offset: 320
|
offset: 320
|
||||||
}
|
}
|
||||||
|
member {
|
||||||
|
id: 0x1839a802
|
||||||
|
name: "gpu_speedo_value"
|
||||||
|
type_id: 0x6720d32f
|
||||||
|
offset: 352
|
||||||
|
}
|
||||||
member {
|
member {
|
||||||
id: 0x220ee7b2
|
id: 0x220ee7b2
|
||||||
name: "gpuva"
|
name: "gpuva"
|
||||||
@@ -189897,10 +189903,10 @@ member {
|
|||||||
bitsize: 1
|
bitsize: 1
|
||||||
}
|
}
|
||||||
member {
|
member {
|
||||||
id: 0x2bdf1e4c
|
id: 0x2bdf18a9
|
||||||
name: "platform"
|
name: "platform"
|
||||||
type_id: 0x4bb568ad
|
type_id: 0x4bb568ad
|
||||||
offset: 384
|
offset: 448
|
||||||
}
|
}
|
||||||
member {
|
member {
|
||||||
id: 0x38c654ae
|
id: 0x38c654ae
|
||||||
@@ -210651,10 +210657,10 @@ member {
|
|||||||
offset: 12480
|
offset: 12480
|
||||||
}
|
}
|
||||||
member {
|
member {
|
||||||
id: 0x94eb2e6e
|
id: 0x94eb2857
|
||||||
name: "revision"
|
name: "revision"
|
||||||
type_id: 0x43f6ac22
|
type_id: 0x43f6ac22
|
||||||
offset: 352
|
offset: 416
|
||||||
}
|
}
|
||||||
member {
|
member {
|
||||||
id: 0xbcd2bfaa
|
id: 0xbcd2bfaa
|
||||||
@@ -227338,6 +227344,12 @@ member {
|
|||||||
type_id: 0x3e10b518
|
type_id: 0x3e10b518
|
||||||
offset: 256
|
offset: 256
|
||||||
}
|
}
|
||||||
|
member {
|
||||||
|
id: 0x97cc708c
|
||||||
|
name: "soc_iddq_value"
|
||||||
|
type_id: 0x6720d32f
|
||||||
|
offset: 256
|
||||||
|
}
|
||||||
member {
|
member {
|
||||||
id: 0x8d753502
|
id: 0x8d753502
|
||||||
name: "soc_process_id"
|
name: "soc_process_id"
|
||||||
@@ -228117,6 +228129,12 @@ member {
|
|||||||
type_id: 0xc9082b19
|
type_id: 0xc9082b19
|
||||||
offset: 704
|
offset: 704
|
||||||
}
|
}
|
||||||
|
member {
|
||||||
|
id: 0x9b8091d9
|
||||||
|
name: "speedo_rev"
|
||||||
|
type_id: 0x6720d32f
|
||||||
|
offset: 512
|
||||||
|
}
|
||||||
member {
|
member {
|
||||||
id: 0xd0391586
|
id: 0xd0391586
|
||||||
name: "spi"
|
name: "spi"
|
||||||
@@ -248697,6 +248715,12 @@ member {
|
|||||||
type_id: 0x790929c4
|
type_id: 0x790929c4
|
||||||
offset: 8512
|
offset: 8512
|
||||||
}
|
}
|
||||||
|
member {
|
||||||
|
id: 0xe7a15159
|
||||||
|
name: "ucm"
|
||||||
|
type_id: 0x7c124706
|
||||||
|
offset: 480
|
||||||
|
}
|
||||||
member {
|
member {
|
||||||
id: 0x14b7816e
|
id: 0x14b7816e
|
||||||
name: "ucontext"
|
name: "ucontext"
|
||||||
@@ -340766,7 +340790,7 @@ struct_union {
|
|||||||
kind: STRUCT
|
kind: STRUCT
|
||||||
name: "tegra_sku_info"
|
name: "tegra_sku_info"
|
||||||
definition {
|
definition {
|
||||||
bytesize: 52
|
bytesize: 68
|
||||||
member_id: 0x159f315d
|
member_id: 0x159f315d
|
||||||
member_id: 0x7be41b46
|
member_id: 0x7be41b46
|
||||||
member_id: 0x9bd81e85
|
member_id: 0x9bd81e85
|
||||||
@@ -340775,11 +340799,15 @@ struct_union {
|
|||||||
member_id: 0x8d753502
|
member_id: 0x8d753502
|
||||||
member_id: 0x509bfc34
|
member_id: 0x509bfc34
|
||||||
member_id: 0x0ef921fa
|
member_id: 0x0ef921fa
|
||||||
member_id: 0x8998723d
|
member_id: 0x97cc708c
|
||||||
member_id: 0xc59015c8
|
member_id: 0x8998764f
|
||||||
member_id: 0x1839ab9c
|
member_id: 0xc59016d6
|
||||||
member_id: 0x94eb2e6e
|
member_id: 0x1839a802
|
||||||
member_id: 0x2bdf1e4c
|
member_id: 0x716f03bc
|
||||||
|
member_id: 0x94eb2857
|
||||||
|
member_id: 0x2bdf18a9
|
||||||
|
member_id: 0xe7a15159
|
||||||
|
member_id: 0x9b8091d9
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
struct_union {
|
struct_union {
|
||||||
@@ -370359,9 +370387,27 @@ enumeration {
|
|||||||
value: 5
|
value: 5
|
||||||
}
|
}
|
||||||
enumerator {
|
enumerator {
|
||||||
name: "TEGRA_REVISION_MAX"
|
name: "TEGRA_REVISION_B01"
|
||||||
value: 6
|
value: 6
|
||||||
}
|
}
|
||||||
|
enumerator {
|
||||||
|
name: "TEGRA_REVISION_MAX"
|
||||||
|
value: 7
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
enumeration {
|
||||||
|
id: 0x7c124706
|
||||||
|
name: "tegra_ucm"
|
||||||
|
definition {
|
||||||
|
underlying_type_id: 0x4585663f
|
||||||
|
enumerator {
|
||||||
|
name: "TEGRA_UCM1"
|
||||||
|
}
|
||||||
|
enumerator {
|
||||||
|
name: "TEGRA_UCM2"
|
||||||
|
value: 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
enumeration {
|
enumeration {
|
||||||
@@ -505039,7 +505085,7 @@ elf_symbol {
|
|||||||
name: "tegra_sku_info"
|
name: "tegra_sku_info"
|
||||||
is_defined: true
|
is_defined: true
|
||||||
symbol_type: OBJECT
|
symbol_type: OBJECT
|
||||||
crc: 0xbbcfcffc
|
crc: 0xe4a4fdfb
|
||||||
type_id: 0x539be05c
|
type_id: 0x539be05c
|
||||||
full_name: "tegra_sku_info"
|
full_name: "tegra_sku_info"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -720,11 +720,14 @@
|
|||||||
memstart_addr
|
memstart_addr
|
||||||
mipi_dsi_attach
|
mipi_dsi_attach
|
||||||
mipi_dsi_create_packet
|
mipi_dsi_create_packet
|
||||||
|
mipi_dsi_dcs_read
|
||||||
|
mipi_dsi_dcs_set_pixel_format
|
||||||
mipi_dsi_detach
|
mipi_dsi_detach
|
||||||
mipi_dsi_driver_register_full
|
mipi_dsi_driver_register_full
|
||||||
mipi_dsi_driver_unregister
|
mipi_dsi_driver_unregister
|
||||||
mipi_dsi_host_register
|
mipi_dsi_host_register
|
||||||
mipi_dsi_host_unregister
|
mipi_dsi_host_unregister
|
||||||
|
mipi_dsi_set_maximum_return_packet_size
|
||||||
misc_deregister
|
misc_deregister
|
||||||
misc_register
|
misc_register
|
||||||
__mmap_lock_do_trace_acquire_returned
|
__mmap_lock_do_trace_acquire_returned
|
||||||
@@ -1184,6 +1187,7 @@
|
|||||||
up_read
|
up_read
|
||||||
up_write
|
up_write
|
||||||
usb_control_msg
|
usb_control_msg
|
||||||
|
usb_role_switch_get_role
|
||||||
usb_role_switch_put
|
usb_role_switch_put
|
||||||
usb_role_switch_set_role
|
usb_role_switch_set_role
|
||||||
__usecs_to_jiffies
|
__usecs_to_jiffies
|
||||||
@@ -1244,6 +1248,14 @@
|
|||||||
report_iommu_fault
|
report_iommu_fault
|
||||||
tegra_mc_probe_device
|
tegra_mc_probe_device
|
||||||
|
|
||||||
|
# required by bm92txx.ko
|
||||||
|
devm_gpio_request
|
||||||
|
extcon_get_state
|
||||||
|
extcon_set_state
|
||||||
|
fwnode_graph_get_endpoint_by_id
|
||||||
|
fwnode_graph_get_remote_endpoint
|
||||||
|
regulator_set_current_limit
|
||||||
|
|
||||||
# required by bq24190_charger.ko
|
# required by bq24190_charger.ko
|
||||||
kstrtou8
|
kstrtou8
|
||||||
power_supply_get_property_from_supplier
|
power_supply_get_property_from_supplier
|
||||||
@@ -2019,11 +2031,15 @@
|
|||||||
devm_of_find_backlight
|
devm_of_find_backlight
|
||||||
mipi_dsi_dcs_enter_sleep_mode
|
mipi_dsi_dcs_enter_sleep_mode
|
||||||
mipi_dsi_dcs_exit_sleep_mode
|
mipi_dsi_dcs_exit_sleep_mode
|
||||||
mipi_dsi_dcs_read
|
|
||||||
mipi_dsi_dcs_set_display_off
|
mipi_dsi_dcs_set_display_off
|
||||||
mipi_dsi_dcs_set_display_on
|
mipi_dsi_dcs_set_display_on
|
||||||
mipi_dsi_dcs_set_pixel_format
|
|
||||||
mipi_dsi_set_maximum_return_packet_size
|
# required by panel-nx-dsi.ko
|
||||||
|
mipi_dsi_dcs_set_column_address
|
||||||
|
mipi_dsi_dcs_set_page_address
|
||||||
|
mipi_dsi_dcs_set_tear_on
|
||||||
|
mipi_dsi_dcs_write
|
||||||
|
of_find_backlight_by_node
|
||||||
|
|
||||||
# required by panel-simple.ko
|
# required by panel-simple.ko
|
||||||
drm_bus_flags_from_videomode
|
drm_bus_flags_from_videomode
|
||||||
@@ -2122,7 +2138,6 @@
|
|||||||
usb_phy_set_event
|
usb_phy_set_event
|
||||||
usb_remove_phy
|
usb_remove_phy
|
||||||
usb_role_switch_get_drvdata
|
usb_role_switch_get_drvdata
|
||||||
usb_role_switch_get_role
|
|
||||||
usb_role_switch_register
|
usb_role_switch_register
|
||||||
usb_role_switch_set_drvdata
|
usb_role_switch_set_drvdata
|
||||||
usb_role_switch_unregister
|
usb_role_switch_unregister
|
||||||
|
|||||||
Reference in New Issue
Block a user