diff options
author | Tom Rini <trini@konsulko.com> | 2018-06-21 09:02:35 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-06-21 09:02:35 -0400 |
commit | dc7df68f21093039b3ab1a1702f5b7cd3e621431 (patch) | |
tree | 08de60286630dd90c2e581f7ca97b4b72c8cd266 | |
parent | 8f08dfd133e389f3922fb497d072003893dd120b (diff) | |
parent | 2c84d5218e7e379dce493080a01938530b477611 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-sh
-rw-r--r-- | arch/arm/dts/r8a77970-eagle.dts | 2 | ||||
-rw-r--r-- | arch/arm/dts/r8a77990-ebisu.dts | 38 | ||||
-rw-r--r-- | configs/r8a77970_eagle_defconfig | 2 | ||||
-rw-r--r-- | drivers/net/ravb.c | 32 | ||||
-rw-r--r-- | drivers/net/sh_eth.c | 13 | ||||
-rw-r--r-- | drivers/pinctrl/renesas/pfc.c | 4 |
6 files changed, 72 insertions, 19 deletions
diff --git a/arch/arm/dts/r8a77970-eagle.dts b/arch/arm/dts/r8a77970-eagle.dts index 5b8b2f8704..5dcad63492 100644 --- a/arch/arm/dts/r8a77970-eagle.dts +++ b/arch/arm/dts/r8a77970-eagle.dts @@ -39,13 +39,13 @@ phy-handle = <&phy0>; phy-mode = "rgmii-id"; status = "okay"; - reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; phy0: ethernet-phy@0 { rxc-skew-ps = <1500>; reg = <0>; interrupt-parent = <&gpio1>; interrupts = <17 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; }; }; diff --git a/arch/arm/dts/r8a77990-ebisu.dts b/arch/arm/dts/r8a77990-ebisu.dts index 1946999874..8b0d24bd29 100644 --- a/arch/arm/dts/r8a77990-ebisu.dts +++ b/arch/arm/dts/r8a77990-ebisu.dts @@ -28,6 +28,24 @@ /* first 128MB is reserved for secure area. */ reg = <0x0 0x48000000 0x0 0x38000000>; }; + + reg_1p8v: regulator0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator1 { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; }; &avb { @@ -71,6 +89,18 @@ groups = "scif_clk_a"; function = "scif_clk"; }; + + sdhi3_pins: sd2 { + groups = "sdhi3_data8", "sdhi3_ctrl"; + function = "sdhi3"; + power-source = <1800>; + }; + + sdhi3_pins_uhs: sd2_uhs { + groups = "sdhi3_data8", "sdhi3_ctrl"; + function = "sdhi3"; + power-source = <1800>; + }; }; &sdhi0 { @@ -82,7 +112,15 @@ }; &sdhi3 { + /* used for on-board 8bit eMMC */ + pinctrl-0 = <&sdhi3_pins>; + pinctrl-1 = <&sdhi3_pins_uhs>; + pinctrl-names = "default", "state_uhs"; + + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; bus-width = <8>; + mmc-hs200-1_8v; non-removable; status = "okay"; }; diff --git a/configs/r8a77970_eagle_defconfig b/configs/r8a77970_eagle_defconfig index b736e31177..251415c03a 100644 --- a/configs/r8a77970_eagle_defconfig +++ b/configs/r8a77970_eagle_defconfig @@ -1,6 +1,6 @@ CONFIG_ARM=y CONFIG_ARCH_RMOBILE=y -CONFIG_SYS_TEXT_BASE=0x58280000 +CONFIG_SYS_TEXT_BASE=0x50000000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_RCAR_GEN3=y CONFIG_R8A77970=y diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index 999894f0f6..749562db96 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -318,12 +318,13 @@ static int ravb_phy_config(struct udevice *dev) eth->phydev = phydev; - /* 10BASE is not supported for Ethernet AVB MAC */ - phydev->supported &= ~(SUPPORTED_10baseT_Full - | SUPPORTED_10baseT_Half); + phydev->supported &= SUPPORTED_100baseT_Full | + SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg | + SUPPORTED_TP | SUPPORTED_MII | SUPPORTED_Pause | + SUPPORTED_Asym_Pause; + if (pdata->max_speed != 1000) { - phydev->supported &= ~(SUPPORTED_1000baseT_Half - | SUPPORTED_1000baseT_Full); + phydev->supported &= ~SUPPORTED_1000baseT_Full; reg = phy_read(phydev, -1, MII_CTRL1000); reg &= ~(BIT(9) | BIT(8)); phy_write(phydev, -1, MII_CTRL1000, reg); @@ -437,7 +438,7 @@ static int ravb_start(struct udevice *dev) ret = ravb_reset(dev); if (ret) - goto err; + return ret; ravb_base_desc_init(eth); ravb_tx_desc_init(eth); @@ -445,16 +446,12 @@ static int ravb_start(struct udevice *dev) ret = ravb_config(dev); if (ret) - goto err; + return ret; /* Setting the control will start the AVB-DMAC process. */ writel(CCC_OPC_OPERATION, eth->iobase + RAVB_REG_CCC); return 0; - -err: - clk_disable(ð->clk); - return ret; } static void ravb_stop(struct udevice *dev) @@ -469,6 +466,7 @@ static int ravb_probe(struct udevice *dev) { struct eth_pdata *pdata = dev_get_platdata(dev); struct ravb_priv *eth = dev_get_priv(dev); + struct ofnode_phandle_args phandle_args; struct mii_dev *mdiodev; void __iomem *iobase; int ret; @@ -480,8 +478,16 @@ static int ravb_probe(struct udevice *dev) if (ret < 0) goto err_mdio_alloc; - gpio_request_by_name(dev, "reset-gpios", 0, ð->reset_gpio, - GPIOD_IS_OUT); + ret = dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0, &phandle_args); + if (!ret) { + gpio_request_by_name_nodev(phandle_args.node, "reset-gpios", 0, + ð->reset_gpio, GPIOD_IS_OUT); + } + + if (!dm_gpio_is_valid(ð->reset_gpio)) { + gpio_request_by_name(dev, "reset-gpios", 0, ð->reset_gpio, + GPIOD_IS_OUT); + } mdiodev = mdio_alloc(); if (!mdiodev) { diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 645cde8e4a..2e1123c488 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -810,6 +810,7 @@ static int sh_ether_probe(struct udevice *udev) struct eth_pdata *pdata = dev_get_platdata(udev); struct sh_ether_priv *priv = dev_get_priv(udev); struct sh_eth_dev *eth = &priv->shdev; + struct ofnode_phandle_args phandle_args; struct mii_dev *mdiodev; int ret; @@ -819,8 +820,16 @@ static int sh_ether_probe(struct udevice *udev) if (ret < 0) return ret; - gpio_request_by_name(udev, "reset-gpios", 0, &priv->reset_gpio, - GPIOD_IS_OUT); + ret = dev_read_phandle_with_args(udev, "phy-handle", NULL, 0, 0, &phandle_args); + if (!ret) { + gpio_request_by_name_nodev(phandle_args.node, "reset-gpios", 0, + &priv->reset_gpio, GPIOD_IS_OUT); + } + + if (!dm_gpio_is_valid(&priv->reset_gpio)) { + gpio_request_by_name(udev, "reset-gpios", 0, &priv->reset_gpio, + GPIOD_IS_OUT); + } mdiodev = mdio_alloc(); if (!mdiodev) { diff --git a/drivers/pinctrl/renesas/pfc.c b/drivers/pinctrl/renesas/pfc.c index 6aa2e13f3e..90011537a8 100644 --- a/drivers/pinctrl/renesas/pfc.c +++ b/drivers/pinctrl/renesas/pfc.c @@ -121,7 +121,7 @@ void sh_pfc_write_raw_reg(void __iomem *mapped_reg, unsigned int reg_width, u32 sh_pfc_read(struct sh_pfc *pfc, u32 reg) { - return sh_pfc_read_raw_reg(pfc->regs + reg, 32); + return sh_pfc_read_raw_reg((void __iomem *)(uintptr_t)reg, 32); } void sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data) @@ -132,7 +132,7 @@ void sh_pfc_write(struct sh_pfc *pfc, u32 reg, u32 data) if (pfc->info->unlock_reg) sh_pfc_write_raw_reg(unlock_reg, 32, ~data); - sh_pfc_write_raw_reg(pfc->regs + reg, 32, data); + sh_pfc_write_raw_reg((void __iomem *)(uintptr_t)reg, 32, data); } static void sh_pfc_config_reg_helper(struct sh_pfc *pfc, |