Skip to contentSkip to conversation

add support for Firefly-RK3288 and Rayeager PX2 boards

PATCH Superseded FUKAUMI Naoki 2 participants 6 messages Jan 17, 2015 – Jan 19, 2015

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover add support for Firefly-RK3288 and Rayeager PX2 boards

This series adds support for following Rockchip SoC based boards.

- Firefly, Firefly-RK3288 (both beta and mass production version)
- ChipSPARK, Rayeager PX2

Changes in v3:
- fix ordering more
- fix clock-* properties
- enable tsadc with clock-* properties

Changes in v2:
- use own compatible property for Firefly-RK3288 beta version
- remove disabled tsadc node
- add missing vin-supply
- use two chars for i2c address
- fix ordering for the nodes without address element
- add commit messages

FUKAUMI Naoki (3):
dt-bindings: add vendor prefix and root compatible property for
Rockchip boards
ARM: dts: rockchip: add dts for Firefly Firefly-RK3288 boards
ARM: dts: rockchip: add dts for ChipSPARK Rayeager PX2 board

 Documentation/devicetree/bindings/arm/rockchip.txt |  10 +
 .../devicetree/bindings/vendor-prefixes.txt        |   2 +
 arch/arm/boot/dts/Makefile                         |   5 +-
 arch/arm/boot/dts/rk3066a-rayeager.dts             | 468 +++++++++++++++++++
 arch/arm/boot/dts/rk3288-firefly-beta.dts          |  71 +++
 arch/arm/boot/dts/rk3288-firefly.dts               |  71 +++
 arch/arm/boot/dts/rk3288-firefly.dtsi              | 500 +++++++++++++++++++++
 7 files changed, 1126 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/rk3066a-rayeager.dts
 create mode 100644 arch/arm/boot/dts/rk3288-firefly-beta.dts
 create mode 100644 arch/arm/boot/dts/rk3288-firefly.dts
 create mode 100644 arch/arm/boot/dts/rk3288-firefly.dtsi
Signature · 1 line
2.2.2
#1 lore raw

PATCH v3 1/3 dt-bindings: add vendor prefix and root compatible property for Rockchip boards

This adds vendor prefix and root compatible property for following boards

- Firefly, Firefly-RK3288 boards (both beta and mass production version)
- ChipSPARK, Rayeager PX2 board

PX2 SoC is fully compatible with RK3066.

---

Changes in v3: none
Changes in v2:
- use own compatible property for Firefly-RK3288 beta version

 Documentation/devicetree/bindings/arm/rockchip.txt    | 10 ++++++++++
 Documentation/devicetree/bindings/vendor-prefixes.txt |  2 ++
 2 files changed, 12 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.txt +10 -0
index eaa3d1a..6809e4e 100644
@@ -9,6 +9,16 @@ Rockchip platforms device tree bindings
     Required root node properties:
       - compatible = "mundoreader,bq-curie2", "rockchip,rk3066a";
 
+- ChipSPARK Rayeager PX2 board:
+    Required root node properties:
+      - compatible = "chipspark,rayeager-px2", "rockchip,rk3066a";
+
 - Radxa Rock board:
     Required root node properties:
       - compatible = "radxa,rock", "rockchip,rk3188";
+
+- Firefly Firefly-RK3288 board:
+    Required root node properties:
+      - compatible = "firefly,firefly-rk3288", "rockchip,rk3288";
+    or
+      - compatible = "firefly,firefly-rk3288-beta", "rockchip,rk3288";
Documentation/devicetree/bindings/vendor-prefixes.txt +2 -0
index 5d2251a..0d37f5f 100644
@@ -32,6 +32,7 @@ capella	Capella Microsystems, Inc
 cavium	Cavium, Inc.
 cdns	Cadence Design Systems Inc.
 chipidea	Chipidea, Inc
+chipspark	ChipSPARK
 chrp	Common Hardware Reference Platform
 chunghwa	Chunghwa Picture Tubes Ltd.
 cirrus	Cirrus Logic, Inc.
@@ -62,6 +63,7 @@ everest	Everest Semiconductor Co. Ltd.
 everspin	Everspin Technologies, Inc.
 excito	Excito
 fcs	Fairchild Semiconductor
