devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v0 0/2] Add support for Firefly ROC-RK3328-PC
@ 2021-07-09  8:01 djw
  2021-07-09  8:01 ` [PATCH v0 1/2] dt-bindings: add doc " djw
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: djw @ 2021-07-09  8:01 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Wayne Chou, Levin Du, Heiko Stuebner, Chen-Yu Tsai, David Bauer,
	Jagan Teki, Johan Jonker, Liang Chen, Michael Trimarchi,
	Rob Herring, Tianling Shen, Uwe Kleine-König, devicetree,
	linux-arm-kernel, linux-kernel

From: Levin Du <djw@t-chip.com.cn>


Hi all, this is an attemp to add Firefly ROC-RK3328-PC to the mainline
kernel.

ROC-RK3328-PC is the board inside the portable Firefly Station M1
Geek PC. As a redesign after the ROC-RK3328-CC, it uses TypeC as
power input and OTG port, embedded with eMMC 5.1 storage and a
SDIO WiFi/BT chip (RTL8723DS).

Many thanks to the Linux people!


Levin Du (2):
  dt-bindings: add doc for Firefly ROC-RK3328-PC
  arm64: dts: rockchip: add support for Firefly ROC-RK3328-PC

 .../devicetree/bindings/arm/rockchip.yaml     |   5 +
 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../arm64/boot/dts/rockchip/rk3328-roc-pc.dts | 110 ++++++++++++++++++
 3 files changed, 116 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-roc-pc.dts

-- 
2.23.0.37.g745f6812895b




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v0 1/2] dt-bindings: add doc for Firefly ROC-RK3328-PC
  2021-07-09  8:01 [PATCH v0 0/2] Add support for Firefly ROC-RK3328-PC djw
@ 2021-07-09  8:01 ` djw
  2021-07-14 23:16   ` Rob Herring
  2021-07-09  8:01 ` [PATCH v0 2/2] arm64: dts: rockchip: add support " djw
  2021-07-15 22:42 ` [PATCH v0 0/2] Add " Heiko Stuebner
  2 siblings, 1 reply; 5+ messages in thread
From: djw @ 2021-07-09  8:01 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Wayne Chou, Levin Du, Heiko Stuebner, Chen-Yu Tsai, David Bauer,
	Jagan Teki, Liang Chen, Rob Herring, Tianling Shen,
	Uwe Kleine-König, devicetree, linux-arm-kernel,
	linux-kernel

From: Levin Du <djw@t-chip.com.cn>

Add devicetree binding documentation for the Firefly ROC-RK3328-PC.

Signed-off-by: Levin Du <djw@t-chip.com.cn>
---

 Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 6546b015fc62..7ef902f45b38 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -115,6 +115,11 @@ properties:
           - const: firefly,roc-rk3328-cc
           - const: rockchip,rk3328
 
+      - description: Firefly ROC-RK3328-PC
+        items:
+          - const: firefly,roc-rk3328-pc
+          - const: rockchip,rk3328
+
       - description: Firefly ROC-RK3399-PC
         items:
           - enum:
-- 
2.23.0.37.g745f6812895b




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v0 2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3328-PC
  2021-07-09  8:01 [PATCH v0 0/2] Add support for Firefly ROC-RK3328-PC djw
  2021-07-09  8:01 ` [PATCH v0 1/2] dt-bindings: add doc " djw
@ 2021-07-09  8:01 ` djw
  2021-07-15 22:42 ` [PATCH v0 0/2] Add " Heiko Stuebner
  2 siblings, 0 replies; 5+ messages in thread
From: djw @ 2021-07-09  8:01 UTC (permalink / raw)
  To: linux-rockchip
  Cc: Wayne Chou, Levin Du, Heiko Stuebner, Chen-Yu Tsai, David Bauer,
	Jagan Teki, Johan Jonker, Liang Chen, Michael Trimarchi,
	Rob Herring, Tianling Shen, Uwe Kleine-König, devicetree,
	linux-arm-kernel, linux-kernel

From: Levin Du <djw@t-chip.com.cn>

ROC-RK3328-PC is the board inside the portable Firefly Station M1
Geek PC. As a redesign after the ROC-RK3328-CC, it uses TypeC as
power input and OTG port, embedded with eMMC 5.1 storage and a
SDIO WiFi/BT chip (RTL8723DS).

- Rockchip RK3328 SoC
- 2/4GB LPDDR3 RAM
- 16/32/64/128GB eMMC 5.1
- TF card slot
- USB 3.0 Port x 1, USB 2.0 Port x 1, TypeC Port x 1 (Power/OTG)
- HDMI
- Gigabit Ethernet
- WiFi: RTL8723DS
- Audio: RK3328
- Key: Power, Reset, Recovery
- LED: POWER, USER
- IR

Signed-off-by: Levin Du <djw@t-chip.com.cn>

---

 arch/arm64/boot/dts/rockchip/Makefile         |   1 +
 .../arm64/boot/dts/rockchip/rk3328-roc-pc.dts | 110 ++++++++++++++++++
 2 files changed, 111 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-roc-pc.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 7fdb41de01ec..46652b6d7c4d 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -13,6 +13,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-lion-haikou.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-roc-pc.dts b/arch/arm64/boot/dts/rockchip/rk3328-roc-pc.dts
