1*c66ec88fSEmmanuel VadotSEC 6 is as Freescale's Cryptographic Accelerator and Assurance Module (CAAM). 2*c66ec88fSEmmanuel VadotCurrently Freescale powerpc chip C29X is embedded with SEC 6. 3*c66ec88fSEmmanuel VadotSEC 6 device tree binding include: 4*c66ec88fSEmmanuel Vadot -SEC 6 Node 5*c66ec88fSEmmanuel Vadot -Job Ring Node 6*c66ec88fSEmmanuel Vadot -Full Example 7*c66ec88fSEmmanuel Vadot 8*c66ec88fSEmmanuel Vadot===================================================================== 9*c66ec88fSEmmanuel VadotSEC 6 Node 10*c66ec88fSEmmanuel Vadot 11*c66ec88fSEmmanuel VadotDescription 12*c66ec88fSEmmanuel Vadot 13*c66ec88fSEmmanuel Vadot Node defines the base address of the SEC 6 block. 14*c66ec88fSEmmanuel Vadot This block specifies the address range of all global 15*c66ec88fSEmmanuel Vadot configuration registers for the SEC 6 block. 16*c66ec88fSEmmanuel Vadot For example, In C293, we could see three SEC 6 node. 17*c66ec88fSEmmanuel Vadot 18*c66ec88fSEmmanuel VadotPROPERTIES 19*c66ec88fSEmmanuel Vadot 20*c66ec88fSEmmanuel Vadot - compatible 21*c66ec88fSEmmanuel Vadot Usage: required 22*c66ec88fSEmmanuel Vadot Value type: <string> 23*c66ec88fSEmmanuel Vadot Definition: Must include "fsl,sec-v6.0". 24*c66ec88fSEmmanuel Vadot 25*c66ec88fSEmmanuel Vadot - fsl,sec-era 26*c66ec88fSEmmanuel Vadot Usage: optional 27*c66ec88fSEmmanuel Vadot Value type: <u32> 28*c66ec88fSEmmanuel Vadot Definition: A standard property. Define the 'ERA' of the SEC 29*c66ec88fSEmmanuel Vadot device. 30*c66ec88fSEmmanuel Vadot 31*c66ec88fSEmmanuel Vadot - #address-cells 32*c66ec88fSEmmanuel Vadot Usage: required 33*c66ec88fSEmmanuel Vadot Value type: <u32> 34*c66ec88fSEmmanuel Vadot Definition: A standard property. Defines the number of cells 35*c66ec88fSEmmanuel Vadot for representing physical addresses in child nodes. 36*c66ec88fSEmmanuel Vadot 37*c66ec88fSEmmanuel Vadot - #size-cells 38*c66ec88fSEmmanuel Vadot Usage: required 39*c66ec88fSEmmanuel Vadot Value type: <u32> 40*c66ec88fSEmmanuel Vadot Definition: A standard property. Defines the number of cells 41*c66ec88fSEmmanuel Vadot for representing the size of physical addresses in 42*c66ec88fSEmmanuel Vadot child nodes. 43*c66ec88fSEmmanuel Vadot 44*c66ec88fSEmmanuel Vadot - reg 45*c66ec88fSEmmanuel Vadot Usage: required 46*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 47*c66ec88fSEmmanuel Vadot Definition: A standard property. Specifies the physical 48*c66ec88fSEmmanuel Vadot address and length of the SEC 6 configuration registers. 49*c66ec88fSEmmanuel Vadot 50*c66ec88fSEmmanuel Vadot - ranges 51*c66ec88fSEmmanuel Vadot Usage: required 52*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 53*c66ec88fSEmmanuel Vadot Definition: A standard property. Specifies the physical address 54*c66ec88fSEmmanuel Vadot range of the SEC 6.0 register space (-SNVS not included). A 55*c66ec88fSEmmanuel Vadot triplet that includes the child address, parent address, & 56*c66ec88fSEmmanuel Vadot length. 57*c66ec88fSEmmanuel Vadot 58*c66ec88fSEmmanuel Vadot Note: All other standard properties (see the Devicetree Specification) 59*c66ec88fSEmmanuel Vadot are allowed but are optional. 60*c66ec88fSEmmanuel Vadot 61*c66ec88fSEmmanuel VadotEXAMPLE 62*c66ec88fSEmmanuel Vadot crypto@a0000 { 63*c66ec88fSEmmanuel Vadot compatible = "fsl,sec-v6.0"; 64*c66ec88fSEmmanuel Vadot fsl,sec-era = <6>; 65*c66ec88fSEmmanuel Vadot #address-cells = <1>; 66*c66ec88fSEmmanuel Vadot #size-cells = <1>; 67*c66ec88fSEmmanuel Vadot reg = <0xa0000 0x20000>; 68*c66ec88fSEmmanuel Vadot ranges = <0 0xa0000 0x20000>; 69*c66ec88fSEmmanuel Vadot }; 70*c66ec88fSEmmanuel Vadot 71*c66ec88fSEmmanuel Vadot===================================================================== 72*c66ec88fSEmmanuel VadotJob Ring (JR) Node 73*c66ec88fSEmmanuel Vadot 74*c66ec88fSEmmanuel Vadot Child of the crypto node defines data processing interface to SEC 6 75*c66ec88fSEmmanuel Vadot across the peripheral bus for purposes of processing 76*c66ec88fSEmmanuel Vadot cryptographic descriptors. The specified address 77*c66ec88fSEmmanuel Vadot range can be made visible to one (or more) cores. 78*c66ec88fSEmmanuel Vadot The interrupt defined for this node is controlled within 79*c66ec88fSEmmanuel Vadot the address range of this node. 80*c66ec88fSEmmanuel Vadot 81*c66ec88fSEmmanuel Vadot - compatible 82*c66ec88fSEmmanuel Vadot Usage: required 83*c66ec88fSEmmanuel Vadot Value type: <string> 84*c66ec88fSEmmanuel Vadot Definition: Must include "fsl,sec-v6.0-job-ring". 85*c66ec88fSEmmanuel Vadot 86*c66ec88fSEmmanuel Vadot - reg 87*c66ec88fSEmmanuel Vadot Usage: required 88*c66ec88fSEmmanuel Vadot Value type: <prop-encoded-array> 89*c66ec88fSEmmanuel Vadot Definition: Specifies a two JR parameters: an offset from 90*c66ec88fSEmmanuel Vadot the parent physical address and the length the JR registers. 91*c66ec88fSEmmanuel Vadot 92*c66ec88fSEmmanuel Vadot - interrupts 93*c66ec88fSEmmanuel Vadot Usage: required 94*c66ec88fSEmmanuel Vadot Value type: <prop_encoded-array> 95*c66ec88fSEmmanuel Vadot Definition: Specifies the interrupts generated by this 96*c66ec88fSEmmanuel Vadot device. The value of the interrupts property 97*c66ec88fSEmmanuel Vadot consists of one interrupt specifier. The format 98*c66ec88fSEmmanuel Vadot of the specifier is defined by the binding document 99*c66ec88fSEmmanuel Vadot describing the node's interrupt parent. 100*c66ec88fSEmmanuel Vadot 101*c66ec88fSEmmanuel VadotEXAMPLE 102*c66ec88fSEmmanuel Vadot jr@1000 { 103*c66ec88fSEmmanuel Vadot compatible = "fsl,sec-v6.0-job-ring"; 104*c66ec88fSEmmanuel Vadot reg = <0x1000 0x1000>; 105*c66ec88fSEmmanuel Vadot interrupts = <49 2 0 0>; 106*c66ec88fSEmmanuel Vadot }; 107*c66ec88fSEmmanuel Vadot 108*c66ec88fSEmmanuel Vadot=================================================================== 109*c66ec88fSEmmanuel VadotFull Example 110*c66ec88fSEmmanuel Vadot 111*c66ec88fSEmmanuel VadotSince some chips may contain more than one SEC, the dtsi contains 112*c66ec88fSEmmanuel Vadotonly the node contents, not the node itself. A chip using the SEC 113*c66ec88fSEmmanuel Vadotshould include the dtsi inside each SEC node. Example: 114*c66ec88fSEmmanuel Vadot 115*c66ec88fSEmmanuel VadotIn qoriq-sec6.0.dtsi: 116*c66ec88fSEmmanuel Vadot 117*c66ec88fSEmmanuel Vadot compatible = "fsl,sec-v6.0"; 118*c66ec88fSEmmanuel Vadot fsl,sec-era = <6>; 119*c66ec88fSEmmanuel Vadot #address-cells = <1>; 120*c66ec88fSEmmanuel Vadot #size-cells = <1>; 121*c66ec88fSEmmanuel Vadot 122*c66ec88fSEmmanuel Vadot jr@1000 { 123*c66ec88fSEmmanuel Vadot compatible = "fsl,sec-v6.0-job-ring", 124*c66ec88fSEmmanuel Vadot "fsl,sec-v5.2-job-ring", 125*c66ec88fSEmmanuel Vadot "fsl,sec-v5.0-job-ring", 126*c66ec88fSEmmanuel Vadot "fsl,sec-v4.4-job-ring", 127*c66ec88fSEmmanuel Vadot "fsl,sec-v4.0-job-ring"; 128*c66ec88fSEmmanuel Vadot reg = <0x1000 0x1000>; 129*c66ec88fSEmmanuel Vadot }; 130*c66ec88fSEmmanuel Vadot 131*c66ec88fSEmmanuel Vadot jr@2000 { 132*c66ec88fSEmmanuel Vadot compatible = "fsl,sec-v6.0-job-ring", 133*c66ec88fSEmmanuel Vadot "fsl,sec-v5.2-job-ring", 134*c66ec88fSEmmanuel Vadot "fsl,sec-v5.0-job-ring", 135*c66ec88fSEmmanuel Vadot "fsl,sec-v4.4-job-ring", 136*c66ec88fSEmmanuel Vadot "fsl,sec-v4.0-job-ring"; 137*c66ec88fSEmmanuel Vadot reg = <0x2000 0x1000>; 138*c66ec88fSEmmanuel Vadot }; 139*c66ec88fSEmmanuel Vadot 140*c66ec88fSEmmanuel VadotIn the C293 device tree, we add the include of public property: 141*c66ec88fSEmmanuel Vadot 142*c66ec88fSEmmanuel Vadot crypto@a0000 { 143*c66ec88fSEmmanuel Vadot /include/ "qoriq-sec6.0.dtsi" 144*c66ec88fSEmmanuel Vadot } 145*c66ec88fSEmmanuel Vadot 146*c66ec88fSEmmanuel Vadot crypto@a0000 { 147*c66ec88fSEmmanuel Vadot reg = <0xa0000 0x20000>; 148*c66ec88fSEmmanuel Vadot ranges = <0 0xa0000 0x20000>; 149*c66ec88fSEmmanuel Vadot 150*c66ec88fSEmmanuel Vadot jr@1000 { 151*c66ec88fSEmmanuel Vadot interrupts = <49 2 0 0>; 152*c66ec88fSEmmanuel Vadot }; 153*c66ec88fSEmmanuel Vadot 154*c66ec88fSEmmanuel Vadot jr@2000 { 155*c66ec88fSEmmanuel Vadot interrupts = <50 2 0 0>; 156*c66ec88fSEmmanuel Vadot }; 157*c66ec88fSEmmanuel Vadot }; 158