diff options
-rw-r--r-- | arch/arm/dts/tegra186.dtsi | 23 | ||||
-rw-r--r-- | drivers/i2c/tegra186_bpmp_i2c.c | 10 | ||||
-rw-r--r-- | drivers/i2c/tegra_i2c.c | 2 | ||||
-rw-r--r-- | drivers/mmc/tegra_mmc.c | 6 | ||||
-rw-r--r-- | drivers/spi/tegra20_sflash.c | 4 | ||||
-rw-r--r-- | drivers/spi/tegra20_slink.c | 4 | ||||
-rw-r--r-- | drivers/spi/tegra210_qspi.c | 3 |
7 files changed, 25 insertions, 27 deletions
diff --git a/arch/arm/dts/tegra186.dtsi b/arch/arm/dts/tegra186.dtsi index d9e7f03..f878b65 100644 --- a/arch/arm/dts/tegra186.dtsi +++ b/arch/arm/dts/tegra186.dtsi @@ -45,7 +45,7 @@ #address-cells = <1>; #size-cells = <0>; clocks = <&bpmp TEGRA186_CLK_I2C1>; - clock-names = "i2c"; + clock-names = "div-clk"; resets = <&bpmp TEGRA186_RESET_I2C1>; reset-names = "i2c"; status = "disabled"; @@ -58,7 +58,7 @@ #address-cells = <1>; #size-cells = <0>; clocks = <&bpmp TEGRA186_CLK_I2C3>; - clock-names = "i2c"; + clock-names = "div-clk"; resets = <&bpmp TEGRA186_RESET_I2C3>; reset-names = "i2c"; status = "disabled"; @@ -71,7 +71,7 @@ #address-cells = <1>; #size-cells = <0>; clocks = <&bpmp TEGRA186_CLK_I2C4>; - clock-names = "i2c"; + clock-names = "div-clk"; resets = <&bpmp TEGRA186_RESET_I2C4>; reset-names = "i2c"; status = "disabled"; @@ -84,7 +84,7 @@ #address-cells = <1>; #size-cells = <0>; clocks = <&bpmp TEGRA186_CLK_I2C6>; - clock-names = "i2c"; + clock-names = "div-clk"; resets = <&bpmp TEGRA186_RESET_I2C6>; reset-names = "i2c"; status = "disabled"; @@ -97,7 +97,7 @@ #address-cells = <1>; #size-cells = <0>; clocks = <&bpmp TEGRA186_CLK_I2C7>; - clock-names = "i2c"; + clock-names = "div-clk"; resets = <&bpmp TEGRA186_RESET_I2C7>; reset-names = "i2c"; status = "disabled"; @@ -110,7 +110,7 @@ #address-cells = <1>; #size-cells = <0>; clocks = <&bpmp TEGRA186_CLK_I2C9>; - clock-names = "i2c"; + clock-names = "div-clk"; resets = <&bpmp TEGRA186_RESET_I2C9>; reset-names = "i2c"; status = "disabled"; @@ -120,9 +120,8 @@ compatible = "nvidia,tegra186-sdhci"; reg = <0x0 0x03400000 0x0 0x200>; resets = <&bpmp TEGRA186_RESET_SDMMC1>; - reset-names = "sdmmc"; + reset-names = "sdhci"; clocks = <&bpmp TEGRA186_CLK_SDMMC1>; - clock-names = "sdmmc"; interrupts = <GIC_SPI 62 0x04>; status = "disabled"; }; @@ -131,9 +130,8 @@ compatible = "nvidia,tegra186-sdhci"; reg = <0x0 0x03460000 0x0 0x200>; resets = <&bpmp TEGRA186_RESET_SDMMC4>; - reset-names = "sdmmc"; + reset-names = "sdhci"; clocks = <&bpmp TEGRA186_CLK_SDMMC4>; - clock-names = "sdmmc"; interrupts = <GIC_SPI 31 0x04>; status = "disabled"; }; @@ -166,7 +164,7 @@ #address-cells = <1>; #size-cells = <0>; clocks = <&bpmp TEGRA186_CLK_I2C2>; - clock-names = "i2c"; + clock-names = "div-clk"; resets = <&bpmp TEGRA186_RESET_I2C2>; reset-names = "i2c"; status = "disabled"; @@ -179,7 +177,7 @@ #address-cells = <1>; #size-cells = <0>; clocks = <&bpmp TEGRA186_CLK_I2C8>; - clock-names = "i2c"; + clock-names = "div-clk"; resets = <&bpmp TEGRA186_RESET_I2C8>; reset-names = "i2c"; status = "disabled"; @@ -311,7 +309,6 @@ bpmp_i2c: i2c { compatible = "nvidia,tegra186-bpmp-i2c"; - nvidia,bpmp = <&bpmp>; nvidia,bpmp-bus-id = <5>; #address-cells = <1>; #size-cells = <0>; diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c index 88e8413..513c414 100644 --- a/drivers/i2c/tegra186_bpmp_i2c.c +++ b/drivers/i2c/tegra186_bpmp_i2c.c @@ -89,16 +89,6 @@ static int tegra186_bpmp_i2c_xfer(struct udevice *dev, struct i2c_msg *msg, static int tegra186_bpmp_i2c_probe(struct udevice *dev) { struct tegra186_bpmp_i2c *priv = dev_get_priv(dev); - int ret; - struct fdtdec_phandle_args args; - - ret = fdtdec_parse_phandle_with_args(gd->fdt_blob, dev->of_offset, - "nvidia,bpmp", NULL, 0, 0, &args); - if (ret < 0) { - debug("%s: fdtdec_parse_phandle_with_args() failed: %d\n", - __func__, ret); - return ret; - } priv->bpmp_bus_id = fdtdec_get_uint(gd->fdt_blob, dev->of_offset, "nvidia,bpmp-bus-id", U32_MAX); diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c index 31ba263..0dbcc5a 100644 --- a/drivers/i2c/tegra_i2c.c +++ b/drivers/i2c/tegra_i2c.c @@ -414,7 +414,7 @@ static int tegra_i2c_probe(struct udevice *dev) error("reset_get_by_name() failed: %d\n", ret); return ret; } - ret = clk_get_by_name(dev, "i2c", &i2c_bus->clk); + ret = clk_get_by_name(dev, "div-clk", &i2c_bus->clk); if (ret) { error("clk_get_by_name() failed: %d\n", ret); return ret; diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c index f0a39a6..3d0845e 100644 --- a/drivers/mmc/tegra_mmc.c +++ b/drivers/mmc/tegra_mmc.c @@ -648,12 +648,12 @@ static int mmc_get_config(const void *blob, int node, struct mmc_host *host, struct udevice dev; int ret; dev.of_offset = node; - ret = reset_get_by_name(&dev, "sdmmc", &host->reset_ctl); + ret = reset_get_by_name(&dev, "sdhci", &host->reset_ctl); if (ret) { - debug("reset_get_by_index() failed: %d\n", ret); + debug("reset_get_by_name() failed: %d\n", ret); return ret; } - ret = clk_get_by_name(&dev, "sdmmc", &host->clk); + ret = clk_get_by_index(&dev, 0, &host->clk); if (ret) { debug("clk_get_by_index() failed: %d\n", ret); return ret; diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c index 6888a96..ce3a2d3 100644 --- a/drivers/spi/tegra20_sflash.c +++ b/drivers/spi/tegra20_sflash.c @@ -122,6 +122,10 @@ static int tegra20_sflash_probe(struct udevice *bus) priv->freq = plat->frequency; priv->periph_id = plat->periph_id; + /* Change SPI clock to correct frequency, PLLP_OUT0 source */ + clock_start_periph_pll(priv->periph_id, CLOCK_ID_PERIPH, + priv->freq); + return 0; } diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c index 238edec..e1da23b 100644 --- a/drivers/spi/tegra20_slink.c +++ b/drivers/spi/tegra20_slink.c @@ -128,6 +128,10 @@ static int tegra30_spi_probe(struct udevice *bus) priv->freq = plat->frequency; priv->periph_id = plat->periph_id; + /* Change SPI clock to correct frequency, PLLP_OUT0 source */ + clock_start_periph_pll(priv->periph_id, CLOCK_ID_PERIPH, + priv->freq); + return 0; } diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c index 6bbbe93..026cff0 100644 --- a/drivers/spi/tegra210_qspi.c +++ b/drivers/spi/tegra210_qspi.c @@ -131,6 +131,9 @@ static int tegra210_qspi_probe(struct udevice *bus) priv->freq = plat->frequency; priv->periph_id = plat->periph_id; + /* Change SPI clock to correct frequency, PLLP_OUT0 source */ + clock_start_periph_pll(priv->periph_id, CLOCK_ID_PERIPH, priv->freq); + return 0; } |