ARM: marvell/dt: add crypto nodes in existing DTs
cover ARM: marvell/dt: add crypto nodes in existing DTs
Hello,
This series declares and enables the crypto engine on the armada, orion, kirkwood and dove SoCs.
Best Regards,
Boris
Arnaud Ebalard (1):
ARM: marvell/dt: add crypto related nodes to armada 370 dtsi
Boris Brezillon (9):
ARM: marvell/dt: add crypto related nodes to armada-xp.dtsi
ARM: marvell/dt: define crypto SRAM ranges for all armada-xp boards
ARM: marvell/dt: define crypto SRAM ranges for all armada-370 boards
ARM: marvell/dt: add crypto related nodes to armada 375 dtsi
ARM: marvell/dt: define crypto SRAM ranges in armada-375-db.dts
ARM: marvell/dt: add crypto related nodes to armada 38x dtsi
ARM: marvell/dt: define crypto SRAM ranges for all armada-38x boards
ARM: marvell: use new bindings for existing crypto devices
ARM: marvell: modify Orion and Kirkwoord crypto compatible strings
arch/arm/boot/dts/armada-370-db.dts | 3 ++- arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 3 ++- arch/arm/boot/dts/armada-370-mirabox.dts | 7 ++++- arch/arm/boot/dts/armada-370-netgear-rn102.dts | 3 ++- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 3 ++- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-370-synology-ds213j.dts | 3 ++- arch/arm/boot/dts/armada-370.dtsi | 25 ++++++++++++++++++ arch/arm/boot/dts/armada-375-db.dts | 4 ++- arch/arm/boot/dts/armada-375.dtsi | 33 ++++++++++++++++++++++++ arch/arm/boot/dts/armada-385-db-ap.dts | 4 ++- arch/arm/boot/dts/armada-385-linksys.dtsi | 4 ++- arch/arm/boot/dts/armada-388-db.dts | 4 ++- arch/arm/boot/dts/armada-388-gp.dts | 4 ++- arch/arm/boot/dts/armada-388-rd.dts | 4 ++- arch/arm/boot/dts/armada-38x.dtsi | 33 ++++++++++++++++++++++++ arch/arm/boot/dts/armada-xp-axpwifiap.dts | 4 ++- arch/arm/boot/dts/armada-xp-db.dts | 4 ++- arch/arm/boot/dts/armada-xp-gp.dts | 4 ++- arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 4 ++- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 4 ++- arch/arm/boot/dts/armada-xp-matrix.dts | 4 ++- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 4 ++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 ++- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 4 ++- arch/arm/boot/dts/armada-xp.dtsi | 30 +++++++++++++++++++++ arch/arm/boot/dts/dove.dtsi | 17 +++++++++--- arch/arm/boot/dts/kirkwood.dtsi | 29 ++++++++++++++------- arch/arm/boot/dts/orion5x.dtsi | 22 +++++++++++----- 29 files changed, 231 insertions(+), 43 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/10 ARM: marvell/dt: add crypto related nodes to armada-xp.dtsi
Add crypto related nodes to armada-xp.dtsi.
--- arch/arm/boot/dts/armada-xp.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm/boot/dts/armada-xp.dtsi +30 -0
@@ -236,6 +236,18 @@ compatible = "marvell,armada-xp-neta"; }; + crypto at 90000 { + compatible = "marvell,armada-xp-crypto"; + reg = <0x90000 0x10000>; + reg-names = "regs"; + interrupts = <48>, <49>; + clocks = <&gateclk 23>, <&gateclk 23>; + clock-names = "cesa0", "cesa1"; + marvell,crypto-srams = <&crypto_sram0>, + <&crypto_sram1>; + marvell,crypto-sram-size = <0x800>; + }; + xor at f0900 { compatible = "marvell,orion-xor"; reg = <0xF0900 0x100
@@ -256,6 +268,24 @@ }; }; }; + + crypto_sram0: sa-sram0 { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x09) 0 0x800>; + clocks = <&gateclk 23>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x09) 0 0x800>; + }; + + crypto_sram1: sa-sram1 { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x05) 0 0x800>; + clocks = <&gateclk 23>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x05) 0 0x800>; + }; }; clocks {
Signature · 1 line
1.9.1
PATCH 2/10 ARM: marvell/dt: define crypto SRAM ranges for all armada-xp boards
In reply to Boris BrezillonDefine the crypto SRAM ranges so that the resources referenced by the sa-sram node can be properly extracted from the DT.
--- arch/arm/boot/dts/armada-xp-axpwifiap.dts | 4 +++- arch/arm/boot/dts/armada-xp-db.dts | 4 +++- arch/arm/boot/dts/armada-xp-gp.dts | 4 +++- arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 4 +++- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 4 +++- arch/arm/boot/dts/armada-xp-matrix.dts | 4 +++- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 4 +++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 +++- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 4 +++- 9 files changed, 27 insertions(+), 9 deletions(-)
arch/arm/boot/dts/armada-xp-axpwifiap.dts +3 -1
@@ -69,7 +69,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; pcie-controller { status = "okay";
arch/arm/boot/dts/armada-xp-db.dts +3 -1
@@ -75,7 +75,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 - MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000>; + MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; devbus-bootcs { status = "okay";
arch/arm/boot/dts/armada-xp-gp.dts +3 -1
@@ -94,7 +94,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 - MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000>; + MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x1000000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; devbus-bootcs { status = "okay";
arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts +3 -1
@@ -64,7 +64,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; pcie-controller { status = "okay";
arch/arm/boot/dts/armada-xp-linksys-mamba.dts +3 -1
@@ -69,7 +69,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; pcie-controller { status = "okay";
arch/arm/boot/dts/armada-xp-matrix.dts +3 -1
@@ -67,7 +67,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; internal-regs { serial at 12000 {
arch/arm/boot/dts/armada-xp-netgear-rn2120.dts +3 -1
@@ -63,7 +63,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; pcie-controller { status = "okay";
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts +3 -1
@@ -65,7 +65,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xd0000000 0x100000 MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 - MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x8000000>; + MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x8000000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; devbus-bootcs { status = "okay";
arch/arm/boot/dts/armada-xp-synology-ds414.dts +3 -1
@@ -77,7 +77,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x09) 0 0 0xf8100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0 0xf8110000 0x10000>; pcie-controller { status = "okay";
Signature · 1 line
1.9.1
PATCH 3/10 ARM: marvell/dt: add crypto related nodes to armada 370 dtsi
In reply to Boris BrezillonFrom: Arnaud Ebalard <[email protected]>
Add crypto related nodes in armada-370.dtsi.
--- arch/arm/boot/dts/armada-370.dtsi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm/boot/dts/armada-370.dtsi +25 -0
@@ -319,6 +319,31 @@ ethernet at 74000 { compatible = "marvell,armada-370-neta"; }; + + crypto at 90000 { + compatible = "marvell,armada-370-crypto"; + reg = <0x90000 0x10000>; + reg-names = "regs"; + interrupts = <48>; + clocks = <&gateclk 23>; + clock-names = "cesa0"; + marvell,crypto-srams = <&crypto_sram>; + marvell,crypto-sram-size = <0x7e0>; + }; + }; + + crypto_sram: sa-sram { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x01) 0 0x800>; + reg-names = "sram"; + clocks = <&gateclk 23>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x01) 0 0x800>; + + idle-sram at 0 { + reg = <0x0 0x20>; + }; }; }; };
Signature · 1 line
1.9.1
PATCH 3/10 ARM: marvell/dt: add crypto related nodes to armada 370 dtsi
Hi Boris and Arnaud,
Quoted 3 lines · Boris Brezillon
From: Arnaud Ebalard <[email protected]>
Add crypto related nodes in
armada-370.dtsi.
[...]
Quoted 15 lines
arch/arm/boot/dts/armada-370.dtsi +15
-0+ + crypto at 90000 { + compatible = "marvell,armada-370-crypto"; + reg = <0x90000 0x10000>; + reg-names = "regs"; + interrupts = <48>; + clocks = <&gateclk 23>; + clock-names = "cesa0"; + marvell,crypto-srams = <&crypto_sram>; + marvell,crypto-sram-size = <0x7e0>; + }; + }; + + crypto_sram: sa-sram { + compatible = "mmio-sram";
arch/arm/boot/dts/armada-370.dtsi line 346
Quoted 10 lines
arch/arm/boot/dts/armada-370.dtsi +10
-0+ reg = <MBUS_ID(0x09, 0x01) 0 0x800>; + reg-names = "sram"; + clocks = <&gateclk 23>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x01) 0 0x800>; + + idle-sram at 0 { + reg = <0x0 0x20>; + };
So you think at the cpuilde hack using the sram. And you reserved 32 bytes for it. So indeed it is enough to store the code we need. Could you add a little comment about it ?
In mvebu_setup_boot_addr_wa we use mvebu_mbus_add_window_by_id but this windows was also added by the code you add. I wonder if it could be a problem.
Maybe we should look for if the idle-sram is present and in this case not calling mvebu_mbus_add_window_by_id, but it is not necessary for this series.
Once you have added the comment you can add my
Thanks,
Gregory
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 3/10 ARM: marvell/dt: add crypto related nodes to armada 370 dtsi
Hi Gregory,
Quoted 29 lines · On Thu, 27 Aug 2015 17:28:00 +0200 Gregory CLEMENT…
Hi Boris and Arnaud,
Quoted 3 lines · Boris Brezillon
From: Arnaud Ebalard <[email protected]>
Add crypto related nodes in
armada-370.dtsi.[...]
Quoted 21 lines
arch/arm/boot/dts/armada-370.dtsi +21
-0+ + crypto at 90000 { + compatible = "marvell,armada-370-crypto"; + reg = <0x90000 0x10000>; + reg-names = "regs"; + interrupts = <48>; + clocks = <&gateclk 23>; + clock-names = "cesa0"; + marvell,crypto-srams = <&crypto_sram>; + marvell,crypto-sram-size = <0x7e0>; + }; + }; + + crypto_sram: sa-sram { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x01) 0 0x800>; + reg-names = "sram"; + clocks = <&gateclk 23>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x01) 0 0x800>;
Quoted 8 lines
arch/arm/boot/dts/armada-370.dtsi line 346
Quoted 4 lines
arch/arm/boot/dts/armada-370.dtsi +4
-0+ + idle-sram at 0 { + reg = <0x0 0x20>; + };So you think at the cpuilde hack using the sram. And you reserved 32 bytes for it. So indeed it is enough to store the code we need. Could you add a little comment about it ?
Sure, I'll add a comment explaining why we reserve a memory region for idle support.
Quoted 4 lines
In
mvebu_setup_boot_addr_wawe usemvebu_mbus_add_window_by_idbut this windows was also added by the code you add. I wonder if it could be a problem.
I tested it and it works: apparently you can create different MBUS windows pointing to the same peripheral (in our case the SRAM).
Quoted 4 lines
Maybe we should look for if the idle-sram is present and in this case not calling
mvebu_mbus_add_window_by_id, but it is not necessary for this series.
Hm, I considered reworking the code dealing with this erratum, but since everything works as is I don't think this is necessary.
Best Regards,
Boris
Signature · 3 lines
Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 4/10 ARM: marvell/dt: define crypto SRAM ranges for all armada-370 boards
In reply to Boris BrezillonDefine the crypto SRAM ranges so that the resources referenced by the sa-sram node can be properly extracted from the DT.
--- arch/arm/boot/dts/armada-370-db.dts | 3 ++- arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 3 ++- arch/arm/boot/dts/armada-370-mirabox.dts | 7 ++++++- arch/arm/boot/dts/armada-370-netgear-rn102.dts | 3 ++- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 3 ++- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-370-synology-ds213j.dts | 3 ++- 7 files changed, 18 insertions(+), 7 deletions(-)
arch/arm/boot/dts/armada-370-db.dts +2 -1
@@ -74,7 +74,8 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>; internal-regs { serial at 12000 {
arch/arm/boot/dts/armada-370-dlink-dns327l.dts +2 -1
@@ -69,7 +69,8 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 - MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>; pcie-controller { status = "okay";
arch/arm/boot/dts/armada-370-mirabox.dts +6 -1
@@ -61,7 +61,8 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 - MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>; pcie-controller { status = "okay";
@@ -138,6 +139,10 @@ phy-mode = "rgmii-id"; }; + crypto at 90000 { + status = "okay"; + }; + mvsdio at d4000 { pinctrl-0 = <&sdio_pins3>; pinctrl-names = "default";
arch/arm/boot/dts/armada-370-netgear-rn102.dts +2 -1
@@ -63,7 +63,8 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 - MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>; pcie-controller { status = "okay";
arch/arm/boot/dts/armada-370-netgear-rn104.dts +2 -1
@@ -63,7 +63,8 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xd0000000 0x100000 - MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>; pcie-controller { status = "okay";
arch/arm/boot/dts/armada-370-rd.dts +2 -1
@@ -74,7 +74,8 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>; pcie-controller { status = "okay";
arch/arm/boot/dts/armada-370-synology-ds213j.dts +2 -1
@@ -77,7 +77,8 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x01) 0 0xf1100000 0x10000>; internal-regs {
Signature · 1 line
1.9.1
PATCH 5/10 ARM: marvell/dt: add crypto related nodes to armada 375 dtsi
In reply to Boris BrezillonAdd crypto related nodes in armada-375.dtsi.
--- arch/arm/boot/dts/armada-375.dtsi | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
arch/arm/boot/dts/armada-375.dtsi +33 -0
@@ -513,6 +513,21 @@ }; }; + crypto at 90000 { + compatible = "marvell,armada-375-crypto"; + reg = <0x90000 0x10000>; + reg-names = "regs"; + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gateclk 30>, <&gateclk 31>, + <&gateclk 28>, <&gateclk 29>; + clock-names = "cesa0", "cesa1", + "cesaz0", "cesaz1"; + marvell,crypto-srams = <&crypto_sram0>, + <&crypto_sram1>; + marvell,crypto-sram-size = <0x800>; + }; + sata at a0000 { compatible = "marvell,orion-sata"; reg = <0xa0000 0x5000>;
@@ -619,5 +634,23 @@ }; }; + + crypto_sram0: sa-sram0 { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x09) 0 0x800>; + clocks = <&gateclk 30>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x09) 0 0x800>; + }; + + crypto_sram1: sa-sram1 { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x05) 0 0x800>; + clocks = <&gateclk 31>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x05) 0 0x800>; + }; }; };
Signature · 1 line
1.9.1
PATCH 6/10 ARM: marvell/dt: define crypto SRAM ranges in armada-375-db.dts
In reply to Boris BrezillonDefine the crypto SRAM ranges so that the resources referenced by the sa-sram node can be properly extracted from the DT.
--- arch/arm/boot/dts/armada-375-db.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/boot/dts/armada-375-db.dts +3 -1
@@ -65,7 +65,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x09) 0 0xf1100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0xf1110000 0x10000>; internal-regs { spi at 10600 {
Signature · 1 line
1.9.1
PATCH 7/10 ARM: marvell/dt: add crypto related nodes to armada 38x dtsi
In reply to Boris BrezillonAdd crypto related nodes in armada-38x.dtsi.
--- arch/arm/boot/dts/armada-38x.dtsi | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
arch/arm/boot/dts/armada-38x.dtsi +33 -0
@@ -509,6 +509,21 @@ clocks = <&gateclk 4>; }; + crypto at 90000 { + compatible = "marvell,armada-375-crypto"; + reg = <0x90000 0x10000>; + reg-names = "regs"; + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gateclk 23>, <&gateclk 21>, + <&gateclk 14>, <&gateclk 16>; + clock-names = "cesa0", "cesa1", + "cesaz0", "cesaz1"; + marvell,crypto-srams = <&crypto_sram0>, + <&crypto_sram1>; + marvell,crypto-sram-size = <0x800>; + }; + rtc at a3800 { compatible = "marvell,armada-380-rtc"; reg = <0xa3800 0x20>, <0x184a0 0x0c>;
@@ -584,6 +599,24 @@ status = "disabled"; }; }; + + crypto_sram0: sa-sram0 { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x19) 0 0x800>; + clocks = <&gateclk 23>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x19) 0 0x800>; + }; + + crypto_sram1: sa-sram1 { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x15) 0 0x800>; + clocks = <&gateclk 21>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x15) 0 0x800>; + }; }; clocks {
Signature · 1 line
1.9.1
PATCH 8/10 ARM: marvell/dt: define crypto SRAM ranges for all armada-38x boards
In reply to Boris BrezillonDefine the crypto SRAM ranges so that the resources referenced by the sa-sram node can be properly extracted from the DT.
--- arch/arm/boot/dts/armada-385-db-ap.dts | 4 +++- arch/arm/boot/dts/armada-385-linksys.dtsi | 4 +++- arch/arm/boot/dts/armada-388-db.dts | 4 +++- arch/arm/boot/dts/armada-388-gp.dts | 4 +++- arch/arm/boot/dts/armada-388-rd.dts | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-)
arch/arm/boot/dts/armada-385-db-ap.dts +3 -1
@@ -59,7 +59,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 + MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>; internal-regs { spi1: spi at 10680 {
arch/arm/boot/dts/armada-385-linksys.dtsi +3 -1
@@ -57,7 +57,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x09) 0 0xf1100000 0x10000 + MBUS_ID(0x09, 0x05) 0 0xf1110000 0x10000>; internal-regs {
arch/arm/boot/dts/armada-388-db.dts +3 -1
@@ -64,7 +64,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 + MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>; internal-regs { spi at 10600 {
arch/arm/boot/dts/armada-388-gp.dts +3 -1
@@ -58,7 +58,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 + MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>; internal-regs { spi at 10600 {
arch/arm/boot/dts/armada-388-rd.dts +3 -1
@@ -65,7 +65,9 @@ soc { ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 - MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000>; + MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 + MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 + MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>; internal-regs { spi at 10600 {
Signature · 1 line
1.9.1
PATCH 9/10 ARM: marvell: use new bindings for existing crypto devices
In reply to Boris BrezillonThe new bindings split the crypto and sram node in two separate devices. Modify the existing crypto nodes to match the new representation.
--- arch/arm/boot/dts/dove.dtsi | 15 ++++++++++++--- arch/arm/boot/dts/kirkwood.dtsi | 29 +++++++++++++++++++---------- arch/arm/boot/dts/orion5x.dtsi | 22 +++++++++++++++------- 3 files changed, 46 insertions(+), 20 deletions(-)
arch/arm/boot/dts/dove.dtsi +12 -3
@@ -264,11 +264,12 @@ crypto: crypto-engine at 30000 { compatible = "marvell,orion-crypto"; - reg = <0x30000 0x10000>, - <0xffffe000 0x800>; - reg-names = "regs", "sram"; + reg = <0x30000 0x10000>; + reg-names = "regs"; interrupts = <31>; clocks = <&gate_clk 15>; + marvell,crypto-srams = <&crypto_sram>; + marvell,crypto-sram-size = <0x800>; status = "okay"; };
@@ -767,6 +768,14 @@ interrupts = <47>; status = "disabled"; }; + + crypto_sram: sa-sram at ffffe000 { + compatible = "mmio-sram"; + reg = <0xffffe000 0x800>; + clocks = <&gate_clk 15>; + #address-cells = <1>; + #size-cells = <1>; + }; }; }; };
arch/arm/boot/dts/kirkwood.dtsi +19 -10
@@ -40,16 +40,6 @@ pcie-mem-aperture = <0xe0000000 0x10000000>; /* 256 MiB memory space */ pcie-io-aperture = <0xf2000000 0x100000>; /* 1 MiB I/O space */ - cesa: crypto at 0301 { - compatible = "marvell,orion-crypto"; - reg = <MBUS_ID(0xf0, 0x01) 0x30000 0x10000>, - <MBUS_ID(0x03, 0x01) 0 0x800>; - reg-names = "regs", "sram"; - interrupts = <22>; - clocks = <&gate_clk 17>; - status = "okay"; - }; - nand: nand at 012f { #address-cells = <1>; #size-cells = <1>;
@@ -65,6 +55,14 @@ pinctrl-names = "default"; status = "disabled"; }; + + crypto_sram: sa-sram at 0301 { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x03, 0x01) 0x0 0x800>; + clocks = <&gate_clk 17>; + #address-cells = <1>; + #size-cells = <1>; + }; }; ocp at f1000000 {
@@ -252,6 +250,17 @@ status = "okay"; }; + cesa: crypto at 30000 { + compatible = "marvell,orion-crypto"; + reg = <0x30000 0x10000>; + reg-names = "regs"; + interrupts = <22>; + clocks = <&gate_clk 17>; + marvell,crypto-srams = <&crypto_sram>; + marvell,crypto-sram-size = <0x800>; + status = "okay"; + }; + usb0: ehci at 50000 { compatible = "marvell,orion-ehci"; reg = <0x50000 0x1000>;
arch/arm/boot/dts/orion5x.dtsi +15 -7
@@ -212,6 +212,16 @@ status = "disabled"; }; + cesa: crypto at 90000 { + compatible = "marvell,orion-crypto"; + reg = <0x90000 0x10000>; + reg-names = "regs"; + interrupts = <28>; + marvell,crypto-srams = <&crypto_sram>; + marvell,crypto-sram-size = <0x800>; + status = "okay"; + }; + ehci1: ehci at a0000 { compatible = "marvell,orion-ehci"; reg = <0xa0000 0x1000>;
@@ -220,13 +230,11 @@ }; }; - cesa: crypto at 90000 { - compatible = "marvell,orion-crypto"; - reg = <MBUS_ID(0xf0, 0x01) 0x90000 0x10000>, - <MBUS_ID(0x09, 0x00) 0x0 0x800>; - reg-names = "regs", "sram"; - interrupts = <28>; - status = "okay"; + crypto_sram: sa-sram { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x00) 0x0 0x800>; + #address-cells = <1>; + #size-cells = <1>; }; }; };
Signature · 1 line
1.9.1
PATCH 10/10 ARM: marvell: modify Orion and Kirkwoord crypto compatible strings
In reply to Boris BrezillonExplicitly use the SoC specific compatible strings in kirkwood.dtsi and dove.dtsi, so that the crypto devices have access to the TDMA feature when attached to the new CESA driver.
--- arch/arm/boot/dts/dove.dtsi | 2 +- arch/arm/boot/dts/kirkwood.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/dove.dtsi +1 -1
@@ -263,7 +263,7 @@ }; crypto: crypto-engine at 30000 { - compatible = "marvell,orion-crypto"; + compatible = "marvell,dove-crypto"; reg = <0x30000 0x10000>; reg-names = "regs"; interrupts = <31>;
arch/arm/boot/dts/kirkwood.dtsi +1 -1
@@ -251,7 +251,7 @@ }; cesa: crypto at 30000 { - compatible = "marvell,orion-crypto"; + compatible = "marvell,kirkwood-crypto"; reg = <0x30000 0x10000>; reg-names = "regs"; interrupts = <22>;
Signature · 1 line
1.9.1
PATCH v2 3/10 ARM: marvell/dt: add crypto related nodes to armada 370 dtsi
In reply to Boris BrezillonFrom: Arnaud Ebalard <[email protected]>
Add crypto related nodes in armada-370.dtsi.
---
Changes since v1:
- add a comment explaining why we reserve 32 bytes in the crypto SRAM
arch/arm/boot/dts/armada-370.dtsi | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
arch/arm/boot/dts/armada-370.dtsi +32 -0
@@ -319,6 +319,38 @@ ethernet at 74000 { compatible = "marvell,armada-370-neta"; }; + + crypto at 90000 { + compatible = "marvell,armada-370-crypto"; + reg = <0x90000 0x10000>; + reg-names = "regs"; + interrupts = <48>; + clocks = <&gateclk 23>; + clock-names = "cesa0"; + marvell,crypto-srams = <&crypto_sram>; + marvell,crypto-sram-size = <0x7e0>; + }; + }; + + crypto_sram: sa-sram { + compatible = "mmio-sram"; + reg = <MBUS_ID(0x09, 0x01) 0 0x800>; + reg-names = "sram"; + clocks = <&gateclk 23>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 MBUS_ID(0x09, 0x01) 0 0x800>; + + /* + * The Armada 370 has an erratum preventing the use of + * the standard workflow for CPU idle support (relying + * on the BootROM code to enter/exit idle state). + * Reserve some amount of the crypto SRAM to put the + * cpuidle workaround. + */ + idle-sram at 0 { + reg = <0x0 0x20>; + }; }; }; };
Signature · 1 line
1.9.1
cover ARM: marvell/dt: add crypto nodes in existing DTs
In reply to Boris BrezillonHi Boris,
Quoted 9 lines · Boris Brezillon
Hello,
This series declares and enables the crypto engine on the armada, orion, kirkwood and dove SoCs.
Best Regards,
Boris
All the patches have been applied on mvebu/dt. I only reworded the commit title to call them "ARM: mvebu" instead of "ARM: marvell" or "ARM:
marvell/dt". Also for the patch 3 I took your v2.
Thanks,
Gregory
Quoted 45 lines
Arnaud Ebalard (1):
ARM: marvell/dt: add crypto related nodes to armada 370 dtsiBoris Brezillon (9):
ARM: marvell/dt: add crypto related nodes toarmada-xp.dtsi
ARM: marvell/dt: define crypto SRAM ranges for all armada-xp boards
ARM: marvell/dt: define crypto SRAM ranges for all armada-370 boards
ARM: marvell/dt: add crypto related nodes to armada 375 dtsi
ARM: marvell/dt: define crypto SRAM ranges inarmada-375-db.dts
ARM: marvell/dt: add crypto related nodes to armada 38x dtsi
ARM: marvell/dt: define crypto SRAM ranges for all armada-38x boards
ARM: marvell: use new bindings for existing crypto devices
ARM: marvell: modify Orion and Kirkwoord crypto compatible stringsarch/arm/boot/dts/armada-370-db.dts | 3 ++- arch/arm/boot/dts/armada-370-dlink-dns327l.dts | 3 ++- arch/arm/boot/dts/armada-370-mirabox.dts | 7 ++++- arch/arm/boot/dts/armada-370-netgear-rn102.dts | 3 ++- arch/arm/boot/dts/armada-370-netgear-rn104.dts | 3 ++- arch/arm/boot/dts/armada-370-rd.dts | 3 ++- arch/arm/boot/dts/armada-370-synology-ds213j.dts | 3 ++- arch/arm/boot/dts/armada-370.dtsi | 25 ++++++++++++++++++ arch/arm/boot/dts/armada-375-db.dts | 4 ++- arch/arm/boot/dts/armada-375.dtsi | 33 ++++++++++++++++++++++++ arch/arm/boot/dts/armada-385-db-ap.dts | 4 ++- arch/arm/boot/dts/armada-385-linksys.dtsi | 4 ++- arch/arm/boot/dts/armada-388-db.dts | 4 ++- arch/arm/boot/dts/armada-388-gp.dts | 4 ++- arch/arm/boot/dts/armada-388-rd.dts | 4 ++- arch/arm/boot/dts/armada-38x.dtsi | 33 ++++++++++++++++++++++++ arch/arm/boot/dts/armada-xp-axpwifiap.dts | 4 ++- arch/arm/boot/dts/armada-xp-db.dts | 4 ++- arch/arm/boot/dts/armada-xp-gp.dts | 4 ++- arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts | 4 ++- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 4 ++- arch/arm/boot/dts/armada-xp-matrix.dts | 4 ++- arch/arm/boot/dts/armada-xp-netgear-rn2120.dts | 4 ++- arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 ++- arch/arm/boot/dts/armada-xp-synology-ds414.dts | 4 ++- arch/arm/boot/dts/armada-xp.dtsi | 30 +++++++++++++++++++++ arch/arm/boot/dts/dove.dtsi | 17 +++++++++--- arch/arm/boot/dts/kirkwood.dtsi | 29 ++++++++++++++------- arch/arm/boot/dts/orion5x.dtsi | 22 +++++++++++----- 29 files changed, 231 insertions(+), 43 deletions(-)
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com