Skip to content
This repository was archived by the owner on Oct 5, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions Documentation/devicetree/bindings/mfd/hisilicon,hi655x.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Hisilicon hi655x Power Management Integrated Circuit (PMIC)

hi655x consists of a large and varied group of sub-devices:

Device Supply Names Description
------ ------------ -----------
hi655x-powerkey : : Powerkey
hi655x-regulator-pmic : : Regulators
hi655x-usbvbus : : USB plug detection
hi655x-pmu-rtc : : RTC
hi655x-coul : : Coulomb

Required properties:
- compatible : Should be "hisilicon,hi655x-pmic-driver"
- reg: Base address of PMIC on hi6220 soc
- #interrupt-cells: Should be 2, is the local IRQ number for hi655x.
- interrupt-controller: hi655x has internal IRQs (has own IRQ domain).
- pmu_irq_gpio: should be &gpio_pmu_irq_n, is the IRQ gpio of hi655x.

Example:
pmic: pmic@F8000000 {
compatible = "hisilicon,hi655x-pmic-driver";
reg = <0x0 0xF8000000 0x0 0x1000>;
#interrupt-cells = <2>;
interrupt-controller;
pmu_irq_gpio = <&gpio_pmu_irq_n>;
status = "ok";

ponkey:ponkey@b1{
compatible = "hisilicon,hi655x-powerkey";
interrupt-parent = <&pmic>;
interrupts = <6 0>, <5 0>, <4 0>;
interrupt-names = "down", "up", "hold 1s";
};

coul: coul@1 {
compatible = "hisilicon,hi655x-coul";
interrupt-parent = <&pmic>;
interrupts = <24 0>, <25 0>, <26 0>, <27 0>;
interrupt-names = "cl_int_i", "cl_out_i", "cl_in_i", "vbat_int_i";
battery_product_index = <0>;
status = "ok";
};

rtc: rtc@1 {
compatible = "hisilicon,hi655x-pmu-rtc";
interrupt-parent = <&pmic>;
interrupts = <20 0>;
interrupt-names = "hi655x_pmu_rtc";
board_id = <1>;
};

usbvbus:usbvbus@b2{
compatible = "hisilicon,hi655x-usbvbus";
interrupt-parent = <&pmic>;
interrupts = <9 0>, <8 0>;
interrupt-names = "connect", "disconnect";
};

ldo2: regulator@a21 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo2";
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <3200000>;
hisilicon,valid-modes-mask = <0x02>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x029 0x02a 0x02b>;
hisilicon,ctrl-data = <0x1 0x1>;
hisilicon,vset-regs = <0x072>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <2500000>,<2600000>,<2700000>,<2800000>,<2900000>,<3000000>,<3100000>,<3200000>;
hisilicon,num_consumer_supplies = <1>;
hisilicon,consumer-supplies = "sensor_analog";
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Hi6220 mtcmos Voltage regulators

Required parent device properties:
- compatible: Must be "hisilicon,hi6220-mtcmos-driver"
- hisilicon,mtcmos-steady-us: The time to wait for power steady
- hisilicon,mtcmos-sc-on-base: address of hi6220 soc control register

Required child device properties:
- regulator-name: The name of mtcmos
- hisilicon,ctrl-regs: offset of ctrl-regs
- hisilicon,ctrl-data: the bit to ctrl the regulator

Example:
mtcmos {
compatible = "hisilicon,hi6220-mtcmos-driver";
hisilicon,mtcmos-steady-us = <10>;
hisilicon,mtcmos-sc-on-base = <0xf7800000>;
hisilicon,mtcmos-acpu-on-base = <0xf65a0000>;

mtcmos1: regulator@a1{
regulator-name = "G3D_PD_VDD";
regulator-compatible = "mtcmos1";
hisilicon,ctrl-regs = <0x830 0x834 0x83c>;
hisilicon,ctrl-data = <1 0x1>;
};
mtcmos2: regulator@a2{
regulator-name = "SOC_MED";
regulator-compatible = "mtcmos2";
hisilicon,ctrl-regs = <0x830 0x834 0x83c>;
hisilicon,ctrl-data = <2 0x1>;
};
};
275 changes: 275 additions & 0 deletions arch/arm64/boot/dts/hisilicon/hi6220.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -167,5 +167,280 @@
clocks = <&ao_ctrl 36>, <&ao_ctrl 36>;
clock-names = "uartclk", "apb_pclk";
};

mtcmos {
compatible = "hisilicon,hi6220-mtcmos-driver";
hisilicon,mtcmos-steady-us = <10>;
hisilicon,mtcmos-sc-on-base = <0xf7800000>;
hisilicon,mtcmos-acpu-on-base = <0xf65a0000>;

mtcmos1: regulator@a1{
regulator-name = "G3D_PD_VDD";
regulator-compatible = "mtcmos1";
hisilicon,ctrl-regs = <0x830 0x834 0x83c>;
hisilicon,ctrl-data = <1 0x1>;
};

mtcmos2: regulator@a2{
regulator-name = "SOC_MED";
regulator-compatible = "mtcmos2";
hisilicon,ctrl-regs = <0x830 0x834 0x83c>;
hisilicon,ctrl-data = <2 0x1>;
};
};
};

pmic: pmic@F8000000 {
compatible = "hisilicon,hi655x-pmic-driver";
reg = <0x0 0xf8000000 0x0 0x1000>;
#interrupt-cells = <2>;
interrupt-controller;
pmu_irq_gpio = <&gpio_pmu_irq_n>;
status = "ok";

ldo2: regulator@a21 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo2";
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <3200000>;
hisilicon,valid-modes-mask = <0x02>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x029 0x02a 0x02b>;
hisilicon,ctrl-data = <0x1 0x1>;
hisilicon,vset-regs = <0x072>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <2500000>,<2600000>,
<2700000>,<2800000>,
<2900000>,<3000000>,
<3100000>,<3200000>;
hisilicon,num_consumer_supplies = <1>;
hisilicon,consumer-supplies = "sensor_analog";
};

