From patchwork Wed Jan 25 16:10:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13115838 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 91067C27C76 for ; Wed, 25 Jan 2023 16:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=KdJfeAxkj/1FY5nxRUGruWlSCAIk6ZuKXouYGoVjqaU=; b=fMmVe6tv3cWqhi Lw2MHNJwSxtxX2XVmS1SsoFW5j4CY9Hm765/ieyt5CWnGlchkSsYTSfSHt1/7rI3GR+3M7Hw5kSMY Om2BsyHPz7Qva5JDk/FaYYI8aw2w399wE7fi1v5xErjajC1NHy2XTiH9WzxtUvC/FvVVlJDAsKc+3 6dJT77AbAt/+FIz87VadzMSuV6xe8arjirqc1roGo+PxQmi4h9+q84IMHKmhThLiZgHz4MPZRO9hU iRkdkyZ9WzeTYRS03UfMreY9iAMiJdooVX5NKDfv3ULI3XZPu6Go5R4VGIaPFQjhuHept1WWo9wkC t8NAd3PdGKB1QZ6huCLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKiM8-007usw-Ei; Wed, 25 Jan 2023 16:10:36 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKiM4-007urG-QZ for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 16:10:34 +0000 Received: by mail-pj1-x1031.google.com with SMTP id 88so7424323pjo.3 for ; Wed, 25 Jan 2023 08:10:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=stSWpw8TUYjnXGpZEjiWEmn4szU9a8OizCIboNZhV04=; b=aTkxaiAsF5fkrYH8+9HyksKu877tIYcuOSBTrL3prk1kEQ1eZZMwvqsxZYt9f72Ro2 KrTEPr7hvMXqckVEwAxAJivJOEI+63xrPx6KomJMGp3J1u5wmn51K06+TN+5ACX6eU9f jLPcpjy8PdK8FNmsfGFcUQwjmaZSF0q7n/qt8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=stSWpw8TUYjnXGpZEjiWEmn4szU9a8OizCIboNZhV04=; b=WWpNnheCy5ath9xFq/gQ53G5a/cT8I0bjkbIXULIOHsXuaXb6s88kQ7yCn4j7aruOf lngf7sIy/LG0Btc4IvBnpJ5tag+4jcZb9Jlg7xlT/6uf0+ZEzmYW5J8gXGpNVcodnQ8m lR9dvDxIYjH9hB1IQZ4MvnHwrR1VdSdzwL1BCw5T64/5yANtl4DLhWxmQp2GNew/wfD7 +1Mi1ASVadNQ0CgckPV90JHMlY+1M1030opWy9Em7tFHSCSgzo1zHtVVflIvtQe9yjwH 8trJ+f+kfutrXEBS3QV25QgQto5Onbtu1Lb2qzr9IK2hRhozc72Z34Yb2PwpTHle/lq8 b4hA== X-Gm-Message-State: AFqh2koceZCubf+m5tuf2G42VR7sJeg55i7dgpq4OIGV79gZFVskTSV2 QzjzW3hlVdl2bEs3swk2oJmWdQ== X-Google-Smtp-Source: AMrXdXvP/zwB7h3HdIwW3NhfX//yk279ulFteXpkPz7QTebWQ0/74xOm7OiR1WdhQNIuHJcuC5aXUg== X-Received: by 2002:a05:6a20:cb41:b0:b5:951b:e339 with SMTP id hd1-20020a056a20cb4100b000b5951be339mr30213436pzb.21.1674663029881; Wed, 25 Jan 2023 08:10:29 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a238:3cb1:2156:ef87:8af5]) by smtp.gmail.com with ESMTPSA id n29-20020a638f1d000000b004dadeb4decasm14929pgd.53.2023.01.25.08.10.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 08:10:29 -0800 (PST) From: Jagan Teki To: Heiko Stuebner , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Manoj Sai Subject: [PATCH 1/2] arm64: dts: rockchip: Enable Ethernet for Radxa CM3 IO Date: Wed, 25 Jan 2023 21:40:22 +0530 Message-Id: <20230125161023.12115-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_081032_891303_383298D1 X-CRM114-Status: GOOD ( 12.16 ) 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 From: Manoj Sai Add ethernet nodes for enabling gmac1 on the Radxa CM3 IO board. Signed-off-by: Manoj Sai --- .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts index 3e6578f27ec0..170af01371ff 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts @@ -21,6 +21,13 @@ chosen: chosen { stdout-path = "serial2:1500000n8"; }; + gmac1_clkin: external-gmac1-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac1_clkin"; + #clock-cells = <0>; + }; + hdmi-con { compatible = "hdmi-connector"; type = "a"; @@ -83,6 +90,29 @@ &combphy1 { status = "okay"; }; +&gmac1 { + assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; + assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>; + assigned-clock-rates = <0>, <125000000>; + clock_in_out = "input"; + phy-handle = <&rgmii_phy1>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac1m0_miim + &gmac1m0_tx_bus2 + &gmac1m0_rx_bus2 + &gmac1m0_rgmii_clk + &gmac1m0_rgmii_bus + &gmac1m0_clkinout>; + snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + /* Reset time is 20ms, 100ms for rtl8211f */ + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x46>; + rx_delay = <0x2e>; + status = "okay"; +}; + &hdmi { avdd-0v9-supply = <&vdda0v9_image>; avdd-1v8-supply = <&vcca1v8_image>; @@ -105,7 +135,70 @@ &hdmi_sound { status = "okay"; }; +&mdio1 { + rgmii_phy1: ethernet-phy@0 { + compatible="ethernet-phy-ieee802.3-c22"; + reg= <0x0>; + }; +}; + &pinctrl { + gmac1 { + gmac1m0_miim: gmac1m0-miim { + rockchip,pins = + /* gmac1_mdcm0 */ + <3 RK_PC4 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_mdiom0 */ + <3 RK_PC5 3 &pcfg_pull_none_drv_level_15>; + }; + + gmac1m0_rx_bus2: gmac1m0-rx-bus2 { + rockchip,pins = + /* gmac1_rxd0m0 */ + <3 RK_PB1 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_rxd1m0 */ + <3 RK_PB2 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_rxdvcrsm0 */ + <3 RK_PB3 3 &pcfg_pull_none_drv_level_15>; + }; + + gmac1m0_tx_bus2: gmac1m0-tx-bus2 { + rockchip,pins = + /* gmac1_txd0m0 */ + <3 RK_PB5 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_txd1m0 */ + <3 RK_PB6 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_txenm0 */ + <3 RK_PB7 3 &pcfg_pull_none_drv_level_15>; + }; + + gmac1m0_rgmii_clk: gmac1m0-rgmii-clk { + rockchip,pins = + /* gmac1_rxclkm0 */ + <3 RK_PA7 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_txclkm0 */ + <3 RK_PA6 3 &pcfg_pull_none_drv_level_15>; + }; + + gmac1m0_rgmii_bus: gmac1m0-rgmii-bus { + rockchip,pins = + /* gmac1_rxd2m0 */ + <3 RK_PA4 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_rxd3m0 */ + <3 RK_PA5 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_txd2m0 */ + <3 RK_PA2 3 &pcfg_pull_none_drv_level_15>, + /* gmac1_txd3m0 */ + <3 RK_PA3 3 &pcfg_pull_none_drv_level_15>; + }; + + gmac1m0_clkinout: gmac1m0-clkinout { + rockchip,pins = + /* gmac1_mclkinoutm0 */ + <3 RK_PC0 3 &pcfg_pull_none_drv_level_15>; + }; + }; + leds { pi_nled_activity: pi-nled-activity { rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; From patchwork Wed Jan 25 16:10:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13115839 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 33713C54EAA for ; Wed, 25 Jan 2023 16:11:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OMagLikNzhVvOw/K8xHtk9JOUL2pGSpfYkz6UlvlkOE=; b=Qti9DOfBz7cMoS P53g/HbiEduDSqg+kFgiMgZZdme4YTKO06YE6JYNoz1iu+7f94/aOvPuKWco5OGW/xBtTwleYmj6/ HoMPbJ2hVx/oF7dTNYNX3AAS9c3DRR27e4gDePYtzxBwskZcagyPNRFBGG1XBs1simkbRrO0aEyln EW0RxpvDnj9M7gdxM/W/Evzh2mEDojva1Ce/4f2CN1XJIZrciP6pTcwZPPgCVI7GAVQsxg6VmLjG/ FAl4APK8PTBFQG7Je+QijVFXhQiQW6qLHKxdrKsLiq4JSEGLxOTdd1Z2bhb4vcgGdhajWRDzT3wO5 tVgD4IbMN+RYhBQHtJyw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKiMH-007uua-Ac; Wed, 25 Jan 2023 16:10:45 +0000 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKiM8-007us0-Ly for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 16:10:38 +0000 Received: by mail-pj1-x102b.google.com with SMTP id b10so19042118pjo.1 for ; Wed, 25 Jan 2023 08:10:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZqGU3wJDMck0hXctP8UU1PV+5x18nPVs244//C4MGVw=; b=dTySioobE8TdQKBH6lc6LWHFTTNTkEXJLgy97QDnTIj5UEzY8QS/PqjYyZBYXBTByg YUuwZXmMw9SeyAPgwfJZyowKrKWH9+Srckmyhwij2CQ7SQ57F71NNxyslx2FdzScmnEc dfxA5ZWNmkmECARukK5gN1d02WquRj7a/V72c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZqGU3wJDMck0hXctP8UU1PV+5x18nPVs244//C4MGVw=; b=jmzS8//otk3nTpzzBJePXHWXPCNZcEXFld6w/EY6kjlP1JfYn8OzWEHud84FR8hh3U mS4Yjv9RNLPZgCselH+ChWpf3CI5SEh/hYg0nDe85H25E4/qVerZbQloJrE5Sa1XTzDy OIF5UBmiRJHcQI+yYu8sHvbDbqLddwvJAlscQ41Bud8OcTISKu9N6mLqw9xPzvn0xEzf 7ZyFxyUsXV9GPiexADEZQCbN6JrFgPtXejPSFtE882aqB9qgaD1th1N/jSw8KlacsZEh 97uTdQ60zpav1dM1KIOAhESFYG/0Qw58ksGVk3EZ6ylFSPhfAko+J9dUSEpK6zr4fWat F8Vw== X-Gm-Message-State: AFqh2kqEl6lTIoX6pfx8ReuBePRY8mqDjNh0Twf+aoc+UI6dxOvQWTaW jcAm5JH/Kp3AAaEZu1CgO0S4dw== X-Google-Smtp-Source: AMrXdXuD52QWY23VyKrzu75dZZ2SbzMvglaxF2fTNgQpl1FDQKTDpLl2vrR8wSMJdFuVAuwBDPbedg== X-Received: by 2002:a05:6a20:b71b:b0:b8:965a:ccb5 with SMTP id fg27-20020a056a20b71b00b000b8965accb5mr30301826pzb.24.1674663032871; Wed, 25 Jan 2023 08:10:32 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a238:3cb1:2156:ef87:8af5]) by smtp.gmail.com with ESMTPSA id n29-20020a638f1d000000b004dadeb4decasm14929pgd.53.2023.01.25.08.10.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 08:10:32 -0800 (PST) From: Jagan Teki To: Heiko Stuebner , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Jagan Teki Subject: [PATCH 2/2] arm64: dts: rockchip: rk3566: Enable WiFi, BT support for Radxa CM3 Date: Wed, 25 Jan 2023 21:40:23 +0530 Message-Id: <20230125161023.12115-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230125161023.12115-1-jagan@amarulasolutions.com> References: <20230125161023.12115-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230125_081036_738728_370FF211 X-CRM114-Status: GOOD ( 12.85 ) 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 Radxa Compute Module 3 has an onboard AW_CM256SM WiFi/BT module. Add nodes for enabling it. Signed-off-by: Jagan Teki --- .../boot/dts/rockchip/rk3566-radxa-cm3.dtsi | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi index 23a85a13311a..3de3a4f38756 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi @@ -66,6 +66,15 @@ vcca_1v8: vcca-1v8-regulator { regulator-max-microvolt = <1800000>; vin-supply = <&vcc_1v8_p>; }; + + sdio_pwrseq: pwrseq-sdio { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk817 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_reg_on_h>; + reset-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_LOW>; + }; }; &cpu0 { @@ -287,6 +296,20 @@ regulator-state-mem { }; &pinctrl { + bluetooth { + bt_host_wake_h: bt-host-wake-h { + rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_reg_on_h: bt-reg-on-h { + rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_wake_host_h: bt-wake-host-h { + rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + pmic { pmic_int_l: pmic-int-l { rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; @@ -298,6 +321,16 @@ user_led2: user-led2 { rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; }; }; + + wifi { + wifi_reg_on_h: wifi-reg-on-h { + rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + wifi_host_wake_h: wifi-host-wake-h { + rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pmu_io_domains { @@ -318,6 +351,34 @@ &saradc { status = "okay"; }; +&sdmmc1 { + #address-cells = <1>; + #size-cells = <0>; + bus-width = <4>; + disable-wp; + cap-sd-highspeed; + cap-sdio-irq; + keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_clk &sdmmc1_cmd>; + sd-uhs-sdr104; + vmmc-supply = <&vcc_3v3>; + vqmmc-supply = <&vcc_1v8>; + status = "okay"; + + wifi@1 { + compatible = "brcm,bcm43455-fmac"; + reg = <1>; + interrupt-parent = <&gpio2>; + interrupts = ; + interrupt-names = "host-wake"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_host_wake_h>; + }; +}; + &sdhci { bus-width = <8>; max-frequency = <200000000>; @@ -330,6 +391,25 @@ &sdhci { status = "okay"; }; +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1m0_ctsn &uart1m0_rtsn &uart1m0_xfer>; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&rk817 1>; + clock-names = "lpo"; + device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>; + vbat-supply = <&vcc_3v3>; + vddio-supply = <&vcc_1v8>; + }; +}; + &usb2phy0 { status = "okay"; };