Loading bindings/pwm/pwm-qti-lpg.txt +117 −27 Original line number Diff line number Diff line Loading @@ -18,7 +18,8 @@ device module in Qualcomm Technologies, Inc. PMIC chips. Value type: <string> Definition: The name of the register defined in the reg property. It must have "lpg-base", "lut-base" is optional but it's required if any LPG channels support LUT mode. it's required if any LPG channels support LUT mode with a LUT module. - #pwm-cells: Usage: required Loading @@ -33,14 +34,47 @@ device module in Qualcomm Technologies, Inc. PMIC chips. Value type: <u32> Definition: The number of the consecutive LPG/PWM channels in the chip. - nvmem-names: Usage: optional Value type: <string> Definition: The nvmem device name for the SDAM module where the LUT pattern is stored. It must be "ppg_sdam". This property is required only when LUT mode is supported with a SDAM module instead of a LUT module. - nvmem: Usage: optional Value type: <phandle> Definition: Phandle of the nvmem device to access the LUT stored in the SDAM module. This property is required only when LUT mode is supported and the LUT pattern is stored in a SDAM module instead of a LUT module. - qcom,pbs-client Usage: optional Value type: <phandle> Definition: Phandle of the PBS client used for sending the PBS trigger. This property is required when LUT mode is supported and the LUT pattern is stored in a SDAM module instead of a LUT module. - qcom,lut-sdam-base: Usage: optional Value type: <u32> Definition: The register base of the LUT entries stored in SDAM. This property is required only when LUT mode is supported and the LUT pattern is stored in a SDAM module instead of a LUT module. - qcom,lut-patterns: Usage: optional Value type: <prop-encoded-array> Definition: Duty ratios in percentages for LPG working at LUT mode. These duty ratios will be translated into PWM values and stored in LUT module. The LUT module has resource to store 47 PWM values at max and shared for all LPG channels. This property is required if any LPG channels and stored in LUT or SDAM module shared for all LPG channels. The LUT module has resource to store 47 PWM values at max while SDAM module can store upto 64 PWM values. This property is required if any LPG channels support LUT mode. - qcom,sync-channel-ids: Loading Loading @@ -68,31 +102,37 @@ parameters needs to be configured for that channel. range is 1 - 8. Maximum value depends on the number of channels supported on PMIC. - qcom,lpg-sdam-base: Usage: optional Value type: <u32> Definition: Register base address for LPG configuration in SDAM for the LPG channel specified under "qcom,lpg-chan-id". This property is required if LUT mode is supported with a SDAM module. - qcom,ramp-step-ms: Usage: required Value type: <u32> Definition: The step duration in milliseconds for LPG staying at each duty specified in the LUT pattern. Allowed range is 1 - 511. duty specified in the LUT pattern. Allowed range: 1 - 511 when LUT module is used, and 8 - 2000 when SDAM is used. - qcom,ramp-high-index: Usage: required Value type: <u32> Definition: The high index of the LUT pattern where LPG ends up ramping to. Allowed range is 1 - 47. ramping to. Allowed range: 1 - 47 when LUT module is used, and 1 - 64 when SDAM module is used. - qcom,ramp-low-index: Usage: required Value type: <u32> Definition: The low index of the LUT pattern from where LPG begins ramping from. Allowed range is 0 - 46. - qcom,ramp-from-low-to-high: Usage: optional Value type: <empty> Definition: The flag to specify the LPG ramping direction. The ramping direction is from low index to high index of the LUT pattern if it's specified. ramping from. The ramp-low-index should be always less than ramp-high-index when SDAM module is used. Allowed range: 0 - 46 when LUT module is used, and 0 - 63 when SDAM module is used. - qcom,ramp-pattern-repeat: Usage: optional Loading @@ -100,28 +140,40 @@ parameters needs to be configured for that channel. Definition: The flag to specify if LPG would be ramping with the LUT pattern repeatedly. - qcom,ramp-from-low-to-high: Usage: optional Value type: <empty> Definition: The flag to specify the LPG ramping direction. The ramping direction is from low index to high index of the LUT pattern if it's specified. This property is not required when SDAM module is used. - qcom,ramp-toggle: Usage: optional Value type: <empty> Definition: The flag to specify if LPG would toggle the LUT pattern in ramping. If toggling enabled, LPG would return to the low index when high index is reached, or return to the high index when low index is reached. index when low index is reached. This property is not required when SDAM module is used. - qcom,ramp-pause-hi-count: Usage: optional Value type: <u32> Definition: The step count that LPG stop the output when it ramped up to the high index of the LUT. to the high index of the LUT. This property is not required when SDAM module is used. - qcom,ramp-pause-lo-count: Usage: optional Value type: <u32> Definition: The step count that LPG stop the output when it ramped up to the low index of the LUT. Example: to the low index of the LUT. This property is not required when SDAM module is used. Example when LUT pattern is stored in a LUT module: pmi8998_lpg: lpg@b100 { pm8150l_lpg: lpg@b100 { compatible = "qcom,pwm-lpg"; reg = <0xb100 0x600>, <0xb000 0x100>; reg-names = "lpg-base", "lut-base"; Loading @@ -129,9 +181,8 @@ Example: #pwm-cells = <2>; qcom,lut-patterns = <0 14 28 42 56 70 84 100 100 84 70 56 42 28 14 0>; qcom,sync-channel-ids = <3 4 5>; lpg@3 { qcom,lpg-chan-id = <3>; lpg@1 { qcom,lpg-chan-id = <1>; qcom,ramp-step-ms = <200>; qcom,ramp-pause-hi-count = <10>; qcom,ramp-pause-lo-count = <10>; Loading @@ -140,8 +191,8 @@ Example: qcom,ramp-from-low-to-high; qcom,ramp-pattern-repeat; }; lpg@4 { qcom,lpg-chan-id = <4>; lpg@2 { qcom,lpg-chan-id = <2>; qcom,ramp-step-ms = <200>; qcom,ramp-pause-hi-count = <10>; qcom,ramp-pause-lo-count = <10>; Loading @@ -150,8 +201,8 @@ Example: qcom,ramp-from-low-to-high; qcom,ramp-pattern-repeat; }; lpg@5 { qcom,lpg-chan-id = <5>; lpg@3 { qcom,lpg-chan-id = <3>; qcom,ramp-step-ms = <200>; qcom,ramp-pause-hi-count = <10>; qcom,ramp-pause-lo-count = <10>; Loading @@ -161,3 +212,42 @@ Example: qcom,ramp-pattern-repeat; }; }; Example when LUT pattern is stored in a SDAM module: pmi632_lpg: lpg@b100 { compatible = "qcom,pwm-lpg"; reg = <0xb100 0x600>; reg-names = "lpg-base"; #pwm-cells = <2>; nvmem-names = "ppg_sdam"; nvmem = <&sdam7>; qcom,pbs-client = <&pbs_client_3>; qcom,lut-sdam-base = <0x80>; qcom,lut-patterns = <0 14 28 42 56 70 84 100 100 84 70 56 42 28 14 0>; lpg@1 { qcom,lpg-chan-id = <1>; qcom,ramp-step-ms = <200>; qcom,ramp-low-index = <0>; qcom,ramp-high-index = <15>; qcom,ramp-pattern-repeat; qcom,lpg-sdam-base = <0x48>: }; lpg@2 { qcom,lpg-chan-id = <2>; qcom,ramp-step-ms = <200>; qcom,ramp-low-index = <0>; qcom,ramp-high-index = <15>; qcom,ramp-pattern-repeat; qcom,lpg-sdam-base = <0x56>; }; lpg@3 { qcom,lpg-chan-id = <3>; qcom,ramp-step-ms = <200>; qcom,ramp-low-index = <0>; qcom,ramp-high-index = <15>; qcom,ramp-pattern-repeat; qcom,lpg-sdam-base = <0x64>; }; }; Loading
bindings/pwm/pwm-qti-lpg.txt +117 −27 Original line number Diff line number Diff line Loading @@ -18,7 +18,8 @@ device module in Qualcomm Technologies, Inc. PMIC chips. Value type: <string> Definition: The name of the register defined in the reg property. It must have "lpg-base", "lut-base" is optional but it's required if any LPG channels support LUT mode. it's required if any LPG channels support LUT mode with a LUT module. - #pwm-cells: Usage: required Loading @@ -33,14 +34,47 @@ device module in Qualcomm Technologies, Inc. PMIC chips. Value type: <u32> Definition: The number of the consecutive LPG/PWM channels in the chip. - nvmem-names: Usage: optional Value type: <string> Definition: The nvmem device name for the SDAM module where the LUT pattern is stored. It must be "ppg_sdam". This property is required only when LUT mode is supported with a SDAM module instead of a LUT module. - nvmem: Usage: optional Value type: <phandle> Definition: Phandle of the nvmem device to access the LUT stored in the SDAM module. This property is required only when LUT mode is supported and the LUT pattern is stored in a SDAM module instead of a LUT module. - qcom,pbs-client Usage: optional Value type: <phandle> Definition: Phandle of the PBS client used for sending the PBS trigger. This property is required when LUT mode is supported and the LUT pattern is stored in a SDAM module instead of a LUT module. - qcom,lut-sdam-base: Usage: optional Value type: <u32> Definition: The register base of the LUT entries stored in SDAM. This property is required only when LUT mode is supported and the LUT pattern is stored in a SDAM module instead of a LUT module. - qcom,lut-patterns: Usage: optional Value type: <prop-encoded-array> Definition: Duty ratios in percentages for LPG working at LUT mode. These duty ratios will be translated into PWM values and stored in LUT module. The LUT module has resource to store 47 PWM values at max and shared for all LPG channels. This property is required if any LPG channels and stored in LUT or SDAM module shared for all LPG channels. The LUT module has resource to store 47 PWM values at max while SDAM module can store upto 64 PWM values. This property is required if any LPG channels support LUT mode. - qcom,sync-channel-ids: Loading Loading @@ -68,31 +102,37 @@ parameters needs to be configured for that channel. range is 1 - 8. Maximum value depends on the number of channels supported on PMIC. - qcom,lpg-sdam-base: Usage: optional Value type: <u32> Definition: Register base address for LPG configuration in SDAM for the LPG channel specified under "qcom,lpg-chan-id". This property is required if LUT mode is supported with a SDAM module. - qcom,ramp-step-ms: Usage: required Value type: <u32> Definition: The step duration in milliseconds for LPG staying at each duty specified in the LUT pattern. Allowed range is 1 - 511. duty specified in the LUT pattern. Allowed range: 1 - 511 when LUT module is used, and 8 - 2000 when SDAM is used. - qcom,ramp-high-index: Usage: required Value type: <u32> Definition: The high index of the LUT pattern where LPG ends up ramping to. Allowed range is 1 - 47. ramping to. Allowed range: 1 - 47 when LUT module is used, and 1 - 64 when SDAM module is used. - qcom,ramp-low-index: Usage: required Value type: <u32> Definition: The low index of the LUT pattern from where LPG begins ramping from. Allowed range is 0 - 46. - qcom,ramp-from-low-to-high: Usage: optional Value type: <empty> Definition: The flag to specify the LPG ramping direction. The ramping direction is from low index to high index of the LUT pattern if it's specified. ramping from. The ramp-low-index should be always less than ramp-high-index when SDAM module is used. Allowed range: 0 - 46 when LUT module is used, and 0 - 63 when SDAM module is used. - qcom,ramp-pattern-repeat: Usage: optional Loading @@ -100,28 +140,40 @@ parameters needs to be configured for that channel. Definition: The flag to specify if LPG would be ramping with the LUT pattern repeatedly. - qcom,ramp-from-low-to-high: Usage: optional Value type: <empty> Definition: The flag to specify the LPG ramping direction. The ramping direction is from low index to high index of the LUT pattern if it's specified. This property is not required when SDAM module is used. - qcom,ramp-toggle: Usage: optional Value type: <empty> Definition: The flag to specify if LPG would toggle the LUT pattern in ramping. If toggling enabled, LPG would return to the low index when high index is reached, or return to the high index when low index is reached. index when low index is reached. This property is not required when SDAM module is used. - qcom,ramp-pause-hi-count: Usage: optional Value type: <u32> Definition: The step count that LPG stop the output when it ramped up to the high index of the LUT. to the high index of the LUT. This property is not required when SDAM module is used. - qcom,ramp-pause-lo-count: Usage: optional Value type: <u32> Definition: The step count that LPG stop the output when it ramped up to the low index of the LUT. Example: to the low index of the LUT. This property is not required when SDAM module is used. Example when LUT pattern is stored in a LUT module: pmi8998_lpg: lpg@b100 { pm8150l_lpg: lpg@b100 { compatible = "qcom,pwm-lpg"; reg = <0xb100 0x600>, <0xb000 0x100>; reg-names = "lpg-base", "lut-base"; Loading @@ -129,9 +181,8 @@ Example: #pwm-cells = <2>; qcom,lut-patterns = <0 14 28 42 56 70 84 100 100 84 70 56 42 28 14 0>; qcom,sync-channel-ids = <3 4 5>; lpg@3 { qcom,lpg-chan-id = <3>; lpg@1 { qcom,lpg-chan-id = <1>; qcom,ramp-step-ms = <200>; qcom,ramp-pause-hi-count = <10>; qcom,ramp-pause-lo-count = <10>; Loading @@ -140,8 +191,8 @@ Example: qcom,ramp-from-low-to-high; qcom,ramp-pattern-repeat; }; lpg@4 { qcom,lpg-chan-id = <4>; lpg@2 { qcom,lpg-chan-id = <2>; qcom,ramp-step-ms = <200>; qcom,ramp-pause-hi-count = <10>; qcom,ramp-pause-lo-count = <10>; Loading @@ -150,8 +201,8 @@ Example: qcom,ramp-from-low-to-high; qcom,ramp-pattern-repeat; }; lpg@5 { qcom,lpg-chan-id = <5>; lpg@3 { qcom,lpg-chan-id = <3>; qcom,ramp-step-ms = <200>; qcom,ramp-pause-hi-count = <10>; qcom,ramp-pause-lo-count = <10>; Loading @@ -161,3 +212,42 @@ Example: qcom,ramp-pattern-repeat; }; }; Example when LUT pattern is stored in a SDAM module: pmi632_lpg: lpg@b100 { compatible = "qcom,pwm-lpg"; reg = <0xb100 0x600>; reg-names = "lpg-base"; #pwm-cells = <2>; nvmem-names = "ppg_sdam"; nvmem = <&sdam7>; qcom,pbs-client = <&pbs_client_3>; qcom,lut-sdam-base = <0x80>; qcom,lut-patterns = <0 14 28 42 56 70 84 100 100 84 70 56 42 28 14 0>; lpg@1 { qcom,lpg-chan-id = <1>; qcom,ramp-step-ms = <200>; qcom,ramp-low-index = <0>; qcom,ramp-high-index = <15>; qcom,ramp-pattern-repeat; qcom,lpg-sdam-base = <0x48>: }; lpg@2 { qcom,lpg-chan-id = <2>; qcom,ramp-step-ms = <200>; qcom,ramp-low-index = <0>; qcom,ramp-high-index = <15>; qcom,ramp-pattern-repeat; qcom,lpg-sdam-base = <0x56>; }; lpg@3 { qcom,lpg-chan-id = <3>; qcom,ramp-step-ms = <200>; qcom,ramp-low-index = <0>; qcom,ramp-high-index = <15>; qcom,ramp-pattern-repeat; qcom,lpg-sdam-base = <0x64>; }; };