Commit ba817911 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'riscv-dt-for-v6.6' of...

Merge tag 'riscv-dt-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt

RISC-V Devicetrees for v6.6

StarFive:
There's only StarFive stuff this time around, starting with some
bindings to get clock ID defines out of the binding headers. Getting
these (and the syscon bindings) in unblocked a swathe of stuff sitting
on the list. Added are: new clock controllers and sycons, ethernet
support, thermal sensors, USB and PCIe PHYs, hwrng, mmc and a few more
besides for the VisionFive v2. The original VisionFive and BeagleV
Starlight got some the thermal sensor support too, as that is supported
by the same driver. These changes make the board actually usable with
something other than an initramfs.
Overlay support by way of the -@ flag set during dtb building, is added
also.
Signed-off-by: default avatarConor Dooley <conor.dooley@microchip.com>

* tag 'riscv-dt-for-v6.6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: (26 commits)
  riscv: dts: starfive: jh7110: Fix GMAC configuration
  riscv: dts: starfive - Add hwrng node for JH7110 SoC
  riscv: dts: starfive - Add crypto and DMA node for JH7110
  riscv: dts: starfive: Add mmc nodes on VisionFive 2 board
  riscv: dts: starfive: enable DCDC1&ALDO4 node in axp15060
  riscv: dts: starfive: Add QSPI controller node for StarFive JH7110 SoC
  riscv: dts: starfive: jh7110: add the node and pins configuration for tdm
  riscv: dts: starfive: jh7110: add dma controller node
  riscv: dts: starfive: Add spi node and pins configuration
  riscv: dts: starfive: Add USB dts node for JH7110
  riscv: dts: starfive: Add USB and PCIe PHY nodes for JH7110
  riscv: dts: starfive: jh7110: Add temperature sensor node and thermal-zones
  riscv: dts: starfive: jh7100: Add temperature sensor node and thermal-zones
  riscv: dts: starfive: visionfive 2: Add configuration of gmac and phy
  riscv: dts: starfive: jh7110: Add ethernet device nodes
  riscv: dts: starfive: jh7110: Add PLL clocks source in SYSCRG node
  riscv: dts: starfive: jh7110: Add syscon nodes
  riscv: dts: starfive: jh7110: Add STGCRG/ISPCRG/VOUTCRG nodes
  riscv: dts: starfive: jh7110: Add DVP and HDMI TX pixel external clocks
  dt-bindings: clock: Add StarFive JH7110 Video-Output clock and reset generator
  ...

