2021-02-15 15:34:34

by Nobuhiro Iwamatsu

[permalink] [raw]
Subject: [PATCH v4 0/4] net: stmmac: Add Toshiba Visconti SoCs glue driver

Hi,

This series is the ethernet driver for Toshiba's ARM SoC, Visconti[0].
This provides DT binding documentation, device driver, MAINTAINER files,
and updates to DT files.

Best regards,
Nobuhiro

[0]:
https://toshiba.semicon-storage.com/ap-en/semiconductor/product/image-recognition-processors-visconti.htmli

Updates:

dt-bindings: net: Add DT bindings for Toshiba Visconti TMPV7700 SoC
v3 -> v4: No update. Resend the correct patch series.
v2 -> v3: Change to the correct dwmac version.
Remove description of reg property.
Update examples, drop dma-coherent, add snps,tso, fix phy-mode.
v1 -> v2: No update.

net: stmmac: Add Toshiba Visconti SoCs glue driver
v3 -> v4: No update. Resend the correct patch series.
https://lore.kernel.org/netdev/[email protected]/
did not contain the following fixes:
- Drop def_bool y in Kconfig
- Change from bool to tristate in Kconfig option.
- Add 'default ARCH_VISCONTI' to Kconfig option.

v2 -> v3: Remove code that is no longer needed by using compatible string.
Drop def_bool y in Kconfig
Change from bool to tristate in Kconfig option.
Add 'default ARCH_VISCONTI' to Kconfig option.
v1 -> v2: Use reverse christmas tree ordering for local variable declarations.

MAINTAINERS: Add entries for Toshiba Visconti ethernet controller
v3 -> v4: No update. Resend the correct patch series.
v2 -> v3: No update.
v1 -> v2: No update.

arm: dts: visconti: Add DT support for Toshiba Visconti5 ethernet controller
v3 -> v4: No update
v2 -> v3: Add "snps,dwmac-4.20a" as compatible string.
Add snps,tso.
v1 -> v2: No update.

Nobuhiro Iwamatsu (4):
dt-bindings: net: Add DT bindings for Toshiba Visconti TMPV7700 SoC
net: stmmac: Add Toshiba Visconti SoCs glue driver
MAINTAINERS: Add entries for Toshiba Visconti ethernet controller
arm: dts: visconti: Add DT support for Toshiba Visconti5 ethernet
controller

.../bindings/net/toshiba,visconti-dwmac.yaml | 85 ++++++
MAINTAINERS | 2 +
.../boot/dts/toshiba/tmpv7708-rm-mbrc.dts | 18 ++
arch/arm64/boot/dts/toshiba/tmpv7708.dtsi | 25 ++
drivers/net/ethernet/stmicro/stmmac/Kconfig | 8 +
drivers/net/ethernet/stmicro/stmmac/Makefile | 1 +
.../ethernet/stmicro/stmmac/dwmac-visconti.c | 285 ++++++++++++++++++
7 files changed, 424 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c

--
2.30.0.rc2


2021-02-15 15:35:46

by Nobuhiro Iwamatsu

[permalink] [raw]
Subject: [PATCH v4 4/4] arm: dts: visconti: Add DT support for Toshiba Visconti5 ethernet controller

