From patchwork Wed Jul 12 12:42:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Nyekjaer X-Patchwork-Id: 119178 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1156448vqm; Wed, 12 Jul 2023 06:37:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlGwUv4FeyZiK0LBSjfeGqd0UDUMdrR1obIgH6IvF9Q3uZp1Kgu1EtljCwwYp8zO+96gBUr1 X-Received: by 2002:a05:6a20:4424:b0:131:dd92:4805 with SMTP id ce36-20020a056a20442400b00131dd924805mr7855386pzb.57.1689169074608; Wed, 12 Jul 2023 06:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689169074; cv=none; d=google.com; s=arc-20160816; b=OCIMU1Y0fecVpAJdmGgvBn5INcaatnphqDnLrjrjzPEvBsw6ROjD56eMLjS4e2Q2Cq 3R7/IN4dztSDjiXzqGwjeybhy/4j1nEiP80I51Dqa0TMRdpwSvwIGHSuKIVoSV4uPEoL ft6mclbrN1EiQWeVcPLpDGF4F0bVq1ks/X1tfkOEIuZua7MelyLldN13eSiapK4lDrIz eMmIKj/1ZHA7GbcmUyR6eN57AzuxejSwjDrwyViYeGQD72vCB+h6RX1UDq5FsNp5f961 75wvwuTSN9spgqnHsXmVvCNaPhd6BTbvAiYF0g5F7Cb5pZFvtcuzWy+cmvZj6cY/G/vu a3EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kNMrFGES7NPyloTYFnGi6EEQKp1AtpDzCVH9fxreOdQ=; fh=W+spKHohdfDRrUl/LXALMb+MD2cikjWt7IIjhWApp3I=; b=WApCf13BXmyp/pUR0yyB2x/FeRMwXGVghZg0hGVcrS+ilTprdDqtqgKsl0sjDxS0uc wF2S6X3MYS7OKeIMo5TRzxDILeKIq55q5uJwYBY8rlrGm/BAScAeICV9MKRmzK5dKUvn bG+qXsIV61dVownNag4VPnOuRFSj/4I0IJenTCOLJeUKTdmVT+/zVMkONz+es5UhZtMy 2FVNr46Q7A+vbS+Uk66OXodcvKCIWeNZ4GvUULB939d5JMLJz8SNzFBCW5PTfbXj5ck5 J811R0K218zfS/o9bb3IRLDhNRetHWU2PrLj4CIuC8QzcS51nR2VyqTTYiI/z4MqZRaM yl3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=zrYR3XF1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u37-20020a056a0009a500b00661cd40bd67si3380542pfg.314.2023.07.12.06.37.41; Wed, 12 Jul 2023 06:37:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=zrYR3XF1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233310AbjGLNCk (ORCPT + 99 others); Wed, 12 Jul 2023 09:02:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233404AbjGLNCd (ORCPT ); Wed, 12 Jul 2023 09:02:33 -0400 Received: from www530.your-server.de (www530.your-server.de [188.40.30.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9971F198B; Wed, 12 Jul 2023 06:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=geanix.com; s=default2211; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=kNMrFGES7NPyloTYFnGi6EEQKp1AtpDzCVH9fxreOdQ=; b=zrYR3XF1TnQnweFsLg5cGVJ0PI H6p6De9H2pCyJ1jX616+PKXugFR/u0TaHUuWzLx9WEXDWQQVRTs5629HTlFvahNLoOuLK8U79cAWZ kb0c8f7XaS4Y8XbQQwFbeWG34QCwE+OJSzt9O8HthuRjMXuEfTWLHAof6zuUyvNhKQmxJH3/S+PuK IhG6y8gkjXpNPoxNPzsm9se696XM8zdHuhEkjzV+eUViT5NxtBaAsQAk3Mdu5PoQ/LZ3OPxpQN4Jd VvWnIukW97m8tkWGlAVINqhET1oFtM10G1Sj4ghc7XaPtwjN4B+BK85aKaGgtjKsdTIxG25VztrjJ OSY7rLmA==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www530.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qJZBk-000NNx-VB; Wed, 12 Jul 2023 14:43:24 +0200 Received: from [185.17.218.86] (helo=zen..) by sslproxy05.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qJZBk-000L9W-B3; Wed, 12 Jul 2023 14:43:24 +0200 From: Sean Nyekjaer To: l.goehrs@pengutronix.de, a.fatoum@pengutronix.de, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue Cc: Sean Nyekjaer , dantuguf14105@gmail.com, Olivier Moysan , devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 9/9] ARM: dts: stm32: Add Octavo OSD32MP1-RED board Date: Wed, 12 Jul 2023 14:42:47 +0200 Message-Id: <20230712124248.2400862-9-sean@geanix.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230712124248.2400862-1-sean@geanix.com> References: <20230712124248.2400862-1-sean@geanix.com> MIME-Version: 1.0 X-Authenticated-Sender: sean@geanix.com X-Virus-Scanned: Clear (ClamAV 0.103.8/26967/Wed Jul 12 09:28:32 2023) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771222151580687617 X-GMAIL-MSGID: 1771222151580687617 Add support for the Octavo OSD32MP1-RED development board. General features: - STM32MP157C - 512MB DDR3 - CAN-FD - HDMI - USB-C OTG - UART Signed-off-by: Sean Nyekjaer Reviewed-by: Olivier Moysan --- Changes since v1: - Fixed comments from Ahmad Changes since v2: - Reordered phandles alfabetically - Added devicetree to Makefile Changes since v3: - Explained the dma disable - Removed the status ok for hdmi-transmitter arch/arm/boot/dts/st/Makefile | 3 +- .../boot/dts/st/stm32mp157c-osd32mp1-red.dts | 226 ++++++++++++++++++ 2 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/st/stm32mp157c-osd32mp1-red.dts diff --git a/arch/arm/boot/dts/st/Makefile b/arch/arm/boot/dts/st/Makefile index 44b264c399ec..94feb1f1d569 100644 --- a/arch/arm/boot/dts/st/Makefile +++ b/arch/arm/boot/dts/st/Makefile @@ -59,7 +59,8 @@ dtb-$(CONFIG_ARCH_STM32) += \ stm32mp157c-lxa-tac-gen1.dtb \ stm32mp157c-lxa-tac-gen2.dtb \ stm32mp157c-odyssey.dtb \ - stm32mp157c-phycore-stm32mp1-3.dtb + stm32mp157c-phycore-stm32mp1-3.dtb \ + stm32mp157c-osd32mp1-red.dtb dtb-$(CONFIG_ARCH_U8500) += \ ste-snowball.dtb \ ste-hrefprev60-stuib.dtb \ diff --git a/arch/arm/boot/dts/st/stm32mp157c-osd32mp1-red.dts b/arch/arm/boot/dts/st/stm32mp157c-osd32mp1-red.dts new file mode 100644 index 000000000000..2e2751a62aaf --- /dev/null +++ b/arch/arm/boot/dts/st/stm32mp157c-osd32mp1-red.dts @@ -0,0 +1,226 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) +/* + * Copyright (C) Geanix ApS 2023 - All Rights Reserved + * Author: Sean Nyekjaer + */ + +/dts-v1/; + +#include "stm32mp157.dtsi" +#include "stm32mp15xc.dtsi" +#include "stm32mp15xx-osd32.dtsi" +#include "stm32mp15xxac-pinctrl.dtsi" + +#include +#include + +/ { + model = "Octavo OSD32MP1 RED board"; + compatible = "oct,stm32mp157c-osd32-red", "oct,stm32mp15xx-osd32", "st,stm32mp157"; + + aliases { + serial0 = &uart4; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + led-controller-0 { + compatible = "gpio-leds"; + + led-0 { + label = "heartbeat"; + gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + }; +}; + +&crc1 { + status = "okay"; +}; + +&dts { + status = "okay"; +}; + +ðernet0 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <ðernet0_rgmii_pins_a>; + pinctrl-1 = <ðernet0_rgmii_sleep_pins_a>; + phy-mode = "rgmii-id"; + max-speed = <1000>; + phy-handle = <&phy0>; + st,eth-clk-sel; + status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + phy0: ethernet-phy@3 { + reg = <3>; + }; + }; +}; + +&iwdg2 { + timeout-sec = <32>; + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c1_pins_a>; + pinctrl-1 = <&i2c1_sleep_pins_a>; + status = "okay"; + i2c-scl-rising-time-ns = <100>; + i2c-scl-falling-time-ns = <7>; + /* spare dmas for other usage */ + /delete-property/dmas; + /delete-property/dma-names; + + hdmi-transmitter@39 { + compatible = "sil,sii9022"; + reg = <0x39>; + reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>; + interrupts = <1 IRQ_TYPE_EDGE_FALLING>; + interrupt-parent = <&gpiog>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <<dc_pins_e>; + pinctrl-1 = <<dc_sleep_pins_e>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + sii9022_in: endpoint { + remote-endpoint = <<dc_ep0_out>; + }; + }; + + port@1 { + reg = <1>; + sii9022_tx_endpoint: endpoint { + remote-endpoint = <&i2s2_endpoint>; + }; + }; + }; + }; +}; + +&i2s2 { + clocks = <&rcc SPI2>, <&rcc SPI2_K>, <&rcc CK_PER>, <&rcc PLL3_R>; + clock-names = "pclk", "i2sclk", "x8k", "x11k"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2s2_pins_b>; + pinctrl-1 = <&i2s2_sleep_pins_b>; + status = "okay"; + + i2s2_port: port { + i2s2_endpoint: endpoint { + remote-endpoint = <&sii9022_tx_endpoint>; + format = "i2s"; + mclk-fs = <256>; + }; + }; +}; + +<dc { + status = "okay"; + + port { + ltdc_ep0_out: endpoint@0 { + reg = <0>; + remote-endpoint = <&sii9022_in>; + }; + }; +}; + +&m_can1 { + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&m_can1_pins_d>; + pinctrl-1 = <&m_can1_sleep_pins_d>; + status = "okay"; +}; + +&pwr_regulators { + vdd-supply = <&vdd>; + vdd_3v3_usbfs-supply = <&vdd_usb>; +}; + +&rtc { + status = "okay"; +}; + +&sdmmc1 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc1_b4_pins_a>; + pinctrl-1 = <&sdmmc1_b4_od_pins_a>; + pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; + cd-gpios = <&gpioe 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; + disable-wp; + st,neg-edge; + bus-width = <4>; + vmmc-supply = <&v3v3>; + status = "okay"; +}; + +&sdmmc2 { + pinctrl-names = "default", "opendrain", "sleep"; + pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_d>; + pinctrl-1 = <&sdmmc2_b4_od_pins_a>; + pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_d>; + non-removable; + no-sd; + no-sdio; + st,neg-edge; + bus-width = <8>; + vmmc-supply = <&v3v3>; + vqmmc-supply = <&vdd>; + mmc-ddr-3_3v; + status = "okay"; +}; + +&uart4 { + pinctrl-names = "default", "sleep", "idle"; + pinctrl-0 = <&uart4_pins_a>; + pinctrl-1 = <&uart4_sleep_pins_a>; + pinctrl-2 = <&uart4_idle_pins_a>; + /* spare dmas for other usage */ + /delete-property/dmas; + /delete-property/dma-names; + status = "okay"; +}; + +&usbh_ehci { + phys = <&usbphyc_port0>; + phy-names = "usb"; + status = "okay"; +}; + +&usbh_ohci { + phys = <&usbphyc_port0>; + phy-names = "usb"; + status = "okay"; +}; + +&usbotg_hs { + vbus-supply = <&vbus_otg>; +}; + +&usbphyc { + status = "okay"; +}; + +&usbphyc_port0 { + phy-supply = <&vdd_usb>; +}; + +&usbphyc_port1 { + phy-supply = <&vdd_usb>; +};