linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] arm64: tegra: Wire up pinctrl states for all DPAUX controllers
@ 2020-08-06 15:41 Thierry Reding
  2020-08-06 15:41 ` [PATCH 2/4] arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano Thierry Reding
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Thierry Reding @ 2020-08-06 15:41 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Jon Hunter, linux-tegra

From: Thierry Reding <treding@nvidia.com>

All four DPAUX controllers on Tegra194 control the pin configuration of
their companion I2C controllers. Wire up all the pinctrl states for the
I2C controllers so that their pins can be correctly muxed when needed.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra194.dtsi | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
index 1ddf9cb6dbce..94c65ca8345a 100644
--- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi
@@ -346,6 +346,9 @@ dp_aux_ch1_i2c: i2c@3190000 {
 			clock-names = "div-clk";
 			resets = <&bpmp TEGRA194_RESET_I2C4>;
 			reset-names = "i2c";
+			pinctrl-0 = <&state_dpaux1_i2c>;
+			pinctrl-1 = <&state_dpaux1_off>;
+			pinctrl-names = "i2c", "off";
 			status = "disabled";
 		};
 
@@ -360,10 +363,14 @@ dp_aux_ch0_i2c: i2c@31b0000 {
 			clock-names = "div-clk";
 			resets = <&bpmp TEGRA194_RESET_I2C6>;
 			reset-names = "i2c";
+			pinctrl-0 = <&state_dpaux0_i2c>;
+			pinctrl-1 = <&state_dpaux0_off>;
+			pinctrl-names = "i2c", "off";
 			status = "disabled";
 		};
 
-		gen7_i2c: i2c@31c0000 {
+		/* shares pads with dpaux2 */
+		dp_aux_ch2_i2c: i2c@31c0000 {
 			compatible = "nvidia,tegra194-i2c";
 			reg = <0x031c0000 0x10000>;
 			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
@@ -373,10 +380,14 @@ gen7_i2c: i2c@31c0000 {
 			clock-names = "div-clk";
 			resets = <&bpmp TEGRA194_RESET_I2C7>;
 			reset-names = "i2c";
+			pinctrl-0 = <&state_dpaux2_i2c>;
+			pinctrl-1 = <&state_dpaux2_off>;
+			pinctrl-names = "i2c", "off";
 			status = "disabled";
 		};
 
-		gen9_i2c: i2c@31e0000 {
+		/* shares pads with dpaux3 */
+		dp_aux_ch3_i2c: i2c@31e0000 {
 			compatible = "nvidia,tegra194-i2c";
 			reg = <0x031e0000 0x10000>;
 			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
@@ -386,6 +397,9 @@ gen9_i2c: i2c@31e0000 {
 			clock-names = "div-clk";
 			resets = <&bpmp TEGRA194_RESET_I2C9>;
 			reset-names = "i2c";
+			pinctrl-0 = <&state_dpaux3_i2c>;
+			pinctrl-1 = <&state_dpaux3_off>;
+			pinctrl-names = "i2c", "off";
 			status = "disabled";
 		};
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano
  2020-08-06 15:41 [PATCH 1/4] arm64: tegra: Wire up pinctrl states for all DPAUX controllers Thierry Reding
@ 2020-08-06 15:41 ` Thierry Reding
  2020-08-08  2:56   ` Michał Mirosław
  2020-08-06 15:41 ` [PATCH 3/4] arm64: tegra: Disable SD card write-protection " Thierry Reding
  2020-08-06 15:41 ` [PATCH 4/4] arm64: tegra: Describe display controller outputs for Tegra210 Thierry Reding
  2 siblings, 1 reply; 5+ messages in thread
From: Thierry Reding @ 2020-08-06 15:41 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Jon Hunter, linux-tegra

From: Thierry Reding <treding@nvidia.com>

The VBUS supply for the micro USB port on Jetson Nano is derived from
the main system supply and always on. Describe in nevertheless to fix
warnings during boot.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
index 195a43e2356b..d34338b63c90 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
@@ -541,6 +541,8 @@ usb2-0 {
 				mode = "peripheral";
 				usb-role-switch;
 
+				vbus-supply = <&vdd_5v0_usb>;
+
 				connector {
 					compatible = "gpio-usb-b-connector",
 						     "usb-b-connector";
@@ -843,4 +845,14 @@ avdd_io_edp_1v05: regulator@7 {
 
 		vin-supply = <&avdd_1v05_pll>;
 	};
+
+	vdd_5v0_usb: regulator@8 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VDD_5V_USB";
+		regulator-min-microvolt = <50000000>;
+		regulator-max-microvolt = <50000000>;
+
+		vin-supply = <&vdd_5v0_sys>;
+	};
 };
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] arm64: tegra: Disable SD card write-protection on Jetson Nano
  2020-08-06 15:41 [PATCH 1/4] arm64: tegra: Wire up pinctrl states for all DPAUX controllers Thierry Reding
  2020-08-06 15:41 ` [PATCH 2/4] arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano Thierry Reding
@ 2020-08-06 15:41 ` Thierry Reding
  2020-08-06 15:41 ` [PATCH 4/4] arm64: tegra: Describe display controller outputs for Tegra210 Thierry Reding
  2 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2020-08-06 15:41 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Jon Hunter, linux-tegra

From: Thierry Reding <treding@nvidia.com>

There is no GPIO hooked up to the write-protection pin of the SD slot.
Make sure to describe this properly in device tree to avoid errors or
warnings being emitted by the operating system.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
index d34338b63c90..c55716c336c1 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
@@ -576,6 +576,7 @@ mmc@700b0000 {
 		bus-width = <4>;
 
 		cd-gpios = <&gpio TEGRA_GPIO(Z, 1) GPIO_ACTIVE_LOW>;
+		disable-wp;
 
 		vqmmc-supply = <&vddio_sdmmc>;
 		vmmc-supply = <&vdd_3v3_sd>;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] arm64: tegra: Describe display controller outputs for Tegra210
  2020-08-06 15:41 [PATCH 1/4] arm64: tegra: Wire up pinctrl states for all DPAUX controllers Thierry Reding
  2020-08-06 15:41 ` [PATCH 2/4] arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano Thierry Reding
  2020-08-06 15:41 ` [PATCH 3/4] arm64: tegra: Disable SD card write-protection " Thierry Reding
@ 2020-08-06 15:41 ` Thierry Reding
  2 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2020-08-06 15:41 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Jon Hunter, linux-tegra

From: Thierry Reding <treding@nvidia.com>

Both display controllers can drive both DSI and both SOR outputs on
Tegra210. Describe this in device tree so that the operating system
doesn't have to guess.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
index 829f786af133..27d4e3f134ca 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
@@ -194,6 +194,7 @@ dc@54200000 {
 
 			iommus = <&mc TEGRA_SWGROUP_DC>;
 
+			nvidia,outputs = <&dsia &dsib &sor0 &sor1>;
 			nvidia,head = <0>;
 		};
 
@@ -208,10 +209,11 @@ dc@54240000 {
 
 			iommus = <&mc TEGRA_SWGROUP_DCB>;
 
+			nvidia,outputs = <&dsia &dsib &sor0 &sor1>;
 			nvidia,head = <1>;
 		};
 
-		dsi@54300000 {
+		dsia: dsi@54300000 {
 			compatible = "nvidia,tegra210-dsi";
 			reg = <0x0 0x54300000 0x0 0x00040000>;
 			clocks = <&tegra_car TEGRA210_CLK_DSIA>,
@@ -248,7 +250,7 @@ nvjpg@54380000 {
 			status = "disabled";
 		};
 
-		dsi@54400000 {
+		dsib: dsi@54400000 {
 			compatible = "nvidia,tegra210-dsi";
 			reg = <0x0 0x54400000 0x0 0x00040000>;
 			clocks = <&tegra_car TEGRA210_CLK_DSIB>,
@@ -284,7 +286,7 @@ tsec@54500000 {
 			status = "disabled";
 		};
 
-		sor@54540000 {
+		sor0: sor@54540000 {
 			compatible = "nvidia,tegra210-sor";
 			reg = <0x0 0x54540000 0x0 0x00040000>;
 			interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>;
@@ -304,7 +306,7 @@ sor@54540000 {
 			status = "disabled";
 		};
 
-		sor@54580000 {
+		sor1: sor@54580000 {
 			compatible = "nvidia,tegra210-sor1";
 			reg = <0x0 0x54580000 0x0 0x00040000>;
 			interrupts = <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/4] arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano
  2020-08-06 15:41 ` [PATCH 2/4] arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano Thierry Reding
@ 2020-08-08  2:56   ` Michał Mirosław
  0 siblings, 0 replies; 5+ messages in thread
From: Michał Mirosław @ 2020-08-08  2:56 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Jon Hunter, linux-tegra

On Thu, Aug 06, 2020 at 05:41:09PM +0200, Thierry Reding wrote:
> The VBUS supply for the micro USB port on Jetson Nano is derived from
> the main system supply and always on. Describe in nevertheless to fix
> warnings during boot.
[...]
> --- a/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
> +++ b/arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts
> @@ -541,6 +541,8 @@ usb2-0 {
>  				mode = "peripheral";
>  				usb-role-switch;
>  
> +				vbus-supply = <&vdd_5v0_usb>;
[...]

If it's not controllable then this is equivalent to setting vdd_5v0_sys
here, isn't it?

Best Regards,
Michał Mirosław

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-08  2:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 15:41 [PATCH 1/4] arm64: tegra: Wire up pinctrl states for all DPAUX controllers Thierry Reding
2020-08-06 15:41 ` [PATCH 2/4] arm64: tegra: Add VBUS supply for micro USB port on Jetson Nano Thierry Reding
2020-08-08  2:56   ` Michał Mirosław
2020-08-06 15:41 ` [PATCH 3/4] arm64: tegra: Disable SD card write-protection " Thierry Reding
2020-08-06 15:41 ` [PATCH 4/4] arm64: tegra: Describe display controller outputs for Tegra210 Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).