Skip to contentSkip to conversation

ARM: dts: sun8i: Sync r40 dtsi from Linux

PATCH New Jagan Teki 4 participants 7 messages Apr 27, 2018 – Aug 15, 2018

Subsystems (5)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v2 1/2 ARM: dts: sun8i: Sync r40 dtsi from Linux

Sync sun8i-r40.dtsi changes from Linux with

Merge: a406778618d0 088345fc3553
Author: Stephen Rothwell <[email protected]>
Date: Tue Apr 24 14:15:02 2018 +1000

Merge branch 'akpm/master'

---
Changes for v2:
- none

 arch/arm/dts/sun8i-r40.dtsi               |  43 +++++++
 include/dt-bindings/clock/sun8i-r40-ccu.h | 187 ++++++++++++++++++++++++++++++
 include/dt-bindings/reset/sun8i-r40-ccu.h | 130 +++++++++++++++++++++
 3 files changed, 360 insertions(+)
 create mode 100644 include/dt-bindings/clock/sun8i-r40-ccu.h
 create mode 100644 include/dt-bindings/reset/sun8i-r40-ccu.h
arch/arm/dts/sun8i-r40.dtsi +43 -0
index 48ec2e855a..0aa76a2f10 100644
@@ -43,6 +43,8 @@
  */
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/sun8i-r40-ccu.h>
+#include <dt-bindings/reset/sun8i-r40-ccu.h>
 
 / {
 	#address-cells = <1>;
@@ -114,6 +116,39 @@
 		#size-cells = <1>;
 		ranges;
 
+		nmi_intc: interrupt-controller at 1c00030 {
+			compatible = "allwinner,sun7i-a20-sc-nmi";
+			interrupt-controller;
+			#interrupt-cells = <2>;
+			reg = <0x01c00030 0x0c>;
+			interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
+		mmc0: mmc at 1c0f000 {
+			compatible = "allwinner,sun8i-r40-mmc",
+				     "allwinner,sun50i-a64-mmc";
+			reg = <0x01c0f000 0x1000>;
+			clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
+			clock-names = "ahb", "mmc";
+			resets = <&ccu RST_BUS_MMC0>;
+			reset-names = "ahb";
+			pinctrl-0 = <&mmc0_pins>;
+			pinctrl-names = "default";
+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
+
+		ccu: clock at 1c20000 {
+			compatible = "allwinner,sun8i-r40-ccu";
+			reg = <0x01c20000 0x400>;
+			clocks = <&osc24M>, <&osc32k>;
+			clock-names = "hosc", "losc";
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+		};
+
 		pio: pinctrl at 1c20800 {
 			compatible = "allwinner,sun8i-r40-pinctrl";
 			reg = <0x01c20800 0x400>;
@@ -132,6 +167,14 @@
 				bias-pull-up;
 			};
 
+			mmc0_pins: mmc0-pins {
+				pins = "PF0", "PF1", "PF2",
+				       "PF3", "PF4", "PF5";
+				function = "mmc0";
+				drive-strength = <30>;
+				bias-pull-up;
+			};
+
 			uart0_pb_pins: uart0_pb_pins {
 				pins = "PB22", "PB23";
 				function = "uart0";
include/dt-bindings/clock/sun8i-r40-ccu.h new file +187 -0

187 lines not on this page · raw message

include/dt-bindings/reset/sun8i-r40-ccu.h new file +130 -0

130 lines not on this page · raw message

Signature · 1 line
2.14.3
author
#1 lore raw

PATCH v2 2/2 board: sunxi: sun8i-v4: Add Bananapi M2 Berry support

Banana Pi BPI-M2 Berry is a quad-core mini single board computer built with Allwinner V40 SoC. It features
- Quad Core ARM Cortex A7 CPU V40
- 1GB of RAM .
- microSD/SATA port..
- onboard WiFi and BT
- 4 USB A 2.0 ports
- 1 USB OTG port
- 1 HDMI port
- 1 audio jack
- DC power port

---
Changes for v2:
- Reused R40 configs for V40 SOC

 arch/arm/dts/Makefile                        |   3 +-
 arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts | 132 +++++++++++++++++++++++++++
 board/sunxi/MAINTAINERS                      |   5 +
 configs/bananapi_m2_berry_defconfig          |  14 +++
 4 files changed, 153 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts
 create mode 100644 configs/bananapi_m2_berry_defconfig
arch/arm/dts/Makefile +2 -1
index ac7667b1e8..ab0b2568ea 100644
@@ -366,7 +366,8 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
 	sun8i-h3-nanopi-neo.dtb \
 	sun8i-h3-nanopi-neo-air.dtb
 dtb-$(CONFIG_MACH_SUN8I_R40) += \
-	sun8i-r40-bananapi-m2-ultra.dtb
+	sun8i-r40-bananapi-m2-ultra.dtb \
+	sun8i-v40-bananapi-m2-berry.dtb
 dtb-$(CONFIG_MACH_SUN8I_V3S) += \
 	sun8i-v3s-licheepi-zero.dtb
 dtb-$(CONFIG_MACH_SUN50I_H5) += \
arch/arm/dts/sun8i-v40-bananapi-m2-berry.dts new file +132 -0

132 lines not on this page · raw message

board/sunxi/MAINTAINERS +5 -0
index 6dd48c0265..5d31bcbdcd 100644
@@ -126,6 +126,11 @@ M:	Jagan Teki <[email protected]>
 S:	Maintained
 F:	configs/bananapi_m1_plus_defconfig
 
+BANANAPI M2 BERRY
+M:	Jagan Teki <[email protected]>
+S:	Maintained
+F:	configs/bananapi_m2_berry_defconfig
+
 BANANAPI M2 ULTRA BOARD
 M:	Chen-Yu Tsai <[email protected]>
 S:	Maintained
configs/bananapi_m2_berry_defconfig new file +14 -0
new file mode 100644
index 0000000000..9d75108d04
@@ -0,0 +1,14 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_SPL=y
+CONFIG_MACH_SUN8I_R40=y
+CONFIG_DRAM_CLK=576
+CONFIG_DRAM_ZQ=3881979
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN="PH13"
+CONFIG_DEFAULT_DEVICE_TREE="sun8i-v40-bananapi-m2-berry"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL_I2C_SUPPORT=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_AXP_DLDO4_VOLT=2500
+CONFIG_AXP_ELDO3_VOLT=1200
Signature · 1 line
2.14.3
#2 lore raw

PATCH v2 2/2 board: sunxi: sun8i-v4: Add Bananapi M2 Berry support

Quoted 12 lines · Jagan Teki

Banana Pi BPI-M2 Berry is a quad-core mini single board computer built with Allwinner V40 SoC. It features
- Quad Core ARM Cortex A7 CPU V40
- 1GB of RAM .
- microSD/SATA port..
- onboard WiFi and BT
- 4 USB A 2.0 ports
- 1 USB OTG port
- 1 HDMI port
- 1 audio jack
- DC power port

Quoted 1 line

There's a typo in your commit title, it should be v40 and not v4. Otherwise it looks good,

for both patches, thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180502/8de1d912/attachment.sig>
#3 lore raw

PATCH v2 2/2 board: sunxi: sun8i-v4: Add Bananapi M2 Berry support

Quoted 13 lines · Maxime Ripard
Quoted 12 lines · Jagan Teki

Banana Pi BPI-M2 Berry is a quad-core mini single board computer built with Allwinner V40 SoC. It features
- Quad Core ARM Cortex A7 CPU V40
- 1GB of RAM .
- microSD/SATA port..
- onboard WiFi and BT
- 4 USB A 2.0 ports
- 1 USB OTG port
- 1 HDMI port
- 1 audio jack
- DC power port

Quoted 5 lines
Quoted 1 line

There's a typo in your commit title, it should be v40 and not v4. Otherwise it looks good,

Fixed and Applied to u-boot-sunxi/master

#4 lore raw

PATCH v2 2/2 board: sunxi: sun8i-v40: Add Bananapi M2 Berry support

In reply to Maxime Ripard

Hi Maxine and team,

I want to run Fedora linux, from here:
https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Spins/armhfp
/images/

on the Banana Pi BPI-M2 Berry. (works fine on a Banana Pi original)

I've waited six months for the patches to filter through to the Fedora team but, so far nothing.

I've downloaded the code from the denx.de website but I cannot see a way to just generate the u-boot-sunxi-with-spl.bin file for the Berry. There is a u-boot-sunxi-with-spl.bin file in the Fedora distribution for the Berry but it doesn't work.
This also doesn't work:
https://github.com/BPI-SINOVOIP/BPI-Mainline-uboot.git
I suspect they check the chip-id and barf if it's not 0x1701 the R40.

I chose the Banana Pi BPI-M2 Berry over the Ultra because I didn't need the extra ram or other bells and whistles. I want to embed a BPi Berry in an amateur radio project where I need a board with a SATA port for an SSD.

Keep up the good work.

Alan

On Wed, 2 May 2018 11:16:30 +0200, Maxime Ripard wrote

Quoted 13 lines · Jagan Teki
Quoted 12 lines

Banana Pi BPI-M2 Berry is a quad-core mini single board computer built with Allwinner V40 SoC. It features
- Quad Core ARM Cortex A7 CPU V40
- 1GB of RAM .
- microSD/SATA port..
- onboard WiFi and BT
- 4 USB A 2.0 ports
- 1 USB OTG port
- 1 HDMI port
- 1 audio jack
- DC power port

Quoted 13 lines
Quoted 1 line

There's a typo in your commit title, it should be v40 and not v4. Otherwise it looks good,

for both patches, thanks!
Maxime

Signature · 3 lines
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

Alan

Evil flourishes when good men do nothing.
Consider the Christmas child.
---------------------------------------------------------------------------

Alan Beard               Unix Support Technician from 1984 to today
70 Wedmore Rd.           Sun Solaris, AIX, HP/UX, Linux, SCO, MIPS
Emu Heights N.S.W. 2750  Routers, terminal servers, printers, terminals etc..
+61 2 47353013 (h)       Support Programming, shell scripting, "C", assembler
0414 353013 (mobile)     After uni, electronics tech
author
#5 lore raw

PATCH v2 2/2 board: sunxi: sun8i-v40: Add Bananapi M2 Berry support

Quoted 19 lines · Alan Beard

Hi Maxine and team,

I want to run Fedora linux, from here:
https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Spins/armhfp
/images/

on the Banana Pi BPI-M2 Berry. (works fine on a Banana Pi original)

I've waited six months for the patches to filter through to the Fedora team but, so far nothing.

I've downloaded the code from the denx.de website but I cannot see a way to just generate the u-boot-sunxi-with-spl.bin file for the Berry. There is a u-boot-sunxi-with-spl.bin file in the Fedora distribution for the Berry but it doesn't work.
This also doesn't work:
https://github.com/BPI-SINOVOIP/BPI-Mainline-uboot.git
I suspect they check the chip-id and barf if it's not 0x1701 the R40.

Quoted 3 lines

I chose the Banana Pi BPI-M2 Berry over the Ultra because I didn't need the extra ram or other bells and whistles. I want to embed a BPi Berry in an amateur radio project where I need a board with a SATA port for an SSD.

I'm not clear what exactly you are asking?

u-boot-sunxi-with-spl.bin is by default created with u-boot build and SATA support is enabled recently on commit:
dddc4b4af3a444ef78d1a3d983aae71179a0d92c