mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 11:10:51 +07:00
phy: for 4.6-rc
*) make rockchip-dp and rockchip-emmc PHY child device of GRF Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJXEzFIAAoJEA5ceFyATYLZ4xYP/1tiOhG2LI0Svd+8wwbc5bFH oJNwu8Wo6aPhHHvG4UEdSHMgmcdsFRZMK4p8cvL5QoT4sD8g0AuAvDN6qAPob5PI upGkKC1EeR3Z9o4vmyyeHnAryodHKa4rgo0rD/cmx0nVcDw9YV82WUGBsZIPwxCz npXNUHhuzQQjAz5E1AS7CipT/y4JXLdqMdUoJGd1zLo9zr53h9eBs/zwgJHMDZQT mk4PIG6bJ/bilDYhPoTg12klJMtVRCo6rwgV7dykMEHwuaAfraFBZ86ngUW1t3fC S3DsFKBD/TUg6gsF2+SVqm2Z2nH3s6473GDoenfMWkhYvqcfkZKlgxqx2tzNyG6a QRPj+ZBZ64z5yb4MVsNUgUhDV1AbazcDYsxPH3GaaaKp4BT8IC5uNLHkEsfdlaXD mE4myf1UtgOrHaP3Rg3V7anU4RsHIW2uLsJVuaMfzAgMyx6J0YsCvB3HgVpVCIGP MvoPkIijAmg9ToCW0PIQClKo18V8f9VAioqBarL4NapE7xQZBx13zIvnbyJxOZoR 99DX1ELSxP+5tOvkbH4DdY/21enVfKnKMkkxv0Rk0s6BHVDEWTUlYsrZdfH/D2sl CUNf4VoEkxM7VTWEC5q3kXcvl7W1KxEyAwjSZ70gIG4w7WR0juFPFUkRBOkKsFFn XCE85Mr4wLtoTSv5oYxl =Wh2y -----END PGP SIGNATURE----- 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: Kishon Vijay Abraham I <kishon@ti.com>
This commit is contained in:
commit
d40d334743
@ -8,15 +8,19 @@ Required properties:
|
||||
of memory mapped region.
|
||||
- clock-names: from common clock binding:
|
||||
Required elements: "24m"
|
||||
- rockchip,grf: phandle to the syscon managing the "general register files"
|
||||
- #phy-cells : from the generic PHY bindings, must be 0;
|
||||
|
||||
Example:
|
||||
|
||||
edp_phy: edp-phy {
|
||||
compatible = "rockchip,rk3288-dp-phy";
|
||||
rockchip,grf = <&grf>;
|
||||
clocks = <&cru SCLK_EDP_24M>;
|
||||
clock-names = "24m";
|
||||
#phy-cells = <0>;
|
||||
grf: syscon@ff770000 {
|
||||
compatible = "rockchip,rk3288-grf", "syscon", "simple-mfd";
|
||||
|
||||
...
|
||||
|
||||
edp_phy: edp-phy {
|
||||
compatible = "rockchip,rk3288-dp-phy";
|
||||
clocks = <&cru SCLK_EDP_24M>;
|
||||
clock-names = "24m";
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
@ -3,17 +3,23 @@ Rockchip EMMC PHY
|
||||
|
||||
Required properties:
|
||||
- compatible: rockchip,rk3399-emmc-phy
|
||||
- rockchip,grf : phandle to the syscon managing the "general
|
||||
register files"
|
||||
- #phy-cells: must be 0
|
||||
- reg: PHY configure reg address offset in "general
|
||||
- reg: PHY register address offset and length in "general
|
||||
register files"
|
||||
|
||||
Example:
|
||||
|
||||
emmcphy: phy {
|
||||
compatible = "rockchip,rk3399-emmc-phy";
|
||||
rockchip,grf = <&grf>;
|
||||
reg = <0xf780>;
|
||||
#phy-cells = <0>;
|
||||
|
||||
grf: syscon@ff770000 {
|
||||
compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
...
|
||||
|
||||
emmcphy: phy@f780 {
|
||||
compatible = "rockchip,rk3399-emmc-phy";
|
||||
reg = <0xf780 0x20>;
|
||||
#phy-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
@ -86,6 +86,9 @@ static int rockchip_dp_phy_probe(struct platform_device *pdev)
|
||||
if (!np)
|
||||
return -ENODEV;
|
||||
|
||||
if (!dev->parent || !dev->parent->of_node)
|
||||
return -ENODEV;
|
||||
|
||||
dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
|
||||
if (IS_ERR(dp))
|
||||
return -ENOMEM;
|
||||
@ -104,9 +107,9 @@ static int rockchip_dp_phy_probe(struct platform_device *pdev)
|
||||
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)) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,10 @@ static int rockchip_emmc_phy_probe(struct platform_device *pdev)
|
||||
struct regmap *grf;
|
||||
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)) {
|
||||
dev_err(dev, "Missing rockchip,grf property\n");
|
||||
return PTR_ERR(grf);
|
||||
|
Loading…
Reference in New Issue
Block a user