rk808 dts属性介绍

rk808 Power Management Integrated Circuit

Required properties:
- compatible: "rockchip,rk808"
- reg: I2C slave address
- gpios: the interrupt pin or sleep pin
  use gpio get IRQ number
- regulators: This is the list of child nodes that specify the regulator
  initialization data for defined regulators. Not all regulators for the given
  device need to be present. The definition for each of these nodes is defined
  using the standard binding for regulators found at
  Documentation/devicetree/bindings/regulator/regulator.txt.
  The regulator is matched with the regulator-compatible.

  The valid regulator-compatible values are:
  rk808: rk_dcdc1, rk_dcdc2, rk_dcdc3, rk_dcdc4, rk_ldo1, rk_ldo2, rk_ldo3, rk_ldo4, rk_ldo5, rk_ldo6,
            rk_ldo7, rk_ldo8

Optional properties:
- gpios:
    gpios 0 :irq pin gpio
    gpios 1 :sleep pin gpio
- regulator-initial-mode: default mode to set on startup
- regulator-initial-state: suspend state to set at init
- regulator-state-mem, regulator-state-disk, regulator-state-standby:
    defines regulator suspend to memory, suspend to disk (hibernate) and standby respectively.
    have following sub-constarints:
    - regulator-state-uv: suspend voltage
    - regulator-state-mode: suspend regulator operating mode
    - regulator-state-enabled: is regulator enabled in this suspend state
    - regulator-state-disabled: is the regulator disbled in this suspend state
-regulator-initial-mode and regulator-state-mode is set as:
    REGULATOR_MODE_FAST            0x1
    REGULATOR_MODE_NORMAL            0x2
    REGULATOR_MODE_IDLE            0x4
    REGULATOR_MODE_STANDBY            0x8
 
Example:

    rk808: rk808@1b {
        reg = <0x1b>;
        status = "okay";
    };

    gpios =<&gpio0 GPIO_B3 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>;

&rk808 {
    compatible = "rockchip,rk808";
    
    regulators {
        #address-cells = <1>;
        #size-cells = <0>;    

        rk808_dcdc1_reg: regulator@0 {
            reg = <0>;
            regulator-compatible = "rk_dcdc1";
            regulator-min-microvolt = <700000>;
            regulator-max-microvolt = <1500000>;
            regulator-initial-mode = <0x2>;
            regulator-initial-state = <3>;
            regulator-state-mem {
                regulator-state-mode = <0x2>;     
                regulator-state-enabled;         
                regulator-state-uv = <900000>;
            };        
        };

        rk808_dcdc2_reg: regulator@1 {
            reg = <1>;
            regulator-compatible = "rk_dcdc2";
            regulator-min-microvolt = <700000>;
            regulator-max-microvolt = <1500000>;    
            regulator-initial-mode = <0x2>;
            regulator-initial-state = <3>;
            regulator-state-mem {
                regulator-state-mode = <0x2>;
                regulator-state-enabled;
                regulator-state-uv = <900000>;
            };        
        };

你可能感兴趣的:(linux,kernel,devicetree)