+firefly	Firefly
 fsl	Freescale Semiconductor
 GEFanuc	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
 gef	GE Fanuc Intelligent Platforms Embedded Systems, Inc.
Signature · 1 line
2.2.2
#2 lore raw

PATCH v3 2/3 ARM: dts: rockchip: add dts for Firefly Firefly-RK3288 boards

In reply to FUKAUMI Naoki

This adds support for Firefly-RK3288, Rockchip RK3288 based development boards made by Firefly.

There are 2 dts for 2 versions of the board. rk3288-firefly-beta.dts is for the beta version, rk3288-firefly.dts is for the mass production version.

---

Changes in v3:
- fix ordering more
- fix clock-* properties
- enable tsadc with clock-* properties

Changes in v2:
- use own compatible property for Firefly-RK3288 beta version
- remove disabled tsadc node
- fix ordering for the nodes without address element
- add commit messages

 arch/arm/boot/dts/Makefile                |   4 +-
 arch/arm/boot/dts/rk3288-firefly-beta.dts |  71 +++++
 arch/arm/boot/dts/rk3288-firefly.dts      |  71 +++++
 arch/arm/boot/dts/rk3288-firefly.dtsi     | 500 ++++++++++++++++++++++++++++++
 4 files changed, 645 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/rk3288-firefly-beta.dts
 create mode 100644 arch/arm/boot/dts/rk3288-firefly.dts
 create mode 100644 arch/arm/boot/dts/rk3288-firefly.dtsi
arch/arm/boot/dts/Makefile +3 -1
index 6a8a5b1..c8a29e5 100644
@@ -447,7 +447,9 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
 	rk3066a-marsboard.dtb \
 	rk3188-radxarock.dtb \
 	rk3288-evb-act8846.dtb \
-	rk3288-evb-rk808.dtb
+	rk3288-evb-rk808.dtb \
+	rk3288-firefly-beta.dtb \
+	rk3288-firefly.dtb
 dtb-$(CONFIG_ARCH_S3C24XX) += \
 	s3c2416-smdk2416.dtb
 dtb-$(CONFIG_ARCH_S3C64XX) += \
arch/arm/boot/dts/rk3288-firefly-beta.dts new file +71 -0

71 lines not on this page · raw message

arch/arm/boot/dts/rk3288-firefly.dts new file +71 -0

71 lines not on this page · raw message

arch/arm/boot/dts/rk3288-firefly.dtsi new file +500 -0

500 lines not on this page · raw message

Signature · 1 line
2.2.2
maintainer
#3 lore raw

PATCH v3 2/3 ARM: dts: rockchip: add dts for Firefly Firefly-RK3288 boards

Am Samstag, 17. Januar 2015, 12:08:59 schrieb FUKAUMI Naoki:

Quoted 8 lines

This adds support for Firefly-RK3288, Rockchip RK3288 based development boards made by Firefly.

There are 2 dts for 2 versions of the board. rk3288-firefly-beta.dts is for the beta version, rk3288-firefly.dts is for the mass production version.

---

[...]

arch/arm/boot/dts/rk3288-firefly.dtsi line 54

Quoted 5 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +5 -0
+	ext_gmac: external-gmac-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <125000000>;
+		clock-output-names = "phy_clkout125";

This should be named "ext_gmac". See the rockchip,rk3288-cru.txt binding document.

arch/arm/boot/dts/rk3288-firefly.dtsi line 188

Quoted 7 lines

