Re: [RFC PATCH 0/3] acpi: Add acpi mdio support code

2018-11-12 Thread Wang, Dongsheng
Hello Rafael, On 2018/11/13 1:19, Andrew Lunn wrote: >>> I'm just trying to ensure whatever is defined is flexible enough that >>> we really can later support everything which DT does. We have PHYs on >>> MDIO busses, inside switches, which are on MDIO busses, which are >>> inside Ethernet

Re: [RFC PATCH 0/3] acpi: Add acpi mdio support code

2018-11-11 Thread Wang, Dongsheng
On 2018/11/9 7:23, Andrew Lunn wrote: > I'm just trying to ensure whatever is defined is flexible enough that > we really can later support everything which DT does. We have PHYs on > MDIO busses, inside switches, which are on MDIO busses, which are > inside Ethernet interfaces, etc. > > An MDIO

Re: [RFC PATCH 0/3] acpi: Add acpi mdio support code

2018-11-10 Thread Wang, Dongsheng
Hi Andrew, On 2018/11/9 7:23, Andrew Lunn wrote: > On Thu, Nov 08, 2018 at 03:21:29PM +0800, Wang Dongsheng wrote: >> Originally I just push "phy-handle" support for ACPI on the QCOM QDF2400 >> platform. After some discussion and following Andrew's advice, I send >

Re: [RFC PATCH 1/3] acpi: Add acpi mdio support code

2018-11-07 Thread Wang, Dongsheng
On 2018/11/8 15:44, Rafael J. Wysocki wrote: > On Thursday, November 8, 2018 8:22:16 AM CET Wang Dongsheng wrote: >> Add support for parsing the ACPI data node for PHY devices on an MDIO bus. >> The current implementation depend on mdio bus scan. >> With _DSD device propert

[RFC PATCH 3/3] net: qcom/emac: add phy-handle support for ACPI

2018-11-07 Thread Wang Dongsheng
Use "phy-handle" to point to an internal MDIO device port. Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-mac.c | 19 ++--- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 78 ++- 2 files changed, 70 insertions(+), 27 deletions(-) diff --git

[RFC PATCH 1/3] acpi: Add acpi mdio support code

2018-11-07 Thread Wang Dongsheng
ACPI is documented in Documentation/devicetree/bindings/phy/phy-bindings.txt Documentation/acpi/dsd/data-node-references.txt Documentation/acpi/dsd/graph.txt Signed-off-by: Wang Dongsheng --- drivers/acpi/Kconfig | 6 ++ drivers/acpi/Makefile | 1 + drivers/acpi/acpi_

[RFC PATCH 0/3] acpi: Add acpi mdio support code

2018-11-07 Thread Wang Dongsheng
e () { Package () { "phy-handle", \_SB.MDIO, "ethernet-phy@0" }, } }) } Tested: QDF2400 (ACPI), buildin/insmod/rmmod [1]: Documentation/acpi/dsd/data-node-references.txt Documentation/acpi/dsd/graph.txt [2]: Documentation/devicetree/bindings/phy/phy-bindings.txt

[RFC PATCH 2/3] net: qcom/emac: split phy_config to mdio bus create and get phy device

