Skip to contentSkip to conversation

arm64: dts: mt8173: Fix nor flash node

PATCH In review Xiangsheng Hou 2 participants 5 messages Jul 8, 2022 – Jul 11, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v3 cover arm64: dts: mt8173: Fix nor flash node

Add axi clock since the driver change to DMA mode which need to enable axi clock in dtsi and dt-binding example for mt8173. And change spi clock to 26MHz as default.

Changes from v2:
- remove assigned clocks and parents in binding file

Changes from v1:
- Modify nor binding file

Xiangsheng Hou (2):
arm64: dts: mt8173: Fix nor_flash node
dt-bindings: mediatek: Add axi clock in mt8173 dts example

 .../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml      | 4 ++--
 arch/arm64/boot/dts/mediatek/mt8173.dtsi                   | 7 +++++--
 2 files changed, 7 insertions(+), 4 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v3 1/2 arm64: dts: mt8173: Fix nor_flash node

Add axi clock since the driver change to DMA mode which need to enable axi clock. And change spi clock to 26MHz as default.

---
 arch/arm64/boot/dts/mediatek/mt8173.dtsi | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173.dtsi +5 -2
index 40d7b47fc52e..e603170100af 100644
@@ -790,9 +790,12 @@ thermal: thermal@1100b000 {
 		nor_flash: spi@1100d000 {
 			compatible = "mediatek,mt8173-nor";
 			reg = <0 0x1100d000 0 0xe0>;
+			assigned-clocks = <&topckgen CLK_TOP_SPI_SEL>;
+			assigned-clock-parents = <&clk26m>;
 			clocks = <&pericfg CLK_PERI_SPI>,
-				 <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
-			clock-names = "spi", "sf";
+				 <&topckgen CLK_TOP_SPINFI_IFR_SEL>,
+				 <&pericfg CLK_PERI_NFI>;
+			clock-names = "spi", "sf", "axi";
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
Signature · 1 line
2.25.1
#3 lore raw

PATCH v3 2/2 dt-bindings: mediatek: Add axi clock in mt8173 dts example

In reply to Xiangsheng Hou

For mt8173, it is needed to add the axi clock for dma mode.

---
 .../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml         | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +2 -2
index 41e60fe4b09f..413b907eecf5 100644
@@ -82,8 +82,8 @@ examples:
         compatible = "mediatek,mt8173-nor";
         reg = <0 0x1100d000 0 0xe0>;
         interrupts = <1>;
-        clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
-        clock-names = "spi", "sf";
+        clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>, <&pericfg CLK_PERI_NFI>;
+        clock-names = "spi", "sf", "axi";
         #address-cells = <1>;
         #size-cells = <0>;
 
Signature · 1 line
2.25.1
#4 lore raw

Re: [PATCH V3 2/2] dt-bindings: mediatek: Add axi clock in mt8173 dts example

Il 08/07/22 04:15, Xiangsheng Hou ha scritto:

Quoted 12 lines

For mt8173, it is needed to add the axi clock for dma mode.

---
  .../devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml         | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +0 -0
index 41e60fe4b09f..413b907eecf5 100644

Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml examples: · line 85

Quoted 6 lines
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +1 -2
@@ -82,8 +82,8 @@ examples:
          compatible = "mediatek,mt8173-nor";
          reg = <0 0x1100d000 0 0xe0>;
          interrupts = <1>;
-        clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
-        clock-names = "spi", "sf";
+        clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>, <&pericfg CLK_PERI_NFI>;

This is going over 100 columns, which is too many. Please fix.

Quoted 5 lines
Documentation/devicetree/bindings/spi/mediatek,spi-mtk-nor.yaml +1 -0
+        clock-names = "spi", "sf", "axi";
          #address-cells = <1>;
          #size-cells = <0>;