From: Ninad Palsule <ninad@linux.ibm.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH v1 5/8] ARM: dts: aspeed: System1: Voltage regulators
Date: Tue, 12 Dec 2023 10:40:01 -0600 [thread overview]
Message-ID: <20231212164004.1683589-6-ninad@linux.ibm.com> (raw)
In-Reply-To: <20231212164004.1683589-1-ninad@linux.ibm.com>
This commit adds different voltage regulators.
Tested:
This board is tested using the simics simulator.
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
---
.../dts/aspeed/aspeed-bmc-ibm-system1.dts | 266 ++++++++++++++++++
1 file changed, 266 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
index 0557bff9f36a..b8e7e52d4600 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
@@ -114,10 +114,127 @@ vga_memory: region at bf000000 {
};
};
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&p12v_vd 0>, <&p5v_aux_vd 0>,
+ <&p5v_bmc_aux_vd 0>, <&p3v3_aux_vd 0>,
+ <&p3v3_bmc_aux_vd 0>, <&p1v8_bmc_aux_vd 0>,
+ <&adc1 4>, <&adc0 2>, <&adc1 0>,
+ <&p2V5_aux_vd 0>, <&adc1 7>;
+ };
+
+ p12v_vd: voltage_divider1 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 3>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1127/127 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <15>;
+ full-ohms = <133>;
+ };
+
+ p5v_aux_vd: voltage_divider2 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 5>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1365/365 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <50>;
+ full-ohms = <187>;
+ };
+
+ p5v_bmc_aux_vd: voltage_divider3 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 3>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1365/365 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <50>;
+ full-ohms = <187>;
+ };
+
+ p3v3_aux_vd: voltage_divider4 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 2>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1698/698 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <14>;
+ full-ohms = <34>;
+ };
+
+ p3v3_bmc_aux_vd: voltage_divider5 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 7>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1698/698 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <14>;
+ full-ohms = <34>;
+ };
+
+ p1v8_bmc_aux_vd: voltage_divider6 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 6>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 4000/3000 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <3>;
+ full-ohms = <4>;
+ };
+
+ p2V5_aux_vd: voltage_divider7 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 1>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 2100/1100 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <11>;
+ full-ohms = <21>;
+ };
+
+ p1v8_bmc_aux: fixedregulator-p1v8_bmc_aux {
+ compatible = "regulator-fixed";
+ regulator-name = "p1v8_bmc_aux";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+};
+
+&adc0 {
+ status = "okay";
+ vref-supply = <&p1v8_bmc_aux>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_adc0_default
+ &pinctrl_adc1_default
+ &pinctrl_adc2_default
+ &pinctrl_adc3_default
+ &pinctrl_adc4_default
+ &pinctrl_adc5_default
+ &pinctrl_adc6_default
+ &pinctrl_adc7_default>;
};
&adc1 {
status = "okay";
+ vref-supply = <&p1v8_bmc_aux>;
+ aspeed,battery-sensing;
aspeed,int-vref-microvolt = <2500000>;
pinctrl-names = "default";
@@ -250,10 +367,32 @@ &kcs3 {
&i2c0 {
status = "okay";
+
+ regulator at 60 {
+ compatible = "maxim,max8952";
+ reg = <0x60>;
+
+ max8952,default-mode = <0>;
+ max8952,dvs-mode-microvolt = <1250000>, <1200000>,
+ <1050000>, <950000>;
+ max8952,sync-freq = <0>;
+ max8952,ramp-speed = <0>;
+
+ regulator-name = "VR_1.0V";
+ regulator-min-microvolt = <770000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
};
&i2c1 {
status = "okay";
+
+ regulator at 42 {
+ compatible = "infineon,ir38263";
+ reg = <0x42>;
+ };
};
&i2c2 {
@@ -327,6 +466,21 @@ &i2c4 {
&i2c5 {
status = "okay";
+
+ regulator at 3a {
+ compatible = "maxim,max5970";
+ reg = <0x3a>;
+ };
+
+ regulator at 42 {
+ compatible = "infineon,ir38263";
+ reg = <0x42>;
+ };
+
+ regulator at 43 {
+ compatible = "infineon,ir38060";
+ reg = <0x43>;
+ };
};
&i2c6 {
@@ -423,6 +577,11 @@ i2c7mux0chn3: i2c at 3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
+
+ regulator at 58 {
+ compatible = "mps,mp2973";
+ reg = <0x58>;
+ };
};
i2c7mux0chn4: i2c at 4 {
@@ -435,6 +594,11 @@ i2c7mux0chn5: i2c at 5 {
#address-cells = <1>;
#size-cells = <0>;
reg = <5>;
+
+ regulator at 40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
};
i2c7mux0chn6: i2c at 6 {
@@ -466,12 +630,37 @@ i2c8mux0chn0: i2c at 0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
+
+ regulator at 58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
};
i2c8mux0chn1: i2c at 1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
+
+ regulator at 40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
+
+ regulator at 41 {
+ compatible = "infineon,tda38640";
+ reg = <0x41>;
+ };
+
+ regulator at 58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
+
+ regulator at 5b {
+ compatible = "mps,mp2971";
+ reg = <0x5b>;
+ };
};
i2c8mux0chn2: i2c at 2 {
@@ -565,12 +754,44 @@ i2c8mux0chn7: i2c at 7 {
#address-cells = <1>;
#size-cells = <0>;
reg = <7>;
+
+ regulator at 40 {
+ compatible = "infineon,ir38060";
+ reg = <0x40>;
+ };
};
};
};
&i2c9 {
status = "okay";
+
+ regulator at 40 {
+ compatible = "infineon,ir38263";
+ reg = <0x40>;
+ };
+
+ regulator at 41 {
+ compatible = "infineon,ir38263";
+ reg = <0x41>;
+ };
+
+ regulator at 60 {
+ compatible = "maxim,max8952";
+ reg = <0x60>;
+
+ max8952,default-mode = <0>;
+ max8952,dvs-mode-microvolt = <1250000>, <1200000>,
+ <1050000>, <950000>;
+ max8952,sync-freq = <0>;
+ max8952,ramp-speed = <0>;
+
+ regulator-name = "VR_1.2V";
+ regulator-min-microvolt = <770000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
};
&i2c11 {
@@ -583,6 +804,11 @@ &i2c12 {
&i2c13 {
status = "okay";
+
+ regulator at 41 {
+ compatible = "infineon,ir38263";
+ reg = <0x41>;
+ };
};
&i2c14 {
@@ -618,6 +844,11 @@ i2c14mux0chn3: i2c at 3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
+
+ regulator at 58 {
+ compatible = "mps,mp2973";
+ reg = <0x58>;
+ };
};
i2c14mux0chn4: i2c at 4 {
@@ -630,6 +861,11 @@ i2c14mux0chn5: i2c at 5 {
#address-cells = <1>;
#size-cells = <0>;
reg = <5>;
+
+ regulator at 40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
};
i2c14mux0chn6: i2c at 6 {
@@ -661,12 +897,37 @@ i2c15mux0chn0: i2c at 0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
+
+ regulator at 58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
};
i2c15mux0chn1: i2c at 1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
+
+ regulator at 40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
+
+ regulator at 41 {
+ compatible = "infineon,tda38640";
+ reg = <0x41>;
+ };
+
+ regulator at 58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
+
+ regulator at 5b {
+ compatible = "mps,mp2971";
+ reg = <0x5b>;
+ };
};
i2c15mux0chn2: i2c at 2 {
@@ -760,6 +1021,11 @@ i2c15mux0chn7: i2c at 7 {
#address-cells = <1>;
#size-cells = <0>;
reg = <7>;
+
+ regulator at 40 {
+ compatible = "infineon,ir38060";
+ reg = <0x40>;
+ };
};
};
};
--
2.39.2
WARNING: multiple messages have this Message-ID (diff)
From: Ninad Palsule <ninad@linux.ibm.com>
To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, joel@jms.id.au, andrew@codeconstruct.com.au,
peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca,
keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com,
ninad@linux.ibm.com, johannes.holland@infineon.com,
linux@roeck-us.net, broonie@kernel.org
Cc: patrick.rudolph@9elements.com, vincent@vtremblay.dev,
peteryin.openbmc@gmail.com, lakshmiy@us.ibm.com,
bhelgaas@google.com, naresh.solanki@9elements.com,
alexander.stein@ew.tq-group.com, festevam@denx.de,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-integrity@vger.kernel.org, linux-hardening@vger.kernel.org,
geissonator@yahoo.com
Subject: [PATCH v1 5/8] ARM: dts: aspeed: System1: Voltage regulators
Date: Tue, 12 Dec 2023 10:40:01 -0600 [thread overview]
Message-ID: <20231212164004.1683589-6-ninad@linux.ibm.com> (raw)
In-Reply-To: <20231212164004.1683589-1-ninad@linux.ibm.com>
This commit adds different voltage regulators.
Tested:
This board is tested using the simics simulator.
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
---
.../dts/aspeed/aspeed-bmc-ibm-system1.dts | 266 ++++++++++++++++++
1 file changed, 266 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
index 0557bff9f36a..b8e7e52d4600 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
@@ -114,10 +114,127 @@ vga_memory: region@bf000000 {
};
};
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&p12v_vd 0>, <&p5v_aux_vd 0>,
+ <&p5v_bmc_aux_vd 0>, <&p3v3_aux_vd 0>,
+ <&p3v3_bmc_aux_vd 0>, <&p1v8_bmc_aux_vd 0>,
+ <&adc1 4>, <&adc0 2>, <&adc1 0>,
+ <&p2V5_aux_vd 0>, <&adc1 7>;
+ };
+
+ p12v_vd: voltage_divider1 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 3>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1127/127 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <15>;
+ full-ohms = <133>;
+ };
+
+ p5v_aux_vd: voltage_divider2 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 5>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1365/365 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <50>;
+ full-ohms = <187>;
+ };
+
+ p5v_bmc_aux_vd: voltage_divider3 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 3>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1365/365 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <50>;
+ full-ohms = <187>;
+ };
+
+ p3v3_aux_vd: voltage_divider4 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 2>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1698/698 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <14>;
+ full-ohms = <34>;
+ };
+
+ p3v3_bmc_aux_vd: voltage_divider5 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 7>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1698/698 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <14>;
+ full-ohms = <34>;
+ };
+
+ p1v8_bmc_aux_vd: voltage_divider6 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 6>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 4000/3000 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <3>;
+ full-ohms = <4>;
+ };
+
+ p2V5_aux_vd: voltage_divider7 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 1>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 2100/1100 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <11>;
+ full-ohms = <21>;
+ };
+
+ p1v8_bmc_aux: fixedregulator-p1v8_bmc_aux {
+ compatible = "regulator-fixed";
+ regulator-name = "p1v8_bmc_aux";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+};
+
+&adc0 {
+ status = "okay";
+ vref-supply = <&p1v8_bmc_aux>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_adc0_default
+ &pinctrl_adc1_default
+ &pinctrl_adc2_default
+ &pinctrl_adc3_default
+ &pinctrl_adc4_default
+ &pinctrl_adc5_default
+ &pinctrl_adc6_default
+ &pinctrl_adc7_default>;
};
&adc1 {
status = "okay";
+ vref-supply = <&p1v8_bmc_aux>;
+ aspeed,battery-sensing;
aspeed,int-vref-microvolt = <2500000>;
pinctrl-names = "default";
@@ -250,10 +367,32 @@ &kcs3 {
&i2c0 {
status = "okay";
+
+ regulator@60 {
+ compatible = "maxim,max8952";
+ reg = <0x60>;
+
+ max8952,default-mode = <0>;
+ max8952,dvs-mode-microvolt = <1250000>, <1200000>,
+ <1050000>, <950000>;
+ max8952,sync-freq = <0>;
+ max8952,ramp-speed = <0>;
+
+ regulator-name = "VR_1.0V";
+ regulator-min-microvolt = <770000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
};
&i2c1 {
status = "okay";
+
+ regulator@42 {
+ compatible = "infineon,ir38263";
+ reg = <0x42>;
+ };
};
&i2c2 {
@@ -327,6 +466,21 @@ &i2c4 {
&i2c5 {
status = "okay";
+
+ regulator@3a {
+ compatible = "maxim,max5970";
+ reg = <0x3a>;
+ };
+
+ regulator@42 {
+ compatible = "infineon,ir38263";
+ reg = <0x42>;
+ };
+
+ regulator@43 {
+ compatible = "infineon,ir38060";
+ reg = <0x43>;
+ };
};
&i2c6 {
@@ -423,6 +577,11 @@ i2c7mux0chn3: i2c@3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
+
+ regulator@58 {
+ compatible = "mps,mp2973";
+ reg = <0x58>;
+ };
};
i2c7mux0chn4: i2c@4 {
@@ -435,6 +594,11 @@ i2c7mux0chn5: i2c@5 {
#address-cells = <1>;
#size-cells = <0>;
reg = <5>;
+
+ regulator@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
};
i2c7mux0chn6: i2c@6 {
@@ -466,12 +630,37 @@ i2c8mux0chn0: i2c@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
+
+ regulator@58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
};
i2c8mux0chn1: i2c@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
+
+ regulator@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
+
+ regulator@41 {
+ compatible = "infineon,tda38640";
+ reg = <0x41>;
+ };
+
+ regulator@58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
+
+ regulator@5b {
+ compatible = "mps,mp2971";
+ reg = <0x5b>;
+ };
};
i2c8mux0chn2: i2c@2 {
@@ -565,12 +754,44 @@ i2c8mux0chn7: i2c@7 {
#address-cells = <1>;
#size-cells = <0>;
reg = <7>;
+
+ regulator@40 {
+ compatible = "infineon,ir38060";
+ reg = <0x40>;
+ };
};
};
};
&i2c9 {
status = "okay";
+
+ regulator@40 {
+ compatible = "infineon,ir38263";
+ reg = <0x40>;
+ };
+
+ regulator@41 {
+ compatible = "infineon,ir38263";
+ reg = <0x41>;
+ };
+
+ regulator@60 {
+ compatible = "maxim,max8952";
+ reg = <0x60>;
+
+ max8952,default-mode = <0>;
+ max8952,dvs-mode-microvolt = <1250000>, <1200000>,
+ <1050000>, <950000>;
+ max8952,sync-freq = <0>;
+ max8952,ramp-speed = <0>;
+
+ regulator-name = "VR_1.2V";
+ regulator-min-microvolt = <770000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
};
&i2c11 {
@@ -583,6 +804,11 @@ &i2c12 {
&i2c13 {
status = "okay";
+
+ regulator@41 {
+ compatible = "infineon,ir38263";
+ reg = <0x41>;
+ };
};
&i2c14 {
@@ -618,6 +844,11 @@ i2c14mux0chn3: i2c@3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
+
+ regulator@58 {
+ compatible = "mps,mp2973";
+ reg = <0x58>;
+ };
};
i2c14mux0chn4: i2c@4 {
@@ -630,6 +861,11 @@ i2c14mux0chn5: i2c@5 {
#address-cells = <1>;
#size-cells = <0>;
reg = <5>;
+
+ regulator@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
};
i2c14mux0chn6: i2c@6 {
@@ -661,12 +897,37 @@ i2c15mux0chn0: i2c@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
+
+ regulator@58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
};
i2c15mux0chn1: i2c@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
+
+ regulator@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
+
+ regulator@41 {
+ compatible = "infineon,tda38640";
+ reg = <0x41>;
+ };
+
+ regulator@58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
+
+ regulator@5b {
+ compatible = "mps,mp2971";
+ reg = <0x5b>;
+ };
};
i2c15mux0chn2: i2c@2 {
@@ -760,6 +1021,11 @@ i2c15mux0chn7: i2c@7 {
#address-cells = <1>;
#size-cells = <0>;
reg = <7>;
+
+ regulator@40 {
+ compatible = "infineon,ir38060";
+ reg = <0x40>;
+ };
};
};
};
--
2.39.2
WARNING: multiple messages have this Message-ID (diff)
From: Ninad Palsule <ninad@linux.ibm.com>
To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, joel@jms.id.au, andrew@codeconstruct.com.au,
peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca,
keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com,
ninad@linux.ibm.com, johannes.holland@infineon.com,
linux@roeck-us.net, broonie@kernel.org
Cc: patrick.rudolph@9elements.com, vincent@vtremblay.dev,
peteryin.openbmc@gmail.com, lakshmiy@us.ibm.com,
bhelgaas@google.com, naresh.solanki@9elements.com,
alexander.stein@ew.tq-group.com, festevam@denx.de,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-integrity@vger.kernel.org, linux-hardening@vger.kernel.org,
geissonator@yahoo.com
Subject: [PATCH v1 5/8] ARM: dts: aspeed: System1: Voltage regulators
Date: Tue, 12 Dec 2023 10:40:01 -0600 [thread overview]
Message-ID: <20231212164004.1683589-6-ninad@linux.ibm.com> (raw)
In-Reply-To: <20231212164004.1683589-1-ninad@linux.ibm.com>
This commit adds different voltage regulators.
Tested:
This board is tested using the simics simulator.
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
---
.../dts/aspeed/aspeed-bmc-ibm-system1.dts | 266 ++++++++++++++++++
1 file changed, 266 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts b/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
index 0557bff9f36a..b8e7e52d4600 100644
--- a/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
+++ b/arch/arm/boot/dts/aspeed/aspeed-bmc-ibm-system1.dts
@@ -114,10 +114,127 @@ vga_memory: region@bf000000 {
};
};
+ iio-hwmon {
+ compatible = "iio-hwmon";
+ io-channels = <&p12v_vd 0>, <&p5v_aux_vd 0>,
+ <&p5v_bmc_aux_vd 0>, <&p3v3_aux_vd 0>,
+ <&p3v3_bmc_aux_vd 0>, <&p1v8_bmc_aux_vd 0>,
+ <&adc1 4>, <&adc0 2>, <&adc1 0>,
+ <&p2V5_aux_vd 0>, <&adc1 7>;
+ };
+
+ p12v_vd: voltage_divider1 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 3>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1127/127 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <15>;
+ full-ohms = <133>;
+ };
+
+ p5v_aux_vd: voltage_divider2 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 5>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1365/365 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <50>;
+ full-ohms = <187>;
+ };
+
+ p5v_bmc_aux_vd: voltage_divider3 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 3>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1365/365 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <50>;
+ full-ohms = <187>;
+ };
+
+ p3v3_aux_vd: voltage_divider4 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 2>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1698/698 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <14>;
+ full-ohms = <34>;
+ };
+
+ p3v3_bmc_aux_vd: voltage_divider5 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 7>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 1698/698 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <14>;
+ full-ohms = <34>;
+ };
+
+ p1v8_bmc_aux_vd: voltage_divider6 {
+ compatible = "voltage-divider";
+ io-channels = <&adc0 6>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 4000/3000 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <3>;
+ full-ohms = <4>;
+ };
+
+ p2V5_aux_vd: voltage_divider7 {
+ compatible = "voltage-divider";
+ io-channels = <&adc1 1>;
+ #io-channel-cells = <1>;
+
+ /* Scale the system voltage by 2100/1100 to fit the ADC range.
+ * Use small nominator to prevent integer overflow.
+ */
+ output-ohms = <11>;
+ full-ohms = <21>;
+ };
+
+ p1v8_bmc_aux: fixedregulator-p1v8_bmc_aux {
+ compatible = "regulator-fixed";
+ regulator-name = "p1v8_bmc_aux";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ };
+};
+
+&adc0 {
+ status = "okay";
+ vref-supply = <&p1v8_bmc_aux>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_adc0_default
+ &pinctrl_adc1_default
+ &pinctrl_adc2_default
+ &pinctrl_adc3_default
+ &pinctrl_adc4_default
+ &pinctrl_adc5_default
+ &pinctrl_adc6_default
+ &pinctrl_adc7_default>;
};
&adc1 {
status = "okay";
+ vref-supply = <&p1v8_bmc_aux>;
+ aspeed,battery-sensing;
aspeed,int-vref-microvolt = <2500000>;
pinctrl-names = "default";
@@ -250,10 +367,32 @@ &kcs3 {
&i2c0 {
status = "okay";
+
+ regulator@60 {
+ compatible = "maxim,max8952";
+ reg = <0x60>;
+
+ max8952,default-mode = <0>;
+ max8952,dvs-mode-microvolt = <1250000>, <1200000>,
+ <1050000>, <950000>;
+ max8952,sync-freq = <0>;
+ max8952,ramp-speed = <0>;
+
+ regulator-name = "VR_1.0V";
+ regulator-min-microvolt = <770000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
};
&i2c1 {
status = "okay";
+
+ regulator@42 {
+ compatible = "infineon,ir38263";
+ reg = <0x42>;
+ };
};
&i2c2 {
@@ -327,6 +466,21 @@ &i2c4 {
&i2c5 {
status = "okay";
+
+ regulator@3a {
+ compatible = "maxim,max5970";
+ reg = <0x3a>;
+ };
+
+ regulator@42 {
+ compatible = "infineon,ir38263";
+ reg = <0x42>;
+ };
+
+ regulator@43 {
+ compatible = "infineon,ir38060";
+ reg = <0x43>;
+ };
};
&i2c6 {
@@ -423,6 +577,11 @@ i2c7mux0chn3: i2c@3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
+
+ regulator@58 {
+ compatible = "mps,mp2973";
+ reg = <0x58>;
+ };
};
i2c7mux0chn4: i2c@4 {
@@ -435,6 +594,11 @@ i2c7mux0chn5: i2c@5 {
#address-cells = <1>;
#size-cells = <0>;
reg = <5>;
+
+ regulator@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
};
i2c7mux0chn6: i2c@6 {
@@ -466,12 +630,37 @@ i2c8mux0chn0: i2c@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
+
+ regulator@58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
};
i2c8mux0chn1: i2c@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
+
+ regulator@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
+
+ regulator@41 {
+ compatible = "infineon,tda38640";
+ reg = <0x41>;
+ };
+
+ regulator@58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
+
+ regulator@5b {
+ compatible = "mps,mp2971";
+ reg = <0x5b>;
+ };
};
i2c8mux0chn2: i2c@2 {
@@ -565,12 +754,44 @@ i2c8mux0chn7: i2c@7 {
#address-cells = <1>;
#size-cells = <0>;
reg = <7>;
+
+ regulator@40 {
+ compatible = "infineon,ir38060";
+ reg = <0x40>;
+ };
};
};
};
&i2c9 {
status = "okay";
+
+ regulator@40 {
+ compatible = "infineon,ir38263";
+ reg = <0x40>;
+ };
+
+ regulator@41 {
+ compatible = "infineon,ir38263";
+ reg = <0x41>;
+ };
+
+ regulator@60 {
+ compatible = "maxim,max8952";
+ reg = <0x60>;
+
+ max8952,default-mode = <0>;
+ max8952,dvs-mode-microvolt = <1250000>, <1200000>,
+ <1050000>, <950000>;
+ max8952,sync-freq = <0>;
+ max8952,ramp-speed = <0>;
+
+ regulator-name = "VR_1.2V";
+ regulator-min-microvolt = <770000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
};
&i2c11 {
@@ -583,6 +804,11 @@ &i2c12 {
&i2c13 {
status = "okay";
+
+ regulator@41 {
+ compatible = "infineon,ir38263";
+ reg = <0x41>;
+ };
};
&i2c14 {
@@ -618,6 +844,11 @@ i2c14mux0chn3: i2c@3 {
#address-cells = <1>;
#size-cells = <0>;
reg = <3>;
+
+ regulator@58 {
+ compatible = "mps,mp2973";
+ reg = <0x58>;
+ };
};
i2c14mux0chn4: i2c@4 {
@@ -630,6 +861,11 @@ i2c14mux0chn5: i2c@5 {
#address-cells = <1>;
#size-cells = <0>;
reg = <5>;
+
+ regulator@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
};
i2c14mux0chn6: i2c@6 {
@@ -661,12 +897,37 @@ i2c15mux0chn0: i2c@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
+
+ regulator@58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
};
i2c15mux0chn1: i2c@1 {
#address-cells = <1>;
#size-cells = <0>;
reg = <1>;
+
+ regulator@40 {
+ compatible = "infineon,tda38640";
+ reg = <0x40>;
+ };
+
+ regulator@41 {
+ compatible = "infineon,tda38640";
+ reg = <0x41>;
+ };
+
+ regulator@58 {
+ compatible = "mps,mp2971";
+ reg = <0x58>;
+ };
+
+ regulator@5b {
+ compatible = "mps,mp2971";
+ reg = <0x5b>;
+ };
};
i2c15mux0chn2: i2c@2 {
@@ -760,6 +1021,11 @@ i2c15mux0chn7: i2c@7 {
#address-cells = <1>;
#size-cells = <0>;
reg = <7>;
+
+ regulator@40 {
+ compatible = "infineon,ir38060";
+ reg = <0x40>;
+ };
};
};
};
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-12-12 16:40 UTC|newest]
Thread overview: 177+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 16:39 [PATCH v1 0/8] Add device tree for IBM system1 BMC Ninad Palsule
2023-12-12 16:39 ` Ninad Palsule
2023-12-12 16:39 ` Ninad Palsule
2023-12-12 16:39 ` [PATCH v1 1/8] dt-bindings: arm: aspeed: add IBM system1-bmc Ninad Palsule
2023-12-12 16:39 ` Ninad Palsule
2023-12-12 16:39 ` Ninad Palsule
2023-12-12 17:09 ` Conor Dooley
2023-12-12 17:10 ` Conor Dooley
2023-12-12 17:09 ` Conor Dooley
2023-12-12 20:06 ` Ninad Palsule
2023-12-12 20:06 ` Ninad Palsule
2023-12-12 20:06 ` Ninad Palsule
2023-12-13 18:18 ` Jarkko Sakkinen
2023-12-13 18:18 ` Jarkko Sakkinen
2023-12-13 18:18 ` Jarkko Sakkinen
2023-12-13 18:36 ` Ninad Palsule
2023-12-13 18:36 ` Ninad Palsule
2023-12-13 18:36 ` Ninad Palsule
2023-12-12 16:39 ` [PATCH v1 2/8] dt-bindings: tpm: Add schema for TIS I2C devices Ninad Palsule
2023-12-12 16:39 ` Ninad Palsule
2023-12-12 16:39 ` Ninad Palsule
2023-12-12 17:14 ` Conor Dooley
2023-12-12 17:14 ` Conor Dooley
2023-12-12 17:14 ` Conor Dooley
2023-12-12 18:20 ` Guenter Roeck
2023-12-12 18:20 ` Guenter Roeck
2023-12-12 18:20 ` Guenter Roeck
2023-12-14 15:37 ` Ninad Palsule
2023-12-14 15:37 ` Ninad Palsule
2023-12-14 15:37 ` Ninad Palsule
2023-12-14 15:34 ` Ninad Palsule
2023-12-14 15:34 ` Ninad Palsule
2023-12-14 15:34 ` Ninad Palsule
2023-12-14 16:35 ` Conor Dooley
2023-12-14 16:35 ` Conor Dooley
2023-12-14 16:35 ` Conor Dooley
2023-12-14 20:13 ` Rob Herring
2023-12-14 20:13 ` Rob Herring
2023-12-14 20:13 ` Rob Herring
2023-12-13 16:13 ` Rob Herring
2023-12-13 16:13 ` Rob Herring
2023-12-13 16:13 ` Rob Herring
2023-12-14 22:23 ` Ninad Palsule
2023-12-14 22:23 ` Ninad Palsule
2023-12-14 22:23 ` Ninad Palsule
2024-01-08 19:44 ` Ninad Palsule
2024-01-08 19:44 ` Ninad Palsule
2024-01-08 19:44 ` Ninad Palsule
2023-12-13 18:20 ` Jarkko Sakkinen
2023-12-13 18:20 ` Jarkko Sakkinen
2023-12-13 18:20 ` Jarkko Sakkinen
2023-12-13 18:38 ` Ninad Palsule
2023-12-13 18:38 ` Ninad Palsule
2023-12-13 18:38 ` Ninad Palsule
2023-12-12 16:39 ` [PATCH v1 3/8] ARM: dts: aspeed: System1: IBM system1 BMC board Ninad Palsule
2023-12-12 16:39 ` Ninad Palsule
2023-12-12 16:39 ` Ninad Palsule
2023-12-12 20:20 ` Krzysztof Kozlowski
2023-12-12 20:20 ` Krzysztof Kozlowski
2023-12-12 20:20 ` Krzysztof Kozlowski
2023-12-14 15:06 ` Ninad Palsule
2023-12-14 15:06 ` Ninad Palsule
2023-12-14 15:06 ` Ninad Palsule
2023-12-12 16:40 ` [PATCH v1 4/8] ARM: dts: aspeed: System1: Add i2c and muxes Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 20:21 ` Krzysztof Kozlowski
2023-12-12 20:21 ` Krzysztof Kozlowski
2023-12-12 20:21 ` Krzysztof Kozlowski
2023-12-14 18:34 ` Ninad Palsule
2023-12-14 18:34 ` Ninad Palsule
2023-12-14 18:34 ` Ninad Palsule
2023-12-15 7:35 ` Krzysztof Kozlowski
2023-12-15 7:35 ` Krzysztof Kozlowski
2023-12-15 7:35 ` Krzysztof Kozlowski
2023-12-12 16:40 ` Ninad Palsule [this message]
2023-12-12 16:40 ` [PATCH v1 5/8] ARM: dts: aspeed: System1: Voltage regulators Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 20:22 ` Krzysztof Kozlowski
2023-12-12 20:22 ` Krzysztof Kozlowski
2023-12-12 20:22 ` Krzysztof Kozlowski
2023-12-14 16:30 ` Ninad Palsule
2023-12-14 16:30 ` Ninad Palsule
2023-12-14 16:30 ` Ninad Palsule
2023-12-12 16:40 ` [PATCH v1 6/8] ARM: dts: aspeed: System1: GPIO, Fan ctrl, Led Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 20:25 ` Krzysztof Kozlowski
2023-12-12 20:25 ` Krzysztof Kozlowski
2023-12-12 20:25 ` Krzysztof Kozlowski
2024-01-08 19:56 ` Ninad Palsule
2024-01-08 19:56 ` Ninad Palsule
2024-01-08 19:56 ` Ninad Palsule
2023-12-12 16:40 ` [PATCH v1 7/8] tpm: tis-i2c: Add more compatible strings Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 17:15 ` Conor Dooley
2023-12-12 17:16 ` Conor Dooley
2023-12-12 17:15 ` Conor Dooley
2023-12-12 18:00 ` Guenter Roeck
2023-12-12 18:00 ` Guenter Roeck
2023-12-12 18:00 ` Guenter Roeck
2023-12-12 18:51 ` Conor Dooley
2023-12-12 18:51 ` Conor Dooley
2023-12-12 18:51 ` Conor Dooley
2023-12-12 19:50 ` Guenter Roeck
2023-12-12 19:50 ` Guenter Roeck
2023-12-12 19:50 ` Guenter Roeck
2024-01-08 20:05 ` Ninad Palsule
2024-01-08 20:05 ` Ninad Palsule
2024-01-08 20:05 ` Ninad Palsule
2024-01-09 17:14 ` Conor Dooley
2024-01-09 17:14 ` Conor Dooley
2024-01-09 17:14 ` Conor Dooley
2024-01-09 23:55 ` Ninad Palsule
2024-01-09 23:55 ` Ninad Palsule
2024-01-09 23:55 ` Ninad Palsule
2024-01-09 23:55 ` Ninad Palsule
2024-01-09 23:55 ` Ninad Palsule
2024-01-09 23:55 ` Ninad Palsule
2024-01-10 7:50 ` Krzysztof Kozlowski
2024-01-10 7:50 ` Krzysztof Kozlowski
2024-01-10 7:50 ` Krzysztof Kozlowski
2024-01-10 14:31 ` Ninad Palsule
2024-01-10 14:31 ` Ninad Palsule
2024-01-10 14:31 ` Ninad Palsule
2024-01-10 15:37 ` Krzysztof Kozlowski
2024-01-10 15:37 ` Krzysztof Kozlowski
2024-01-10 15:37 ` Krzysztof Kozlowski
2024-01-10 15:54 ` Ninad Palsule
2024-01-10 15:54 ` Ninad Palsule
2024-01-10 15:54 ` Ninad Palsule
2024-01-10 16:23 ` Conor Dooley
2024-01-10 16:23 ` Conor Dooley
2024-01-10 16:23 ` Conor Dooley
2024-01-10 17:54 ` Krzysztof Kozlowski
2024-01-10 17:54 ` Krzysztof Kozlowski
2024-01-10 17:54 ` Krzysztof Kozlowski
2024-01-10 19:06 ` Guenter Roeck
2024-01-10 19:06 ` Guenter Roeck
2024-01-10 19:06 ` Guenter Roeck
2024-01-10 20:34 ` Krzysztof Kozlowski
2024-01-10 20:34 ` Krzysztof Kozlowski
2024-01-10 20:34 ` Krzysztof Kozlowski
2024-01-10 20:36 ` Krzysztof Kozlowski
2024-01-10 20:36 ` Krzysztof Kozlowski
2024-01-10 20:36 ` Krzysztof Kozlowski
2024-01-10 21:41 ` Guenter Roeck
2024-01-10 21:41 ` Guenter Roeck
2024-01-10 21:41 ` Guenter Roeck
2024-01-08 20:04 ` Ninad Palsule
2024-01-08 20:04 ` Ninad Palsule
2024-01-08 20:04 ` Ninad Palsule
2023-12-12 16:40 ` [PATCH v1 8/8] ARM: dts: aspeed: System1: PS, sensor and more Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 16:40 ` Ninad Palsule
2023-12-12 20:26 ` Krzysztof Kozlowski
2023-12-12 20:26 ` Krzysztof Kozlowski
2023-12-12 20:26 ` Krzysztof Kozlowski
2023-12-13 19:02 ` Ninad Palsule
2023-12-13 19:02 ` Ninad Palsule
2023-12-13 19:02 ` Ninad Palsule
2023-12-13 19:37 ` Krzysztof Kozlowski
2023-12-13 19:37 ` Krzysztof Kozlowski
2023-12-13 19:37 ` Krzysztof Kozlowski
2023-12-13 19:49 ` Ninad Palsule
2023-12-13 19:49 ` Ninad Palsule
2023-12-13 19:49 ` Ninad Palsule
2023-12-14 7:24 ` Krzysztof Kozlowski
2023-12-14 7:24 ` Krzysztof Kozlowski
2023-12-14 7:24 ` Krzysztof Kozlowski
2023-12-14 14:24 ` Ninad Palsule
2023-12-14 14:24 ` Ninad Palsule
2023-12-14 14:24 ` Ninad Palsule
2023-12-14 15:04 ` Ninad Palsule
2023-12-14 15:04 ` Ninad Palsule
2023-12-14 15:04 ` Ninad Palsule
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231212164004.1683589-6-ninad@linux.ibm.com \
--to=ninad@linux.ibm.com \
--cc=linux-aspeed@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.