Path: blob/main/sys/dev/clk/rockchip/rk3399_pmucru.c
39536 views
/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2018 Emmanuel Vadot <[email protected]>4* Copyright (c) 2018 Val Packett <[email protected]>5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR16* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES17* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.18* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,19* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,20* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;21* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED22* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,23* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*/2728#include <sys/param.h>29#include <sys/systm.h>30#include <sys/bus.h>31#include <sys/rman.h>32#include <sys/kernel.h>33#include <sys/module.h>34#include <machine/bus.h>3536#include <dev/fdt/simplebus.h>3738#include <dev/ofw/ofw_bus.h>39#include <dev/ofw/ofw_bus_subr.h>4041#include <dev/clk/clk_div.h>42#include <dev/clk/clk_fixed.h>43#include <dev/clk/clk_mux.h>4445#include <dev/clk/rockchip/rk_cru.h>4647#define CRU_CLKSEL_CON(x) (0x80 + (x) * 0x4)48#define CRU_CLKGATE_CON(x) (0x100 + (x) * 0x4)4950#define PLL_PPLL 151#define SCLK_32K_SUSPEND_PMU 252#define SCLK_SPI3_PMU 353#define SCLK_TIMER12_PMU 454#define SCLK_TIMER13_PMU 555#define SCLK_UART4_PMU 656#define SCLK_PVTM_PMU 757#define SCLK_WIFI_PMU 858#define SCLK_I2C0_PMU 959#define SCLK_I2C4_PMU 1060#define SCLK_I2C8_PMU 116162#define PCLK_PMU_SRC 1963#define PCLK_PMU 2064#define PCLK_PMUGRF_PMU 2165#define PCLK_INTMEM1_PMU 2266#define PCLK_GPIO0_PMU 2367#define PCLK_GPIO1_PMU 2468#define PCLK_SGRF_PMU 2569#define PCLK_NOC_PMU 2670#define PCLK_I2C0_PMU 2771#define PCLK_I2C4_PMU 2872#define PCLK_I2C8_PMU 2973#define PCLK_RKPWM_PMU 3074#define PCLK_SPI3_PMU 3175#define PCLK_TIMER_PMU 3276#define PCLK_MAILBOX_PMU 3377#define PCLK_UART4_PMU 3478#define PCLK_WDT_M0_PMU 357980#define FCLK_CM0S_SRC_PMU 4481#define FCLK_CM0S_PMU 4582#define SCLK_CM0S_PMU 4683#define HCLK_CM0S_PMU 4784#define DCLK_CM0S_PMU 4885#define PCLK_INTR_ARB_PMU 4986#define HCLK_NOC_PMU 508788/* GATES */89static struct rk_cru_gate rk3399_pmu_gates[] = {90/* PMUCRU_CLKGATE_CON0 */91/* 0 Reserved */92/* 1 fclk_cm0s_pmu_ppll_src_en */93GATE(SCLK_SPI3_PMU, "clk_spi3_pmu", "clk_spi3_c", 0, 2),94GATE(SCLK_TIMER12_PMU, "clk_timer0_pmu", "clk_timer_sel", 0, 3),95GATE(SCLK_TIMER13_PMU, "clk_timer1_pmu", "clk_timer_sel", 0, 4),96GATE(SCLK_UART4_PMU, "clk_uart4_pmu", "clk_uart4_sel", 0, 5),97GATE(0, "clk_uart4_frac", "clk_uart4_frac_frac", 0, 6),98/* 7 clk_pvtm_pmu_en */99GATE(SCLK_WIFI_PMU, "clk_wifi_pmu", "clk_wifi_sel", 0, 8),100GATE(SCLK_I2C0_PMU, "clk_i2c0_src", "clk_i2c0_div", 0, 9),101GATE(SCLK_I2C4_PMU, "clk_i2c4_src", "clk_i2c4_div", 0, 10),102GATE(SCLK_I2C8_PMU, "clk_i2c8_src", "clk_i2c8_div", 0, 11),103/* 12:15 Reserved */104105/* PMUCRU_CLKGATE_CON1 */106GATE(PCLK_PMU, "pclk_pmu", "pclk_pmu_src", 1, 0),107/* 1 pclk_pmugrf_en */108/* 2 pclk_intmem1_en */109GATE(PCLK_GPIO0_PMU, "pclk_gpio0_pmu", "pclk_pmu_src", 1, 3),110GATE(PCLK_GPIO1_PMU, "pclk_gpio1_pmu", "pclk_pmu_src", 1, 4),111/* 5 pclk_sgrf_en */112/* 6 pclk_noc_pmu_en */113GATE(PCLK_I2C0_PMU, "pclk_i2c0_pmu", "pclk_pmu_src", 1, 7),114GATE(PCLK_I2C4_PMU, "pclk_i2c4_pmu", "pclk_pmu_src", 1, 8),115GATE(PCLK_I2C8_PMU, "pclk_i2c8_pmu", "pclk_pmu_src", 1, 9),116GATE(PCLK_RKPWM_PMU, "pclk_rkpwm_pmu", "pclk_pmu_src", 1, 10),117GATE(PCLK_SPI3_PMU, "pclk_spi3_pmu", "pclk_pmu_src", 1, 11),118GATE(PCLK_TIMER_PMU, "pclk_timer_pmu", "pclk_pmu_src", 1, 12),119GATE(PCLK_MAILBOX_PMU, "pclk_mailbox_pmu", "pclk_pmu_src", 1, 13),120/* 14 pclk_uartm0_en */121/* 15 pclk_wdt_m0_pmu_en */122123/* PMUCRU_CLKGATE_CON2 */124/* 0 fclk_cm0s_en */125/* 1 sclk_cm0s_en */126/* 2 hclk_cm0s_en */127/* 3 dclk_cm0s_en */128/* 4 Reserved */129/* 5 hclk_noc_pmu_en */130/* 6:15 Reserved */131};132133/*134* PLLs135*/136137static struct rk_clk_pll_rate rk3399_pll_rates[] = {138{139.freq = 2208000000,140.refdiv = 1,141.fbdiv = 92,142.postdiv1 = 1,143.postdiv2 = 1,144.dsmpd = 1,145},146{147.freq = 2184000000,148.refdiv = 1,149.fbdiv = 91,150.postdiv1 = 1,151.postdiv2 = 1,152.dsmpd = 1,153},154{155.freq = 2160000000,156.refdiv = 1,157.fbdiv = 90,158.postdiv1 = 1,159.postdiv2 = 1,160.dsmpd = 1,161},162{163.freq = 2136000000,164.refdiv = 1,165.fbdiv = 89,166.postdiv1 = 1,167.postdiv2 = 1,168.dsmpd = 1,169},170{171.freq = 2112000000,172.refdiv = 1,173.fbdiv = 88,174.postdiv1 = 1,175.postdiv2 = 1,176.dsmpd = 1,177},178{179.freq = 2088000000,180.refdiv = 1,181.fbdiv = 87,182.postdiv1 = 1,183.postdiv2 = 1,184.dsmpd = 1,185},186{187.freq = 2064000000,188.refdiv = 1,189.fbdiv = 86,190.postdiv1 = 1,191.postdiv2 = 1,192.dsmpd = 1,193},194{195.freq = 2040000000,196.refdiv = 1,197.fbdiv = 85,198.postdiv1 = 1,199.postdiv2 = 1,200.dsmpd = 1,201},202{203.freq = 2016000000,204.refdiv = 1,205.fbdiv = 84,206.postdiv1 = 1,207.postdiv2 = 1,208.dsmpd = 1,209},210{211.freq = 1992000000,212.refdiv = 1,213.fbdiv = 83,214.postdiv1 = 1,215.postdiv2 = 1,216.dsmpd = 1,217},218{219.freq = 1968000000,220.refdiv = 1,221.fbdiv = 82,222.postdiv1 = 1,223.postdiv2 = 1,224.dsmpd = 1,225},226{227.freq = 1944000000,228.refdiv = 1,229.fbdiv = 81,230.postdiv1 = 1,231.postdiv2 = 1,232.dsmpd = 1,233},234{235.freq = 1920000000,236.refdiv = 1,237.fbdiv = 80,238.postdiv1 = 1,239.postdiv2 = 1,240.dsmpd = 1,241},242{243.freq = 1896000000,244.refdiv = 1,245.fbdiv = 79,246.postdiv1 = 1,247.postdiv2 = 1,248.dsmpd = 1,249},250{251.freq = 1872000000,252.refdiv = 1,253.fbdiv = 78,254.postdiv1 = 1,255.postdiv2 = 1,256.dsmpd = 1,257},258{259.freq = 1848000000,260.refdiv = 1,261.fbdiv = 77,262.postdiv1 = 1,263.postdiv2 = 1,264.dsmpd = 1,265},266{267.freq = 1824000000,268.refdiv = 1,269.fbdiv = 76,270.postdiv1 = 1,271.postdiv2 = 1,272.dsmpd = 1,273},274{275.freq = 1800000000,276.refdiv = 1,277.fbdiv = 75,278.postdiv1 = 1,279.postdiv2 = 1,280.dsmpd = 1,281},282{283.freq = 1776000000,284.refdiv = 1,285.fbdiv = 74,286.postdiv1 = 1,287.postdiv2 = 1,288.dsmpd = 1,289},290{291.freq = 1752000000,292.refdiv = 1,293.fbdiv = 73,294.postdiv1 = 1,295.postdiv2 = 1,296.dsmpd = 1,297},298{299.freq = 1728000000,300.refdiv = 1,301.fbdiv = 72,302.postdiv1 = 1,303.postdiv2 = 1,304.dsmpd = 1,305},306{307.freq = 1704000000,308.refdiv = 1,309.fbdiv = 71,310.postdiv1 = 1,311.postdiv2 = 1,312.dsmpd = 1,313},314{315.freq = 1680000000,316.refdiv = 1,317.fbdiv = 70,318.postdiv1 = 1,319.postdiv2 = 1,320.dsmpd = 1,321},322{323.freq = 1656000000,324.refdiv = 1,325.fbdiv = 69,326.postdiv1 = 1,327.postdiv2 = 1,328.dsmpd = 1,329},330{331.freq = 1632000000,332.refdiv = 1,333.fbdiv = 68,334.postdiv1 = 1,335.postdiv2 = 1,336.dsmpd = 1,337},338{339.freq = 1608000000,340.refdiv = 1,341.fbdiv = 67,342.postdiv1 = 1,343.postdiv2 = 1,344.dsmpd = 1,345},346{347.freq = 1600000000,348.refdiv = 3,349.fbdiv = 200,350.postdiv1 = 1,351.postdiv2 = 1,352.dsmpd = 1,353},354{355.freq = 1584000000,356.refdiv = 1,357.fbdiv = 66,358.postdiv1 = 1,359.postdiv2 = 1,360.dsmpd = 1,361},362{363.freq = 1560000000,364.refdiv = 1,365.fbdiv = 65,366.postdiv1 = 1,367.postdiv2 = 1,368.dsmpd = 1,369},370{371.freq = 1536000000,372.refdiv = 1,373.fbdiv = 64,374.postdiv1 = 1,375.postdiv2 = 1,376.dsmpd = 1,377},378{379.freq = 1512000000,380.refdiv = 1,381.fbdiv = 63,382.postdiv1 = 1,383.postdiv2 = 1,384.dsmpd = 1,385},386{387.freq = 1488000000,388.refdiv = 1,389.fbdiv = 62,390.postdiv1 = 1,391.postdiv2 = 1,392.dsmpd = 1,393},394{395.freq = 1464000000,396.refdiv = 1,397.fbdiv = 61,398.postdiv1 = 1,399.postdiv2 = 1,400.dsmpd = 1,401},402{403.freq = 1440000000,404.refdiv = 1,405.fbdiv = 60,406.postdiv1 = 1,407.postdiv2 = 1,408.dsmpd = 1,409},410{411.freq = 1416000000,412.refdiv = 1,413.fbdiv = 59,414.postdiv1 = 1,415.postdiv2 = 1,416.dsmpd = 1,417},418{419.freq = 1392000000,420.refdiv = 1,421.fbdiv = 58,422.postdiv1 = 1,423.postdiv2 = 1,424.dsmpd = 1,425},426{427.freq = 1368000000,428.refdiv = 1,429.fbdiv = 57,430.postdiv1 = 1,431.postdiv2 = 1,432.dsmpd = 1,433},434{435.freq = 1344000000,436.refdiv = 1,437.fbdiv = 56,438.postdiv1 = 1,439.postdiv2 = 1,440.dsmpd = 1,441},442{443.freq = 1320000000,444.refdiv = 1,445.fbdiv = 55,446.postdiv1 = 1,447.postdiv2 = 1,448.dsmpd = 1,449},450{451.freq = 1296000000,452.refdiv = 1,453.fbdiv = 54,454.postdiv1 = 1,455.postdiv2 = 1,456.dsmpd = 1,457},458{459.freq = 1272000000,460.refdiv = 1,461.fbdiv = 53,462.postdiv1 = 1,463.postdiv2 = 1,464.dsmpd = 1,465},466{467.freq = 1248000000,468.refdiv = 1,469.fbdiv = 52,470.postdiv1 = 1,471.postdiv2 = 1,472.dsmpd = 1,473},474{475.freq = 1200000000,476.refdiv = 1,477.fbdiv = 50,478.postdiv1 = 1,479.postdiv2 = 1,480.dsmpd = 1,481},482{483.freq = 1188000000,484.refdiv = 2,485.fbdiv = 99,486.postdiv1 = 1,487.postdiv2 = 1,488.dsmpd = 1,489},490{491.freq = 1104000000,492.refdiv = 1,493.fbdiv = 46,494.postdiv1 = 1,495.postdiv2 = 1,496.dsmpd = 1,497},498{499.freq = 1100000000,500.refdiv = 12,501.fbdiv = 550,502.postdiv1 = 1,503.postdiv2 = 1,504.dsmpd = 1,505},506{507.freq = 1008000000,508.refdiv = 1,509.fbdiv = 84,510.postdiv1 = 2,511.postdiv2 = 1,512.dsmpd = 1,513},514{515.freq = 1000000000,516.refdiv = 1,517.fbdiv = 125,518.postdiv1 = 3,519.postdiv2 = 1,520.dsmpd = 1,521},522{523.freq = 984000000,524.refdiv = 1,525.fbdiv = 82,526.postdiv1 = 2,527.postdiv2 = 1,528.dsmpd = 1,529},530{531.freq = 960000000,532.refdiv = 1,533.fbdiv = 80,534.postdiv1 = 2,535.postdiv2 = 1,536.dsmpd = 1,537},538{539.freq = 936000000,540.refdiv = 1,541.fbdiv = 78,542.postdiv1 = 2,543.postdiv2 = 1,544.dsmpd = 1,545},546{547.freq = 912000000,548.refdiv = 1,549.fbdiv = 76,550.postdiv1 = 2,551.postdiv2 = 1,552.dsmpd = 1,553},554{555.freq = 900000000,556.refdiv = 4,557.fbdiv = 300,558.postdiv1 = 2,559.postdiv2 = 1,560.dsmpd = 1,561},562{563.freq = 888000000,564.refdiv = 1,565.fbdiv = 74,566.postdiv1 = 2,567.postdiv2 = 1,568.dsmpd = 1,569},570{571.freq = 864000000,572.refdiv = 1,573.fbdiv = 72,574.postdiv1 = 2,575.postdiv2 = 1,576.dsmpd = 1,577},578{579.freq = 840000000,580.refdiv = 1,581.fbdiv = 70,582.postdiv1 = 2,583.postdiv2 = 1,584.dsmpd = 1,585},586{587.freq = 816000000,588.refdiv = 1,589.fbdiv = 68,590.postdiv1 = 2,591.postdiv2 = 1,592.dsmpd = 1,593},594{595.freq = 800000000,596.refdiv = 1,597.fbdiv = 100,598.postdiv1 = 3,599.postdiv2 = 1,600.dsmpd = 1,601},602{603.freq = 700000000,604.refdiv = 6,605.fbdiv = 350,606.postdiv1 = 2,607.postdiv2 = 1,608.dsmpd = 1,609},610{611.freq = 696000000,612.refdiv = 1,613.fbdiv = 58,614.postdiv1 = 2,615.postdiv2 = 1,616.dsmpd = 1,617},618{619.freq = 676000000,620.refdiv = 3,621.fbdiv = 169,622.postdiv1 = 2,623.postdiv2 = 1,624.dsmpd = 1,625},626{627.freq = 600000000,628.refdiv = 1,629.fbdiv = 75,630.postdiv1 = 3,631.postdiv2 = 1,632.dsmpd = 1,633},634{635.freq = 594000000,636.refdiv = 1,637.fbdiv = 99,638.postdiv1 = 4,639.postdiv2 = 1,640.dsmpd = 1,641},642{643.freq = 533250000,644.refdiv = 8,645.fbdiv = 711,646.postdiv1 = 4,647.postdiv2 = 1,648.dsmpd = 1,649},650{651.freq = 504000000,652.refdiv = 1,653.fbdiv = 63,654.postdiv1 = 3,655.postdiv2 = 1,656.dsmpd = 1,657},658{659.freq = 500000000,660.refdiv = 6,661.fbdiv = 250,662.postdiv1 = 2,663.postdiv2 = 1,664.dsmpd = 1,665},666{667.freq = 408000000,668.refdiv = 1,669.fbdiv = 68,670.postdiv1 = 2,671.postdiv2 = 2,672.dsmpd = 1,673},674{675.freq = 312000000,676.refdiv = 1,677.fbdiv = 52,678.postdiv1 = 2,679.postdiv2 = 2,680.dsmpd = 1,681},682{683.freq = 297000000,684.refdiv = 1,685.fbdiv = 99,686.postdiv1 = 4,687.postdiv2 = 2,688.dsmpd = 1,689},690{691.freq = 216000000,692.refdiv = 1,693.fbdiv = 72,694.postdiv1 = 4,695.postdiv2 = 2,696.dsmpd = 1,697},698{699.freq = 148500000,700.refdiv = 1,701.fbdiv = 99,702.postdiv1 = 4,703.postdiv2 = 4,704.dsmpd = 1,705},706{707.freq = 106500000,708.refdiv = 1,709.fbdiv = 71,710.postdiv1 = 4,711.postdiv2 = 4,712.dsmpd = 1,713},714{715.freq = 96000000,716.refdiv = 1,717.fbdiv = 64,718.postdiv1 = 4,719.postdiv2 = 4,720.dsmpd = 1,721},722{723.freq = 74250000,724.refdiv = 2,725.fbdiv = 99,726.postdiv1 = 4,727.postdiv2 = 4,728.dsmpd = 1,729},730{731.freq = 65000000,732.refdiv = 1,733.fbdiv = 65,734.postdiv1 = 6,735.postdiv2 = 4,736.dsmpd = 1,737},738{739.freq = 54000000,740.refdiv = 1,741.fbdiv = 54,742.postdiv1 = 6,743.postdiv2 = 4,744.dsmpd = 1,745},746{747.freq = 27000000,748.refdiv = 1,749.fbdiv = 27,750.postdiv1 = 6,751.postdiv2 = 4,752.dsmpd = 1,753},754{},755};756757PLIST(xin24m_p) = {"xin24m"};758PLIST(xin24m_xin32k_p) = {"xin24m", "xin32k"};759PLIST(xin24m_ppll_p) = {"xin24m", "ppll"};760PLIST(uart4_p) = {"clk_uart4_c", "clk_uart4_frac", "xin24m"};761PLIST(wifi_p) = {"clk_wifi_c", "clk_wifi_frac"};762763static struct rk_clk_pll_def ppll = {764.clkdef = {765.id = PLL_PPLL,766.name = "ppll",767.parent_names = xin24m_p,768.parent_cnt = nitems(xin24m_p),769},770.base_offset = 0x00,771772.rates = rk3399_pll_rates,773};774775static struct rk_clk rk3399_pmu_clks[] = {776/* Linked clocks */777LINK("xin32k"),778779{780.type = RK3399_CLK_PLL,781.clk.pll = &ppll782},783784/* PMUCRU_CLKSEL_CON0 */785CDIV(PCLK_PMU_SRC, "pclk_pmu_src", "ppll", 0, 0, 0, 5),786/* 5:7 Reserved */787/* 8:12 cm0s_div */788/* 13:14 Reserved */789/* 15 cm0s_clk_pll_sel */790791/* PMUCRU_CLKSEL_CON1 */792COMP(0, "clk_spi3_c", xin24m_ppll_p, 0, 1, 0, 7, 7, 1),793COMP(0, "clk_wifi_c", xin24m_ppll_p, 0, 1, 8, 5, 13, 1),794MUX(0, "clk_wifi_sel", wifi_p, 0, 1, 14, 1),795MUX(0, "clk_timer_sel", xin24m_xin32k_p, 0, 1, 15, 1),796797/* PMUCRU_CLKSEL_CON2 */798CDIV(0, "clk_i2c0_div", "ppll", 0, 2, 0, 7),799/* 7 Reserved */800CDIV(0, "clk_i2c8_div", "ppll", 0, 2, 8, 7),801/* 15 Reserved */802803/* PMUCRU_CLKSEL_CON3 */804CDIV(0, "clk_i2c4_div", "ppll", 0, 3, 0, 7),805/* 7:15 Reserved */806807/* PMUCRU_CLKSEL_CON4 */808/* 0:9 clk_32k_suspend_div */809/* 10:14 Reserved */810/* 15 clk_32k_suspend_sel */811812/* PMUCRU_CLKSEL_CON5 */813COMP(0, "clk_uart4_c", xin24m_ppll_p, 0, 5, 0, 7, 10, 1),814/* 7 Reserved */815MUX(0, "clk_uart4_sel", uart4_p, 0, 5, 8, 2),816/* 11:15 Reserved */817818/* PMUCRU_CLKFRAC_CON0 / PMUCRU_CLKSEL_CON6 */819FRACT(0, "clk_uart4_frac_frac", "clk_uart4_sel", 0, 6),820821/* PMUCRU_CLKFRAC_CON1 / PMUCRU_CLKSEL_CON7 */822FRACT(0, "clk_wifi_frac", "clk_wifi_c", 0, 7),823};824825static int826rk3399_pmucru_probe(device_t dev)827{828829if (!ofw_bus_status_okay(dev))830return (ENXIO);831832if (ofw_bus_is_compatible(dev, "rockchip,rk3399-pmucru")) {833device_set_desc(dev, "Rockchip RK3399 PMU Clock and Reset Unit");834return (BUS_PROBE_DEFAULT);835}836837return (ENXIO);838}839840static int841rk3399_pmucru_attach(device_t dev)842{843struct rk_cru_softc *sc;844845sc = device_get_softc(dev);846sc->dev = dev;847848sc->gates = rk3399_pmu_gates;849sc->ngates = nitems(rk3399_pmu_gates);850851sc->clks = rk3399_pmu_clks;852sc->nclks = nitems(rk3399_pmu_clks);853854sc->reset_offset = 0x110;855sc->reset_num = 30;856857return (rk_cru_attach(dev));858}859860static device_method_t rk3399_pmucru_methods[] = {861/* Device interface */862DEVMETHOD(device_probe, rk3399_pmucru_probe),863DEVMETHOD(device_attach, rk3399_pmucru_attach),864865DEVMETHOD_END866};867868DEFINE_CLASS_1(rk3399_pmucru, rk3399_pmucru_driver, rk3399_pmucru_methods,869sizeof(struct rk_cru_softc), rk_cru_driver);870871EARLY_DRIVER_MODULE(rk3399_pmucru, simplebus, rk3399_pmucru_driver, 0, 0,872BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);873874875