浏览代码

Merge branch 'master' of git://git.denx.de/u-boot-sh

Tom Rini 7 年之前
父节点
当前提交
dc7df68f21

+ 1 - 1
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>;
 	};
 };
 

+ 38 - 0
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 = <&reg_3p3v>;
+	vqmmc-supply = <&reg_1p8v>;
 	bus-width = <8>;
+	mmc-hs200-1_8v;
 	non-removable;
 	status = "okay";
 };

+ 1 - 1
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

+ 19 - 13
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(&eth->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, &eth->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,
+					   &eth->reset_gpio, GPIOD_IS_OUT);
+	}
+
+	if (!dm_gpio_is_valid(&eth->reset_gpio)) {
+		gpio_request_by_name(dev, "reset-gpios", 0, &eth->reset_gpio,
+				     GPIOD_IS_OUT);
+	}
 
 	mdiodev = mdio_alloc();
 	if (!mdiodev) {

+ 11 - 2
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) {

+ 2 - 2
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,