mtk: wed: move cpuboot, ilm and dlm in dedicated dts nodes
Subsystems (5)
Lorenzo Bianconi
maintainercover mtk: wed: move cpuboot, ilm and dlm in dedicated dts nodes
Since cpuboot, ilm and dlm memory region are not part of MT7986 SoC RAM, move them in dedicated mt7986a syscon dts nodes.
This series helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes. At the same time we keep backward-compatibility with older dts version where cpuboot, ilm and dlm were defined as reserved-memory child nodes.
Lorenzo Bianconi (10):
net: ethernet: mtk_wed: rename mtk_wed_get_memory_region in
mtk_wed_get_reserved_memory_region
net: ethernet: mtk_wed: move cpuboot in a dedicated dts node
dt-bindings: soc: mediatek: move cpuboot in a dedicated dts node
arm64: dts: mt7986: move cpuboot in a dedicated node
net: ethernet: mtk_wed: move ilm a dedicated dts node
dt-bindings: soc: mediatek: move ilm in a dedicated dts node
arm64: dts: mt7986: move ilm in a dedicated node
net: ethernet: mtk_wed: move dlm a dedicated dts node
dt-bindings: soc: mediatek: move dlm in a dedicated dts node
arm64: dts: mt7986: move dlm in a dedicated node
.../arm/mediatek/mediatek,mt7622-wed.yaml | 30 ++++--- .../mediatek/mediatek,mt7986-wo-cpuboot.yaml | 45 ++++++++++ .../soc/mediatek/mediatek,mt7986-wo-dlm.yaml | 46 ++++++++++ .../soc/mediatek/mediatek,mt7986-wo-ilm.yaml | 45 ++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 69 +++++++------- drivers/net/ethernet/mediatek/mtk_wed.c | 19 ++++ drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 89 ++++++++++++++++--- drivers/net/ethernet/mediatek/mtk_wed_wo.h | 3 +- 8 files changed, 289 insertions(+), 57 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-cpuboot.yaml create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-dlm.yaml create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml
Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerPATCH 1/10 net: ethernet: mtk_wed: rename mtk_wed_get_memory_region in mtk_wed_get_reserved_memory_region
This is a preliminary patch to move wed ilm/dlm and cpuboot properties in dedicated dts nodes.
--- drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/mediatek/mtk_wed_mcu.c +4 -4
@@ -215,8 +215,8 @@ int mtk_wed_mcu_msg_update(struct mtk_wed_device *dev, int id, void *data, }static int -mtk_wed_get_memory_region (struct mtk_wed_wo *wo, -struct mtk_wed_wo_memory_region *region) +mtk_wed_get_reserved_memory_region (struct mtk_wed_wo *wo, +struct mtk_wed_wo_memory_region *region) {struct reserved_mem *rmem;struct device_node *np;
@@ -311,13 +311,13 @@ mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)/* load firmware region metadata */ for (i =0 ; i <ARRAY_SIZE (mem_region); i++) { - ret =mtk_wed_get_memory_region (wo, &mem_region[i]); + ret =mtk_wed_get_reserved_memory_region (wo, &mem_region[i]);if (ret)return ret; } wo->boot.name ="wo-boot" ; - ret =mtk_wed_get_memory_region (wo, &wo->boot); + ret =mtk_wed_get_reserved_memory_region (wo, &wo->boot);if (ret)return ret;
Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerPATCH 2/10 net: ethernet: mtk_wed: move cpuboot in a dedicated dts node
In reply to Lorenzo BianconiSince the cpuboot memory region is not part of the RAM SoC, move cpuboot in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
Keep backward-compatibility with older dts version where cpuboot was defined as reserved-memory child node.
--- drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 34 +++++++++++++++++---- drivers/net/ethernet/mediatek/mtk_wed_wo.h | 3 +- 2 files changed, 30 insertions(+), 7 deletions(-)
drivers/net/ethernet/mediatek/mtk_wed_mcu.c +28 -6
@@ -18,12 +18,23 @@static u32 wo_r32 (struct mtk_wed_wo *wo,u32 reg) { -return readl (wo->boot.addr + reg); +u32 val; + +if (!wo->boot_regmap) +return readl (wo->boot.addr + reg); + +if (regmap_read (wo->boot_regmap, reg, &val)) + val = ~0 ; + +return val; }static void wo_w32 (struct mtk_wed_wo *wo,u32 reg,u32 val) { -writel (val, wo->boot.addr + reg); +if (wo->boot_regmap) +regmap_write (wo->boot_regmap, reg, val); +else +writel (val, wo->boot.addr + reg); } static struct sk_buff *
@@ -316,10 +327,21 @@ mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)return ret; } - wo->boot.name ="wo-boot" ; - ret =mtk_wed_get_reserved_memory_region (wo, &wo->boot); -if (ret) -return ret; + wo->boot_regmap =syscon_regmap_lookup_by_phandle (wo->hw->node, +"mediatek,wo-cpuboot" ); +if (IS_ERR (wo->boot_regmap)) { +if (wo->boot_regmap !=ERR_PTR (-ENODEV )) +return PTR_ERR (wo->boot_regmap); + +/* For backward compatibility, we need to check if cpu_boot +* is defined through reserved memory property. +*/ + wo->boot_regmap =NULL ; + wo->boot.name ="wo-boot" ; + ret =mtk_wed_get_reserved_memory_region (wo, &wo->boot); +if (ret) +return ret; + }/* set dummy cr */ wed_w32(wo->hw->wed_dev, MTK_WED_SCR0 + 4 * MTK_WED_DUMMY_CR_FWDL,
drivers/net/ethernet/mediatek/mtk_wed_wo.h +2 -1
@@ -227,7 +227,8 @@ struct mtk_wed_wo_queue {struct mtk_wed_wo {struct mtk_wed_hw *hw; -struct mtk_wed_wo_memory_region boot; +struct mtk_wed_wo_memory_region boot;/* backward compatibility */ +struct regmap *boot_regmap;struct mtk_wed_wo_queue q_tx;struct mtk_wed_wo_queue q_rx;
Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerPATCH 3/10 dt-bindings: soc: mediatek: move cpuboot in a dedicated dts node
In reply to Lorenzo BianconiSince the cpuboot memory region is not part of the RAM SoC, move cpuboot in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
--- .../arm/mediatek/mediatek,mt7622-wed.yaml | 12 +++-- .../mediatek/mediatek,mt7986-wo-cpuboot.yaml | 45 +++++++++++++++++++ 2 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-cpuboot.yaml
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml +8 -4
@@ -35,7 +35,6 @@ properties: - description: firmware ILM region - description: firmware DLM region - description: firmware CPU DATA region - - description: firmware BOOT region memory-region-names: items:
@@ -43,12 +42,15 @@ properties: - const: wo-ilm - const: wo-dlm - const: wo-data - - const: wo-boot mediatek,wo-ccif: $ref: /schemas/types.yaml#/definitions/phandle description: mediatek wed-wo controller interface. + mediatek,wo-cpuboot: + $ref: /schemas/types.yaml#/definitions/phandle + description: mediatek wed-wo cpuboot controller interface. + allOf: - if: properties:
@@ -60,6 +62,7 @@ allOf: memory-region-names: false memory-region: false mediatek,wo-ccif: false + mediatek,wo-cpuboot: false required: - compatible
@@ -95,9 +98,10 @@ examples: interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; memory-region = <&wo_emi>, <&wo_ilm>, <&wo_dlm>, - <&wo_data>, <&wo_boot>; + <&wo_data>; memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data", "wo-boot"; + "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; + mediatek,wo-cpuboot = <&wo_cpuboot>; }; };
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-cpuboot.yaml new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerPATCH 4/10 arm64: dts: mt7986: move cpuboot in a dedicated node
In reply to Lorenzo BianconiSince the cpuboot memory region is not part of the RAM SoC, move cpuboot in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +11 -10
@@ -113,12 +113,6 @@ wo_dlm1: wo-dlm@151f8000 { reg = <0 0x151f8000 0 0x2000>; no-map; }; - - wo_boot: wo-boot@15194000 { - reg = <0 0x15194000 0 0x1000>; - no-map; - }; - }; timer {
@@ -461,10 +455,11 @@ wed0: wed@15010000 { interrupt-parent = <&gic>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, - <&wo_data>, <&wo_boot>; + <&wo_data>; memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data", "wo-boot"; + "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; + mediatek,wo-cpuboot = <&wo_cpuboot>; }; wed1: wed@15011000 {
@@ -474,10 +469,11 @@ wed1: wed@15011000 { interrupt-parent = <&gic>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, - <&wo_data>, <&wo_boot>; + <&wo_data>; memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data", "wo-boot"; + "wo-data"; mediatek,wo-ccif = <&wo_ccif1>; + mediatek,wo-cpuboot = <&wo_cpuboot>; }; wo_ccif0: syscon@151a5000 {
@@ -494,6 +490,11 @@ wo_ccif1: syscon@151ad000 { interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; }; + wo_cpuboot: syscon@15194000 { + compatible = "mediatek,mt7986-wo-cpuboot", "syscon"; + reg = <0 0x15194000 0 0x1000>; + }; + eth: ethernet@15100000 { compatible = "mediatek,mt7986-eth"; reg = <0 0x15100000 0 0x80000>;
Signature · 1 line
2.39.2
Re: [PATCH net-next 04/10] arm64: dts: mt7986: move cpuboot in a dedicated node
Quoted 7 lines · Lorenzo Bianconi
Since the cpuboot memory region is not part of the RAM SoC, move cpuboot in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.Signed-off-by Lorenzo Bianconi <[email protected]>
Quoted 61 lines
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)arch/arm64/boot/dts/mediatek/mt7986a.dtsi +11
-10@@ -113,12 +113,6 @@ wo_dlm1: wo-dlm@151f8000 { reg = <0 0x151f8000 0 0x2000>; no-map; }; - - wo_boot: wo-boot@15194000 { - reg = <0 0x15194000 0 0x1000>; - no-map; - }; - }; timer {@@ -461,10 +455,11 @@ wed0: wed@15010000 { interrupt-parent = <&gic>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, - <&wo_data>, <&wo_boot>; + <&wo_data>; memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data", "wo-boot"; + "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; + mediatek,wo-cpuboot = <&wo_cpuboot>; }; wed1: wed@15011000 {@@ -474,10 +469,11 @@ wed1: wed@15011000 { interrupt-parent = <&gic>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, - <&wo_data>, <&wo_boot>; + <&wo_data>; memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data", "wo-boot"; + "wo-data"; mediatek,wo-ccif = <&wo_ccif1>; + mediatek,wo-cpuboot = <&wo_cpuboot>; }; wo_ccif0: syscon@151a5000 {@@ -494,6 +490,11 @@ wo_ccif1: syscon@151ad000 { interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; }; + wo_cpuboot: syscon@15194000 { + compatible = "mediatek,mt7986-wo-cpuboot", "syscon"; + reg = <0 0x15194000 0 0x1000>; + }; + eth: ethernet@15100000 { compatible = "mediatek,mt7986-eth"; reg = <0 0x15100000 0 0x80000>;
Lorenzo Bianconi
maintainerPATCH 5/10 net: ethernet: mtk_wed: move ilm a dedicated dts node
In reply to Lorenzo BianconiSince the ilm memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
Keep backward-compatibility with older dts version where ilm was defined as reserved-memory child node.
--- drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 55 ++++++++++++++++++--- 1 file changed, 49 insertions(+), 6 deletions(-)
drivers/net/ethernet/mediatek/mtk_wed_mcu.c +49 -6
@@ -299,6 +299,52 @@ mtk_wed_mcu_run_firmware(struct mtk_wed_wo *wo, const struct firmware *fw,return -EINVAL ; } +static int +mtk_wed_mcu_load_memory_regions (struct mtk_wed_wo *wo, +struct mtk_wed_wo_memory_region *region) +{ +struct device_node *np; +int ret; + +/* firmware EMI memory region */ + ret =mtk_wed_get_reserved_memory_region (wo, + ®ion[MTK_WED_WO_REGION_EMI ]); +if (ret) +return ret; + +/* firmware DATA memory region */ + ret =mtk_wed_get_reserved_memory_region (wo, + ®ion[MTK_WED_WO_REGION_DATA ]); +if (ret) +return ret; + + np =of_parse_phandle (wo->hw->node,"mediatek,wo-ilm" ,0 ); +if (np) { +struct mtk_wed_wo_memory_region *ilm_region; +struct resource res; + + ret =of_address_to_resource (np,0 , &res); +of_node_put (np); + +if (ret <0 ) +return ret; + + ilm_region = ®ion[MTK_WED_WO_REGION_ILM ]; + ilm_region->phy_addr = res.start; + ilm_region->size =resource_size (&res); + ilm_region->addr =devm_ioremap (wo->hw->dev, ilm_region->phy_addr, + ilm_region->size); + +return ilm_region->addr ?0 : -ENOMEM ; + } + +/* For backward compatibility, we need to check if ILM +* node is defined through reserved memory property. +*/ +return mtk_wed_get_reserved_memory_region (wo, + ®ion[MTK_WED_WO_REGION_ILM ]); +} +static int mtk_wed_mcu_load_firmware (struct mtk_wed_wo *wo) {
@@ -320,12 +366,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)u32 val, boot_cr;int ret, i; -/* load firmware region metadata */ -for (i =0 ; i <ARRAY_SIZE (mem_region); i++) { - ret =mtk_wed_get_reserved_memory_region (wo, &mem_region[i]); -if (ret) -return ret; - } + ret =mtk_wed_mcu_load_memory_regions (wo, mem_region); +if (ret) +return ret; wo->boot_regmap =syscon_regmap_lookup_by_phandle (wo->hw->node,"mediatek,wo-cpuboot" );
Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerPATCH 6/10 dt-bindings: soc: mediatek: move ilm in a dedicated dts node
In reply to Lorenzo BianconiSince the cpuboot memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
--- .../arm/mediatek/mediatek,mt7622-wed.yaml | 14 +++--- .../soc/mediatek/mediatek,mt7986-wo-ilm.yaml | 45 +++++++++++++++++++ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml +8 -6
@@ -32,14 +32,12 @@ properties: memory-region: items: - description: firmware EMI region - - description: firmware ILM region - description: firmware DLM region - description: firmware CPU DATA region memory-region-names: items: - const: wo-emi - - const: wo-ilm - const: wo-dlm - const: wo-data
@@ -51,6 +49,10 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: mediatek wed-wo cpuboot controller interface. + mediatek,wo-ilm: + $ref: /schemas/types.yaml#/definitions/phandle + description: mediatek wed-wo ilm interface. + allOf: - if: properties:
@@ -63,6 +65,7 @@ allOf: memory-region: false mediatek,wo-ccif: false mediatek,wo-cpuboot: false + mediatek,wo-ilm: false required: - compatible
@@ -97,11 +100,10 @@ examples: reg = <0 0x15010000 0 0x1000>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi>, <&wo_ilm>, <&wo_dlm>, - <&wo_data>; - memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data"; + memory-region = <&wo_emi>, <&wo_dlm>, &wo_data>; + memory-region-names = "wo-emi", "wo-dlm", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; mediatek,wo-cpuboot = <&wo_cpuboot>; + mediatek,wo-ilm = <&wo_ilm>; }; };
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
2.39.2
Rob Herring
maintainerRe: [PATCH net-next 06/10] dt-bindings: soc: mediatek: move ilm in a dedicated dts node
Quoted 6 lines · Lorenzo Bianconi
Since the cpuboot memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
Quoted 7 lines
Signed-off-by Lorenzo Bianconi <[email protected]>--- .../arm/mediatek/mediatek,mt7622-wed.yaml | 14 +++--- .../soc/mediatek/mediatek,mt7986-wo-ilm.yaml | 45 +++++++++++++++++++ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.example.dts:63.59-60 syntax error FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1512: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Lorenzo Bianconi
maintainerRe: [PATCH net-next 06/10] dt-bindings: soc: mediatek: move ilm in a dedicated dts node
Quoted 19 lines · Lorenzo Bianconi
Quoted 6 lines
Since the cpuboot memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.Quoted 7 lines
Signed-off-by Lorenzo Bianconi <[email protected]>--- .../arm/mediatek/mediatek,mt7622-wed.yaml | 14 +++--- .../soc/mediatek/mediatek,mt7986-wo-ilm.yaml | 45 +++++++++++++++++++ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yamlMy bot found errors running 'make DT_CHECKER_FLAGS=-m
dt_binding_check' on your patch (DT_CHECKER_FLAGSis new in v5.13):
Quoted 8 lines
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.example.dts:63.59-60 syntax error FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:419:Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1512:dt_binding_check] Error 2
Hi Rob,
I think it is just a typo in a patch in the middle of the series that I fixed in the latest one (before posting I compiled the dts schema with the full series applied and not incrementally). I will fix it in v2. Thanks.
Regards,
Lorenzo
Quoted 18 lines
doc reference errors (make refcheckdocs):
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make
dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that
DT_SCHEMA_FILEScan be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Rob Herring
maintainerRe: [PATCH net-next 06/10] dt-bindings: soc: mediatek: move ilm in a dedicated dts node
In reply to Lorenzo BianconiQuoted 5 lines · Lorenzo Bianconi
Since the cpuboot memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
Maybe, but breaks the ABI. It also looks like a step backwards. Fix your u-boot.
Quoted 67 lines
Signed-off-by Lorenzo Bianconi <[email protected]>--- .../arm/mediatek/mediatek,mt7622-wed.yaml | 14 +++--- .../soc/mediatek/mediatek,mt7986-wo-ilm.yaml | 45 +++++++++++++++++++ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yamlDocumentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml +8
-6@@ -32,14 +32,12 @@ properties: memory-region: items: - description: firmware EMI region - - description: firmware ILM region - description: firmware DLM region - description: firmware CPU DATA region memory-region-names: items: - const: wo-emi - - const: wo-ilm - const: wo-dlm - const: wo-data@@ -51,6 +49,10 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: mediatek wed-wo cpuboot controller interface. + mediatek,wo-ilm: + $ref: /schemas/types.yaml#/definitions/phandle + description: mediatek wed-wo ilm interface. + allOf: - if: properties:@@ -63,6 +65,7 @@ allOf: memory-region: false mediatek,wo-ccif: false mediatek,wo-cpuboot: false + mediatek,wo-ilm: false required: - compatible@@ -97,11 +100,10 @@ examples: reg = <0 0x15010000 0 0x1000>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi>, <&wo_ilm>, <&wo_dlm>, - <&wo_data>; - memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data"; + memory-region = <&wo_emi>, <&wo_dlm>, &wo_data>; + memory-region-names = "wo-emi", "wo-dlm", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; mediatek,wo-cpuboot = <&wo_cpuboot>; + mediatek,wo-ilm = <&wo_ilm>; }; };Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +0
-0
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +7
-0@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mt7986-wo-ilm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek Wireless Ethernet Dispatch (WED) WO ILM firmware interface for MT7986
Either this region is some memory or it's a device. Sounds like the former and this is not a 'syscon'.
Quoted 41 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +38
-0+ +maintainers: + - Lorenzo Bianconi <[email protected]> + - Felix Fietkau <[email protected]> + +description: + The MediaTek wo-ilm (Information Lifecycle Management) provides a configuration + interface for WiFi critical data used by WED WO firmware. WED WO controller is + used to perform offload rx packet processing (e.g. 802.11 aggregation packet + reordering or rx header translation) on MT7986 soc. + +properties: + compatible: + items: + - enum: + - mediatek,mt7986-wo-ilm + - const: syscon + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + syscon@151e0000 { + compatible = "mediatek,mt7986-wo-ilm", "syscon"; + reg = <0 0x151e0000 0 0x8000>; + }; + };Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerRe: [PATCH net-next 06/10] dt-bindings: soc: mediatek: move ilm in a dedicated dts node
Quoted 9 lines · Lorenzo Bianconi
Quoted 5 lines
Since the cpuboot memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.Maybe, but breaks the ABI. It also looks like a step backwards. Fix your u-boot.
Can you please give some more details about ABI breakage? mtk_wed driver is supposed to be backward compatible with respect to the older dts description (please take a look to patch 5/10 and 8/10).
Quoted 70 lines
Quoted 70 lines
Signed-off-by Lorenzo Bianconi <[email protected]>--- .../arm/mediatek/mediatek,mt7622-wed.yaml | 14 +++--- .../soc/mediatek/mediatek,mt7986-wo-ilm.yaml | 45 +++++++++++++++++++ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yamlDocumentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml +8
-6@@ -32,14 +32,12 @@ properties: memory-region: items: - description: firmware EMI region - - description: firmware ILM region - description: firmware DLM region - description: firmware CPU DATA region memory-region-names: items: - const: wo-emi - - const: wo-ilm - const: wo-dlm - const: wo-data@@ -51,6 +49,10 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: mediatek wed-wo cpuboot controller interface. + mediatek,wo-ilm: + $ref: /schemas/types.yaml#/definitions/phandle + description: mediatek wed-wo ilm interface. + allOf: - if: properties:@@ -63,6 +65,7 @@ allOf: memory-region: false mediatek,wo-ccif: false mediatek,wo-cpuboot: false + mediatek,wo-ilm: false required: - compatible@@ -97,11 +100,10 @@ examples: reg = <0 0x15010000 0 0x1000>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi>, <&wo_ilm>, <&wo_dlm>, - <&wo_data>; - memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data"; + memory-region = <&wo_emi>, <&wo_dlm>, &wo_data>; + memory-region-names = "wo-emi", "wo-dlm", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; mediatek,wo-cpuboot = <&wo_cpuboot>; + mediatek,wo-ilm = <&wo_ilm>; }; };Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +2
-0@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2
Quoted 8 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml line 7
Quoted 5 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +5
-0+--- +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mt7986-wo-ilm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek Wireless Ethernet Dispatch (WED) WO ILM firmware interface for MT7986Either this region is some memory or it's a device. Sounds like the former and this is not a 'syscon'.
ILM and DLM are mmio regions used to store Wireless Ethernet Dispatch firmware sections.
AFAIU reserved-memory nodes are supposed to be used just for RAM areas, correct? What do you think would be the best dts node type for ILM and DLM?
Another possibility I was discussing with Felix is to move ILM and DLM definitions in WED node reg section, something like:
wed0: wed@15010000 {
compatible = "mediatek,mt7986-wed";
reg = <0 0x15010000 0 0x1000>,
<0 0x151e0000 0 0x8000>,
<0 0x151e8000 0 0x2000>;
...
};Doing so we need to get rid of syscon in WED compatible string, right? Is it acceptable?
Regards,
Lorenzo
Quoted 42 lines
Quoted 42 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +38
-0+ +maintainers: + - Lorenzo Bianconi <[email protected]> + - Felix Fietkau <[email protected]> + +description: + The MediaTek wo-ilm (Information Lifecycle Management) provides a configuration + interface for WiFi critical data used by WED WO firmware. WED WO controller is + used to perform offload rx packet processing (e.g. 802.11 aggregation packet + reordering or rx header translation) on MT7986 soc. + +properties: + compatible: + items: + - enum: + - mediatek,mt7986-wo-ilm + - const: syscon + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + syscon@151e0000 { + compatible = "mediatek,mt7986-wo-ilm", "syscon"; + reg = <0 0x151e0000 0 0x8000>; + }; + };Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerRe: [PATCH net-next 06/10] dt-bindings: soc: mediatek: move ilm in a dedicated dts node
Quoted 109 lines
Quoted 9 lines · Lorenzo Bianconi
Quoted 5 lines
Since the cpuboot memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.Maybe, but breaks the ABI. It also looks like a step backwards. Fix your u-boot.
Can you please give some more details about ABI breakage?
mtk_weddriver is supposed to be backward compatible with respect to the older dts description (please take a look to patch 5/10 and 8/10).Quoted 70 lines
Quoted 70 lines
Signed-off-by Lorenzo Bianconi <[email protected]>--- .../arm/mediatek/mediatek,mt7622-wed.yaml | 14 +++--- .../soc/mediatek/mediatek,mt7986-wo-ilm.yaml | 45 +++++++++++++++++++ 2 files changed, 53 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yamlDocumentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml +8
-6@@ -32,14 +32,12 @@ properties: memory-region: items: - description: firmware EMI region - - description: firmware ILM region - description: firmware DLM region - description: firmware CPU DATA region memory-region-names: items: - const: wo-emi - - const: wo-ilm - const: wo-dlm - const: wo-data@@ -51,6 +49,10 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: mediatek wed-wo cpuboot controller interface. + mediatek,wo-ilm: + $ref: /schemas/types.yaml#/definitions/phandle + description: mediatek wed-wo ilm interface. + allOf: - if: properties:@@ -63,6 +65,7 @@ allOf: memory-region: false mediatek,wo-ccif: false mediatek,wo-cpuboot: false + mediatek,wo-ilm: false required: - compatible@@ -97,11 +100,10 @@ examples: reg = <0 0x15010000 0 0x1000>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi>, <&wo_ilm>, <&wo_dlm>, - <&wo_data>; - memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data"; + memory-region = <&wo_emi>, <&wo_dlm>, &wo_data>; + memory-region-names = "wo-emi", "wo-dlm", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; mediatek,wo-cpuboot = <&wo_cpuboot>; + mediatek,wo-ilm = <&wo_ilm>; }; };Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +2
-0@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2Quoted 8 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml line 7
Quoted 5 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +5
-0+--- +$id: http://devicetree.org/schemas/soc/mediatek/mediatek,mt7986-wo-ilm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek Wireless Ethernet Dispatch (WED) WO ILM firmware interface for MT7986Either this region is some memory or it's a device. Sounds like the former and this is not a 'syscon'.
ILM and DLM are mmio regions used to store Wireless Ethernet Dispatch firmware sections.
AFAIU reserved-memory nodes are supposed to be used just for RAM areas, correct? What do you think would be the best dts node type for ILM and DLM?Another possibility I was discussing with Felix is to move ILM and DLM definitions in WED node reg section, something like:
wed0: wed@15010000 { compatible = "mediatek,mt7986-wed"; reg = <0 0x15010000 0 0x1000>, <0 0x151e0000 0 0x8000>, <0 0x151e8000 0 0x2000>; ... };
Quoted 4 lines
Doing so we need to get rid of syscon in WED compatible string, right? Is it acceptable?
Regards,
Lorenzo
Hi Rob,
do you have any more input about this? Is it fine to just use syscon for ILM/DLM dts nodes or do you prefer to rework WED node in order to have ILM/DLM regs info into it?
Regards,
Lorenzo
Quoted 43 lines
Quoted 43 lines
Quoted 43 lines
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-ilm.yaml new file +38
-0+ +maintainers: + - Lorenzo Bianconi <[email protected]> + - Felix Fietkau <[email protected]> + +description: + The MediaTek wo-ilm (Information Lifecycle Management) provides a configuration + interface for WiFi critical data used by WED WO firmware. WED WO controller is + used to perform offload rx packet processing (e.g. 802.11 aggregation packet + reordering or rx header translation) on MT7986 soc. + +properties: + compatible: + items: + - enum: + - mediatek,mt7986-wo-ilm + - const: syscon + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + syscon@151e0000 { + compatible = "mediatek,mt7986-wo-ilm", "syscon"; + reg = <0 0x151e0000 0 0x8000>; + }; + };Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerPATCH 7/10 arm64: dts: mt7986: move ilm in a dedicated node
In reply to Lorenzo BianconiSince the ilm memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 34 +++++++++++------------ 1 file changed, 16 insertions(+), 18 deletions(-)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +16 -18
@@ -89,16 +89,6 @@ wo_emi1: wo-emi@4fd40000 { no-map; }; - wo_ilm0: wo-ilm@151e0000 { - reg = <0 0x151e0000 0 0x8000>; - no-map; - }; - - wo_ilm1: wo-ilm@151f0000 { - reg = <0 0x151f0000 0 0x8000>; - no-map; - }; - wo_data: wo-data@4fd80000 { reg = <0 0x4fd80000 0 0x240000>; no-map;
@@ -454,11 +444,10 @@ wed0: wed@15010000 { reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, - <&wo_data>; - memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data"; + memory-region = <&wo_emi0>, <&wo_dlm0>, <&wo_data>; + memory-region-names = "wo-emi", "wo-dlm", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; + mediatek,wo-ilm = <&wo_ilm0>; mediatek,wo-cpuboot = <&wo_cpuboot>; };
@@ -468,11 +457,10 @@ wed1: wed@15011000 { reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, - <&wo_data>; - memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data"; + memory-region = <&wo_emi1>, <&wo_dlm1>, <&wo_data>; + memory-region-names = "wo-emi", "wo-dlm", "wo-data"; mediatek,wo-ccif = <&wo_ccif1>; + mediatek,wo-ilm = <&wo_ilm1>; mediatek,wo-cpuboot = <&wo_cpuboot>; };
@@ -490,6 +478,16 @@ wo_ccif1: syscon@151ad000 { interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; }; + wo_ilm0: syscon@151e0000 { + compatible = "mediatek,mt7986-wo-ilm", "syscon"; + reg = <0 0x151e0000 0 0x8000>; + }; + + wo_ilm1: syscon@151f0000 { + compatible = "mediatek,mt7986-wo-ilm", "syscon"; + reg = <0 0x151f0000 0 0x8000>; + }; + wo_cpuboot: syscon@15194000 { compatible = "mediatek,mt7986-wo-cpuboot", "syscon"; reg = <0 0x15194000 0 0x1000>;
Signature · 1 line
2.39.2
Re: [PATCH net-next 07/10] arm64: dts: mt7986: move ilm in a dedicated node
Quoted 7 lines · Lorenzo Bianconi
Since the ilm memory region is not part of the RAM SoC, move ilm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.Signed-off-by Lorenzo Bianconi <[email protected]>
Quoted 72 lines
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 34 +++++++++++------------ 1 file changed, 16 insertions(+), 18 deletions(-)arch/arm64/boot/dts/mediatek/mt7986a.dtsi +16
-18@@ -89,16 +89,6 @@ wo_emi1: wo-emi@4fd40000 { no-map; }; - wo_ilm0: wo-ilm@151e0000 { - reg = <0 0x151e0000 0 0x8000>; - no-map; - }; - - wo_ilm1: wo-ilm@151f0000 { - reg = <0 0x151f0000 0 0x8000>; - no-map; - }; - wo_data: wo-data@4fd80000 { reg = <0 0x4fd80000 0 0x240000>; no-map;@@ -454,11 +444,10 @@ wed0: wed@15010000 { reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, - <&wo_data>; - memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data"; + memory-region = <&wo_emi0>, <&wo_dlm0>, <&wo_data>; + memory-region-names = "wo-emi", "wo-dlm", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; + mediatek,wo-ilm = <&wo_ilm0>; mediatek,wo-cpuboot = <&wo_cpuboot>; };@@ -468,11 +457,10 @@ wed1: wed@15011000 { reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, - <&wo_data>; - memory-region-names = "wo-emi", "wo-ilm", "wo-dlm", - "wo-data"; + memory-region = <&wo_emi1>, <&wo_dlm1>, <&wo_data>; + memory-region-names = "wo-emi", "wo-dlm", "wo-data"; mediatek,wo-ccif = <&wo_ccif1>; + mediatek,wo-ilm = <&wo_ilm1>; mediatek,wo-cpuboot = <&wo_cpuboot>; };@@ -490,6 +478,16 @@ wo_ccif1: syscon@151ad000 { interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; }; + wo_ilm0: syscon@151e0000 { + compatible = "mediatek,mt7986-wo-ilm", "syscon"; + reg = <0 0x151e0000 0 0x8000>; + }; + + wo_ilm1: syscon@151f0000 { + compatible = "mediatek,mt7986-wo-ilm", "syscon"; + reg = <0 0x151f0000 0 0x8000>; + }; + wo_cpuboot: syscon@15194000 { compatible = "mediatek,mt7986-wo-cpuboot", "syscon"; reg = <0 0x15194000 0 0x1000>;
Lorenzo Bianconi
maintainerPATCH 8/10 net: ethernet: mtk_wed: move dlm a dedicated dts node
In reply to Lorenzo BianconiSince the dlm memory region is not part of the RAM SoC, move dlm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
Keep backward-compatibility with older dts version where dlm was defined as reserved-memory child node.
--- drivers/net/ethernet/mediatek/mtk_wed.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/net/ethernet/mediatek/mtk_wed.c +19 -0
@@ -799,6 +799,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device *dev)struct device_node *np;int index; + np =of_parse_phandle (dev->hw->node,"mediatek,wo-dlm" ,0 ); +if (np) { +struct resource res; +int ret; + + ret =of_address_to_resource (np,0 , &res); +of_node_put (np); + +if (ret <0 ) +return ret; + + dev->rro.miod_phys = res.start; + goto out; + } + +/* For backward compatibility, we need to check if DLM +* node is defined through reserved memory property. +*/ index =of_property_match_string (dev->hw->node,"memory-region-names" ,"wo-dlm" );if (index <0 )
@@ -815,6 +833,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device *dev)return -ENODEV ; dev->rro.miod_phys = rmem->base; +out: dev->rro.fdbk_phys =MTK_WED_MIOD_COUNT + dev->rro.miod_phys; return mtk_wed_rro_ring_alloc(dev, &dev->rro.ring,
Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerPATCH 9/10 dt-bindings: soc: mediatek: move dlm in a dedicated dts node
In reply to Lorenzo BianconiSince the cpuboot memory region is not part of the RAM SoC, move dlm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
--- .../arm/mediatek/mediatek,mt7622-wed.yaml | 12 +++-- .../soc/mediatek/mediatek,mt7986-wo-dlm.yaml | 46 +++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-dlm.yaml
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt7622-wed.yaml +8 -4
@@ -32,13 +32,11 @@ properties: memory-region: items: - description: firmware EMI region - - description: firmware DLM region - description: firmware CPU DATA region memory-region-names: items: - const: wo-emi - - const: wo-dlm - const: wo-data mediatek,wo-ccif:
@@ -53,6 +51,10 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: mediatek wed-wo ilm interface. + mediatek,wo-dlm: + $ref: /schemas/types.yaml#/definitions/phandle + description: mediatek wed-wo dlm interface. + allOf: - if: properties:
@@ -66,6 +68,7 @@ allOf: mediatek,wo-ccif: false mediatek,wo-cpuboot: false mediatek,wo-ilm: false + mediatek,wo-dlm: false required: - compatible
@@ -100,10 +103,11 @@ examples: reg = <0 0x15010000 0 0x1000>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi>, <&wo_dlm>, &wo_data>; - memory-region-names = "wo-emi", "wo-dlm", "wo-data"; + memory-region = <&wo_emi>, <&wo_data>; + memory-region-names = "wo-emi", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-ilm = <&wo_ilm>; + mediatek,wo-dlm = <&wo_dlm>; }; };
Documentation/devicetree/bindings/soc/mediatek/mediatek,mt7986-wo-dlm.yaml new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.39.2
Lorenzo Bianconi
maintainerPATCH 10/10 arm64: dts: mt7986: move dlm in a dedicated node
In reply to Lorenzo BianconiSince the dlm memory region is not part of the RAM SoC, move dlm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 30 ++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-)
arch/arm64/boot/dts/mediatek/mt7986a.dtsi +16 -14
@@ -93,16 +93,6 @@ wo_data: wo-data@4fd80000 { reg = <0 0x4fd80000 0 0x240000>; no-map; }; - - wo_dlm0: wo-dlm@151e8000 { - reg = <0 0x151e8000 0 0x2000>; - no-map; - }; - - wo_dlm1: wo-dlm@151f8000 { - reg = <0 0x151f8000 0 0x2000>; - no-map; - }; }; timer {
@@ -444,10 +434,11 @@ wed0: wed@15010000 { reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi0>, <&wo_dlm0>, <&wo_data>; - memory-region-names = "wo-emi", "wo-dlm", "wo-data"; + memory-region = <&wo_emi0>, <&wo_data>; + memory-region-names = "wo-emi", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; mediatek,wo-ilm = <&wo_ilm0>; + mediatek,wo-dlm = <&wo_dlm0>; mediatek,wo-cpuboot = <&wo_cpuboot>; };
@@ -457,10 +448,11 @@ wed1: wed@15011000 { reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi1>, <&wo_dlm1>, <&wo_data>; - memory-region-names = "wo-emi", "wo-dlm", "wo-data"; + memory-region = <&wo_emi1>, <&wo_data>; + memory-region-names = "wo-emi", "wo-data"; mediatek,wo-ccif = <&wo_ccif1>; mediatek,wo-ilm = <&wo_ilm1>; + mediatek,wo-dlm = <&wo_dlm1>; mediatek,wo-cpuboot = <&wo_cpuboot>; };
@@ -488,6 +480,16 @@ wo_ilm1: syscon@151f0000 { reg = <0 0x151f0000 0 0x8000>; }; + wo_dlm0: syscon@151e8000 { + compatible = "mediatek,mt7986-wo-dlm", "syscon"; + reg = <0 0x151e8000 0 0x2000>; + }; + + wo_dlm1: syscon@151f8000 { + compatible = "mediatek,mt7986-wo-dlm", "syscon"; + reg = <0 0x151f8000 0 0x2000>; + }; + wo_cpuboot: syscon@15194000 { compatible = "mediatek,mt7986-wo-cpuboot", "syscon"; reg = <0 0x15194000 0 0x1000>;
Signature · 1 line
2.39.2
Re: [PATCH net-next 10/10] arm64: dts: mt7986: move dlm in a dedicated node
Quoted 7 lines · Lorenzo Bianconi
Since the dlm memory region is not part of the RAM SoC, move dlm in a deidicated syscon node.
This patch helps to keep backward-compatibility with older version of uboot codebase where we have a limit of 8 reserved-memory dts child nodes.Signed-off-by Lorenzo Bianconi <[email protected]>
Quoted 70 lines
--- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 30 ++++++++++++----------- 1 file changed, 16 insertions(+), 14 deletions(-)arch/arm64/boot/dts/mediatek/mt7986a.dtsi +16
-14@@ -93,16 +93,6 @@ wo_data: wo-data@4fd80000 { reg = <0 0x4fd80000 0 0x240000>; no-map; }; - - wo_dlm0: wo-dlm@151e8000 { - reg = <0 0x151e8000 0 0x2000>; - no-map; - }; - - wo_dlm1: wo-dlm@151f8000 { - reg = <0 0x151f8000 0 0x2000>; - no-map; - }; }; timer {@@ -444,10 +434,11 @@ wed0: wed@15010000 { reg = <0 0x15010000 0 0x1000>; interrupt-parent = <&gic>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi0>, <&wo_dlm0>, <&wo_data>; - memory-region-names = "wo-emi", "wo-dlm", "wo-data"; + memory-region = <&wo_emi0>, <&wo_data>; + memory-region-names = "wo-emi", "wo-data"; mediatek,wo-ccif = <&wo_ccif0>; mediatek,wo-ilm = <&wo_ilm0>; + mediatek,wo-dlm = <&wo_dlm0>; mediatek,wo-cpuboot = <&wo_cpuboot>; };@@ -457,10 +448,11 @@ wed1: wed@15011000 { reg = <0 0x15011000 0 0x1000>; interrupt-parent = <&gic>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; - memory-region = <&wo_emi1>, <&wo_dlm1>, <&wo_data>; - memory-region-names = "wo-emi", "wo-dlm", "wo-data"; + memory-region = <&wo_emi1>, <&wo_data>; + memory-region-names = "wo-emi", "wo-data"; mediatek,wo-ccif = <&wo_ccif1>; mediatek,wo-ilm = <&wo_ilm1>; + mediatek,wo-dlm = <&wo_dlm1>; mediatek,wo-cpuboot = <&wo_cpuboot>; };@@ -488,6 +480,16 @@ wo_ilm1: syscon@151f0000 { reg = <0 0x151f0000 0 0x8000>; }; + wo_dlm0: syscon@151e8000 { + compatible = "mediatek,mt7986-wo-dlm", "syscon"; + reg = <0 0x151e8000 0 0x2000>; + }; + + wo_dlm1: syscon@151f8000 { + compatible = "mediatek,mt7986-wo-dlm", "syscon"; + reg = <0 0x151f8000 0 0x2000>; + }; + wo_cpuboot: syscon@15194000 { compatible = "mediatek,mt7986-wo-cpuboot", "syscon"; reg = <0 0x15194000 0 0x1000>;
Jakub Kicinski
maintainerQuoted 1 line · On Mon, 20 Mar 2023 17:57:54 +0100 Lorenzo Bianconi wrote:
arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 69 +++++++-------
Do you know if this can go via our tree, or via arm/MediaTek ?
Lorenzo Bianconi
maintainerQuoted 4 lines · On Mon, 20 Mar 2023 17:57:54 +0100 Lorenzo Bianconi wrote:
Quoted 1 line
arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 69 +++++++-------Do you know if this can go via our tree, or via arm/MediaTek ?
Since the series requires some network driver changes I would say it should go through the net-next tree but I do not have any strong opinion on it.
Regards,
Lorenzo
Jakub Kicinski
maintainerQuoted 7 lines · On Tue, 21 Mar 2023 10:37:40 +0100 Lorenzo Bianconi wrote:
Quoted 4 lines · On Mon, 20 Mar 2023 17:57:54 +0100 Lorenzo Bianconi wrote:
Quoted 1 line
arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 69 +++++++-------Do you know if this can go via our tree, or via arm/MediaTek ?
Since the series requires some network driver changes I would say it should go through the net-next tree but I do not have any strong opinion on it.
We'll need to get an ack from Matthias to take it via networking, but whatever's easiest.