Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3149269rwb; Thu, 29 Sep 2022 22:19:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7rVvTWhsnlYnhEBeH8HtLUBnjQAvEQMdYE+E2umHGY5KJK2EzeJz3VjcwrFO9wV+J2a3Vi X-Received: by 2002:a17:907:270b:b0:77b:17b3:f446 with SMTP id w11-20020a170907270b00b0077b17b3f446mr5148002ejk.415.1664515141782; Thu, 29 Sep 2022 22:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664515141; cv=none; d=google.com; s=arc-20160816; b=lzv/9nGAcc7t3OVAaGANweO2GqM8tcDSao6gd6NdSmAYmj3NfVJ26pXpfXG3PMWUnr snqBcw2OWUuLW2yZ/hKlpZK7b0iEK/JF8HU26GNoaLHzl8vLXrjEUvDOTqHw9t4Qd5es 5wZGNGLpjUaV6ZDKfWAI0xBzEY5qP/502D9M0sRhEogfv96UtXv70zwYdxa5dG+Kehhm pbhYVIyM8HICxZ9bg/obShW/ftaxfGe2xIzC/c7FzicRbaKxWOxy0LDTNwKU0GyOBYt0 +UwXQMuwN/AJ+2ZyZoJSn7fPut+5KYcD87wWnm+twV0N2F5IcKey9c/CpBtlmYAFPjkf s0iQ== 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=CzlWQu3A1mClcSu8Q/+U0oU9SfnYjCXu1cD9OxHY0xA=; b=bQCNrJStB7XqogJfRGikBKbsrk7DcegfrwxRc+tZYicMu+IkPQn1T8wpWjU4EcjoAM MquqcxAoaX8+U7XK6uxnGMN0jVkxMofRmxA7B/CqZRel0ezgHs7AWuEUfGAxFKmqMa/s 0Zt7AixsGQOZjofxCD4PZbS4rMvKy6e66QzjHUDl0d5E7e5dRUXNE57Cc8d80NFQabbk Thd74oHdzjcu4e8XDOozzGf6SA2hcUa/argiOKrYMg6ZkxwTh1X93WxBhD3chcXakByo 6wVIzBQi/MU4AhOjTABCDZIk8I0BDMeiZWbTZvwB0TO+my8pG1OsrDcJKEue+mMiexgN nZ+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aurel32.net header.s=202004.hall header.b=Pr99J+e7; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xj3-20020a170906db0300b0073dcb2ec4d2si1097764ejb.889.2022.09.29.22.18.36; Thu, 29 Sep 2022 22:19:01 -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=@aurel32.net header.s=202004.hall header.b=Pr99J+e7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230290AbiI3FON (ORCPT + 99 others); Fri, 30 Sep 2022 01:14:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230364AbiI3FNM (ORCPT ); Fri, 30 Sep 2022 01:13:12 -0400 Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E861664A9; Thu, 29 Sep 2022 22:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=CzlWQu3A1mClcSu8Q/+U0oU9SfnYjCXu1cD9OxHY0xA=; b=Pr99J+e7Xmh2eC7NtAyWjs9UyS V5p1C8QM9DSIzKalgw6gibz3OB97t3La6sxPtS4A6eMiJHN0gtxV2z23KWFVW2+dwUR0sqAgqCOo6 Dpu38kFowhi8NakcfbrxMcaGnKh+dbV39ZDRvzjn8N/4+KODMSQhUQfKAD6iEjzjd+EhmxRWEFoOD 2+c4eTc7AL+LniqUASXtlMSlNhUc04Uhuap3e5xUXBWZ0u2pSn9bRL85ln5KVxlXRv1R/qC70Blj/ lX8jOUvrRLOuBQ84G4adcmadHOddVUVes1ykokV5SFFrxyrY0MlDnQ8mA5NIT1F1PzjYliWQ9E/6f XQOXpZgQ==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oe8Kd-00DjeY-9F; Fri, 30 Sep 2022 07:13:03 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.96) (envelope-from ) id 1oe8Kc-001duk-2S; Fri, 30 Sep 2022 07:13:02 +0200 From: Aurelien Jarno To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support), linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC support), linux-kernel@vger.kernel.org (open list) Cc: Dongjin Kim , Aurelien Jarno Subject: [PATCH v3 04/13] arm64: dts: rockchip: Add NOR flash to ODROID-M1 Date: Fri, 30 Sep 2022 07:12:37 +0200 Message-Id: <20220930051246.391614-5-aurelien@aurel32.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220930051246.391614-1-aurelien@aurel32.net> References: <20220930051246.391614-1-aurelien@aurel32.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE 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 Enable the Rockchip Serial Flash Controller for the ODROID-M1 and add the corresponding SPI NOR flash entry. The SFC is used in dual I/O mode and not quad I/O mode, as the FSPI_D2 pin is shared with the EMMC_RSTn pin. The partitions addresses and sizes are taken from the ODROID-M1 Partition Table page on the ODROID wiki. Signed-off-by: Aurelien Jarno --- .../boot/dts/rockchip/rk3568-odroid-m1.dts | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts index 112c65af3f55..94e839c9afab 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-odroid-m1.dts @@ -351,6 +351,20 @@ rgmii_phy0: ethernet-phy@0 { }; &pinctrl { + fspi { + fspi_dual_io_pins: fspi-dual-io-pins { + rockchip,pins = + /* fspi_clk */ + <1 RK_PD0 1 &pcfg_pull_none>, + /* fspi_cs0n */ + <1 RK_PD3 1 &pcfg_pull_none>, + /* fspi_d0 */ + <1 RK_PD1 1 &pcfg_pull_none>, + /* fspi_d1 */ + <1 RK_PD2 1 &pcfg_pull_none>; + }; + }; + leds { led_power_pin: led-power-pin { rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; @@ -409,6 +423,50 @@ &sdmmc0 { status = "okay"; }; +&sfc { + /* Dual I/O mode as the D2 pin conflicts with the eMMC */ + pinctrl-0 = <&fspi_dual_io_pins>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <100000000>; + spi-rx-bus-width = <2>; + spi-tx-bus-width = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "SPL"; + reg = <0x0 0xe0000>; + }; + partition@e0000 { + label = "U-Boot Env"; + reg = <0xe0000 0x20000>; + }; + partition@100000 { + label = "U-Boot"; + reg = <0x100000 0x200000>; + }; + partition@300000 { + label = "splash"; + reg = <0x300000 0x100000>; + }; + partition@400000 { + label = "Filesystem"; + reg = <0x400000 0xc00000>; + }; + }; + }; +}; + &tsadc { rockchip,hw-tshut-mode = <1>; rockchip,hw-tshut-polarity = <0>; -- 2.35.1