2022-10-07 11:17:01

by Prathamesh Shete

[permalink] [raw]
Subject: [PATCH] arm64: tegra: Add Tegra234 SDMMC1 device tree node

Add device tree node for Tegra234 SDMMC1 instance.
Add and enable SD card instance in device tree.

Signed-off-by: Prathamesh Shete <[email protected]>
---
.../boot/dts/nvidia/tegra234-p3701-0000.dtsi | 7 +++
arch/arm64/boot/dts/nvidia/tegra234.dtsi | 59 +++++++++++++++++++
2 files changed, 66 insertions(+)

diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi
index 9e4d72cfa69f..fe52810e5b9d 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi
@@ -55,6 +55,13 @@
};
};

+ mmc@3400000 {
+ status = "okay";
+ bus-width = <4>;
+ cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_LOW>;
+ disable-wp;
+ };
+
mmc@3460000 {
status = "okay";
bus-width = <8>;
diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
index 0170bfa8a467..87f6b8be79a5 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
@@ -7,6 +7,7 @@
#include <dt-bindings/memory/tegra234-mc.h>
#include <dt-bindings/power/tegra234-powergate.h>
#include <dt-bindings/reset/tegra234-reset.h>
+#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>

/ {
compatible = "nvidia,tegra234";
@@ -895,6 +896,45 @@
status = "disabled";
};

+ mmc@3400000 {
+ compatible = "nvidia,tegra194-sdhci", "nvidia,tegra234-sdhci";
+ reg = <0x03400000 0x20000>;
+ interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&bpmp TEGRA234_CLK_SDMMC1>,
+ <&bpmp TEGRA234_CLK_SDMMC_LEGACY_TM>;
+ clock-names = "sdhci", "tmclk";
+ assigned-clocks = <&bpmp TEGRA234_CLK_SDMMC1>,
+ <&bpmp TEGRA234_CLK_PLLC4_MUXED>;
+ assigned-clock-parents =
+ <&bpmp TEGRA234_CLK_PLLC4_MUXED>,
+ <&bpmp TEGRA234_CLK_PLLC4_VCO_DIV2>;
+ resets = <&bpmp TEGRA234_RESET_SDMMC1>;
+ reset-names = "sdhci";
+ interconnects = <&mc TEGRA234_MEMORY_CLIENT_SDMMCRA &emc>,
+ <&mc TEGRA234_MEMORY_CLIENT_SDMMCWA &emc>;
+ interconnect-names = "dma-mem", "write";
+ iommus = <&smmu_niso1 TEGRA234_SID_SDMMC1A>;
+ pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
+ pinctrl-0 = <&sdmmc1_3v3>;
+ pinctrl-1 = <&sdmmc1_1v8>;
+ nvidia,pad-autocal-pull-up-offset-3v3-timeout =
+ <0x07>;
+ nvidia,pad-autocal-pull-down-offset-3v3-timeout =
+ <0x07>;
+ nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x06>;
+ nvidia,pad-autocal-pull-down-offset-1v8-timeout =
+ <0x07>;
+ nvidia,pad-autocal-pull-up-offset-sdr104 = <0x00>;
+ nvidia,pad-autocal-pull-down-offset-sdr104 = <0x00>;
+ nvidia,default-tap = <14>;
+ nvidia,default-trim = <0x8>;
+ sd-uhs-sdr25;
+ sd-uhs-sdr50;
+ sd-uhs-ddr50;
+ sd-uhs-sdr104;
+ status = "disabled";
+ };
+
mmc@3460000 {
compatible = "nvidia,tegra234-sdhci", "nvidia,tegra186-sdhci";
reg = <0x03460000 0x20000>;
@@ -1541,6 +1581,25 @@

#interrupt-cells = <2>;
interrupt-controller;
+ sdmmc1_3v3: sdmmc1-3v3 {
+ pins = "sdmmc1-hv";
+ power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+ };
+
+ sdmmc1_1v8: sdmmc1-1v8 {
+ pins = "sdmmc1-hv";
+ power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+ };
+ sdmmc3_3v3: sdmmc3-3v3 {
+ pins = "sdmmc3-hv";
+ power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
+ };
+
+ sdmmc3_1v8: sdmmc3-1v8 {
+ pins = "sdmmc3-hv";
+ power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
+ };
+
};

aon-fabric@c600000 {
--
2.17.1


2022-10-07 13:01:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] arm64: tegra: Add Tegra234 SDMMC1 device tree node

On 07/10/2022 12:26, Prathamesh Shete wrote:
> Add device tree node for Tegra234 SDMMC1 instance.
> Add and enable SD card instance in device tree.
>
> Signed-off-by: Prathamesh Shete <[email protected]>
> ---
> .../boot/dts/nvidia/tegra234-p3701-0000.dtsi | 7 +++
> arch/arm64/boot/dts/nvidia/tegra234.dtsi | 59 +++++++++++++++++++
> 2 files changed, 66 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi b/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi
> index 9e4d72cfa69f..fe52810e5b9d 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra234-p3701-0000.dtsi
> @@ -55,6 +55,13 @@
> };
> };
>
> + mmc@3400000 {
> + status = "okay";
> + bus-width = <4>;
> + cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_LOW>;
> + disable-wp;
> + };
> +
> mmc@3460000 {
> status = "okay";
> bus-width = <8>;
> diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
> index 0170bfa8a467..87f6b8be79a5 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi
> @@ -7,6 +7,7 @@
> #include <dt-bindings/memory/tegra234-mc.h>
> #include <dt-bindings/power/tegra234-powergate.h>
> #include <dt-bindings/reset/tegra234-reset.h>
> +#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
>
> / {
> compatible = "nvidia,tegra234";
> @@ -895,6 +896,45 @@
> status = "disabled";
> };
>
> + mmc@3400000 {
> + compatible = "nvidia,tegra194-sdhci", "nvidia,tegra234-sdhci";
> + reg = <0x03400000 0x20000>;
> + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&bpmp TEGRA234_CLK_SDMMC1>,
> + <&bpmp TEGRA234_CLK_SDMMC_LEGACY_TM>;
> + clock-names = "sdhci", "tmclk";
> + assigned-clocks = <&bpmp TEGRA234_CLK_SDMMC1>,
> + <&bpmp TEGRA234_CLK_PLLC4_MUXED>;
> + assigned-clock-parents =
> + <&bpmp TEGRA234_CLK_PLLC4_MUXED>,
> + <&bpmp TEGRA234_CLK_PLLC4_VCO_DIV2>;
> + resets = <&bpmp TEGRA234_RESET_SDMMC1>;
> + reset-names = "sdhci";
> + interconnects = <&mc TEGRA234_MEMORY_CLIENT_SDMMCRA &emc>,
> + <&mc TEGRA234_MEMORY_CLIENT_SDMMCWA &emc>;
> + interconnect-names = "dma-mem", "write";
> + iommus = <&smmu_niso1 TEGRA234_SID_SDMMC1A>;
> + pinctrl-names = "sdmmc-3v3", "sdmmc-1v8";
> + pinctrl-0 = <&sdmmc1_3v3>;
> + pinctrl-1 = <&sdmmc1_1v8>;
> + nvidia,pad-autocal-pull-up-offset-3v3-timeout =
> + <0x07>;
> + nvidia,pad-autocal-pull-down-offset-3v3-timeout =
> + <0x07>;
> + nvidia,pad-autocal-pull-up-offset-1v8-timeout = <0x06>;
> + nvidia,pad-autocal-pull-down-offset-1v8-timeout =
> + <0x07>;
> + nvidia,pad-autocal-pull-up-offset-sdr104 = <0x00>;
> + nvidia,pad-autocal-pull-down-offset-sdr104 = <0x00>;
> + nvidia,default-tap = <14>;
> + nvidia,default-trim = <0x8>;
> + sd-uhs-sdr25;
> + sd-uhs-sdr50;
> + sd-uhs-ddr50;
> + sd-uhs-sdr104;
> + status = "disabled";
> + };
> +
> mmc@3460000 {
> compatible = "nvidia,tegra234-sdhci", "nvidia,tegra186-sdhci";
> reg = <0x03460000 0x20000>;
> @@ -1541,6 +1581,25 @@
>
> #interrupt-cells = <2>;
> interrupt-controller;
> + sdmmc1_3v3: sdmmc1-3v3 {
> + pins = "sdmmc1-hv";
> + power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
> + };
> +
> + sdmmc1_1v8: sdmmc1-1v8 {
> + pins = "sdmmc1-hv";
> + power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
> + };
> + sdmmc3_3v3: sdmmc3-3v3 {
> + pins = "sdmmc3-hv";
> + power-source = <TEGRA_IO_PAD_VOLTAGE_3V3>;
> + };
> +
> + sdmmc3_1v8: sdmmc3-1v8 {
> + pins = "sdmmc3-hv";
> + power-source = <TEGRA_IO_PAD_VOLTAGE_1V8>;
> + };
> +

Wrong conflict resolution... blank line went into the wrong place.

> };
>
> aon-fabric@c600000 {

Best regards,
Krzysztof

2022-10-07 21:18:06

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] arm64: tegra: Add Tegra234 SDMMC1 device tree node

Hi Prathamesh,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v6.0 next-20221007]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Prathamesh-Shete/arm64-tegra-Add-Tegra234-SDMMC1-device-tree-node/20221007-182805
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-randconfig-r015-20221002
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/intel-lab-lkp/linux/commit/27799d5f3c8578d16aca166cc13c51172dcb6b1d
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Prathamesh-Shete/arm64-tegra-Add-Tegra234-SDMMC1-device-tree-node/20221007-182805
git checkout 27799d5f3c8578d16aca166cc13c51172dcb6b1d
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

>> Error: arch/arm64/boot/dts/nvidia/tegra234.dtsi:862.20-21 syntax error
FATAL ERROR: Unable to parse input tree

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (1.90 kB)
config (184.86 kB)
Download all attachments