Rail-Specific Parameters

Rail-specific parameters take the following format:

  • The rail specific commands are divided into blocks.
  • Each rail can have one or more blocks. Each block of given rails are indexed starting from 0.
  • Each block contains either MMIO or I2C commands. If both MMIO and I2C commands are required then commands are broken into multiple blocks.
  • If block contains I2C type of commands then all commands are sent to same device. If it is require having i2c commands for multiple devices then it needs to split into multiple blocks.
  • If commands on given blocks are I2C type the device address, register address size, register data size are parameters which is not needed for MMIO commands.
  • Given block can contain more than one commands but all commands are same type.
  • Delay is provided after each commands of a given blocks. The delay are same for all commands. If different delay are required then it need to split into multiple blocks.

    The rail-specific configuration are divided into blocks.

    • Each rail can have one or more blocks.
    • Each block can have only one type of commands (either of I2C, PWM or MMIO).
    • Each PMIC rail-specific configuration is of the form:
      / {
        pmic {
          <rail-name> {
            block@<index> {
              <parameter> = <value>;
            };
          };
        };
      };
      Where <rail-name> identifies the rail and is one of the following:
      Name Description
      system System PMIC configuration.
      core Core/SOC rail configuration.
      memio DRAM related rail configuration.
      thermal External thermal sensor configuration.
      platform Platform's other I2C configuration.
    • block-<index>: The rail specific commands are divided into blocks. Each rail can have multiple blocks. Each block of given rails indexed starting from 0.
    • <parameter> is one of the following:
      Table 1.
      Parameter Description
      <type> Type of commands in the block. Valid properties are i2c-controller, pwm, or mmio.
      commands {
        <group-name> {
          command@N {
            reg-addr = <reg-address>;
            mask = <reg-mask>;
            value = <reg-value>;
          };
        };
      };

      <group-name> node is the logical command group name and it is OPT←-

      IONAL. N is the sequential number for the command starting from 0.

      MMIO or I2C commands (based on type):
      1. MMIO:

        MMIO command (valid only if block has mmio property), where, <address> is absolute address of MMIO register and <mask> is the 32 bit mask that is applied to the value read from the MMIO address to facilitate read-modify-write operation. <value> is the value written into the register.

      2. i2c-controller:

        I2c command, where <address> is the I2c slave register address, and <mask> is I2C slave mask that is applied to the value read from the I2C slave register, to facilitate read-modify-write operation. <value> is the value written into the register.

      <i2c-parameter> I2C parameter (valid only if the block has i2ccontroller property), which is one of the following:
      1. block-delay:

        Delay (in microseconds) after each command in the block. <index> is the block index (starting from 0).

      2. i2c-controller-id: I2C controller instance.
      3. slave-addr: 7-bit I2C secondary address.
      4. reg-data-size:

        Register size in bits. Valid values are 0 (1-byte), 8 (1-byte), and 16 (2-byte).

      5. reg-addr-size:

        Register address size in bits. Valid values are 0 (1-byte), 8 (1-byte), and 16 (2-byte).

      pwm PWM parameter (valid only if block has pwm property), which is one of the following:
      1. controller-id: PWM controller instance (0-7).
      2. source-frq-hz: PWM clock source frequency (in Hz).
      3. period-ns: PWM time period (in nanoseconds).
      4. min-microvolts: Vout from PWM regulator if duty cycle is 0.
      5. max-macrovolts: Vout from PWM regulator if duty cycle is 100.
      6. init-microvolts: Vout from PWM regulator aftre initialization.
      7. enable: 0 (configure PWM but do not enable) or 1 (enable PWM after configuring).
  • New DTS format example of pmic configuration file:
    /dts-v1/;
    / {
    pmic {
      system {
        block@0 {
          controller-id = <4>;
          slave-addr = <0x78>; // 7BIt:0x3c
          reg-data-size = <8>;
          reg-addr-size = <8>;
          block-delay = <10>;
          i2c-update-verify = <1>; //update and verify
          commands {
            cpu-rail-cmds {
              command@0 {
                reg-addr = <0x50>;
                mask = <0xC0>;
                value = <0x00>;
              };
            };
            gpio07-cmds {
              command@0 {
                reg-addr = <0xAA>;
                mask = <0xBB>;
                value = <0xCC>;
              };
            };
            misc-cmds {
              command@0 {
                reg-addr = <0x53>;
                mask = <0x38>;
                value = <0x00>;
              };
            };
          };
        };
      };
      core {
        block@0 {
          pwm;
          controller-id = <6>;
          source-frq-hz = <204000000>;
          period-ns = <1255>;
          min-microvolts = <400000>;
          max-microvolts = <1200000>;
          init-microvolts = <850000>;
          enable;
        };
        block@1 {
          mmio;
          block-delay = <3000>;
          commands {
            command@0 {
              reg-addr = <0x02434080>;
              mask = <0x10>;
              value = <0x0>;
            };
          };
        };
      };
      platform {
        block@0 {
          i2c-controller;
          controller-id = <1>;
          slave-addr = <0x40>;
          reg-data-size = <8>;
          reg-addr-size = <8>;
          block-delay = <10>;
          i2c-update-verify = <1>;
          commands {
            command@0 {
              reg-addr = <0x03>;
              mask = <0x30>;
              value = <0x00>;
            };
            command@1 {
              reg-addr = <0x01>;
              mask = <0x30>;
              value = <0x20>;
            };
          };
        };
      };
    };
    };