Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
sun8i-a83t-bananapi-m3.dtb \
sun8i-a83t-cubietruck-plus.dtb \
sun8i-h2-plus-orangepi-zero.dtb \
sun8i-h3-unit.dtb \
sun8i-h3-quark-n.dtb \
sun8i-h3-bananapi-m2-plus.dtb \
sun8i-h3-beelink-x2.dtb \
sun8i-h3-nanopi-m1.dtb \
Expand Down
132 changes: 115 additions & 17 deletions arch/arm/boot/dts/sun8i-h3-nanopi-neo-core.dts
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,128 @@
#include "sun8i-h3-nanopi.dtsi"

/ {
model = "FriendlyElec NanoPi-NEO-Core";
model = "Linux-Card";
compatible = "friendlyelec,nanopi-neo-core", "allwinner,sun8i-h3";


cam_xclk: cam-xclk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
clock-output-names = "cam-xclk";
};

reg_cam_avdd: cam-avdd {
compatible = "regulator-fixed";
regulator-name = "cam500b-avdd";
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
vin-supply = <&reg_vcc3v3>;
};

reg_cam_dovdd: cam-dovdd {
compatible = "regulator-fixed";
regulator-name = "cam500b-dovdd";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
vin-supply = <&reg_vcc3v3>;
};

reg_cam_dvdd: cam-dvdd {
compatible = "regulator-fixed";
regulator-name = "cam500b-dvdd";
regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <1500000>;
vin-supply = <&reg_vcc3v3>;
};
};



&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
status = "okay";
};

&mmc2_8bit_pins {
/* Increase drive strength for DDR modes */
drive-strength = <40>;
/* eMMC is missing pull-ups */
bias-pull-up;
};

&emac {
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
status = "okay";
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
status = "okay";
};

&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>, <&uart2_rts_cts_pins>;
status = "okay";
};

&csi {
status = "okay";

port {
#address-cells = <1>;
#size-cells = <0>;

/* Parallel bus endpoint */
csi_from_ov5640: endpoint {
remote-endpoint = <&ov5640_to_csi>;
bus-width = <8>;
data-shift = <2>;
hsync-active = <1>; /* Active high */
vsync-active = <0>; /* Active low */
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
};
};

&mmc2_8bit_pins {
/* Increase drive strength for DDR modes */
drive-strength = <40>;
/* eMMC is missing pull-ups */
bias-pull-up;
&i2c2 {
status = "okay";

ov5640: camera@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
clocks = <&cam_xclk>;
clock-names = "xclk";

reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>;
powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>;
AVDD-supply = <&reg_cam_avdd>;
DOVDD-supply = <&reg_cam_dovdd>;
DVDD-supply = <&reg_cam_dvdd>;

port {
ov5640_to_csi: endpoint {
remote-endpoint = <&csi_from_ov5640>;
bus-width = <8>;
data-shift = <2>;
hsync-active = <1>; /* Active high */
vsync-active = <0>; /* Active low */
data-active = <1>; /* Active high */
pclk-sample = <1>; /* Rising */
};
};
};

};

&i2c2_pins {
bias-pull-up;
};

&i2c0_pins {
bias-pull-up;
};
99 changes: 49 additions & 50 deletions arch/arm/boot/dts/sun8i-h3-nanopi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
default-state = "on";
};

};

r_gpio_keys {
Expand All @@ -116,7 +117,7 @@
k1 {
label = "k1";
linux,code = <KEY_POWER>;
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>;
};
};

Expand Down Expand Up @@ -300,6 +301,7 @@
pins = "PA10";
function = "gpio_out";
};

spi0_cs_pins: spi0_cs_pins {
pins = "PC3", "PA6";
function = "gpio_out";
Expand All @@ -313,7 +315,7 @@
};

sw_r_npi: key_pins {
pins = "PL3";
pins = "PL6";
function = "gpio_in";
};
};
Expand All @@ -339,15 +341,11 @@
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>, <&uart3_rts_cts_pins>;
status = "okay";
status = "disabled";
};

&i2c0 {
status = "okay";
rtc@68 {
compatible = "dallas,ds1307";
reg = <0x68>;
};
};

