phy: use syscon framework APIs to set ctrl mod reg
Subsystems (3)
v3 cover phy: use syscon framework APIs to set ctrl mod reg
This series is basically to deprecate using phy-omap-control and use syscon APIs to program the control module registers.
Changes from v2:
No changes.
Changes from v1:
*) cleanup ti_pipe3_probe in multiple steps
*) other minor cleanups
Changes from [1] in PHY patches include
*) cleanup ti_pipe3_probe
*) have mask, power_on and power_off values in usb_phy_data for
omap-usb2 phy
The patches have been pushed to
git://git.ti.com/linux-phy/linux-phy.git syscon
[1] -> https://lkml.org/lkml/2015/6/23/189
All the testing was done both before applying the dt patches and after applying the dt patches (dt patches will be posted shortly).
Logs with SYSCON DT
DRA72 EVM : http://pastebin.ubuntu.com/14025205/
DRA7 EVM : http://pastebin.ubuntu.com/14025212/
AM43XX EVM: http://pastebin.ubuntu.com/14025222/
OMAP5 UEVM: http://pastebin.ubuntu.com/14025228/
Logs without SYSCON DT
DRA72 EVM : http://pastebin.ubuntu.com/14025233/
DRA7 EVM : http://pastebin.ubuntu.com/14025238/
AM43XX EVM: http://pastebin.ubuntu.com/14025329/
OMAP5 UEVM: http://pastebin.ubuntu.com/14025248/
The config I used: http://pastebin.ubuntu.com/14025336/
Kishon Vijay Abraham I (9):
phy: ti-pipe3: introduce local struct device* in probe
phy: ti-pipe3: move clk initialization to a separate function
phy: ti-pipe3: move sysctrl initialization to a separate function
phy: ti-pipe3: move mem resource initialization to a separate
function
phy: ti-pipe3: use ti_pipe3_power_off to power off the PHY during
probe
phy: ti-pipe3: use *syscon* framework API to power on/off the PHY
phy: ti-pipe3: use *syscon* framework API to set PCS value of the PHY
phy: omap-usb2: use omap_usb_power_off to power off the PHY during
probe
phy: omap-usb2: use *syscon* framework API to power on/off the PHY
Documentation/devicetree/bindings/phy/ti-phy.txt | 20 +- drivers/phy/phy-omap-usb2.c | 96 +++++-- drivers/phy/phy-ti-pipe3.c | 304 ++++++++++++++++------ include/linux/phy/omap_usb.h | 23 ++ 4 files changed, 340 insertions(+), 103 deletions(-)
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 1/9 phy: ti-pipe3: introduce local struct device* in probe
No functional change. Introduce local struct device pointer in probe and replace using &pdev->dev/phy->dev with the local device pointer. This is in preparation to split ti_pipe3_probe and add separate functions for getting mem resource, getting sysctrl and getting clocks.
--- drivers/phy/phy-ti-pipe3.c | 54 ++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-)
drivers/phy/phy-ti-pipe3.c +27 -27
@@ -319,40 +319,41 @@ static int ti_pipe3_probe(struct platform_device *pdev)struct platform_device *control_pdev;const struct of_device_id *match;struct clk *clk; +struct device *dev = &pdev->dev; - phy =devm_kzalloc (&pdev->dev,sizeof (*phy),GFP_KERNEL ); + phy =devm_kzalloc (dev,sizeof (*phy),GFP_KERNEL );if (!phy)return -ENOMEM ; - phy->dev = &pdev->dev; + phy->dev = dev;if (!of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { - match =of_match_device (ti_pipe3_id_table, &pdev->dev); + match =of_match_device (ti_pipe3_id_table, dev);if (!match)return -EINVAL ; phy->dpll_map = (struct pipe3_dpll_map *)match->data;if (!phy->dpll_map) { -dev_err (&pdev->dev,"no DPLL data\n" ); +dev_err (dev,"no DPLL data\n" );return -EINVAL ; } res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"pll_ctrl" ); - phy->pll_ctrl_base =devm_ioremap_resource (&pdev->dev, res); + phy->pll_ctrl_base =devm_ioremap_resource (dev, res);if (IS_ERR (phy->pll_ctrl_base))return PTR_ERR (phy->pll_ctrl_base); - phy->sys_clk =devm_clk_get (phy->dev,"sysclk" ); + phy->sys_clk =devm_clk_get (dev,"sysclk" );if (IS_ERR (phy->sys_clk)) { -dev_err (&pdev->dev,"unable to get sysclk\n" ); +dev_err (dev,"unable to get sysclk\n" );return -EINVAL ; } } - phy->refclk =devm_clk_get (phy->dev,"refclk" ); + phy->refclk =devm_clk_get (dev,"refclk" );if (IS_ERR (phy->refclk)) { -dev_err (&pdev->dev,"unable to get refclk\n" ); +dev_err (dev,"unable to get refclk\n" );/* older DTBs have missing refclk in SATA PHY * so don't bail out in case of SATA PHY. */
@@ -361,9 +362,9 @@ static int ti_pipe3_probe(struct platform_device *pdev) }if (!of_device_is_compatible (node,"ti,phy-pipe3-sata" )) { - phy->wkupclk =devm_clk_get (phy->dev,"wkupclk" ); + phy->wkupclk =devm_clk_get (dev,"wkupclk" );if (IS_ERR (phy->wkupclk)) { -dev_err (&pdev->dev,"unable to get wkupclk\n" ); +dev_err (dev,"unable to get wkupclk\n" );return PTR_ERR (phy->wkupclk); } }else {
@@ -371,14 +372,14 @@ static int ti_pipe3_probe(struct platform_device *pdev) phy->dpll_reset_syscon =syscon_regmap_lookup_by_phandle (node,"syscon-pllreset" );if (IS_ERR (phy->dpll_reset_syscon)) { -dev_info (&pdev->dev, +dev_info (dev,"can't get syscon-pllreset, sata dpll won't idle\n" ); phy->dpll_reset_syscon =NULL ; }else {if (of_property_read_u32_index (node,"syscon-pllreset" ,1 , &phy->dpll_reset_reg)) { -dev_err (&pdev->dev, +dev_err (dev,"couldn't get pllreset reg. offset\n" );return -EINVAL ; }
@@ -387,30 +388,30 @@ static int ti_pipe3_probe(struct platform_device *pdev)if (of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { - clk =devm_clk_get (phy->dev,"dpll_ref" ); + clk =devm_clk_get (dev,"dpll_ref" );if (IS_ERR (clk)) { -dev_err (&pdev->dev,"unable to get dpll ref clk\n" ); +dev_err (dev,"unable to get dpll ref clk\n" );return PTR_ERR (clk); }clk_set_rate (clk,1500000000 ); - clk =devm_clk_get (phy->dev,"dpll_ref_m2" ); + clk =devm_clk_get (dev,"dpll_ref_m2" );if (IS_ERR (clk)) { -dev_err (&pdev->dev,"unable to get dpll ref m2 clk\n" ); +dev_err (dev,"unable to get dpll ref m2 clk\n" );return PTR_ERR (clk); }clk_set_rate (clk,100000000 ); - clk =devm_clk_get (phy->dev,"phy-div" ); + clk =devm_clk_get (dev,"phy-div" );if (IS_ERR (clk)) { -dev_err (&pdev->dev,"unable to get phy-div clk\n" ); +dev_err (dev,"unable to get phy-div clk\n" );return PTR_ERR (clk); }clk_set_rate (clk,100000000 ); - phy->div_clk =devm_clk_get (phy->dev,"div-clk" ); + phy->div_clk =devm_clk_get (dev,"div-clk" );if (IS_ERR (phy->div_clk)) { -dev_err (&pdev->dev,"unable to get div-clk\n" ); +dev_err (dev,"unable to get div-clk\n" );return PTR_ERR (phy->div_clk); } }else {
@@ -419,13 +420,13 @@ static int ti_pipe3_probe(struct platform_device *pdev) control_node =of_parse_phandle (node,"ctrl-module" ,0 );if (!control_node) { -dev_err (&pdev->dev,"Failed to get control device phandle\n" ); +dev_err (dev,"Failed to get control device phandle\n" );return -EINVAL ; } control_pdev =of_find_device_by_node (control_node);if (!control_pdev) { -dev_err (&pdev->dev,"Failed to get control device\n" ); +dev_err (dev,"Failed to get control device\n" );return -EINVAL ; }
@@ -434,7 +435,7 @@ static int ti_pipe3_probe(struct platform_device *pdev)omap_control_phy_power (phy->control_dev,0 );platform_set_drvdata (pdev, phy); -pm_runtime_enable (phy->dev); +pm_runtime_enable (dev);/* * Prevent auto-disable of refclk for SATA PHY due to Errata i783
@@ -446,13 +447,12 @@ static int ti_pipe3_probe(struct platform_device *pdev) } } - generic_phy =devm_phy_create (phy->dev,NULL , &ops); + generic_phy =devm_phy_create (dev,NULL , &ops);if (IS_ERR (generic_phy))return PTR_ERR (generic_phy);phy_set_drvdata (generic_phy, phy); - phy_provider =devm_of_phy_provider_register (phy->dev, - of_phy_simple_xlate); + phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate);if (IS_ERR (phy_provider))return PTR_ERR (phy_provider);
Signature · 1 line
1.7.9.5
PATCH v3 2/9 phy: ti-pipe3: move clk initialization to a separate function
In reply to Kishon Vijay Abraham INo functional change. Moved clock initialization done in probe to a separate function as part of cleaning up ti_pipe3_probe.
--- drivers/phy/phy-ti-pipe3.c | 127 +++++++++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 55 deletions(-)
drivers/phy/phy-ti-pipe3.c +72 -55
@@ -308,48 +308,11 @@ static const struct phy_ops ops = {static const struct of_device_id ti_pipe3_id_table[]; -static int ti_pipe3_probe (struct platform_device *pdev) +static int ti_pipe3_get_clk (struct ti_pipe3 *phy) { -struct ti_pipe3 *phy; -struct phy *generic_phy; -struct phy_provider *phy_provider; -struct resource *res; -struct device_node *node = pdev->dev.of_node; -struct device_node *control_node; -struct platform_device *control_pdev; -const struct of_device_id *match;struct clk *clk; -struct device *dev = &pdev->dev; - - phy =devm_kzalloc (dev,sizeof (*phy),GFP_KERNEL ); -if (!phy) -return -ENOMEM ; - - phy->dev = dev; - -if (!of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { - match =of_match_device (ti_pipe3_id_table, dev); -if (!match) -return -EINVAL ; - - phy->dpll_map = (struct pipe3_dpll_map *)match->data; -if (!phy->dpll_map) { -dev_err (dev,"no DPLL data\n" ); -return -EINVAL ; - } - - res =platform_get_resource_byname (pdev,IORESOURCE_MEM , -"pll_ctrl" ); - phy->pll_ctrl_base =devm_ioremap_resource (dev, res); -if (IS_ERR (phy->pll_ctrl_base)) -return PTR_ERR (phy->pll_ctrl_base); - - phy->sys_clk =devm_clk_get (dev,"sysclk" ); -if (IS_ERR (phy->sys_clk)) { -dev_err (dev,"unable to get sysclk\n" ); -return -EINVAL ; - } - } +struct device *dev = phy->dev; +struct device_node *node = dev->of_node; phy->refclk =devm_clk_get (dev,"refclk" );if (IS_ERR (phy->refclk)) {
@@ -369,25 +332,17 @@ static int ti_pipe3_probe(struct platform_device *pdev) } }else { phy->wkupclk =ERR_PTR (-ENODEV ); - phy->dpll_reset_syscon =syscon_regmap_lookup_by_phandle (node, -"syscon-pllreset" ); -if (IS_ERR (phy->dpll_reset_syscon)) { -dev_info (dev, -"can't get syscon-pllreset, sata dpll won't idle\n" ); - phy->dpll_reset_syscon =NULL ; - }else { -if (of_property_read_u32_index (node, -"syscon-pllreset" ,1 , - &phy->dpll_reset_reg)) { -dev_err (dev, -"couldn't get pllreset reg. offset\n" ); -return -EINVAL ; - } + } + +if (!of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { + phy->sys_clk =devm_clk_get (dev,"sysclk" ); +if (IS_ERR (phy->sys_clk)) { +dev_err (dev,"unable to get sysclk\n" ); +return -EINVAL ; } }if (of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { - clk =devm_clk_get (dev,"dpll_ref" );if (IS_ERR (clk)) {dev_err (dev,"unable to get dpll ref clk\n" );
@@ -418,6 +373,68 @@ static int ti_pipe3_probe(struct platform_device *pdev) phy->div_clk =ERR_PTR (-ENODEV ); } +return 0 ; +} + +static int ti_pipe3_probe (struct platform_device *pdev) +{ +struct ti_pipe3 *phy; +struct phy *generic_phy; +struct phy_provider *phy_provider; +struct resource *res; +struct device_node *node = pdev->dev.of_node; +struct device_node *control_node; +struct platform_device *control_pdev; +const struct of_device_id *match; +struct device *dev = &pdev->dev; +int ret; + + phy =devm_kzalloc (dev,sizeof (*phy),GFP_KERNEL ); +if (!phy) +return -ENOMEM ; + + phy->dev = dev; + +if (!of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { + match =of_match_device (ti_pipe3_id_table, dev); +if (!match) +return -EINVAL ; + + phy->dpll_map = (struct pipe3_dpll_map *)match->data; +if (!phy->dpll_map) { +dev_err (dev,"no DPLL data\n" ); +return -EINVAL ; + } + + res =platform_get_resource_byname (pdev,IORESOURCE_MEM , +"pll_ctrl" ); + phy->pll_ctrl_base =devm_ioremap_resource (dev, res); +if (IS_ERR (phy->pll_ctrl_base)) +return PTR_ERR (phy->pll_ctrl_base); + } + +if (of_device_is_compatible (node,"ti,phy-pipe3-sata" )) { + phy->dpll_reset_syscon =syscon_regmap_lookup_by_phandle (node, +"syscon-pllreset" ); +if (IS_ERR (phy->dpll_reset_syscon)) { +dev_info (dev, +"can't get syscon-pllreset, sata dpll won't idle\n" ); + phy->dpll_reset_syscon =NULL ; + }else { +if (of_property_read_u32_index (node, +"syscon-pllreset" ,1 , + &phy->dpll_reset_reg)) { +dev_err (dev, +"couldn't get pllreset reg. offset\n" ); +return -EINVAL ; + } + } + } + + ret =ti_pipe3_get_clk (phy); +if (ret) +return ret; + control_node =of_parse_phandle (node,"ctrl-module" ,0 );if (!control_node) {dev_err (dev,"Failed to get control device phandle\n" );
Signature · 1 line
1.7.9.5
PATCH v3 3/9 phy: ti-pipe3: move sysctrl initialization to a separate function
In reply to Kishon Vijay Abraham INo functional change. Moved sysctrl initialization done in probe to a separate function as part of cleaning up ti_pipe3_probe.
--- drivers/phy/phy-ti-pipe3.c | 78 +++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 33 deletions(-)
drivers/phy/phy-ti-pipe3.c +45 -32
@@ -376,6 +376,48 @@ static int ti_pipe3_get_clk(struct ti_pipe3 *phy)return 0 ; } +static int ti_pipe3_get_sysctrl (struct ti_pipe3 *phy) +{ +struct device *dev = phy->dev; +struct device_node *node = dev->of_node; +struct device_node *control_node; +struct platform_device *control_pdev; + + control_node =of_parse_phandle (node,"ctrl-module" ,0 ); +if (!control_node) { +dev_err (dev,"Failed to get control device phandle\n" ); +return -EINVAL ; + } + + control_pdev =of_find_device_by_node (control_node); +if (!control_pdev) { +dev_err (dev,"Failed to get control device\n" ); +return -EINVAL ; + } + + phy->control_dev = &control_pdev->dev; + +if (of_device_is_compatible (node,"ti,phy-pipe3-sata" )) { + phy->dpll_reset_syscon =syscon_regmap_lookup_by_phandle (node, +"syscon-pllreset" ); +if (IS_ERR (phy->dpll_reset_syscon)) { +dev_info (dev, +"can't get syscon-pllreset, sata dpll won't idle\n" ); + phy->dpll_reset_syscon =NULL ; + }else { +if (of_property_read_u32_index (node, +"syscon-pllreset" ,1 , + &phy->dpll_reset_reg)) { +dev_err (dev, +"couldn't get pllreset reg. offset\n" ); +return -EINVAL ; + } + } + } + +return 0 ; +} +static int ti_pipe3_probe (struct platform_device *pdev) {struct ti_pipe3 *phy;
@@ -383,8 +425,6 @@ static int ti_pipe3_probe(struct platform_device *pdev)struct phy_provider *phy_provider;struct resource *res;struct device_node *node = pdev->dev.of_node; -struct device_node *control_node; -struct platform_device *control_pdev;const struct of_device_id *match;struct device *dev = &pdev->dev;int ret;
@@ -413,42 +453,14 @@ static int ti_pipe3_probe(struct platform_device *pdev)return PTR_ERR (phy->pll_ctrl_base); } -if (of_device_is_compatible (node,"ti,phy-pipe3-sata" )) { - phy->dpll_reset_syscon =syscon_regmap_lookup_by_phandle (node, -"syscon-pllreset" ); -if (IS_ERR (phy->dpll_reset_syscon)) { -dev_info (dev, -"can't get syscon-pllreset, sata dpll won't idle\n" ); - phy->dpll_reset_syscon =NULL ; - }else { -if (of_property_read_u32_index (node, -"syscon-pllreset" ,1 , - &phy->dpll_reset_reg)) { -dev_err (dev, -"couldn't get pllreset reg. offset\n" ); -return -EINVAL ; - } - } - } + ret =ti_pipe3_get_sysctrl (phy); +if (ret) +return ret; ret =ti_pipe3_get_clk (phy);if (ret)return ret; - control_node =of_parse_phandle (node,"ctrl-module" ,0 ); -if (!control_node) { -dev_err (dev,"Failed to get control device phandle\n" ); -return -EINVAL ; - } - - control_pdev =of_find_device_by_node (control_node); -if (!control_pdev) { -dev_err (dev,"Failed to get control device\n" ); -return -EINVAL ; - } - - phy->control_dev = &control_pdev->dev;
PATCH v3 4/9 phy: ti-pipe3: move mem resource initialization to a separate function
In reply to Kishon Vijay Abraham INo functional change. Moved mem resource initialization done in probe to a separate function as part of cleaning up ti_pipe3_probe.
--- drivers/phy/phy-ti-pipe3.c | 52 ++++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 19 deletions(-)
drivers/phy/phy-ti-pipe3.c +33 -19
@@ -418,14 +418,42 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy)return 0 ; } +static int ti_pipe3_get_pll_base (struct ti_pipe3 *phy) +{ +struct resource *res; +const struct of_device_id *match; +struct device *dev = phy->dev; +struct device_node *node = dev->of_node; +struct platform_device *pdev =to_platform_device (dev); + +if (of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) +return 0 ; + + match =of_match_device (ti_pipe3_id_table, dev); +if (!match) +return -EINVAL ; + + phy->dpll_map = (struct pipe3_dpll_map *)match->data; +if (!phy->dpll_map) { +dev_err (dev,"no DPLL data\n" ); +return -EINVAL ; + } + + res =platform_get_resource_byname (pdev,IORESOURCE_MEM , +"pll_ctrl" ); + phy->pll_ctrl_base =devm_ioremap_resource (dev, res); +if (IS_ERR (phy->pll_ctrl_base)) +return PTR_ERR (phy->pll_ctrl_base); + +return 0 ; +} +static int ti_pipe3_probe (struct platform_device *pdev) {struct ti_pipe3 *phy;struct phy *generic_phy;struct phy_provider *phy_provider; -struct resource *res;struct device_node *node = pdev->dev.of_node; -const struct of_device_id *match;struct device *dev = &pdev->dev;int ret;
@@ -435,23 +463,9 @@ static int ti_pipe3_probe(struct platform_device *pdev) phy->dev = dev; -if (!of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { - match =of_match_device (ti_pipe3_id_table, dev); -if (!match) -return -EINVAL ; - - phy->dpll_map = (struct pipe3_dpll_map *)match->data; -if (!phy->dpll_map) { -dev_err (dev,"no DPLL data\n" ); -return -EINVAL ; - } - - res =platform_get_resource_byname (pdev,IORESOURCE_MEM , -"pll_ctrl" ); - phy->pll_ctrl_base =devm_ioremap_resource (dev, res); -if (IS_ERR (phy->pll_ctrl_base)) -return PTR_ERR (phy->pll_ctrl_base); - } + ret =ti_pipe3_get_pll_base (phy); +if (ret) +return ret; ret =ti_pipe3_get_sysctrl (phy);if (ret)
Signature · 1 line
1.7.9.5
PATCH v3 5/9 phy: ti-pipe3: use ti_pipe3_power_off to power off the PHY during probe
In reply to Kishon Vijay Abraham INo functional change. Previously omap_control_phy_power() was used to power off the PHY during probe. But once PIPE3 driver is adapted to use syscon, omap_control_phy_power() cannot be used. Hence used ti_pipe3_power_off to power off the PHY.
--- drivers/phy/phy-ti-pipe3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/phy/phy-ti-pipe3.c +3 -2
@@ -475,8 +475,6 @@ static int ti_pipe3_probe(struct platform_device *pdev)if (ret)return ret; -omap_control_phy_power (phy->control_dev,0 ); -platform_set_drvdata (pdev, phy);pm_runtime_enable (dev);
@@ -495,6 +493,9 @@ static int ti_pipe3_probe(struct platform_device *pdev)return PTR_ERR (generic_phy);phy_set_drvdata (generic_phy, phy); + +ti_pipe3_power_off (generic_phy); + phy_provider =devm_of_phy_provider_register (dev, of_phy_simple_xlate);if (IS_ERR (phy_provider))return PTR_ERR (phy_provider);
Signature · 1 line
1.7.9.5
PATCH v3 6/9 phy: ti-pipe3: use *syscon* framework API to power on/off the PHY
In reply to Kishon Vijay Abraham IDeprecate using phy-omap-control driver to power on/off the PHY and use *syscon* framework to do the same.
--- Documentation/devicetree/bindings/phy/ti-phy.txt | 10 ++- drivers/phy/phy-ti-pipe3.c | 90 ++++++++++++++++++---- 2 files changed, 85 insertions(+), 15 deletions(-)
Documentation/devicetree/bindings/phy/ti-phy.txt +8 -2
@@ -77,8 +77,6 @@ Required properties: * "div-clk" - apll clock Optional properties: - - ctrl-module : phandle of the control module used by PHY driver to power on - the PHY. - id: If there are multiple instance of the same type, in order to differentiate between each instance "id" can be used (e.g., multi-lane PCIe PHY). If "id" is not provided, it is set to default value of '1'.
@@ -86,6 +84,14 @@ Optional properties: CTRL_CORE_SMA_SW_0 register and register offset to the CTRL_CORE_SMA_SW_0 register that contains the SATA_PLL_SOFT_RESET bit. Only valid for sata_phy. +Deprecated properties: + - ctrl-module : phandle of the control module used by PHY driver to power on + the PHY. + +Recommended properies: + - syscon-phy-power : phandle/offset pair. Phandle to the system control + module and the register offset to power on/off the PHY. + This is usually a subnode of ocp2scp to which it is connected. usb3phy@4a084400 {
drivers/phy/phy-ti-pipe3.c +77 -13
135 lines not on this page · raw message
Signature · 1 line
1.7.9.5
Re: [PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to power on/off the PHY
Quoted 8 lines · Kishon Vijay Abraham I
Deprecate using phy-omap-control driver to power on/off the PHY and use *syscon* framework to do the same.
Signed-off-by Kishon Vijay Abraham I <[email protected]>--- Documentation/devicetree/bindings/phy/ti-phy.txt | 10 ++- drivers/phy/phy-ti-pipe3.c | 90 ++++++++++++++++++---- 2 files changed, 85 insertions(+), 15 deletions(-)
For the binding:
One comment on the driver though.
[...]
Quoted 2 lines
drivers/phy/phy-ti-pipe3.c +0
-0
[...]
drivers/phy/phy-ti-pipe3.c static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy); · line 162
Quoted 10 lines
drivers/phy/phy-ti-pipe3.c +3
-1@@ -144,18 +155,53 @@ static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy);static int ti_pipe3_power_off (struct phy *x) { +u32 val; +int ret;struct ti_pipe3 *phy =phy_get_drvdata (x); -omap_control_phy_power (phy->control_dev,0 ); +if (phy->phy_power_syscon) {
Writing this as:
if (!phy->phy_power_syscon) {
...
return 0;
}//regmap code
will make it simpler to remove the deprecated code later.
Quoted 12 lines
drivers/phy/phy-ti-pipe3.c +10
-0+ val =PIPE3_PHY_TX_RX_POWEROFF << +PIPE3_PHY_PWRCTL_CLK_CMD_SHIFT ; + + ret =regmap_update_bits (phy->phy_power_syscon, phy->power_reg, +PIPE3_PHY_PWRCTL_CLK_CMD_MASK , val); +if (ret <0 ) +return ret; + }else { +omap_control_phy_power (phy->control_dev,0 ); + }return 0 ;
Re: [PATCH v3 6/9] phy: ti-pipe3: use *syscon* framework API to power on/off the PHY
Hi
Quoted 41 lines · Rob Herring
Quoted 8 lines · Kishon Vijay Abraham I
Deprecate using phy-omap-control driver to power on/off the PHY and use *syscon* framework to do the same.
Signed-off-by Kishon Vijay Abraham I <[email protected]>--- Documentation/devicetree/bindings/phy/ti-phy.txt | 10 ++- drivers/phy/phy-ti-pipe3.c | 90 ++++++++++++++++++---- 2 files changed, 85 insertions(+), 15 deletions(-)For the binding:
Acked-by Rob Herring <[email protected]>One comment on the driver though.
[...]
Quoted 2 lines
drivers/phy/phy-ti-pipe3.c +0
-0[...]
drivers/phy/phy-ti-pipe3.c static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy); · line 162
Quoted 10 lines
drivers/phy/phy-ti-pipe3.c +3
-1@@ -144,18 +155,53 @@ static void ti_pipe3_disable_clocks(struct ti_pipe3 *phy);static int ti_pipe3_power_off (struct phy *x) { +u32 val; +int ret;struct ti_pipe3 *phy =phy_get_drvdata (x); -omap_control_phy_power (phy->control_dev,0 ); +if (phy->phy_power_syscon) {Writing this as:
if (!phy->phy_power_syscon) { ... return 0; }
Quoted 4 lines
//regmap code
will make it simpler to remove the deprecated code later.
hmm.. I will make this change in all the applicable patches.
Thanks
Kishon
Quoted 14 lines
Quoted 14 lines
drivers/phy/phy-ti-pipe3.c +10
-0+ val =PIPE3_PHY_TX_RX_POWEROFF << +PIPE3_PHY_PWRCTL_CLK_CMD_SHIFT ; + + ret =regmap_update_bits (phy->phy_power_syscon, phy->power_reg, +PIPE3_PHY_PWRCTL_CLK_CMD_MASK , val); +if (ret <0 ) +return ret; + }else { +omap_control_phy_power (phy->control_dev,0 ); + }return 0 ;
PATCH v3 7/9 phy: ti-pipe3: use *syscon* framework API to set PCS value of the PHY
In reply to Kishon Vijay Abraham IDeprecate using phy-omap-control driver to set PCS value of the PHY and start using *syscon* API to do the same.
--- Documentation/devicetree/bindings/phy/ti-phy.txt | 2 ++ drivers/phy/phy-ti-pipe3.c | 34 +++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/phy/ti-phy.txt +2 -0
@@ -83,6 +83,8 @@ Optional properties: - syscon-pllreset: Handle to system control region that contains the CTRL_CORE_SMA_SW_0 register and register offset to the CTRL_CORE_SMA_SW_0 register that contains the SATA_PLL_SOFT_RESET bit. Only valid for sata_phy. + - syscon-pcs : phandle/offset pair. Phandle to the system control module and the + register offset to write the PCS delay value. Deprecated properties: - ctrl-module : phandle of the control module used by PHY driver to power on
drivers/phy/phy-ti-pipe3.c +33 -1
@@ -65,6 +65,9 @@#define PIPE3_PHY_TX_RX_POWERON 0x3#define PIPE3_PHY_TX_RX_POWEROFF 0x0 +#define PCIE_PCS_MASK 0xFF0000 +#define PCIE_PCS_DELAY_COUNT_SHIFT 0x10 +/* * This is an Empirical value that works, need to confirm the actual * value required for the PIPE3PHY_PLL_CONFIGURATION2.PLL_IDLE status
@@ -96,9 +99,11 @@ struct ti_pipe3 {struct clk *div_clk;struct pipe3_dpll_map *dpll_map;struct regmap *phy_power_syscon;/* ctrl. reg. acces */ +struct regmap *pcs_syscon;/* ctrl. reg. acces */ struct regmap *dpll_reset_syscon;/* ctrl. reg. acces */ unsigned int dpll_reset_reg;/* reg. index within syscon */ unsigned int power_reg;/* power reg. index within syscon */ +unsigned int pcie_pcs_reg;/* pcs reg. index in syscon */ bool sata_refclk_enabled; };
@@ -275,7 +280,16 @@ static int ti_pipe3_init(struct phy *x)* 18-1804. */ if (of_device_is_compatible (phy->dev->of_node,"ti,phy-pipe3-pcie" )) { -omap_control_pcie_pcs (phy->control_dev,0x96 ); +if (phy->pcs_syscon) { + val =0x96 <<OMAP_CTRL_PCIE_PCS_DELAY_COUNT_SHIFT ; + ret =regmap_update_bits (phy->pcs_syscon, + phy->pcie_pcs_reg, +PCIE_PCS_MASK , val); +if (ret <0 ) +return ret; + }else { +omap_control_pcie_pcs (phy->control_dev,0x96 ); + }return 0 ; }
@@ -461,6 +475,24 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy) phy->control_dev = &control_pdev->dev; } +if (of_device_is_compatible (node,"ti,phy-pipe3-pcie" )) { + phy->pcs_syscon =syscon_regmap_lookup_by_phandle (node, +"syscon-pcs" ); +if (IS_ERR (phy->pcs_syscon)) { +dev_dbg (dev, +"can't get syscon-pcs, using omap control\n" ); + phy->pcs_syscon =NULL ; + }else { +if (of_property_read_u32_index (node, +"syscon-pcs" ,1 , + &phy->pcie_pcs_reg)) { +dev_err (dev, +"couldn't get pcie pcs reg. offset\n" ); +return -EINVAL ; + } + } + } +if (of_device_is_compatible (node,"ti,phy-pipe3-sata" )) { phy->dpll_reset_syscon =syscon_regmap_lookup_by_phandle (node,"syscon-pllreset" );
Signature · 1 line
1.7.9.5
Re: [PATCH v3 7/9] phy: ti-pipe3: use *syscon* framework API to set PCS value of the PHY
Quoted 9 lines · Kishon Vijay Abraham I
Deprecate using phy-omap-control driver to set PCS value of the PHY and start using *syscon* API to do the same.
Signed-off-by Kishon Vijay Abraham I <[email protected]>Acked-by Roger Quadros <[email protected]>--- Documentation/devicetree/bindings/phy/ti-phy.txt | 2 ++ drivers/phy/phy-ti-pipe3.c | 34 +++++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-)
PATCH v3 8/9 phy: omap-usb2: use omap_usb_power_off to power off the PHY during probe
In reply to Kishon Vijay Abraham INo functional change. Previously omap_control_phy_power() was used to power off the PHY during probe. But once phy-omap-usb2 driver is adapted to use syscon, omap_control_phy_power() cannot be used. Hence used omap_usb_power_off to power off the PHY.
--- drivers/phy/phy-omap-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-omap-usb2.c +1 -1
@@ -241,7 +241,6 @@ static int omap_usb2_probe(struct platform_device *pdev) } phy->control_dev = &control_pdev->dev; -omap_control_phy_power (phy->control_dev,0 ); otg->set_host = omap_usb_set_host; otg->set_peripheral = omap_usb_set_peripheral;
@@ -261,6 +260,7 @@ static int omap_usb2_probe(struct platform_device *pdev) }phy_set_drvdata (generic_phy, phy); +omap_usb_power_off (generic_phy); phy_provider =devm_of_phy_provider_register (phy->dev, of_phy_simple_xlate);
Signature · 1 line
1.7.9.5
PATCH v3 9/9 phy: omap-usb2: use *syscon* framework API to power on/off the PHY
In reply to Kishon Vijay Abraham IDeprecate using phy-omap-control driver to power on/off the PHY, and use *syscon* framework to do the same. This handles powering on/off the PHY for the USB2 PHYs used in various TI SoCs.
--- Documentation/devicetree/bindings/phy/ti-phy.txt | 8 +- drivers/phy/phy-omap-usb2.c | 94 ++++++++++++++++++---- include/linux/phy/omap_usb.h | 23 ++++++ 3 files changed, 107 insertions(+), 18 deletions(-)
Documentation/devicetree/bindings/phy/ti-phy.txt +7 -1
@@ -31,6 +31,8 @@ OMAP USB2 PHY Required properties: - compatible: Should be "ti,omap-usb2" + Should be "ti,dra7x-usb2-phy2" for the 2nd instance of USB2 PHY + in DRA7x - reg : Address and length of the register set for the device. - #phy-cells: determine the number of cells that should be given in the phandle while referencing this phy.
@@ -40,10 +42,14 @@ Required properties: * "wkupclk" - wakeup clock. * "refclk" - reference clock (optional). -Optional properties: +Deprecated properties: - ctrl-module : phandle of the control module used by PHY driver to power on the PHY. +Recommended properies: +- syscon-phy-power : phandle/offset pair. Phandle to the system control + module and the register offset to power on/off the PHY. + This is usually a subnode of ocp2scp to which it is connected. usb2phy@4a0ad080 {
drivers/phy/phy-omap-usb2.c +77 -17
158 lines not on this page · raw message
include/linux/phy/omap_usb.h +23 -0
@@ -30,6 +30,12 @@ struct usb_dpll_params {u32 mf; }; +enum omap_usb_phy_type { +TYPE_USB2 ,/* USB2_PHY, power down in CONTROL_DEV_CONF */ +TYPE_DRA7USB2 ,/* USB2 PHY, power and power_aux e.g. DRA7 */ +TYPE_AM437USB2 ,/* USB2 PHY, power e.g. AM437x */ +}; +struct omap_usb {struct usb_phy phy;struct phy_companion *comparator;
@@ -40,11 +46,20 @@ struct omap_usb {struct clk *wkupclk;struct clk *optclk;u8 flags; +enum omap_usb_phy_type type; +struct regmap *syscon_phy_power;/* ctrl. reg. acces */ +unsigned int power_reg;/* power reg. index within syscon */ +u32 mask; +u32 power_on; +u32 power_off; };struct usb_phy_data {const char *label;u8 flags; +u32 mask; +u32 power_on; +u32 power_off; };/* Driver Flags */
@@ -52,6 +67,14 @@ struct usb_phy_data {#define OMAP_USB2_HAS_SET_VBUS (1 << 1)#define OMAP_USB2_CALIBRATE_FALSE_DISCONNECT (1 << 2) +#define OMAP_DEV_PHY_PD BIT(0) +#define OMAP_USB2_PHY_PD BIT(28) + +#define AM437X_USB2_PHY_PD BIT(0) +#define AM437X_USB2_OTG_PD BIT(1) +#define AM437X_USB2_OTGVDET_EN BIT(19) +#define AM437X_USB2_OTGSESSEND_EN BIT(20) +#define phy_to_omapusb (x) container_of((x), struct omap_usb, phy)#if defined(CONFIG_OMAP_USB2 ) || defined(CONFIG_OMAP_USB2_MODULE )
Signature · 1 line
1.7.9.5
Rob Herring
maintainerRe: [PATCH v3 9/9] phy: omap-usb2: use *syscon* framework API to power on/off the PHY
Quoted 16 lines · Kishon Vijay Abraham I
Deprecate using phy-omap-control driver to power on/off the PHY, and use *syscon* framework to do the same. This handles powering on/off the PHY for the USB2 PHYs used in various TI SoCs.
Signed-off-by Kishon Vijay Abraham I <[email protected]>--- Documentation/devicetree/bindings/phy/ti-phy.txt | 8 +- drivers/phy/phy-omap-usb2.c | 94 ++++++++++++++++++---- include/linux/phy/omap_usb.h | 23 ++++++ 3 files changed, 107 insertions(+), 18 deletions(-)Documentation/devicetree/bindings/phy/ti-phy.txt +0
-0
Documentation/devicetree/bindings/phy/ti-phy.txt OMAP USB2 PHY · line 35
Quoted 5 lines
Documentation/devicetree/bindings/phy/ti-phy.txt +2
-0@@ -31,6 +31,8 @@ OMAP USB2 PHY Required properties: - compatible: Should be "ti,omap-usb2" + Should be "ti,dra7x-usb2-phy2" for the 2nd instance of USB2 PHY + in DRA7x
The 2nd instance is different somehow?
Rob
Re: [PATCH v3 9/9] phy: omap-usb2: use *syscon* framework API to power on/off the PHY
Hi Rob,
Quoted 18 lines · Rob Herring
Quoted 17 lines · Kishon Vijay Abraham I
Deprecate using phy-omap-control driver to power on/off the PHY, and use *syscon* framework to do the same. This handles powering on/off the PHY for the USB2 PHYs used in various TI SoCs.
Signed-off-by Kishon Vijay Abraham I <[email protected]>--- Documentation/devicetree/bindings/phy/ti-phy.txt | 8 +- drivers/phy/phy-omap-usb2.c | 94 ++++++++++++++++++---- include/linux/phy/omap_usb.h | 23 ++++++ 3 files changed, 107 insertions(+), 18 deletions(-)Documentation/devicetree/bindings/phy/ti-phy.txt +0
-0@@ -31,6 +31,8 @@ OMAP USB2 PHY
Quoted 6 lines
Documentation/devicetree/bindings/phy/ti-phy.txt OMAP USB2 PHY · line 35
Quoted 4 lines
Documentation/devicetree/bindings/phy/ti-phy.txt +2
-0Required properties: - compatible: Should be "ti,omap-usb2" + Should be "ti,dra7x-usb2-phy2" for the 2nd instance of USB2 PHY + in DRA7xThe 2nd instance is different somehow?
yeah, the bit fields are slightly different.
Thanks
Kishon
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 9/9] phy: omap-usb2: use *syscon* framework API to power on/off the PHY
Quoted 21 lines · Kishon Vijay Abraham I
Hi Rob,
Quoted 18 lines · Rob Herring
Quoted 17 lines · Kishon Vijay Abraham I
Deprecate using phy-omap-control driver to power on/off the PHY, and use *syscon* framework to do the same. This handles powering on/off the PHY for the USB2 PHYs used in various TI SoCs.
Signed-off-by Kishon Vijay Abraham I <[email protected]>--- Documentation/devicetree/bindings/phy/ti-phy.txt | 8 +- drivers/phy/phy-omap-usb2.c | 94 ++++++++++++++++++---- include/linux/phy/omap_usb.h | 23 ++++++ 3 files changed, 107 insertions(+), 18 deletions(-)Documentation/devicetree/bindings/phy/ti-phy.txt +0
-0@@ -31,6 +31,8 @@ OMAP USB2 PHY
Quoted 8 lines
Quoted 6 lines
Documentation/devicetree/bindings/phy/ti-phy.txt OMAP USB2 PHY · line 35
Quoted 4 lines
Documentation/devicetree/bindings/phy/ti-phy.txt +2
-0Required properties: - compatible: Should be "ti,omap-usb2" + Should be "ti,dra7x-usb2-phy2" for the 2nd instance of USB2 PHY + in DRA7xThe 2nd instance is different somehow?
yeah, the bit fields are slightly different.
Okay,
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · On Tuesday 15 December 2015 14:45:59 Kishon Vijay Abraham I wrote:
This series is basically to deprecate using phy-omap-control and use syscon APIs to program the control module registers.
Changes from v2:
No changes.Changes from v1:
*) cleanupti_pipe3_probein multiple steps
*) other minor cleanupsChanges from [1] in PHY patches include
*) cleanupti_pipe3_probe
*) have mask,power_onandpower_offvalues inusb_phy_datafor
omap-usb2 phy
Quoted 8 lines
The patches have been pushed to
git://git.ti.com/linux-phy/linux-phy.gitsyscon[1] -> https://lkml.org/lkml/2015/6/23/189
All the testing was done both before applying the dt patches and after applying the dt patches (dt patches will be posted shortly).
Can you explain here what the conversion is good for? Why do you prefer the syscon mapping over a high-level driver in this case?
Arnd
Hi Arnd,
Quoted 19 lines · Arnd Bergmann
Quoted 18 lines · On Tuesday 15 December 2015 14:45:59 Kishon Vijay Abraham I wrote:
This series is basically to deprecate using phy-omap-control and use syscon APIs to program the control module registers.
Changes from v2:
No changes.Changes from v1:
*) cleanupti_pipe3_probein multiple steps
*) other minor cleanupsChanges from [1] in PHY patches include
*) cleanupti_pipe3_probe
*) have mask,power_onandpower_offvalues inusb_phy_datafor
omap-usb2 phyThe patches have been pushed to
git://git.ti.com/linux-phy/linux-phy.gitsyscon
Quoted 8 lines
Quoted 5 lines
[1] -> https://lkml.org/lkml/2015/6/23/189
All the testing was done both before applying the dt patches and after applying the dt patches (dt patches will be posted shortly).
Can you explain here what the conversion is good for? Why do you prefer the syscon mapping over a high-level driver in this case?
phy-omap-control driver was added when there was no proper infrastructure for doing control module initializations. The phy-omap-control driver is not an 'actual' PHY driver and it was just a hack to do PHY related control module initializations. phy-omap-control is also getting unmanageable with the number of platforms each having number of modules (like USB, SATA, PCIe), using the same driver for control module initializations.
Now with SYSCON framework being added to the kernel, phy-omap-control shouldn't be needed and it also provides a uniform API across all the modules to program the control module.
Thanks
Kishon
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 39 lines · On Tuesday 15 December 2015 16:44:41 Kishon Vijay Abraham I wrote:
Hi Arnd,
Quoted 19 lines · Arnd Bergmann
Quoted 18 lines · On Tuesday 15 December 2015 14:45:59 Kishon Vijay Abraham I wrote:
This series is basically to deprecate using phy-omap-control and use syscon APIs to program the control module registers.
Changes from v2:
No changes.Changes from v1:
*) cleanupti_pipe3_probein multiple steps
*) other minor cleanupsChanges from [1] in PHY patches include
*) cleanupti_pipe3_probe
*) have mask,power_onandpower_offvalues inusb_phy_datafor
omap-usb2 phyThe patches have been pushed to
git://git.ti.com/linux-phy/linux-phy.gitsysconQuoted 8 lines
Quoted 5 lines
[1] -> https://lkml.org/lkml/2015/6/23/189
All the testing was done both before applying the dt patches and after applying the dt patches (dt patches will be posted shortly).
Can you explain here what the conversion is good for? Why do you prefer the syscon mapping over a high-level driver in this case?
phy-omap-control driver was added when there was no proper infrastructure for doing control module initializations. The phy-omap-control driver is not an 'actual' PHY driver and it was just a hack to do PHY related control module initializations. phy-omap-control is also getting unmanageable with the number of platforms each having number of modules (like USB, SATA, PCIe), using the same driver for control module initializations.
Quoted 3 lines
Now with SYSCON framework being added to the kernel, phy-omap-control shouldn't be needed and it also provides a uniform API across all the modules to program the control module.
Ok, so the "phy-control" devices were really just a few registers of a system controller device that does a lot of other things as well, right?
Can you put your description above into the cover-letter for the series, and the merge commit?
Arnd
Hi,
Quoted 40 lines · Arnd Bergmann
Quoted 39 lines · On Tuesday 15 December 2015 16:44:41 Kishon Vijay Abraham I wrote:
Hi Arnd,
Quoted 19 lines · Arnd Bergmann
Quoted 18 lines · On Tuesday 15 December 2015 14:45:59 Kishon Vijay Abraham I wrote:
This series is basically to deprecate using phy-omap-control and use syscon APIs to program the control module registers.
Changes from v2:
No changes.Changes from v1:
*) cleanupti_pipe3_probein multiple steps
*) other minor cleanupsChanges from [1] in PHY patches include
*) cleanupti_pipe3_probe
*) have mask,power_onandpower_offvalues inusb_phy_datafor
omap-usb2 phyThe patches have been pushed to
git://git.ti.com/linux-phy/linux-phy.gitsysconQuoted 8 lines
Quoted 5 lines
[1] -> https://lkml.org/lkml/2015/6/23/189
All the testing was done both before applying the dt patches and after applying the dt patches (dt patches will be posted shortly).
Can you explain here what the conversion is good for? Why do you prefer the syscon mapping over a high-level driver in this case?
phy-omap-control driver was added when there was no proper infrastructure for doing control module initializations. The phy-omap-control driver is not an 'actual' PHY driver and it was just a hack to do PHY related control module initializations. phy-omap-control is also getting unmanageable with the number of platforms each having number of modules (like USB, SATA, PCIe), using the same driver for control module initializations.
Quoted 6 lines
Quoted 3 lines
Now with SYSCON framework being added to the kernel, phy-omap-control shouldn't be needed and it also provides a uniform API across all the modules to program the control module.
Ok, so the "phy-control" devices were really just a few registers of a system controller device that does a lot of other things as well, right?
right.
Quoted 3 lines
Can you put your description above into the cover-letter for the series, and the merge commit?
Sure.
Thanks
Kishon
Quoted 13 lines · Kishon Vijay Abraham I
Quoted 12 lines · Arnd Bergmann
Quoted 12 lines
Quoted 3 lines
Can you explain here what the conversion is good for? Why do you prefer the syscon mapping over a high-level driver in this case?
phy-omap-control driver was added when there was no proper infrastructure for doing control module initializations. The phy-omap-control driver is not an 'actual' PHY driver and it was just a hack to do PHY related control module initializations. phy-omap-control is also getting unmanageable with the number of platforms each having number of modules (like USB, SATA, PCIe), using the same driver for control module initializations.
Quoted 11 lines
Quoted 6 lines
Quoted 3 lines
Now with SYSCON framework being added to the kernel, phy-omap-control shouldn't be needed and it also provides a uniform API across all the modules to program the control module.
Ok, so the "phy-control" devices were really just a few registers of a system controller device that does a lot of other things as well, right?
right.
Quoted 3 lines
Can you put your description above into the cover-letter for the series, and the merge commit?
Just to confirm.. Seems like this series keeps USB working and the dts changes can be done later after the driver changes have been merged?
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Quoted 21 lines · Tony Lindgren
Quoted 20 lines · Kishon Vijay Abraham I
Quoted 18 lines · Arnd Bergmann
Quoted 12 lines
Quoted 3 lines
Can you explain here what the conversion is good for? Why do you prefer the syscon mapping over a high-level driver in this case?
phy-omap-control driver was added when there was no proper infrastructure for doing control module initializations. The phy-omap-control driver is not an 'actual' PHY driver and it was just a hack to do PHY related control module initializations. phy-omap-control is also getting unmanageable with the number of platforms each having number of modules (like USB, SATA, PCIe), using the same driver for control module initializations.
Quoted 3 lines
Now with SYSCON framework being added to the kernel, phy-omap-control shouldn't be needed and it also provides a uniform API across all the modules to program the control module.
Ok, so the "phy-control" devices were really just a few registers of a system controller device that does a lot of other things as well, right?
Quoted 7 lines
Quoted 4 lines
right.
Quoted 3 lines
Can you put your description above into the cover-letter for the series, and the merge commit?
Just to confirm.. Seems like this series keeps USB working and the dts changes can be done later after the driver changes have been merged?
that's right Tony. Will merge this series by tomorrow if I don't get any review comments.
Thanks
Kishon
Quoted 9 lines
Regards,
Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html