* Re: [PATCH 01/26] phy: qualcomm: fix indentation in Makefile [not found] ` <20230612092355.87937-2-brgl@bgdev.pl> @ 2023-06-12 17:20 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 17:20 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:30AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Align all entries in Makefile. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > drivers/phy/qualcomm/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/phy/qualcomm/Makefile b/drivers/phy/qualcomm/Makefile > index de3dc9ccf067..5fb33628566b 100644 > --- a/drivers/phy/qualcomm/Makefile > +++ b/drivers/phy/qualcomm/Makefile > @@ -20,4 +20,4 @@ obj-$(CONFIG_PHY_QCOM_USB_HSIC) += phy-qcom-usb-hsic.o > obj-$(CONFIG_PHY_QCOM_USB_HS_28NM) += phy-qcom-usb-hs-28nm.o > obj-$(CONFIG_PHY_QCOM_USB_SS) += phy-qcom-usb-ss.o > obj-$(CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2)+= phy-qcom-snps-femto-v2.o > -obj-$(CONFIG_PHY_QCOM_IPQ806X_USB) += phy-qcom-ipq806x-usb.o > +obj-$(CONFIG_PHY_QCOM_IPQ806X_USB) += phy-qcom-ipq806x-usb.o > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-6-brgl@bgdev.pl>]
* Re: [PATCH 05/26] net: stmmac: dwmac-qcom-ethqos: shrink clock code with devres [not found] ` <20230612092355.87937-6-brgl@bgdev.pl> @ 2023-06-12 18:22 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 18:22 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:34AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > We can use a devm action to completely drop the remove callback and use > stmmac_pltfr_remove() directly for remove. We can also drop one of the > goto labels. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> I think using the remove callback seems more direct to a reader, but that's pretty opinionated. The change itself looks good so: Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > .../stmicro/stmmac/dwmac-qcom-ethqos.c | 24 +++++++++---------- > 1 file changed, 11 insertions(+), 13 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index c801838fae2a..2da0738eed24 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -586,6 +586,11 @@ static int ethqos_clks_config(void *priv, bool enabled) > return ret; > } > > +static void ethqos_clks_disable(void *data) > +{ > + ethqos_clks_config(data, false); > +} > + > static int qcom_ethqos_probe(struct platform_device *pdev) > { > struct device_node *np = pdev->dev.of_node; > @@ -636,6 +641,10 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > if (ret) > goto err_mem; > > + ret = devm_add_action_or_reset(&pdev->dev, ethqos_clks_disable, ethqos); > + if (ret) > + goto err_mem; > + > ethqos->speed = SPEED_1000; > ethqos_update_rgmii_clk(ethqos, SPEED_1000); > ethqos_set_func_clk_en(ethqos); > @@ -653,27 +662,16 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > > ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); > if (ret) > - goto err_clk; > + goto err_mem; > > return ret; > > -err_clk: > - ethqos_clks_config(ethqos, false); > - > err_mem: > stmmac_remove_config_dt(pdev, plat_dat); > > return ret; > } > > -static void qcom_ethqos_remove(struct platform_device *pdev) > -{ > - struct qcom_ethqos *ethqos = get_stmmac_bsp_priv(&pdev->dev); > - > - stmmac_pltfr_remove(pdev); > - ethqos_clks_config(ethqos, false); > -} > - > static const struct of_device_id qcom_ethqos_match[] = { > { .compatible = "qcom,qcs404-ethqos", .data = &emac_v2_3_0_data}, > { .compatible = "qcom,sc8280xp-ethqos", .data = &emac_v3_0_0_data}, > @@ -684,7 +682,7 @@ MODULE_DEVICE_TABLE(of, qcom_ethqos_match); > > static struct platform_driver qcom_ethqos_driver = { > .probe = qcom_ethqos_probe, > - .remove_new = qcom_ethqos_remove, > + .remove_new = stmmac_pltfr_remove, > .driver = { > .name = "qcom-ethqos", > .pm = &stmmac_pltfr_pm_ops, > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-7-brgl@bgdev.pl>]
* Re: [PATCH 06/26] net: stmmac: dwmac-qcom-ethqos: rename a label in probe() [not found] ` <20230612092355.87937-7-brgl@bgdev.pl> @ 2023-06-12 18:32 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 18:32 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:35AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > The err_mem label's name is unclear. It actually should be reached on > any error after stmmac_probe_config_dt() succeeds. Name it after the > cleanup action that needs to be called before exiting. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 2da0738eed24..16e856861558 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -615,14 +615,14 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > ethqos = devm_kzalloc(&pdev->dev, sizeof(*ethqos), GFP_KERNEL); > if (!ethqos) { > ret = -ENOMEM; > - goto err_mem; > + goto out_config_dt; > } > > ethqos->pdev = pdev; > ethqos->rgmii_base = devm_platform_ioremap_resource_byname(pdev, "rgmii"); > if (IS_ERR(ethqos->rgmii_base)) { > ret = PTR_ERR(ethqos->rgmii_base); > - goto err_mem; > + goto out_config_dt; > } > > data = of_device_get_match_data(&pdev->dev); > @@ -634,16 +634,16 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > ethqos->rgmii_clk = devm_clk_get(&pdev->dev, "rgmii"); > if (IS_ERR(ethqos->rgmii_clk)) { > ret = PTR_ERR(ethqos->rgmii_clk); > - goto err_mem; > + goto out_config_dt; > } > > ret = ethqos_clks_config(ethqos, true); > if (ret) > - goto err_mem; > + goto out_config_dt; > > ret = devm_add_action_or_reset(&pdev->dev, ethqos_clks_disable, ethqos); > if (ret) > - goto err_mem; > + goto out_config_dt; > > ethqos->speed = SPEED_1000; > ethqos_update_rgmii_clk(ethqos, SPEED_1000); > @@ -662,11 +662,11 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > > ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); > if (ret) > - goto err_mem; > + goto out_config_dt; > > return ret; > > -err_mem: > +out_config_dt: > stmmac_remove_config_dt(pdev, plat_dat); > > return ret; > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-8-brgl@bgdev.pl>]
* Re: [PATCH 07/26] net: stmmac: dwmac-qcom-ethqos: tweak the order of local variables [not found] ` <20230612092355.87937-8-brgl@bgdev.pl> @ 2023-06-12 18:34 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 18:34 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:36AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Make sure we follow the reverse-xmas tree convention. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 16e856861558..28d2514a8795 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -594,9 +594,9 @@ static void ethqos_clks_disable(void *data) > static int qcom_ethqos_probe(struct platform_device *pdev) > { > struct device_node *np = pdev->dev.of_node; > + const struct ethqos_emac_driver_data *data; > struct plat_stmmacenet_data *plat_dat; > struct stmmac_resources stmmac_res; > - const struct ethqos_emac_driver_data *data; > struct qcom_ethqos *ethqos; > int ret; > > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-9-brgl@bgdev.pl>]
* Re: [PATCH 08/26] net: stmmac: dwmac-qcom-ethqos: use a helper variable for &pdev->dev [not found] ` <20230612092355.87937-9-brgl@bgdev.pl> @ 2023-06-12 18:38 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 18:38 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:37AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Shrink code and avoid line breaks by using a helper variable for > &pdev->dev. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > .../stmicro/stmmac/dwmac-qcom-ethqos.c | 48 ++++++++++--------- > 1 file changed, 26 insertions(+), 22 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 28d2514a8795..e19d142630d3 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -123,25 +123,26 @@ static void rgmii_updatel(struct qcom_ethqos *ethqos, > static void rgmii_dump(void *priv) > { > struct qcom_ethqos *ethqos = priv; > + struct device *dev = ðqos->pdev->dev; > > - dev_dbg(ðqos->pdev->dev, "Rgmii register dump\n"); > - dev_dbg(ðqos->pdev->dev, "RGMII_IO_MACRO_CONFIG: %x\n", > + dev_dbg(dev, "Rgmii register dump\n"); > + dev_dbg(dev, "RGMII_IO_MACRO_CONFIG: %x\n", > rgmii_readl(ethqos, RGMII_IO_MACRO_CONFIG)); > - dev_dbg(ðqos->pdev->dev, "SDCC_HC_REG_DLL_CONFIG: %x\n", > + dev_dbg(dev, "SDCC_HC_REG_DLL_CONFIG: %x\n", > rgmii_readl(ethqos, SDCC_HC_REG_DLL_CONFIG)); > - dev_dbg(ðqos->pdev->dev, "SDCC_HC_REG_DDR_CONFIG: %x\n", > + dev_dbg(dev, "SDCC_HC_REG_DDR_CONFIG: %x\n", > rgmii_readl(ethqos, SDCC_HC_REG_DDR_CONFIG)); > - dev_dbg(ðqos->pdev->dev, "SDCC_HC_REG_DLL_CONFIG2: %x\n", > + dev_dbg(dev, "SDCC_HC_REG_DLL_CONFIG2: %x\n", > rgmii_readl(ethqos, SDCC_HC_REG_DLL_CONFIG2)); > - dev_dbg(ðqos->pdev->dev, "SDC4_STATUS: %x\n", > + dev_dbg(dev, "SDC4_STATUS: %x\n", > rgmii_readl(ethqos, SDC4_STATUS)); > - dev_dbg(ðqos->pdev->dev, "SDCC_USR_CTL: %x\n", > + dev_dbg(dev, "SDCC_USR_CTL: %x\n", > rgmii_readl(ethqos, SDCC_USR_CTL)); > - dev_dbg(ðqos->pdev->dev, "RGMII_IO_MACRO_CONFIG2: %x\n", > + dev_dbg(dev, "RGMII_IO_MACRO_CONFIG2: %x\n", > rgmii_readl(ethqos, RGMII_IO_MACRO_CONFIG2)); > - dev_dbg(ðqos->pdev->dev, "RGMII_IO_MACRO_DEBUG1: %x\n", > + dev_dbg(dev, "RGMII_IO_MACRO_DEBUG1: %x\n", > rgmii_readl(ethqos, RGMII_IO_MACRO_DEBUG1)); > - dev_dbg(ðqos->pdev->dev, "EMAC_SYSTEM_LOW_POWER_DEBUG: %x\n", > + dev_dbg(dev, "EMAC_SYSTEM_LOW_POWER_DEBUG: %x\n", > rgmii_readl(ethqos, EMAC_SYSTEM_LOW_POWER_DEBUG)); > } > > @@ -242,6 +243,7 @@ static const struct ethqos_emac_driver_data emac_v3_0_0_data = { > > static int ethqos_dll_configure(struct qcom_ethqos *ethqos) > { > + struct device *dev = ðqos->pdev->dev; > unsigned int val; > int retry = 1000; > > @@ -279,7 +281,7 @@ static int ethqos_dll_configure(struct qcom_ethqos *ethqos) > retry--; > } while (retry > 0); > if (!retry) > - dev_err(ðqos->pdev->dev, "Clear CK_OUT_EN timedout\n"); > + dev_err(dev, "Clear CK_OUT_EN timedout\n"); > > /* Set CK_OUT_EN */ > rgmii_updatel(ethqos, SDCC_DLL_CONFIG_CK_OUT_EN, > @@ -296,7 +298,7 @@ static int ethqos_dll_configure(struct qcom_ethqos *ethqos) > retry--; > } while (retry > 0); > if (!retry) > - dev_err(ðqos->pdev->dev, "Set CK_OUT_EN timedout\n"); > + dev_err(dev, "Set CK_OUT_EN timedout\n"); > > /* Set DDR_CAL_EN */ > rgmii_updatel(ethqos, SDCC_DLL_CONFIG2_DDR_CAL_EN, > @@ -322,12 +324,13 @@ static int ethqos_dll_configure(struct qcom_ethqos *ethqos) > > static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos) > { > + struct device *dev = ðqos->pdev->dev; > int phase_shift; > int phy_mode; > int loopback; > > /* Determine if the PHY adds a 2 ns TX delay or the MAC handles it */ > - phy_mode = device_get_phy_mode(ðqos->pdev->dev); > + phy_mode = device_get_phy_mode(dev); > if (phy_mode == PHY_INTERFACE_MODE_RGMII_ID || > phy_mode == PHY_INTERFACE_MODE_RGMII_TXID) > phase_shift = 0; > @@ -468,7 +471,7 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos) > loopback, RGMII_IO_MACRO_CONFIG); > break; > default: > - dev_err(ðqos->pdev->dev, > + dev_err(dev, > "Invalid speed %d\n", ethqos->speed); nit: You could put this on the prior line now With that in place, feel free to add: Reviewed-by: Andrew Halaney <ahalaney@redhat.com> _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-10-brgl@bgdev.pl>]
* Re: [PATCH 09/26] net: stmmac: dwmac-qcom-ethqos: add missing include [not found] ` <20230612092355.87937-10-brgl@bgdev.pl> @ 2023-06-12 20:06 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 20:06 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:38AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > device_get_phy_mode() is declared in linux/property.h but this header > is not included. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index e19d142630d3..ecb94e5388c7 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -6,6 +6,7 @@ > #include <linux/of_device.h> > #include <linux/platform_device.h> > #include <linux/phy.h> > +#include <linux/property.h> > #include "stmmac.h" > #include "stmmac_platform.h" > > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-11-brgl@bgdev.pl>]
* Re: [PATCH 10/26] net: stmmac: dwmac-qcom-ethqos: add a newline between headers [not found] ` <20230612092355.87937-11-brgl@bgdev.pl> @ 2023-06-12 20:06 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 20:06 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:39AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Typically we use a newline between global and local headers so add it > here as well. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index ecb94e5388c7..5b56abacbf6b 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -7,6 +7,7 @@ > #include <linux/platform_device.h> > #include <linux/phy.h> > #include <linux/property.h> > + > #include "stmmac.h" > #include "stmmac_platform.h" > > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-12-brgl@bgdev.pl>]
* Re: [PATCH 11/26] net: stmmac: dwmac-qcom-ethqos: remove stray space [not found] ` <20230612092355.87937-12-brgl@bgdev.pl> @ 2023-06-12 20:07 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 20:07 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:40AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > There's an unnecessary space in the rgmii_updatel() function, remove it. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 5b56abacbf6b..8ed05f29fe8b 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -117,7 +117,7 @@ static void rgmii_updatel(struct qcom_ethqos *ethqos, > { > unsigned int temp; > > - temp = rgmii_readl(ethqos, offset); > + temp = rgmii_readl(ethqos, offset); > temp = (temp & ~(mask)) | val; > rgmii_writel(ethqos, temp, offset); > } > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-13-brgl@bgdev.pl>]
* Re: [PATCH 12/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional serdes phy [not found] ` <20230612092355.87937-13-brgl@bgdev.pl> @ 2023-06-12 20:32 ` Andrew Halaney 2023-06-13 7:52 ` Bartosz Golaszewski 0 siblings, 1 reply; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 20:32 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:41AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > On sa8775p platforms, there's a SGMII SerDes PHY between the MAC and > external PHY that we need to enable and configure. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > .../stmicro/stmmac/dwmac-qcom-ethqos.c | 37 +++++++++++++++++++ > 1 file changed, 37 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 8ed05f29fe8b..3438b6229351 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -6,6 +6,7 @@ > #include <linux/of_device.h> > #include <linux/platform_device.h> > #include <linux/phy.h> > +#include <linux/phy/phy.h> > #include <linux/property.h> > > #include "stmmac.h" > @@ -93,6 +94,7 @@ struct qcom_ethqos { > > unsigned int rgmii_clk_rate; > struct clk *rgmii_clk; > + struct phy *serdes_phy; > unsigned int speed; > > const struct ethqos_emac_por *por; > @@ -566,6 +568,30 @@ static void ethqos_fix_mac_speed(void *priv, unsigned int speed) > ethqos_configure(ethqos); > } > > +static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv) > +{ > + struct qcom_ethqos *ethqos = priv; > + int ret; > + > + ret = phy_set_speed(ethqos->serdes_phy, ethqos->speed); > + if (ret) > + return ret; > + > + ret = phy_init(ethqos->serdes_phy); > + if (ret) > + return ret; > + > + return phy_power_on(ethqos->serdes_phy); The docs say (phy.rst): The general order of calls should be:: [devm_][of_]phy_get() phy_init() phy_power_on() [phy_set_mode[_ext]()] ... phy_power_off() phy_exit() [[of_]phy_put()] Some PHY drivers may not implement :c:func:`phy_init` or :c:func:`phy_power_on`, but controllers should always call these functions to be compatible with other PHYs. Some PHYs may require :c:func:`phy_set_mode <phy_set_mode_ext>`, while others may use a default mode (typically configured via devicetree or other firmware). For compatibility, you should always call this function if you know what mode you will be using. Generally, this function should be called after :c:func:`phy_power_on`, although some PHY drivers may allow it at any time. Not really dictating you need to do that order, but if possible I think calling phy_set_speed after init + power_on is more generic. Not sure if that plays nice with the phy driver in this series or not. Otherwise, I think this looks good. > +} > + > +static void qcom_ethqos_serdes_powerdown(struct net_device *ndev, void *priv) > +{ > + struct qcom_ethqos *ethqos = priv; > + > + phy_power_off(ethqos->serdes_phy); > + phy_exit(ethqos->serdes_phy); > +} > + > static int ethqos_clks_config(void *priv, bool enabled) > { > struct qcom_ethqos *ethqos = priv; > @@ -651,6 +677,12 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > if (ret) > goto out_config_dt; > > + ethqos->serdes_phy = devm_phy_optional_get(dev, "serdes"); > + if (IS_ERR(ethqos->serdes_phy)) { > + ret = PTR_ERR(ethqos->serdes_phy); > + goto out_config_dt; > + } > + > ethqos->speed = SPEED_1000; > ethqos_update_rgmii_clk(ethqos, SPEED_1000); > ethqos_set_func_clk_en(ethqos); > @@ -666,6 +698,11 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > if (of_device_is_compatible(np, "qcom,qcs404-ethqos")) > plat_dat->rx_clk_runs_in_lpi = 1; > > + if (ethqos->serdes_phy) { > + plat_dat->serdes_powerup = qcom_ethqos_serdes_powerup; > + plat_dat->serdes_powerdown = qcom_ethqos_serdes_powerdown; > + } > + > ret = stmmac_dvr_probe(dev, plat_dat, &stmmac_res); > if (ret) > goto out_config_dt; > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 12/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional serdes phy 2023-06-12 20:32 ` [PATCH 12/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional serdes phy Andrew Halaney @ 2023-06-13 7:52 ` Bartosz Golaszewski 0 siblings, 0 replies; 28+ messages in thread From: Bartosz Golaszewski @ 2023-06-13 7:52 UTC (permalink / raw) To: Andrew Halaney Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 10:33 PM Andrew Halaney <ahalaney@redhat.com> wrote: > > On Mon, Jun 12, 2023 at 11:23:41AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > On sa8775p platforms, there's a SGMII SerDes PHY between the MAC and > > external PHY that we need to enable and configure. > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > .../stmicro/stmmac/dwmac-qcom-ethqos.c | 37 +++++++++++++++++++ > > 1 file changed, 37 insertions(+) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > index 8ed05f29fe8b..3438b6229351 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > @@ -6,6 +6,7 @@ > > #include <linux/of_device.h> > > #include <linux/platform_device.h> > > #include <linux/phy.h> > > +#include <linux/phy/phy.h> > > #include <linux/property.h> > > > > #include "stmmac.h" > > @@ -93,6 +94,7 @@ struct qcom_ethqos { > > > > unsigned int rgmii_clk_rate; > > struct clk *rgmii_clk; > > + struct phy *serdes_phy; > > unsigned int speed; > > > > const struct ethqos_emac_por *por; > > @@ -566,6 +568,30 @@ static void ethqos_fix_mac_speed(void *priv, unsigned int speed) > > ethqos_configure(ethqos); > > } > > > > +static int qcom_ethqos_serdes_powerup(struct net_device *ndev, void *priv) > > +{ > > + struct qcom_ethqos *ethqos = priv; > > + int ret; > > + > > + ret = phy_set_speed(ethqos->serdes_phy, ethqos->speed); > > + if (ret) > > + return ret; > > + > > + ret = phy_init(ethqos->serdes_phy); > > + if (ret) > > + return ret; > > + > > + return phy_power_on(ethqos->serdes_phy); > > The docs say (phy.rst): > > The general order of calls should be:: > > [devm_][of_]phy_get() > phy_init() > phy_power_on() > [phy_set_mode[_ext]()] > ... > phy_power_off() > phy_exit() > [[of_]phy_put()] > > Some PHY drivers may not implement :c:func:`phy_init` or :c:func:`phy_power_on`, > but controllers should always call these functions to be compatible with other > PHYs. Some PHYs may require :c:func:`phy_set_mode <phy_set_mode_ext>`, while > others may use a default mode (typically configured via devicetree or other > firmware). For compatibility, you should always call this function if you know > what mode you will be using. Generally, this function should be called after > :c:func:`phy_power_on`, although some PHY drivers may allow it at any time. > > Not really dictating you need to do that order, but if possible I think > calling phy_set_speed after init + power_on is more generic. Not sure if > that plays nice with the phy driver in this series or not. > > Otherwise, I think this looks good. > I had to rework the PHY driver code a bit for this order to work but it'll be good now in v2. Thanks! Bart > > +} > > + > > +static void qcom_ethqos_serdes_powerdown(struct net_device *ndev, void *priv) > > +{ > > + struct qcom_ethqos *ethqos = priv; > > + > > + phy_power_off(ethqos->serdes_phy); > > + phy_exit(ethqos->serdes_phy); > > +} > > + > > static int ethqos_clks_config(void *priv, bool enabled) > > { > > struct qcom_ethqos *ethqos = priv; > > @@ -651,6 +677,12 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > > if (ret) > > goto out_config_dt; > > > > + ethqos->serdes_phy = devm_phy_optional_get(dev, "serdes"); > > + if (IS_ERR(ethqos->serdes_phy)) { > > + ret = PTR_ERR(ethqos->serdes_phy); > > + goto out_config_dt; > > + } > > + > > ethqos->speed = SPEED_1000; > > ethqos_update_rgmii_clk(ethqos, SPEED_1000); > > ethqos_set_func_clk_en(ethqos); > > @@ -666,6 +698,11 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > > if (of_device_is_compatible(np, "qcom,qcs404-ethqos")) > > plat_dat->rx_clk_runs_in_lpi = 1; > > > > + if (ethqos->serdes_phy) { > > + plat_dat->serdes_powerup = qcom_ethqos_serdes_powerup; > > + plat_dat->serdes_powerdown = qcom_ethqos_serdes_powerdown; > > + } > > + > > ret = stmmac_dvr_probe(dev, plat_dat, &stmmac_res); > > if (ret) > > goto out_config_dt; > > -- > > 2.39.2 > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-14-brgl@bgdev.pl>]
* Re: [PATCH 13/26] net: stmmac: dwmac-qcom-ethqos: make the rgmii clock optional [not found] ` <20230612092355.87937-14-brgl@bgdev.pl> @ 2023-06-12 20:40 ` Andrew Halaney 2023-06-13 7:58 ` Bartosz Golaszewski 0 siblings, 1 reply; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 20:40 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:42AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > On sa8775p there's no RGMII clock so make it optional in the driver. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 3438b6229351..252dca400071 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -663,7 +663,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > ethqos->rgmii_config_loopback_en = data->rgmii_config_loopback_en; > ethqos->has_emac3 = data->has_emac3; > > - ethqos->rgmii_clk = devm_clk_get(dev, "rgmii"); > + ethqos->rgmii_clk = devm_clk_get_optional(dev, "rgmii"); This makes it optional for older platforms too, but as far as I know on those platforms it is mandatory. This can be enforced in dt-binding checks, but should we also enforce that in the driver still? Honestly I feel like yes, but there's probably some precedent maintainers follow on this front that I don't know of. > if (IS_ERR(ethqos->rgmii_clk)) { > ret = PTR_ERR(ethqos->rgmii_clk); > goto out_config_dt; > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 13/26] net: stmmac: dwmac-qcom-ethqos: make the rgmii clock optional 2023-06-12 20:40 ` [PATCH 13/26] net: stmmac: dwmac-qcom-ethqos: make the rgmii clock optional Andrew Halaney @ 2023-06-13 7:58 ` Bartosz Golaszewski 0 siblings, 0 replies; 28+ messages in thread From: Bartosz Golaszewski @ 2023-06-13 7:58 UTC (permalink / raw) To: Andrew Halaney Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 10:40 PM Andrew Halaney <ahalaney@redhat.com> wrote: > > On Mon, Jun 12, 2023 at 11:23:42AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > On sa8775p there's no RGMII clock so make it optional in the driver. > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > index 3438b6229351..252dca400071 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > @@ -663,7 +663,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > > ethqos->rgmii_config_loopback_en = data->rgmii_config_loopback_en; > > ethqos->has_emac3 = data->has_emac3; > > > > - ethqos->rgmii_clk = devm_clk_get(dev, "rgmii"); > > + ethqos->rgmii_clk = devm_clk_get_optional(dev, "rgmii"); > > This makes it optional for older platforms too, but as far as I know on > those platforms it is mandatory. > > This can be enforced in dt-binding checks, but should we also enforce > that in the driver still? Honestly I feel like yes, but there's probably > some precedent maintainers follow on this front that I don't know of. > While my gut feeling is that enforcing the clock list on the DT binding lever is enough, we can also do a different thing: rename the clock from rgmii_clk to link_clk or something similar and just determine the name based on the HW variant ("rgmii" or "phyaux"). Or even get the clock by its index? this way we could fold the next patch in the series into this one and simplify the code. Bart > > > if (IS_ERR(ethqos->rgmii_clk)) { > > ret = PTR_ERR(ethqos->rgmii_clk); > > goto out_config_dt; > > -- > > 2.39.2 > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-15-brgl@bgdev.pl>]
* Re: [PATCH 14/26] net: stmmac: dwmac-qcom-ethqos: add optional phyaux clock [not found] ` <20230612092355.87937-15-brgl@bgdev.pl> @ 2023-06-12 20:42 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 20:42 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:43AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > On sa8775p we don't use the RGMII clock but have an additional PHYAUX > clock so add support for it to the driver. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > .../ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 252dca400071..2f6b9b419601 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -94,6 +94,7 @@ struct qcom_ethqos { > > unsigned int rgmii_clk_rate; > struct clk *rgmii_clk; > + struct clk *phyaux_clk; > struct phy *serdes_phy; > unsigned int speed; > > @@ -604,6 +605,13 @@ static int ethqos_clks_config(void *priv, bool enabled) > return ret; > } > > + ret = clk_prepare_enable(ethqos->phyaux_clk); > + if (ret) { > + clk_disable_unprepare(ethqos->rgmii_clk); > + dev_err(ðqos->pdev->dev, "phyaux enable failed\n"); > + return ret; > + } > + > /* Enable functional clock to prevent DMA reset to timeout due > * to lacking PHY clock after the hardware block has been power > * cycled. The actual configuration will be adjusted once > @@ -611,6 +619,7 @@ static int ethqos_clks_config(void *priv, bool enabled) > */ > ethqos_set_func_clk_en(ethqos); > } else { > + clk_disable_unprepare(ethqos->phyaux_clk); > clk_disable_unprepare(ethqos->rgmii_clk); > } > > @@ -669,6 +678,12 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > goto out_config_dt; > } > > + ethqos->phyaux_clk = devm_clk_get_optional(dev, "phyaux"); > + if (IS_ERR(ethqos->phyaux_clk)) { > + ret = PTR_ERR(ethqos->phyaux_clk); > + goto out_config_dt; > + } > + Similar comment to the prior patch about whether or not this should be optional (or selected via platform compatible and required), otherwise looks good. > ret = ethqos_clks_config(ethqos, true); > if (ret) > goto out_config_dt; > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-16-brgl@bgdev.pl>]
* Re: [PATCH 15/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional phy-supply [not found] ` <20230612092355.87937-16-brgl@bgdev.pl> @ 2023-06-12 21:06 ` Andrew Halaney 2023-06-13 9:02 ` Bartosz Golaszewski 0 siblings, 1 reply; 28+ messages in thread From: Andrew Halaney @ 2023-06-12 21:06 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:44AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > On sa8775p-ride we need to enable the power supply for the external PHY. Is this for the external phy? It doesn't seem like it from the board schematic I have... the regulator never makes it out of the black box that is the SIP/SOM if I'm reading right. My (poor) understanding was this was for the serdes phy that's doing the conversion to SGMII before hitting the board... good chance I'm wrong though. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 2f6b9b419601..21f329d2f7eb 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -8,6 +8,7 @@ > #include <linux/phy.h> > #include <linux/phy/phy.h> > #include <linux/property.h> > +#include <linux/regulator/consumer.h> > > #include "stmmac.h" > #include "stmmac_platform.h" > @@ -692,6 +693,10 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > if (ret) > goto out_config_dt; > > + ret = devm_regulator_get_enable_optional(dev, "phy"); > + if (ret < 0 && ret != -ENODEV) > + goto out_config_dt; > + > ethqos->serdes_phy = devm_phy_optional_get(dev, "serdes"); > if (IS_ERR(ethqos->serdes_phy)) { > ret = PTR_ERR(ethqos->serdes_phy); > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 15/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional phy-supply 2023-06-12 21:06 ` [PATCH 15/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional phy-supply Andrew Halaney @ 2023-06-13 9:02 ` Bartosz Golaszewski 0 siblings, 0 replies; 28+ messages in thread From: Bartosz Golaszewski @ 2023-06-13 9:02 UTC (permalink / raw) To: Andrew Halaney Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:06 PM Andrew Halaney <ahalaney@redhat.com> wrote: > > On Mon, Jun 12, 2023 at 11:23:44AM +0200, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > On sa8775p-ride we need to enable the power supply for the external PHY. > > Is this for the external phy? It doesn't seem like it from the board > schematic I have... the regulator never makes it out of the black box that > is the SIP/SOM if I'm reading right. > > My (poor) understanding was this was for the serdes phy that's doing the > conversion to SGMII before hitting the board... good chance I'm wrong > though. > No, you're right. In which case I think the regulator calls should be moved into the serdes driver instead as phy-supply is defined as the supply of the external PHY in stmmac bindings. Bart > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > index 2f6b9b419601..21f329d2f7eb 100644 > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > > @@ -8,6 +8,7 @@ > > #include <linux/phy.h> > > #include <linux/phy/phy.h> > > #include <linux/property.h> > > +#include <linux/regulator/consumer.h> > > > > #include "stmmac.h" > > #include "stmmac_platform.h" > > @@ -692,6 +693,10 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > > if (ret) > > goto out_config_dt; > > > > + ret = devm_regulator_get_enable_optional(dev, "phy"); > > + if (ret < 0 && ret != -ENODEV) > > + goto out_config_dt; > > + > > ethqos->serdes_phy = devm_phy_optional_get(dev, "serdes"); > > if (IS_ERR(ethqos->serdes_phy)) { > > ret = PTR_ERR(ethqos->serdes_phy); > > -- > > 2.39.2 > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-17-brgl@bgdev.pl>]
* Re: [PATCH 16/26] net: stmmac: dwmac-qcom-ethqos: prepare the driver for more PHY modes [not found] ` <20230612092355.87937-17-brgl@bgdev.pl> @ 2023-06-13 16:59 ` Andrew Halaney 0 siblings, 0 replies; 28+ messages in thread From: Andrew Halaney @ 2023-06-13 16:59 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:45AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > In preparation for supporting SGMII, let's make the code a bit more > generic. Add a new callback for MAC configuration so that we can assign > a different variant of it in the future. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andrew Halaney <ahalaney@redhat.com> > --- > .../stmicro/stmmac/dwmac-qcom-ethqos.c | 31 ++++++++++++++++--- > 1 file changed, 26 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > index 21f329d2f7eb..2f96f2c11278 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c > @@ -92,12 +92,14 @@ struct ethqos_emac_driver_data { > struct qcom_ethqos { > struct platform_device *pdev; > void __iomem *rgmii_base; > + int (*configure_func)(struct qcom_ethqos *ethqos); > > unsigned int rgmii_clk_rate; > struct clk *rgmii_clk; > struct clk *phyaux_clk; > struct phy *serdes_phy; > unsigned int speed; > + int phy_mode; > > const struct ethqos_emac_por *por; > unsigned int num_por; > @@ -332,13 +334,11 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos) > { > struct device *dev = ðqos->pdev->dev; > int phase_shift; > - int phy_mode; > int loopback; > > /* Determine if the PHY adds a 2 ns TX delay or the MAC handles it */ > - phy_mode = device_get_phy_mode(dev); > - if (phy_mode == PHY_INTERFACE_MODE_RGMII_ID || > - phy_mode == PHY_INTERFACE_MODE_RGMII_TXID) > + if (ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_ID || > + ethqos->phy_mode == PHY_INTERFACE_MODE_RGMII_TXID) > phase_shift = 0; > else > phase_shift = RGMII_CONFIG2_TX_CLK_PHASE_SHIFT_EN; > @@ -485,7 +485,7 @@ static int ethqos_rgmii_macro_init(struct qcom_ethqos *ethqos) > return 0; > } > > -static int ethqos_configure(struct qcom_ethqos *ethqos) > +static int ethqos_configure_rgmii(struct qcom_ethqos *ethqos) > { > struct device *dev = ðqos->pdev->dev; > volatile unsigned int dll_lock; > @@ -561,6 +561,11 @@ static int ethqos_configure(struct qcom_ethqos *ethqos) > return 0; > } > > +static int ethqos_configure(struct qcom_ethqos *ethqos) > +{ > + return ethqos->configure_func(ethqos); > +} > + > static void ethqos_fix_mac_speed(void *priv, unsigned int speed) > { > struct qcom_ethqos *ethqos = priv; > @@ -660,6 +665,22 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > goto out_config_dt; > } > > + ethqos->phy_mode = device_get_phy_mode(dev); > + switch (ethqos->phy_mode) { > + case PHY_INTERFACE_MODE_RGMII: > + case PHY_INTERFACE_MODE_RGMII_ID: > + case PHY_INTERFACE_MODE_RGMII_RXID: > + case PHY_INTERFACE_MODE_RGMII_TXID: > + ethqos->configure_func = ethqos_configure_rgmii; > + break; > + case -ENODEV: > + ret = -ENODEV; > + goto out_config_dt; > + default: > + ret = -EINVAL; > + goto out_config_dt; > + } > + > ethqos->pdev = pdev; > ethqos->rgmii_base = devm_platform_ioremap_resource_byname(pdev, "rgmii"); > if (IS_ERR(ethqos->rgmii_base)) { > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-4-brgl@bgdev.pl>]
* Re: [PATCH 03/26] phy: qcom: add the SGMII SerDes PHY driver [not found] ` <20230612092355.87937-4-brgl@bgdev.pl> @ 2023-06-13 17:39 ` Bjorn Andersson [not found] ` <7fe7078e-404d-28e5-0dd1-53b7f9cd7626@linaro.org> 1 sibling, 0 replies; 28+ messages in thread From: Bjorn Andersson @ 2023-06-13 17:39 UTC (permalink / raw) To: Bartosz Golaszewski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:23:32AM +0200, Bartosz Golaszewski wrote: > diff --git a/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c b/drivers/phy/qualcomm/phy-qcom-sgmii-eth.c [..] > +static int qcom_dwmac_sgmii_phy_probe(struct platform_device *pdev) > +{ > + struct qcom_dwmac_sgmii_phy_data *data; > + struct device *dev = &pdev->dev; > + struct phy_provider *provider; > + struct clk *refclk; > + void __iomem *base; > + struct phy *phy; > + > + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); > + if (!data) > + return -ENOMEM; > + > + base = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(base)) > + return PTR_ERR(base); > + > + data->regmap = devm_regmap_init_mmio(dev, base, > + &qcom_dwmac_sgmii_phy_regmap_cfg); > + if (IS_ERR(data->regmap)) > + return PTR_ERR(data->regmap); > + > + phy = devm_phy_create(dev, NULL, &qcom_dwmac_sgmii_phy_ops); > + if (IS_ERR(phy)) > + return PTR_ERR(phy); > + > + refclk = devm_clk_get_enabled(dev, "sgmi_ref"); > + if (IS_ERR(refclk)) > + return PTR_ERR(refclk); > + > + provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); > + if (IS_ERR(provider)) > + return PTR_ERR(provider); > + > + phy_set_drvdata(phy, data); > + platform_set_drvdata(pdev, data); You don't use the pdev's dev's drvdata, so I think you can drop the platform_set_drvdata() Regards, Bjorn > + > + return 0; > +} _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <7fe7078e-404d-28e5-0dd1-53b7f9cd7626@linaro.org>]
* Re: [PATCH 03/26] phy: qcom: add the SGMII SerDes PHY driver [not found] ` <7fe7078e-404d-28e5-0dd1-53b7f9cd7626@linaro.org> @ 2023-06-14 7:18 ` Bartosz Golaszewski 0 siblings, 0 replies; 28+ messages in thread From: Bartosz Golaszewski @ 2023-06-14 7:18 UTC (permalink / raw) To: Konrad Dybcio Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Mon, Jun 12, 2023 at 11:45 AM Konrad Dybcio <konrad.dybcio@linaro.org> wrote: > > > > On 12.06.2023 11:23, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > Implement support for the SGMII/SerDes PHY present on various Qualcomm > > platforms. > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > +static const struct regmap_config qcom_dwmac_sgmii_phy_regmap_cfg = { > > + .reg_bits = 32, > > + .val_bits = 32, > > + .reg_stride = 4, > > + .use_relaxed_mmio = true, > > + .disable_locking = true, > The last two are rather brave, no? > We don't need locking because all callbacks are already protected by the phy subsystem with a mutex and I don't really see anything that would make it dangerous to use relaxed semantics in this driver. It's just basic configuration. Bart > Konrad > > +}; > > + > > +static int qcom_dwmac_sgmii_phy_probe(struct platform_device *pdev) > > +{ > > + struct qcom_dwmac_sgmii_phy_data *data; > > + struct device *dev = &pdev->dev; > > + struct phy_provider *provider; > > + struct clk *refclk; > > + void __iomem *base; > > + struct phy *phy; > > + > > + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); > > + if (!data) > > + return -ENOMEM; > > + > > + base = devm_platform_ioremap_resource(pdev, 0); > > + if (IS_ERR(base)) > > + return PTR_ERR(base); > > + > > + data->regmap = devm_regmap_init_mmio(dev, base, > > + &qcom_dwmac_sgmii_phy_regmap_cfg); > > + if (IS_ERR(data->regmap)) > > + return PTR_ERR(data->regmap); > > + > > + phy = devm_phy_create(dev, NULL, &qcom_dwmac_sgmii_phy_ops); > > + if (IS_ERR(phy)) > > + return PTR_ERR(phy); > > + > > + refclk = devm_clk_get_enabled(dev, "sgmi_ref"); > > + if (IS_ERR(refclk)) > > + return PTR_ERR(refclk); > > + > > + provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); > > + if (IS_ERR(provider)) > > + return PTR_ERR(provider); > > + > > + phy_set_drvdata(phy, data); > > + platform_set_drvdata(pdev, data); > > + > > + return 0; > > +} > > + > > +static const struct of_device_id qcom_dwmac_sgmii_phy_of_match[] = { > > + { .compatible = "qcom,sa8775p-dwmac-sgmii-phy" }, > > + { }, > > +}; > > +MODULE_DEVICE_TABLE(of, qcom_dwmac_sgmii_phy_of_match); > > + > > +static struct platform_driver qcom_dwmac_sgmii_phy_driver = { > > + .probe = qcom_dwmac_sgmii_phy_probe, > > + .driver = { > > + .name = "qcom-dwmac-sgmii-phy", > > + .of_match_table = qcom_dwmac_sgmii_phy_of_match, > > + } > > +}; > > + > > +module_platform_driver(qcom_dwmac_sgmii_phy_driver); > > + > > +MODULE_DESCRIPTION("Qualcomm DWMAC SGMII PHY driver"); > > +MODULE_LICENSE("GPL"); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-24-brgl@bgdev.pl>]
* Re: [PATCH 23/26] arm64: dts: qcom: sa8775p: add the first 1Gb ethernet interface [not found] ` <20230612092355.87937-24-brgl@bgdev.pl> @ 2023-06-13 18:57 ` Konrad Dybcio 0 siblings, 0 replies; 28+ messages in thread From: Konrad Dybcio @ 2023-06-13 18:57 UTC (permalink / raw) To: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu Cc: netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On 12.06.2023 11:23, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Add the node for the first ethernet interface on sa8775p platforms. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > arch/arm64/boot/dts/qcom/sa8775p.dtsi | 30 +++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi > index 0e59000a0c82..f43a2a5d1d11 100644 > --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi > +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi > @@ -2315,6 +2315,36 @@ cpufreq_hw: cpufreq@18591000 { > > #freq-domain-cells = <1>; > }; > + > + ethernet0: ethernet@23040000 { > + compatible = "qcom,sa8775p-ethqos"; > + reg = <0x0 0x23040000 0x0 0x10000>, > + <0x0 0x23056000 0x0 0x100>; > + reg-names = "stmmaceth", "rgmii"; > + > + clocks = <&gcc GCC_EMAC0_AXI_CLK>, > + <&gcc GCC_EMAC0_SLV_AHB_CLK>, > + <&gcc GCC_EMAC0_PTP_CLK>, > + <&gcc GCC_EMAC0_PHY_AUX_CLK>; > + clock-names = "stmmaceth", "pclk", "ptp_ref", "phyaux"; Please make this a vertical list, one per line > + > + power-domains = <&gcc EMAC0_GDSC>; > + > + interrupts = <GIC_SPI 946 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "macirq"; And another nit, interrupts above clocks would match what I ask others to do.. Still working on checks/guidelines for this! Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > + > + phys = <&serdes_phy>; > + phy-names = "serdes"; > + > + iommus = <&apps_smmu 0x120 0xf>; > + > + snps,tso; > + snps,pbl = <32>; > + rx-fifo-depth = <16384>; > + tx-fifo-depth = <16384>; > + > + status = "disabled"; > + }; > }; > > arch_timer: timer { _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-25-brgl@bgdev.pl>]
* Re: [PATCH 24/26] arm64: dts: qcom: sa8775p-ride: enable the SerDes PHY [not found] ` <20230612092355.87937-25-brgl@bgdev.pl> @ 2023-06-13 19:02 ` Konrad Dybcio 2023-06-14 14:51 ` Bjorn Andersson 0 siblings, 1 reply; 28+ messages in thread From: Konrad Dybcio @ 2023-06-13 19:02 UTC (permalink / raw) To: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu Cc: netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On 12.06.2023 11:23, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Enable the internal PHY on sa8775p-ride. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> --- Bjorn, Krzysztof.. I was thinking whether we should even be disabling such hardware by default.. Things that reside on the SoC and have no external dependencies could be left enabled: pros: - less fluff - we'd probably very quickly fix the missing PM calls - possibly less fw_devlink woes if we fail to get rid of references to the disabled component? cons: - boot times - slightly more memory usage Konrad > arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > index ab767cfa51ff..7754788ea775 100644 > --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > @@ -355,6 +355,10 @@ &qupv3_id_2 { > status = "okay"; > }; > > +&serdes_phy { > + status = "okay"; > +}; > + > &sleep_clk { > clock-frequency = <32764>; > }; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 24/26] arm64: dts: qcom: sa8775p-ride: enable the SerDes PHY 2023-06-13 19:02 ` [PATCH 24/26] arm64: dts: qcom: sa8775p-ride: enable the SerDes PHY Konrad Dybcio @ 2023-06-14 14:51 ` Bjorn Andersson 0 siblings, 0 replies; 28+ messages in thread From: Bjorn Andersson @ 2023-06-14 14:51 UTC (permalink / raw) To: Konrad Dybcio Cc: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Tue, Jun 13, 2023 at 09:02:23PM +0200, Konrad Dybcio wrote: > > > On 12.06.2023 11:23, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > Enable the internal PHY on sa8775p-ride. > > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> > > --- > > Bjorn, Krzysztof.. I was thinking whether we should even be disabling > such hardware by default.. > I'm in favor of keeping the configuration as generic/common/simple as possible. So I like your suggestion. Regards, Bjorn > Things that reside on the SoC and have no external dependencies could > be left enabled: > > pros: > - less fluff > - we'd probably very quickly fix the missing PM calls > - possibly less fw_devlink woes if we fail to get rid of references to > the disabled component? > > cons: > - boot times > - slightly more memory usage > > Konrad > > arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > > index ab767cfa51ff..7754788ea775 100644 > > --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > > +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > > @@ -355,6 +355,10 @@ &qupv3_id_2 { > > status = "okay"; > > }; > > > > +&serdes_phy { > > + status = "okay"; > > +}; > > + > > &sleep_clk { > > clock-frequency = <32764>; > > }; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-26-brgl@bgdev.pl>]
* Re: [PATCH 25/26] arm64: dts: qcom: sa8775p-ride: add pin functions for ethernet0 [not found] ` <20230612092355.87937-26-brgl@bgdev.pl> @ 2023-06-13 19:04 ` Konrad Dybcio 0 siblings, 0 replies; 28+ messages in thread From: Konrad Dybcio @ 2023-06-13 19:04 UTC (permalink / raw) To: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu Cc: netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On 12.06.2023 11:23, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Add the MDC and MDIO pin functions for ethernet0 on sa8775p-ride. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > index 7754788ea775..dbd9553aa5c7 100644 > --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > @@ -370,6 +370,22 @@ &spi16 { > }; > > &tlmm { > + ethernet0_default: ethernet0-default-state { > + ethernet0_mdc: ethernet0-mdc-pins { > + pins = "gpio8"; > + function = "emac0_mdc"; > + drive-strength = <16>; > + bias-pull-up; > + }; > + > + ethernet0_mdio: ethernet0-mdio-pins { > + pins = "gpio9"; > + function = "emac0_mdio"; > + drive-strength = <16>; > + bias-pull-up; > + }; > + }; > + > qup_uart10_default: qup-uart10-state { > pins = "gpio46", "gpio47"; > function = "qup1_se3"; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-27-brgl@bgdev.pl>]
* Re: [PATCH 26/26] arm64: dts: qcom: sa8775p-ride: enable ethernet0 [not found] ` <20230612092355.87937-27-brgl@bgdev.pl> @ 2023-06-13 19:08 ` Konrad Dybcio 0 siblings, 0 replies; 28+ messages in thread From: Konrad Dybcio @ 2023-06-13 19:08 UTC (permalink / raw) To: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu Cc: netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On 12.06.2023 11:23, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Enable the first 1Gb ethernet port on sa8775p-ride development board. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- I don't know a whole lot about this, but it passes bindings checks and looks good overall, so: Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Konrad > arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 89 +++++++++++++++++++++++ > 1 file changed, 89 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > index dbd9553aa5c7..13508271bca8 100644 > --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > @@ -261,6 +261,95 @@ vreg_l8e: ldo8 { > }; > }; > > +ðernet0 { > + phy-mode = "sgmii"; > + phy-handle = <&sgmii_phy>; > + phy-supply = <&vreg_l5a>; > + > + pinctrl-0 = <ðernet0_default>; > + pinctrl-names = "default"; > + > + snps,mtl-rx-config = <&mtl_rx_setup>; > + snps,mtl-tx-config = <&mtl_tx_setup>; > + snps,ps-speed = <1000>; > + > + status = "okay"; > + > + mdio { > + compatible = "snps,dwmac-mdio"; > + #address-cells = <1>; > + #size-cells = <0>; > + > + reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; > + reset-delay-us = <11000>; > + reset-post-delay-us = <70000>; > + > + sgmii_phy: phy@8 { > + reg = <0x8>; > + device_type = "ethernet-phy"; > + }; > + }; > + > + mtl_rx_setup: rx-queues-config { > + snps,rx-queues-to-use = <4>; > + snps,rx-sched-sp; > + > + queue0 { > + snps,dcb-algorithm; > + snps,map-to-dma-channel = <0x0>; > + snps,route-up; > + snps,priority = <0x1>; > + }; > + > + queue1 { > + snps,dcb-algorithm; > + snps,map-to-dma-channel = <0x1>; > + snps,route-ptp; > + }; > + > + queue2 { > + snps,avb-algorithm; > + snps,map-to-dma-channel = <0x2>; > + snps,route-avcp; > + }; > + > + queue3 { > + snps,avb-algorithm; > + snps,map-to-dma-channel = <0x3>; > + snps,priority = <0xc>; > + }; > + }; > + > + mtl_tx_setup: tx-queues-config { > + snps,tx-queues-to-use = <4>; > + snps,tx-sched-sp; > + > + queue0 { > + snps,dcb-algorithm; > + }; > + > + queue1 { > + snps,dcb-algorithm; > + }; > + > + queue2 { > + snps,avb-algorithm; > + snps,send_slope = <0x1000>; > + snps,idle_slope = <0x1000>; > + snps,high_credit = <0x3e800>; > + snps,low_credit = <0xffc18000>; > + }; > + > + queue3 { > + snps,avb-algorithm; > + snps,send_slope = <0x1000>; > + snps,idle_slope = <0x1000>; > + snps,high_credit = <0x3e800>; > + snps,low_credit = <0xffc18000>; > + }; > + }; > +}; > + > &i2c11 { > clock-frequency = <400000>; > pinctrl-0 = <&qup_i2c11_default>; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-3-brgl@bgdev.pl>]
* Re: [PATCH 02/26] dt-bindings: phy: describe the Qualcomm SGMII PHY [not found] ` <20230612092355.87937-3-brgl@bgdev.pl> @ 2023-06-14 7:13 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2023-06-14 7:13 UTC (permalink / raw) To: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu Cc: netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On 12/06/2023 11:23, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Describe the SGMII/SerDes PHY present on the sa8775p platforms. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > +properties: > + compatible: > + const: qcom,sa8775p-dwmac-sgmii-phy > + > + reg: > + items: > + - description: serdes > + > + clocks: > + maxItems: 1 > + > + clock-names: > + const: sgmi_ref > + > + "#phy-cells": > + const: 0 > + > +additionalProperties: false Please put it after required: block. > + > +required: > + - compatible > + - reg > + - "#phy-cells" > + - clocks > + - clock-names > + > +examples: > + - | > + #include <dt-bindings/clock/qcom,sa8775p-gcc.h> > + serdes_phy: phy@8901000 { > + compatible = "qcom,sa8775p-dwmac-sgmii-phy"; > + reg = <0x08901000 0xe10>; > + clocks = <&gcc GCC_SGMI_CLKREF_EN>; > + clock-names = "sgmi_ref"; > + #phy-cells = <0>; > + status = "disabled"; Drop the status. With above: Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > + }; Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-5-brgl@bgdev.pl>]
* Re: [PATCH 04/26] arm64: defconfig: enable the SerDes PHY for Qualcomm DWMAC [not found] ` <20230612092355.87937-5-brgl@bgdev.pl> @ 2023-06-14 7:13 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2023-06-14 7:13 UTC (permalink / raw) To: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu Cc: netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski, Arnd Bergmann, Will Deacon, Catalin Marinas, Maxime Coquelin On 12/06/2023 11:23, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Enable the SGMII/SerDes PHY driver. This module is required to enable > ethernet on sa8775p platforms. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-20-brgl@bgdev.pl>]
* Re: [PATCH 19/26] dt-bindings: net: snps,dwmac: add compatible for sa8775p ethqos [not found] ` <20230612092355.87937-20-brgl@bgdev.pl> @ 2023-06-14 7:23 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2023-06-14 7:23 UTC (permalink / raw) To: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu Cc: netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On 12/06/2023 11:23, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Add the compatible string for the MAC controller on sa8775p platforms. > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
[parent not found: <20230612092355.87937-21-brgl@bgdev.pl>]
* Re: [PATCH 20/26] dt-bindings: net: qcom,ethqos: add description for sa8775p [not found] ` <20230612092355.87937-21-brgl@bgdev.pl> @ 2023-06-14 7:25 ` Krzysztof Kozlowski 2023-06-14 7:28 ` Bartosz Golaszewski 0 siblings, 1 reply; 28+ messages in thread From: Krzysztof Kozlowski @ 2023-06-14 7:25 UTC (permalink / raw) To: Bartosz Golaszewski, Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu Cc: netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On 12/06/2023 11:23, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Add the compatible for the MAC controller on sa8775p platforms. This MAC > works with a single interrupt so add minItems to the interrupts property. > The fourth clock's name is different here so change it. Enable relevant > PHY properties. > I think the patch should be squashed with previous. Adding compatible to common snps,dwmac binding does not make sense on its own. It makes sense with adding compatible here. > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > --- > .../devicetree/bindings/net/qcom,ethqos.yaml | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml > index 60a38044fb19..b20847c275ce 100644 > --- a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml > +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml > @@ -20,6 +20,7 @@ properties: > compatible: > enum: > - qcom,qcs404-ethqos > + - qcom,sa8775p-ethqos > - qcom,sc8280xp-ethqos > - qcom,sm8150-ethqos > > @@ -32,11 +33,13 @@ properties: > - const: rgmii > > interrupts: > + minItems: 1 > items: > - description: Combined signal for various interrupt events > - description: The interrupt that occurs when Rx exits the LPI state > > interrupt-names: > + minItems: 1 > items: > - const: macirq > - const: eth_lpi > @@ -49,11 +52,20 @@ properties: > - const: stmmaceth > - const: pclk > - const: ptp_ref > - - const: rgmii > + - enum: > + - rgmii > + - phyaux > > iommus: > maxItems: 1 > > + phys: true > + > + phy-supply: true Isn't this property of the phy? > + > + phy-names: > + const: serdes Keep the phy-names after phys. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 20/26] dt-bindings: net: qcom,ethqos: add description for sa8775p 2023-06-14 7:25 ` [PATCH 20/26] dt-bindings: net: qcom,ethqos: add description for sa8775p Krzysztof Kozlowski @ 2023-06-14 7:28 ` Bartosz Golaszewski 0 siblings, 0 replies; 28+ messages in thread From: Bartosz Golaszewski @ 2023-06-14 7:28 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Vinod Koul, Bhupesh Sharma, Andy Gross, Bjorn Andersson, Konrad Dybcio, David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Kishon Vijay Abraham I, Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, netdev, linux-arm-msm, devicetree, linux-kernel, linux-phy, linux-arm-kernel, linux-stm32, Bartosz Golaszewski On Wed, Jun 14, 2023 at 9:25 AM Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote: > > On 12/06/2023 11:23, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > > > Add the compatible for the MAC controller on sa8775p platforms. This MAC > > works with a single interrupt so add minItems to the interrupts property. > > The fourth clock's name is different here so change it. Enable relevant > > PHY properties. > > > > I think the patch should be squashed with previous. Adding compatible to > common snps,dwmac binding does not make sense on its own. It makes sense > with adding compatible here. > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > --- > > .../devicetree/bindings/net/qcom,ethqos.yaml | 14 +++++++++++++- > > 1 file changed, 13 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml > > index 60a38044fb19..b20847c275ce 100644 > > --- a/Documentation/devicetree/bindings/net/qcom,ethqos.yaml > > +++ b/Documentation/devicetree/bindings/net/qcom,ethqos.yaml > > @@ -20,6 +20,7 @@ properties: > > compatible: > > enum: > > - qcom,qcs404-ethqos > > + - qcom,sa8775p-ethqos > > - qcom,sc8280xp-ethqos > > - qcom,sm8150-ethqos > > > > @@ -32,11 +33,13 @@ properties: > > - const: rgmii > > > > interrupts: > > + minItems: 1 > > items: > > - description: Combined signal for various interrupt events > > - description: The interrupt that occurs when Rx exits the LPI state > > > > interrupt-names: > > + minItems: 1 > > items: > > - const: macirq > > - const: eth_lpi > > @@ -49,11 +52,20 @@ properties: > > - const: stmmaceth > > - const: pclk > > - const: ptp_ref > > - - const: rgmii > > + - enum: > > + - rgmii > > + - phyaux > > > > iommus: > > maxItems: 1 > > > > + phys: true > > + > > + phy-supply: true > > Isn't this property of the phy? > It is, and as discussed elsewhere with Andrew, I will move it to the SerDes PHY driver. Bart > > + > > + phy-names: > > + const: serdes > > Keep the phy-names after phys. > > > Best regards, > Krzysztof > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2023-06-14 14:48 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230612092355.87937-1-brgl@bgdev.pl>
[not found] ` <20230612092355.87937-2-brgl@bgdev.pl>
2023-06-12 17:20 ` [PATCH 01/26] phy: qualcomm: fix indentation in Makefile Andrew Halaney
[not found] ` <20230612092355.87937-6-brgl@bgdev.pl>
2023-06-12 18:22 ` [PATCH 05/26] net: stmmac: dwmac-qcom-ethqos: shrink clock code with devres Andrew Halaney
[not found] ` <20230612092355.87937-7-brgl@bgdev.pl>
2023-06-12 18:32 ` [PATCH 06/26] net: stmmac: dwmac-qcom-ethqos: rename a label in probe() Andrew Halaney
[not found] ` <20230612092355.87937-8-brgl@bgdev.pl>
2023-06-12 18:34 ` [PATCH 07/26] net: stmmac: dwmac-qcom-ethqos: tweak the order of local variables Andrew Halaney
[not found] ` <20230612092355.87937-9-brgl@bgdev.pl>
2023-06-12 18:38 ` [PATCH 08/26] net: stmmac: dwmac-qcom-ethqos: use a helper variable for &pdev->dev Andrew Halaney
[not found] ` <20230612092355.87937-10-brgl@bgdev.pl>
2023-06-12 20:06 ` [PATCH 09/26] net: stmmac: dwmac-qcom-ethqos: add missing include Andrew Halaney
[not found] ` <20230612092355.87937-11-brgl@bgdev.pl>
2023-06-12 20:06 ` [PATCH 10/26] net: stmmac: dwmac-qcom-ethqos: add a newline between headers Andrew Halaney
[not found] ` <20230612092355.87937-12-brgl@bgdev.pl>
2023-06-12 20:07 ` [PATCH 11/26] net: stmmac: dwmac-qcom-ethqos: remove stray space Andrew Halaney
[not found] ` <20230612092355.87937-13-brgl@bgdev.pl>
2023-06-12 20:32 ` [PATCH 12/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional serdes phy Andrew Halaney
2023-06-13 7:52 ` Bartosz Golaszewski
[not found] ` <20230612092355.87937-14-brgl@bgdev.pl>
2023-06-12 20:40 ` [PATCH 13/26] net: stmmac: dwmac-qcom-ethqos: make the rgmii clock optional Andrew Halaney
2023-06-13 7:58 ` Bartosz Golaszewski
[not found] ` <20230612092355.87937-15-brgl@bgdev.pl>
2023-06-12 20:42 ` [PATCH 14/26] net: stmmac: dwmac-qcom-ethqos: add optional phyaux clock Andrew Halaney
[not found] ` <20230612092355.87937-16-brgl@bgdev.pl>
2023-06-12 21:06 ` [PATCH 15/26] net: stmmac: dwmac-qcom-ethqos: add support for the optional phy-supply Andrew Halaney
2023-06-13 9:02 ` Bartosz Golaszewski
[not found] ` <20230612092355.87937-17-brgl@bgdev.pl>
2023-06-13 16:59 ` [PATCH 16/26] net: stmmac: dwmac-qcom-ethqos: prepare the driver for more PHY modes Andrew Halaney
[not found] ` <20230612092355.87937-4-brgl@bgdev.pl>
2023-06-13 17:39 ` [PATCH 03/26] phy: qcom: add the SGMII SerDes PHY driver Bjorn Andersson
[not found] ` <7fe7078e-404d-28e5-0dd1-53b7f9cd7626@linaro.org>
2023-06-14 7:18 ` Bartosz Golaszewski
[not found] ` <20230612092355.87937-24-brgl@bgdev.pl>
2023-06-13 18:57 ` [PATCH 23/26] arm64: dts: qcom: sa8775p: add the first 1Gb ethernet interface Konrad Dybcio
[not found] ` <20230612092355.87937-25-brgl@bgdev.pl>
2023-06-13 19:02 ` [PATCH 24/26] arm64: dts: qcom: sa8775p-ride: enable the SerDes PHY Konrad Dybcio
2023-06-14 14:51 ` Bjorn Andersson
[not found] ` <20230612092355.87937-26-brgl@bgdev.pl>
2023-06-13 19:04 ` [PATCH 25/26] arm64: dts: qcom: sa8775p-ride: add pin functions for ethernet0 Konrad Dybcio
[not found] ` <20230612092355.87937-27-brgl@bgdev.pl>
2023-06-13 19:08 ` [PATCH 26/26] arm64: dts: qcom: sa8775p-ride: enable ethernet0 Konrad Dybcio
[not found] ` <20230612092355.87937-3-brgl@bgdev.pl>
2023-06-14 7:13 ` [PATCH 02/26] dt-bindings: phy: describe the Qualcomm SGMII PHY Krzysztof Kozlowski
[not found] ` <20230612092355.87937-5-brgl@bgdev.pl>
2023-06-14 7:13 ` [PATCH 04/26] arm64: defconfig: enable the SerDes PHY for Qualcomm DWMAC Krzysztof Kozlowski
[not found] ` <20230612092355.87937-20-brgl@bgdev.pl>
2023-06-14 7:23 ` [PATCH 19/26] dt-bindings: net: snps,dwmac: add compatible for sa8775p ethqos Krzysztof Kozlowski
[not found] ` <20230612092355.87937-21-brgl@bgdev.pl>
2023-06-14 7:25 ` [PATCH 20/26] dt-bindings: net: qcom,ethqos: add description for sa8775p Krzysztof Kozlowski
2023-06-14 7:28 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox