Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1413446 > unrolled thread
| Started by | Rhyland Klein <rklein@nvidia.com> |
|---|---|
| First post | 2016-06-03 22:30 +0200 |
| Last post | 2016-06-07 13:50 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ARM64: boot: dts: Add regulators for Tegra210 Smaug Rhyland Klein <rklein@nvidia.com> - 2016-06-03 22:30 +0200
Re: [PATCH] ARM64: boot: dts: Add regulators for Tegra210 Smaug Laxman Dewangan <ldewangan@nvidia.com> - 2016-06-06 09:00 +0200
Re: [PATCH] ARM64: boot: dts: Add regulators for Tegra210 Smaug Rhyland Klein <rklein@nvidia.com> - 2016-06-07 00:00 +0200
Re: [PATCH] ARM64: boot: dts: Add regulators for Tegra210 Smaug Laxman Dewangan <ldewangan@nvidia.com> - 2016-06-07 13:50 +0200
| From | Rhyland Klein <rklein@nvidia.com> |
|---|---|
| Date | 2016-06-03 22:30 +0200 |
| Subject | [PATCH] ARM64: boot: dts: Add regulators for Tegra210 Smaug |
| Message-ID | <rG3Tb-7Tx-7@gated-at.bofh.it> |
Add regulators to the Tegra210 Smaug DTS file including
support for the max77620 PMIC.
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
---
arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 350 ++++++++++++++++++++++++++
1 file changed, 350 insertions(+)
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
index 4d89f4e02d98..fdca5b5d79e8 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
@@ -1,6 +1,7 @@
/dts-v1/;
#include <dt-bindings/input/input.h>
+#include <dt-bindings/mfd/max77620.h>
#include <dt-bindings/pinctrl/pinctrl-tegra.h>
#include "tegra210.dtsi"
@@ -1327,6 +1328,269 @@
};
};
+ i2c@7000d000 {
+ status = "okay";
+ clock-frequency = <1000000>;
+
+ max77620: max77620@3c {
+ compatible = "maxim,max77620";
+ reg = <0x3c>;
+ interrupts = <0 86 IRQ_TYPE_NONE>;
+
+ #interrupt-cells = <2>;
+ interrupt-controller;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&max77620_default>;
+
+ max77620_default: pinmux@0 {
+ pin_gpio {
+ pins = "gpio0", "gpio1", "gpio2", "gpio5",
+ "gpio6", "gpio7";
+ function = "gpio";
+ };
+
+ /*
+ * GPIO3 is used to en_pp3300, and it is part of power
+ * sequence, So it must be sequenced up (automatically
+ * set by OTP) and down properly.
+ */
+ pin_gpio3 {
+ pins = "gpio3";
+ function = "fps-out";
+ drive-open-drain = <1>;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
+ maxim,active-fps-power-up-slot = <4>;
+ maxim,active-fps-power-down-slot = <2>;
+ };
+
+ pin_gpio5_6_7 {
+ pins = "gpio5", "gpio6";
+ function = "gpio";
+ drive-push-pull = <1>;
+ };
+
+ pin_32k {
+ pins = "gpio4";
+ function = "32k-out1";
+ };
+ };
+
+ fps {
+ fps0 {
+ maxim,shutdown-fps-time-period-us = <5120>;
+ maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
+ };
+
+ fps1 {
+ maxim,shutdown-fps-time-period-us = <5120>;
+ maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
+ maxim,enable-sleep;
+ };
+
+ fps2 {
+ maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
+ };
+ };
+
+ regulators {
+ in-ldo0-1-supply = <&pp1350>;
+ in-ldo2-supply = <&pp3300>;
+ in-ldo3-5-supply = <&pp3300>;
+ in-ldo7-8-supply = <&pp1350>;
+
+ ppvar_soc: sd0 {
+ regulator-name = "PPVAR_SOC";
+ regulator-min-microvolt = <825000>;
+ regulator-max-microvolt = <1125000>;
+ regulator-enable-ramp-delay = <146>;
+ regulator-disable-ramp-delay = <4080>;
+ regulator-ramp-delay = <27500>;
+ regulator-ramp-delay-scale = <300>;
+ regulator-always-on;
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
+ maxim,active-fps-power-up-slot = <1>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+
+ pp1100_sd1: sd1 {
+ regulator-name = "PP1100";
+ regulator-min-microvolt = <1125000>;
+ regulator-max-microvolt = <1125000>;
+ regulator-enable-ramp-delay = <130>;
+ regulator-disable-ramp-delay = <145800>;
+ regulator-ramp-delay = <27500>;
+ regulator-ramp-delay-scale = <300>;
+ regulator-always-on;
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
+ maxim,active-fps-power-up-slot = <5>;
+ maxim,active-fps-power-down-slot = <1>;
+ };
+
+ pp1350: sd2 {
+ regulator-name = "PP1350";
+ regulator-min-microvolt = <1350000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-enable-ramp-delay = <176>;
+ regulator-disable-ramp-delay = <32000>;
+ regulator-ramp-delay = <27500>;
+ regulator-ramp-delay-scale = <350>;
+ regulator-always-on;
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ maxim,active-fps-power-up-slot = <2>;
+ maxim,active-fps-power-down-slot = <5>;
+ };
+
+ pp1800: sd3 {
+ regulator-name = "PP1800";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <242>;
+ regulator-disable-ramp-delay = <118000>;
+ regulator-ramp-delay = <27500>;
+ regulator-ramp-delay-scale = <360>;
+ regulator-always-on;
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
+ maxim,active-fps-power-up-slot = <3>;
+ maxim,active-fps-power-down-slot = <3>;
+ };
+
+ pp1200_avdd: ldo0 {
+ regulator-name = "PP1200_AVDD";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <26>;
+ regulator-disable-ramp-delay = <626>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ maxim,active-fps-power-up-slot = <0>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+
+ pp1200_rcam: ldo1 {
+ regulator-name = "PP1200_RCAM";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-enable-ramp-delay = <22>;
+ regulator-disable-ramp-delay = <630>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ maxim,active-fps-power-up-slot = <0>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+
+ pp_ldo2: ldo2 {
+ regulator-name = "PP_LDO2";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <62>;
+ regulator-disable-ramp-delay = <650>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ regulator-always-on;
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ maxim,active-fps-power-up-slot = <0>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+
+ pp2800l_rcam: ldo3 {
+ regulator-name = "PP2800L_RCAM";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <50>;
+ regulator-disable-ramp-delay = <1110>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ maxim,active-fps-power-up-slot = <0>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+
+ pp100_soc_rtc: ldo4 {
+ regulator-name = "PP1100_SOC_RTC";
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+ regulator-enable-ramp-delay = <22>;
+ regulator-disable-ramp-delay = <610>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ regulator-always-on; /* Check this */
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
+ maxim,active-fps-power-up-slot = <1>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+
+ pp2800l_fcam: ldo5 {
+ regulator-name = "PP2800L_FCAM";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ regulator-enable-ramp-delay = <62>;
+ regulator-disable-ramp-delay = <640>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ maxim,active-fps-power-up-slot = <0>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+
+ ldo6 {
+ /* Unused. */
+ regulator-name = "PP_LDO6";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-enable-ramp-delay = <36>;
+ regulator-disable-ramp-delay = <674>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ maxim,active-fps-power-up-slot = <0>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+
+ pp1050_avdd: ldo7 {
+ regulator-name = "PP1050_AVDD";
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-enable-ramp-delay = <24>;
+ regulator-disable-ramp-delay = <2768>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ regulator-always-on;
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_1>;
+ maxim,active-fps-power-up-slot = <3>;
+ maxim,active-fps-power-down-slot = <4>;
+ };
+
+ avddio_1v05: ldo8 {
+ regulator-name = "AVDDIO_1V05";
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-enable-ramp-delay = <22>;
+ regulator-disable-ramp-delay = <1160>;
+ regulator-ramp-delay = <100000>;
+ regulator-ramp-delay-scale = <200>;
+ regulator-boot-on;
+ maxim,active-fps-source = <MAX77620_FPS_SRC_NONE>;
+ maxim,active-fps-power-up-slot = <0>;
+ maxim,active-fps-power-down-slot = <7>;
+ };
+ };
+ };
+ };
+
pmc@7000e400 {
nvidia,invert-interrupt;
nvidia,suspend-mode = <0>;
@@ -1421,4 +1685,90 @@
compatible = "arm,psci-1.0";
method = "smc";
};
+
+ regulators {
+ compatible = "simple-bus";
+ device_type = "fixed-regulators";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ppvar_sys: regulator@0 {
+ compatible = "regulator-fixed";
+ reg = <0>;
+ regulator-name = "PPVAR_SYS";
+ regulator-min-microvolt = <4400000>;
+ regulator-max-microvolt = <4400000>;
+ regulator-always-on;
+ };
+
+ pplcd_vdd: regulator@1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "PPLCD_VDD";
+ regulator-min-microvolt = <4400000>;
+ regulator-max-microvolt = <4400000>;
+ gpio = <&gpio TEGRA_GPIO(V, 4) 0>;
+ enable-active-high;
+ regulator-boot-on;
+ };
+
+ pp3000_always: regulator@2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "PP3000_ALWAYS";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-always-on;
+ };
+
+ pp3300: regulator@3 {
+ compatible = "regulator-fixed";
+ reg = <3>;
+ regulator-name = "PP3300";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ gpio = <&max77620 3 0>;
+ enable-active-high;
+ };
+
+ pp5000: regulator@4 {
+ compatible = "regulator-fixed";
+ reg = <4>;
+ regulator-name = "PP5000";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ pp1800_lcdio: regulator@5 {
+ compatible = "regulator-fixed";
+ reg = <5>;
+ regulator-name = "PP1800_LCDIO";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&gpio TEGRA_GPIO(V, 3) 0>;
+ enable-active-high;
+ regulator-boot-on;
+ };
+
+ pp1800_cam: regulator@6 {
+ compatible = "regulator-fixed";
+ reg= <6>;
+ regulator-name = "PP1800_CAM";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ gpio = <&gpio TEGRA_GPIO(K, 3) 0>;
+ enable-active-high;
+ };
+
+ usbc_vbus: regulator@7 {
+ compatible = "regulator-fixed";
+ reg = <7>;
+ regulator-name = "USBC_VBUS";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+ };
};
--
1.9.1
[toc] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-06-06 09:00 +0200 |
| Message-ID | <rGWFX-1kN-11@gated-at.bofh.it> |
| In reply to | #1413446 |
On Saturday 04 June 2016 01:52 AM, Rhyland Klein wrote:
> +
> + max77620_default: pinmux@0 {
> + pin_gpio {
> + pins = "gpio0", "gpio1", "gpio2", "gpio5",
> + "gpio6", "gpio7";
gpio5 and gpio6 are already there in below nodes and hence it is not
needed here.
> + function = "gpio";
> + };
> +
> + /*
> + * GPIO3 is used to en_pp3300, and it is part of power
> + * sequence, So it must be sequenced up (automatically
> + * set by OTP) and down properly.
> + */
> + pin_gpio3 {
> + pins = "gpio3";
> + function = "fps-out";
> + drive-open-drain = <1>;
> + maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
> + maxim,active-fps-power-up-slot = <4>;
> + maxim,active-fps-power-down-slot = <2>;
> + };
> +
> + pin_gpio5_6_7 {
node name should be gpio5_6 as there is no gpio7 inside this node.
> +
> + regulators {
> + in-ldo0-1-supply = <&pp1350>;
> + in-ldo2-supply = <&pp3300>;
> + in-ldo3-5-supply = <&pp3300>;
> + in-ldo7-8-supply = <&pp1350>;
> +
> + ppvar_soc: sd0 {
> + regulator-name = "PPVAR_SOC";
> + regulator-min-microvolt = <825000>;
> + regulator-max-microvolt = <1125000>;
> + regulator-enable-ramp-delay = <146>;
> + regulator-disable-ramp-delay = <4080>;
> + regulator-ramp-delay = <27500>;
> + regulator-ramp-delay-scale = <300>;
There is no disable-ramp-delay in mainline.
Please use the correct value for property as:
regulator-ramp-delay = <9000>;
maxim,ramp-rate-setting = <27500>;
instead of regulator-ramp-delay and regulator-ramp-delay-scale.
The property differs from downstream.
regulator-ramp-delay is what you see in platform and
maxim,ramp-rate-setting is what you want in register.
[toc] | [prev] | [next] | [standalone]
| From | Rhyland Klein <rklein@nvidia.com> |
|---|---|
| Date | 2016-06-07 00:00 +0200 |
| Message-ID | <rHaIV-25i-15@gated-at.bofh.it> |
| In reply to | #1414684 |
On 6/6/2016 2:39 AM, Laxman Dewangan wrote:
>
> On Saturday 04 June 2016 01:52 AM, Rhyland Klein wrote:
>> +
>> + max77620_default: pinmux@0 {
>> + pin_gpio {
>> + pins = "gpio0", "gpio1", "gpio2", "gpio5",
>> + "gpio6", "gpio7";
> gpio5 and gpio6 are already there in below nodes and hence it is not
> needed here.
Yep thanks.
>
>> + function = "gpio";
>> + };
>> +
>> + /*
>> + * GPIO3 is used to en_pp3300, and it is part of power
>> + * sequence, So it must be sequenced up (automatically
>> + * set by OTP) and down properly.
>> + */
>> + pin_gpio3 {
>> + pins = "gpio3";
>> + function = "fps-out";
>> + drive-open-drain = <1>;
>> + maxim,active-fps-source = <MAX77620_FPS_SRC_0>;
>> + maxim,active-fps-power-up-slot = <4>;
>> + maxim,active-fps-power-down-slot = <2>;
>> + };
>> +
>> + pin_gpio5_6_7 {
> node name should be gpio5_6 as there is no gpio7 inside this node.
Thanks.
>
>
>> +
>> + regulators {
>> + in-ldo0-1-supply = <&pp1350>;
>> + in-ldo2-supply = <&pp3300>;
>> + in-ldo3-5-supply = <&pp3300>;
>> + in-ldo7-8-supply = <&pp1350>;
>> +
>> + ppvar_soc: sd0 {
>> + regulator-name = "PPVAR_SOC";
>> + regulator-min-microvolt = <825000>;
>> + regulator-max-microvolt = <1125000>;
>> + regulator-enable-ramp-delay = <146>;
>> + regulator-disable-ramp-delay = <4080>;
>> + regulator-ramp-delay = <27500>;
>> + regulator-ramp-delay-scale = <300>;
>
> There is no disable-ramp-delay in mainline.
> Please use the correct value for property as:
> regulator-ramp-delay = <9000>;
> maxim,ramp-rate-setting = <27500>;
>
>
> instead of regulator-ramp-delay and regulator-ramp-delay-scale.
> The property differs from downstream.
>
> regulator-ramp-delay is what you see in platform and
> maxim,ramp-rate-setting is what you want in register.
Where does "<9000>" come from in the above comment? It looks like
maxim,ramp-rate-setting sets the slew rate, and regulator-ramp-delay
will as well, but will be ignored if maxim,ramp-delay-setting is set. So
does it ever make sense to have both defined for a regulator? And if
not, should max77620 regulators just use the maxim property and not the
regulator core property?
-rhyland
--
nvpublic
[toc] | [prev] | [next] | [standalone]
| From | Laxman Dewangan <ldewangan@nvidia.com> |
|---|---|
| Date | 2016-06-07 13:50 +0200 |
| Message-ID | <rHnG9-2aD-7@gated-at.bofh.it> |
| In reply to | #1415508 |
On Tuesday 07 June 2016 03:22 AM, Rhyland Klein wrote: > On 6/6/2016 2:39 AM, Laxman Dewangan wrote: >> On Saturday 04 June 2016 01:52 AM, Rhyland Klein wrote: >>> + regulator-disable-ramp-delay = <4080>; >>> + regulator-ramp-delay = <27500>; >>> + regulator-ramp-delay-scale = <300>; >> There is no disable-ramp-delay in mainline. >> Please use the correct value for property as: >> regulator-ramp-delay = <9000>; >> maxim,ramp-rate-setting = <27500>; >> >> >> instead of regulator-ramp-delay and regulator-ramp-delay-scale. >> The property differs from downstream. >> >> regulator-ramp-delay is what you see in platform and >> maxim,ramp-rate-setting is what you want in register. > Where does "<9000>" come from in the above comment? It looks like > maxim,ramp-rate-setting sets the slew rate, and regulator-ramp-delay > will as well, but will be ignored if maxim,ramp-delay-setting is set. So > does it ever make sense to have both defined for a regulator? And if > not, should max77620 regulators just use the maxim property and not the > regulator core property? > 9000uV/us is what measured ramp delay in the platform after setting the device register to 27500uV/us. This is derived from our downstream table as ramp-delay *100/scale so here 27500 *100/300 is approx to 9000. This is used when your measured is varied from register configuration which is true in most of our platform. If your platform does not have diff then please provide regulator-ramp-delay only with what you measured.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web