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