Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d40d3347 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'phy-for-4.6-rc' of...

Merge tag 'phy-for-4.6-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy

 into usb-linus

Kishon writes:

phy: for 4.6-rc

*) make rockchip-dp and rockchip-emmc PHY child device of
   GRF

Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parents 5813dea9 5128de85
Loading
Loading
Loading
Loading
+11 −7
Original line number Original line Diff line number Diff line
@@ -8,15 +8,19 @@ Required properties:
	of memory mapped region.
	of memory mapped region.
- clock-names: from common clock binding:
- clock-names: from common clock binding:
	Required elements: "24m"
	Required elements: "24m"
- rockchip,grf: phandle to the syscon managing the "general register files"
- #phy-cells : from the generic PHY bindings, must be 0;
- #phy-cells : from the generic PHY bindings, must be 0;


Example:
Example:


grf: syscon@ff770000 {
	compatible = "rockchip,rk3288-grf", "syscon", "simple-mfd";

...

	edp_phy: edp-phy {
	edp_phy: edp-phy {
		compatible = "rockchip,rk3288-dp-phy";
		compatible = "rockchip,rk3288-dp-phy";
	rockchip,grf = <&grf>;
		clocks = <&cru SCLK_EDP_24M>;
		clocks = <&cru SCLK_EDP_24M>;
		clock-names = "24m";
		clock-names = "24m";
		#phy-cells = <0>;
		#phy-cells = <0>;
	};
	};
};
+14 −8
Original line number Original line Diff line number Diff line
@@ -3,17 +3,23 @@ Rockchip EMMC PHY


Required properties:
Required properties:
 - compatible: rockchip,rk3399-emmc-phy
 - compatible: rockchip,rk3399-emmc-phy
 - rockchip,grf : phandle to the syscon managing the "general
   register files"
 - #phy-cells: must be 0
 - #phy-cells: must be 0
 - reg: PHY configure reg address offset in "general
 - reg: PHY register address offset and length in "general
   register files"
   register files"


Example:
Example:


emmcphy: phy {

grf: syscon@ff770000 {
	compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
	#address-cells = <1>;
	#size-cells = <1>;

...

	emmcphy: phy@f780 {
		compatible = "rockchip,rk3399-emmc-phy";
		compatible = "rockchip,rk3399-emmc-phy";
	rockchip,grf = <&grf>;
		reg = <0xf780 0x20>;
	reg = <0xf780>;
		#phy-cells = <0>;
		#phy-cells = <0>;
	};
	};
};
+5 −2
Original line number Original line Diff line number Diff line
@@ -86,6 +86,9 @@ static int rockchip_dp_phy_probe(struct platform_device *pdev)
	if (!np)
	if (!np)
		return -ENODEV;
		return -ENODEV;


	if (!dev->parent || !dev->parent->of_node)
		return -ENODEV;

	dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
	dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
	if (IS_ERR(dp))
	if (IS_ERR(dp))
		return -ENOMEM;
		return -ENOMEM;
@@ -104,9 +107,9 @@ static int rockchip_dp_phy_probe(struct platform_device *pdev)
		return ret;
		return ret;
	}
	}


	dp->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
	dp->grf = syscon_node_to_regmap(dev->parent->of_node);
	if (IS_ERR(dp->grf)) {
	if (IS_ERR(dp->grf)) {
		dev_err(dev, "rk3288-dp needs rockchip,grf property\n");
		dev_err(dev, "rk3288-dp needs the General Register Files syscon\n");
		return PTR_ERR(dp->grf);
		return PTR_ERR(dp->grf);
	}
	}


+4 −1
Original line number Original line Diff line number Diff line
@@ -176,7 +176,10 @@ static int rockchip_emmc_phy_probe(struct platform_device *pdev)
	struct regmap *grf;
	struct regmap *grf;
	unsigned int reg_offset;
	unsigned int reg_offset;


	grf = syscon_regmap_lookup_by_phandle(dev->of_node, "rockchip,grf");
	if (!dev->parent || !dev->parent->of_node)
		return -ENODEV;

	grf = syscon_node_to_regmap(dev->parent->of_node);
	if (IS_ERR(grf)) {
	if (IS_ERR(grf)) {
		dev_err(dev, "Missing rockchip,grf property\n");
		dev_err(dev, "Missing rockchip,grf property\n");
		return PTR_ERR(grf);
		return PTR_ERR(grf);