+&gmac {

arch/arm/boot/dts/rk3288-firefly.dtsi new file +6 -0
+	assigned-clocks = <&cru SCLK_MAC>;
+	assigned-clock-parents = <&ext_gmac>;
+	clock_in_out = "input";
+	pinctrl-names = "default";
+	pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
+	phy_regulator = "vcc_lan";

This is wrong in the dwmac-rk implementation at the moment which Romain Perier was/is trying to rectify. I.e. there is an established devicetree api for handling regulators, thus the approach the current net-code takes is just wrong and thus this will need to change after.

Quoted 32 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +32 -0
+	phy-mode = "rgmii";
+	snps,reset-active-low;
+	snps,reset-delays-us = <0 10000 1000000>;
+	snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
+	tx_delay = <0x30>;
+	rx_delay = <0x10>;
+	status = "ok";
+};
+
+&i2c0 {
+	clock-frequency = <400000>;
+	status = "okay";
+
+	vdd_cpu: syr827 at 40 {
+		compatible = "silergy,syr827";
+		fcs,suspend-voltage-selector = <1>;
+		reg = <0x40>;
+		regulator-name = "vdd_cpu";
+		regulator-min-microvolt = <850000>;
+		regulator-max-microvolt = <1350000>;
+		regulator-always-on;
+		regulator-boot-on;
+		vin-supply = <&vcc_sys>;
+	};
+
+	vdd_gpu: syr828 at 41 {
+		compatible = "silergy,syr828";
+		fcs,suspend-voltage-selector = <1>;
+		reg = <0x41>;
+		regulator-name = "vdd_gpu";
+		regulator-min-microvolt = <850000>;
+		regulator-max-microvolt = <1350000>;

arch/arm/boot/dts/rk3288-firefly.dtsi line 230

Quoted 10 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +10 -0
+		regulator-always-on;
+		vin-supply = <&vcc_sys>;
+	};
+
+	hym8563: hym8563 at 51 {
+		compatible = "haoyu,hym8563";
+		reg = <0x51>;
+		#clock-cells = <0>;
+		clock-frequency = <32768>;
+		clock-output-names = "rtc_clkout";

this should be named "xin32k" . See radxarock.dts (as a rk3188 based similar example) and the rk3288 clock controller devicetree binding.
This is due to the fact that this is also the input for the suspend clock and the core clock code expects the specific naming according to the soc documentation.

Quoted 5 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +5 -0
+		interrupt-parent = <&gpio7>;
+		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&rtc_int>;
+	};

[...]

arch/arm/boot/dts/rk3288-firefly.dtsi line 427

Quoted 5 lines

+&sdio0 {

arch/arm/boot/dts/rk3288-firefly.dtsi new file +4 -0
+	broken-cd;
+	bus-width = <4>;
+	clocks = <&hym8563>;
+	clock-names = "lpo";

why are you _overriding_ the clocks of the sdio controller?
I guess this clock is part of the actual wifi card connected to the controller. There exists an unfinished approach by Olof Johansson about initing those cards. But in no way is the wifi-ic clock part of the mmc controller itself [and this also effectively overwrites the clocks set in the main dtsi]

Quoted 8 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +8 -0
+	disable-wp;
+	non-removable;
+	num-slots = <1>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
+	vmmc-supply = <&vcc_18>;
+	status = "okay";
+};

[...]

Review

Quoted 3 lines

+&spi2 {

(quoted diff) +2 -0
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi2_clk>, <&spi2_cs0>;

you're enabling only the clk and chipselect, what about the data signals?

arch/arm/boot/dts/rk3288-firefly.dtsi line 465

Quoted 6 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +6 -0
+	status = "okay";
+};
+
+&tsadc {
+	clocks = <&hym8563>;
+	clock-names = "clkin_32k";

The tsadc driver only recognizes the clocks "tsadc", "apb_pclk" so I'm not sure what you're doing with the clkin_32k name here? Also you're again overwriting the existing property.

arch/arm/boot/dts/rk3288-firefly.dtsi line 468

Quoted 3 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +3 -0
+	rockchip,hw-tshut-mode = <0>;
+	status = "okay";
+};

[...]

Heiko

#4 lore raw

PATCH v3 2/3 ARM: dts: rockchip: add dts for Firefly Firefly-RK3288 boards

Hi,

Quoted 8 lines · Heiko St?bner

arch/arm/boot/dts/rk3288-firefly.dtsi line 54

Quoted 5 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +5 -0
+     ext_gmac: external-gmac-clock {
+             compatible = "fixed-clock";
+             #clock-cells = <0>;
+             clock-frequency = <125000000>;
+             clock-output-names = "phy_clkout125";

This should be named "ext_gmac". See the rockchip,rk3288-cru.txt binding document.

I'll revert this to use "ext_gmac".

Quoted 8 lines

arch/arm/boot/dts/rk3288-firefly.dtsi line 188

Quoted 7 lines

+&gmac {

arch/arm/boot/dts/rk3288-firefly.dtsi new file +6 -0
+     assigned-clocks = <&cru SCLK_MAC>;
+     assigned-clock-parents = <&ext_gmac>;
+     clock_in_out = "input";
+     pinctrl-names = "default";
+     pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
+     phy_regulator = "vcc_lan";
Quoted 4 lines

This is wrong in the dwmac-rk implementation at the moment which Romain Perier was/is trying to rectify. I.e. there is an established devicetree api for handling regulators, thus the approach the current net-code takes is just wrong and thus this will need to change after.

I see.

Quoted 9 lines

arch/arm/boot/dts/rk3288-firefly.dtsi line 230

Quoted 6 lines
arch/arm/boot/dts/rk3288-firefly.dtsi new file +6 -0
+     hym8563: hym8563 at 51 {
+             compatible = "haoyu,hym8563";
+             reg = <0x51>;
+             #clock-cells = <0>;
+             clock-frequency = <32768>;
+             clock-output-names = "rtc_clkout";

this should be named "xin32k" . See radxarock.dts (as a rk3188 based similar example) and the rk3288 clock controller devicetree binding.

I'll revert this to use "xin32k".

Quoted 3 lines

This is due to the fact that this is also the input for the suspend clock and the core clock code expects the specific naming according to the soc documentation.

can I assume clock named "xin32k" is always enabled? no need to describe consumer explicitly?

Quoted 7 lines

arch/arm/boot/dts/rk3288-firefly.dtsi line 427

Quoted 5 lines

+&sdio0 {

arch/arm/boot/dts/rk3288-firefly.dtsi new file +4 -0
+     broken-cd;
+     bus-width = <4>;
+     clocks = <&hym8563>;
+     clock-names = "lpo";

why are you _overriding_ the clocks of the sdio controller?

sorry, I was just wrong. I'll remove clocks and clock-names from here.

Quoted 5 lines

Review

Quoted 3 lines

+&spi2 {

(quoted diff) +2 -0
+     pinctrl-names = "default";
+     pinctrl-0 = <&spi2_clk>, <&spi2_cs0>;

you're enabling only the clk and chipselect, what about the data signals?

no idea, I just follow schematic. if it's really unusable on mainline, I'll disable(remove) spi2.

Quoted 7 lines

Review

Quoted 3 lines

+&tsadc {

(quoted diff) +2 -0
+     clocks = <&hym8563>;
+     clock-names = "clkin_32k";

The tsadc driver only recognizes the clocks "tsadc", "apb_pclk" so I'm not sure what you're doing with the clkin_32k name here? Also you're again overwriting the existing property.

I was wrong here too. I'll remove clocks and clock-names from here. and if it makes tsadc non-working, I'll remove tsadc too for now.

Regards,

#5 lore raw

PATCH v3 3/3 ARM: dts: rockchip: add dts for ChipSPARK Rayeager PX2 board

In reply to FUKAUMI Naoki

This add support for Rayeager PX2, Rockchip PX2 based development board made by ChipSPARK.

---

Changes in v3:
- fix ordering more

Changes in v2:
- add missing vin-supply
- use two chars for i2c address
- fix ordering for nodes without address element
- add commit messages

 arch/arm/boot/dts/Makefile             |   1 +
 arch/arm/boot/dts/rk3066a-rayeager.dts | 468 +++++++++++++++++++++++++++++++++
 2 files changed, 469 insertions(+)
 create mode 100644 arch/arm/boot/dts/rk3066a-rayeager.dts
arch/arm/boot/dts/Makefile +1 -0
index c8a29e5..bfdc0a8 100644
@@ -445,6 +445,7 @@ dtb-$(CONFIG_ARCH_REALVIEW) += \
 dtb-$(CONFIG_ARCH_ROCKCHIP) += \
 	rk3066a-bqcurie2.dtb \
 	rk3066a-marsboard.dtb \
+	rk3066a-rayeager.dtb \
 	rk3188-radxarock.dtb \
 	rk3288-evb-act8846.dtb \
 	rk3288-evb-rk808.dtb \
arch/arm/boot/dts/rk3066a-rayeager.dts new file +468 -0

468 lines not on this page · raw message

Signature · 1 line
2.2.2