2018-11-07 Thread Wang Dongsheng
This patch separate emac_mdio_bus_create and emac_get_phydev from emac_phy_config, and do some codes clean. Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 96 +++ 1 file changed, 56 insertions(+), 40 deletions(-) diff --git a/drivers/net

Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-29 Thread Wang, Dongsheng
On 2018/10/29 20:40, Andrew Lunn wrote: > On Mon, Oct 29, 2018 at 02:39:36AM +0000, Wang, Dongsheng wrote: >> On 2018/10/26 21:12, Andrew Lunn wrote: >>> On Fri, Oct 26, 2018 at 03:04:25AM +0000, Wang, Dongsheng wrote: >>>> On 2018/10/26 10:37, Timur Tabi wrote: &

Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-28 Thread Wang, Dongsheng
On 2018/10/26 21:12, Andrew Lunn wrote: > On Fri, Oct 26, 2018 at 03:04:25AM +0000, Wang, Dongsheng wrote: >> On 2018/10/26 10:37, Timur Tabi wrote: >>> On 10/25/18 9:18 PM, Wang, Dongsheng wrote: >>>> But when I was reading Documentation/acpi/DSD-properties-rules.tx

Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-25 Thread Wang, Dongsheng
On 2018/10/26 10:37, Timur Tabi wrote: > On 10/25/18 9:18 PM, Wang, Dongsheng wrote: >> But when I was reading Documentation/acpi/DSD-properties-rules.txt, my >> understanding is we should try to conform to DT bindings. So maybe ACPI >> doesn't have such a docum

