[PATCH] net: stmmac: Fixed mtu channged by cache aligned

2021-01-12 Thread David Wu
Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 5b1c12ff98c0..e8640123db76 100644 --- a/d

Re: [PATCH] pwm: rockchip: simplify rockchip_pwm_get_state()

2020-06-02 Thread David Wu
This change is very good, thank you. The code continues from the original code(get_state_v1 and get_state_v2), didn’t make any changes at that time, and sorry I have not seen linux-rockc...@lists.infradead.org mail recently. 在 2020/6/2 下午8:39, Thierry Reding 写道: On Thu, Sep 19, 2019 at

Re: [PATCH 1/2] pinctrl: rockchip: allow specifying the regmap location for pin-routes

2018-11-14 Thread David Wu
map older socs correctly. We'll keep "same" as the default, so that we only need to specify a location in the corner-cases described above. Signed-off-by: Heiko Stuebner Very good, for the mixed case, really need to do the supplement. Reviewed-by: David Wu

Re: [PATCH 1/2] pinctrl: rockchip: allow specifying the regmap location for pin-routes

2018-11-14 Thread David Wu
map older socs correctly. We'll keep "same" as the default, so that we only need to specify a location in the corner-cases described above. Signed-off-by: Heiko Stuebner Very good, for the mixed case, really need to do the supplement. Reviewed-by: David Wu

[PATCH v3] net: ethernet: stmmac: dwmac-rk: Add GMAC support for px30

2018-06-26 Thread David Wu
Add constants and callback functions for the dwmac on px30 Soc. The base structure is the same, but registers and the bits in them are moved slightly, and add the clk_mac_speed for selecting mac speed. Signed-off-by: David Wu --- Change in v3: - Add the clock enable/disable for clk_mac_speed

[PATCH v3] net: ethernet: stmmac: dwmac-rk: Add GMAC support for px30

2018-06-26 Thread David Wu
Add constants and callback functions for the dwmac on px30 Soc. The base structure is the same, but registers and the bits in them are moved slightly, and add the clk_mac_speed for selecting mac speed. Signed-off-by: David Wu --- Change in v3: - Add the clock enable/disable for clk_mac_speed

Re: [PATCH v2] net: ethernet: stmmac: dwmac-rk: Add GMAC support for PX30

2018-06-22 Thread David Wu
Hi Heiko, 在 2018年06月22日 15:30, Heiko Stuebner 写道: Hi David, Am Mittwoch, 20. Juni 2018, 04:40:35 CEST schrieb David Wu: 在 2018年06月14日 16:30, Heiko Stübner 写道: Am Donnerstag, 14. Juni 2018, 10:14:31 CEST schrieb David Wu: Hi Heiko, 在 2018年06月14日 15:54, Heiko Stübner 写道: I don't see

Re: [PATCH v2] net: ethernet: stmmac: dwmac-rk: Add GMAC support for PX30

2018-06-22 Thread David Wu
Hi Heiko, 在 2018年06月22日 15:30, Heiko Stuebner 写道: Hi David, Am Mittwoch, 20. Juni 2018, 04:40:35 CEST schrieb David Wu: 在 2018年06月14日 16:30, Heiko Stübner 写道: Am Donnerstag, 14. Juni 2018, 10:14:31 CEST schrieb David Wu: Hi Heiko, 在 2018年06月14日 15:54, Heiko Stübner 写道: I don't see

Re: [PATCH] ethernet: stmmac: dwmac-rk: Add GMAC support for px30

2018-05-17 Thread David Wu
Hi Shawn, Thanks for the suggestion, the most is okay. 在 2018年05月16日 14:34, Shawn Lin 写道: Hi David, On 2018/5/16 11:38, David Wu wrote: diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 13133b3..4b2ab71 100644 --- a/drivers

Re: [PATCH] ethernet: stmmac: dwmac-rk: Add GMAC support for px30

2018-05-17 Thread David Wu
Hi Shawn, Thanks for the suggestion, the most is okay. 在 2018年05月16日 14:34, Shawn Lin 写道: Hi David, On 2018/5/16 11:38, David Wu wrote: diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 13133b3..4b2ab71 100644 --- a/drivers

[PATCH] ethernet: stmmac: dwmac-rk: Add GMAC support for px30

2018-05-15 Thread David Wu
Add constants and callback functions for the dwmac on px30 soc. The base structure is the same, but registers and the bits in them moved slightly, and add the clk_mac_speed for the select of mac speed. Signed-off-by: David Wu <david...@rock-chips.com> --- .../devicetree/bindings/net/ro

