Skip to contentSkip to conversation

Add support for cpcap regulators on Tegra based Xoom devices.

PATCH In review Peter Geis 3 participants 7 messages Jul 24, 2018 – Jul 25, 2018

Subsystems (3)
lore
Share & tools
lore

Peter Geis

author
#0 lore raw

v3 cover Add support for cpcap regulators on Tegra based Xoom devices.

Good Morning,

This is revision three of the patch.
I have changed the device match from Tegra to Xoom as per Dmitry's suggestion, to be more accurate.

The CPCAP regulator driver can support various devices, but currently only supports Omap4 devices. Adds the sw2 and sw4 voltage tables, which power the Tegra core, and a DT match for the Tegra device. Tested on the Motorola Xoom MZ602, but supports the MZ600 (CDMA), MZ602 (LTE), and MZ604 (Wifi).

v3:
Changed the devicetree match from Tegra to Xoom.

v2:
Stopped reinventing the wheel, using git email now. Rebased against regulator for-next branch.

v1:
Fix conversion of tabulation to spaces.

Peter Geis (2):
Add sw2_sw4 voltage table to cpcap regulator. Add support for CPCAP regulators on Motorola Xoom devices.

 .../bindings/regulator/cpcap-regulator.txt    |   1 +
 drivers/regulator/cpcap-regulator.c           | 103 ++++++++++++++++++
 2 files changed, 104 insertions(+)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v3 1/2 Add sw2_sw4 voltage table to cpcap regulator.

SW2 and SW4 use a shared table to provide voltage to the cpu core and devices on Tegra hardware.
Added this table to the cpcap regulator driver as the first step to supporting this device on Tegra.

---
 drivers/regulator/cpcap-regulator.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
drivers/regulator/cpcap-regulator.c +23 -0
index bd910fe123d9..c0b1e04bd90f 100644
@@ -271,6 +271,29 @@ static struct regulator_ops cpcap_regulator_ops = {
 };
 
 static const unsigned int unknown_val_tbl[] = { 0, };
+static const unsigned int sw2_sw4_val_tbl[] = { 612500, 625000, 637500,
+						650000, 662500, 675000,
+						687500, 700000, 712500,
+						725000, 737500, 750000,
+						762500, 775000, 787500,
+						800000, 812500, 825000,
+						837500, 850000, 862500,
+						875000, 887500, 900000,
+						912500, 925000, 937500,
+						950000, 962500, 975000,
+						987500, 1000000, 1012500,
+						1025000, 1037500, 1050000,
+						1062500, 1075000, 1087500,
+						1100000, 1112500, 1125000,
+						1137500, 1150000, 1162500,
+						1175000, 1187500, 1200000,
+						1212500, 1225000, 1237500,
+						1250000, 1262500, 1275000,
+						1287500, 1300000, 1312500,
+						1325000, 1337500, 1350000,
+						1362500, 1375000, 1387500,
+						1400000, 1412500, 1425000,
+						1437500, 1450000, 1462500, };
 static const unsigned int sw5_val_tbl[] = { 0, 5050000, };
 static const unsigned int vcam_val_tbl[] = { 2600000, 2700000, 2800000,
 					     2900000, };
Signature · 1 line
2.17.1
author
#5 lore raw

PATCH v3 2/2 Add support for CPCAP regulators on Motorola Xoom devices.

In reply to Peter Geis

Added support for the CPCAP power management regulator functions on Tegra based Motorola Xoom devices.
Added sw2_sw4 value tables, which provide power to the Tegra core and aux devices.
Added the Xoom init tables and device tree compatibility match.

---
 .../bindings/regulator/cpcap-regulator.txt    |  1 +
 drivers/regulator/cpcap-regulator.c           | 80 +++++++++++++++++++
 2 files changed, 81 insertions(+)
Documentation/devicetree/bindings/regulator/cpcap-regulator.txt +1 -0
index 675f4437ce92..36f5e2f5cc0f 100644
@@ -5,6 +5,7 @@ Requires node properties:
 - "compatible" value one of:
     "motorola,cpcap-regulator"
     "motorola,mapphone-cpcap-regulator"
+    "motorola,xoom-cpcap-regulator"
 
 Required regulator properties:
 - "regulator-name"
drivers/regulator/cpcap-regulator.c +80 -0

92 lines not on this page · raw message

Signature · 1 line
2.17.1
maintainer
#2 lore raw

Re: [PATCH v3 1/2] Add sw2_sw4 voltage table to cpcap regulator.

In reply to Peter Geis
Quoted 4 lines · Peter Geis

SW2 and SW4 use a shared table to provide voltage to the cpu core and devices on Tegra hardware.
Added this table to the cpcap regulator driver as the first step to supporting this device on Tegra.

Please submit patches using subject lines reflecting the style for the subsystem. This makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing.

author
#3 lore raw

Re: [PATCH v3 1/2] Add sw2_sw4 voltage table to cpcap regulator.

Quoted 6 lines · Mark Brown
Quoted 4 lines · Peter Geis

SW2 and SW4 use a shared table to provide voltage to the cpu core and devices on Tegra hardware.
Added this table to the cpcap regulator driver as the first step to supporting this device on Tegra.

Quoted 6 lines

Please submit patches using subject lines reflecting the style for the subsystem. This makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing.

Copy, should I resubmit?

maintainer
#4 lore raw

Re: [PATCH v3 1/2] Add sw2_sw4 voltage table to cpcap regulator.

Quoted 9 lines · Peter Geis
Quoted 5 lines · Mark Brown

Please submit patches using subject lines reflecting the style for the subsystem. This makes it easier for people to identify relevant patches. Look at what existing commits in the area you're changing are doing and make sure your subject lines visually resemble what they're doing.

Copy, should I resubmit?

No, it's OK - I already applied.

maintainer Acked-by on v3 2/2
#6 lore raw

Re: [PATCH v3 2/2] Add support for CPCAP regulators on Motorola Xoom devices.

In reply to Peter Geis
Quoted 9 lines · Peter Geis

Added support for the CPCAP power management regulator functions on Tegra based Motorola Xoom devices.
Added sw2_sw4 value tables, which provide power to the Tegra core and aux devices.
Added the Xoom init tables and device tree compatibility match.

---
 .../bindings/regulator/cpcap-regulator.txt    |  1 +
Quoted 2 lines
 drivers/regulator/cpcap-regulator.c           | 80 +++++++++++++++++++
 2 files changed, 81 insertions(+)