ARM: dt: tegra: cardhu: add entry for regulators
v2 cover ARM: dt: tegra: cardhu: add entry for regulators
This patch series add the PMIC and fixed regulators for cardhu board. There is multiple versions of cardhu baord named as A01, A02, A03..and so on. Cardhu A01 and A03 are not supported. Cardhu A02 and A04 have different sets of GPIO for regualtors. The cardhu A04 is compatible for A05, A06 and A07 in GPIOs. This patch series split the cardhu dts file to cardhu-a02 and carchu-a04 and then add entry for different fixed regualtors.
In patch 1, it enabled the PMIC tps65910 which is main pmu for the cardhu.
In Patch 2, split the cardhu support for cardhu-a02 and cardhu-a04. In Patch 3, add different regulators.
Changes from V1-->V2:
- Remove the vdd_sdmmc1 regulator registration.
- Fix the pex_hvdd_3v3 regulator registration.
- Set panel regulator to be always on.
- Add i2c eeprom address in board-identification paragraph.
Laxman Dewangan (3):
ARM: dt: tegra: cardhu: add entry for PMIC TPS65911.
ARM: dt: tegra: cardhu: split dts file for support multiple board
versions
ARM: tegra: cardhu: add dt entry for fixed regulators
arch/arm/boot/dts/tegra30-cardhu-a02.dts | 87 ++++++ arch/arm/boot/dts/tegra30-cardhu-a04.dts | 98 ++++++ arch/arm/boot/dts/tegra30-cardhu.dts | 171 ----------- arch/arm/boot/dts/tegra30-cardhu.dtsi | 473 ++++++++++++++++++++++++++++++ arch/arm/mach-tegra/Makefile.boot | 3 +- 5 files changed, 660 insertions(+), 172 deletions(-) create mode 100644 arch/arm/boot/dts/tegra30-cardhu-a02.dts create mode 100644 arch/arm/boot/dts/tegra30-cardhu-a04.dts delete mode 100644 arch/arm/boot/dts/tegra30-cardhu.dts create mode 100644 arch/arm/boot/dts/tegra30-cardhu.dtsi
PATCH v2 1/3 ARM: dt: tegra: cardhu: add entry for PMIC TPS65911.
Tegra30 based platform "cardhu" have the power management IC TPS65911 for the regulator.
Adding DT entry for this device.
Data are chosen from downstream kernel and making the voltage output as require by default for device to operate.
The default interrupt line is HIGH from PMIC device and so inverting the interrupt detection line of PMU interrupt through configuring PMC.
In this patch, do not registering LDO5 because the input supply for this rail is different for different version of cardhu i..e A02 and A04. The registration will be done once the dts file for cardhu A02 and A04 are added in follow on patches.
---
Changes from V1-->V2:
- No changes.
arch/arm/boot/dts/tegra30-cardhu.dts | 134 ++++++++++++++++++++++++++++++++++ 1 files changed, 134 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra30-cardhu.dts +134 -0
@@ -126,6 +126,120 @@ ti,vsel0-state-high; ti,vsel1-state-high; }; + + pmic: tps65911@2d { + compatible = "ti,tps65911"; + reg = <0x2d>; + + interrupts = <0 86 0x4>; + #interrupt-cells = <2>; + interrupt-controller; + + #gpio-cells = <2>; + gpio-controller; + + vcc1-supply = <&vdd_ac_bat_reg>; + vcc2-supply = <&vdd_ac_bat_reg>; + vcc3-supply = <&vio_reg>; + vcc5-supply = <&vdd_ac_bat_reg>; + vcc6-supply = <&vdd2_reg>; + vcc7-supply = <&vdd_ac_bat_reg>; + vccio-supply = <&vdd_ac_bat_reg>; + + regulators { + #address-cells = <1>; + #size-cells = <0>; + + vdd1_reg: regulator@0 { + reg = <0>; + regulator-compatible = "vdd1"; + regulator-name = "vddio_ddr_1v2"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + + vdd2_reg: regulator@1 { + reg = <1>; + regulator-compatible = "vdd2"; + regulator-name = "vdd_1v5_gen"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + }; + + vddctrl_reg: regulator@2 { + reg = <2>; + regulator-compatible = "vddctrl"; + regulator-name = "vdd_cpu,vdd_sys"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + }; + + vio_reg: regulator@3 { + reg = <3>; + regulator-compatible = "vio"; + regulator-name = "vdd_1v8_gen"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + ldo1_reg: regulator@4 { + reg = <4>; + regulator-compatible = "ldo1"; + regulator-name = "vdd_pexa,vdd_pexb"; + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + }; + + ldo2_reg: regulator@5 { + reg = <5>; + regulator-compatible = "ldo2"; + regulator-name = "vdd_sata,avdd_plle"; + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; + }; + + /* LDO3 is not connected to anything */ + + ldo4_reg: regulator@7 { + reg = <7>; + regulator-compatible = "ldo4"; + regulator-name = "vdd_rtc"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + + ldo6_reg: regulator@9 { + reg = <9>; + regulator-compatible = "ldo6"; + regulator-name = "avdd_dsi_csi,pwrdet_mipi"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + ldo7_reg: regulator@10 { + reg = <10>; + regulator-compatible = "ldo7"; + regulator-name = "vdd_pllm,x,u,a_p_c_s"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + }; + + ldo8_reg: regulator@11 { + reg = <11>; + regulator-compatible = "ldo8"; + regulator-name = "vdd_ddr_hs"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + }; + }; + }; }; ahub {
@@ -134,6 +248,11 @@ }; }; + pmc { + status = "okay"; + nvidia,invert-interrupt; + }; + sdhci@78000000 { status = "okay"; cd-gpios = <&gpio 69 0>; /* gpio PI5 */
@@ -147,6 +266,21 @@ bus-width = <8>; }; + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + vdd_ac_bat_reg: regulator@0 { + compatible = "regulator-fixed"; + reg = <0>; + regulator-name = "vdd_ac_bat"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + }; + }; + sound { compatible = "nvidia,tegra-audio-wm8903-cardhu", "nvidia,tegra-audio-wm8903";
Signature · 1 line
1.7.1.1
PATCH v2 2/3 ARM: dt: tegra: cardhu: split dts file for support multiple board versions
In reply to Laxman DewanganThere is multiple version of cardhu starting from A01 to A07. Cardhu A01 and A03 are not supported. Cardhu A02 will have different sets of GPIOs for fixed regulator compare to
cardhu A04. The Cardhu A05, A06, A07 are compatibe with A04. Based on cardhu version, the related dts file need to be chosen like for cardhu A02, use tegra30-cardhu-a02.dts, cardhu A04 and more, use tegra30-cardhu-a04.dts.
This patch create the DTS file A02 and A04 and convert tegra30-cardhu.dts as dts include file.
---
Changes from V1-->V2:
- Add i2c eeprom address in board-identification paragraph.
arch/arm/boot/dts/tegra30-cardhu-a02.dts | 11 ++++++++
arch/arm/boot/dts/tegra30-cardhu-a04.dts | 10 ++++++++
.../{tegra30-cardhu.dts => tegra30-cardhu.dtsi} | 25 ++++++++++++++++++-
arch/arm/mach-tegra/Makefile.boot | 3 +-
4 files changed, 46 insertions(+), 3 deletions(-)
create mode 100644 arch/arm/boot/dts/tegra30-cardhu-a02.dts
create mode 100644 arch/arm/boot/dts/tegra30-cardhu-a04.dts
rename arch/arm/boot/dts/{tegra30-cardhu.dts => tegra30-cardhu.dtsi} (84%)arch/arm/boot/dts/tegra30-cardhu-a02.dts new file +11 -0
@@ -0,0 +1,11 @@ +/dts-v1/; + +/include/ "tegra30-cardhu.dtsi" + +/* This dts file support the cardhu A02 version of board */ + +/ { + model = "NVIDIA Tegra30 Cardhu A02 evaluation board"; + compatible = "nvidia,cardhu-a02", "nvidia,cardhu", "nvidia,tegra30"; +}; +
arch/arm/boot/dts/tegra30-cardhu-a04.dts new file +10 -0
@@ -0,0 +1,10 @@ +/dts-v1/; + +/include/ "tegra30-cardhu.dtsi" + +/* This dts file support the cardhu A04 and later versions of board */ + +/ { + model = "NVIDIA Tegra30 Cardhu A04 (A05, A06, A07) evaluation board"; + compatible = "nvidia,cardhu-a04", "nvidia,cardhu", "nvidia,tegra30"; +};
arch/arm/boot/dts/tegra30-cardhu.dtsi renamed from arch/arm/boot/dts/tegra30-cardhu.dts +23 -2
@@ -1,7 +1,28 @@ -/dts-v1/; - /include/ "tegra30.dtsi" +/** + * This file contains common DT entry for all fab version of Cardhu. + * There is multiple fab version of Cardhu starting from A01 to A07. + * Cardhu fab version A01 and A03 are not supported. Cardhu fab version + * A02 will have different sets of GPIOs for fixed regulator compare to + * Cardhu fab version A04. The Cardhu fab version A05, A06, A07 are + * compatible with fab version A04. Based on Cardhu fab version, the + * related dts file need to be chosen like for Cardhu fab version A02, + * use tegra30-cardhu-a02.dts, Cardhu fab version A04 and later, use + * tegra30-cardhu-a04.dts. + * The identification of board is done in two ways, by looking the sticker + * on PCB and by reading board id eeprom. + * The stciker will have number like 600-81291-1000-002 C.3. In this 4th + * number is the fab version like here it is 002 and hence fab version A02. + * The (downstream internal) U-Boot of Cardhu display the board-id as + * follows: + * BoardID: 0C5B, SKU: 0A01, Fab: 02, Rev: 45.00 + * In this Fab version is 02 i.e. A02. + * The BoardID I2C eeprom is interfaced through i2c5 (pwr_i2c address 0x56). + * The location 0x8 of this eeprom contains the Fab version. It is 1 byte + * wide. + */ + / { model = "NVIDIA Tegra30 Cardhu evaluation board"; compatible = "nvidia,cardhu", "nvidia,tegra30";
arch/arm/mach-tegra/Makefile.boot +2 -1
@@ -8,4 +8,5 @@ dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-seaboard.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-trimslice.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-ventana.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += tegra20-whistler.dtb -dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30-cardhu.dtb +dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30-cardhu-a02.dtb +dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += tegra30-cardhu-a04.dtb
Signature · 1 line
1.7.1.1
PATCH v2 3/3 ARM: tegra: cardhu: add dt entry for fixed regulators
In reply to Laxman DewanganCadhu have multiple power rails which are controlled by GPIOs. Add support of these power rail control through fixed regulators. Add entry for all fixed regulators for cardhu-a02 and a04.
The details are taken from downstream kernel.
Some points on this change are:
* Add the tps65910-LDO5 entry and make it always ON to supply power to SDMMC. Once the sd driver support regulator handling, this flag will be remove.
* Dropping registration of rail vdd_sdmmc1 as the gpio is used by sdhci power-gpio. This need to fix in sdhci driver and then need to add the registration mechanism. Just removing power-gpio and adding fixed regulator with this gpio is causing the sd access to fail because first probe call of this regulator fails due to non-available of parent and so it calls gpio_free() which disable the pins in gpio mode make pin output to LOW causes power to OFF. In probe retry, it got success and it powered-on but it again need to do again numeration of card here.
---
Changes from V1-->V2:
- Remove the vdd_sdmmc1 regulator registration.
- Fix the pex_hvdd_3v3 regulator registration.
- Set panel regulator to be always on.
arch/arm/boot/dts/tegra30-cardhu-a02.dts | 76 +++++++++++++++ arch/arm/boot/dts/tegra30-cardhu-a04.dts | 88 ++++++++++++++++++ arch/arm/boot/dts/tegra30-cardhu.dtsi | 147 ++++++++++++++++++++++++++++++ 3 files changed, 311 insertions(+), 0 deletions(-)
arch/arm/boot/dts/tegra30-cardhu-a02.dts +76 -0
@@ -7,5 +7,81 @@ / { model = "NVIDIA Tegra30 Cardhu A02 evaluation board"; compatible = "nvidia,cardhu-a02", "nvidia,cardhu", "nvidia,tegra30"; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + ddr_reg: regulator@100 { + compatible = "regulator-fixed"; + reg = <100>; + regulator-name = "vdd_ddr"; + regulator-min-microvolt = <1500000>; + regulator-max-microvolt = <1500000>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&pmic 6 0>; + }; + + sys_3v3_reg: regulator@101 { + compatible = "regulator-fixed"; + reg = <101>; + regulator-name = "sys_3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&pmic 7 0>; + }; + + usb1_vbus_reg: regulator@102 { + compatible = "regulator-fixed"; + reg = <102>; + regulator-name = "usb1_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&gpio 68 0>; /* GPIO PI4 */ + gpio-open-drain; + vin-supply = <&vdd_5v0_reg>; + }; + + usb3_vbus_reg: regulator@103 { + compatible = "regulator-fixed"; + reg = <103>; + regulator-name = "usb3_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&gpio 63 0>; /* GPIO PH7 */ + gpio-open-drain; + vin-supply = <&vdd_5v0_reg>; + }; + + vdd_5v0_reg: regulator@104 { + compatible = "regulator-fixed"; + reg = <104>; + regulator-name = "5v0"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + gpio = <&pmic 2 0>; + }; + + vdd_bl_reg: regulator@105 { + compatible = "regulator-fixed"; + reg = <105>; + regulator-name = "vdd_bl"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + regulator-boot-on; + enable-active-high; + gpio = <&gpio 83 0>; /* GPIO PK3 */ + }; + }; };
arch/arm/boot/dts/tegra30-cardhu-a04.dts +88 -0
92 lines not on this page · raw message
arch/arm/boot/dts/tegra30-cardhu.dtsi +147 -0
165 lines not on this page · raw message
Signature · 1 line
1.7.1.1
Stephen Warren
AppliedQuoted 7 lines · Laxman Dewangan
This patch series add the PMIC and fixed regulators for cardhu board. There is multiple versions of cardhu baord named as A01, A02, A03..and so on. Cardhu A01 and A03 are not supported. Cardhu A02 and A04 have different sets of GPIO for regualtors. The cardhu A04 is compatible for A05, A06 and A07 in GPIOs. This patch series split the cardhu dts file to cardhu-a02 and carchu-a04 and then add entry for different fixed regualtors.
Thanks, applied the series to Tegra's for-3.7/dt branch.