[PATCH] ethernet: stmmac: dwmac-rk: Add GMAC support for px30

2018-05-15 Thread David Wu
Add constants and callback functions for the dwmac on px30 soc. The base structure is the same, but registers and the bits in them moved slightly, and add the clk_mac_speed for the select of mac speed. Signed-off-by: David Wu --- .../devicetree/bindings/net/rockchip-dwmac.txt | 1

[PATCH v2] PM / AVS: rockchip-io: add io selectors and supplies for PX30

2018-05-15 Thread David Wu
This adds the necessary data for handling io voltage domains on PX30. As interesting tidbit, the PX30 contains two separate iodomain areas. One in the regular General Register Files (GRF) and one in PMUGRF in the pmu power domain. Signed-off-by: David Wu <david...@rock-chips.

[PATCH v2] PM / AVS: rockchip-io: add io selectors and supplies for PX30

2018-05-15 Thread David Wu
This adds the necessary data for handling io voltage domains on PX30. As interesting tidbit, the PX30 contains two separate iodomain areas. One in the regular General Register Files (GRF) and one in PMUGRF in the pmu power domain. Signed-off-by: David Wu --- .../bindings/power/rockchip-io

[PATCH] PM / AVS: rockchip-io: add io selectors and supplies for PX30

2018-05-15 Thread David Wu
This adds the necessary data for handling io voltage domains on PX30. As interesting tidbit, the PX30 contains two separate iodomain areas. One in the regular General Register Files (GRF) and one in PMUGRF in the pmu power domain. Signed-off-by: David Wu <david...@rock-chips.

[PATCH] PM / AVS: rockchip-io: add io selectors and supplies for PX30

2018-05-15 Thread David Wu
This adds the necessary data for handling io voltage domains on PX30. As interesting tidbit, the PX30 contains two separate iodomain areas. One in the regular General Register Files (GRF) and one in PMUGRF in the pmu power domain. Signed-off-by: David Wu --- .../bindings/power/rockchip-io

[PATCH] pinctrl: rockchip: Add pinctrl support for PX30

2018-05-14 Thread David Wu
There are 4 banks (GPIO0 ~ GPIO3), bank0 is in PD_PMU subsystem, bank1/bank2/bank3 are in PD_BUS subsystem. Signed-off-by: David Wu <david...@rock-chips.com> --- .../bindings/pinctrl/rockchip,pinctrl.txt | 1 + drivers/pinctrl/pinctrl-rockchip.c

[PATCH] pinctrl: rockchip: Add pinctrl support for PX30

2018-05-14 Thread David Wu
There are 4 banks (GPIO0 ~ GPIO3), bank0 is in PD_PMU subsystem, bank1/bank2/bank3 are in PD_BUS subsystem. Signed-off-by: David Wu --- .../bindings/pinctrl/rockchip,pinctrl.txt | 1 + drivers/pinctrl/pinctrl-rockchip.c | 194 + 2 files changed

[PATCH 2/2] pinctrl: rockchip: Fix the correct routing config for the gmac-m1 pins of rmii and rgmii

2017-09-30 Thread David Wu
select bit10 is more correct. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/pinctrl/pinctrl-rockchip.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index c7c9beb..9

[PATCH 2/2] pinctrl: rockchip: Fix the correct routing config for the gmac-m1 pins of rmii and rgmii

2017-09-30 Thread David Wu
select bit10 is more correct. Signed-off-by: David Wu --- drivers/pinctrl/pinctrl-rockchip.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index c7c9beb..9e0cabf 100644 --- a/drivers/pinctrl

[PATCH 1/2] pinctrl: rockchip: Fix the rk3399 gpio0 and gpio1 banks' drv_offset at pmu grf

2017-09-30 Thread David Wu
The offset of gpio0 and gpio1 bank drive strength is 0x8, not 0x4. But the mux is 0x4, we couldn't use the IOMUX_WIDTH_4BIT flag, so we give them actual offset. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/pinctrl/pinctrl-rockchip.c | 12 ++-- 1 file chan

[PATCH 1/2] pinctrl: rockchip: Fix the rk3399 gpio0 and gpio1 banks' drv_offset at pmu grf

2017-09-30 Thread David Wu
The offset of gpio0 and gpio1 bank drive strength is 0x8, not 0x4. But the mux is 0x4, we couldn't use the IOMUX_WIDTH_4BIT flag, so we give them actual offset. Signed-off-by: David Wu --- drivers/pinctrl/pinctrl-rockchip.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[PATCH 0/2] Fix two pinctrl issues

2017-09-30 Thread David Wu
They are: 1. Fix the rk3399 gpio0 and gpio1 banks' drive strength offset. 2. Fix the correct routing config for the gmac-m1 pins between rmii and rgmii. David Wu (2): pinctrl: rockchip: Fix the rk3399 gpio0 and gpio1 banks' drv_offset at pmu grf pinctrl: rockchip: Fix the correct routing

[PATCH 0/2] Fix two pinctrl issues

2017-09-30 Thread David Wu
They are: 1. Fix the rk3399 gpio0 and gpio1 banks' drive strength offset. 2. Fix the correct routing config for the gmac-m1 pins between rmii and rgmii. David Wu (2): pinctrl: rockchip: Fix the rk3399 gpio0 and gpio1 banks' drv_offset at pmu grf pinctrl: rockchip: Fix the correct routing

[PATCH] net: stmmac: dwmac-rk: Add RK3128 GMAC support

2017-09-30 Thread David Wu
Add constants and callback functions for the dwmac on rk3128 soc. As can be seen, the base structure is the same, only registers and the bits in them moved slightly. Signed-off-by: David Wu <david...@rock-chips.com> --- .../devicetree/bindings/net/rockchip-dwmac.txt | 1 + drive

[PATCH] net: stmmac: dwmac-rk: Add RK3128 GMAC support

2017-09-30 Thread David Wu
Add constants and callback functions for the dwmac on rk3128 soc. As can be seen, the base structure is the same, only registers and the bits in them moved slightly. Signed-off-by: David Wu --- .../devicetree/bindings/net/rockchip-dwmac.txt | 1 + drivers/net/ethernet/stmicro/stmmac/dwmac

[PATCH v2] pinctrl: rockchip: Add rv1108 recalculated iomux support

2017-08-23 Thread David Wu
The pins from GPIO1A0 to GPIO1B1 are special, need to recalculate iomux. And the register offset is larger than the u8 range, so changed to u32. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/pinctrl/pinctrl-rockchip.c | 68 +- 1 file c

[PATCH v2] pinctrl: rockchip: Add rv1108 recalculated iomux support

2017-08-23 Thread David Wu
The pins from GPIO1A0 to GPIO1B1 are special, need to recalculate iomux. And the register offset is larger than the u8 range, so changed to u32. Signed-off-by: David Wu --- drivers/pinctrl/pinctrl-rockchip.c | 68 +- 1 file changed, 67 insertions(+), 1

[PATCH] pinctrl: rockchip: Add rv1108 recalced iomux support

2017-08-22 Thread David Wu
The pins from GPIO1A0 to GPIO1B1 are special, need to recalculate iomux. And the register offset is larger than the u8 range, so changed to u32. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/pinctrl/pinctrl-rockchip.c | 68 +- 1 file c

[PATCH] pinctrl: rockchip: Add rv1108 recalced iomux support

2017-08-22 Thread David Wu
The pins from GPIO1A0 to GPIO1B1 are special, need to recalculate iomux. And the register offset is larger than the u8 range, so changed to u32. Signed-off-by: David Wu --- drivers/pinctrl/pinctrl-rockchip.c | 68 +- 1 file changed, 67 insertions(+), 1

[PATCH v2] PM / AVS: rockchip-io: add io selectors and supplies for RV1108

2017-08-21 Thread David Wu
This adds the necessary data for handling io voltage domains on the RV1108. Signed-off-by: David Wu <david...@rock-chips.com> --- change in v2: - Alphabetic order for the binding string .../bindings/power/rockchip-io-domain.txt | 2 ++ drivers/power/avs/rockchip-io-do

[PATCH v2] PM / AVS: rockchip-io: add io selectors and supplies for RV1108

2017-08-21 Thread David Wu
This adds the necessary data for handling io voltage domains on the RV1108. Signed-off-by: David Wu --- change in v2: - Alphabetic order for the binding string .../bindings/power/rockchip-io-domain.txt | 2 ++ drivers/power/avs/rockchip-io-domain.c | 38

[PATCH] net: ethernet: stmmac: dwmac-rk: Add rv1108 gmac support

2017-08-21 Thread David Wu
It only supports rmii interface. Add constants and callback functions for the dwmac on rv1108 socs. As can be seen, the base structure is the same, only registers and the bits in them moved slightly. Signed-off-by: David Wu <david...@rock-chips.com> --- .../devicetree/bindings/net/ro

[PATCH] net: ethernet: stmmac: dwmac-rk: Add rv1108 gmac support