Re: [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-25 Thread Wang, Dongsheng
On 2018/10/26 3:24, Andrew Lunn wrote: > On Thu, Oct 25, 2018 at 06:09:15PM +0800, Wang Dongsheng wrote: >> Use "phy-handle" to porint an internal MDIO device port. > Hi Dongsheng > > You are basically defining how all future ACPI based MAC drivers get > access to

[PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI

2018-10-25 Thread Wang Dongsheng
Use "phy-handle" to porint an internal MDIO device port. Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 115 +++--- 1 file changed, 100 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/emac/emac-phy.c b/d

[PATCH v3 0/2] net: qcom/emac: add shared mdio bus support

2018-10-25 Thread Wang Dongsheng
andle" to point an internal MDIO device port. The port describes the phy address. Tested: QDF2400 (ACPI), buildin/insmod/rmmod V3: - Add "phy-handle" support. - Remove all of DT changes. V2: - Separate patch. Wang Dongsheng (2): net: qcom/emac: split phy_config to mdio bus c

[PATCH v3 1/2] net: qcom/emac: split phy_config to mdio bus create and get phy device

2018-10-25 Thread Wang Dongsheng
This patch separate emac_mdio_bus_create and emac_get_phydev from emac_phy_config, and do some codes clean. Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 96 +++ 1 file changed, 56 insertions(+), 40 deletions(-) diff --git a/drivers/net

RE: [PATCH v3 0/2] net: qcom/emac: add shared mdio bus support

2018-10-25 Thread Wang, Dongsheng
Sorry, please ignore this patch. Cheers, -Dongsheng > -Original Message- > From: Wang, Dongsheng > Sent: Thursday, October 25, 2018 4:15 PM > To: ti...@kernel.org; and...@lunn.ch > Cc: netdev@vger.kernel.org; Wang, Dongsheng > ; Zheng, Joey > ; f.faine...@gmail.com

[PATCH v3 0/2] net: qcom/emac: add shared mdio bus support

2018-10-25 Thread Wang Dongsheng
andle" to point an internal MDIO device port. The port describes the phy address. Tested: QDF2400 (ACPI), buildin/insmod/rmmod V3: - Add "phy-handle" support. - Remove all of DT changes. V2: - Separate patch. Wang Dongsheng (2): net: qcom/emac: split phy_config to mdio bus c

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-19 Thread Wang, Dongsheng
On 2018/9/19 22:15, Timur Tabi wrote: > On 9/19/18 7:25 AM, Andrew Lunn wrote: >> ACPI is completely separate and should not affect the DT binding. >> I've not yet looked at the ACPI changes you added. > Just FYI, there is no device tree platform on which the upstream EMAC > driver works. All of

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-19 Thread Wang, Dongsheng
On 2018/9/18 20:35, Andrew Lunn wrote: >>> If you want to describe the MDIO controller, then you embed a mdio >>> subnode into your Ethernet MAC node: >>> >>> emac0: ethernet@feb2 { >>> mdio { >>> #address-cells = <1>; >>> #size-cells = <0>; >>> >>>

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-18 Thread Wang, Dongsheng
On 2018/9/18 0:54, Florian Fainelli wrote: > On 09/17/2018 09:47 AM, Wang, Dongsheng wrote: >> On 9/17/2018 10:50 PM, Andrew Lunn wrote: >>> On Mon, Sep 17, 2018 at 04:53:29PM +0800, Wang Dongsheng wrote: >>>> This property copy from "ibm,emac.txt" to des

Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-17 Thread Wang, Dongsheng
On 9/17/2018 10:50 PM, Andrew Lunn wrote: > On Mon, Sep 17, 2018 at 04:53:29PM +0800, Wang Dongsheng wrote: >> This property copy from "ibm,emac.txt" to describe a shared MIDO bus. >> Since emac include MDIO, so If the motherboard has more than one PHY >> connecte

[PATCH v2 4/4] net: qcom/emac: add acpi shared mdio bus support

2018-09-17 Thread Wang Dongsheng
Parsing _DSD package "mdio-device". Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/drivers/net/ethernet/qualcomm/emac/emac-phy.c b/drivers/net/ethernet/qualcomm/emac/emac-p

[PATCH v2 3/4] net: qcom/emac: add of shared mdio bus support

2018-09-17 Thread Wang Dongsheng
Share the mii_bus for others MAC device because EMAC include MDIO, and the motherboard has more than one PHY connected to an MDIO bus. Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 63 ++- drivers/net/ethernet/qualcomm/emac/emac.c | 8

[PATCH v2 1/4] net: qcom/emac: split phy_config to mdio bus create and get phy device

2018-09-17 Thread Wang Dongsheng
This patch separate emac_mdio_bus_create and emac_get_phydev from emac_phy_config, and do some codes clean. Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 99 +++ 1 file changed, 57 insertions(+), 42 deletions(-) diff --git a/drivers/net

[PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus

2018-09-17 Thread Wang Dongsheng
This property copy from "ibm,emac.txt" to describe a shared MIDO bus. Since emac include MDIO, so If the motherboard has more than one PHY connected to an MDIO bus, this property will point to the MAC device that has the MDIO bus. Signed-off-by: Wang Dongsheng --- V2: s/Since QDF2400

[PATCH v2 0/4] net: qcom/emac: add shared mdio bus support

2018-09-17 Thread Wang Dongsheng
emac/ Wang Dongsheng (4): net: qcom/emac: split phy_config to mdio bus create and get phy device dt-bindings: net: qcom: Add binding for shared mdio bus net: qcom/emac: add of shared mdio bus support net: qcom/emac: add acpi shared mdio bus support .../devicetree/bindings/net/qcom-emac.txt

Re: [PATCH 2/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Wang, Dongsheng
On 9/13/2018 8:42 PM, Andrew Lunn wrote: > On Thu, Sep 13, 2018 at 05:04:53PM +0800, Wang Dongsheng wrote: >> Share the mii_bus for others MAC device because QDF2400 emac >> include MDIO, and the motherboard has more than one PHY connected >> to an MDIO bus. >> >>

[PATCH 2/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Wang Dongsheng
Share the mii_bus for others MAC device because QDF2400 emac include MDIO, and the motherboard has more than one PHY connected to an MDIO bus. Tested: QDF2400 (ACPI), buildin/insmod/rmmod Signed-off-by: Wang Dongsheng --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 211

[PATCH 0/2] net: qcom/emac: add shared mdio bus support

2018-09-13 Thread Wang Dongsheng
Share the mii_bus for others MAC device because QDF2400 emac include MDIO, and the motherboard has more than one PHY connected to an MDIO bus. Tested: QDF2400 (ACPI), buildin/insmod/rmmod Wang Dongsheng (2): dt-bindings: net: qcom: Add binding for shared mdio bus net: qcom/emac: add shared

[PATCH] net: phy: marvell: change default m88e1510 LED configuration

2018-07-02 Thread Wang Dongsheng
The m88e1121 LED default configuration does not apply m88e151x. So add a function to relpace m88e1121 LED configuration. Signed-off-by: Wang Dongsheng --- drivers/net/phy/marvell.c | 54 - include/linux/marvell_phy.h | 2 ++ 2 files changed, 38 insertions

Re: Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev

2018-01-25 Thread Wang, Dongsheng
Hi, Timur && Andrew, Please correct me if there is any problem with my understanding. GPIO is a general property of devices, the property point to an entity such as device tree or ACPI table, we also can directly implement it in device node. For ACPI, there is _DSD that should include GPIO

[RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev

2018-01-24 Thread Wang Dongsheng
r needs to take adev to mdiobus when mido-bus is registering. Signed-off-by: Wang Dongsheng <dongsheng.w...@hxt-semitech.com> --- drivers/net/ethernet/qualcomm/emac/emac-phy.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/qualcomm/emac/emac-phy.c b/drivers/n

Re: Re: [PATCH v4] net: qcom/emac: extend DMA mask to 46bits

2018-01-22 Thread Wang, Dongsheng
Thanks. Cheers, -Dongsheng On 2018/1/23 12:48:27, "Timur Tabi" <ti...@codeaurora.org> wrote: >On 1/22/18 10:25 PM, Wang Dongsheng wrote: >>Bit TPD3[31] is used as a timestamp bit if PTP is enabled, but >>it's used as an address bit if PTP is disabled. Since PTP

[PATCH v4] net: qcom/emac: extend DMA mask to 46bits

2018-01-22 Thread Wang Dongsheng
Bit TPD3[31] is used as a timestamp bit if PTP is enabled, but it's used as an address bit if PTP is disabled. Since PTP isn't supported by the driver, we can extend the DMA address to 46 bits. Signed-off-by: Wang Dongsheng <dongsheng.w...@hxt-semitech.com> --- v4: - Changes: PATCH's descr

[PATCH v3] net: qcom/emac: extend DMA mask to 46bits

2017-11-20 Thread Wang Dongsheng
Since PTP doesn't support yet, so extend the DMA address to 46bits. Signed-off-by: Wang Dongsheng <wdsc...@gmail.com> --- v3: - Remove "Dynamic fix TPD_BUFFER_ADDR_H_SET size." - Add comments for TPD_BUFFER_ADDR_H_SET. v2: - Changes PATCH subject. - Dynamic fix TPD_BUFFER

[PATCH v2] net: qcom/emac: extend DMA mask to 46bits

2017-11-17 Thread Wang Dongsheng
Since PTP doesn't support yet, so extend the DMA address to 46bits. When PTP is supported, the dma_mask should be fixed dynamically. Signed-off-by: Wang Dongsheng <wdsc...@gmail.com> --- v2: - Changes PATCH subject. - Dynamic fix TPD_BUFFER_ADDR_H_SET size. - Modify DMA MASK to 46bits.

Re: [PATCH] net: qcom/emac: fix the error of tpd buff address valid bit

2017-11-10 Thread Wang, Dongsheng
Hey, Timur, On 2017/11/10 20:57, Timur Tabi wrote: On 11/10/17 3:49 AM, Wang Dongsheng wrote: TPD has 46-bits as buff address valid bit. So fix the buff address from 45-bits to 46-bits. NAK. The TPD has 45 bits.  Why do you say it was 46? On QDF2400, EMAC TPD buff address size is [45:0

[PATCH] net: qcom/emac: fix the error of tpd buff address valid bit

2017-11-10 Thread Wang Dongsheng
From: Wang Dongsheng <wdsc...@gmail.com> TPD has 46-bits as buff address valid bit. So fix the buff address from 45-bits to 46-bits. Signed-off-by: Wang Dongsheng <wdsc...@gmail.com> diff --git a/drivers/net/ethernet/qualcomm/emac/emac-mac.h b/drivers/net/ethernet/qualcomm/ema