1*4882a593SmuzhiyunRockchip SRAM for IO Voltage Domains: 2*4882a593Smuzhiyun------------------------------------- 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunIO domain voltages on some Rockchip SoCs are variable but need to be 5*4882a593Smuzhiyunkept in sync between the regulators and the SoC using a special 6*4882a593Smuzhiyunregister. 7*4882a593Smuzhiyun 8*4882a593SmuzhiyunA specific example using rk3288: 9*4882a593Smuzhiyun- If the regulator hooked up to a pin like SDMMC0_VDD is 3.3V then 10*4882a593Smuzhiyun bit 7 of GRF_IO_VSEL needs to be 0. If the regulator hooked up to 11*4882a593Smuzhiyun that same pin is 1.8V then bit 7 of GRF_IO_VSEL needs to be 1. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunSaid another way, this driver simply handles keeping bits in the SoC's 14*4882a593Smuzhiyungeneral register file (GRF) in sync with the actual value of a voltage 15*4882a593Smuzhiyunhooked up to the pins. 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunNote that this driver specifically doesn't include: 18*4882a593Smuzhiyun- any logic for deciding what voltage we should set regulators to 19*4882a593Smuzhiyun- any logic for deciding whether regulators (or internal SoC blocks) 20*4882a593Smuzhiyun should have power or not have power 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunIf there were some other software that had the smarts of making 23*4882a593Smuzhiyundecisions about regulators, it would work in conjunction with this 24*4882a593Smuzhiyundriver. When that other software adjusted a regulator's voltage then 25*4882a593Smuzhiyunthis driver would handle telling the SoC about it. A good example is 26*4882a593Smuzhiyunvqmmc for SD. In that case the dw_mmc driver simply is told about a 27*4882a593Smuzhiyunregulator. It changes the regulator between 3.3V and 1.8V at the 28*4882a593Smuzhiyunright time. This driver notices the change and makes sure that the 29*4882a593SmuzhiyunSoC is on the same page. 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunRequired properties: 33*4882a593Smuzhiyun- compatible: should be one of: 34*4882a593Smuzhiyun - "rockchip,px30-io-voltage-domain" for px30 35*4882a593Smuzhiyun - "rockchip,px30-pmu-io-voltage-domain" for px30 pmu-domains 36*4882a593Smuzhiyun - "rockchip,rk3188-io-voltage-domain" for rk3188 37*4882a593Smuzhiyun - "rockchip,rk3228-io-voltage-domain" for rk3228 38*4882a593Smuzhiyun - "rockchip,rk3288-io-voltage-domain" for rk3288 39*4882a593Smuzhiyun - "rockchip,rk3308-io-voltage-domain" for rk3308 40*4882a593Smuzhiyun - "rockchip,rk3328-io-voltage-domain" for rk3328 41*4882a593Smuzhiyun - "rockchip,rk3368-io-voltage-domain" for rk3368 42*4882a593Smuzhiyun - "rockchip,rk3368-pmu-io-voltage-domain" for rk3368 pmu-domains 43*4882a593Smuzhiyun - "rockchip,rk3399-io-voltage-domain" for rk3399 44*4882a593Smuzhiyun - "rockchip,rk3399-pmu-io-voltage-domain" for rk3399 pmu-domains 45*4882a593Smuzhiyun - "rockchip,rk3568-pmu-io-voltage-domain" for rk3568 pmu-domains 46*4882a593Smuzhiyun - "rockchip,rv1108-io-voltage-domain" for rv1108 47*4882a593Smuzhiyun - "rockchip,rv1108-pmu-io-voltage-domain" for rv1108 pmu-domains 48*4882a593Smuzhiyun - "rockchip,rv1126-pmu-io-voltage-domain" for rv1126 pmu-domains 49*4882a593Smuzhiyun 50*4882a593SmuzhiyunDeprecated properties: 51*4882a593Smuzhiyun- rockchip,grf: phandle to the syscon managing the "general register files" 52*4882a593Smuzhiyun Systems should move the io-domains to a sub-node of the grf simple-mfd. 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunYou specify supplies using the standard regulator bindings by including 55*4882a593Smuzhiyuna phandle the relevant regulator. All specified supplies must be able 56*4882a593Smuzhiyunto report their voltage. The IO Voltage Domain for any non-specified 57*4882a593Smuzhiyunsupplies will be not be touched. 58*4882a593Smuzhiyun 59*4882a593SmuzhiyunPossible supplies for PX30: 60*4882a593Smuzhiyun- vccio6-supply: The supply connected to VCCIO6. 61*4882a593Smuzhiyun- vccio1-supply: The supply connected to VCCIO1. 62*4882a593Smuzhiyun- vccio2-supply: The supply connected to VCCIO2. 63*4882a593Smuzhiyun- vccio3-supply: The supply connected to VCCIO3. 64*4882a593Smuzhiyun- vccio4-supply: The supply connected to VCCIO4. 65*4882a593Smuzhiyun- vccio5-supply: The supply connected to VCCIO5. 66*4882a593Smuzhiyun- vccio-oscgpi-supply: The supply connected to VCCIO_OSCGPI. 67*4882a593Smuzhiyun 68*4882a593SmuzhiyunPossible supplies for PX30 pmu-domains: 69*4882a593Smuzhiyun- pmuio1-supply: The supply connected to PMUIO1. 70*4882a593Smuzhiyun- pmuio2-supply: The supply connected to PMUIO2. 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunPossible supplies for rk3188: 73*4882a593Smuzhiyun- ap0-supply: The supply connected to AP0_VCC. 74*4882a593Smuzhiyun- ap1-supply: The supply connected to AP1_VCC. 75*4882a593Smuzhiyun- cif-supply: The supply connected to CIF_VCC. 76*4882a593Smuzhiyun- flash-supply: The supply connected to FLASH_VCC. 77*4882a593Smuzhiyun- lcdc0-supply: The supply connected to LCD0_VCC. 78*4882a593Smuzhiyun- lcdc1-supply: The supply connected to LCD1_VCC. 79*4882a593Smuzhiyun- vccio0-supply: The supply connected to VCCIO0. 80*4882a593Smuzhiyun- vccio1-supply: The supply connected to VCCIO1. 81*4882a593Smuzhiyun Sometimes also labeled VCCIO1 and VCCIO2. 82*4882a593Smuzhiyun 83*4882a593SmuzhiyunPossible supplies for rk3228: 84*4882a593Smuzhiyun- vccio1-supply: The supply connected to VCCIO1. 85*4882a593Smuzhiyun- vccio2-supply: The supply connected to VCCIO2. 86*4882a593Smuzhiyun- vccio3-supply: The supply connected to VCCIO3. 87*4882a593Smuzhiyun- vccio4-supply: The supply connected to VCCIO4. 88*4882a593Smuzhiyun 89*4882a593SmuzhiyunPossible supplies for rk3288: 90*4882a593Smuzhiyun- audio-supply: The supply connected to APIO4_VDD. 91*4882a593Smuzhiyun- bb-supply: The supply connected to APIO5_VDD. 92*4882a593Smuzhiyun- dvp-supply: The supply connected to DVPIO_VDD. 93*4882a593Smuzhiyun- flash0-supply: The supply connected to FLASH0_VDD. Typically for eMMC 94*4882a593Smuzhiyun- flash1-supply: The supply connected to FLASH1_VDD. Also known as SDIO1. 95*4882a593Smuzhiyun- gpio30-supply: The supply connected to APIO1_VDD. 96*4882a593Smuzhiyun- gpio1830 The supply connected to APIO2_VDD. 97*4882a593Smuzhiyun- lcdc-supply: The supply connected to LCDC_VDD. 98*4882a593Smuzhiyun- sdcard-supply: The supply connected to SDMMC0_VDD. 99*4882a593Smuzhiyun- wifi-supply: The supply connected to APIO3_VDD. Also known as SDIO0. 100*4882a593Smuzhiyun 101*4882a593SmuzhiyunPossible supplies for rk3368: 102*4882a593Smuzhiyun- audio-supply: The supply connected to APIO3_VDD. 103*4882a593Smuzhiyun- dvp-supply: The supply connected to DVPIO_VDD. 104*4882a593Smuzhiyun- flash0-supply: The supply connected to FLASH0_VDD. Typically for eMMC 105*4882a593Smuzhiyun- gpio30-supply: The supply connected to APIO1_VDD. 106*4882a593Smuzhiyun- gpio1830 The supply connected to APIO4_VDD. 107*4882a593Smuzhiyun- sdcard-supply: The supply connected to SDMMC0_VDD. 108*4882a593Smuzhiyun- wifi-supply: The supply connected to APIO2_VDD. Also known as SDIO0. 109*4882a593Smuzhiyun 110*4882a593SmuzhiyunPossible supplies for rk3368 pmu-domains: 111*4882a593Smuzhiyun- pmu-supply: The supply connected to PMUIO_VDD. 112*4882a593Smuzhiyun- vop-supply: The supply connected to LCDC_VDD. 113*4882a593Smuzhiyun 114*4882a593SmuzhiyunPossible supplies for rk3399: 115*4882a593Smuzhiyun- bt656-supply: The supply connected to APIO2_VDD. 116*4882a593Smuzhiyun- audio-supply: The supply connected to APIO5_VDD. 117*4882a593Smuzhiyun- sdmmc-supply: The supply connected to SDMMC0_VDD. 118*4882a593Smuzhiyun- gpio1830-supply: The supply connected to APIO4_VDD. 119*4882a593Smuzhiyun 120*4882a593SmuzhiyunPossible supplies for rk3399 pmu-domains: 121*4882a593Smuzhiyun- pmu1830-supply:The supply connected to PMUIO2_VDD. 122*4882a593Smuzhiyun 123*4882a593SmuzhiyunPossible supplies for rk3568 pmu-domains: 124*4882a593Smuzhiyun- vccio1-supply:The supply connected to VCCIO1. 125*4882a593Smuzhiyun- vccio2-supply:The supply connected to VCCIO2, can be reserved since ignored by driver. 126*4882a593Smuzhiyun- vccio3-supply:The supply connected to VCCIO3. 127*4882a593Smuzhiyun- vccio4-supply:The supply connected to VCCIO4. 128*4882a593Smuzhiyun- vccio5-supply:The supply connected to VCCIO5. 129*4882a593Smuzhiyun- vccio6-supply:The supply connected to VCCIO6. 130*4882a593Smuzhiyun- vccio7-supply:The supply connected to VCCIO7. 131*4882a593Smuzhiyun- pmuio1-supply:The supply connected to PMUIO1, 3.3v only can be reserved 132*4882a593Smuzhiyun- pmuio2-supply:The supply connected to PMUIO2. 133*4882a593Smuzhiyun 134*4882a593SmuzhiyunPossible supplies for rv1126 pmu-domains: 135*4882a593Smuzhiyun- vccio1-supply:The supply connected to VCCIO1_VDD. 136*4882a593Smuzhiyun- vccio2-supply:The supply connected to VCCIO2_VDD. 137*4882a593Smuzhiyun- vccio3-supply:The supply connected to VCCIO3_VDD. 138*4882a593Smuzhiyun- vccio4-supply:The supply connected to VCCIO4_VDD. 139*4882a593Smuzhiyun- vccio5-supply:The supply connected to VCCIO5_VDD. 140*4882a593Smuzhiyun- vccio6-supply:The supply connected to VCCIO6_VDD. 141*4882a593Smuzhiyun- vccio7-supply:The supply connected to VCCIO7_VDD. 142*4882a593Smuzhiyun- pmuio1-supply:The supply connected to PMUIO1_VDD. 143*4882a593Smuzhiyun- pmuio2-supply:The supply connected to PMUIO2_VDD. 144*4882a593Smuzhiyun 145*4882a593SmuzhiyunExample: 146*4882a593Smuzhiyun 147*4882a593Smuzhiyun io-domains { 148*4882a593Smuzhiyun compatible = "rockchip,rk3288-io-voltage-domain"; 149*4882a593Smuzhiyun rockchip,grf = <&grf>; 150*4882a593Smuzhiyun 151*4882a593Smuzhiyun audio-supply = <&vcc18_codec>; 152*4882a593Smuzhiyun bb-supply = <&vcc33_io>; 153*4882a593Smuzhiyun dvp-supply = <&vcc_18>; 154*4882a593Smuzhiyun flash0-supply = <&vcc18_flashio>; 155*4882a593Smuzhiyun gpio1830-supply = <&vcc33_io>; 156*4882a593Smuzhiyun gpio30-supply = <&vcc33_pmuio>; 157*4882a593Smuzhiyun lcdc-supply = <&vcc33_lcd>; 158*4882a593Smuzhiyun sdcard-supply = <&vccio_sd>; 159*4882a593Smuzhiyun wifi-supply = <&vcc18_wl>; 160*4882a593Smuzhiyun }; 161