Link: https://lore.kernel.org/r/20230813-naturist-fragment-ac7d10c453ba@spudSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents eeb751c4 f331eb1f
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/starfive,jh7110-ispcrg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: StarFive JH7110 Image-Signal-Process Clock and Reset Generator
maintainers:
- Xingyu Wu <xingyu.wu@starfivetech.com>
properties:
compatible:
const: starfive,jh7110-ispcrg
reg:
maxItems: 1
clocks:
items:
- description: ISP Top core
- description: ISP Top Axi
- description: NOC ISP Bus
- description: external DVP
clock-names:
items:
- const: isp_top_core
- const: isp_top_axi
- const: noc_bus_isp_axi
- const: dvp_clk
resets:
items:
- description: ISP Top core
- description: ISP Top Axi
- description: NOC ISP Bus
'#clock-cells':
const: 1
description:
See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
'#reset-cells':
const: 1
description:
See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
power-domains:
maxItems: 1
description:
ISP domain power
required:
- compatible
- reg
- clocks
- clock-names
- resets
- '#clock-cells'
- '#reset-cells'
- power-domains
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/starfive,jh7110-crg.h>
#include <dt-bindings/power/starfive,jh7110-pmu.h>
#include <dt-bindings/reset/starfive,jh7110-crg.h>
ispcrg: clock-controller@19810000 {
compatible = "starfive,jh7110-ispcrg";
reg = <0x19810000 0x10000>;
clocks = <&syscrg JH7110_SYSCLK_ISP_TOP_CORE>,
<&syscrg JH7110_SYSCLK_ISP_TOP_AXI>,
<&syscrg JH7110_SYSCLK_NOC_BUS_ISP_AXI>,
<&dvp_clk>;
clock-names = "isp_top_core", "isp_top_axi",
"noc_bus_isp_axi", "dvp_clk";
resets = <&syscrg JH7110_SYSRST_ISP_TOP>,
<&syscrg JH7110_SYSRST_ISP_TOP_AXI>,
<&syscrg JH7110_SYSRST_NOC_BUS_ISP_AXI>;
#clock-cells = <1>;
#reset-cells = <1>;
power-domains = <&pwrc JH7110_PD_ISP>;
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: StarFive JH7110 PLL Clock Generator
description:
These PLLs are high speed, low jitter frequency synthesizers in the JH7110.
Each PLL works in integer mode or fraction mode, with configuration
registers in the sys syscon. So the PLLs node should be a child of
SYS-SYSCON node.
The formula for calculating frequency is
Fvco = Fref * (NI + NF) / M / Q1
maintainers:
- Xingyu Wu <xingyu.wu@starfivetech.com>
properties:
compatible:
const: starfive,jh7110-pll
clocks:
maxItems: 1
description: Main Oscillator (24 MHz)
'#clock-cells':
const: 1
description:
See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
required:
- compatible
- clocks
- '#clock-cells'
additionalProperties: false
examples:
- |
clock-controller {
compatible = "starfive,jh7110-pll";
clocks = <&osc>;
#clock-cells = <1>;
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/starfive,jh7110-stgcrg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: StarFive JH7110 System-Top-Group Clock and Reset Generator
maintainers:
- Xingyu Wu <xingyu.wu@starfivetech.com>
properties:
compatible:
const: starfive,jh7110-stgcrg
reg:
maxItems: 1
clocks:
items:
- description: Main Oscillator (24 MHz)
- description: HIFI4 core
- description: STG AXI/AHB
- description: USB (125 MHz)
- description: CPU Bus
- description: HIFI4 Axi
- description: NOC STG Bus
- description: APB Bus
clock-names:
items:
- const: osc
- const: hifi4_core
- const: stg_axiahb
- const: usb_125m
- const: cpu_bus
- const: hifi4_axi
- const: nocstg_bus
- const: apb_bus
'#clock-cells':
const: 1
description:
See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
'#reset-cells':
const: 1
description:
See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
required:
- compatible
- reg
- clocks
- clock-names
- '#clock-cells'
- '#reset-cells'
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/starfive,jh7110-crg.h>
stgcrg: clock-controller@10230000 {
compatible = "starfive,jh7110-stgcrg";
reg = <0x10230000 0x10000>;
clocks = <&osc>,
<&syscrg JH7110_SYSCLK_HIFI4_CORE>,
<&syscrg JH7110_SYSCLK_STG_AXIAHB>,
<&syscrg JH7110_SYSCLK_USB_125M>,
<&syscrg JH7110_SYSCLK_CPU_BUS>,
<&syscrg JH7110_SYSCLK_HIFI4_AXI>,
<&syscrg JH7110_SYSCLK_NOCSTG_BUS>,
<&syscrg JH7110_SYSCLK_APB_BUS>;
clock-names = "osc", "hifi4_core",
"stg_axiahb", "usb_125m",
"cpu_bus", "hifi4_axi",
"nocstg_bus", "apb_bus";
#clock-cells = <1>;
#reset-cells = <1>;
};
......@@ -27,6 +27,9 @@ properties:
- description: External I2S RX left/right channel clock
- description: External TDM clock
- description: External audio master clock
- description: PLL0
- description: PLL1
- description: PLL2
- items:
- description: Main Oscillator (24 MHz)
......@@ -38,6 +41,9 @@ properties:
- description: External I2S RX left/right channel clock
- description: External TDM clock
- description: External audio master clock
- description: PLL0
- description: PLL1
- description: PLL2
clock-names:
oneOf:
......@@ -52,6 +58,9 @@ properties:
- const: i2srx_lrck_ext
- const: tdm_ext
- const: mclk_ext
- const: pll0_out
- const: pll1_out
- const: pll2_out
- items:
- const: osc
......@@ -63,6 +72,9 @@ properties:
- const: i2srx_lrck_ext
- const: tdm_ext
- const: mclk_ext
- const: pll0_out
- const: pll1_out
- const: pll2_out
'#clock-cells':
const: 1
......@@ -93,12 +105,14 @@ examples:
<&gmac1_rgmii_rxin>,
<&i2stx_bclk_ext>, <&i2stx_lrck_ext>,
<&i2srx_bclk_ext>, <&i2srx_lrck_ext>,
<&tdm_ext>, <&mclk_ext>;
<&tdm_ext>, <&mclk_ext>,
<&pllclk 0>, <&pllclk 1>, <&pllclk 2>;
clock-names = "osc", "gmac1_rmii_refin",
"gmac1_rgmii_rxin",
"i2stx_bclk_ext", "i2stx_lrck_ext",
"i2srx_bclk_ext", "i2srx_lrck_ext",
"tdm_ext", "mclk_ext";
"tdm_ext", "mclk_ext",
"pll0_out", "pll1_out", "pll2_out";
#clock-cells = <1>;
#reset-cells = <1>;
};
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/starfive,jh7110-voutcrg.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: StarFive JH7110 Video-Output Clock and Reset Generator
maintainers:
- Xingyu Wu <xingyu.wu@starfivetech.com>
properties:
compatible:
const: starfive,jh7110-voutcrg
reg:
maxItems: 1
clocks:
items:
- description: Vout Top core
- description: Vout Top Ahb
- description: Vout Top Axi
- description: Vout Top HDMI MCLK
- description: I2STX0 BCLK
- description: external HDMI pixel
clock-names:
items:
- const: vout_src
- const: vout_top_ahb
- const: vout_top_axi
- const: vout_top_hdmitx0_mclk
- const: i2stx0_bclk
- const: hdmitx0_pixelclk
resets:
maxItems: 1
description: Vout Top core
'#clock-cells':
const: 1
description:
See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
'#reset-cells':
const: 1
description:
See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
power-domains:
maxItems: 1
description:
Vout domain power
required:
- compatible
- reg
- clocks
- clock-names
- resets
- '#clock-cells'
- '#reset-cells'
- power-domains
additionalProperties: false
examples:
- |
#include <dt-bindings/clock/starfive,jh7110-crg.h>
#include <dt-bindings/power/starfive,jh7110-pmu.h>
#include <dt-bindings/reset/starfive,jh7110-crg.h>
voutcrg: clock-controller@295C0000 {
compatible = "starfive,jh7110-voutcrg";
reg = <0x295C0000 0x10000>;
clocks = <&syscrg JH7110_SYSCLK_VOUT_SRC>,
<&syscrg JH7110_SYSCLK_VOUT_TOP_AHB>,
<&syscrg JH7110_SYSCLK_VOUT_TOP_AXI>,
<&syscrg JH7110_SYSCLK_VOUT_TOP_HDMITX0_MCLK>,
<&syscrg JH7110_SYSCLK_I2STX0_BCLK>,
<&hdmitx0_pixelclk>;
clock-names = "vout_src", "vout_top_ahb",
"vout_top_axi", "vout_top_hdmitx0_mclk",
"i2stx0_bclk", "hdmitx0_pixelclk";
resets = <&syscrg JH7110_SYSRST_VOUT_TOP_SRC>;
#clock-cells = <1>;
#reset-cells = <1>;
power-domains = <&pwrc JH7110_PD_VOUT>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: StarFive JH7110 SoC system controller
maintainers:
- William Qiu <william.qiu@starfivetech.com>
description:
The StarFive JH7110 SoC system controller provides register information such
as offset, mask and shift to configure related modules such as MMC and PCIe.
properties:
compatible:
oneOf:
- items:
- const: starfive,jh7110-sys-syscon
- const: syscon
- const: simple-mfd
- items:
- enum:
- starfive,jh7110-aon-syscon
- starfive,jh7110-stg-syscon
- const: syscon
reg:
maxItems: 1
clock-controller:
$ref: /schemas/clock/starfive,jh7110-pll.yaml#
type: object
"#power-domain-cells":
const: 1
required:
- compatible
- reg
allOf:
- if:
properties:
compatible:
contains:
const: starfive,jh7110-sys-syscon
then:
required:
- clock-controller
else:
properties:
clock-controller: false
- if:
properties:
compatible:
contains:
const: starfive,jh7110-aon-syscon
then:
required:
- "#power-domain-cells"
else:
properties:
"#power-domain-cells": false
additionalProperties: false
examples:
- |
syscon@10240000 {
compatible = "starfive,jh7110-stg-syscon", "syscon";
reg = <0x10240000 0x1000>;
};
syscon@13030000 {
compatible = "starfive,jh7110-sys-syscon", "syscon", "simple-mfd";
reg = <0x13030000 0x1000>;
clock-controller {
compatible = "starfive,jh7110-pll";
clocks = <&osc>;
#clock-cells = <1>;
};
};
syscon@17010000 {
compatible = "starfive,jh7110-aon-syscon", "syscon";
reg = <0x17010000 0x1000>;
#power-domain-cells = <1>;
};
...
......@@ -20282,6 +20282,12 @@ S: Supported
F: Documentation/devicetree/bindings/mmc/starfive*
F: drivers/mmc/host/dw_mmc-starfive.c
STARFIVE JH7110 SYSCON
M: William Qiu <william.qiu@starfivetech.com>
M: Xingyu Wu <xingyu.wu@starfivetech.com>
S: Supported
F: Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
STARFIVE JH7110 TDM DRIVER
M: Walker Chen <walker.chen@starfivetech.com>
S: Maintained
......@@ -20331,6 +20337,7 @@ STARFIVE SOC DRIVERS
M: Conor Dooley <conor@kernel.org>
S: Maintained
T: git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/
F: Documentation/devicetree/bindings/soc/starfive/
F: drivers/soc/starfive/
STARFIVE TRNG DRIVER
......
# SPDX-License-Identifier: GPL-2.0
# Enables support for device-tree overlays
DTC_FLAGS_jh7100-beaglev-starlight := -@
DTC_FLAGS_jh7100-starfive-visionfive-v1 := -@
DTC_FLAGS_jh7110-starfive-visionfive-2-v1.2a := -@
DTC_FLAGS_jh7110-starfive-visionfive-2-v1.3b := -@
dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-beaglev-starlight.dtb
dtb-$(CONFIG_ARCH_STARFIVE) += jh7100-starfive-visionfive-v1.dtb
......
......@@ -80,6 +80,31 @@ core1 {
};
};
thermal-zones {
cpu-thermal {
polling-delay-passive = <250>;
polling-delay = <15000>;
thermal-sensors = <&sfctemp>;
trips {
cpu_alert0 {
/* milliCelsius */
temperature = <75000>;
hysteresis = <2000>;
type = "passive";
};
cpu_crit {
/* milliCelsius */
temperature = <90000>;
hysteresis = <2000>;
type = "critical";
};
};
};
};
osc_sys: osc_sys {
compatible = "fixed-clock";
#clock-cells = <0>;
......@@ -248,5 +273,17 @@ watchdog@12480000 {
resets = <&rstgen JH7100_RSTN_WDTIMER_APB>,
<&rstgen JH7100_RSTN_WDT>;
};
sfctemp: temperature-sensor@124a0000 {
compatible = "starfive,jh7100-temp";
reg = <0x0 0x124a0000 0x0 0x10000>;
clocks = <&clkgen JH7100_CLK_TEMP_SENSE>,
<&clkgen JH7100_CLK_TEMP_APB>;
clock-names = "sense", "bus";
resets = <&rstgen JH7100_RSTN_TEMP_SENSE>,
<&rstgen JH7100_RSTN_TEMP_APB>;
reset-names = "sense", "bus";
#thermal-sensor-cells = <0>;
};
};
};
......@@ -11,3 +11,16 @@ / {
model = "StarFive VisionFive 2 v1.2A";
compatible = "starfive,visionfive-2-v1.2a", "starfive,jh7110";
};
&gmac1 {
phy-mode = "rmii";
assigned-clocks = <&syscrg JH7110_SYSCLK_GMAC1_TX>,
<&syscrg JH7110_SYSCLK_GMAC1_RX>;
assigned-clock-parents = <&syscrg JH7110_SYSCLK_GMAC1_RMII_RTX>,
<&syscrg JH7110_SYSCLK_GMAC1_RMII_RTX>;
};
&phy0 {
rx-internal-delay-ps = <1900>;
tx-internal-delay-ps = <1350>;
};
......@@ -11,3 +11,34 @@ / {
model = "StarFive VisionFive 2 v1.3B";
compatible = "starfive,visionfive-2-v1.3b", "starfive,jh7110";
};
&gmac0 {
starfive,tx-use-rgmii-clk;
assigned-clocks = <&aoncrg JH7110_AONCLK_GMAC0_TX>;
assigned-clock-parents = <&aoncrg JH7110_AONCLK_GMAC0_RMII_RTX>;
};
&gmac1 {
starfive,tx-use-rgmii-clk;
assigned-clocks = <&syscrg JH7110_SYSCLK_GMAC1_TX>;
assigned-clock-parents = <&syscrg JH7110_SYSCLK_GMAC1_RMII_RTX>;
};
&phy0 {
motorcomm,tx-clk-adj-enabled;
motorcomm,tx-clk-100-inverted;
motorcomm,tx-clk-1000-inverted;
motorcomm,rx-clk-drv-microamp = <3970>;
motorcomm,rx-data-drv-microamp = <2910>;
rx-internal-delay-ps = <1500>;
tx-internal-delay-ps = <1500>;
};
&phy1 {
motorcomm,tx-clk-adj-enabled;
motorcomm,tx-clk-100-inverted;
motorcomm,rx-clk-drv-microamp = <3970>;
motorcomm,rx-data-drv-microamp = <2910>;
rx-internal-delay-ps = <300>;
tx-internal-delay-ps = <0>;
};
......@@ -11,10 +11,14 @@
/ {
aliases {
ethernet0 = &gmac0;
ethernet1 = &gmac1;
i2c0 = &i2c0;
i2c2 = &i2c2;
i2c5 = &i2c5;
i2c6 = &i2c6;
mmc0 = &mmc0;
mmc1 = &mmc1;
serial0 = &uart0;
};
......@@ -38,6 +42,10 @@ gpio-restart {
};
};
&dvp_clk {
clock-frequency = <74250000>;
};
&gmac0_rgmii_rxin {
clock-frequency = <125000000>;
};
......@@ -54,6 +62,10 @@ &gmac1_rmii_refin {
clock-frequency = <50000000>;
};
&hdmitx0_pixelclk {
clock-frequency = <297000000>;
};
&i2srx_bclk_ext {
clock-frequency = <12288000>;
};
......@@ -86,6 +98,38 @@ &tdm_ext {
clock-frequency = <49152000>;
};
&gmac0 {
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy0: ethernet-phy@0 {
reg = <0>;
};
};
};
&gmac1 {
phy-handle = <&phy1>;
phy-mode = "rgmii-id";
status = "okay";
mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy1: ethernet-phy@1 {
reg = <0>;
};
};
};
&i2c0 {
clock-frequency = <100000>;
i2c-sda-hold-time-ns = <300>;
......@@ -123,12 +167,28 @@ axp15060: pmic@36 {
#interrupt-cells = <1>;
regulators {
vcc_3v3: dcdc1 {
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc_3v3";
};
vdd_cpu: dcdc2 {
regulator-always-on;
regulator-min-microvolt = <500000>;
regulator-max-microvolt = <1540000>;
regulator-name = "vdd-cpu";
};
emmc_vdd: aldo4 {
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-name = "emmc_vdd";
};
};
};
};
......@@ -143,6 +203,83 @@ &i2c6 {
status = "okay";
};
&mmc0 {
max-frequency = <100000000>;
bus-width = <8>;
cap-mmc-highspeed;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
non-removable;
cap-mmc-hw-reset;
post-power-on-delay-ms = <200>;
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
vmmc-supply = <&vcc_3v3>;
vqmmc-supply = <&emmc_vdd>;
status = "okay";
};
&mmc1 {
max-frequency = <100000000>;
bus-width = <4>;
no-sdio;
no-mmc;
broken-cd;
cap-sd-highspeed;
post-power-on-delay-ms = <200>;
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins>;
status = "okay";
};
&qspi {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
nor_flash: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
cdns,read-delay = <5>;
spi-max-frequency = <12000000>;
cdns,tshsl-ns = <1>;
cdns,tsd2d-ns = <1>;
cdns,tchsh-ns = <1>;
cdns,tslch-ns = <1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
spl@0 {
reg = <0x0 0x80000>;
};
uboot-env@f0000 {
reg = <0xf0000 0x10000>;
};
uboot@100000 {
reg = <0x100000 0x400000>;
};
reserved-data@600000 {
reg = <0x600000 0x1000000>;
};
};
};
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
status = "okay";
spi_dev0: spi@0 {
compatible = "rohm,dh2228fv";
reg = <0>;
spi-max-frequency = <10000000>;
};
};
&sysgpio {
i2c0_pins: i2c0-0 {
i2c-pins {
......@@ -200,6 +337,109 @@ GPOEN_SYS_I2C6_DATA,
};
};
mmc0_pins: mmc0-0 {
rst-pins {
pinmux = <GPIOMUX(62, GPOUT_SYS_SDIO0_RST,
GPOEN_ENABLE,
GPI_NONE)>;
bias-pull-up;
drive-strength = <12>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
mmc-pins {
pinmux = <PINMUX(64, 0)>,
<PINMUX(65, 0)>,
<PINMUX(66, 0)>,
<PINMUX(67, 0)>,
<PINMUX(68, 0)>,
<PINMUX(69, 0)>,
<PINMUX(70, 0)>,
<PINMUX(71, 0)>,
<PINMUX(72, 0)>,
<PINMUX(73, 0)>;
bias-pull-up;
drive-strength = <12>;
input-enable;
};
};
mmc1_pins: mmc1-0 {
clk-pins {
pinmux = <GPIOMUX(10, GPOUT_SYS_SDIO1_CLK,
GPOEN_ENABLE,
GPI_NONE)>;
bias-pull-up;
drive-strength = <12>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
mmc-pins {
pinmux = <GPIOMUX(9, GPOUT_SYS_SDIO1_CMD,
GPOEN_SYS_SDIO1_CMD,
GPI_SYS_SDIO1_CMD)>,
<GPIOMUX(11, GPOUT_SYS_SDIO1_DATA0,
GPOEN_SYS_SDIO1_DATA0,
GPI_SYS_SDIO1_DATA0)>,
<GPIOMUX(12, GPOUT_SYS_SDIO1_DATA1,
GPOEN_SYS_SDIO1_DATA1,
GPI_SYS_SDIO1_DATA1)>,
<GPIOMUX(7, GPOUT_SYS_SDIO1_DATA2,
GPOEN_SYS_SDIO1_DATA2,
GPI_SYS_SDIO1_DATA2)>,
<GPIOMUX(8, GPOUT_SYS_SDIO1_DATA3,
GPOEN_SYS_SDIO1_DATA3,
GPI_SYS_SDIO1_DATA3)>;
bias-pull-up;
drive-strength = <12>;
input-enable;
input-schmitt-enable;
slew-rate = <0>;
};
};
spi0_pins: spi0-0 {
mosi-pins {
pinmux = <GPIOMUX(52, GPOUT_SYS_SPI0_TXD,
GPOEN_ENABLE,
GPI_NONE)>;
bias-disable;
input-disable;
input-schmitt-disable;
};
miso-pins {
pinmux = <GPIOMUX(53, GPOUT_LOW,
GPOEN_DISABLE,
GPI_SYS_SPI0_RXD)>;
bias-pull-up;
input-enable;
input-schmitt-enable;
};
sck-pins {
pinmux = <GPIOMUX(48, GPOUT_SYS_SPI0_CLK,
GPOEN_ENABLE,
GPI_SYS_SPI0_CLK)>;
bias-disable;
input-disable;
input-schmitt-disable;
};
ss-pins {
pinmux = <GPIOMUX(48, GPOUT_SYS_SPI0_FSS,
GPOEN_ENABLE,
GPI_SYS_SPI0_FSS)>;
bias-disable;
input-disable;
input-schmitt-disable;
};
};
uart0_pins: uart0-0 {
tx-pins {
pinmux = <GPIOMUX(5, GPOUT_SYS_UART0_TX,
......@@ -223,6 +463,46 @@ GPOEN_DISABLE,
slew-rate = <0>;
};
};
tdm_pins: tdm-0 {
tx-pins {
pinmux = <GPIOMUX(44, GPOUT_SYS_TDM_TXD,
GPOEN_ENABLE,
GPI_NONE)>;
bias-pull-up;
drive-strength = <2>;
input-disable;
input-schmitt-disable;
slew-rate = <0>;
};
rx-pins {
pinmux = <GPIOMUX(61, GPOUT_HIGH,
GPOEN_DISABLE,
GPI_SYS_TDM_RXD)>;
input-enable;
};
sync-pins {
pinmux = <GPIOMUX(63, GPOUT_HIGH,
GPOEN_DISABLE,
GPI_SYS_TDM_SYNC)>;
input-enable;
};
pcmclk-pins {
pinmux = <GPIOMUX(38, GPOUT_HIGH,
GPOEN_DISABLE,
GPI_SYS_TDM_CLK)>;
input-enable;
};
};
};
&tdm {
pinctrl-names = "default";
pinctrl-0 = <&tdm_pins>;
status = "okay";
};
&uart0 {
......@@ -231,6 +511,10 @@ &uart0 {
status = "okay";
};
&usb0 {
dr_mode = "peripheral";
};
&U74_1 {
cpu-supply = <&vdd_cpu>;
};
......
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/*
* Copyright 2022 Emil Renner Berthing <kernel@esmil.dk>
* Copyright 2022 StarFive Technology Co., Ltd.
*/
#ifndef __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__
#define __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__
/* PLL clocks */
#define JH7110_PLLCLK_PLL0_OUT 0
#define JH7110_PLLCLK_PLL1_OUT 1
#define JH7110_PLLCLK_PLL2_OUT 2
#define JH7110_PLLCLK_END 3
/* SYSCRG clocks */
#define JH7110_SYSCLK_CPU_ROOT 0
#define JH7110_SYSCLK_CPU_CORE 1
......@@ -218,4 +225,77 @@
#define JH7110_AONCLK_END 14
/* STGCRG clocks */
#define JH7110_STGCLK_HIFI4_CLK_CORE 0
#define JH7110_STGCLK_USB0_APB 1
#define JH7110_STGCLK_USB0_UTMI_APB 2
#define JH7110_STGCLK_USB0_AXI 3
#define JH7110_STGCLK_USB0_LPM 4
#define JH7110_STGCLK_USB0_STB 5
#define JH7110_STGCLK_USB0_APP_125 6
#define JH7110_STGCLK_USB0_REFCLK 7
#define JH7110_STGCLK_PCIE0_AXI_MST0 8
#define JH7110_STGCLK_PCIE0_APB 9
#define JH7110_STGCLK_PCIE0_TL 10
#define JH7110_STGCLK_PCIE1_AXI_MST0 11
#define JH7110_STGCLK_PCIE1_APB 12
#define JH7110_STGCLK_PCIE1_TL 13
#define JH7110_STGCLK_PCIE_SLV_MAIN 14
#define JH7110_STGCLK_SEC_AHB 15
#define JH7110_STGCLK_SEC_MISC_AHB 16
#define JH7110_STGCLK_GRP0_MAIN 17
#define JH7110_STGCLK_GRP0_BUS 18
#define JH7110_STGCLK_GRP0_STG 19
#define JH7110_STGCLK_GRP1_MAIN 20
#define JH7110_STGCLK_GRP1_BUS 21
#define JH7110_STGCLK_GRP1_STG 22
#define JH7110_STGCLK_GRP1_HIFI 23
#define JH7110_STGCLK_E2_RTC 24
#define JH7110_STGCLK_E2_CORE 25
#define JH7110_STGCLK_E2_DBG 26
#define JH7110_STGCLK_DMA1P_AXI 27
#define JH7110_STGCLK_DMA1P_AHB 28
#define JH7110_STGCLK_END 29
/* ISPCRG clocks */
#define JH7110_ISPCLK_DOM4_APB_FUNC 0
#define JH7110_ISPCLK_MIPI_RX0_PXL 1
#define JH7110_ISPCLK_DVP_INV 2
#define JH7110_ISPCLK_M31DPHY_CFG_IN 3
#define JH7110_ISPCLK_M31DPHY_REF_IN 4
#define JH7110_ISPCLK_M31DPHY_TX_ESC_LAN0 5
#define JH7110_ISPCLK_VIN_APB 6
#define JH7110_ISPCLK_VIN_SYS 7
#define JH7110_ISPCLK_VIN_PIXEL_IF0 8
#define JH7110_ISPCLK_VIN_PIXEL_IF1 9
#define JH7110_ISPCLK_VIN_PIXEL_IF2 10
#define JH7110_ISPCLK_VIN_PIXEL_IF3 11
#define JH7110_ISPCLK_VIN_P_AXI_WR 12
#define JH7110_ISPCLK_ISPV2_TOP_WRAPPER_C 13
#define JH7110_ISPCLK_END 14
/* VOUTCRG clocks */
#define JH7110_VOUTCLK_APB 0
#define JH7110_VOUTCLK_DC8200_PIX 1
#define JH7110_VOUTCLK_DSI_SYS 2
#define JH7110_VOUTCLK_TX_ESC 3
#define JH7110_VOUTCLK_DC8200_AXI 4
#define JH7110_VOUTCLK_DC8200_CORE 5
#define JH7110_VOUTCLK_DC8200_AHB 6
#define JH7110_VOUTCLK_DC8200_PIX0 7
#define JH7110_VOUTCLK_DC8200_PIX1 8
#define JH7110_VOUTCLK_DOM_VOUT_TOP_LCD 9
#define JH7110_VOUTCLK_DSITX_APB 10
#define JH7110_VOUTCLK_DSITX_SYS 11
#define JH7110_VOUTCLK_DSITX_DPI 12
#define JH7110_VOUTCLK_DSITX_TXESC 13
#define JH7110_VOUTCLK_MIPITX_DPHY_TXESC 14
#define JH7110_VOUTCLK_HDMI_TX_MCLK 15
#define JH7110_VOUTCLK_HDMI_TX_BCLK 16
#define JH7110_VOUTCLK_HDMI_TX_SYS 17
#define JH7110_VOUTCLK_END 18
#endif /* __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__ */
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
/*
* Copyright (C) 2022 Emil Renner Berthing <kernel@esmil.dk>
* Copyright (C) 2022 StarFive Technology Co., Ltd.
*/
#ifndef __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__
......@@ -151,4 +152,63 @@
#define JH7110_AONRST_END 8
/* STGCRG resets */
#define JH7110_STGRST_SYSCON 0
#define JH7110_STGRST_HIFI4_CORE 1
#define JH7110_STGRST_HIFI4_AXI 2
#define JH7110_STGRST_SEC_AHB 3
#define JH7110_STGRST_E24_CORE 4
#define JH7110_STGRST_DMA1P_AXI 5
#define JH7110_STGRST_DMA1P_AHB 6
#define JH7110_STGRST_USB0_AXI 7
#define JH7110_STGRST_USB0_APB 8
#define JH7110_STGRST_USB0_UTMI_APB 9
#define JH7110_STGRST_USB0_PWRUP 10
#define JH7110_STGRST_PCIE0_AXI_MST0 11
#define JH7110_STGRST_PCIE0_AXI_SLV0 12
#define JH7110_STGRST_PCIE0_AXI_SLV 13
#define JH7110_STGRST_PCIE0_BRG 14
#define JH7110_STGRST_PCIE0_CORE 15
#define JH7110_STGRST_PCIE0_APB 16
#define JH7110_STGRST_PCIE1_AXI_MST0 17
#define JH7110_STGRST_PCIE1_AXI_SLV0 18
#define JH7110_STGRST_PCIE1_AXI_SLV 19
#define JH7110_STGRST_PCIE1_BRG 20
#define JH7110_STGRST_PCIE1_CORE 21
#define JH7110_STGRST_PCIE1_APB 22
#define JH7110_STGRST_END 23
/* ISPCRG resets */
#define JH7110_ISPRST_ISPV2_TOP_WRAPPER_P 0
#define JH7110_ISPRST_ISPV2_TOP_WRAPPER_C 1
#define JH7110_ISPRST_M31DPHY_HW 2
#define JH7110_ISPRST_M31DPHY_B09_AON 3
#define JH7110_ISPRST_VIN_APB 4
#define JH7110_ISPRST_VIN_PIXEL_IF0 5
#define JH7110_ISPRST_VIN_PIXEL_IF1 6
#define JH7110_ISPRST_VIN_PIXEL_IF2 7
#define JH7110_ISPRST_VIN_PIXEL_IF3 8
#define JH7110_ISPRST_VIN_SYS 9
#define JH7110_ISPRST_VIN_P_AXI_RD 10
#define JH7110_ISPRST_VIN_P_AXI_WR 11
#define JH7110_ISPRST_END 12
/* VOUTCRG resets */
#define JH7110_VOUTRST_DC8200_AXI 0
#define JH7110_VOUTRST_DC8200_AHB 1
#define JH7110_VOUTRST_DC8200_CORE 2
#define JH7110_VOUTRST_DSITX_DPI 3
#define JH7110_VOUTRST_DSITX_APB 4
#define JH7110_VOUTRST_DSITX_RXESC 5
#define JH7110_VOUTRST_DSITX_SYS 6
#define JH7110_VOUTRST_DSITX_TXBYTEHS 7
#define JH7110_VOUTRST_DSITX_TXESC 8
#define JH7110_VOUTRST_HDMI_TX_HDMI 9
#define JH7110_VOUTRST_MIPITX_DPHY_SYS 10
#define JH7110_VOUTRST_MIPITX_DPHY_TXBYTEHS 11
#define JH7110_VOUTRST_END 12
#endif /* __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment