[U-Boot] [PATCH v5 01/15] arm64: dts: k3: Sync sdhci0 node from kernel and change driver name
Lokesh Vutla
lokeshvutla at ti.com
Tue Jun 4 05:28:50 UTC 2019
On 29/05/19 3:15 PM, Faiz Abbas wrote:
> Sync the sdhci0 node from kernel. This changes the compatible that is
> required to be there in the driver. Change the same for the SD card node
> which is not yet supported in kernel. This also syncs the main_pmx0 node
> as a side effect.
>
> Also change the name of the driver to match the compatible in kernel.
>
> Signed-off-by: Faiz Abbas <faiz_abbas at ti.com>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> ---
> arch/arm/dts/k3-am65-main.dtsi | 22 ++++++++++++
> arch/arm/dts/k3-am654-base-board-u-boot.dtsi | 27 ++------------
> arch/arm/dts/k3-am654-base-board.dts | 28 +++++++++++++++
> arch/arm/dts/k3-am654-r5-base-board.dts | 31 ++++++++++++++++
> configs/am65x_evm_a53_defconfig | 2 +-
> configs/am65x_evm_r5_defconfig | 2 +-
> drivers/mmc/Kconfig | 8 ++---
> drivers/mmc/Makefile | 2 +-
> .../mmc/{k3_arsan_sdhci.c => am654_sdhci.c} | 36 +++++++++----------
> 9 files changed, 109 insertions(+), 49 deletions(-)
> rename drivers/mmc/{k3_arsan_sdhci.c => am654_sdhci.c} (67%)
>
> diff --git a/arch/arm/dts/k3-am65-main.dtsi b/arch/arm/dts/k3-am65-main.dtsi
> index adcd6341e4..84fed12fbd 100644
> --- a/arch/arm/dts/k3-am65-main.dtsi
> +++ b/arch/arm/dts/k3-am65-main.dtsi
> @@ -69,4 +69,26 @@
> clock-frequency = <48000000>;
> current-speed = <115200>;
> };
> +
> + main_pmx0: pinmux at 11c000 {
> + compatible = "pinctrl-single";
> + reg = <0x0 0x11c000 0x0 0x2e4>;
> + #pinctrl-cells = <1>;
> + pinctrl-single,register-width = <32>;
> + pinctrl-single,function-mask = <0xffffffff>;
> + };
> +
> + sdhci0: sdhci at 4f80000 {
> + compatible = "ti,am654-sdhci-5.1";
> + reg = <0x0 0x4f80000 0x0 0x260>, <0x0 0x4f90000 0x0 0x134>;
> + power-domains = <&k3_pds 47>;
> + clocks = <&k3_clks 47 0>, <&k3_clks 47 1>;
> + clock-names = "clk_ahb", "clk_xin";
> + interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
> + mmc-ddr-1_8v;
> + mmc-hs200-1_8v;
> + ti,otap-del-sel = <0x2>;
> + ti,trm-icp = <0x8>;
> + dma-coherent;
> + };
> };
> diff --git a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
> index f5c8253831..589a90f9f9 100644
> --- a/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
> +++ b/arch/arm/dts/k3-am654-base-board-u-boot.dtsi
> @@ -19,14 +19,6 @@
> &cbass_main{
> u-boot,dm-spl;
>
> - main_pmx0: pinmux at 11c000 {
> - compatible = "pinctrl-single";
> - reg = <0x0 0x11c000 0x0 0x2e4>;
> - #pinctrl-cells = <1>;
> - pinctrl-single,register-width = <32>;
> - pinctrl-single,function-mask = <0xffffffff>;
> - };
> -
> main_pmx1: pinmux at 11c2e8 {
> compatible = "pinctrl-single";
> reg = <0x0 0x11c2e8 0x0 0x24>;
> @@ -35,17 +27,8 @@
> pinctrl-single,function-mask = <0xffffffff>;
> };
>
> - sdhci0: sdhci at 04F80000 {
> - compatible = "arasan,sdhci-5.1";
> - reg = <0x0 0x4F80000 0x0 0x1000>,
> - <0x0 0x4F90000 0x0 0x400>;
> - clocks = <&k3_clks 47 1>;
> - power-domains = <&k3_pds 47>;
> - max-frequency = <25000000>;
> - };
> -
> sdhci1: sdhci at 04FA0000 {
> - compatible = "arasan,sdhci-5.1";
> + compatible = "ti,am654-sdhci-5.1";
> reg = <0x0 0x4FA0000 0x0 0x1000>,
> <0x0 0x4FB0000 0x0 0x400>;
> clocks = <&k3_clks 48 1>;
> @@ -164,7 +147,8 @@
> AM65X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */
> AM65X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */
> AM65X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */
> - AM65X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */
> + AM65X_IOPAD(0x01b4, PIN_INPUT_PULLUP, 0) /* (A23) MMC0_SDCD */
> + AM65X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */
> >;
> u-boot,dm-spl;
> };
> @@ -198,11 +182,6 @@
>
> &sdhci0 {
> u-boot,dm-spl;
> - status = "okay";
> - non-removable;
> - bus-width = <8>;
> - pinctrl-names = "default";
> - pinctrl-0 = <&main_mmc0_pins_default>;
> };
>
> &sdhci1 {
> diff --git a/arch/arm/dts/k3-am654-base-board.dts b/arch/arm/dts/k3-am654-base-board.dts
> index af6956fdc1..ab233916c6 100644
> --- a/arch/arm/dts/k3-am654-base-board.dts
> +++ b/arch/arm/dts/k3-am654-base-board.dts
> @@ -6,6 +6,7 @@
> /dts-v1/;
>
> #include "k3-am654.dtsi"
> +#include <dt-bindings/pinctrl/k3.h>
>
> / {
> compatible = "ti,am654-evm", "ti,am654";
> @@ -34,3 +35,30 @@
> };
> };
> };
> +
> +&main_pmx0 {
> + main_mmc0_pins_default: main_mmc0_pins_default {
> + pinctrl-single,pins = <
> + AM65X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0) /* (B25) MMC0_CLK */
> + AM65X_IOPAD(0x01aC, PIN_INPUT_PULLUP, 0) /* (B27) MMC0_CMD */
> + AM65X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0) /* (A26) MMC0_DAT0 */
> + AM65X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0) /* (E25) MMC0_DAT1 */
> + AM65X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0) /* (C26) MMC0_DAT2 */
> + AM65X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0) /* (A25) MMC0_DAT3 */
> + AM65X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0) /* (E24) MMC0_DAT4 */
> + AM65X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */
> + AM65X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */
> + AM65X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */
> + AM65X_IOPAD(0x01b4, PIN_INPUT_PULLUP, 0) /* (A23) MMC0_SDCD */
> + AM65X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */
> + >;
> + };
> +};
> +
> +&sdhci0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&main_mmc0_pins_default>;
> + bus-width = <8>;
> + non-removable;
> + ti,driver-strength-ohm = <50>;
> +};
> diff --git a/arch/arm/dts/k3-am654-r5-base-board.dts b/arch/arm/dts/k3-am654-r5-base-board.dts
> index a07038be70..47cbfa5a3c 100644
> --- a/arch/arm/dts/k3-am654-r5-base-board.dts
> +++ b/arch/arm/dts/k3-am654-r5-base-board.dts
> @@ -132,8 +132,39 @@
> };
> };
>
> +&main_pmx0 {
> + u-boot,dm-spl;
> + main_mmc0_pins_default: main_mmc0_pins_default {
> + pinctrl-single,pins = <
> + AM65X_IOPAD(0x01a8, PIN_INPUT_PULLDOWN, 0) /* (B25) MMC0_CLK */
> + AM65X_IOPAD(0x01aC, PIN_INPUT_PULLUP, 0) /* (B27) MMC0_CMD */
> + AM65X_IOPAD(0x01a4, PIN_INPUT_PULLUP, 0) /* (A26) MMC0_DAT0 */
> + AM65X_IOPAD(0x01a0, PIN_INPUT_PULLUP, 0) /* (E25) MMC0_DAT1 */
> + AM65X_IOPAD(0x019c, PIN_INPUT_PULLUP, 0) /* (C26) MMC0_DAT2 */
> + AM65X_IOPAD(0x0198, PIN_INPUT_PULLUP, 0) /* (A25) MMC0_DAT3 */
> + AM65X_IOPAD(0x0194, PIN_INPUT_PULLUP, 0) /* (E24) MMC0_DAT4 */
> + AM65X_IOPAD(0x0190, PIN_INPUT_PULLUP, 0) /* (A24) MMC0_DAT5 */
> + AM65X_IOPAD(0x018c, PIN_INPUT_PULLUP, 0) /* (B26) MMC0_DAT6 */
> + AM65X_IOPAD(0x0188, PIN_INPUT_PULLUP, 0) /* (D25) MMC0_DAT7 */
> + AM65X_IOPAD(0x01b0, PIN_INPUT, 0) /* (C25) MMC0_DS */
> + >;
> + };
> +};
> +
> &memorycontroller {
> vtt-supply = <&vtt_supply>;
> pinctrl-names = "default";
> pinctrl-0 = <&wkup_vtt_pins_default>;
> };
> +
> +&sdhci0 {
> + clock-names = "clk_xin";
> + clocks = <&clk_200mhz>;
> + /delete-property/ power-domains;
> +};
> +
> +&sdhci1 {
> + clock-names = "clk_xin";
> + clocks = <&clk_200mhz>;
I guess you missed adding clk_200mhz node in DT. This is giving a build error.
Can you please add back the node and repost the series?
Thanks and regards,
Lokesh
More information about the U-Boot
mailing list