&i2c1 {
Expand All @@ -373,15 +371,15 @@
reg = <0>;
status = "okay";

spi-max-frequency = <10000000>;
spi-max-frequency = <50000000>;
};

spiflash: spiflash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "mxicy,mx25l12805d";
reg = <0>;
status = "disabled";
status = "okay";

spi-max-frequency = <50000000>;
mode = <0>;
Expand All @@ -392,51 +390,52 @@
};
};

pitft: pitft@0{
compatible = "sitronix,st7789v";
reg = <0>;
status = "disabled";
pitft: pitft@0{
compatible = "sitronix,st7789v";
reg = <0>;
status = "disabled";

spi-max-frequency = <50000000>;
rotate = <90>;
fps = <33>;
buswidth = <8>;
dc-gpios = <&pio 0 1 GPIO_ACTIVE_HIGH>; /* PA1 */
reset-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
debug = <0x0>;
};

pitft_ts: pitft-ts@1 {
compatible = "ti,ads7846";
reg = <1>;
status = "disabled";

spi-max-frequency = <2000000>;
interrupt-parent = <&pio>;
interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* PG9 / EINT9 */
pendown-gpio = <&pio 6 9 GPIO_ACTIVE_LOW>;
ti,swap-xy;
ti,vref-delay-usecs = <1000>;
ti,x-min = /bits/ 16 <100>;
ti,x-max = /bits/ 16 <0xfff>;
ti,y-min = /bits/ 16 <100>;
ti,y-max = /bits/ 16 <0xfff>;
ti,vref-mv = <3300>;
ti,x-plate-ohms = /bits/ 16 <256>;
ti,penirq-recheck-delay-usecs = <10>;
ti,settle-delay-usec = /bits/ 16 <100>;
ti,keep-vref-on = <1>;
ti,pressure-max = /bits/ 16 <0xfff>;
ti,debounce-max = <10>;
ti,debounce-tol = <30>;
ti,debounce-rep = <1>;
};


spi-max-frequency = <50000000>;
rotate = <90>;
fps = <33>;
buswidth = <8>;
dc-gpios = <&pio 0 1 GPIO_ACTIVE_HIGH>; /* PA1 */
reset-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
led-gpios = <&pio 0 0 GPIO_ACTIVE_LOW>; /* PA0 */
debug = <0x0>;
};

pitft_ts: pitft-ts@1 {
compatible = "ti,ads7846";
reg = <1>;
status = "disabled";

spi-max-frequency = <2000000>;
interrupt-parent = <&pio>;
interrupts = <6 9 IRQ_TYPE_EDGE_FALLING>; /* PG9 / EINT9 */
pendown-gpio = <&pio 6 9 GPIO_ACTIVE_LOW>;
ti,swap-xy;
ti,vref-delay-usecs = <1000>;
ti,x-min = /bits/ 16 <100>;
ti,x-max = /bits/ 16 <0xfff>;
ti,y-min = /bits/ 16 <100>;
ti,y-max = /bits/ 16 <0xfff>;
ti,vref-mv = <3300>;
ti,x-plate-ohms = /bits/ 16 <256>;
ti,penirq-recheck-delay-usecs = <10>;
ti,settle-delay-usec = /bits/ 16 <100>;
ti,keep-vref-on = <1>;
ti,pressure-max = /bits/ 16 <0xfff>;
ti,debounce-max = <10>;
ti,debounce-tol = <30>;
ti,debounce-rep = <1>;
};
};

&spi1 {
// against uart3_rts_cts_pins, so disable
status = "disable";
status = "okay";
spidev1: spi@1 {
compatible = "nanopi,spidev";
reg = <0>;
Expand All @@ -459,7 +458,7 @@
};

&sound_hdmi {
status = "okay";
status = "disable";
};

&tcon0 {
Expand Down
19 changes: 19 additions & 0 deletions arch/arm/boot/dts/sun8i-h3-unit.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include "sun8i-h3-linux_card.dtsi"

/ {
model = "Pengzhihui Unit-Sever";
compatible = "friendlyelec,nanopi-neo-core", "allwinner,sun8i-h3";
};


&i2c2_pins {
bias-pull-up;
};

&i2c1_pins {
bias-pull-up;
};

&i2c0_pins {
bias-pull-up;
};
Loading