From patchwork Fri Aug 30 08:54:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 13784750 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E6242CA0EF7 for ; Fri, 30 Aug 2024 08:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=y/oMdSrJZ8GmC/HbLc7HHpot5lLMNU3FuPcspf26QUY=; b=15kR3HtqJN2fRAFmCAgsUScWSp RPsMgAymceRh/PlFRVz5F/r4Ck2ub2K7VbiptM7WvSWZoGwV0rfE6tquUZa8e9KQr0W556xhXYWVa d0rO+AdXPl5OuTpxdSqqIOAk/Jy3hRp6yy5q/sjp3xQOv/cvGs1QxTQqq47MdfBTu8MD7Mvr1CTU1 iuD9PqnS3MRCKxHYCENjpLBr1alH+kKChgsArRnkSNVA/U5p5arILNnnUYUU8XL9dcoC04cQ4O6HD DGCfR980XtyWxoaPNLhT8DLjDBiEx3v2WVnbELTRjgSh/pneUW18mHRquCFUl6Alm36GdHN5yF7EE 7zlPQCiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjxT8-00000005SOa-2or8; Fri, 30 Aug 2024 08:58:58 +0000 Received: from phobos.denx.de ([2a01:238:438b:c500:173d:9f52:ddab:ee01]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjxPK-00000005Rmg-2bZ8 for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 08:55:43 +0000 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 6B2F088D3F; Fri, 30 Aug 2024 10:55:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1725008100; bh=y/oMdSrJZ8GmC/HbLc7HHpot5lLMNU3FuPcspf26QUY=; h=From:To:Cc:Subject:Date:From; b=q8wBpj9m2SEPwm3kZvyWteHSf1CxSv9JGbqeBAji1EvOyfBKqle8cN6kRRTT2QSf/ 5lYr9NOblSMGm2+QYH2aiGRsLrf3WDUQUW+NkEy6VgfRNN7KKcIG/CGMpcMBotBkH2 s+xkpgDsvc5HidKVV5tYZAqFoeekCW3QVUh0LahQrul4r1qrqYtgHUnOJkHPlR7OCY gdK8jmr5JMfKqwAAE2aDbD1p+D5G0/iL5s6pf4b0ehv2XyXoqv+BCIdlSiVzNvWJsq D+fKjJ1v5jkOx0ZHZpDVkas2rTutUtAjt80sTKTjdf8DBVSkyGfQnvbbDDVSeidTZ3 geCQxxiS/IYdg== From: Lukasz Majewski To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer Cc: Pengutronix Kernel Team , Fabio Estevam , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lukasz Majewski Subject: [PATCH v3] dts: nxp: mxs: Add descriptions for imx287 based btt3-[012] devices Date: Fri, 30 Aug 2024 10:54:41 +0200 Message-Id: <20240830085441.3589713-1-lukma@denx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_015502_990978_8F23D865 X-CRM114-Status: GOOD ( 18.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The btt3 device' HW revisions from 0 to 2 use imx287 SoC and are to some extend similar to already upstreamed XEA devices, hence are using common imx28-lwe.dtsi file. New, imx28-btt3.dtsi has been added to embrace common DTS properties for different HW revisions for this device. As a result - changes introduced in imx28-btt3-[012].dts are minimal. Signed-off-by: Lukasz Majewski --- Changes for v2: - Rename dts file from btt3-[012] to imx28-btt3-[012] to match current linux kernel naming convention - Remove 'wlf,wm8974' from compatible for codec@1a Changes for v3: - Keep alphabethical order for Makefile entries --- arch/arm/boot/dts/nxp/mxs/Makefile | 3 + arch/arm/boot/dts/nxp/mxs/imx28-btt3-0.dts | 12 + arch/arm/boot/dts/nxp/mxs/imx28-btt3-1.dts | 8 + arch/arm/boot/dts/nxp/mxs/imx28-btt3-2.dts | 12 + arch/arm/boot/dts/nxp/mxs/imx28-btt3.dtsi | 320 +++++++++++++++++++++ 5 files changed, 355 insertions(+) create mode 100644 arch/arm/boot/dts/nxp/mxs/imx28-btt3-0.dts create mode 100644 arch/arm/boot/dts/nxp/mxs/imx28-btt3-1.dts create mode 100644 arch/arm/boot/dts/nxp/mxs/imx28-btt3-2.dts create mode 100644 arch/arm/boot/dts/nxp/mxs/imx28-btt3.dtsi diff --git a/arch/arm/boot/dts/nxp/mxs/Makefile b/arch/arm/boot/dts/nxp/mxs/Makefile index a430d04f9c69..96dd31ea19ba 100644 --- a/arch/arm/boot/dts/nxp/mxs/Makefile +++ b/arch/arm/boot/dts/nxp/mxs/Makefile @@ -8,6 +8,9 @@ dtb-$(CONFIG_ARCH_MXS) += \ imx28-apf28.dtb \ imx28-apf28dev.dtb \ imx28-apx4devkit.dtb \ + imx28-btt3-0.dtb \ + imx28-btt3-1.dtb \ + imx28-btt3-2.dtb \ imx28-cfa10036.dtb \ imx28-cfa10037.dtb \ imx28-cfa10049.dtb \ diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-btt3-0.dts b/arch/arm/boot/dts/nxp/mxs/imx28-btt3-0.dts new file mode 100644 index 000000000000..6ac46e4b21bb --- /dev/null +++ b/arch/arm/boot/dts/nxp/mxs/imx28-btt3-0.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 + * Lukasz Majewski, DENX Software Engineering, lukma@denx.de + */ + +/dts-v1/; +#include "imx28-btt3.dtsi" + +&hog_pins_rev { + fsl,pull-up = ; +}; diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-btt3-1.dts b/arch/arm/boot/dts/nxp/mxs/imx28-btt3-1.dts new file mode 100644 index 000000000000..213fe931c58b --- /dev/null +++ b/arch/arm/boot/dts/nxp/mxs/imx28-btt3-1.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 + * Lukasz Majewski, DENX Software Engineering, lukma@denx.de + */ + +/dts-v1/; +#include "imx28-btt3.dtsi" diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-btt3-2.dts b/arch/arm/boot/dts/nxp/mxs/imx28-btt3-2.dts new file mode 100644 index 000000000000..c787c2d03463 --- /dev/null +++ b/arch/arm/boot/dts/nxp/mxs/imx28-btt3-2.dts @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 + * Lukasz Majewski, DENX Software Engineering, lukma@denx.de + */ + +/dts-v1/; +#include "imx28-btt3.dtsi" + +&lcdif { + display = <&display_te_b>; +}; diff --git a/arch/arm/boot/dts/nxp/mxs/imx28-btt3.dtsi b/arch/arm/boot/dts/nxp/mxs/imx28-btt3.dtsi new file mode 100644 index 000000000000..27a01e925e26 --- /dev/null +++ b/arch/arm/boot/dts/nxp/mxs/imx28-btt3.dtsi @@ -0,0 +1,320 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 + * Lukasz Majewski, DENX Software Engineering, lukma@denx.de + */ +/dts-v1/; +#include "imx28-lwe.dtsi" + +/ { + model = "BTT3"; + + compatible = "lwn,btt3", "fsl,imx28"; + + chosen { + bootargs = "root=/dev/mmcblk0p2 rootfstype=ext4 ro rootwait console=ttyAMA0,115200 panic=1 quiet"; + }; + + memory@40000000 { + reg = <0x40000000 0x10000000>; + device_type = "memory"; + }; + + poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio0 24 0>; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "BTTC Audio"; + simple-audio-card,widgets = "Speaker", "BTTC Speaker"; + simple-audio-card,routing = "BTTC Speaker", "SPKOUTN", "BTTC Speaker", "SPKOUTP"; + simple-audio-card,dai-link@0 { + format = "left_j"; + bitclock-master = <&dai0_master>; + frame-master = <&dai0_master>; + mclk-fs = <256>; + dai0_master: cpu { + sound-dai = <&saif0>; + }; + codec { + sound-dai = <&wm89xx>; + clocks = <&saif0>; + }; + }; + }; + + wifi_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_en_pin_bttc>; + reset-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; + /* W1-163 needs 60us for WL_EN to be low and */ + /* 150ms after high before downloading FW is possible */ + post-power-on-delay-ms = <200>; + power-off-delay-us = <100>; + }; +}; + +&auart0 { + pinctrl-names = "default"; + pinctrl-0 = <&auart0_2pins_a>; + status = "okay"; +}; + +&auart3 { + pinctrl-names = "default"; + pinctrl-0 = <&auart3_pins_a>; + uart-has-rtscts; + status = "okay"; +}; + +&i2c0 { + wm89xx: codec@1a { + compatible = "wlf,wm8940"; + reg = <0x1a>; + #sound-dai-cells = <0>; + }; +}; + +&lcdif { + pinctrl-names = "default"; + pinctrl-0 = <&lcdif_24bit_pins_a>, <&lcdif_sync_pins_bttc>, + <&lcdif_reset_pins_bttc>; + lcd-supply = <®_3v3>; + display = <&display0>; + status = "okay"; + display0: display0 { + bits-per-pixel = <32>; + bus-width = <24>; + display-timings { + native-mode = <&timing0>; + timing0: timing0 { + clock-frequency = <6500000>; + hactive = <320>; + vactive = <240>; + hfront-porch = <20>; + hback-porch = <38>; + hsync-len = <30>; + vfront-porch = <4>; + vback-porch = <14>; + vsync-len = <4>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <1>; + }; + }; + }; + display_te_b: display1 { + bits-per-pixel = <32>; + bus-width = <24>; + display-timings { + native-mode = <&timing0>; + timing_te_b: timing0 { + clock-frequency = <6500000>; + hactive = <320>; + vactive = <240>; + hfront-porch = <20>; + hback-porch = <68>; + hsync-len = <30>; + vfront-porch = <4>; + vback-porch = <14>; + vsync-len = <4>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <1>; + }; + }; + }; + +}; + +&mac0 { + clocks = <&clks 57>, <&clks 57>, <&clks 64>; + clock-names = "ipg", "ahb", "enet_out"; + phy-handle = <&mac0_phy>; + phy-mode = "rmii"; + phy-supply = <®_3v3>; + local-mac-address = [ 00 11 B8 00 BF 8A ]; + status = "okay"; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + mac0_phy: ethernet-phy@0 { + /* LAN8720Ai - PHY ID */ + compatible = "ethernet-phy-id0007.c0f0","ethernet-phy-ieee802.3-c22"; + reg = <0>; + smsc,disable-energy-detect; + max-speed = <100>; + + reset-gpios = <&gpio4 12 GPIO_ACTIVE_LOW>; /* GPIO4_12 */ + reset-assert-us = <1000>; + reset-deassert-us = <1000>; + }; + }; +}; + +&pinctrl { + pinctrl-names = "default"; + pinctrl-0 = <&hog_pins_a>, <&hog_pins_rev>; + + hog_pins_a: hog@0 { + reg = <0>; + fsl,pinmux-ids = < + MX28_PAD_GPMI_RDY2__GPIO_0_22 + MX28_PAD_GPMI_RDY3__GPIO_0_23 + MX28_PAD_GPMI_RDN__GPIO_0_24 + MX28_PAD_LCD_VSYNC__GPIO_1_28 + MX28_PAD_SSP2_SS1__GPIO_2_20 + MX28_PAD_SSP2_SS2__GPIO_2_21 + MX28_PAD_AUART2_CTS__GPIO_3_10 + MX28_PAD_AUART2_RTS__GPIO_3_11 + MX28_PAD_GPMI_WRN__GPIO_0_25 + MX28_PAD_ENET0_RXD2__GPIO_4_9 + MX28_PAD_ENET0_TXD2__GPIO_4_11 + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; + + hog_pins_rev: hog@1 { + reg = <1>; + fsl,pinmux-ids = < + MX28_PAD_ENET0_RXD3__GPIO_4_10 + MX28_PAD_ENET0_TX_CLK__GPIO_4_5 + MX28_PAD_ENET0_COL__GPIO_4_14 + MX28_PAD_ENET0_CRS__GPIO_4_15 + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; + + keypad_pins_bttc: keypad-bttc@0 { + reg = <0>; + fsl,pinmux-ids = < + MX28_PAD_GPMI_D00__GPIO_0_0 + MX28_PAD_AUART0_CTS__GPIO_3_2 + MX28_PAD_AUART0_RTS__GPIO_3_3 + MX28_PAD_GPMI_D03__GPIO_0_3 + MX28_PAD_GPMI_D04__GPIO_0_4 + MX28_PAD_GPMI_D05__GPIO_0_5 + MX28_PAD_GPMI_D06__GPIO_0_6 + MX28_PAD_GPMI_D07__GPIO_0_7 + MX28_PAD_GPMI_CE1N__GPIO_0_17 + MX28_PAD_GPMI_CE2N__GPIO_0_18 + MX28_PAD_GPMI_CE3N__GPIO_0_19 + MX28_PAD_GPMI_RDY0__GPIO_0_20 + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; + + lcdif_sync_pins_bttc: lcdif-bttc@0 { + reg = <0>; + fsl,pinmux-ids = < + MX28_PAD_LCD_DOTCLK__LCD_DOTCLK + MX28_PAD_LCD_ENABLE__LCD_ENABLE + MX28_PAD_LCD_HSYNC__LCD_HSYNC + MX28_PAD_LCD_RD_E__LCD_VSYNC + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; + + lcdif_reset_pins_bttc: lcdif-bttc@1 { + reg = <1>; + fsl,pinmux-ids = < + MX28_PAD_LCD_RESET__GPIO_3_30 + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; + + ssp1_sdio_pins_a: ssp1-sdio@0 { + reg = <0>; + fsl,pinmux-ids = < + MX28_PAD_SSP1_DATA0__SSP1_D0 + MX28_PAD_GPMI_D01__SSP1_D1 + MX28_PAD_GPMI_D02__SSP1_D2 + MX28_PAD_SSP1_DATA3__SSP1_D3 + MX28_PAD_SSP1_CMD__SSP1_CMD + MX28_PAD_SSP1_SCK__SSP1_SCK + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; + + wifi_en_pin_bttc: wifi_en_pin@0 { + reg = <0>; + fsl,pinmux-ids = < + MX28_PAD_GPMI_CLE__GPIO_0_27 + >; + fsl,drive-strength = ; + fsl,voltage = ; + fsl,pull-up = ; + }; +}; + +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm3_pins_a>; + status = "okay"; +}; + +®_usb_5v { + gpio = <&gpio1 28 0>; +}; + +&saif0 { + pinctrl-names = "default"; + pinctrl-0 = <&saif0_pins_a>; + #sound-dai-cells = <0>; + assigned-clocks = <&clks 53>; + assigned-clock-rates = <12000000>; + status = "okay"; +}; + +&saif1 { + pinctrl-names = "default"; + pinctrl-0 = <&saif1_pins_a>; + fsl,saif-master = <&saif0>; + #sound-dai-cells = <0>; + status = "okay"; +}; + +&ssp1 { + compatible = "fsl,imx28-mmc"; + pinctrl-names = "default"; + pinctrl-0 = <&ssp1_sdio_pins_a>; + bus-width = <4>; + no-1-8-v; /* force 3.3V VIO */ + pm-ignore-notify; + non-removable; + vmmc-supply = <®_3v3>; + mmc-pwrseq = <&wifi_pwrseq>; + keep-power-in-suspend; + status = "okay"; + + wlan@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + }; +}; + +&ssp2 { + compatible = "fsl,imx28-spi"; + pinctrl-names = "default"; + pinctrl-0 = <&spi2_pins_a>; + status = "okay"; +};