2017-08-21 Thread David Wu
It only supports rmii interface. Add constants and callback functions for the dwmac on rv1108 socs. As can be seen, the base structure is the same, only registers and the bits in them moved slightly. Signed-off-by: David Wu --- .../devicetree/bindings/net/rockchip-dwmac.txt | 1 + drivers

[PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rv1108

2017-08-17 Thread David Wu
This adds the necessary data for handling io voltage domains on the rv1108. Signed-off-by: David Wu <david...@rock-chips.com> --- .../bindings/power/rockchip-io-domain.txt | 2 ++ drivers/power/avs/rockchip-io-domain.c | 38 ++ 2 files chang

[PATCH] PM / AVS: rockchip-io: add io selectors and supplies for rv1108

2017-08-17 Thread David Wu
This adds the necessary data for handling io voltage domains on the rv1108. Signed-off-by: David Wu --- .../bindings/power/rockchip-io-domain.txt | 2 ++ drivers/power/avs/rockchip-io-domain.c | 38 ++ 2 files changed, 40 insertions(+) diff --git

[PATCH v5 11/11] ARM64: dts: rockchip: Enable gmac2phy for rk3328-evb

2017-08-10 Thread David Wu
Enable the gmac2phy, make the gmac2phy work on the rk3328-evb board. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch

[PATCH v5 11/11] ARM64: dts: rockchip: Enable gmac2phy for rk3328-evb

2017-08-10 Thread David Wu
Enable the gmac2phy, make the gmac2phy work on the rk3328-evb board. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch/arm64/boot/dts/rockchip/rk3328

[PATCH v5 10/11] ARM64: dts: rockchip: Add gmac2phy node support for rk3328

2017-08-10 Thread David Wu
The gmac2phy controller of rk3328 is connected to integrated PHY directly inside, add the node for the integrated PHY support. Signed-off-by: David Wu <david...@rock-chips.com> --- changes in v5: - Use phy-is-integrated property via PHY node. - Move the PHY clock, reset control, pinctrl

[PATCH v5 10/11] ARM64: dts: rockchip: Add gmac2phy node support for rk3328

2017-08-10 Thread David Wu
The gmac2phy controller of rk3328 is connected to integrated PHY directly inside, add the node for the integrated PHY support. Signed-off-by: David Wu --- changes in v5: - Use phy-is-integrated property via PHY node. - Move the PHY clock, reset control, pinctrl to PHY node. arch/arm64/boot

[PATCH v5 09/11] ARM: dts: rk3228-evb: Enable the integrated PHY for gmac

2017-08-10 Thread David Wu
This patch enables the integrated PHY for rk3228 evb board by default. To use the external 1000M PHY on evb board, need to make some switch of evb board to be on. Signed-off-by: David Wu <david...@rock-chips.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> --- changes in v5

[PATCH v5 09/11] ARM: dts: rk3228-evb: Enable the integrated PHY for gmac

2017-08-10 Thread David Wu
This patch enables the integrated PHY for rk3228 evb board by default. To use the external 1000M PHY on evb board, need to make some switch of evb board to be on. Signed-off-by: David Wu Reviewed-by: Florian Fainelli --- changes in v5: - Use phy-is-integrated property via PHY node. - Move

[PATCH v5 08/11] net: stmmac: dwmac-rk: Add integrated PHY supprot for rk3328

2017-08-10 Thread David Wu
There are two mac controllers in the rk3328, the one connects to external PHY, and the other one connects to integrated PHY. Like the mac of external PHY, the integrated PHY's mac also needs to configure the related mac registers at GRF. Signed-off-by: David Wu <david...@rock-chips.

[PATCH v5 08/11] net: stmmac: dwmac-rk: Add integrated PHY supprot for rk3328

2017-08-10 Thread David Wu
There are two mac controllers in the rk3328, the one connects to external PHY, and the other one connects to integrated PHY. Like the mac of external PHY, the integrated PHY's mac also needs to configure the related mac registers at GRF. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro

[PATCH v5 07/11] net: stmmac: dwmac-rk: Add integrated PHY support for rk3228

2017-08-10 Thread David Wu
There is only one mac controller in rk3228, which could connect to external PHY or integrated PHY, use the grf_com_mux bit15 to route external/integrated PHY. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 12 1 file c

[PATCH v5 07/11] net: stmmac: dwmac-rk: Add integrated PHY support for rk3228

2017-08-10 Thread David Wu
There is only one mac controller in rk3228, which could connect to external PHY or integrated PHY, use the grf_com_mux bit15 to route external/integrated PHY. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 12 1 file changed, 12 insertions(+) diff

[PATCH v5 06/11] net: stmmac: dwmac-rk: Add integrated PHY support

2017-08-10 Thread David Wu
To make integrated PHY work, need to configure the PHY clock, PHY cru reset and related registers. Signed-off-by: David Wu <david...@rock-chips.com> --- change in v4: - PHY is internal or not base on the phy-is-internal property via phy node. changes in v5: - Use phy-is-integrated proper

[PATCH v5 06/11] net: stmmac: dwmac-rk: Add integrated PHY support

2017-08-10 Thread David Wu
To make integrated PHY work, need to configure the PHY clock, PHY cru reset and related registers. Signed-off-by: David Wu --- change in v4: - PHY is internal or not base on the phy-is-internal property via phy node. changes in v5: - Use phy-is-integrated property via PHY node. - Get the PHY

[PATCH v5 05/11] Documentation: net: phy: Add phy-is-integrated binding

2017-08-10 Thread David Wu
that the external PHY is used. Signed-off-by: David Wu <david...@rock-chips.com> --- change in v5: - Use phy-is-integrated boolean property. Documentation/devicetree/bindings/net/phy.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/net/phy.

[PATCH v5 05/11] Documentation: net: phy: Add phy-is-integrated binding

2017-08-10 Thread David Wu
that the external PHY is used. Signed-off-by: David Wu --- change in v5: - Use phy-is-integrated boolean property. Documentation/devicetree/bindings/net/phy.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation/devicetree

[PATCH v5 00/11] Add the integrated PHY support

2017-08-10 Thread David Wu
The rk3228 and rk3328 support integrated PHY inside, let's enable it to work. And the integrated PHY need to do some special setting, so register the rockchip integrated PHY driver. David Wu (11): net: phy: Add rockchip PHY driver support multi_v7_defconfig: Make rockchip PHY built-in arm64

[PATCH v5 00/11] Add the integrated PHY support

2017-08-10 Thread David Wu
The rk3228 and rk3328 support integrated PHY inside, let's enable it to work. And the integrated PHY need to do some special setting, so register the rockchip integrated PHY driver. David Wu (11): net: phy: Add rockchip PHY driver support multi_v7_defconfig: Make rockchip PHY built-in arm64

[PATCH v5 02/11] multi_v7_defconfig: Make rockchip PHY built-in

2017-08-10 Thread David Wu
Enable the rockchip PHY driver for multi_v7_defconfig builds. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4

[PATCH v5 02/11] multi_v7_defconfig: Make rockchip PHY built-in

2017-08-10 Thread David Wu
Enable the rockchip PHY driver for multi_v7_defconfig builds. Signed-off-by: David Wu --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4d19c1b..94d7e71 100644 --- a/arch

[PATCH v5 01/11] net: phy: Add rockchip PHY driver support

2017-08-10 Thread David Wu
Support integrated ethernet PHY currently. Signed-off-by: David Wu <david...@rock-chips.com> --- changes in v4: - Remove SUPPORTED_[Asym_]Pause. - Some minor fix like defines. changes in v5: - Rename internal to integrated. - Remove PHY_IS_INTERNAL flag. drivers/net/phy/Kconfig

[PATCH v5 01/11] net: phy: Add rockchip PHY driver support

2017-08-10 Thread David Wu
Support integrated ethernet PHY currently. Signed-off-by: David Wu --- changes in v4: - Remove SUPPORTED_[Asym_]Pause. - Some minor fix like defines. changes in v5: - Rename internal to integrated. - Remove PHY_IS_INTERNAL flag. drivers/net/phy/Kconfig| 5 + drivers/net/phy/Makefile

[PATCH v5 04/11] net: stmmac: dwmac-rk: Remove unwanted code for rk3328_set_to_rmii()

2017-08-10 Thread David Wu
This is wrong setting for rk3328_set_to_rmii(), so remove it. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/s

[PATCH v5 04/11] net: stmmac: dwmac-rk: Remove unwanted code for rk3328_set_to_rmii()

2017-08-10 Thread David Wu
This is wrong setting for rk3328_set_to_rmii(), so remove it. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index

[PATCH v5 03/11] arm64: defconfig: Enable CONFIG_ROCKCHIP_PHY

2017-08-10 Thread David Wu
Make the rockchip PHY driver built into the kernel. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6c7d147..925bd478 100644 --- a/arch

[PATCH v5 03/11] arm64: defconfig: Enable CONFIG_ROCKCHIP_PHY

2017-08-10 Thread David Wu
Make the rockchip PHY driver built into the kernel. Signed-off-by: David Wu --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6c7d147..925bd478 100644 --- a/arch/arm64/configs/defconfig +++ b

[PATCH v4 12/12] ARM64: dts: rockchip: Enable gmac2phy for rk3328-evb

2017-08-09 Thread David Wu
Enable the gmac2phy, make the gmac2phy work on the rk3328-evb board. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch

[PATCH v4 12/12] ARM64: dts: rockchip: Enable gmac2phy for rk3328-evb

2017-08-09 Thread David Wu
Enable the gmac2phy, make the gmac2phy work on the rk3328-evb board. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328-evb.dts | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328-evb.dts b/arch/arm64/boot/dts/rockchip/rk3328

[PATCH v4 11/12] ARM64: dts: rockchip: Add gmac2phy node support for rk3328

2017-08-09 Thread David Wu
The gmac2phy controller of rk3328 is connected to internal phy directly inside, add the node for the internal phy support. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 37 1 file changed, 37 insertions(+)

[PATCH v4 11/12] ARM64: dts: rockchip: Add gmac2phy node support for rk3328

2017-08-09 Thread David Wu
The gmac2phy controller of rk3328 is connected to internal phy directly inside, add the node for the internal phy support. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 37 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot

[PATCH v4 10/12] ARM: dts: rk3228-evb: Enable the internal phy for gmac

2017-08-09 Thread David Wu
This patch enables the internal phy for rk3228 evb board by default. To use the external 1000M phy on evb board, need to make some switch of evb board to be on. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm/boot/dts/rk3228-evb.dts | 32

[PATCH v4 10/12] ARM: dts: rk3228-evb: Enable the internal phy for gmac

2017-08-09 Thread David Wu
This patch enables the internal phy for rk3228 evb board by default. To use the external 1000M phy on evb board, need to make some switch of evb board to be on. Signed-off-by: David Wu --- arch/arm/boot/dts/rk3228-evb.dts | 32 1 file changed, 32 insertions

[PATCH v4 09/12] ARM: dts: rk322x: Add support internal phy for gmac

2017-08-09 Thread David Wu
This patch adds internal mac phy clock and internal mac phy reset for rk gmac using. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm/boot/dts/rk322x.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/bo

[PATCH v4 09/12] ARM: dts: rk322x: Add support internal phy for gmac

2017-08-09 Thread David Wu
This patch adds internal mac phy clock and internal mac phy reset for rk gmac using. Signed-off-by: David Wu --- arch/arm/boot/dts/rk322x.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index f3e4ffd

[PATCH v4 08/12] net: stmmac: dwmac-rk: Add internal phy supprot for rk3328

2017-08-09 Thread David Wu
There are two mac controllers in the rk3328, the one connects to external phy, and the other one connects to internal phy. Like the mac of external phy, the internal phy's mac also needs to configure the related mac registers at GRF. Signed-off-by: David Wu <david...@rock-chips.com> --- d

[PATCH v4 08/12] net: stmmac: dwmac-rk: Add internal phy supprot for rk3328

2017-08-09 Thread David Wu
There are two mac controllers in the rk3328, the one connects to external phy, and the other one connects to internal phy. Like the mac of external phy, the internal phy's mac also needs to configure the related mac registers at GRF. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro

[PATCH v4 07/12] net: stmmac: dwmac-rk: Add internal phy support for rk3228

2017-08-09 Thread David Wu
There is only one mac controller in rk3228, which could connect to external phy or internal phy, use the grf_com_mux bit15 to route external/internal phy. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 12 1 file chang

[PATCH v4 07/12] net: stmmac: dwmac-rk: Add internal phy support for rk3228

2017-08-09 Thread David Wu
There is only one mac controller in rk3228, which could connect to external phy or internal phy, use the grf_com_mux bit15 to route external/internal phy. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH v4 06/12] net: stmmac: dwmac-rk: Add internal phy support