Add the ethernet controller node in Toshiba Visconti5 SoC-specific DT file.
And enable this node in TMPV7708 RM main board's board-specific DT file.

Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
---
.../boot/dts/toshiba/tmpv7708-rm-mbrc.dts | 18 +++++++++++++
arch/arm64/boot/dts/toshiba/tmpv7708.dtsi | 25 +++++++++++++++++++
2 files changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
index ed0bf7f13f54..48fa8776e36f 100644
--- a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
+++ b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
@@ -41,3 +41,21 @@ &uart1 {
clocks = <&uart_clk>;
clock-names = "apb_pclk";
};
+
+&piether {
+ status = "okay";
+ phy-handle = <&phy0>;
+ phy-mode = "rgmii-id";
+ clocks = <&clk300mhz>, <&clk125mhz>;
+ clock-names = "stmmaceth", "phy_ref_clk";
+
+ mdio0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "snps,dwmac-mdio";
+ phy0: ethernet-phy@1 {
+ device_type = "ethernet-phy";
+ reg = <0x1>;
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/toshiba/tmpv7708.dtsi b/arch/arm64/boot/dts/toshiba/tmpv7708.dtsi
index 242f25f4e12a..3366786699fc 100644
--- a/arch/arm64/boot/dts/toshiba/tmpv7708.dtsi
+++ b/arch/arm64/boot/dts/toshiba/tmpv7708.dtsi
@@ -134,6 +134,20 @@ uart_clk: uart-clk {
#clock-cells = <0>;
};

+ clk125mhz: clk125mhz {
+ compatible = "fixed-clock";
+ clock-frequency = <125000000>;
+ #clock-cells = <0>;
+ clock-output-names = "clk125mhz";
+ };
+
+ clk300mhz: clk300mhz {
+ compatible = "fixed-clock";
+ clock-frequency = <300000000>;
+ #clock-cells = <0>;
+ clock-output-names = "clk300mhz";
+ };
+
soc {
#address-cells = <2>;
#size-cells = <2>;
@@ -384,6 +398,17 @@ spi6: spi@28146000 {
#size-cells = <0>;
status = "disabled";
};
+
+ piether: ethernet@28000000 {
+ compatible = "toshiba,visconti-dwmac", "snps,dwmac-4.20a";
+ reg = <0 0x28000000 0 0x10000>;
+ interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ snps,txpbl = <4>;
+ snps,rxpbl = <4>;
+ snps,tso;
+ status = "disabled";
+ };
};
};

--
2.30.0.rc2

2021-02-15 15:35:46

by Nobuhiro Iwamatsu

[permalink] [raw]
Subject: [PATCH v4 1/4] dt-bindings: net: Add DT bindings for Toshiba Visconti TMPV7700 SoC

Add device tree bindings for ethernet controller of Toshiba Visconti
TMPV7700 SoC series.

Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
---
.../bindings/net/toshiba,visconti-dwmac.yaml | 85 +++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml

diff --git a/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml b/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
new file mode 100644
index 000000000000..59724d18e6f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
@@ -0,0 +1,85 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/net/toshiba,visconti-dwmac.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Toshiba Visconti DWMAC Ethernet controller
+
+maintainers:
+ - Nobuhiro Iwamatsu <[email protected]>
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - toshiba,visconti-dwmac
+ required:
+ - compatible
+
+allOf:
+ - $ref: "snps,dwmac.yaml#"
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - toshiba,visconti-dwmac
+ - const: snps,dwmac-4.20a
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: main clock
+ - description: PHY reference clock
+
+ clock-names:
+ items:
+ - const: stmmaceth
+ - const: phy_ref_clk
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ soc {
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ piether: ethernet@28000000 {
+ compatible = "toshiba,visconti-dwmac", "snps,dwmac-4.20a";
+ reg = <0 0x28000000 0 0x10000>;
+ interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ clocks = <&clk300mhz>, <&clk125mhz>;
+ clock-names = "stmmaceth", "phy_ref_clk";
+ snps,txpbl = <4>;
+ snps,rxpbl = <4>;
+ snps,tso;
+ phy-mode = "rgmii-id";
+ phy-handle = <&phy0>;
+
+ mdio0 {
+ #address-cells = <0x1>;
+ #size-cells = <0x0>;
+ compatible = "snps,dwmac-mdio";
+
+ phy0: ethernet-phy@1 {
+ device_type = "ethernet-phy";
+ reg = <0x1>;
+ };
+ };
+ };
+ };
--
2.30.0.rc2

2021-02-15 15:36:05

by Nobuhiro Iwamatsu

[permalink] [raw]
Subject: [PATCH v4 3/4] MAINTAINERS: Add entries for Toshiba Visconti ethernet controller

Add entries for Toshiba Visconti ethernet controller binding and driver.

Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index cbf4b94f89d4..6be4bdaabf32 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2641,8 +2641,10 @@ L: [email protected] (moderated for non-subscribers)
S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/iwamatsu/linux-visconti.git
F: Documentation/devicetree/bindings/arm/toshiba.yaml
+F: Documentation/devicetree/bindings/net/toshiba,visconti-dwmac.yaml
F: Documentation/devicetree/bindings/pinctrl/toshiba,tmpv7700-pinctrl.yaml
F: arch/arm64/boot/dts/toshiba/
+F: drivers/net/ethernet/stmicro/stmmac/dwmac-visconti.c
F: drivers/pinctrl/visconti/
N: visconti

--
2.30.0.rc2

2021-02-15 23:20:42

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH v4 0/4] net: stmmac: Add Toshiba Visconti SoCs glue driver

Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Tue, 16 Feb 2021 00:24:34 +0900 you wrote:
> Hi,
>
> This series is the ethernet driver for Toshiba's ARM SoC, Visconti[0].
> This provides DT binding documentation, device driver, MAINTAINER files,
> and updates to DT files.
>
> Best regards,
> Nobuhiro
>
> [...]

