Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp244366rdb; Tue, 5 Dec 2023 04:28:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHANFqAb2ZTOdGixewi8mxS1RxnrA0mIo8s4A8tW4gl+on8ZlFNvo710HSAPjjVLVs3+sQl X-Received: by 2002:a17:90b:3509:b0:285:8673:450d with SMTP id ls9-20020a17090b350900b002858673450dmr943992pjb.40.1701779318881; Tue, 05 Dec 2023 04:28:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701779318; cv=none; d=google.com; s=arc-20160816; b=uit1jPR4FNDzVmUIFHaWzdXBqTG9hdr04LIw7yBcfreq1kBgSA2972KNMbRl1Utrwl GPODq/AAreq+FUpVqLxY03a/y8uPDg+WPUsgh8WOak7R6jAICl2b9AX0j+yL6aj0a0oD nLod+6vq1nDKAkRoOYIP+zxt1aMozjaw16iNTBPb3wPL805xI4cvJgAJ5lrrv5hfgWNW w8sQ2/I4xgwRS0o+A/BUQYs5y9MMbrz01GH1FgFf0EKqxJfPAvTbhqMW3ZEiXKRyRpq1 xuI0S7JhGtsZgQQpxKx9YC2W6bQzco7DfDjVSPp90tKehcNH/BqsXMcYel/F4dhcVf8h e/3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S+xwkmsy7VSqyYt52pSQPSEwpk1cEvf4a3A6NA6/Zxo=; fh=2UM0HcQIGfm64i4yb5PUnsB26bb6fgXnX2aXs1hpDcU=; b=QnfqLReH2SyVzwpqv+Q6uTeWa5C7uG8ZB6cX3BVLukAbSRQbvTVid/QaJpuP6tnOyB s/OuqNW/XHS9fm+FEDQwkqJNnfRqRk4zixAHcLKr9FoxCH8npgP3qnX7C4BENckqlX7S fs0bTFCmm82eR4SAfVJ2LQAQuXtPz/T6z964f96/iHwVxWxQNxRmsGWBu4RBneNaWtN9 DOguxJg6fsdo7axjTfpGDygAK9TCkPd5cy/fT1HAM7MnEz2PdOHkixHjOi0ooEcNTZBI AB6QFyIbZJGrjwRdntp5nAboSfuNJJmZfncNLPok5Xvi+xH3Fp+WhDXFzSxC1Fk52AC7 w1MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KY1q7+rr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id u12-20020a17090adb4c00b002865a41a91dsi7373554pjx.138.2023.12.05.04.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 04:28:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KY1q7+rr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E10EA80FE94F; Tue, 5 Dec 2023 04:28:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235655AbjLEM2V (ORCPT + 99 others); Tue, 5 Dec 2023 07:28:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235254AbjLEM2J (ORCPT ); Tue, 5 Dec 2023 07:28:09 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF9F119AF for ; Tue, 5 Dec 2023 04:28:03 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C680C433C7; Tue, 5 Dec 2023 12:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701779283; bh=Lq9+YFD8ee/CPgqqk36XThTfc/xuSyQLSaprYPsaFug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KY1q7+rrLQGzsVbZXhBT/FMtamYxQwS52Jj105jVLMK8a0rGXVY12A74sCDCryKRb 948XlUxkZRbh2OFwOjBMOdcU5yXgMmnAXA7n3dAryn7TZWaXXVPLyAqoZPXT3PqHXk bIqR5xuCvlUbY4d50YL0goJJ6RhPVxHxU/12Xxc6xPOUjRWEiqNd5iY2rPfFizahl8 PhF8AQPvtdxD56yvldxAFfU4Ap392lTUp8xlpimanhz2oTG86gla5FSV2nAfY0h/Gg RJwPoWshqsKMKWL+g+jVFOPcRGwFabCE0v58uk5uEeMyERdScEZVKSA9p4bc54lQFZ 9caorURlOetzA== Date: Tue, 5 Dec 2023 20:27:56 +0800 From: Shawn Guo To: Hugo Villeneuve Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, leoyang.li@nxp.com, robh@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Hugo Villeneuve Subject: Re: [PATCH v4 3/3] arm64: dts: freescale: introduce rve-gateway board Message-ID: <20231205122756.GE236001@dragon> References: <20231103142831.2116163-1-hugo@hugovil.com> <20231103142831.2116163-4-hugo@hugovil.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231103142831.2116163-4-hugo@hugovil.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 05 Dec 2023 04:28:36 -0800 (PST) On Fri, Nov 03, 2023 at 10:28:31AM -0400, Hugo Villeneuve wrote: > From: Hugo Villeneuve > > The RVE gateway board is based on a Variscite VAR-SOM-NANO, > with a NXP MX8MN nano CPU. > > Signed-off-by: Hugo Villeneuve > --- > arch/arm64/boot/dts/freescale/Makefile | 1 + > .../boot/dts/freescale/imx8mn-rve-gateway.dts | 282 ++++++++++++++++++ > 2 files changed, 283 insertions(+) > create mode 100644 arch/arm64/boot/dts/freescale/imx8mn-rve-gateway.dts > > diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile > index 300049037eb0..c99da779ef7b 100644 > --- a/arch/arm64/boot/dts/freescale/Makefile > +++ b/arch/arm64/boot/dts/freescale/Makefile > @@ -98,6 +98,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mn-bsh-smm-s2pro.dtb > dtb-$(CONFIG_ARCH_MXC) += imx8mn-evk.dtb > dtb-$(CONFIG_ARCH_MXC) += imx8mn-ddr3l-evk.dtb > dtb-$(CONFIG_ARCH_MXC) += imx8mn-ddr4-evk.dtb > +dtb-$(CONFIG_ARCH_MXC) += imx8mn-rve-gateway.dtb > dtb-$(CONFIG_ARCH_MXC) += imx8mn-tqma8mqnl-mba8mx.dtb > dtb-$(CONFIG_ARCH_MXC) += imx8mn-var-som-symphony.dtb > dtb-$(CONFIG_ARCH_MXC) += imx8mn-venice-gw7902.dtb > diff --git a/arch/arm64/boot/dts/freescale/imx8mn-rve-gateway.dts b/arch/arm64/boot/dts/freescale/imx8mn-rve-gateway.dts > new file mode 100644 > index 000000000000..186f54fd06c6 > --- /dev/null > +++ b/arch/arm64/boot/dts/freescale/imx8mn-rve-gateway.dts > @@ -0,0 +1,282 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright 2023 DimOnOff > + */ > + > +/dts-v1/; > + > +#include > +#include "imx8mn-var-som.dtsi" > + > +/ { > + model = "RVE gateway"; > + compatible = "rve,rve-gateway", "variscite,var-som-mx8mn", "fsl,imx8mn"; > + > + crystal_duart_24m: crystal-duart-24m { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <24000000>; > + }; > + > + gpio-keys { > + compatible = "gpio-keys"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_gpio_keys>; > + > + key-enter { > + label = "enter"; > + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; > + linux,code = ; > + }; > + > + key-exit { > + label = "exit"; > + gpios = <&gpio3 23 GPIO_ACTIVE_LOW>; > + linux,code = ; > + }; > + }; > + > + lcd { > + compatible = "hit,hd44780"; > + display-height-chars = <2>; > + display-width-chars = <20>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_lcd>; > + data-gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>, > + <&gpio1 6 GPIO_ACTIVE_HIGH>, > + <&gpio1 14 GPIO_ACTIVE_HIGH>, > + <&gpio4 28 GPIO_ACTIVE_HIGH>, > + <&gpio5 24 GPIO_ACTIVE_HIGH>, > + <&gpio5 2 GPIO_ACTIVE_HIGH>, > + <&gpio1 12 GPIO_ACTIVE_HIGH>, > + <&gpio5 25 GPIO_ACTIVE_HIGH>; > + enable-gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; > + rs-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; > + rw-gpios = <&gpio4 27 GPIO_ACTIVE_HIGH>; > + }; > + > + reg_3p3v: regulator-3p3v { > + compatible = "regulator-fixed"; > + regulator-name = "3P3V"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + }; > + > + /* Bourns PEC12R rotary encoder, 24 steps. */ > + rotary: rotary-encoder { > + compatible = "rotary-encoder"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_rotary>; > + gpios = <&gpio1 5 GPIO_ACTIVE_LOW>, /* A */ > + <&gpio3 21 GPIO_ACTIVE_LOW>; /* B */ > + linux,axis = <0>; /* REL_X */ > + rotary-encoder,encoding = "gray"; > + rotary-encoder,relative-axis; > + }; > +}; > + > +&ecspi1 { > + cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>; > + > + duart1: serial@0 { > + compatible = "nxp,sc16is752"; > + reg = <0>; > + spi-rx-bus-width = <1>; > + spi-tx-bus-width = <1>; > + spi-max-frequency = <4000000>; > + clocks = <&crystal_duart_24m>; > + interrupt-parent = <&gpio3>; > + interrupts = <22 IRQ_TYPE_EDGE_FALLING>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-line-names = "RADIO0", "RADIO1", "RADIO2", "RADIO3", > + "RADIO4", "RADIO_RESET", "TP12", "TP11"; Can we add some indent to get the line aligned with the first " above? There are a few such lines that could be improved. Shawn > + linux,rs485-enabled-at-boot-time; > + rs485-rts-active-low; > + }; > + > + /delete-node/ touchscreen@0; > +}; > + > +&ecspi2 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ecspi2>; > + cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; > + /delete-property/ dmas; > + /delete-property/ dma-names; > + status = "okay"; > + > + duart2: serial@0 { > + compatible = "nxp,sc16is752"; > + reg = <0>; > + spi-rx-bus-width = <1>; > + spi-tx-bus-width = <1>; > + spi-max-frequency = <4000000>; > + clocks = <&crystal_duart_24m>; > + interrupt-parent = <&gpio3>; > + interrupts = <20 IRQ_TYPE_EDGE_FALLING>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-line-names = "LED_B_USER", "LED_R_USER", "LED_G_USER", > + "GPIO_EXT3", "GPIO_EXT2", "GPIO_EXT1", "GPIO_EXT0", "TP13"; > + linux,rs485-enabled-at-boot-time; > + rs485-rts-active-low; > + }; > +}; > + > +/* Configure PWM pins in GPIO mode: */ > +&gpio5 { > + gpio-line-names = "", "", "", "PWM3", "PWM2", "PWM1"; > +}; > + > +&gpu { > + status = "disabled"; > +}; > + > +&i2c2 { > + clock-frequency = <400000>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_i2c2>; > + status = "okay"; > + > + /* Carrier board EEPROM */ > + eeprom_cb: eeprom@56 { > + compatible = "atmel,24c04"; > + reg = <0x56>; > + pagesize = <16>; > + vcc-supply = <®_3p3v>; > + }; > + > + lm75: sensor@48 { > + compatible = "st,stlm75"; > + reg = <0x48>; > + vs-supply = <®_3p3v>; > + }; > + > + mcp7940: rtc@6f { > + compatible = "microchip,mcp7940x"; > + reg = <0x6f>; > + }; > +}; > + > +&i2c3 { > + codec@1a { > + status = "disabled"; > + }; > +}; > + > +&i2c4 { > + clock-frequency = <400000>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_i2c4>; > + status = "okay"; > + > + pcf8574_1: gpio@38 { > + compatible = "nxp,pcf8574"; > + reg = <0x38>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-line-names = "LED_B_COMM3", "LED_R_COMM3", "LED_G_COMM3", > + "TP14", "TP15", "LED_G_COMM4", "LED_R_COMM4", "LED_B_COMM4"; > + }; > + > + pcf8574_2: gpio@39 { > + compatible = "nxp,pcf8574"; > + reg = <0x39>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-line-names = "LED_B_COMM2", "LED_G_COMM2", "LED_B_COMM1", > + "LED_R_COMM2", "LED_R_COMM1", "LED_G_COMM1", "TP16", "TP17"; > + }; > +}; > + > +/* Bluetooth */ > +&uart2 { > + status = "disabled"; > +}; > + > +&usbotg1 { > + dr_mode = "host"; > + disable-over-current; > + status = "okay"; > +}; > + > +/* SD interface on expansion connector. */ > +&usdhc2 { > + vmmc-supply = <®_3p3v>; > + cd-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; > +}; > + > +&iomuxc { > + pinctrl_ecspi1: ecspi1grp { > + fsl,pins = < > + MX8MN_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x13 > + MX8MN_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x13 > + MX8MN_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x13 > + MX8MN_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x13 /* SS0 */ > + MX8MN_IOMUXC_SAI5_RXD1_GPIO3_IO22 0x13 /* SC16 IRQ */ > + >; > + }; > + > + pinctrl_ecspi2: ecspi2grp { > + fsl,pins = < > + MX8MN_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x13 > + MX8MN_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x13 > + MX8MN_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x13 > + MX8MN_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x13 /* SS0 */ > + MX8MN_IOMUXC_SAI5_RXC_GPIO3_IO20 0x13 /* SC16 IRQ */ > + >; > + }; > + > + pinctrl_gpio_keys: gpiokeysgrp { > + fsl,pins = < > + MX8MN_IOMUXC_GPIO1_IO01_GPIO1_IO1 0xc6 /* Enter */ > + MX8MN_IOMUXC_SAI5_RXD2_GPIO3_IO23 0xc6 /* Exit */ > + >; > + }; > + > + pinctrl_i2c2: i2c2grp { > + fsl,pins = < > + MX8MN_IOMUXC_I2C2_SCL_I2C2_SCL 0x400001c3 > + MX8MN_IOMUXC_I2C2_SDA_I2C2_SDA 0x400001c3 > + >; > + }; > + > + pinctrl_i2c4: i2c4grp { > + fsl,pins = < > + MX8MN_IOMUXC_I2C4_SCL_I2C4_SCL 0x400001c3 > + MX8MN_IOMUXC_I2C4_SDA_I2C4_SDA 0x400001c3 > + >; > + }; > + > + pinctrl_lcd: lcdgrp { > + fsl,pins = < > + MX8MN_IOMUXC_SAI3_TXD_GPIO5_IO1 0x00000156 /* D0 */ > + MX8MN_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x00000156 /* D1 */ > + MX8MN_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x00000156 /* D2 */ > + MX8MN_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x00000156 /* D3 */ > + MX8MN_IOMUXC_UART2_RXD_GPIO5_IO24 0x00000156 /* D4 */ > + MX8MN_IOMUXC_SAI3_MCLK_GPIO5_IO2 0x00000156 /* D5 */ > + MX8MN_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x00000156 /* D6 */ > + MX8MN_IOMUXC_UART2_TXD_GPIO5_IO25 0x00000156 /* D7 */ > + MX8MN_IOMUXC_UART1_TXD_GPIO5_IO23 0x00000156 /* E */ > + MX8MN_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x00000156 /* RS */ > + MX8MN_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x00000156 /* R/W */ > + >; > + }; > + > + pinctrl_rotary: rotarygrp { > + fsl,pins = < > + MX8MN_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x00000156 /* A */ > + MX8MN_IOMUXC_SAI5_RXD0_GPIO3_IO21 0x00000156 /* B */ > + >; > + }; > + > + /* Override Card Detect function GPIO value (GPIO1_IO10) from SOM: */ > + pinctrl_usdhc2_gpio: usdhc2gpiogrp { > + fsl,pins = < > + MX8MN_IOMUXC_GPIO1_IO13_GPIO1_IO13 0x41 > + >; > + }; > +}; > -- > 2.39.2 >