|
| 1 | +From 08d194d881e10e09cba7551da8079734d89ed16d Mon Sep 17 00:00:00 2001 |
| 2 | +From: Icenowy Zheng <uwu@icenowy.me> |
| 3 | +Date: Thu, 16 Jun 2022 00:28:41 +0800 |
| 4 | +Subject: [PATCH 1/2] add USB support and PopStick support |
| 5 | + |
| 6 | +Signed-off-by: Icenowy Zheng <uwu@icenowy.me> |
| 7 | +--- |
| 8 | + arch/arm/dts/Makefile | 3 +- |
| 9 | + arch/arm/dts/suniv-f1c100s-licheepi-nano.dts | 16 ++++ |
| 10 | + arch/arm/dts/suniv-f1c100s.dtsi | 26 ++++++ |
| 11 | + arch/arm/dts/suniv-f1c200s-popstick.dts | 89 ++++++++++++++++++++ |
| 12 | + drivers/phy/allwinner/phy-sun4i-usb.c | 14 +++ |
| 13 | + drivers/usb/musb-new/sunxi.c | 6 ++ |
| 14 | + 6 files changed, 153 insertions(+), 1 deletion(-) |
| 15 | + create mode 100644 arch/arm/dts/suniv-f1c200s-popstick.dts |
| 16 | + |
| 17 | +--- a/arch/arm/dts/Makefile |
| 18 | ++++ b/arch/arm/dts/Makefile |
| 19 | +@@ -647,7 +647,8 @@ dtb-$(CONFIG_STM32H7) += stm32h743i-disc |
| 20 | + stm32h750i-art-pi.dtb |
| 21 | + |
| 22 | + dtb-$(CONFIG_MACH_SUNIV) += \ |
| 23 | +- suniv-f1c100s-licheepi-nano.dtb |
| 24 | ++ suniv-f1c100s-licheepi-nano.dtb \ |
| 25 | ++ suniv-f1c200s-popstick.dtb |
| 26 | + dtb-$(CONFIG_MACH_SUN4I) += \ |
| 27 | + sun4i-a10-a1000.dtb \ |
| 28 | + sun4i-a10-ba10-tvbox.dtb \ |
| 29 | +--- /dev/null |
| 30 | ++++ b/arch/arm/dts/suniv-f1c200s-popstick.dts |
| 31 | +@@ -0,0 +1,89 @@ |
| 32 | ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 33 | ++/* |
| 34 | ++ * Copyright 2022 Icenowy Zheng <uwu@icenowy.me> |
| 35 | ++ */ |
| 36 | ++ |
| 37 | ++/dts-v1/; |
| 38 | ++#include "suniv-f1c100s.dtsi" |
| 39 | ++ |
| 40 | ++#include <dt-bindings/gpio/gpio.h> |
| 41 | ++ |
| 42 | ++/ { |
| 43 | ++ model = "Popcorn Computer PopStick"; |
| 44 | ++ compatible = "sourceparts,popstick", "allwinner,suniv-f1c200s", |
| 45 | ++ "allwinner,suniv-f1c100s"; |
| 46 | ++ |
| 47 | ++ aliases { |
| 48 | ++ mmc0 = &mmc0; |
| 49 | ++ serial0 = &uart0; |
| 50 | ++ spi0 = &spi0; |
| 51 | ++ }; |
| 52 | ++ |
| 53 | ++ chosen { |
| 54 | ++ stdout-path = "serial0:115200n8"; |
| 55 | ++ }; |
| 56 | ++ |
| 57 | ++ reg_vcc3v3: vcc3v3 { |
| 58 | ++ compatible = "regulator-fixed"; |
| 59 | ++ regulator-name = "vcc3v3"; |
| 60 | ++ regulator-min-microvolt = <3300000>; |
| 61 | ++ regulator-max-microvolt = <3300000>; |
| 62 | ++ }; |
| 63 | ++}; |
| 64 | ++ |
| 65 | ++&mmc0 { |
| 66 | ++ broken-cd; |
| 67 | ++ bus-width = <4>; |
| 68 | ++ disable-wp; |
| 69 | ++ status = "okay"; |
| 70 | ++ vmmc-supply = <®_vcc3v3>; |
| 71 | ++}; |
| 72 | ++ |
| 73 | ++&spi0 { |
| 74 | ++ pinctrl-names = "default"; |
| 75 | ++ pinctrl-0 = <&spi0_pc_pins>; |
| 76 | ++ status = "okay"; |
| 77 | ++ |
| 78 | ++ flash@0 { |
| 79 | ++ #address-cells = <1>; |
| 80 | ++ #size-cells = <1>; |
| 81 | ++ compatible = "spi-nand"; |
| 82 | ++ reg = <0>; |
| 83 | ++ spi-max-frequency = <1000000>; |
| 84 | ++ |
| 85 | ++ partitions { |
| 86 | ++ compatible = "fixed-partitions"; |
| 87 | ++ #address-cells = <1>; |
| 88 | ++ #size-cells = <1>; |
| 89 | ++ |
| 90 | ++ partition@0 { |
| 91 | ++ label = "u-boot-with-spl"; |
| 92 | ++ reg = <0x0 0x100000>; |
| 93 | ++ }; |
| 94 | ++ |
| 95 | ++ ubi@100000 { |
| 96 | ++ label = "ubi"; |
| 97 | ++ reg = <0x100000 0x7f00000>; |
| 98 | ++ }; |
| 99 | ++ }; |
| 100 | ++ }; |
| 101 | ++}; |
| 102 | ++ |
| 103 | ++&otg_sram { |
| 104 | ++ status = "okay"; |
| 105 | ++}; |
| 106 | ++ |
| 107 | ++&uart0 { |
| 108 | ++ pinctrl-names = "default"; |
| 109 | ++ pinctrl-0 = <&uart0_pe_pins>; |
| 110 | ++ status = "okay"; |
| 111 | ++}; |
| 112 | ++ |
| 113 | ++&usb_otg { |
| 114 | ++ dr_mode = "peripheral"; |
| 115 | ++ status = "okay"; |
| 116 | ++}; |
| 117 | ++ |
| 118 | ++&usbphy { |
| 119 | ++ status = "okay"; |
| 120 | ++}; |
0 commit comments