Here is the summary with links:
- [v4,1/4] dt-bindings: net: Add DT bindings for Toshiba Visconti TMPV7700 SoC
https://git.kernel.org/netdev/net-next/c/e6a395061c3e
- [v4,2/4] net: stmmac: Add Toshiba Visconti SoCs glue driver
https://git.kernel.org/netdev/net-next/c/b38dd98ff8d0
- [v4,3/4] MAINTAINERS: Add entries for Toshiba Visconti ethernet controller
https://git.kernel.org/netdev/net-next/c/df53e4f48e8d
- [v4,4/4] arm: dts: visconti: Add DT support for Toshiba Visconti5 ethernet controller
https://git.kernel.org/netdev/net-next/c/ec8a42e73432

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html


2021-02-16 12:37:28

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [PATCH v4 4/4] arm: dts: visconti: Add DT support for Toshiba Visconti5 ethernet controller

Hi Nobuhiro,


On Mon, 15 Feb 2021 at 21:00, Nobuhiro Iwamatsu
<[email protected]> wrote:
>
> Add the ethernet controller node in Toshiba Visconti5 SoC-specific DT file.
> And enable this node in TMPV7708 RM main board's board-specific DT file.
>
> Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
> ---
> .../boot/dts/toshiba/tmpv7708-rm-mbrc.dts | 18 +++++++++++++
> arch/arm64/boot/dts/toshiba/tmpv7708.dtsi | 25 +++++++++++++++++++
> 2 files changed, 43 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> index ed0bf7f13f54..48fa8776e36f 100644
> --- a/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> +++ b/arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts
> @@ -41,3 +41,21 @@ &uart1 {
> clocks = <&uart_clk>;
> clock-names = "apb_pclk";
> };
> +
> +&piether {
> + status = "okay";
> + phy-handle = <&phy0>;
> + phy-mode = "rgmii-id";
> + clocks = <&clk300mhz>, <&clk125mhz>;
> + clock-names = "stmmaceth", "phy_ref_clk";
> +
> + mdio0 {
> + #address-cells = <1>;
> + #size-cells = <0>;
> + compatible = "snps,dwmac-mdio";
> + phy0: ethernet-phy@1 {
> + device_type = "ethernet-phy";
> + reg = <0x1>;

This build error was noticed on LKFT builder while building arm64 dtb
on linux next 20210216 tag.

arch/arm64/boot/dts/toshiba/tmpv7708-rm-mbrc.dts:52.3-4 syntax error
FATAL ERROR: Unable to parse input tree

Reported-by: Naresh Kamboju <[email protected]>

https://gitlab.com/Linaro/lkft/mirrors/next/linux-next/-/jobs/1033072509#L382

--
Linaro LKFT
https://lkft.linaro.org