mirror of https://gitee.com/openkylin/linux.git
arm64: dts: rockchip: add i2c nodes for rk3399
We've got 9 (count em!) i2c controllers on rk3399, some of which are in the PMU power domain and some of which are normal peripherals. Add them all to the main rk3399 dtsi file so future patches can turn them on in the board dts files. Note: by default we try to set the i2c clock rate to 200 MHz so that we can achieve good i2c functional clock rates. 200 MHz gives us the ability to make very close to 100 kHz / 400 kHz / 1 MHz rates. If boards want to tune clock rates further they can always override. Possibly boards could want to tune this if: - they wanted to save an infinitesimal amount of power and they knew their i2c bus was slow anyway. Since we gate the functional clock when the i2c bus is not active, power savings would only be while i2c transfers were happening and probably won't be very big anyway. - they wanted to eek out a bit more speed by carefully tuning the source clock to make divisions work out perfectly, accounting for the rise / fall time measured on an actual board. Note also that we still request 200 MHz for the PMU i2c busses even though we expect that we won't make that exactly (currently PPLL is 676 MHz which gives us 169 MHz). Signed-off-by: David Wu <david.wu@rock-chips.com> Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> [dianders: wrote desc; put in assigned-clocks; reordered nodes] Signed-off-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
This commit is contained in:
parent
95c27ba7bd
commit
69e5a8fe8c
|
@ -55,6 +55,15 @@ / {
|
|||
#size-cells = <2>;
|
||||
|
||||
aliases {
|
||||
i2c0 = &i2c0;
|
||||
i2c1 = &i2c1;
|
||||
i2c2 = &i2c2;
|
||||
i2c3 = &i2c3;
|
||||
i2c4 = &i2c4;
|
||||
i2c5 = &i2c5;
|
||||
i2c6 = &i2c6;
|
||||
i2c7 = &i2c7;
|
||||
i2c8 = &i2c8;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
serial2 = &uart2;
|
||||
|
@ -286,6 +295,96 @@ its: interrupt-controller@fee20000 {
|
|||
};
|
||||
};
|
||||
|
||||
i2c1: i2c@ff110000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff110000 0x0 0x1000>;
|
||||
assigned-clocks = <&cru SCLK_I2C1>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&cru SCLK_I2C1>, <&cru PCLK_I2C1>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c2: i2c@ff120000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff120000 0x0 0x1000>;
|
||||
assigned-clocks = <&cru SCLK_I2C2>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&cru SCLK_I2C2>, <&cru PCLK_I2C2>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c3: i2c@ff130000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff130000 0x0 0x1000>;
|
||||
assigned-clocks = <&cru SCLK_I2C3>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&cru SCLK_I2C3>, <&cru PCLK_I2C3>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c3_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c5: i2c@ff140000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff140000 0x0 0x1000>;
|
||||
assigned-clocks = <&cru SCLK_I2C5>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&cru SCLK_I2C5>, <&cru PCLK_I2C5>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c5_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c6: i2c@ff150000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff150000 0x0 0x1000>;
|
||||
assigned-clocks = <&cru SCLK_I2C6>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&cru SCLK_I2C6>, <&cru PCLK_I2C6>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c6_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c7: i2c@ff160000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff160000 0x0 0x1000>;
|
||||
assigned-clocks = <&cru SCLK_I2C7>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&cru SCLK_I2C7>, <&cru PCLK_I2C7>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c7_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart0: serial@ff180000 {
|
||||
compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart";
|
||||
reg = <0x0 0xff180000 0x0 0x100>;
|
||||
|
@ -530,6 +629,51 @@ uart4: serial@ff370000 {
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c0: i2c@ff3c0000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff3c0000 0x0 0x1000>;
|
||||
assigned-clocks = <&pmucru SCLK_I2C0_PMU>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&pmucru SCLK_I2C0_PMU>, <&pmucru PCLK_I2C0_PMU>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c4: i2c@ff3d0000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff3d0000 0x0 0x1000>;
|
||||
assigned-clocks = <&pmucru SCLK_I2C4_PMU>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&pmucru SCLK_I2C4_PMU>, <&pmucru PCLK_I2C4_PMU>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c4_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c8: i2c@ff3e0000 {
|
||||
compatible = "rockchip,rk3399-i2c";
|
||||
reg = <0x0 0xff3e0000 0x0 0x1000>;
|
||||
assigned-clocks = <&pmucru SCLK_I2C8_PMU>;
|
||||
assigned-clock-rates = <200000000>;
|
||||
clocks = <&pmucru SCLK_I2C8_PMU>, <&pmucru PCLK_I2C8_PMU>;
|
||||
clock-names = "i2c", "pclk";
|
||||
interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c8_xfer>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pwm0: pwm@ff420000 {
|
||||
compatible = "rockchip,rk3399-pwm", "rockchip,rk3288-pwm";
|
||||
reg = <0x0 0xff420000 0x0 0x10>;
|
||||
|
|
Loading…
Reference in New Issue