2017-08-09 Thread David Wu
To make internal phy work, need to configure the phy_clock, phy cru_reset and related registers. Signed-off-by: David Wu <david...@rock-chips.com> --- change in v4: - PHY is internal or not base on the phy-is-internal property via phy node. .../devicetree/bindings/net/rockchip-dwm

[PATCH v4 06/12] net: stmmac: dwmac-rk: Add internal phy support

2017-08-09 Thread David Wu
To make internal phy work, need to configure the phy_clock, phy cru_reset and related registers. Signed-off-by: David Wu --- change in v4: - PHY is internal or not base on the phy-is-internal property via phy node. .../devicetree/bindings/net/rockchip-dwmac.txt | 4 +- drivers/net

[PATCH v4 05/12] Documentation: net: phy: Add phy-is-internal binding

2017-08-09 Thread David Wu
Add the documentation for internal phy. A boolean property indicates that a internal phy will be used. Signed-off-by: David Wu <david...@rock-chips.com> --- Documentation/devicetree/bindings/net/phy.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindin

[PATCH v4 05/12] Documentation: net: phy: Add phy-is-internal binding

2017-08-09 Thread David Wu
Add the documentation for internal phy. A boolean property indicates that a internal phy will be used. Signed-off-by: David Wu --- Documentation/devicetree/bindings/net/phy.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/phy.txt b/Documentation

