From patchwork Mon Jul 20 11:02:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1513 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E41AF3F080 for ; Mon, 20 Jul 2020 13:02:55 +0200 (CEST) Received: by mail-pj1-f69.google.com with SMTP id lk11sf7730740pjb.0 for ; Mon, 20 Jul 2020 04:02:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595242974; cv=pass; d=google.com; s=arc-20160816; b=W5Z0vw4pO44r/s35lpL82Ya8fuS9fx55kww740J6/bpbY0zcH1jnGQajqUrtV4uzYk Inl7IvLvGwcIUT9DQ3g8ArHq7lCaa5YqlGWkYePPajyRu9dnzFA8cu/CkUctexwfqBo5 wsy8Nsn75zKpW9T+vw8hwMSeF7PCNukrO0dw9r1rGEo8KuflNhJjIxJojO3uuSrX4ZwI Jf32rLjnbt2kUOXGMF33ch8DAfl0n1q8GJI/TI/7iv/QSEE48FcVvn7RVkyPYoQwuphW Spu75A24bzCcj1ycw5Z6zHrdrjJluMLOQd0PIweAtrWgkLwwnbzVstDFt886ad0OKtFX wBdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=2hHzQ3TiRlTCqauxw1joK4gbQWBddIDSCyC3bgNNCGw=; b=KZ6iHp+PkH+Pz1wtB9qeCvnwvDSea2lGFhBO9K8aTpAvnhEEC6Fox4FirZT7tqHz58 lsZRDgVhKBnFbCId8vKPX1FGWww23rrWjcZ5NXe18Lw+c/C2GHRqnDoIEpWtTGu4XWIu BLZmAE3/YIz1y2RZCU5Sz9DB+4MNSQY5GfwuvcRg1gPh/HAufssdAUj9CbzU34/ThRjB a4r1/tSPLrPHcPHweVAzIMFuwFdLbbJFXmqw8+jxEQ3D50cPknVcZaathzJPGmtsbYL9 VSjLAdI/qhg12kmqHAPQETjbptbpDbzAwbaI7Uu1WVOfz4+GAbqmJxHSH2pJR/VFA6rl zW4w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OrN32bn1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=2hHzQ3TiRlTCqauxw1joK4gbQWBddIDSCyC3bgNNCGw=; b=oVG9+VK6A/qcqmj1qhgsf8lbfL1Bf8/0puefOJ6a5kbvTchY8cE4OaWxtpqiGwXWDt b81VAStDgfaTr3qrr59Li4ayyvWsUtRSSTIUe+2rWTEH641OC3shil7B0bu3vT4z8HTZ qM6rAy35W1JCu85YnKWx0XzISp0aqBRzxvWu8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=2hHzQ3TiRlTCqauxw1joK4gbQWBddIDSCyC3bgNNCGw=; b=R+MIOq9JsEjkykhDOJeaOBjX9rSXiff2Oq2TtApa9f1aIIcTOgl3dQallPoHPvLHrJ J/4Y/vYsw4zBOq/g7iceFBU7bmSEzDPx+RPSDedrbiVF796HC4hixh7L1Hhi7yMCXENG VKctVdVNAzxyqXJV4xfnv2WFOGSWnFPk8AP8S6UjCDlzUKbv53XQChlAnaiK5ES34qT9 rPd+hbb58z2FlMu2nxGMYoo3csMAsMxEeo8btWGdRUCL6jCEtAaubh2CQB4ZmpuvXG5o vpe6IJ1yAk/7spE7YvQJOys+AOCNMnBoA3fXR4nJvhY8Uff/H//A8bjTuwMKjHerted0 mWGQ== X-Gm-Message-State: AOAM530s0uzDwY+yJ/9WSo7fWWecEgplo1QJG/jJAK408M5wEbIxiGBV z9N0IuDm1atJ40Ic+/QubpVu+Tza X-Google-Smtp-Source: ABdhPJyVkdcY93fXqM0GWMgrToIgLv0yYYOkJFa62k8n1xFAQISnufS7u4BU2DADwY1faILlT8vIbg== X-Received: by 2002:aa7:84ce:: with SMTP id x14mr20231681pfn.220.1595242974386; Mon, 20 Jul 2020 04:02:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:8a16:: with SMTP id w22ls8082381pjn.1.canary-gmail; Mon, 20 Jul 2020 04:02:54 -0700 (PDT) X-Received: by 2002:a17:90a:65c7:: with SMTP id i7mr22984735pjs.103.1595242973829; Mon, 20 Jul 2020 04:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595242973; cv=none; d=google.com; s=arc-20160816; b=OlaP7JBwJQgddOC3R5dqSXky9RIiq2EWTWi15a88pAiuFa/VVciE/WbJW0nX1tti4W uI0oAohcyqFrSzoe+AwXZMSF/mbcc3O/Xlg9tRZnb+3Iu9ZnBs0lCPeNCWhfr2jv/H2N DsYkTGTCSyMNt4Ua+nhoA/9VBq2M/LAUy/tk/lATq+eq9AXXTfePDSozrfiC86wrAkay 6lxMAFGLu2JjIri522Y4oWGlS+yZvVElC/LvU8QI+UWf5OFN9nGiIDarJ7UM5RE7zAeV xzRQ4mUuuVBWmKVxzR97DXM3wPdicWkVqmY4Aiw2WpSbKJ5siLULdcgtxqNSrpUUHgNb CBlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=nE2C5G9azmjt7+W5WypzQU7MH/oEmdhAcqvQRmdBylE=; b=qGqMKCQXQ3djgmEqJ5jHE93cfeJsV6pEXhqUwnT3nAdLdfMTn/O7YF7ocBj7UtBXn0 kArpK2tt+5hreLvY16czTVeoKSeegxW5eph+DWVduoN2uqAJ0OzBuRqR5OAHQZFg7U+3 /eOV7sImSRFSgx/x4xeVNROGvnbSJGfHAanmivuL5R6zfhL0ZguhROAxkl/CYK36TFUs HRM+EVNJS7+uaUjymHw/YLqKoUPZgUHQfH+H7pM8fFe1yH+6J7Cnty2ockVXj5VIQlgS riV80E0DWTEoOF1YoAF1l2aKvHP+iKFfFMJmwgHvolxpXnAsgCGspF/4DFZ+JkDOmjR2 /uOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OrN32bn1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id p8sor19730965pgi.40.2020.07.20.04.02.53 for (Google Transport Security); Mon, 20 Jul 2020 04:02:53 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:757:: with SMTP id 84mr18562219pgh.275.1595242973437; Mon, 20 Jul 2020 04:02:53 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:8c21:db7b:4558:fba3]) by smtp.gmail.com with ESMTPSA id o10sm11445876pjs.27.2020.07.20.04.02.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 04:02:52 -0700 (PDT) From: Jagan Teki To: Heiko Stuebner , Rob Herring Cc: Suniel Mahesh , Michael Trimarchi , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amarula , Jagan Teki Subject: [PATCH 1/3] ARM: dts: rockchip: Add USB for RockPI N8/N10 Date: Mon, 20 Jul 2020 16:32:28 +0530 Message-Id: <20200720110230.367985-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=OrN32bn1; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Radxa dalang carrier board has 2x USB 2.0 and 1x USB 3.0 ports. This patch adds support to enable all these USB ports for N10 and N8 combinations SBCs. Note that the USB 3.0 port on RockPI N8 combination works as USB 2.0 OTG since it is driven from RK3288. Signed-off-by: Jagan Teki Reported-by: kernel test robot --- Note: - depends on https://lkml.org/lkml/2020/7/20/446 arch/arm/boot/dts/rk3288-vmarc-som.dtsi | 42 ++++++++++ .../dts/rockchip-radxa-dalang-carrier.dtsi | 18 +++++ .../dts/rockchip/rk3399pro-vmarc-som.dtsi | 78 +++++++++++++++++++ 3 files changed, 138 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-vmarc-som.dtsi b/arch/arm/boot/dts/rk3288-vmarc-som.dtsi index 0bcb9f067d66..abe3c01d13aa 100644 --- a/arch/arm/boot/dts/rk3288-vmarc-som.dtsi +++ b/arch/arm/boot/dts/rk3288-vmarc-som.dtsi @@ -267,4 +267,46 @@ sdmmc_cmd: sdmmc-cmd { rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>; }; }; + + vbus_host { + usb1_en_oc: usb1-en-oc { + rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + vbus_typec { + usb0_en_oc: usb0-en-oc { + rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; +}; + +&usbphy { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1 { + status = "okay"; +}; + +&usb_otg { + status = "okay"; +}; + +&vbus_host { + enable-active-high; + gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */ +}; + +&vbus_typec { + enable-active-high; + gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */ }; diff --git a/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi b/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi index 450e5bb5af0b..d2b6ead148a2 100644 --- a/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi +++ b/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi @@ -33,6 +33,24 @@ vcc5v0_sys: vcc5v0-sys-regulator { regulator-max-microvolt = <5000000>; vin-supply = <&vcc12v_dcin>; }; + + vbus_host: vbus-host { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&usb1_en_oc>; + regulator-name = "vbus_host"; /* HOST-5V */ + regulator-always-on; + vin-supply = <&vcc5v0_sys>; + }; + + vbus_typec: vbus-typec { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&usb0_en_oc>; + regulator-name = "vbus_typec"; + regulator-always-on; + vin-supply = <&vcc5v0_sys>; + }; }; &gmac { diff --git a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi index 37ed95d5f7e9..111d6cf9a4e6 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi @@ -304,6 +304,18 @@ pmic_int_l: pmic-int-l { rockchip,pins = <1 RK_PC2 0 &pcfg_pull_up>; }; }; + + vbus_host { + usb1_en_oc: usb1-en-oc { + rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + + vbus_typec { + usb0_en_oc: usb0-en-oc { + rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; }; &pmu_io_domains { @@ -324,8 +336,74 @@ &sdmmc { max-frequency = <150000000>; }; +&tcphy0 { + status = "okay"; +}; + &tsadc { rockchip,hw-tshut-mode = <1>; rockchip,hw-tshut-polarity = <1>; status = "okay"; }; + +&u2phy0 { + status = "okay"; + + u2phy0_otg: otg-port { + phy-supply = <&vbus_typec>; + status = "okay"; + }; + + u2phy0_host: host-port { + phy-supply = <&vbus_host>; + status = "okay"; + }; +}; + + +&u2phy1 { + status = "okay"; + + u2phy1_host: host-port { + phy-supply = <&vbus_host>; + status = "okay"; + }; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; + +&usbdrd3_0 { + status = "okay"; +}; + +&usbdrd_dwc3_0 { + status = "okay"; +}; + +&vbus_host { + enable-active-high; + gpio = <&gpio4 RK_PD1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */ + pinctrl-names = "default"; + pinctrl-0 = <&usb1_en_oc>; +}; + +&vbus_typec { + enable-active-high; + gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */ + pinctrl-names = "default"; + pinctrl-0 = <&usb0_en_oc>; +}; From patchwork Mon Jul 20 11:02:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1514 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AEF8A3F080 for ; Mon, 20 Jul 2020 13:03:12 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id y9sf10202439plr.9 for ; Mon, 20 Jul 2020 04:03:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595242991; cv=pass; d=google.com; s=arc-20160816; b=Jyxrwu7+gva3z1vXfVboJQqhWRsuxngD0wZ60EBM7wVlwkAPU9fB2wyjjO8FYp3a/D AS3rbfiqxL1RhZj7vcHuKPxIzjNREWKX5+T/Ghgw11OaJsag8IaIJp1gr7zRLYuFb4hA 32c8e4R5loTaT8rVI6L1bdffCh0i37mgzlAFGY7EFzoZQ9Uz8Hsp+85eJStSA5pHssLS JWgTS1eVDPTI4Xzp5TFSwTVWxHuIpmTL0e5AdJ4buOHNvPE0pxjUEJyiBc/wI4G0wsiC mAj/2qQ1XJvhpIz508+0PGW+Zhlatw0fRVBYRG8vur4LBbvcRYr/x3vcLrwUrakWO6Mk eADA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hAl23/Oj92FGKtc90Dd0U0grUsKkdvkFuwAklrfb70Y=; b=qqJJ/JgYnOw1X+QkpR+Zw9rKDzn4XvJAmb4X7k3EoAtmqvCDLblPhq2Te+IiOcBh1+ TMHjEIHEFax0pR7o9qAYgDgTIJtLCdeURbs2ZS8LnSnLqJFZsONAPb1Vp4EvbhUFerev 95LEIaw123cEAtJtlKBk8fGumP8pcfmFhKcJnwLCGddRB0Hj9sl+bMz79v9l8TVDd2BY LmVK+gm/CCNpWNkfWiliwTlAukdQFXq9nbgtdcRAxVQ0Z9KLVLDAYCPVrDijLInVqgl7 e1NhP3VF/Vn07H5Tsb5PGsFVubOPsryaSb4WVUY6NJcv6nqnoSbrtAovaxz0VhIkqlmE cKuQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RUqeyyph; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=hAl23/Oj92FGKtc90Dd0U0grUsKkdvkFuwAklrfb70Y=; b=g4mbk0+e+9eFgt8Ttem8JvYS3Dfgr7S7qxtuFjcgLAlAPCu41B49VVHpAid/Mz5emk RdzJDoI1qSo6c7WfbbEtqG3H1efwxdeYL9h/uU5+fPWjSEykeBOQ5zHLabh6gphCO/tj 1OjWgH/gqAaFezkL/8jL1tQvMA0DxC8gDvLUU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=hAl23/Oj92FGKtc90Dd0U0grUsKkdvkFuwAklrfb70Y=; b=pkot92sLfxqSAdo/nQW0+TZZUca4Z3FaO51FBHiJVYq0a+8iq/U89NlFv7RpTIrvqt anO4Uns5W+bhvv6IUyJPiJc2Sp4CO83ajX2s1/5yiyiiEgvXhiI+4/0W2XwPZf8Zupi2 adGgCo/BeUE0Q4qg3FotNKbAbeZKHRIoLTAMi1Y+gh8hpHHfOawEl3RGJ+rY3hOs1ZOO iuTLcP3qA/Gz1qWlCzTpSTKjRkqzNGi9PpMDpCkFwznO9EVsYgiBsEmesfFVBJBOKaWj Za/3U+CWgOn13RDnzlaf9evrIGyAGp4KqyUSUtfzboQgTZzcxg81hpL9nB5FrkQ+Ti64 weOg== X-Gm-Message-State: AOAM530xJCTZV2UiLL4Za2G1dWKlvCy8aRcPOJaCFeZIO75D2NtW7PR0 wtAhzDCpZgGCYJDWNmqo6iAI8a+/ X-Google-Smtp-Source: ABdhPJwy4XXtc4WMQeI+gc4ULg6eoiyiEuwHXx3pAxRN7NvBgwUfMRkzeGfQhZUbeQcvhMhIUt6D5Q== X-Received: by 2002:a17:90b:1b06:: with SMTP id nu6mr22844453pjb.106.1595242990972; Mon, 20 Jul 2020 04:03:10 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:263:: with SMTP id 90ls2627522plc.9.gmail; Mon, 20 Jul 2020 04:03:10 -0700 (PDT) X-Received: by 2002:a17:90b:1b06:: with SMTP id nu6mr22844407pjb.106.1595242990449; Mon, 20 Jul 2020 04:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595242990; cv=none; d=google.com; s=arc-20160816; b=oSMho90Us+AWnZSLqNBYWkTbrkuEDlFSfVUCIH8dW28QQZJfwp+vhYdb59BFVJgXLN b1wUmOXH+jfCi3hXjSFW5FyXfQ0O4J6sALY3mkHqAdDG9pZhKqcJI5VXmtulMZ2uTdnE jZ1GxCM+1nrjmYouLOmGiHqwGH+v45lmg1YvjPaDHpquDVrCnoUbKKbb2OYLCU4u/Ui/ +b59rPhmQnazE5K///RduxOJObrnhANhMEP4uMOlKs4LA3Q3aMh7WiF433N/v5a0BP1j JVrBd3RPN75Lp7gLiKt3HkjVIHirXiaMr2JR7lUTcWfGVkVzlF6QF+percxFPgprMQB2 T4Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ag4rQp+sFMdKPCQUR+pc46MOuVsvRvVxw/7NKoWEvi4=; b=O0Vy84WuICiBCPgMGJcCTVQS9du7zHh8YYKyT2Q3HJQPfAU5AGmYyt0WPjtVusQ8+f hVoJ/nArASWa1udMRsy4oQWIIBj+ne+oPTFGPCZmmuNJQO43tLSCdLSDE7c6BEe9pPqR yB3OQcEzNMe3ReasZuFpjhfS64oBvi5jCTBqfZQ9vZzN61wGxKsyMyvdcnn1yVgPlzyJ qOaBBvBfFunvZWiNWniP3kQ0gGwsyYgt9kK/x1R++RzQk7tarJZ67nA+++tSNLn0AqHK 5KHpspsoqrpw3ou4km8btvH4WXlXs1a96+fl7cgBPoDbFEln5JDw0LGIPArCfDUJp76k eOjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RUqeyyph; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w15sor21075527plk.43.2020.07.20.04.03.10 for (Google Transport Security); Mon, 20 Jul 2020 04:03:10 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:aa84:: with SMTP id d4mr17371571plr.208.1595242990019; Mon, 20 Jul 2020 04:03:10 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:8c21:db7b:4558:fba3]) by smtp.gmail.com with ESMTPSA id o10sm11445876pjs.27.2020.07.20.04.02.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 04:03:09 -0700 (PDT) From: Jagan Teki To: Heiko Stuebner , Rob Herring Cc: Suniel Mahesh , Michael Trimarchi , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amarula , Jagan Teki Subject: [PATCH 2/3] ARM: dts: rockchip: Add HDMI out for RockPI N8/N10 Date: Mon, 20 Jul 2020 16:32:29 +0530 Message-Id: <20200720110230.367985-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200720110230.367985-1-jagan@amarulasolutions.com> References: <20200720110230.367985-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RUqeyyph; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds support to enable HDMI out for N10 and N8 combinations SBCs. Signed-off-by: Jagan Teki Signed-off-by: Suniel Mahesh --- arch/arm/boot/dts/rk3288-vmarc-som.dtsi | 10 ++++++++++ .../dts/rockchip-radxa-dalang-carrier.dtsi | 20 +++++++++++++++++++ .../dts/rockchip/rk3399pro-vmarc-som.dtsi | 12 +++++++++++ 3 files changed, 42 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-vmarc-som.dtsi b/arch/arm/boot/dts/rk3288-vmarc-som.dtsi index abe3c01d13aa..ba2732ec72da 100644 --- a/arch/arm/boot/dts/rk3288-vmarc-som.dtsi +++ b/arch/arm/boot/dts/rk3288-vmarc-som.dtsi @@ -38,6 +38,12 @@ &gmac { snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; }; +&hdmi { + ddc-i2c-bus = <&i2c5>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_cec_c0>; +}; + &i2c0 { clock-frequency = <400000>; status = "okay"; @@ -225,6 +231,10 @@ regulator-state-mem { }; }; +&i2c5 { + status = "okay"; +}; + &io_domains { bb-supply = <&vcc_io>; flash0-supply = <&vccio_flash>; diff --git a/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi b/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi index d2b6ead148a2..26b53eac4706 100644 --- a/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi +++ b/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi @@ -66,6 +66,10 @@ &gmac { status = "okay"; }; +&hdmi { + status = "okay"; +}; + &pwm0 { status = "okay"; }; @@ -94,3 +98,19 @@ &uart0 { &uart2 { status = "okay"; }; + +&vopb { + status = "okay"; +}; + +&vopb_mmu { + status = "okay"; +}; + +&vopl { + status = "okay"; +}; + +&vopl_mmu { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi index 111d6cf9a4e6..ebccc4a153a2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi @@ -39,6 +39,12 @@ &gmac { snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; }; +&hdmi { + ddc-i2c-bus = <&i2c3>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_cec>; +}; + &i2c0 { clock-frequency = <400000>; i2c-scl-falling-time-ns = <30>; @@ -285,6 +291,12 @@ hym8563: hym8563@51 { }; }; +&i2c3 { + i2c-scl-rising-time-ns = <450>; + i2c-scl-falling-time-ns = <15>; + status = "okay"; +}; + &io_domains { status = "okay"; bt656-supply = <&vcca_1v8>; From patchwork Mon Jul 20 11:02:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1515 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 327E63F080 for ; Mon, 20 Jul 2020 13:03:27 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id z16sf13495885pgh.21 for ; Mon, 20 Jul 2020 04:03:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1595243005; cv=pass; d=google.com; s=arc-20160816; b=WGPniy1BcxkCZ8fQ8kYWcU7ZjrofjMjCDpiubK65287N49JCbtJqH+GRJhVnyWy719 Tk9igzjkYYKekq3HObDko5G62+3hHPBGiFnNHawkeHs2IavWbs4OWZ8FvVvhhwYCg7dJ SHO9/KDKBN9gF88/S8yt2vsl8HZruByp/GN0X2aqPQvnaXIsafgM9QHrk0Q5N1NG/3x1 wOmvvDDb0AOWJpELJLk0SL125t9bWTbznQkjl5QG7d6nbzPLZ872p0wA1pr858UHCKB7 dm0dfj6erN/JsTrFpE0biGcd0F0ni6Sny1wIFKOasFQhXbF2TZMxt+ArXiUNl0m50LY8 x46w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=OTgAGeqWaPLNEPqfotyYBmOPF19xMfYZ4SzruxboSws=; b=rQE2FZLcT7aSfsDhVvTph2FE/WO2RAcmT7+qYm8KH7Kpe/sglGoX5blSRYcmMO1PS6 dWFeTHFDhu3d3VYuAA9RDDGEAk5FRU5pBtVIU0aPb3BvUFeKKUUKVs+iXBu2OtbaCBWP c0OkgNdMS9BHmBWm+ubPhiZ5isSWKkE8XHug4PZtgsdN5VMvQ8ksxDoMJjIrto5mfJAa avjFAcay9ecABZVGDNCG8yUPxvhLA4g4N2EPy2zs4PUw2E6oqM4vFcPU5iHzWBFISj7o rrgPDsoAXU41bEjXYksVwRSJg5xVtWQxUuN4q7ML0rksBDlymfgynZMRnpr+Zb0shn6y 3+ng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fcs+8Vbu; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=OTgAGeqWaPLNEPqfotyYBmOPF19xMfYZ4SzruxboSws=; b=nYtcmCn3nFYYav/nVcnDqJ9e83WBsPmWCUfmhZ/2lk3d0OMt5BXvzeHjpIjRq5T5rE PUEAAmWzmFUJOtGjNobWzFOAHzsU8mLrAjjxZVYSeJLlh0Fw2jDUgVuKi8FvEP7YvxvW lMPKanslO17qtYuhpxnMtL82YOQBWDGgTo+y8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=OTgAGeqWaPLNEPqfotyYBmOPF19xMfYZ4SzruxboSws=; b=KIgHAUt0r/BCChh8DNf9cP09uRYcTGrgk/DBAmXcf0qTJafBXiztwv+hg3vHlUDFBw VMx1kqJtIaZOS6AVuowhSpXPaAkdxmh3G85AAA8ZHMUF6ql5gZKvCmo2H8jVceb3cVee ky0H9UNUDJN/zwyo+wS2DyqbGNd1qSWyqi1bFdfMcILe4Ta6qAeNEqCZXL6M4huWDDjd b8wsJGA64TPzMaALgUxuRKlD9yPHUzsJ8dLtHAJAlkl87CthltBngEqDfkjAWSy5n1fX E+F+Ca8KVl+9Fn5sHzTxYyo42XJ3L7h3YOaCBr6RGchukovcql1QxtvDnWmuI/tm1z/l 4bPQ== X-Gm-Message-State: AOAM531Ewzk0En8guksq5O1L7dLQL8lc9IXCDvqGlVvHpf+dArqKnDlc aoO/yopi0uGnOVWo96DXQNlpNfwB X-Google-Smtp-Source: ABdhPJxmX+FCZZnIXTVP4lzaTOzq6Pxtocw6TXF2vFRil0TstOp9zanQLr1lELqDbObt61xRn1R/Fw== X-Received: by 2002:aa7:8d02:: with SMTP id j2mr19456362pfe.90.1595243005709; Mon, 20 Jul 2020 04:03:25 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:864e:: with SMTP id a14ls4553491pfo.7.gmail; Mon, 20 Jul 2020 04:03:25 -0700 (PDT) X-Received: by 2002:a63:b546:: with SMTP id u6mr17594791pgo.381.1595243005187; Mon, 20 Jul 2020 04:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595243005; cv=none; d=google.com; s=arc-20160816; b=RPXQ7RJZA8lnyRglukbHRRkjCOHpJ4nhkSj4E0rJ9alw2fw4MWFO114s/2Zvu9W3ln QMaA8evS7zl+2Ze6bzTnzYFwTvDPcDOccSonGTSUFxVM7B6sfCI3tVWegW+1j4G6yKZR gtIWSeFc8IPUPlqdLpI3mCDbMro40VVRJIMKgiV71xBTR4BYrY7BZPk0l0vD4Lp7Zvrl V7fRxLL9fiVmKcmw0wA3gUCt7/7XEUZ2FH+R+FASA2e5pH4C16ygvgV+kBJcirpw9ZPi EampKh9BiUWGGxVmT6+KNplnFwyKGNM25GPn016OYCxW+v5gXmF4goh/cX7G+W6F8NJ7 1k4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=TZpfzFnX8WqDOlpA9HEWnI2tpqRJdN7b0nMifIKxRt8=; b=C3OY9lVDuz1sx9YkWgcuJmqWZJj2JrzxS4M9EjWZoRF/nhWnuGBkU87bOaviE5FQjs eMG7gPttfUmWHjZHJvLjXiWqfd+0SmH/5EcJUBYNjI37RBGgAMQQNl12sjM3RfSziSvr PTsU9CWIw50SoEziHLdx/r7axYp0SmeiYvloceQKeKgC4BohPoaIOnHXU85oUqFzIZjf jeX0TNUiAjoAykSp363FB7whFADCv83XKTqUToT53H5IDio2lZRqcskiqq4rJCMsTgWN WxWJSu7dnsSCmT53VhMrg3ZRu2ACyxgXy7ehAYgOe01iErvf6opRVZm4L2GIuMRIj+Gy xs/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fcs+8Vbu; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w22sor20859953plq.48.2020.07.20.04.03.25 for (Google Transport Security); Mon, 20 Jul 2020 04:03:25 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:902:a708:: with SMTP id w8mr18141835plq.128.1595243004882; Mon, 20 Jul 2020 04:03:24 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:8c21:db7b:4558:fba3]) by smtp.gmail.com with ESMTPSA id o10sm11445876pjs.27.2020.07.20.04.03.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 04:03:23 -0700 (PDT) From: Jagan Teki To: Heiko Stuebner , Rob Herring Cc: Suniel Mahesh , Michael Trimarchi , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amarula , Jagan Teki Subject: [PATCH 3/3] arm64: dts: rockchip: Add PCIe for RockPI N10 Date: Mon, 20 Jul 2020 16:32:30 +0530 Message-Id: <20200720110230.367985-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200720110230.367985-1-jagan@amarulasolutions.com> References: <20200720110230.367985-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fcs+8Vbu; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds support to enable PCIe for RockPI N10. Signed-off-by: Jagan Teki --- .../dts/rockchip/rk3399pro-vmarc-som.dtsi | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi index ebccc4a153a2..b415b8a16c78 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi @@ -11,6 +11,19 @@ / { compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro"; + + + vcc3v3_pcie: vcc-pcie-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&pcie_pwr>; + regulator-name = "vcc3v3_pcie"; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc5v0_sys>; + }; }; &cpu_l0 { @@ -142,7 +155,8 @@ vcca_0v9: LDO_REG1 { regulator-min-microvolt = <900000>; regulator-max-microvolt = <900000>; regulator-state-mem { - regulator-off-in-suspend; + regulator-on-in-suspend; + regulator-suspend-microvolt = <900000>; }; }; @@ -177,7 +191,8 @@ vcca_1v8: LDO_REG4 { regulator-min-microvolt = <1850000>; regulator-max-microvolt = <1850000>; regulator-state-mem { - regulator-off-in-suspend; + regulator-on-in-suspend; + regulator-suspend-microvolt = <1850000>; }; }; @@ -304,6 +319,22 @@ &io_domains { sdmmc-supply = <&vccio_sd>; }; +&pcie_phy { + status = "okay"; +}; + +&pcie0 { + ep-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>; + max-link-speed = <2>; + num-lanes = <4>; + pinctrl-0 = <&pcie_clkreqnb_cpm>; + pinctrl-names = "default"; + vpcie0v9-supply = <&vcca_0v9>; /* VCC_0V9_S0 */ + vpcie1v8-supply = <&vcca_1v8>; /* VCC_1V8_S0 */ + vpcie3v3-supply = <&vcc3v3_pcie>; + status = "okay"; +}; + &pinctrl { hym8563 { hym8563_int: hym8563-int { @@ -311,6 +342,12 @@ hym8563_int: hym8563-int { }; }; + pcie { + pcie_pwr: pcie-pwr { + rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + pmic { pmic_int_l: pmic-int-l { rockchip,pins = <1 RK_PC2 0 &pcfg_pull_up>;