123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 |
- From 2101233d71b74e33de33e4cc292c6a8cf5da9d42 Mon Sep 17 00:00:00 2001
- From: Cristian Ciocaltea <[email protected]>
- Date: Tue, 18 Oct 2022 00:05:41 +0300
- Subject: [PATCH 025/122] riscv: dts: starfive: Add common DT for JH7100 based
- boards
- In preparation for adding initial device tree support for the StarFive
- VisionFive board, which is similar with BeagleV Starlight, move most
- of the content from jh7100-beaglev-starlight.dts to a new file, to be
- shared between the two boards.
- Signed-off-by: Cristian Ciocaltea <[email protected]>
- Reviewed-by: Conor Dooley <[email protected]>
- Reviewed-by: Matthias Brugger <[email protected]>
- Signed-off-by: Conor Dooley <[email protected]>
- ---
- .../dts/starfive/jh7100-beaglev-starlight.dts | 153 +----------------
- .../boot/dts/starfive/jh7100-common.dtsi | 161 ++++++++++++++++++
- 2 files changed, 162 insertions(+), 152 deletions(-)
- create mode 100644 arch/riscv/boot/dts/starfive/jh7100-common.dtsi
- --- a/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts
- +++ b/arch/riscv/boot/dts/starfive/jh7100-beaglev-starlight.dts
- @@ -5,160 +5,9 @@
- */
-
- /dts-v1/;
- -#include "jh7100.dtsi"
- -#include <dt-bindings/gpio/gpio.h>
- -#include <dt-bindings/leds/common.h>
- -#include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h>
- +#include "jh7100-common.dtsi"
-
- / {
- model = "BeagleV Starlight Beta";
- compatible = "beagle,beaglev-starlight-jh7100-r0", "starfive,jh7100";
- -
- - aliases {
- - serial0 = &uart3;
- - };
- -
- - chosen {
- - stdout-path = "serial0:115200n8";
- - };
- -
- - cpus {
- - timebase-frequency = <6250000>;
- - };
- -
- - memory@80000000 {
- - device_type = "memory";
- - reg = <0x0 0x80000000 0x2 0x0>;
- - };
- -
- - leds {
- - compatible = "gpio-leds";
- -
- - led-ack {
- - gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
- - color = <LED_COLOR_ID_GREEN>;
- - function = LED_FUNCTION_HEARTBEAT;
- - linux,default-trigger = "heartbeat";
- - label = "ack";
- - };
- - };
- -};
- -
- -&gpio {
- - i2c0_pins: i2c0-0 {
- - i2c-pins {
- - pinmux = <GPIOMUX(62, GPO_LOW,
- - GPO_I2C0_PAD_SCK_OEN,
- - GPI_I2C0_PAD_SCK_IN)>,
- - <GPIOMUX(61, GPO_LOW,
- - GPO_I2C0_PAD_SDA_OEN,
- - GPI_I2C0_PAD_SDA_IN)>;
- - bias-disable; /* external pull-up */
- - input-enable;
- - input-schmitt-enable;
- - };
- - };
- -
- - i2c1_pins: i2c1-0 {
- - i2c-pins {
- - pinmux = <GPIOMUX(47, GPO_LOW,
- - GPO_I2C1_PAD_SCK_OEN,
- - GPI_I2C1_PAD_SCK_IN)>,
- - <GPIOMUX(48, GPO_LOW,
- - GPO_I2C1_PAD_SDA_OEN,
- - GPI_I2C1_PAD_SDA_IN)>;
- - bias-pull-up;
- - input-enable;
- - input-schmitt-enable;
- - };
- - };
- -
- - i2c2_pins: i2c2-0 {
- - i2c-pins {
- - pinmux = <GPIOMUX(60, GPO_LOW,
- - GPO_I2C2_PAD_SCK_OEN,
- - GPI_I2C2_PAD_SCK_IN)>,
- - <GPIOMUX(59, GPO_LOW,
- - GPO_I2C2_PAD_SDA_OEN,
- - GPI_I2C2_PAD_SDA_IN)>;
- - bias-disable; /* external pull-up */
- - input-enable;
- - input-schmitt-enable;
- - };
- - };
- -
- - uart3_pins: uart3-0 {
- - rx-pins {
- - pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
- - GPI_UART3_PAD_SIN)>;
- - bias-pull-up;
- - drive-strength = <14>;
- - input-enable;
- - input-schmitt-enable;
- - slew-rate = <0>;
- - };
- - tx-pins {
- - pinmux = <GPIOMUX(14, GPO_UART3_PAD_SOUT,
- - GPO_ENABLE, GPI_NONE)>;
- - bias-disable;
- - drive-strength = <35>;
- - input-disable;
- - input-schmitt-disable;
- - slew-rate = <0>;
- - };
- - };
- -};
- -
- -&i2c0 {
- - clock-frequency = <100000>;
- - i2c-sda-hold-time-ns = <300>;
- - i2c-sda-falling-time-ns = <500>;
- - i2c-scl-falling-time-ns = <500>;
- - pinctrl-names = "default";
- - pinctrl-0 = <&i2c0_pins>;
- - status = "okay";
- -
- - pmic@5e {
- - compatible = "ti,tps65086";
- - reg = <0x5e>;
- - gpio-controller;
- - #gpio-cells = <2>;
- -
- - regulators {
- - };
- - };
- -};
- -
- -&i2c1 {
- - clock-frequency = <400000>;
- - i2c-sda-hold-time-ns = <300>;
- - i2c-sda-falling-time-ns = <100>;
- - i2c-scl-falling-time-ns = <100>;
- - pinctrl-names = "default";
- - pinctrl-0 = <&i2c1_pins>;
- - status = "okay";
- -};
- -
- -&i2c2 {
- - clock-frequency = <100000>;
- - i2c-sda-hold-time-ns = <300>;
- - i2c-sda-falling-time-ns = <500>;
- - i2c-scl-falling-time-ns = <500>;
- - pinctrl-names = "default";
- - pinctrl-0 = <&i2c2_pins>;
- - status = "okay";
- -};
- -
- -&osc_sys {
- - clock-frequency = <25000000>;
- -};
- -
- -&osc_aud {
- - clock-frequency = <27000000>;
- -};
- -
- -&uart3 {
- - pinctrl-names = "default";
- - pinctrl-0 = <&uart3_pins>;
- - status = "okay";
- };
- --- /dev/null
- +++ b/arch/riscv/boot/dts/starfive/jh7100-common.dtsi
- @@ -0,0 +1,161 @@
- +// SPDX-License-Identifier: GPL-2.0 OR MIT
- +/*
- + * Copyright (C) 2021 StarFive Technology Co., Ltd.
- + * Copyright (C) 2021 Emil Renner Berthing <[email protected]>
- + */
- +
- +/dts-v1/;
- +#include "jh7100.dtsi"
- +#include <dt-bindings/gpio/gpio.h>
- +#include <dt-bindings/leds/common.h>
- +#include <dt-bindings/pinctrl/pinctrl-starfive-jh7100.h>
- +
- +/ {
- + aliases {
- + serial0 = &uart3;
- + };
- +
- + chosen {
- + stdout-path = "serial0:115200n8";
- + };
- +
- + cpus {
- + timebase-frequency = <6250000>;
- + };
- +
- + memory@80000000 {
- + device_type = "memory";
- + reg = <0x0 0x80000000 0x2 0x0>;
- + };
- +
- + leds {
- + compatible = "gpio-leds";
- +
- + led-ack {
- + gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
- + color = <LED_COLOR_ID_GREEN>;
- + function = LED_FUNCTION_HEARTBEAT;
- + linux,default-trigger = "heartbeat";
- + label = "ack";
- + };
- + };
- +};
- +
- +&gpio {
- + i2c0_pins: i2c0-0 {
- + i2c-pins {
- + pinmux = <GPIOMUX(62, GPO_LOW,
- + GPO_I2C0_PAD_SCK_OEN,
- + GPI_I2C0_PAD_SCK_IN)>,
- + <GPIOMUX(61, GPO_LOW,
- + GPO_I2C0_PAD_SDA_OEN,
- + GPI_I2C0_PAD_SDA_IN)>;
- + bias-disable; /* external pull-up */
- + input-enable;
- + input-schmitt-enable;
- + };
- + };
- +
- + i2c1_pins: i2c1-0 {
- + i2c-pins {
- + pinmux = <GPIOMUX(47, GPO_LOW,
- + GPO_I2C1_PAD_SCK_OEN,
- + GPI_I2C1_PAD_SCK_IN)>,
- + <GPIOMUX(48, GPO_LOW,
- + GPO_I2C1_PAD_SDA_OEN,
- + GPI_I2C1_PAD_SDA_IN)>;
- + bias-pull-up;
- + input-enable;
- + input-schmitt-enable;
- + };
- + };
- +
- + i2c2_pins: i2c2-0 {
- + i2c-pins {
- + pinmux = <GPIOMUX(60, GPO_LOW,
- + GPO_I2C2_PAD_SCK_OEN,
- + GPI_I2C2_PAD_SCK_IN)>,
- + <GPIOMUX(59, GPO_LOW,
- + GPO_I2C2_PAD_SDA_OEN,
- + GPI_I2C2_PAD_SDA_IN)>;
- + bias-disable; /* external pull-up */
- + input-enable;
- + input-schmitt-enable;
- + };
- + };
- +
- + uart3_pins: uart3-0 {
- + rx-pins {
- + pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
- + GPI_UART3_PAD_SIN)>;
- + bias-pull-up;
- + drive-strength = <14>;
- + input-enable;
- + input-schmitt-enable;
- + slew-rate = <0>;
- + };
- + tx-pins {
- + pinmux = <GPIOMUX(14, GPO_UART3_PAD_SOUT,
- + GPO_ENABLE, GPI_NONE)>;
- + bias-disable;
- + drive-strength = <35>;
- + input-disable;
- + input-schmitt-disable;
- + slew-rate = <0>;
- + };
- + };
- +};
- +
- +&i2c0 {
- + clock-frequency = <100000>;
- + i2c-sda-hold-time-ns = <300>;
- + i2c-sda-falling-time-ns = <500>;
- + i2c-scl-falling-time-ns = <500>;
- + pinctrl-names = "default";
- + pinctrl-0 = <&i2c0_pins>;
- + status = "okay";
- +
- + pmic@5e {
- + compatible = "ti,tps65086";
- + reg = <0x5e>;
- + gpio-controller;
- + #gpio-cells = <2>;
- +
- + regulators {
- + };
- + };
- +};
- +
- +&i2c1 {
- + clock-frequency = <400000>;
- + i2c-sda-hold-time-ns = <300>;
- + i2c-sda-falling-time-ns = <100>;
- + i2c-scl-falling-time-ns = <100>;
- + pinctrl-names = "default";
- + pinctrl-0 = <&i2c1_pins>;
- + status = "okay";
- +};
- +
- +&i2c2 {
- + clock-frequency = <100000>;
- + i2c-sda-hold-time-ns = <300>;
- + i2c-sda-falling-time-ns = <500>;
- + i2c-scl-falling-time-ns = <500>;
- + pinctrl-names = "default";
- + pinctrl-0 = <&i2c2_pins>;
- + status = "okay";
- +};
- +
- +&osc_sys {
- + clock-frequency = <25000000>;
- +};
- +
- +&osc_aud {
- + clock-frequency = <27000000>;
- +};
- +
- +&uart3 {
- + pinctrl-names = "default";
- + pinctrl-0 = <&uart3_pins>;
- + status = "okay";
- +};
|