[PATCH v4 02/12] multi_v7_defconfig: Make rockchip phy built-in

2017-08-09 Thread David Wu
Enable the rockchip phy for multi_v7_defconfig builds. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4d19c1b..9

[PATCH v4 02/12] multi_v7_defconfig: Make rockchip phy built-in

2017-08-09 Thread David Wu
Enable the rockchip phy for multi_v7_defconfig builds. Signed-off-by: David Wu --- arch/arm/configs/multi_v7_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig index 4d19c1b..94d7e71 100644 --- a/arch/arm

[PATCH v4 01/12] net: phy: Add rockchip phy driver support

2017-08-09 Thread David Wu
Support internal ethernet phy currently. Signed-off-by: David Wu <david...@rock-chips.com> --- changes in v4: - Remove SUPPORTED_[Asym_]Pause flag - Some minor fix like defines drivers/net/phy/Kconfig| 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/rockchip.c

[PATCH v4 01/12] net: phy: Add rockchip phy driver support

2017-08-09 Thread David Wu
Support internal ethernet phy currently. Signed-off-by: David Wu --- changes in v4: - Remove SUPPORTED_[Asym_]Pause flag - Some minor fix like defines drivers/net/phy/Kconfig| 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/rockchip.c | 233

[PATCH v4 00/12] Add the internal phy support

2017-08-09 Thread David Wu
The rk3228 and rk3328 support internal phy inside, let's enable it to work. And the internal phy need to do some special setting, so register the rockchip internal phy driver. David Wu (12): net: phy: Add rockchip phy driver support multi_v7_defconfig: Make rockchip phy built-in arm64

[PATCH v4 00/12] Add the internal phy support

2017-08-09 Thread David Wu
The rk3228 and rk3328 support internal phy inside, let's enable it to work. And the internal phy need to do some special setting, so register the rockchip internal phy driver. David Wu (12): net: phy: Add rockchip phy driver support multi_v7_defconfig: Make rockchip phy built-in arm64

[PATCH v4 03/12] arm64: defconfig: Enable CONFIG_ROCKCHIP_PHY

2017-08-09 Thread David Wu
Make the rockchip phy driver built into the kernel. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6c7d147..925bd478 100644 --- a/arch

[PATCH v4 03/12] arm64: defconfig: Enable CONFIG_ROCKCHIP_PHY

2017-08-09 Thread David Wu
Make the rockchip phy driver built into the kernel. Signed-off-by: David Wu --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6c7d147..925bd478 100644 --- a/arch/arm64/configs/defconfig +++ b

[PATCH v4 04/12] net: stmmac: dwmac-rk: Remove unwanted code for rk3328_set_to_rmii()

2017-08-09 Thread David Wu
This is wrong setting for rk3328_set_to_rmii(), so remove it. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/s

[PATCH v4 04/12] net: stmmac: dwmac-rk: Remove unwanted code for rk3328_set_to_rmii()

2017-08-09 Thread David Wu
This is wrong setting for rk3328_set_to_rmii(), so remove it. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index

[PATCH v3 1/7] pwm: rockchip: Add APB and function both clocks support

2017-08-08 Thread David Wu
New PWM module provides two individual clocks for APB clock and function clock. Signed-off-by: David Wu <david...@rock-chips.com> Acked-by: Rob Herring <r...@kernel.org> --- changes in v3: - clk_get with NULL argument again if it was error, when clk_get with "pwm" argumen

[PATCH v3 1/7] pwm: rockchip: Add APB and function both clocks support

2017-08-08 Thread David Wu
New PWM module provides two individual clocks for APB clock and function clock. Signed-off-by: David Wu Acked-by: Rob Herring --- changes in v3: - clk_get with NULL argument again if it was error, when clk_get with "pwm" argument. - To get clk count, use of_count_phandle_with_ar

[PATCH v3 3/7] pwm: rockchip: Use pwm_apply instead of the pwm_enable

2017-08-08 Thread David Wu
Drop the custom hook of pwm_enable and implement pwm_apply_v1 and pwm_apply_v2 instead. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/pwm/pwm-rockchip.c | 141 + 1 file changed, 77 insertions(+), 64 deletions(-) diff --git a/d

[PATCH v3 3/7] pwm: rockchip: Use pwm_apply instead of the pwm_enable

2017-08-08 Thread David Wu
Drop the custom hook of pwm_enable and implement pwm_apply_v1 and pwm_apply_v2 instead. Signed-off-by: David Wu --- drivers/pwm/pwm-rockchip.c | 141 + 1 file changed, 77 insertions(+), 64 deletions(-) diff --git a/drivers/pwm/pwm-rockchip.c b

[PATCH v3 0/7] Add rk3328 pwm support

2017-08-08 Thread David Wu
There are two features of rk3328 pwm module. - PWM APB and function clocks are different. - Add pwm atomic hardware update David Wu (7): pwm: rockchip: Add APB and function both clocks support pwm: rockchip: Remove the judge from return value of pwm_config pwm: rockchip: Use pwm_apply

[PATCH v3 0/7] Add rk3328 pwm support

2017-08-08 Thread David Wu
There are two features of rk3328 pwm module. - PWM APB and function clocks are different. - Add pwm atomic hardware update David Wu (7): pwm: rockchip: Add APB and function both clocks support pwm: rockchip: Remove the judge from return value of pwm_config pwm: rockchip: Use pwm_apply

[PATCH v3 2/7] pwm: rockchip: Remove the judge from return value of pwm_config

2017-08-08 Thread David Wu
It seems the rockchip_pwm_config always returns the result 0, so remove the judge. Signed-off-by: David Wu <david...@rock-chips.com> Acked-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- drivers/pwm/pwm-rockchip.c | 12 ++-- 1 file changed, 2 insertions(+),

[PATCH v3 2/7] pwm: rockchip: Remove the judge from return value of pwm_config

2017-08-08 Thread David Wu
It seems the rockchip_pwm_config always returns the result 0, so remove the judge. Signed-off-by: David Wu Acked-by: Boris Brezillon --- drivers/pwm/pwm-rockchip.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm

[PATCH v3 7/7] arm64: dts: rockchip: Add pwm nodes for rk3328

2017-08-08 Thread David Wu
There are 4 pwm channels built in rk3328 soc, need to configure the both APB clock and bus clock. Signed-off-by: David Wu <david...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 45 1 file changed, 45 insertions(+) diff --git a/arch/arm6

[PATCH v3 7/7] arm64: dts: rockchip: Add pwm nodes for rk3328

2017-08-08 Thread David Wu
There are 4 pwm channels built in rk3328 soc, need to configure the both APB clock and bus clock. Signed-off-by: David Wu --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 45 1 file changed, 45 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi

[PATCH v3 6/7] pwm: rockchip: Add rk3328 pwm support

2017-08-08 Thread David Wu
d old polarity" -> "configure period and duty" -> "configure unlock and new polarity". Signed-off-by: David Wu <david...@rock-chips.com> Acked-by: Rob Herring <r...@kernel.org> --- drivers/pwm/pwm-rockchip.c | 43 +-

[PATCH v3 6/7] pwm: rockchip: Add rk3328 pwm support

2017-08-08 Thread David Wu
d old polarity" -> "configure period and duty" -> "configure unlock and new polarity". Signed-off-by: David Wu Acked-by: Rob Herring --- drivers/pwm/pwm-rockchip.c | 43 +-- 1 file changed, 41 insertions(+), 2 deleti

[PATCH v3 5/7] pwm: rockchip: Use same pwm ops for each IP

2017-08-08 Thread David Wu
Just use the same pwm ops for each IP, and get rid of the ops in the struct of rockchip_pwm_data, but still define the 3 different rockchip_pwm_data to use common interface for each IP. Signed-off-by: David Wu <david...@rock-chips.com> --- drivers/pwm/pwm-rockchip.c

[PATCH v3 5/7] pwm: rockchip: Use same pwm ops for each IP

2017-08-08 Thread David Wu
Just use the same pwm ops for each IP, and get rid of the ops in the struct of rockchip_pwm_data, but still define the 3 different rockchip_pwm_data to use common interface for each IP. Signed-off-by: David Wu --- drivers/pwm/pwm-rockchip.c | 147 - 1

  1   2   3   4   >