further mt7988 devicetree work
Subsystems (5)
v9 cover further mt7988 devicetree work
From: Frank Wunderlich <[email protected]>
This series continues mt7988 devicetree work
- Extend cpu frequency scaling with CCI
- GPIO leds
- Basic network-support (ethernet controller + builtin switch + SFP Cages)
depencies (i hope this list is complete and latest patches/series linked):
support interrupt-names is optional again as i re-added the reserved IRQs (they are not unusable as i thought and can allow features in future)
https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/
needs change in mtk ethernet driver for the sram to be read from separate node:
https://patchwork.kernel.org/project/netdevbpf/patch/c2b9242229d06af4e468204bcf42daa1535c3a72.1751461762.git.daniel@makrotopia.org/
for SFP-Function (macs currently disabled):
PCS clearance which is a 1.5 year discussion currently ongoing
Daniel asked netdev for a way 2 go:
https://lore.kernel.org/netdev/[email protected]/
e.g. something like this (one of):
* https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/ (v6)
* https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/ (v4)
* https://patchwork.kernel.org/project/netdevbpf/patch/ba4e359584a6b3bc4b3470822c42186d5b0856f9.1721910728.git.daniel@makrotopia.org/
full usxgmii driver:
https://patchwork.kernel.org/project/netdevbpf/patch/07845ec900ba41ff992875dce12c622277592c32.1702352117.git.daniel@makrotopia.org/
first PCS-discussion is here:
https://patchwork.kernel.org/project/netdevbpf/patch/8aa905080bdb6760875d62cb3b2b41258837f80e.1702352117.git.daniel@makrotopia.org/
some more here:
https://lore.kernel.org/netdev/[email protected]/
and then dts nodes for sgmiisys+usxgmii+2g5 firmware
when above depencies are solved the mac1/2 can be enabled and 2.5G phy/SFP slots will work.
changes:
v9:
- dropped patches already applied (cci,gpio-leds,unused pins)
- added patches to add RSS IRQs, IRQ-names and sram-node for mt7986
note: mt7981 does not have a ethernet node yet
- set minItems for Filogic (MT798x) IRQs/Names to 8 needed to update MT7986 binding example because of this
- add sram:false to non-Filogic SoCs
v8:
- splitted binding into irq-count and irq-names and updated description
- fixed typo in mt7621 section "interrupt-namess"
- splitted binding changes into fixes (mac) and additions (sram)
- dropped change of reg (simple count to description)
- change ethernet register size to 0x40000
v7:
- fixed rebasing error while splitting dt-binding patch
v6:
binding:
- split out the interrupt-names into separate patch
- update irq(name) min count to 4
- move interrupt-names up
- add sram-property
- drop second reg entry and minitems as there is only 1 item left
dts:
- fix whitespace-errors for pdma irqs (spaces vs. tabs)
- move sram from eth reg to own sram node (needs CONFIG_SRAM)
v5:
- add reserved irqs and change names
- update binding for 8 irqs with different names (rx,tx => fe1+fe2, rx-ringX => pdmaX) (dropped Robs RB due to this change again, sorry)
v4:
net-binding:
- allow interrupt names and increase max interrupts to 6 because of RSS/LRO interrupts (dropped Robs RB due to this change)
dts-patches:
- add interrupts for RSS/LRO and interrupt-names for ethernet node
- eth-reg and clock whitespace-fix
- comment for fixed-link on gmac0
- drop phy-mode properties as suggested by andrew
- drop phy-connection-type on 2g5 board
- reorder some properties
- update 2g5 phy node
- unit-name dec instead of hex to match reg property
- move compatible before reg
- drop phy-mode
v3:
- dropped patches already applied (SPI+thermal)
- added soc specific cci compatible (new binding patch + changed dts)
- enable 2g5 phy because driver is now merged
- add patch for cleaning up unnecessary pins
- add patch for gpio-leds
- add patch for adding ethernet aliases
v2:
- change reg to list of items in eth binding
- changed mt7530 binding:
- unevaluatedProperties=false
- mediatek,pio subproperty
- from patternProperty to property
- board specific properties like led function and labels moved to bpi-r4 dtsi
Frank Wunderlich (13):
dt-bindings: net: mediatek,net: update mac subnode pattern for mt7988
dt-bindings: net: mediatek,net: allow up to 8 IRQs
dt-bindings: net: mediatek,net: allow irq names
dt-bindings: net: mediatek,net: add sram property
dt-bindings: net: dsa: mediatek,mt7530: add dsa-port definition for
mt7988
dt-bindings: net: dsa: mediatek,mt7530: add internal mdio bus
arm64: dts: mediatek: mt7986: add sram node
arm64: dts: mediatek: mt7986: add interrupts for RSS and interrupt
names
arm64: dts: mediatek: mt7988: add basic ethernet-nodes
arm64: dts: mediatek: mt7988: add switch node
arm64: dts: mediatek: mt7988a-bpi-r4: add aliases for ethernet
arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac
arm64: dts: mediatek: mt7988a-bpi-r4: configure switch phys and leds
.../bindings/net/dsa/mediatek,mt7530.yaml | 24 +- .../devicetree/bindings/net/mediatek,net.yaml | 64 +++- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 20 +- .../mediatek/mt7988a-bananapi-bpi-r4-2g5.dts | 11 + .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 19 ++ .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 86 ++++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 285 +++++++++++++++++- 7 files changed, 497 insertions(+), 12 deletions(-)
Signature · 1 line
2.43.0
PATCH v9 1/13 dt-bindings: net: mediatek,net: update mac subnode pattern for mt7988
From: Frank Wunderlich <[email protected]>
MT7888 have 3 Macs and so its nodes have names from mac0 - mac2. Update pattern to fix this.
--- Documentation/devicetree/bindings/net/mediatek,net.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/net/mediatek,net.yaml +1 -1
@@ -382,7 +382,7 @@ allOf: - const: xgp3 patternProperties: - "^mac@[0-1]$": + "^mac@[0-2]$": type: object unevaluatedProperties: false allOf:
Signature · 1 line
2.43.0
PATCH v9 2/13 dt-bindings: net: mediatek,net: allow up to 8 IRQs
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Increase the maximum IRQ count to 8 (4 FE + 4 RSS/LRO).
Frame-engine-IRQs (max 4):
MT7621, MT7628: 1 FE-IRQ
MT7622, MT7623: 3 FE-IRQs (only two used by the driver for now) MT7981, MT7986, MT7988: 4 FE-IRQs (only two used by the driver for now)
Mediatek Filogic SoCs (mt798x) have 4 additional IRQs for RSS and/or LRO. So MT798x have 8 IRQs in total.
MT7981 does not have a ethernet-node yet.
MT7986 Ethernet node is updated with RSS/LRO IRQs in this series. MT7988 Ethernet node is added in this series.
---
v9:
- set interrupt minitems to 8 for filogic
- mt7981 does not have a ethernet node yet, so no ABI break
- devicetree for mt7986 is updated later in this series, ABI-Break, but RSS/LRO should use interrupt names and is simply disabled when using older DT
- extend mt7986 example with PDMA-IRQs because minItems now 8
v8: separate irq-count change from interrupt-names patch
--- .../devicetree/bindings/net/mediatek,net.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
Documentation/devicetree/bindings/net/mediatek,net.yaml +9 -5
@@ -40,7 +40,7 @@ properties: interrupts: minItems: 1 - maxItems: 4 + maxItems: 8 power-domains: maxItems: 1
@@ -272,7 +272,7 @@ allOf: then: properties: interrupts: - minItems: 4 + minItems: 8 clocks: minItems: 15
@@ -310,7 +310,7 @@ allOf: then: properties: interrupts: - minItems: 4 + minItems: 8 clocks: minItems: 15
@@ -348,7 +348,7 @@ allOf: then: properties: interrupts: - minItems: 4 + minItems: 8 clocks: minItems: 24
@@ -507,7 +507,11 @@ examples: interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>; + <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; clocks = <ðsys CLK_ETH_FE_EN>, <ðsys CLK_ETH_GP2_EN>, <ðsys CLK_ETH_GP1_EN>,
Signature · 1 line
2.43.0
PATCH v9 3/13 dt-bindings: net: mediatek,net: allow irq names
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
In preparation for MT7988 and RSS/LRO allow the interrupt-names property.
In this way driver can request the interrupts by name which is much more readable in the driver code and SoC's dtsi than relying on a specific order.
Frame-engine-IRQs (fe0..3):
MT7621, MT7628: 1 FE-IRQ
MT7622, MT7623: 3 FE-IRQs (only two used by the driver for now) MT7981, MT7986: 4 FE-IRQs (only two used by the driver for now)
RSS/LRO IRQs (pdma0..3) additional only on Filogic (MT798x) with count of 4. So all IRQ-names (8) for Filogic.
Set boundaries for all compatibles same as irq count.
---
v9:
- add interrupt-names minitems to 8 for filogic
- mt7981 does not have a ethernet node yet
- devicetree for mt7986 is updated later in this series
- small rephrase IRQ => FE-IRQ and mention total count of IRQs on Filogic.
- kept angelos RB because of small change, i hope it is ok :)
v8:
- fixed typo in mt7621 section "interrupt-namess"
- separated interrupt count from interrupt-names
- rephrased description a bit to explain the "why"
v7: fixed wrong rebase
v6: new patch splitted from the mt7988 changes
--- .../devicetree/bindings/net/mediatek,net.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+)
Documentation/devicetree/bindings/net/mediatek,net.yaml +36 -0
@@ -42,6 +42,18 @@ properties: minItems: 1 maxItems: 8 + interrupt-names: + minItems: 1 + items: + - const: fe0 + - const: fe1 + - const: fe2 + - const: fe3 + - const: pdma0 + - const: pdma1 + - const: pdma2 + - const: pdma3 + power-domains: maxItems: 1
@@ -135,6 +147,10 @@ allOf: minItems: 3 maxItems: 3 + interrupt-names: + minItems: 3 + maxItems: 3 + clocks: minItems: 4 maxItems: 4
@@ -166,6 +182,9 @@ allOf: interrupts: maxItems: 1 + interrupt-names: + maxItems: 1 + clocks: minItems: 2 maxItems: 2
@@ -192,6 +211,10 @@ allOf: minItems: 3 maxItems: 3 + interrupt-names: + minItems: 3 + maxItems: 3 + clocks: minItems: 11 maxItems: 11
@@ -232,6 +255,10 @@ allOf: minItems: 3 maxItems: 3 + interrupt-names: + minItems: 3 + maxItems: 3 + clocks: minItems: 17 maxItems: 17
@@ -274,6 +301,9 @@ allOf: interrupts: minItems: 8 + interrupt-names: + minItems: 8 + clocks: minItems: 15 maxItems: 15
@@ -312,6 +342,9 @@ allOf: interrupts: minItems: 8 + interrupt-names: + minItems: 8 + clocks: minItems: 15 maxItems: 15
@@ -350,6 +383,9 @@ allOf: interrupts: minItems: 8 + interrupt-names: + minItems: 8 + clocks: minItems: 24 maxItems: 24
Signature · 1 line
2.43.0
PATCH v9 4/13 dt-bindings: net: mediatek,net: add sram property
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Meditak Filogic SoCs (MT798x) have dedicated MMIO-SRAM for dma operations.
MT7981 and MT7986 currently use static offset to ethernet MAC register which will be changed in separate patch once this way is accepted.
Add "sram" property to map ethernet controller to dedicated mmio-sram node.
---
v9:
- add "sram: false" for non-filogic
v8:
- splitted out mac subnode pattern
- dropped reg naming change
- rephrased description
- drop change of reg-name
v6:
- split out the interrupt-names into separate patch
- update irq(name) min count to 4
- add sram-property
- drop second reg entry and minitems as there is only 1 item left again
v5:
- fix v4 logmessage and change description a bit describing how i get the irq count.
- update binding for 8 irqs with different names (rx,tx => fe0..fe3) including the 2 reserved irqs which can be used later
- change rx-ringX to pdmaX to be closer to hardware documentation
v4:
- increase max interrupts to 6 because of adding RSS/LRO interrupts (4) and dropping 2 reserved irqs (0+3) around rx+tx
- dropped Robs RB due to this change
- allow interrupt names
- add interrupt-names without reserved IRQs on mt7988
this requires mtk driver patch:
https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/
v2:
- change reg to list of items
--- .../devicetree/bindings/net/mediatek,net.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Documentation/devicetree/bindings/net/mediatek,net.yaml +12 -0
@@ -66,6 +66,10 @@ properties: - const: gmac - const: ppe + sram: + $ref: /schemas/types.yaml#/definitions/phandle + description: phandle to mmio SRAM + mediatek,ethsys: $ref: /schemas/types.yaml#/definitions/phandle description:
@@ -162,6 +166,8 @@ allOf: - const: gp1 - const: gp2 + sram: false + mediatek,infracfg: false mediatek,wed: false
@@ -194,6 +200,8 @@ allOf: - const: ethif - const: fe + sram: false + mediatek,infracfg: false mediatek,wed: false
@@ -233,6 +241,8 @@ allOf: - const: sgmii_ck - const: eth2pll + sram: false + mediatek,infracfg: false mediatek,sgmiisys:
@@ -283,6 +293,8 @@ allOf: - const: sgmii_ck - const: eth2pll + sram: false + mediatek,sgmiisys: minItems: 2 maxItems: 2
Signature · 1 line
2.43.0
PATCH v9 5/13 dt-bindings: net: dsa: mediatek,mt7530: add dsa-port definition for mt7988
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Add own dsa-port binding for SoC with internal switch where only phy-mode 'internal' is valid.
--- .../bindings/net/dsa/mediatek,mt7530.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +13 -1
@@ -190,6 +190,18 @@ required: - reg $defs: + builtin-dsa-port: + patternProperties: + "^(ethernet-)?ports$": + patternProperties: + "^(ethernet-)?port@[0-6]$": + if: + required: [ ethernet ] + then: + properties: + phy-mode: + const: internal + mt7530-dsa-port: patternProperties: "^(ethernet-)?ports$":
@@ -297,7 +309,7 @@ allOf: - airoha,en7581-switch - airoha,an7583-switch then: - $ref: "#/$defs/mt7530-dsa-port" + $ref: "#/$defs/builtin-dsa-port" properties: gpio-controller: false mediatek,mcm: false
Signature · 1 line
2.43.0
PATCH v9 6/13 dt-bindings: net: dsa: mediatek,mt7530: add internal mdio bus
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Mt7988 buildin switch has own mdio bus where ge-phys are connected. Add related property for this.
---
v2:
- change from patternproperty to property
- add unevaluatedProperties and mediatek,pio subproperty
--- .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+)
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +10 -0
@@ -136,6 +136,16 @@ properties: See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt for details for the regulator setup on these boards. + mdio: + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + + properties: + mediatek,pio: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle pointing to the mediatek pinctrl node. + mediatek,mcm: type: boolean description:
Signature · 1 line
2.43.0
PATCH v9 7/13 arm64: dts: mediatek: mt7986: add sram node
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Currently sram is allocated in driver via offset from reg of ethernet node. Change it to use a dedicated sram node like mt7988.
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +11 -1
@@ -523,7 +523,7 @@ wed1: wed@15011000 { eth: ethernet@15100000 { compatible = "mediatek,mt7986-eth"; - reg = <0 0x15100000 0 0x80000>; + reg = <0 0x15100000 0 0x40000>; interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
@@ -553,6 +553,7 @@ eth: ethernet@15100000 { <&topckgen CLK_TOP_SGM_325M_SEL>; assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>, <&apmixedsys CLK_APMIXED_SGMPLL>; + sram = <ð_sram>; #address-cells = <1>; #size-cells = <0>; mediatek,ethsys = <ðsys>;
@@ -562,6 +563,15 @@ eth: ethernet@15100000 { status = "disabled"; }; + /*15100000+0x40000*/ + eth_sram: sram@15140000 { + compatible = "mmio-sram"; + reg = <0 0x15140000 0 0x40000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x15140000 0 0x40000>; + }; + wo_ccif0: syscon@151a5000 { compatible = "mediatek,mt7986-wo-ccif", "syscon"; reg = <0 0x151a5000 0 0x1000>;
Signature · 1 line
2.43.0
PATCH v9 8/13 arm64: dts: mediatek: mt7986: add interrupts for RSS and interrupt names
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Add interrupts for RSS/LRO and names to access them via name instead of index.
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +7 -1
@@ -527,7 +527,13 @@ eth: ethernet@15100000 { interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>; + <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "fe0", "fe1", "fe2", "fe3", "pdma0", + "pdma1", "pdma2", "pdma3"; clocks = <ðsys CLK_ETH_FE_EN>, <ðsys CLK_ETH_GP2_EN>, <ðsys CLK_ETH_GP1_EN>,
Signature · 1 line
2.43.0
PATCH v9 10/13 arm64: dts: mediatek: mt7988: add switch node
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Add mt7988 builtin mt753x switch nodes.
---
v4:
- drop phy-mode for gsw-phy
- reorder phy-mode after phy-handle
- drop interrupt parent from switch
v2:
- drop labels and led-function too (have to be in board)
--- arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 148 ++++++++++++++++++++++ 1 file changed, 148 insertions(+)
arch/arm64/boot/dts/mediatek/mt7988a.dtsi +148 -0
@@ -742,6 +742,154 @@ ethsys: clock-controller@15000000 { #reset-cells = <1>; }; + switch: switch@15020000 { + compatible = "mediatek,mt7988-switch"; + reg = <0 0x15020000 0 0x8000>; + interrupt-controller; + #interrupt-cells = <1>; + interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>; + resets = <ðwarp MT7988_ETHWARP_RST_SWITCH>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + gsw_port0: port@0 { + reg = <0>; + phy-handle = <&gsw_phy0>; + phy-mode = "internal"; + }; + + gsw_port1: port@1 { + reg = <1>; + phy-handle = <&gsw_phy1>; + phy-mode = "internal"; + }; + + gsw_port2: port@2 { + reg = <2>; + phy-handle = <&gsw_phy2>; + phy-mode = "internal"; + }; + + gsw_port3: port@3 { + reg = <3>; + phy-handle = <&gsw_phy3>; + phy-mode = "internal"; + }; + + port@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "internal"; + + fixed-link { + speed = <10000>; + full-duplex; + pause; + }; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + mediatek,pio = <&pio>; + + gsw_phy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + interrupts = <0>; + nvmem-cells = <&phy_calibration_p0>; + nvmem-cell-names = "phy-cal-data"; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + gsw_phy0_led0: led@0 { + reg = <0>; + status = "disabled"; + }; + + gsw_phy0_led1: led@1 { + reg = <1>; + status = "disabled"; + }; + }; + }; + + gsw_phy1: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + interrupts = <1>; + nvmem-cells = <&phy_calibration_p1>; + nvmem-cell-names = "phy-cal-data"; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + gsw_phy1_led0: led@0 { + reg = <0>; + status = "disabled"; + }; + + gsw_phy1_led1: led@1 { + reg = <1>; + status = "disabled"; + }; + }; + }; + + gsw_phy2: ethernet-phy@2 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <2>; + interrupts = <2>; + nvmem-cells = <&phy_calibration_p2>; + nvmem-cell-names = "phy-cal-data"; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + gsw_phy2_led0: led@0 { + reg = <0>; + status = "disabled"; + }; + + gsw_phy2_led1: led@1 { + reg = <1>; + status = "disabled"; + }; + }; + }; + + gsw_phy3: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + interrupts = <3>; + nvmem-cells = <&phy_calibration_p3>; + nvmem-cell-names = "phy-cal-data"; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + gsw_phy3_led0: led@0 { + reg = <0>; + status = "disabled"; + }; + + gsw_phy3_led1: led@1 { + reg = <1>; + status = "disabled"; + }; + }; + }; + }; + }; + ethwarp: clock-controller@15031000 { compatible = "mediatek,mt7988-ethwarp"; reg = <0 0x15031000 0 0x1000>;
Signature · 1 line
2.43.0
PATCH v9 11/13 arm64: dts: mediatek: mt7988a-bpi-r4: add aliases for ethernet
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Add aliases for gmacs to allow bootloader setting mac-adresses.
--- arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +6 -0
@@ -8,6 +8,12 @@ #include "mt7988a.dtsi" / { + aliases { + ethernet0 = &gmac0; + ethernet1 = &gmac1; + ethernet2 = &gmac2; + }; + chosen { stdout-path = "serial0:115200n8"; };
Signature · 1 line
2.43.0
PATCH v9 9/13 arm64: dts: mediatek: mt7988: add basic ethernet-nodes
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Add basic ethernet related nodes.
Mac1+2 needs pcs (sgmii+usxgmii) to work correctly which will be linked later when driver is merged.
---
v8:
- change ethernet register size to 0x40000
range from 0x15140000 ~ 0x1517ffff is not usable on mt7988 => 0xDEADBEEF
v6:
- fix whitespace-errors for pdma irqs (spaces vs. tabs)
- move sram from eth reg to own sram node (needs CONFIG_SRAM)
v5:
- add reserved irqs and change names to fe0..fe3
- change rx-ringX to pdmaX to be closer to documentation
v4:
- comment for fixed-link on gmac0
- update 2g5 phy node
- unit-name dec instead of hex to match reg property
- move compatible before reg
- drop phy-mode
- add interrupts for RSS
- add interrupt-names and drop reserved irqs for ethernet
- some reordering
- eth-reg and clock whitespace-fix based on angelos review
--- arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 137 +++++++++++++++++++++- 1 file changed, 134 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/mediatek/mt7988a.dtsi +134 -3
@@ -680,7 +680,28 @@ xphyu3port0: usb-phy@11e13000 { }; }; - clock-controller@11f40000 { + xfi_tphy0: phy@11f20000 { + compatible = "mediatek,mt7988-xfi-tphy"; + reg = <0 0x11f20000 0 0x10000>; + clocks = <&xfi_pll CLK_XFIPLL_PLL_EN>, + <&topckgen CLK_TOP_XFI_PHY_0_XTAL_SEL>; + clock-names = "xfipll", "topxtal"; + resets = <&watchdog 14>; + mediatek,usxgmii-performance-errata; + #phy-cells = <0>; + }; + + xfi_tphy1: phy@11f30000 { + compatible = "mediatek,mt7988-xfi-tphy"; + reg = <0 0x11f30000 0 0x10000>; + clocks = <&xfi_pll CLK_XFIPLL_PLL_EN>, + <&topckgen CLK_TOP_XFI_PHY_1_XTAL_SEL>; + clock-names = "xfipll", "topxtal"; + resets = <&watchdog 15>; + #phy-cells = <0>; + }; + + xfi_pll: clock-controller@11f40000 { compatible = "mediatek,mt7988-xfi-pll"; reg = <0 0x11f40000 0 0x1000>; resets = <&watchdog 16>;
@@ -714,19 +735,129 @@ phy_calibration_p3: calib@97c { }; }; - clock-controller@15000000 { + ethsys: clock-controller@15000000 { compatible = "mediatek,mt7988-ethsys", "syscon"; reg = <0 0x15000000 0 0x1000>; #clock-cells = <1>; #reset-cells = <1>; }; - clock-controller@15031000 { + ethwarp: clock-controller@15031000 { compatible = "mediatek,mt7988-ethwarp"; reg = <0 0x15031000 0 0x1000>; #clock-cells = <1>; #reset-cells = <1>; }; + + eth: ethernet@15100000 { + compatible = "mediatek,mt7988-eth"; + reg = <0 0x15100000 0 0x40000>; + interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "fe0", "fe1", "fe2", "fe3", "pdma0", + "pdma1", "pdma2", "pdma3"; + clocks = <ðsys CLK_ETHDMA_CRYPT0_EN>, + <ðsys CLK_ETHDMA_FE_EN>, + <ðsys CLK_ETHDMA_GP2_EN>, + <ðsys CLK_ETHDMA_GP1_EN>, + <ðsys CLK_ETHDMA_GP3_EN>, + <ðwarp CLK_ETHWARP_WOCPU2_EN>, + <ðwarp CLK_ETHWARP_WOCPU1_EN>, + <ðwarp CLK_ETHWARP_WOCPU0_EN>, + <ðsys CLK_ETHDMA_ESW_EN>, + <&topckgen CLK_TOP_ETH_GMII_SEL>, + <&topckgen CLK_TOP_ETH_REFCK_50M_SEL>, + <&topckgen CLK_TOP_ETH_SYS_200M_SEL>, + <&topckgen CLK_TOP_ETH_SYS_SEL>, + <&topckgen CLK_TOP_ETH_XGMII_SEL>, + <&topckgen CLK_TOP_ETH_MII_SEL>, + <&topckgen CLK_TOP_NETSYS_SEL>, + <&topckgen CLK_TOP_NETSYS_500M_SEL>, + <&topckgen CLK_TOP_NETSYS_PAO_2X_SEL>, + <&topckgen CLK_TOP_NETSYS_SYNC_250M_SEL>, + <&topckgen CLK_TOP_NETSYS_PPEFB_250M_SEL>, + <&topckgen CLK_TOP_NETSYS_WARP_SEL>, + <ðsys CLK_ETHDMA_XGP1_EN>, + <ðsys CLK_ETHDMA_XGP2_EN>, + <ðsys CLK_ETHDMA_XGP3_EN>; + clock-names = "crypto", "fe", "gp2", "gp1", "gp3", + "ethwarp_wocpu2", "ethwarp_wocpu1", + "ethwarp_wocpu0", "esw", "top_eth_gmii_sel", + "top_eth_refck_50m_sel", "top_eth_sys_200m_sel", + "top_eth_sys_sel", "top_eth_xgmii_sel", + "top_eth_mii_sel", "top_netsys_sel", + "top_netsys_500m_sel", "top_netsys_pao_2x_sel", + "top_netsys_sync_250m_sel", + "top_netsys_ppefb_250m_sel", + "top_netsys_warp_sel","xgp1", "xgp2", "xgp3"; + assigned-clocks = <&topckgen CLK_TOP_NETSYS_2X_SEL>, + <&topckgen CLK_TOP_NETSYS_GSW_SEL>, + <&topckgen CLK_TOP_USXGMII_SBUS_0_SEL>, + <&topckgen CLK_TOP_USXGMII_SBUS_1_SEL>, + <&topckgen CLK_TOP_SGM_0_SEL>, + <&topckgen CLK_TOP_SGM_1_SEL>; + assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>, + <&topckgen CLK_TOP_NET1PLL_D4>, + <&topckgen CLK_TOP_NET1PLL_D8_D4>, + <&topckgen CLK_TOP_NET1PLL_D8_D4>, + <&apmixedsys CLK_APMIXED_SGMPLL>, + <&apmixedsys CLK_APMIXED_SGMPLL>; + sram = <ð_sram>; + #address-cells = <1>; + #size-cells = <0>; + mediatek,ethsys = <ðsys>; + mediatek,infracfg = <&topmisc>; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "internal"; + + /* Connected to internal switch */ + fixed-link { + speed = <10000>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + status = "disabled"; + }; + + gmac2: mac@2 { + compatible = "mediatek,eth-mac"; + reg = <2>; + status = "disabled"; + }; + + mdio_bus: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + + /* internal 2.5G PHY */ + int_2p5g_phy: ethernet-phy@15 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <15>; + }; + }; + }; + + eth_sram: sram@15400000 { + compatible = "mmio-sram"; + reg = <0 0x15400000 0 0x200000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x15400000 0 0x200000>; + }; }; thermal-zones {
Signature · 1 line
2.43.0
PATCH v9 12/13 arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Add SFP cages to Bananapi-R4 board. The 2.5g phy variant only contains the wan-SFP, so add this to common dtsi and the lan-sfp only to the dual-SFP variant.
---
v4:
- update 2g5-board (reorder and drop phy-connection-type)
- order sfp properties
v3:
- enable mac with 2.5g phy on r4 phy variant because driver is now mainline
--- .../mediatek/mt7988a-bananapi-bpi-r4-2g5.dts | 11 +++++++++++ .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 19 +++++++++++++++++++ .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 19 +++++++++++++++++++ 3 files changed, 49 insertions(+)
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-2g5.dts +11 -0
@@ -9,3 +9,14 @@ / { model = "Banana Pi BPI-R4 (1x SFP+, 1x 2.5GbE)"; chassis-type = "embedded"; }; + +&gmac1 { + phy = <&int_2p5g_phy>; + phy-mode = "internal"; + status = "okay"; +}; + +&int_2p5g_phy { + pinctrl-0 = <&i2p5gbe_led0_pins>; + pinctrl-names = "i2p5gbe-led"; +};
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts +19 -0
@@ -8,6 +8,25 @@ / { compatible = "bananapi,bpi-r4", "mediatek,mt7988a"; model = "Banana Pi BPI-R4 (2x SFP+)"; chassis-type = "embedded"; + + /* SFP2 cage (LAN) */ + sfp2: sfp2 { + compatible = "sff,sfp"; + i2c-bus = <&i2c_sfp2>; + maximum-power-milliwatt = <3000>; + + los-gpios = <&pio 2 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&pio 83 GPIO_ACTIVE_LOW>; + rate-select0-gpios = <&pio 3 GPIO_ACTIVE_LOW>; + tx-disable-gpios = <&pio 0 GPIO_ACTIVE_HIGH>; + tx-fault-gpios = <&pio 1 GPIO_ACTIVE_HIGH>; + }; +}; + +&gmac1 { + managed = "in-band-status"; + phy-mode = "usxgmii"; + sfp = <&sfp2>; }; &pca9545 {
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +19 -0
@@ -63,6 +63,19 @@ reg_3p3v: regulator-3p3v { regulator-boot-on; regulator-always-on; }; + + /* SFP1 cage (WAN) */ + sfp1: sfp1 { + compatible = "sff,sfp"; + i2c-bus = <&i2c_sfp1>; + maximum-power-milliwatt = <3000>; + + los-gpios = <&pio 54 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&pio 82 GPIO_ACTIVE_LOW>; + rate-select0-gpios = <&pio 21 GPIO_ACTIVE_LOW>; + tx-disable-gpios = <&pio 70 GPIO_ACTIVE_HIGH>; + tx-fault-gpios = <&pio 69 GPIO_ACTIVE_HIGH>; + }; }; &cci {
@@ -133,6 +146,12 @@ map-cpu-active-low { }; }; +&gmac2 { + managed = "in-band-status"; + phy-mode = "usxgmii"; + sfp = <&sfp1>; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>;
Signature · 1 line
2.43.0
PATCH v9 13/13 arm64: dts: mediatek: mt7988a-bpi-r4: configure switch phys and leds
In reply to Frank WunderlichFrom: Frank Wunderlich <[email protected]>
Assign pinctrl to switch phys and leds.
---
v4:
- reorder switch phy(-led) properties
v2:
- add labels and led-function and include after dropping from soc dtsi
--- .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+)
arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi +61 -0
@@ -4,6 +4,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/regulator/richtek,rt5190a-regulator.h> +#include <dt-bindings/leds/common.h> #include "mt7988a.dtsi"
@@ -152,6 +153,66 @@ &gmac2 { sfp = <&sfp1>; }; +&gsw_phy0 { + pinctrl-0 = <&gbe0_led0_pins>; + pinctrl-names = "gbe-led"; +}; + +&gsw_phy0_led0 { + function = LED_FUNCTION_WAN; + color = <LED_COLOR_ID_GREEN>; + status = "okay"; +}; + +&gsw_port0 { + label = "wan"; +}; + +&gsw_phy1 { + pinctrl-0 = <&gbe1_led0_pins>; + pinctrl-names = "gbe-led"; +}; + +&gsw_phy1_led0 { + function = LED_FUNCTION_LAN; + color = <LED_COLOR_ID_GREEN>; + status = "okay"; +}; + +&gsw_port1 { + label = "lan1"; +}; + +&gsw_phy2 { + pinctrl-0 = <&gbe2_led0_pins>; + pinctrl-names = "gbe-led"; +}; + +&gsw_phy2_led0 { + function = LED_FUNCTION_LAN; + color = <LED_COLOR_ID_GREEN>; + status = "okay"; +}; + +&gsw_port2 { + label = "lan2"; +}; + +&gsw_phy3 { + pinctrl-0 = <&gbe3_led0_pins>; + pinctrl-names = "gbe-led"; +}; + +&gsw_phy3_led0 { + function = LED_FUNCTION_LAN; + color = <LED_COLOR_ID_GREEN>; + status = "okay"; +}; + +&gsw_port3 { + label = "lan3"; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>;
Signature · 1 line
2.43.0
Re: [PATCH v9 02/13] dt-bindings: net: mediatek,net: allow up to 8 IRQs
In reply to Frank WunderlichQuoted 12 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
Increase the maximum IRQ count to 8 (4 FE + 4 RSS/LRO).
Frame-engine-IRQs (max 4):
MT7621, MT7628: 1 FE-IRQ
MT7622, MT7623: 3 FE-IRQs (only two used by the driver for now) MT7981, MT7986, MT7988: 4 FE-IRQs (only two used by the driver for now)Mediatek Filogic SoCs (mt798x) have 4 additional IRQs for RSS and/or LRO. So MT798x have 8 IRQs in total.
Quoted 6 lines
MT7981 does not have a ethernet-node yet.
MT7986 Ethernet node is updated with RSS/LRO IRQs in this series. MT7988 Ethernet node is added in this series.Signed-off-by Frank Wunderlich <[email protected]>---
Best regards,
Krzysztof
Re: [PATCH v9 03/13] dt-bindings: net: mediatek,net: allow irq names
In reply to Frank WunderlichQuoted 13 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
In preparation for MT7988 and RSS/LRO allow the interrupt-names property.
In this way driver can request the interrupts by name which is much more readable in the driver code and SoC's dtsi than relying on a specific order.Frame-engine-IRQs (fe0..3):
MT7621, MT7628: 1 FE-IRQ
MT7622, MT7623: 3 FE-IRQs (only two used by the driver for now) MT7981, MT7986: 4 FE-IRQs (only two used by the driver for now)
Quoted 8 lines
RSS/LRO IRQs (pdma0..3) additional only on Filogic (MT798x) with count of 4. So all IRQ-names (8) for Filogic.
Set boundaries for all compatibles same as irq count.
Signed-off-by Frank Wunderlich <[email protected]>Reviewed-by AngeloGioacchino Del Regno <[email protected]>---
Best regards,
Krzysztof
Re: [PATCH v9 04/13] dt-bindings: net: mediatek,net: add sram property
In reply to Frank WunderlichQuoted 4 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
Meditak Filogic SoCs (MT798x) have dedicated MMIO-SRAM for dma operations.
Quoted 8 lines
MT7981 and MT7986 currently use static offset to ethernet MAC register which will be changed in separate patch once this way is accepted.
Add "sram" property to map ethernet controller to dedicated mmio-sram node.
Signed-off-by Frank Wunderlich <[email protected]>Reviewed-by AngeloGioacchino Del Regno <[email protected]>---
Best regards,
Krzysztof
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Wed, 9 Jul 2025 13:09:36 +0200 you wrote:
From: Frank Wunderlich <[email protected]>
This series continues mt7988 devicetree work
- Extend cpu frequency scaling with CCI
- GPIO leds
- Basic network-support (ethernet controller + builtin switch + SFP Cages)[...]
Here is the summary with links:
- [v9,01/13] dt-bindings: net: mediatek,net: update mac subnode pattern for mt7988
https://git.kernel.org/netdev/net-next/c/29712b437339 - [v9,02/13] dt-bindings: net: mediatek,net: allow up to 8 IRQs https://git.kernel.org/netdev/net-next/c/356dea0baf4c - [v9,03/13] dt-bindings: net: mediatek,net: allow irq names https://git.kernel.org/netdev/net-next/c/23ac2a71bdbd - [v9,04/13] dt-bindings: net: mediatek,net: add sram property https://git.kernel.org/netdev/net-next/c/c4582a31efd9 - [v9,05/13] dt-bindings: net: dsa: mediatek,mt7530: add dsa-port definition for mt7988 https://git.kernel.org/netdev/net-next/c/588cb646ce70 - [v9,06/13] dt-bindings: net: dsa: mediatek,mt7530: add internal mdio bus https://git.kernel.org/netdev/net-next/c/66a44adf4c3d
- [v9,07/13] arm64: dts: mediatek: mt7986: add sram node
(no matching commit)
- [v9,08/13] arm64: dts: mediatek: mt7986: add interrupts for RSS and interrupt names (no matching commit)
- [v9,09/13] arm64: dts: mediatek: mt7988: add basic ethernet-nodes
(no matching commit)
- [v9,10/13] arm64: dts: mediatek: mt7988: add switch node
(no matching commit)
- [v9,11/13] arm64: dts: mediatek: mt7988a-bpi-r4: add aliases for ethernet (no matching commit)
- [v9,12/13] arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac (no matching commit)
- [v9,13/13] arm64: dts: mediatek: mt7988a-bpi-r4: configure switch phys and leds (no matching commit)
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Am 11. Juli 2025 00:10:22 MESZ schrieb [email protected]:
Quoted 44 lines
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Wed, 9 Jul 2025 13:09:36 +0200 you wrote:
From: Frank Wunderlich <[email protected]>
This series continues mt7988 devicetree work
- Extend cpu frequency scaling with CCI
- GPIO leds
- Basic network-support (ethernet controller + builtin switch + SFP Cages)[...]
Here is the summary with links:
- [v9,01/13] dt-bindings: net: mediatek,net: update mac subnode pattern for mt7988
https://git.kernel.org/netdev/net-next/c/29712b437339
- [v9,02/13] dt-bindings: net: mediatek,net: allow up to 8 IRQs
https://git.kernel.org/netdev/net-next/c/356dea0baf4c
- [v9,03/13] dt-bindings: net: mediatek,net: allow irq names
https://git.kernel.org/netdev/net-next/c/23ac2a71bdbd
- [v9,04/13] dt-bindings: net: mediatek,net: add sram property
https://git.kernel.org/netdev/net-next/c/c4582a31efd9
- [v9,05/13] dt-bindings: net: dsa: mediatek,mt7530: add dsa-port definition for mt7988
https://git.kernel.org/netdev/net-next/c/588cb646ce70
- [v9,06/13] dt-bindings: net: dsa: mediatek,mt7530: add internal mdio bus
https://git.kernel.org/netdev/net-next/c/66a44adf4c3d
- [v9,07/13] arm64: dts: mediatek: mt7986: add sram node
(no matching commit)
- [v9,08/13] arm64: dts: mediatek: mt7986: add interrupts for RSS and interrupt names (no matching commit)
- [v9,09/13] arm64: dts: mediatek: mt7988: add basic ethernet-nodes
(no matching commit)
- [v9,10/13] arm64: dts: mediatek: mt7988: add switch node
(no matching commit)
- [v9,11/13] arm64: dts: mediatek: mt7988a-bpi-r4: add aliases for ethernet (no matching commit)
- [v9,12/13] arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac (no matching commit)
- [v9,13/13] arm64: dts: mediatek: mt7988a-bpi-r4: configure switch phys and leds (no matching commit)
Quoted 1 line
You are awesome, thank you!
Hi
Any comments on the missing DTS parts or can they applied too? regards Frank
Jakub Kicinski
maintainerQuoted 1 line · On Sat, 16 Aug 2025 08:55:51 +0200 Frank Wunderlich wrote:
Any comments on the missing DTS parts or can they applied too?
You should probably put the maintainers you're addressing this question to in the To: header of the email.
Am 16. August 2025 08:55:51 MESZ schrieb Frank Wunderlich <[email protected]>:
Quoted 45 lines
Am 11. Juli 2025 00:10:22 MESZ schrieb [email protected]:
Quoted 44 lines
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Wed, 9 Jul 2025 13:09:36 +0200 you wrote:
From: Frank Wunderlich <[email protected]>
This series continues mt7988 devicetree work
- Extend cpu frequency scaling with CCI
- GPIO leds
- Basic network-support (ethernet controller + builtin switch + SFP Cages)[...]
Here is the summary with links:
- [v9,01/13] dt-bindings: net: mediatek,net: update mac subnode pattern for mt7988
https://git.kernel.org/netdev/net-next/c/29712b437339
- [v9,02/13] dt-bindings: net: mediatek,net: allow up to 8 IRQs
https://git.kernel.org/netdev/net-next/c/356dea0baf4c
- [v9,03/13] dt-bindings: net: mediatek,net: allow irq names
https://git.kernel.org/netdev/net-next/c/23ac2a71bdbd
- [v9,04/13] dt-bindings: net: mediatek,net: add sram property
https://git.kernel.org/netdev/net-next/c/c4582a31efd9
- [v9,05/13] dt-bindings: net: dsa: mediatek,mt7530: add dsa-port definition for mt7988
https://git.kernel.org/netdev/net-next/c/588cb646ce70
- [v9,06/13] dt-bindings: net: dsa: mediatek,mt7530: add internal mdio bus
https://git.kernel.org/netdev/net-next/c/66a44adf4c3d
- [v9,07/13] arm64: dts: mediatek: mt7986: add sram node
(no matching commit)
- [v9,08/13] arm64: dts: mediatek: mt7986: add interrupts for RSS and interrupt names (no matching commit)
- [v9,09/13] arm64: dts: mediatek: mt7988: add basic ethernet-nodes
(no matching commit)
- [v9,10/13] arm64: dts: mediatek: mt7988: add switch node
(no matching commit)
- [v9,11/13] arm64: dts: mediatek: mt7988a-bpi-r4: add aliases for ethernet (no matching commit)
- [v9,12/13] arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac (no matching commit)
- [v9,13/13] arm64: dts: mediatek: mt7988a-bpi-r4: configure switch phys and leds (no matching commit)
Quoted 6 lines
Quoted 1 line
You are awesome, thank you!
Hi
Any comments on the missing DTS parts or can they applied too? regards Frank
Hi
Moved mtk maintainers in TO header.
regards Frank
Matthias Brugger
maintainerQueued patches 7 - 13
Thanks!
Quoted 136 lines · Frank Wunderlich
From: Frank Wunderlich <[email protected]>
This series continues mt7988 devicetree work
- Extend cpu frequency scaling with CCI
- GPIO leds
- Basic network-support (ethernet controller + builtin switch + SFP Cages)depencies (i hope this list is complete and latest patches/series linked):
support interrupt-names is optional again as i re-added the reserved IRQs (they are not unusable as i thought and can allow features in future)
https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/needs change in mtk ethernet driver for the sram to be read from separate node:
https://patchwork.kernel.org/project/netdevbpf/patch/c2b9242229d06af4e468204bcf42daa1535c3a72.1751461762.git.daniel@makrotopia.org/for SFP-Function (macs currently disabled):
PCS clearance which is a 1.5 year discussion currently ongoing
Daniel asked netdev for a way 2 go:
https://lore.kernel.org/netdev/[email protected]/e.g. something like this (one of):
* https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/ (v6)
* https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/ (v4)
* https://patchwork.kernel.org/project/netdevbpf/patch/ba4e359584a6b3bc4b3470822c42186d5b0856f9.1721910728.git.daniel@makrotopia.org/full usxgmii driver:
https://patchwork.kernel.org/project/netdevbpf/patch/07845ec900ba41ff992875dce12c622277592c32.1702352117.git.daniel@makrotopia.org/first PCS-discussion is here:
https://patchwork.kernel.org/project/netdevbpf/patch/8aa905080bdb6760875d62cb3b2b41258837f80e.1702352117.git.daniel@makrotopia.org/
some more here:
https://lore.kernel.org/netdev/[email protected]/and then dts nodes for sgmiisys+usxgmii+2g5 firmware
when above depencies are solved the mac1/2 can be enabled and 2.5G phy/SFP slots will work.
changes:
v9:
- dropped patches already applied (cci,gpio-leds,unused pins)
- added patches to add RSS IRQs, IRQ-names and sram-node for mt7986
note: mt7981 does not have a ethernet node yet
- set minItems for Filogic (MT798x) IRQs/Names to 8 needed to update MT7986 binding example because of this
- add sram:false to non-Filogic SoCsv8:
- splitted binding into irq-count and irq-names and updated description
- fixed typo in mt7621 section "interrupt-namess"
- splitted binding changes into fixes (mac) and additions (sram)
- dropped change of reg (simple count to description)
- change ethernet register size to0x40000v7:
- fixed rebasing error while splitting dt-binding patchv6:
binding:
- split out the interrupt-names into separate patch
- update irq(name) min count to 4
- move interrupt-names up
- add sram-property
- drop second reg entry and minitems as there is only 1 item leftdts:
- fix whitespace-errors for pdma irqs (spaces vs. tabs)
- move sram from eth reg to own sram node (needsCONFIG_SRAM)v5:
- add reserved irqs and change names
- update binding for 8 irqs with different names (rx,tx => fe1+fe2, rx-ringX => pdmaX) (dropped Robs RB due to this change again, sorry)v4:
net-binding:
- allow interrupt names and increase max interrupts to 6 because of RSS/LRO interrupts (dropped Robs RB due to this change)dts-patches:
- add interrupts for RSS/LRO and interrupt-names for ethernet node
- eth-reg and clock whitespace-fix
- comment for fixed-link on gmac0
- drop phy-mode properties as suggested by andrew
- drop phy-connection-type on 2g5 board
- reorder some properties
- update 2g5 phy node
- unit-name dec instead of hex to match reg property
- move compatible before reg
- drop phy-modev3:
- dropped patches already applied (SPI+thermal)
- added soc specific cci compatible (new binding patch + changed dts)
- enable 2g5 phy because driver is now merged
- add patch for cleaning up unnecessary pins
- add patch for gpio-leds
- add patch for adding ethernet aliasesv2:
- change reg to list of items in eth binding
- changed mt7530 binding:
- unevaluatedProperties=false
- mediatek,pio subproperty
- from patternProperty to property
- board specific properties like led function and labels moved to bpi-r4 dtsiFrank Wunderlich (13):
dt-bindings: net: mediatek,net: update mac subnode pattern for mt7988
dt-bindings: net: mediatek,net: allow up to 8 IRQs
dt-bindings: net: mediatek,net: allow irq names
dt-bindings: net: mediatek,net: add sram property
dt-bindings: net: dsa: mediatek,mt7530: add dsa-port definition formt7988dt-bindings: net: dsa: mediatek,mt7530: add internal mdio bus
arm64: dts: mediatek: mt7986: add sram node
arm64: dts: mediatek: mt7986: add interrupts for RSS and interrupt
names
arm64: dts: mediatek: mt7988: add basic ethernet-nodes
arm64: dts: mediatek: mt7988: add switch node
arm64: dts: mediatek: mt7988a-bpi-r4: add aliases for ethernet
arm64: dts: mediatek: mt7988a-bpi-r4: add sfp cages and link to gmac
arm64: dts: mediatek: mt7988a-bpi-r4: configure switch phys and leds.../bindings/net/dsa/mediatek,mt7530.yaml | 24 +- .../devicetree/bindings/net/mediatek,net.yaml | 64 +++- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 20 +- .../mediatek/mt7988a-bananapi-bpi-r4-2g5.dts | 11 + .../dts/mediatek/mt7988a-bananapi-bpi-r4.dts | 19 ++ .../dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 86 ++++++ arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 285 +++++++++++++++++- 7 files changed, 497 insertions(+), 12 deletions(-)