ldo7: regulator@a26 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo7";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
hisilicon,valid-modes-mask = <0x0a>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x029 0x02a 0x02b>;
hisilicon,ctrl-data = <0x6 0x1>;
hisilicon,vset-regs = <0x078>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <1800000>,<1850000>,
<2850000>,<2900000>,
<3000000>,<3100000>,
<3200000>,<3300000>;
hisilicon,num_consumer_supplies = <1>;
hisilicon,consumer-supplies = "sd_card_io";
};

ldo10: regulator@a29 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo10";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
hisilicon,valid-modes-mask = <0x0a>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <360>;
hisilicon,ctrl-regs = <0x02c 0x02d 0x02e>;
hisilicon,ctrl-data = <0x1 0x1>;
hisilicon,vset-regs = <0x07b>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <1800000>,<1850000>,
<1900000>,<2750000>,
<2800000>,<2850000>,
<2900000>,<3000000>;
hisilicon,num_consumer_supplies = <1>;
hisilicon,consumer-supplies = "sd_card";
};

ldo13: regulator@a32 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo13";
regulator-min-microvolt = <1600000>;
regulator-max-microvolt = <1950000>;
hisilicon,valid-modes-mask = <0x0a>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x02c 0x02d 0x02e>;
hisilicon,ctrl-data = <0x4 0x1>;
hisilicon,vset-regs = <0x07e>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <1600000>,<1650000>,
<1700000>,<1750000>,
<1800000>,<1850000>,
<1900000>,<1950000>;
hisilicon,num_consumer_supplies = <3>;
hisilicon,consumer-supplies = "scamera_core",
"mcamera_io",
"scamera_io";
};

ldo14: regulator@a33 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo14";
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <3200000>;
hisilicon,valid-modes-mask = <0x02>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x02c 0x02d 0x02e>;
hisilicon,ctrl-data = <0x5 0x1>;
hisilicon,vset-regs = <0x07f>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <2500000>,<2600000>,
<2700000>,<2800000>,
<2900000>,<3000000>,
<3100000>,<3200000>;
hisilicon,num_consumer_supplies = <3>;
hisilicon,consumer-supplies = "scamera_avdd",
"mcamera_avdd",
"mcamera_vcm";
};

ldo15: regulator@a34 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo15";
regulator-min-microvolt = <1600000>;
regulator-max-microvolt = <1950000>;
regulator-boot-on;
regulator-always-on;
hisilicon,valid-modes-mask = <0x0a>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x02c 0x02d 0x02e>;
hisilicon,ctrl-data = <0x6 0x1>;
hisilicon,vset-regs = <0x080>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <1600000>,<1650000>,
<1700000>,<1750000>,
<1800000>,<1850000>,
<1900000>,<1950000>;
hisilicon,num_consumer_supplies = <1>;
hisilicon,consumer-supplies = "codec_analog";
};

ldo17: regulator@a36 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo17";
regulator-min-microvolt = <2500000>;
regulator-max-microvolt = <3200000>;
hisilicon,valid-modes-mask = <0x02>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x02f 0x030 0x031>;
hisilicon,ctrl-data = <0x0 0x1>;
hisilicon,vset-regs = <0x082>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <2500000>,<2600000>,
<2700000>,<2800000>,
<2900000>,<3000000>,
<3100000>,<3200000>;
hisilicon,num_consumer_supplies = <1>;
hisilicon,consumer-supplies = "vibrator";
};

ldo19: regulator@a38 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo19";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3000000>;
hisilicon,valid-modes-mask = <0x0a>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <360>;
hisilicon,ctrl-regs = <0x02f 0x030 0x031>;
hisilicon,ctrl-data = <0x2 0x1>;
hisilicon,vset-regs = <0x084>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <1800000>,<1850000>,
<1900000>,<2750000>,
<2800000>,<2850000>,
<2900000>,<3000000>;
hisilicon,num_consumer_supplies = <1>;
hisilicon,consumer-supplies = "emmc_vddm";
};

ldo21: regulator@a40 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo21"; regulator-min-microvolt = <1650000>;
regulator-max-microvolt = <2000000>;
regulator-always-on;
hisilicon,valid-modes-mask = <0x02>; hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x02f 0x030 0x031>;
hisilicon,ctrl-data = <0x4 0x1>;
hisilicon,vset-regs = <0x086>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <1650000>,<1700000>,
<1750000>,<1800000>,
<1850000>,<1900000>,
<1950000>,<2000000>;
};

ldo22: regulator@a41 {
compatible = "hisilicon,hi655x-regulator-pmic";
regulator-name = "ldo22";
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1200000>;
regulator-boot-on;
regulator-always-on;
hisilicon,valid-modes-mask = <0x02>;
hisilicon,valid-ops-mask = <0x01d>;
hisilicon,initial-mode = <0x02>;
hisilicon,regulator-type = <0x01>;

hisilicon,off-on-delay = <120>;
hisilicon,ctrl-regs = <0x02f 0x030 0x031>;
hisilicon,ctrl-data = <0x5 0x1>;
hisilicon,vset-regs = <0x087>;
hisilicon,vset-data = <0 0x3>;
hisilicon,regulator-n-vol = <8>;
hisilicon,vset-table = <900000>,<1000000>,
<1050000>,<1100000>,
<1150000>,<1175000>,
<1185000>,<1200000>;
hisilicon,num_consumer_supplies = <1>;
hisilicon,consumer-supplies = "mcamera_core";
};
};
};
Loading