new file mode 100644
index 000000000000..0e3d04bba75b
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-pc.dts
@@ -0,0 +1,110 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2021 T-Chip Intelligent Technology Co., Ltd
+
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+
+#include "rk3328-roc-cc.dts"
+
+/ {
+	model = "Firefly ROC-RK3328-PC";
+	compatible = "firefly,roc-rk3328-pc", "rockchip,rk3328";
+
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1750000>;
+
+		/* This button is unpopulated out of the factory. */
+		button-recovery {
+			label = "Recovery";
+			linux,code = <KEY_VENDOR>;
+			press-threshold-microvolt = <10000>;
+		};
+	};
+
+	ir-receiver {
+		compatible = "gpio-ir-receiver";
+		gpios = <&gpio2 RK_PA2 GPIO_ACTIVE_LOW>;
+		linux,rc-map-name = "rc-khadas";
+		pinctrl-names = "default";
+		pinctrl-0 = <&ir_int>;
+	};
+
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		pinctrl-0 = <&wifi_en>, <&wifi_host_wake>;
+		reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&codec {
+	mute-gpios = <&grf_gpio 0 GPIO_ACTIVE_LOW>;
+};
+
+&gpu {
+	mali-supply = <&vdd_logic>;
+};
+
+&pinctrl {
+	ir {
+		ir_int: ir-int {
+			rockchip,pins = <2 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	wifi {
+		wifi_en: wifi-en {
+			rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		wifi_host_wake: wifi-host-wake {
+			rockchip,pins = <3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none_4ma>;
+		};
+
+		bt_rst: bt-rst {
+			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+
+		bt_en: bt-en {
+			rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
+	sdmmcio {
+		sdio_per_pin: sdio-per-pin {
+			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_down>;
+		};
+	};
+};
+
+&pmic_int_l {
+	rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
+};
+
+&rk805 {
+	interrupt-parent = <&gpio0>;
+	interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
+};
+
+&saradc {
+	vref-supply = <&vcc_18>;
+	status = "okay";
+};
+
+&usb20_host_drv {
+	rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
+};
+
+&vcc_host1_5v {
+	gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
+};
+
+&vcc_sdio {
+	gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio_per_pin>;
+};
-- 
2.23.0.37.g745f6812895b




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v0 1/2] dt-bindings: add doc for Firefly ROC-RK3328-PC
  2021-07-09  8:01 ` [PATCH v0 1/2] dt-bindings: add doc " djw
@ 2021-07-14 23:16   ` Rob Herring
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2021-07-14 23:16 UTC (permalink / raw)
  To: djw
  Cc: linux-arm-kernel, Heiko Stuebner, David Bauer, Tianling Shen,
	Chen-Yu Tsai, Jagan Teki, Liang Chen, linux-rockchip,
	Uwe Kleine-König, devicetree, Wayne Chou, linux-kernel,
	Rob Herring

On Fri, 09 Jul 2021 16:01:25 +0800, djw@t-chip.com.cn wrote:
> From: Levin Du <djw@t-chip.com.cn>
> 
> Add devicetree binding documentation for the Firefly ROC-RK3328-PC.
> 
> Signed-off-by: Levin Du <djw@t-chip.com.cn>
> ---
> 
>  Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
>  1 file changed, 5 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v0 0/2] Add support for Firefly ROC-RK3328-PC
  2021-07-09  8:01 [PATCH v0 0/2] Add support for Firefly ROC-RK3328-PC djw
  2021-07-09  8:01 ` [PATCH v0 1/2] dt-bindings: add doc " djw
  2021-07-09  8:01 ` [PATCH v0 2/2] arm64: dts: rockchip: add support " djw
@ 2021-07-15 22:42 ` Heiko Stuebner
  2 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2021-07-15 22:42 UTC (permalink / raw)
  To: linux-rockchip, djw
  Cc: Heiko Stuebner, Rob Herring, linux-arm-kernel, Liang Chen,
	Jagan Teki, devicetree, Michael Trimarchi, Wayne Chou,
	David Bauer, linux-kernel, Chen-Yu Tsai, Johan Jonker,
	Uwe Kleine-König, Tianling Shen

On Fri, 9 Jul 2021 16:01:24 +0800, djw@t-chip.com.cn wrote:
> 
> Hi all, this is an attemp to add Firefly ROC-RK3328-PC to the mainline
> kernel.
> 
> ROC-RK3328-PC is the board inside the portable Firefly Station M1
> Geek PC. As a redesign after the ROC-RK3328-CC, it uses TypeC as
> power input and OTG port, embedded with eMMC 5.1 storage and a
> SDIO WiFi/BT chip (RTL8723DS).
> 
> [...]

Applied, thanks!

[1/2] dt-bindings: add doc for Firefly ROC-RK3328-PC
      commit: 773b358cb274a6cededc1f597ba70e75c0676752
[2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3328-PC
      commit: ffe7ee186baafe3855d117a5d6e7183e8e77795d

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-15 22:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09  8:01 [PATCH v0 0/2] Add support for Firefly ROC-RK3328-PC djw
2021-07-09  8:01 ` [PATCH v0 1/2] dt-bindings: add doc " djw
2021-07-14 23:16   ` Rob Herring
2021-07-09  8:01 ` [PATCH v0 2/2] arm64: dts: rockchip: add support " djw
2021-07-15 22:42 ` [PATCH v0 0/2] Add " Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).