Hisilicon SEC accelerator driver
cover Hisilicon SEC accelerator driver
From: Jonathan Cameron <[email protected]>
This an RFC for a couple of reasons:
1) There is some ongoing discussion on how to handle IVs in the AF_ALG interface when doing async IO. There are a few corners of handling in here that are performance enhancements based on Stephan's recent set.
2) The handling of iommu presence is ugly. I need to discuss this with iommu maintainer and interested parties.
3) The hardware is limited to 32MB per queued job. We need to handle splitting this up into multiple jobs and related IV chaining.
This driver provides in kernel support for the Hisilicon SEC accelerators found on the hip06 and hip07 SoCs. There are 4 such units on the D05 board for which DT bindings are provided. ACPI configuration also works with an appropriate UEFI build.
The hardware does not update the IV in chaining or counting modes. This is done in the driver on completion of the cipher operation.
If we are relying on IV chaining with current AF_ALG it is necessary to ensure we do not stream the elements directly into the hardware queues. For modes where this necessary we use a front end software queue.
The driver currently supports AES, DES and 3DES block ciphers. Hash support and AAED support to follow.
Jonathan Cameron (3):
dt-bindings: Add bindings for Hisilicon SEC crypto accelerators.
crypto: hisilicon hacv1 driver
arm64: dts: hisi: add SEC crypto accelerator nodes for hip07 SoC
.../bindings/crypto/hisilicon,hip07-sec.txt | 71 + arch/arm64/boot/dts/hisilicon/hip07.dtsi | 293 ++++ drivers/crypto/Kconfig | 2 + drivers/crypto/Makefile | 1 + drivers/crypto/hisilicon/Kconfig | 16 + drivers/crypto/hisilicon/Makefile | 2 + drivers/crypto/hisilicon/sec/Makefile | 3 + drivers/crypto/hisilicon/sec/sec_algs.c | 1082 +++++++++++++++ drivers/crypto/hisilicon/sec/sec_drv.c | 1418 ++++++++++++++++++++ drivers/crypto/hisilicon/sec/sec_drv.h | 282 ++++ 10 files changed, 3170 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt create mode 100644 drivers/crypto/hisilicon/Kconfig create mode 100644 drivers/crypto/hisilicon/Makefile create mode 100644 drivers/crypto/hisilicon/sec/Makefile create mode 100644 drivers/crypto/hisilicon/sec/sec_algs.c create mode 100644 drivers/crypto/hisilicon/sec/sec_drv.c create mode 100644 drivers/crypto/hisilicon/sec/sec_drv.h
Signature · 1 line
2.11.0
RFC PATCH 1/3 dt-bindings: Add bindings for Hisilicon SEC crypto accelerators.
From: Jonathan Cameron <[email protected]>
The hip06 and hip07 SoCs contain a number of these crypto units which accelerate AES and DES operations.
--- .../bindings/crypto/hisilicon,hip07-sec.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+)
Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt new file +71 -0
@@ -0,0 +1,71 @@ +* Hisilicon hip07 Security Accelerator (SEC) + +Required properties: +- compatible: Must contain one of + - "hisilicon,hip06-sec" + - "hisilicon,hip07-sec" +- #address-cells: Must be <2> as 64 bit addresses in reg. +- #size-cells: Must be <2> as 64 bit lengths in reg. +- reg: Memory addresses and lengths of the memory regions used by the driver. + Region 0 has registers to control the backend processing engines. + Region 1 has registers for functionality common to all queues. + Regions 2-18 have registers for the individual queues which are isolated + both in hardware and within the driver. +- interrupts: Interrupt specifiers. + Refer to interrupt-controller/interrupts.txt for generic interrupt client node + bindings. + Interrupt 0 is for the SEC unit error queue. + Interrupt 2N + 1 is the completion interrupt for queue N. + Interrupt 2N + 2 is the error interrupt for queue N. +- dma-coherent: The driver assumes coherent dma is possible. + +Optional properties: +- iommus: The SEC units are behind smmu-v3 iommus. + Refer to iommu/arm,smmu-v3.txt for more information. + +Example: +Second socket, first unit chosen to illustrate need for 64 bit addresses. + +p1_sec_a: sec@d2000000 { + compatible = "hisilicon,hip07-sec"; + #address-cells = <2>; + #size-cells = <2>; + reg = <0x400 0xd0000000 0x0 0x10000 + 0x400 0xd2000000 0x0 0x10000 + 0x400 0xd2010000 0x0 0x10000 + 0x400 0xd2020000 0x0 0x10000 + 0x400 0xd2030000 0x0 0x10000 + 0x400 0xd2040000 0x0 0x10000 + 0x400 0xd2050000 0x0 0x10000 + 0x400 0xd2060000 0x0 0x10000 + 0x400 0xd2070000 0x0 0x10000 + 0x400 0xd2080000 0x0 0x10000 + 0x400 0xd2090000 0x0 0x10000 + 0x400 0xd20a0000 0x0 0x10000 + 0x400 0xd20b0000 0x0 0x10000 + 0x400 0xd20c0000 0x0 0x10000 + 0x400 0xd20d0000 0x0 0x10000 + 0x400 0xd20e0000 0x0 0x10000 + 0x400 0xd20f0000 0x0 0x10000 + 0x400 0xd2100000 0x0 0x10000>; + interrupt-parent = <&p1_mbigen_sec_a>; + iommus = <&p1_smmu_alg_a 0x600>; + dma-coherent; + interrupts = <576 4>, + <577 1>,<578 4>, + <579 1>,<580 4>, + <581 1>,<582 4>, + <583 1>,<584 4>, + <585 1>,<586 4>, + <587 1>,<588 4>, + <589 1>,<590 4>, + <591 1>,<592 4>, + <593 1>,<594 4>, + <595 1>,<596 4>, + <597 1>,<598 4>, + <599 1>,<600 4>, + <601 1>,<602 4>, + <603 1>,<604 4>, + <605 1>,<606 4>, + <607 1>,<608 4>; +};
Signature · 1 line
2.11.0
A message that is not in the archive (sent off-list or not yet received): 20180130152953.14068-2-jonathan.cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Re: [RFC PATCH 1/3] dt-bindings: Add bindings for Hisilicon SEC crypto accelerators.
Quoted 16 lines · Jonathan Cameron
From: Jonathan Cameron <[email protected]>
The hip06 and hip07 SoCs contain a number of these crypto units which accelerate AES and DES operations.
Signed-off-by Jonathan Cameron <[email protected]>--- .../bindings/crypto/hisilicon,hip07-sec.txt | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+)Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt new file +0
-0
Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt line 8
Quoted 8 lines
Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt new file +8
-0@@ -0,0 +1,71 @@ +* Hisilicon hip07 Security Accelerator (SEC) + +Required properties: +- compatible: Must contain one of + - "hisilicon,hip06-sec" + - "hisilicon,hip07-sec" +- #address-cells: Must be <2> as 64 bit addresses in reg. +- #size-cells: Must be <2> as 64 bit lengths in reg.
You don't have any child nodes, so these aren't needed.
Quoted 6 lines
Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt new file +6
-0+- reg: Memory addresses and lengths of the memory regions used by the driver. + Region 0 has registers to control the backend processing engines. + Region 1 has registers for functionality common to all queues. + Regions 2-18 have registers for the individual queues which are isolated + both in hardware and within the driver. +- interrupts: Interrupt specifiers.
Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt line 24
Quoted 10 lines
Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt new file +10
-0+ Refer to interrupt-controller/interrupts.txt for generic interrupt client node + bindings. + Interrupt 0 is for the SEC unit error queue. + Interrupt 2N + 1 is the completion interrupt for queue N. + Interrupt 2N + 2 is the error interrupt for queue N. +- dma-coherent: The driver assumes coherent dma is possible. + +Optional properties: +- iommus: The SEC units are behind smmu-v3 iommus. + Refer to iommu/arm,smmu-v3.txt for more information.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RFC PATCH 2/3 crypto: hisilicon hacv1 driver
In reply to Jonathan CameronFrom: Jonathan Cameron <[email protected]>
This accelerator is found inside hisilicon hip06 and hip07 SoCs. Each instance provides a number of queues which feed a different number of backend accleration units.
The queues are operating in an out of order mode in the interests of throughput. The silicon does not do tracking of dependencies between multiple 'messages' or update of the IVs as appropriate for training. Hence where relevant we need to do this in software.
--- drivers/crypto/Kconfig | 2 + drivers/crypto/Makefile | 1 + drivers/crypto/hisilicon/Kconfig | 16 + drivers/crypto/hisilicon/Makefile | 2 + drivers/crypto/hisilicon/sec/Makefile | 3 + drivers/crypto/hisilicon/sec/sec_algs.c | 1082 +++++++++++++++++++++++ drivers/crypto/hisilicon/sec/sec_drv.c | 1418 +++++++++++++++++++++++++++++++ drivers/crypto/hisilicon/sec/sec_drv.h | 282 ++++++ 8 files changed, 2806 insertions(+)
drivers/crypto/Kconfig +2 -0
@@ -731,4 +731,6 @@ config CRYPTO_DEV_ARTPEC6 To compile this driver as a module, choose M here. +source "drivers/crypto/hisilicon/Kconfig" + endif # CRYPTO_HW
drivers/crypto/Makefile +1 -0
@@ -45,3 +45,4 @@ obj-$(CONFIG_CRYPTO_DEV_VMX) += vmx/ obj-$(CONFIG_CRYPTO_DEV_BCM_SPU) += bcm/ obj-$(CONFIG_CRYPTO_DEV_SAFEXCEL) += inside-secure/ obj-$(CONFIG_CRYPTO_DEV_ARTPEC6) += axis/ +obj-$(CONFIG_CRYPTO_DEV_HISILICON) += hisilicon/
drivers/crypto/hisilicon/Kconfig new file +16 -0
@@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0 + +config CRYPTO_DEV_HISILICON + bool + +config CRYPTO_DEV_HISI_SEC + tristate "Support for Hisilicon SEC crypto block cipher accelerator" + select CRYPTO_DEV_HISILICON + select CRYPTO_BLKCIPHER + select CRYPTO_ALGAPI + depends on ARM64 + help + Support for Hisilicon SEC Engine in Hip06 and Hip07 + + To compile this as a module, choose M here: the module + will be called hisi_sec.
drivers/crypto/hisilicon/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_CRYPTO_DEV_HISI_SEC) += sec/
drivers/crypto/hisilicon/sec/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_CRYPTO_DEV_HISI_SEC) += hisi_sec.o +hisi_sec-y = sec_algs.o sec_drv.o
drivers/crypto/hisilicon/sec/sec_algs.c new file +1082 -0
1,082 lines not on this page · raw message
drivers/crypto/hisilicon/sec/sec_drv.c new file +1418 -0
1,418 lines not on this page · raw message
drivers/crypto/hisilicon/sec/sec_drv.h new file +282 -0
282 lines not on this page · raw message
Signature · 1 line
2.11.0
A message that is not in the archive (sent off-list or not yet received): 20180130152953.14068-3-jonathan.cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
Re: [RFC PATCH 2/3] crypto: hisilicon hacv1 driver
QW0gRGllbnN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G1lbXNldChjdHgtPmVuY19rZXksIDAsIFNFQ19NQVhfQ0lQ SEVSX0tFWSk7Cj4gKyAgICAgICAgICAgICAgIG1lbXNldChjdHgtPmRlY19rZXksIDAsIFNFQ19N QVhfQ0lQSEVSX0tFWSk7Cj4gKyAgICAgICAgICAgICAgIG1lbXNldCgmY3R4LT5lbmNfcmVxLCAw LCBzaXplb2YoY3R4LT5lbmNfcmVxKSk7Cj4gKyAgICAgICAgICAgICAgIG1lbXNldCgmY3R4LT5k ZWNfcmVxLCAwLCBzaXplb2YoY3R4LT5kZWNfcmVxKSk7Cj4gKyAgICAgICB9IGVsc2Ugewo+ICsg ICAgICAgICAgICAgICAvKiBuZXcga2V5ICovCj4gKyAgICAgICAgICAgICAgIGRldiA9IFNFQ19R X0RFVihjdHgtPnF1ZXVlKTsKPiArICAgICAgICAgICAgICAgY3R4LT5lbmNfa2V5ID0gZG1hX3ph bGxvY19jb2hlcmVudChkZXYsIFNFQ19NQVhfQ0lQSEVSX0tFWSwKPiArICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmY3R4LT5lbmNfcGtleSwKPiBHRlBf QVRPTUlDKTsgKyAgICAgICAgICAgICAgIGlmICghY3R4LT5lbmNfa2V5KSB7Cj4gKyAgICAgICAg ICAgICAgICAgICAgICAgc3Bpbl91bmxvY2soJmN0eC0+bG9jayk7Cj4gKyAgICAgICAgICAgICAg ICAgICAgICAgcmV0dXJuIC1FTk9NRU07Cj4gKyAgICAgICAgICAgICAgIH0KPiArICAgICAgICAg ICAgICAgY3R4LT5kZWNfa2V5ID0gZG1hX3phbGxvY19jb2hlcmVudChkZXYsIFNFQ19NQVhfQ0lQ SEVSX0tFWSwKPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAmY3R4LT5kZWNfcGtleSwKPiBHRlBfQVRPTUlDKTsgKyAgICAgICAgICAgICAgIGlmICgh Y3R4LT5kZWNfa2V5KSB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ZXNfeHRzKHN0 cnVjdCBjcnlwdG9fc2tjaXBoZXIgKnRmbSwKPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgY29uc3QgdTggKmtleSwgdW5zaWduZWQgaW50Cj4ga2V5bGVuKSArewo+ ICsgICAgICAgZW51bSBzZWNfY2lwaGVyX2FsZyBhbGc7Cj4gKwo+ICsgICAgICAgc3dpdGNoIChr ZXlsZW4pIHsKPiArICAgICAgIGNhc2UgQUVTX0tFWVNJWkVfMTI4ICogMjoKPiArICAgICAgICAg ICAgICAgYWxnID0gU0VDX0FFU19YVFNfMTI4Owo+ICsgICAgICAgICAgICAgICBicmVhazsKPiAr ICAgICAgIGNhc2UgQUVTX0tFWVNJWkVfMjU2ICogMjoKPiArICAgICAgICAgICAgICAgYWxnID0g U0VDX0FFU19YVFNfMjU2Owo+ICsgICAgICAgICAgICAgICBicmVhazsKPiArICAgICAgIGRlZmF1 bHQ6Cj4gKyAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwo+ICsgICAgICAgfQoKUGxlYXNl IGFkZCB4dHNfY2hlY2tfa2V5KCkKPiArCj4gKyAgICAgICByZXR1cm4gc2VjX2FsZ19za2NpcGhl cl9zZXRrZXkodGZtLCBrZXksIGtleWxlbiwgYWxnKTsACgo+ICtzdGF0aWMgaW50IHNlY19hbGdf c2tjaXBoZXJfc2V0a2V5XzNkZXNfZWNiKHN0cnVjdCBjcnlwdG9fc2tjaXBoZXIgKnRmbSwKPiAr ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHU4ICprZXks IHVuc2lnbmVkIGludAo+IGtleWxlbikgK3sKPiArICAgICAgIGlmIChrZXlsZW4gIT0gREVTX0tF WV9TSVpFICogMykKPiArICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Cj4gKwo+ICsgICAg ICAgcmV0dXJuIHNlY19hbGdfc2tjaXBoZXJfc2V0a2V5KHRmbSwga2V5LCB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PmRldl9sb2NrKTsKPiArCWZv ciAoaSA9IDA7IGkgPCBTRUNfUV9OVU07IGkrKykKCmR0by4KCkNpYW8KU3RlcGhhbg==
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH 2/3] crypto: hisilicon hacv1 driver
Quoted 9 lines · On Sat, 3 Feb 2018 12:16:18 +0100 Stephan Müller <[email protected]> wrote:
Am Dienstag, 30. Januar 2018, 16:29:52 CET schrieb Jonathan Cameron:
Hi Jonathan,
drivers/crypto/hisilicon/sec/sec_algs.c line 300
Quoted 2 lines
drivers/crypto/hisilicon/sec/sec_algs.c new file +2
-0+/* Special path for single element SGLs with small packets. */ +if (sg_is_last (sgl) && sgl->length <=SEC_SMALL_PACKET_SIZE ) {This looks strangely familiar. Is this code affected by a similar issue fixed in https://patchwork.kernel.org/patch/10173981?
Not as far as I know - this section is about optimizing the setup of the IOMMU. It's purely a performance optimization.
It is really costly to do the translation setup for lots of small regions. These small regions are often contiguous anyway making the cost even more ridiculous. The use of a dma pool allows us to keep the iommu setup constant(ish). It is cheaper to copy into an element of this, already mapped, pool than it is to set up the iommu mappings for a new region.
I could drop this for the initial submission and bring it in as an optimization with supporting numbers as a follow up patch.
Quoted 42 lines
Quoted 42 lines
drivers/crypto/hisilicon/sec/sec_algs.c new file +20
-0+static int sec_alg_skcipher_setkey (struct crypto_skcipher *tfm, +const u8 *key,unsigned int keylen, +enum sec_cipher_alg alg) +{ +struct sec_alg_skcipher_ctx *ctx =crypto_skcipher_ctx (tfm); +struct device *dev; + +spin_lock (&ctx->lock); +if (ctx->enc_key) { +/* rekeying */ + dev =SEC_Q_DEV (ctx->queue); +memset (ctx->enc_key,0 ,SEC_MAX_CIPHER_KEY ); +memset (ctx->dec_key,0 ,SEC_MAX_CIPHER_KEY ); +memset (&ctx->enc_req,0 ,sizeof (ctx->enc_req)); +memset (&ctx->dec_req,0 ,sizeof (ctx->dec_req)); + }else { +/* new key */ + dev =SEC_Q_DEV (ctx->queue); + ctx->enc_key = dma_zalloc_coherent(dev, SEC_MAX_CIPHER_KEY, + &ctx->enc_pkey,
GFP_ATOMIC); + if (!ctx->enc_key) {drivers/crypto/hisilicon/sec/sec_algs.c new file +5
-0+spin_unlock (&ctx->lock); +return -ENOMEM ; + } + ctx->dec_key = dma_zalloc_coherent(dev, SEC_MAX_CIPHER_KEY, + &ctx->dec_pkey,
GFP_ATOMIC); + if (!ctx->dec_key) {drivers/crypto/hisilicon/sec/sec_algs.c new file +14
-0+spin_unlock (&ctx->lock); + goto out_free_enc; + } + } +spin_unlock (&ctx->lock); +if (sec_alg_skcipher_init_context (tfm, key, keylen, alg)) + goto out_free_all; + +return 0 ; + +out_free_all: +memset (ctx->dec_key,0 ,SEC_MAX_CIPHER_KEY ); +dma_free_coherent (dev,SEC_MAX_CIPHER_KEY , + ctx->dec_key, ctx->dec_pkey);
Quoted 8 lines
drivers/crypto/hisilicon/sec/sec_algs.c line 538
Quoted 6 lines
drivers/crypto/hisilicon/sec/sec_algs.c new file +6
-0+ ctx->dec_key =NULL ; +out_free_enc: +memset (ctx->enc_key,0 ,SEC_MAX_CIPHER_KEY ); +dma_free_coherent (dev,SEC_MAX_CIPHER_KEY , + ctx->enc_key, ctx->enc_pkey); + ctx->enc_key =NULL ;Please use
memzero_explicit.
Will do - thanks!
Jonathan
Quoted 3 lines
Quoted 3 lines
drivers/crypto/hisilicon/sec/sec_algs.c new file +3
-0+ +return -ENOMEM ; +
Re: [RFC PATCH 2/3] crypto: hisilicon hacv1 driver
Am Montag, 5. Februar 2018, 15:02:03 CET schrieb Jonathan Cameron:
Hi Jonathan,
Quoted 2 lines
I could drop this for the initial submission and bring it in as an optimization with supporting numbers as a follow up patch.
I am not disputing the code itself. It just occurred to me that the code is similar to the fixed code which did not handle an SGL with a leading SG entry having no associated page. Thus, I thought I ask :-)
Ciao
Stephan
A message that is not in the archive (sent off-list or not yet received): 20180130152953.14068-1-jonathan.cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org
RFC PATCH 3/3 arm64: dts: hisi: add SEC crypto accelerator nodes for hip07 SoC
From: Jonathan Cameron <[email protected]>
Enable all 4 SEC units available on d05 boards.
--- arch/arm64/boot/dts/hisilicon/hip07.dtsi | 293 +++++++++++++++++++++++++++++++ 1 file changed, 293 insertions(+)
arch/arm64/boot/dts/hisilicon/hip07.dtsi +293 -0
@@ -1049,7 +1049,74 @@ num-pins = <2>; }; }; + p0_mbigen_alg_a:interrupt-controller@d0080000 { + compatible = "hisilicon,mbigen-v2"; + reg = <0x0 0xd0080000 0x0 0x10000>; + p0_mbigen_sec_a: intc_sec { + msi-parent = <&p0_its_dsa_a 0x40400>; + interrupt-controller; + #interrupt-cells = <2>; + num-pins = <33>; + }; + p0_mbigen_smmu_alg_a: intc_smmu_alg { + msi-parent = <&p0_its_dsa_a 0x40b1b>; + interrupt-controller; + #interrupt-cells = <2>; + num-pins = <3>; + }; + }; + p0_mbigen_alg_b:interrupt-controller@8,d0080000 { + compatible = "hisilicon,mbigen-v2"; + reg = <0x8 0xd0080000 0x0 0x10000>; + + p0_mbigen_sec_b: intc_sec { + msi-parent = <&p0_its_dsa_b 0x42400>; + interrupt-controller; + #interrupt-cells = <2>; + num-pins = <33>; + }; + p0_mbigen_smmu_alg_b: intc_smmu_alg { + msi-parent = <&p0_its_dsa_b 0x42b1b>; + interrupt-controller; + #interrupt-cells = <2>; + num-pins = <3>; + }; + }; + p1_mbigen_alg_a:interrupt-controller@400,d0080000 { + compatible = "hisilicon,mbigen-v2"; + reg = <0x400 0xd0080000 0x0 0x10000>; + + p1_mbigen_sec_a: intc_sec { + msi-parent = <&p1_its_dsa_a 0x44400>; + interrupt-controller; + #interrupt-cells = <2>; + num-pins = <33>; + }; + p1_mbigen_smmu_alg_a: intc_smmu_alg { + msi-parent = <&p1_its_dsa_a 0x44b1b>; + interrupt-controller; + #interrupt-cells = <2>; + num-pins = <3>; + }; + }; + p1_mbigen_alg_b:interrupt-controller@408,d0080000 { + compatible = "hisilicon,mbigen-v2"; + reg = <0x408 0xd0080000 0x0 0x10000>; + + p1_mbigen_sec_b: intc_sec { + msi-parent = <&p1_its_dsa_b 0x46400>; + interrupt-controller; + #interrupt-cells = <2>; + num-pins = <33>; + }; + p1_mbigen_smmu_alg_b: intc_smmu_alg { + msi-parent = <&p1_its_dsa_b 0x46b1b>; + interrupt-controller; + #interrupt-cells = <2>; + num-pins = <3>; + }; + }; p0_mbigen_dsa_a: interrupt-controller@c0080000 { compatible = "hisilicon,mbigen-v2"; reg = <0x0 0xc0080000 0x0 0x10000>;
@@ -1083,6 +1150,58 @@ }; }; + p0_smmu_alg_a: smmu_alg@d0040000 { + compatible = "arm,smmu-v3"; + reg = <0x0 0xd0040000 0x0 0x20000>; + interrupt-parent = <&p0_mbigen_smmu_alg_a>; + interrupts = <733 1>, + <734 1>, + <735 1>; + interrupt-names = "eventq", "gerror", "priq"; + #iommu-cells = <1>; + dma-coherent; + hisilicon,broken-prefetch-cmd; + /* smmu-cb-memtype = <0x0 0x1>;*/ + }; + p0_smmu_alg_b: smmu_alg@8,d0040000 { + compatible = "arm,smmu-v3"; + reg = <0x8 0xd0040000 0x0 0x20000>; + interrupt-parent = <&p0_mbigen_smmu_alg_b>; + interrupts = <733 1>, + <734 1>, + <735 1>; + interrupt-names = "eventq", "gerror", "priq"; + #iommu-cells = <1>; + dma-coherent; + hisilicon,broken-prefetch-cmd; + /* smmu-cb-memtype = <0x0 0x1>;*/ + }; + p1_smmu_alg_a: smmu_alg@400,d0040000 { + compatible = "arm,smmu-v3"; + reg = <0x400 0xd0040000 0x0 0x20000>; + interrupt-parent = <&p1_mbigen_smmu_alg_a>; + interrupts = <733 1>, + <734 1>, + <735 1>; + interrupt-names = "eventq", "gerror", "priq"; + #iommu-cells = <1>; + dma-coherent; + hisilicon,broken-prefetch-cmd; + /* smmu-cb-memtype = <0x0 0x1>;*/ + }; + p1_smmu_alg_b: smmu_alg@408,d0040000 { + compatible = "arm,smmu-v3"; + reg = <0x408 0xd0040000 0x0 0x20000>; + interrupt-parent = <&p1_mbigen_smmu_alg_b>; + interrupts = <733 1>, + <734 1>, + <735 1>; + interrupt-names = "eventq", "gerror", "priq"; + #iommu-cells = <1>; + dma-coherent; + hisilicon,broken-prefetch-cmd; + /* smmu-cb-memtype = <0x0 0x1>;*/ + }; soc { compatible = "simple-bus"; #address-cells = <2>;
@@ -1166,6 +1285,7 @@ reg-names = "ppe-base", "dsaf-base"; interrupt-parent = <&mbigen_dsaf0>; subctrl-syscon = <&dsa_subctrl>; + /*iommus = <&smmu1 0x0>;*/ reset-field-offset = <0>; interrupts = <576 1>, <577 1>, <578 1>, <579 1>, <580 1>,
@@ -1556,5 +1676,178 @@ 0x0 0 0 4 &mbigen_pcie2_a 671 4>; status = "disabled"; }; + p0_sec_a: sec@d2000000 { + compatible = "hisilicon,hip07-sec"; + #address-cells = <2>; + #size-cells = <2>; + reg = <0x0 0xd0000000 0x0 0x10000 + 0x0 0xd2000000 0x0 0x10000 + 0x0 0xd2010000 0x0 0x10000 + 0x0 0xd2020000 0x0 0x10000 + 0x0 0xd2030000 0x0 0x10000 + 0x0 0xd2040000 0x0 0x10000 + 0x0 0xd2050000 0x0 0x10000 + 0x0 0xd2060000 0x0 0x10000 + 0x0 0xd2070000 0x0 0x10000 + 0x0 0xd2080000 0x0 0x10000 + 0x0 0xd2090000 0x0 0x10000 + 0x0 0xd20a0000 0x0 0x10000 + 0x0 0xd20b0000 0x0 0x10000 + 0x0 0xd20c0000 0x0 0x10000 + 0x0 0xd20d0000 0x0 0x10000 + 0x0 0xd20e0000 0x0 0x10000 + 0x0 0xd20f0000 0x0 0x10000 + 0x0 0xd2100000 0x0 0x10000>; + interrupt-parent = <&p0_mbigen_sec_a>; + iommus = <&p0_smmu_alg_a 0x600>; + dma-coherent; + interrupts = <576 4>, + <577 1>,<578 4>, + <579 1>,<580 4>, + <581 1>,<582 4>, + <583 1>,<584 4>, + <585 1>,<586 4>, + <587 1>,<588 4>, + <589 1>,<590 4>, + <591 1>,<592 4>, + <593 1>,<594 4>, + <595 1>,<596 4>, + <597 1>,<598 4>, + <599 1>,<600 4>, + <601 1>,<602 4>, + <603 1>,<604 4>, + <605 1>,<606 4>, + <607 1>,<608 4>; + }; + p0_sec_b: sec@8,d2000000 { + compatible = "hisilicon,hip07-sec"; + #address-cells = <2>; + #size-cells = <2>; + reg = <0x8 0xd0000000 0x0 0x10000 + 0x8 0xd2000000 0x0 0x10000 + 0x8 0xd2010000 0x0 0x10000 + 0x8 0xd2020000 0x0 0x10000 + 0x8 0xd2030000 0x0 0x10000 + 0x8 0xd2040000 0x0 0x10000 + 0x8 0xd2050000 0x0 0x10000 + 0x8 0xd2060000 0x0 0x10000 + 0x8 0xd2070000 0x0 0x10000 + 0x8 0xd2080000 0x0 0x10000 + 0x8 0xd2090000 0x0 0x10000 + 0x8 0xd20a0000 0x0 0x10000 + 0x8 0xd20b0000 0x0 0x10000 + 0x8 0xd20c0000 0x0 0x10000 + 0x8 0xd20d0000 0x0 0x10000 + 0x8 0xd20e0000 0x0 0x10000 + 0x8 0xd20f0000 0x0 0x10000 + 0x8 0xd2100000 0x0 0x10000>; + interrupt-parent = <&p0_mbigen_sec_b>; + iommus = <&p0_smmu_alg_b 0x600>; + dma-coherent; + interrupts = <576 4>, + <577 1>,<578 4>, + <579 1>,<580 4>, + <581 1>,<582 4>, + <583 1>,<584 4>, + <585 1>,<586 4>, + <587 1>,<588 4>, + <589 1>,<590 4>, + <591 1>,<592 4>, + <593 1>,<594 4>, + <595 1>,<596 4>, + <597 1>,<598 4>, + <599 1>,<600 4>, + <601 1>,<602 4>, + <603 1>,<604 4>, + <605 1>,<606 4>, + <607 1>,<608 4>; + }; + p1_sec_a: sec@400,d2000000 { + compatible = "hisilicon,hip07-sec"; + #address-cells = <2>; + #size-cells = <2>; + reg = <0x400 0xd0000000 0x0 0x10000 + 0x400 0xd2000000 0x0 0x10000 + 0x400 0xd2010000 0x0 0x10000 + 0x400 0xd2020000 0x0 0x10000 + 0x400 0xd2030000 0x0 0x10000 + 0x400 0xd2040000 0x0 0x10000 + 0x400 0xd2050000 0x0 0x10000 + 0x400 0xd2060000 0x0 0x10000 + 0x400 0xd2070000 0x0 0x10000 + 0x400 0xd2080000 0x0 0x10000 + 0x400 0xd2090000 0x0 0x10000 + 0x400 0xd20a0000 0x0 0x10000 + 0x400 0xd20b0000 0x0 0x10000 + 0x400 0xd20c0000 0x0 0x10000 + 0x400 0xd20d0000 0x0 0x10000 + 0x400 0xd20e0000 0x0 0x10000 + 0x400 0xd20f0000 0x0 0x10000 + 0x400 0xd2100000 0x0 0x10000>; + interrupt-parent = <&p1_mbigen_sec_a>; + iommus = <&p1_smmu_alg_a 0x600>; + dma-coherent; + interrupts = <576 4>, + <577 1>,<578 4>, + <579 1>,<580 4>, + <581 1>,<582 4>, + <583 1>,<584 4>, + <585 1>,<586 4>, + <587 1>,<588 4>, + <589 1>,<590 4>, + <591 1>,<592 4>, + <593 1>,<594 4>, + <595 1>,<596 4>, + <597 1>,<598 4>, + <599 1>,<600 4>, + <601 1>,<602 4>, + <603 1>,<604 4>, + <605 1>,<606 4>, + <607 1>,<608 4>; + }; + p1_sec_b: sec@408,d2000000 { + compatible = "hisilicon,hip07-sec"; + #address-cells = <2>; + #size-cells = <2>; + reg = <0x408 0xd0000000 0x0 0x10000 + 0x408 0xd2000000 0x0 0x10000 + 0x408 0xd2010000 0x0 0x10000 + 0x408 0xd2020000 0x0 0x10000 + 0x408 0xd2030000 0x0 0x10000 + 0x408 0xd2040000 0x0 0x10000 + 0x408 0xd2050000 0x0 0x10000 + 0x408 0xd2060000 0x0 0x10000 + 0x408 0xd2070000 0x0 0x10000 + 0x408 0xd2080000 0x0 0x10000 + 0x408 0xd2090000 0x0 0x10000 + 0x408 0xd20a0000 0x0 0x10000 + 0x408 0xd20b0000 0x0 0x10000 + 0x408 0xd20c0000 0x0 0x10000 + 0x408 0xd20d0000 0x0 0x10000 + 0x408 0xd20e0000 0x0 0x10000 + 0x408 0xd20f0000 0x0 0x10000 + 0x408 0xd2100000 0x0 0x10000>; + interrupt-parent = <&p1_mbigen_sec_b>; + iommus = <&p1_smmu_alg_b 0x600>; + dma-coherent; + interrupts = <576 4>, + <577 1>,<578 4>, + <579 1>,<580 4>, + <581 1>,<582 4>, + <583 1>,<584 4>, + <585 1>,<586 4>, + <587 1>,<588 4>, + <589 1>,<590 4>, + <591 1>,<592 4>, + <593 1>,<594 4>, + <595 1>,<596 4>, + <597 1>,<598 4>, + <599 1>,<600 4>, + <601 1>,<602 4>, + <603 1>,<604 4>, + <605 1>,<606 4>, + <607 1>,<608 4>; + }; + }; };
Signature · 7 lines
2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html