From patchwork Fri Feb 18 12:28:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1594774 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=zJwqbme/; dkim=fail reason="signature verification failed" (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=NT8CaLS8; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K0WGC72K2z9sFn for ; Fri, 18 Feb 2022 23:29:07 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C050883AA3; Fri, 18 Feb 2022 13:29:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645187343; bh=x8xIFZzvmqv36D8QFnfb/VDzzL+/CtwezLtQ3AZqiGk=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=zJwqbme/jFW7nIoqvtCF4YGwWRPehvIWC+OrkKlGu+wMuWbwsJxHwem3qSsh/nk9F QHhYbR7QDeFqlHsmFocTW2/BkB9pn2KulXT2NavoPBoLL19CMyybH5JuVxmZUBIAxn FLtGhOxJ/fy7PZGzIPKnmsCIhFoYJ6aNP0Fs5+jmLZVXksJBRcsNJG0N2K0AZ/yKWQ zlrVUvg3GsSCVqV1vQRCEYhcVR8UaBTH89NULzAfX/P+hWMiFNPdGjDVIiUXtO4TeQ UvqbmeJID7XwszM7Vncza5PvVqmVZBSr8o9EzYLDYMi991TsOX/MKz6Gzvr+DKz+hA fzKb/n3iO5KRw== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 05AEC83885; Fri, 18 Feb 2022 13:28:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645187340; bh=x8xIFZzvmqv36D8QFnfb/VDzzL+/CtwezLtQ3AZqiGk=; h=From:To:Cc:Subject:Date:From; b=NT8CaLS8ZSZpOjUOrNCNNzx6bdk28uYSAFBva1/i7rWG8w0diMkoUOjCha/XQDJgI XBaASHe+oHxfgvpO8fl65m/LHcddpur80nPA63IT41A7PWzgF1pENrVTV3QJKuI/mE paXA9xIHQJUdiAOv5kGTA8dQ2fXDNLkyCsU8sd8IXib3N9LTOfyvOEP5hdafVgJBdb 01lkxn6h9gs4QsmVzlew1AHoIK9ffatB7ox88p0DfLvQaU6jalUuHKOcBDku/cxW4D j1Jo7+eDqRVgbL3cBJOvBlFCe9J4aCzjWddcsXR1qjKI7i6Kh2oTayR6jp9xbpmNVT O8IMIv9tOsDjQ== From: Lukasz Majewski To: Tom Rini , u-boot@lists.denx.de Cc: Lukasz Majewski , Jaehoon Chung , Peng Fan Subject: [PATCH 1/3] arm: mmc: Add "ti, am335-sdhci" compatible for TI's omap_hsmmc driver Date: Fri, 18 Feb 2022 13:28:41 +0100 Message-Id: <20220218122844.2493-1-lukma@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean In the Linux kernel (v5.16) for this SoC there are two separate drivers - namely sdhci-omap.c and omap_hsmmc.c which have separate set of compatibles. The U-Boot's drivers/mmc/omap_hsmmc.c driver supports both eMMC and SD devices - hence the compatible for SDHCI can be added. After this change the am335x DTS description can be easier ported from Linux kernel. Signed-off-by: Lukasz Majewski Reviewed-by: Jaehoon Chung --- drivers/mmc/omap_hsmmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 820065800f..b2f4a4e721 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -2019,6 +2019,7 @@ static const struct udevice_id omap_hsmmc_ids[] = { { .compatible = "ti,omap3-hsmmc" }, { .compatible = "ti,omap4-hsmmc" }, { .compatible = "ti,am33xx-hsmmc" }, + { .compatible = "ti,am335-sdhci" }, { .compatible = "ti,dra7-hsmmc", .data = (ulong)&dra7_mmc_of_data }, { } }; From patchwork Fri Feb 18 12:28:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1594775 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=YFeXZ8Iu; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=qL0pjnXc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K0WGR4KQyz9sFn for ; Fri, 18 Feb 2022 23:29:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7527983885; Fri, 18 Feb 2022 13:29:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645187348; bh=v7ki8Qaam141LbSRV1m3Cl+qsS3xsJsiFrCRy91riyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YFeXZ8IufiwjhqmbVHnXbh3oVIHYR7IwMV5bBfB5PFVFm6CxgK8F/pLx8+b4IN/rd 9SX5qi8ony2UjbdjGmiaYkwDdHQVqYSiNkjumR8Mxhe+wUXMcWO3QRkakS/9uDBh/N oIYQ2glgcH7Vq1Og2V0Mjb5I18eQo2LgXDg6MuTk+rsZLdzGcraooKSQngFOGJfpep JlMf8X2Bl6fr1bbvzMbWnADEHZEMTSe1Nm909nI4bTYlQeJroRgOGis9sl7JC35NqC bQGhNwX66tS/oeeSfM1IIM3DorrOU6zqOn92FPR5c3SXAcSEx8ci2n80z4PbQWRYAD JKKKYTx/DtItA== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 664168389A; Fri, 18 Feb 2022 13:29:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645187340; bh=v7ki8Qaam141LbSRV1m3Cl+qsS3xsJsiFrCRy91riyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qL0pjnXcdAdz6ssMnOz1YZwdAGXsk8OmsvVdCdAiaBX89JYrzr54fI11w4igq+vYx B85XZzqERoN+QrUTn8t2Tw3JvkPceT+sSR5vMrloxnehDVfFSt867pMPhs3Ws5mEfc 7+8whDJhadnZ+Gpwp8MO9brYMQbJEQk5hRqdY1fmpfnMELMsdHvZVa2Rat4o/o8Vv0 TZXmdLKIrvALn+AFrN/t+r2nwktrE5+KAqWJ1TwcH2TwzIceBymEy3i9udbiluOLNg +QA7aOmP5apytz388NMJFtKrBRj0NjEWV9mI6YF99/hbvO/hQfAusrnmkM+K0mE2LB ifqYQ88Usn3Fw== From: Lukasz Majewski To: Tom Rini , u-boot@lists.denx.de Cc: Lukasz Majewski , "Matwey V. Kornilov" , Paul Barker Subject: [PATCH 2/3] arm: dts: Add mmc[01] aliases to am33xx.dtsi Date: Fri, 18 Feb 2022 13:28:42 +0100 Message-Id: <20220218122844.2493-2-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220218122844.2493-1-lukma@denx.de> References: <20220218122844.2493-1-lukma@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean This change provides similar aliases definitions as now present in Linux kernel v5.16.9 for am33xx.dtsi file. Signed-off-by: Lukasz Majewski --- arch/arm/dts/am33xx.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/dts/am33xx.dtsi b/arch/arm/dts/am33xx.dtsi index b5093020ee..5f9b306ddb 100644 --- a/arch/arm/dts/am33xx.dtsi +++ b/arch/arm/dts/am33xx.dtsi @@ -40,6 +40,8 @@ ethernet1 = &cpsw_emac1; spi0 = &spi0; spi1 = &spi1; + mmc0 = &mmc1; + mmc1 = &mmc2; }; cpus { From patchwork Fri Feb 18 12:28:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 1594776 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=OJsdV37d; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=j9Wulbar; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K0WGc2wYgz9sFn for ; Fri, 18 Feb 2022 23:29:28 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0103683BBD; Fri, 18 Feb 2022 13:29:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645187358; bh=ZQLR8CXtggpQa0q0p5oJek+AsJ8zFb9lOSaYIUdrAbY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OJsdV37deJvJOdHg9XSqV1bQeE4wA5IIN/EX6XVBiLdA9aRVnnS/THCQg31ErU3Ez D5GVPXRO7QoFzlGLg30UOL9c1Uic5pIREJEFzuN024dMvIHcQcuGCbDvvu3CSdwhuM Io8w0l9dn1WW8v8ZCYAgpBORw0nfKolRXcAqG2j9MflK3uYSaoOHYQ5ixYA13EbZdg KNgPPqF5XErYWHSAYxeVbsDWpyZjSRYk6Zr768NVBGWCarNvdloL8mZJ/2AsmnRzXc BaXa130FeZw+XGJz5o+Cc+iM5rhP+DoFEyGOqT8gmgouEem5eLVZdrr4WbytLSDiCS wLWWBlodNLRsw== Received: from localhost.localdomain (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D220F83A92; Fri, 18 Feb 2022 13:29:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645187341; bh=ZQLR8CXtggpQa0q0p5oJek+AsJ8zFb9lOSaYIUdrAbY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j9WulbaratxT3e0ZI72SPmjwc8orEc5dpEqebv+EtdHHqr6ivKcGNW/N7Jj5P/+JH DKHuzQzXL6zUCYP/fpkZeIZAMPLOvLAJM0Gfc1O2R+FccKM9JP+quTCk2LPYjltO0o cfoTN/IiqatV2x24MkkKK9WQkFRPkKhx8fm++KtfEW9IvqadsdEY6Sysn8TlG2OHul ldPmkrFYfm9E+wp4TpFXB/A/vV8z3RlxCrSd7iITfKre/uzqreo09smwkJB2CvvI2b EAvUexS/km0K0TbaVpVf+0SENSmRVw8qPGqzWLeGXTC8P2jjwcd1+kmbTZYTsOlpWj chGKctzGNTePw== From: Lukasz Majewski To: Tom Rini , u-boot@lists.denx.de Cc: Lukasz Majewski , "Matwey V. Kornilov" , Paul Barker Subject: [PATCH 3/3] arm: dts: Add DTS description for MMC2 am33xx devices Date: Fri, 18 Feb 2022 13:28:43 +0100 Message-Id: <20220218122844.2493-3-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220218122844.2493-1-lukma@denx.de> References: <20220218122844.2493-1-lukma@denx.de> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean This code has been ported from Linux v5.16.9 arch/arm/boot/dts/am33xx.dtsi file to allow correct usage of MMC2 controller in U-Boot. This IP block is a bit specific as it is connected to L3 interconnect bus, whereas mmc[01] are connected to L4. Proper configuration of this block (including providing clock) is handled in ti-sysc.c driver. Signed-off-by: Lukasz Majewski --- arch/arm/dts/am33xx.dtsi | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/arch/arm/dts/am33xx.dtsi b/arch/arm/dts/am33xx.dtsi index 5f9b306ddb..5871344edb 100644 --- a/arch/arm/dts/am33xx.dtsi +++ b/arch/arm/dts/am33xx.dtsi @@ -42,6 +42,7 @@ spi1 = &spi1; mmc0 = &mmc1; mmc1 = &mmc2; + mmc2 = &mmc3; }; cpus { @@ -303,6 +304,35 @@ }; }; + target-module@47810000 { + compatible = "ti,sysc-omap2", "ti,sysc"; + reg = <0x478102fc 0x4>, + <0x47810110 0x4>, + <0x47810114 0x4>; + reg-names = "rev", "sysc", "syss"; + ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY | + SYSC_OMAP2_ENAWAKEUP | + SYSC_OMAP2_SOFTRESET | + SYSC_OMAP2_AUTOIDLE)>; + ti,sysc-sidle = , + , + ; + ti,syss-mask = <1>; + clocks = <&l3s_clkctrl AM3_L3S_MMC3_CLKCTRL 0>; + clock-names = "fck"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x47810000 0x1000>; + + mmc3: mmc@0 { + compatible = "ti,am335-sdhci"; + ti,needs-special-reset; + interrupts = <29>; + reg = <0x0 0x1000>; + status = "disabled"; + }; + }; + i2c0: i2c@44e0b000 { compatible = "ti,omap4-i2c"; #address-cells = <1>; @@ -359,15 +389,6 @@ status = "disabled"; }; - mmc3: mmc@47810000 { - compatible = "ti,omap4-hsmmc"; - ti,hwmods = "mmc3"; - ti,needs-special-reset; - interrupts = <29>; - reg = <0x47810000 0x1000>; - status = "disabled"; - }; - wdt2: wdt@44e35000 { compatible = "ti,omap3-wdt"; ti,hwmods = "wd_timer2";